handmux 0.20.0 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,335 @@
1
+ var wM=Object.defineProperty;var c1=i=>{throw TypeError(i)};var xM=(i,r,l)=>r in i?wM(i,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[r]=l;var bi=(i,r,l)=>xM(i,typeof r!="symbol"?r+"":r,l),NM=(i,r,l)=>r.has(i)||c1("Cannot "+l);var u1=(i,r,l)=>r.has(i)?c1("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,l);var tf=(i,r,l)=>(NM(i,r,"access private method"),l);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const N of document.querySelectorAll('link[rel="modulepreload"]'))g(N);new MutationObserver(N=>{for(const R of N)if(R.type==="childList")for(const y of R.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&g(y)}).observe(document,{childList:!0,subtree:!0});function l(N){const R={};return N.integrity&&(R.integrity=N.integrity),N.referrerPolicy&&(R.referrerPolicy=N.referrerPolicy),N.crossOrigin==="use-credentials"?R.credentials="include":N.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function g(N){if(N.ep)return;N.ep=!0;const R=l(N);fetch(N.href,R)}})();var SM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},eC={exports:{}},fb={},tC={exports:{}},_f={exports:{}};_f.exports;(function(i,r){/**
2
+ * @license React
3
+ * react.development.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var l="18.3.1",g=Symbol.for("react.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),m=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),o=Symbol.iterator,p="@@iterator";function f($){if($===null||typeof $!="object")return null;var ce=o&&$[o]||$[p];return typeof ce=="function"?ce:null}var _={current:null},E={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},S={current:null},k={},D=null;function L($){D=$}k.setExtraStackFrame=function($){D=$},k.getCurrentStack=null,k.getStackAddendum=function(){var $="";D&&($+=D);var ce=k.getCurrentStack;return ce&&($+=ce()||""),$};var U=!1,F=!1,P=!1,I=!1,G=!1,ie={ReactCurrentDispatcher:_,ReactCurrentBatchConfig:E,ReactCurrentOwner:S};ie.ReactDebugCurrentFrame=k,ie.ReactCurrentActQueue=T;function q($){{for(var ce=arguments.length,Ce=new Array(ce>1?ce-1:0),Ue=1;Ue<ce;Ue++)Ce[Ue-1]=arguments[Ue];X("warn",$,Ce)}}function J($){{for(var ce=arguments.length,Ce=new Array(ce>1?ce-1:0),Ue=1;Ue<ce;Ue++)Ce[Ue-1]=arguments[Ue];X("error",$,Ce)}}function X($,ce,Ce){{var Ue=ie.ReactDebugCurrentFrame,ot=Ue.getStackAddendum();ot!==""&&(ce+="%s",Ce=Ce.concat([ot]));var Mt=Ce.map(function(Nt){return String(Nt)});Mt.unshift("Warning: "+ce),Function.prototype.apply.call(console[$],console,Mt)}}var V={};function H($,ce){{var Ce=$.constructor,Ue=Ce&&(Ce.displayName||Ce.name)||"ReactClass",ot=Ue+"."+ce;if(V[ot])return;J("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",ce,Ue),V[ot]=!0}}var K={isMounted:function($){return!1},enqueueForceUpdate:function($,ce,Ce){H($,"forceUpdate")},enqueueReplaceState:function($,ce,Ce,Ue){H($,"replaceState")},enqueueSetState:function($,ce,Ce,Ue){H($,"setState")}},W=Object.assign,oe={};Object.freeze(oe);function de($,ce,Ce){this.props=$,this.context=ce,this.refs=oe,this.updater=Ce||K}de.prototype.isReactComponent={},de.prototype.setState=function($,ce){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,ce,"setState")},de.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};{var xe={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Se=function($,ce){Object.defineProperty(de.prototype,$,{get:function(){q("%s(...) is deprecated in plain JavaScript React classes. %s",ce[0],ce[1])}})};for(var se in xe)xe.hasOwnProperty(se)&&Se(se,xe[se])}function Y(){}Y.prototype=de.prototype;function pe($,ce,Ce){this.props=$,this.context=ce,this.refs=oe,this.updater=Ce||K}var he=pe.prototype=new Y;he.constructor=pe,W(he,de.prototype),he.isPureReactComponent=!0;function He(){var $={current:null};return Object.seal($),$}var Oe=Array.isArray;function et($){return Oe($)}function ve($){{var ce=typeof Symbol=="function"&&Symbol.toStringTag,Ce=ce&&$[Symbol.toStringTag]||$.constructor.name||"Object";return Ce}}function Ke($){try{return tt($),!1}catch{return!0}}function tt($){return""+$}function Xe($){if(Ke($))return J("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ve($)),tt($)}function Bt($,ce,Ce){var Ue=$.displayName;if(Ue)return Ue;var ot=ce.displayName||ce.name||"";return ot!==""?Ce+"("+ot+")":Ce}function Tt($){return $.displayName||"Context"}function le($){if($==null)return null;if(typeof $.tag=="number"&&J("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof $=="function")return $.displayName||$.name||null;if(typeof $=="string")return $;switch($){case R:return"Fragment";case N:return"Portal";case a:return"Profiler";case y:return"StrictMode";case d:return"Suspense";case w:return"SuspenseList"}if(typeof $=="object")switch($.$$typeof){case m:var ce=$;return Tt(ce)+".Consumer";case u:var Ce=$;return Tt(Ce._context)+".Provider";case b:return Bt($,$.render,"ForwardRef");case x:var Ue=$.displayName||null;return Ue!==null?Ue:le($.type)||"Memo";case j:{var ot=$,Mt=ot._payload,Nt=ot._init;try{return le(Nt(Mt))}catch{return null}}}return null}var Re=Object.prototype.hasOwnProperty,ze={key:!0,ref:!0,__self:!0,__source:!0},Me,$e,at;at={};function ct($){if(Re.call($,"ref")){var ce=Object.getOwnPropertyDescriptor($,"ref").get;if(ce&&ce.isReactWarning)return!1}return $.ref!==void 0}function Te($){if(Re.call($,"key")){var ce=Object.getOwnPropertyDescriptor($,"key").get;if(ce&&ce.isReactWarning)return!1}return $.key!==void 0}function we($,ce){var Ce=function(){Me||(Me=!0,J("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ce))};Ce.isReactWarning=!0,Object.defineProperty($,"key",{get:Ce,configurable:!0})}function Je($,ce){var Ce=function(){$e||($e=!0,J("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ce))};Ce.isReactWarning=!0,Object.defineProperty($,"ref",{get:Ce,configurable:!0})}function _e($){if(typeof $.ref=="string"&&S.current&&$.__self&&S.current.stateNode!==$.__self){var ce=le(S.current.type);at[ce]||(J('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ce,$.ref),at[ce]=!0)}}var Z=function($,ce,Ce,Ue,ot,Mt,Nt){var Wt={$$typeof:g,type:$,key:ce,ref:Ce,props:Nt,_owner:Mt};return Wt._store={},Object.defineProperty(Wt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Wt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ue}),Object.defineProperty(Wt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ot}),Object.freeze&&(Object.freeze(Wt.props),Object.freeze(Wt)),Wt};function Pe($,ce,Ce){var Ue,ot={},Mt=null,Nt=null,Wt=null,mn=null;if(ce!=null){ct(ce)&&(Nt=ce.ref,_e(ce)),Te(ce)&&(Xe(ce.key),Mt=""+ce.key),Wt=ce.__self===void 0?null:ce.__self,mn=ce.__source===void 0?null:ce.__source;for(Ue in ce)Re.call(ce,Ue)&&!ze.hasOwnProperty(Ue)&&(ot[Ue]=ce[Ue])}var bn=arguments.length-2;if(bn===1)ot.children=Ce;else if(bn>1){for(var Jn=Array(bn),In=0;In<bn;In++)Jn[In]=arguments[In+2];Object.freeze&&Object.freeze(Jn),ot.children=Jn}if($&&$.defaultProps){var on=$.defaultProps;for(Ue in on)ot[Ue]===void 0&&(ot[Ue]=on[Ue])}if(Mt||Nt){var si=typeof $=="function"?$.displayName||$.name||"Unknown":$;Mt&&we(ot,si),Nt&&Je(ot,si)}return Z($,Mt,Nt,Wt,mn,S.current,ot)}function xt($,ce){var Ce=Z($.type,ce,$.ref,$._self,$._source,$._owner,$.props);return Ce}function Ot($,ce,Ce){if($==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var Ue,ot=W({},$.props),Mt=$.key,Nt=$.ref,Wt=$._self,mn=$._source,bn=$._owner;if(ce!=null){ct(ce)&&(Nt=ce.ref,bn=S.current),Te(ce)&&(Xe(ce.key),Mt=""+ce.key);var Jn;$.type&&$.type.defaultProps&&(Jn=$.type.defaultProps);for(Ue in ce)Re.call(ce,Ue)&&!ze.hasOwnProperty(Ue)&&(ce[Ue]===void 0&&Jn!==void 0?ot[Ue]=Jn[Ue]:ot[Ue]=ce[Ue])}var In=arguments.length-2;if(In===1)ot.children=Ce;else if(In>1){for(var on=Array(In),si=0;si<In;si++)on[si]=arguments[si+2];ot.children=on}return Z($.type,Mt,Nt,Wt,mn,bn,ot)}function At($){return typeof $=="object"&&$!==null&&$.$$typeof===g}var Vt=".",cn=":";function _n($){var ce=/[=:]/g,Ce={"=":"=0",":":"=2"},Ue=$.replace(ce,function(ot){return Ce[ot]});return"$"+Ue}var Kt=!1,Ft=/\/+/g;function Tn($){return $.replace(Ft,"$&/")}function an($,ce){return typeof $=="object"&&$!==null&&$.key!=null?(Xe($.key),_n(""+$.key)):ce.toString(36)}function Un($,ce,Ce,Ue,ot){var Mt=typeof $;(Mt==="undefined"||Mt==="boolean")&&($=null);var Nt=!1;if($===null)Nt=!0;else switch(Mt){case"string":case"number":Nt=!0;break;case"object":switch($.$$typeof){case g:case N:Nt=!0}}if(Nt){var Wt=$,mn=ot(Wt),bn=Ue===""?Vt+an(Wt,0):Ue;if(et(mn)){var Jn="";bn!=null&&(Jn=Tn(bn)+"/"),Un(mn,ce,Jn,"",function(Ee){return Ee})}else mn!=null&&(At(mn)&&(mn.key&&(!Wt||Wt.key!==mn.key)&&Xe(mn.key),mn=xt(mn,Ce+(mn.key&&(!Wt||Wt.key!==mn.key)?Tn(""+mn.key)+"/":"")+bn)),ce.push(mn));return 1}var In,on,si=0,mi=Ue===""?Vt:Ue+cn;if(et($))for(var ji=0;ji<$.length;ji++)In=$[ji],on=mi+an(In,ji),si+=Un(In,ce,Ce,on,ot);else{var ks=f($);if(typeof ks=="function"){var or=$;ks===or.entries&&(Kt||q("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Kt=!0);for(var Rs=ks.call(or),fa,bs=0;!(fa=Rs.next()).done;)In=fa.value,on=mi+an(In,bs++),si+=Un(In,ce,Ce,on,ot)}else if(Mt==="object"){var pa=String($);throw new Error("Objects are not valid as a React child (found: "+(pa==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":pa)+"). If you meant to render a collection of children, use an array instead.")}}return si}function Ht($,ce,Ce){if($==null)return $;var Ue=[],ot=0;return Un($,Ue,"","",function(Mt){return ce.call(Ce,Mt,ot++)}),Ue}function Qn($){var ce=0;return Ht($,function(){ce++}),ce}function En($,ce,Ce){Ht($,function(){ce.apply(this,arguments)},Ce)}function yi($){return Ht($,function(ce){return ce})||[]}function Zt($){if(!At($))throw new Error("React.Children.only expected to receive a single React element child.");return $}function oi($){var ce={$$typeof:m,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};ce.Provider={$$typeof:u,_context:ce};var Ce=!1,Ue=!1,ot=!1;{var Mt={$$typeof:m,_context:ce};Object.defineProperties(Mt,{Provider:{get:function(){return Ue||(Ue=!0,J("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),ce.Provider},set:function(Nt){ce.Provider=Nt}},_currentValue:{get:function(){return ce._currentValue},set:function(Nt){ce._currentValue=Nt}},_currentValue2:{get:function(){return ce._currentValue2},set:function(Nt){ce._currentValue2=Nt}},_threadCount:{get:function(){return ce._threadCount},set:function(Nt){ce._threadCount=Nt}},Consumer:{get:function(){return Ce||(Ce=!0,J("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),ce.Consumer}},displayName:{get:function(){return ce.displayName},set:function(Nt){ot||(q("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Nt),ot=!0)}}}),ce.Consumer=Mt}return ce._currentRenderer=null,ce._currentRenderer2=null,ce}var ci=-1,rn=0,un=1,di=2;function nt($){if($._status===ci){var ce=$._result,Ce=ce();if(Ce.then(function(Mt){if($._status===rn||$._status===ci){var Nt=$;Nt._status=un,Nt._result=Mt}},function(Mt){if($._status===rn||$._status===ci){var Nt=$;Nt._status=di,Nt._result=Mt}}),$._status===ci){var Ue=$;Ue._status=rn,Ue._result=Ce}}if($._status===un){var ot=$._result;return ot===void 0&&J(`lazy: Expected the result of a dynamic import() call. Instead received: %s
10
+
11
+ Your code should look like:
12
+ const MyComponent = lazy(() => import('./MyComponent'))
13
+
14
+ Did you accidentally put curly braces around the import?`,ot),"default"in ot||J(`lazy: Expected the result of a dynamic import() call. Instead received: %s
15
+
16
+ Your code should look like:
17
+ const MyComponent = lazy(() => import('./MyComponent'))`,ot),ot.default}else throw $._result}function ae($){var ce={_status:ci,_result:$},Ce={$$typeof:j,_payload:ce,_init:nt};{var Ue,ot;Object.defineProperties(Ce,{defaultProps:{configurable:!0,get:function(){return Ue},set:function(Mt){J("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ue=Mt,Object.defineProperty(Ce,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return ot},set:function(Mt){J("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),ot=Mt,Object.defineProperty(Ce,"propTypes",{enumerable:!0})}}})}return Ce}function Fe($){$!=null&&$.$$typeof===x?J("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof $!="function"?J("forwardRef requires a render function but was given %s.",$===null?"null":typeof $):$.length!==0&&$.length!==2&&J("forwardRef render functions accept exactly two parameters: props and ref. %s",$.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),$!=null&&($.defaultProps!=null||$.propTypes!=null)&&J("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var ce={$$typeof:b,render:$};{var Ce;Object.defineProperty(ce,"displayName",{enumerable:!1,configurable:!0,get:function(){return Ce},set:function(Ue){Ce=Ue,!$.name&&!$.displayName&&($.displayName=Ue)}})}return ce}var st;st=Symbol.for("react.module.reference");function ge($){return!!(typeof $=="string"||typeof $=="function"||$===R||$===a||G||$===y||$===d||$===w||I||$===v||U||F||P||typeof $=="object"&&$!==null&&($.$$typeof===j||$.$$typeof===x||$.$$typeof===u||$.$$typeof===m||$.$$typeof===b||$.$$typeof===st||$.getModuleId!==void 0))}function qe($,ce){ge($)||J("memo: The first argument must be a component. Instead received: %s",$===null?"null":typeof $);var Ce={$$typeof:x,type:$,compare:ce===void 0?null:ce};{var Ue;Object.defineProperty(Ce,"displayName",{enumerable:!1,configurable:!0,get:function(){return Ue},set:function(ot){Ue=ot,!$.name&&!$.displayName&&($.displayName=ot)}})}return Ce}function it(){var $=_.current;return $===null&&J(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
18
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
19
+ 2. You might be breaking the Rules of Hooks
20
+ 3. You might have more than one copy of React in the same app
21
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),$}function Le($){var ce=it();if($._context!==void 0){var Ce=$._context;Ce.Consumer===$?J("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):Ce.Provider===$&&J("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return ce.useContext($)}function vt($){var ce=it();return ce.useState($)}function Ln($,ce,Ce){var Ue=it();return Ue.useReducer($,ce,Ce)}function Qt($){var ce=it();return ce.useRef($)}function Xt($,ce){var Ce=it();return Ce.useEffect($,ce)}function yn($,ce){var Ce=it();return Ce.useInsertionEffect($,ce)}function Et($,ce){var Ce=it();return Ce.useLayoutEffect($,ce)}function Jt($,ce){var Ce=it();return Ce.useCallback($,ce)}function wn($,ce){var Ce=it();return Ce.useMemo($,ce)}function wi($,ce,Ce){var Ue=it();return Ue.useImperativeHandle($,ce,Ce)}function xi($,ce){{var Ce=it();return Ce.useDebugValue($,ce)}}function Pt(){var $=it();return $.useTransition()}function Hn($){var ce=it();return ce.useDeferredValue($)}function On(){var $=it();return $.useId()}function ht($,ce,Ce){var Ue=it();return Ue.useSyncExternalStore($,ce,Ce)}var re=0,Ae,lt,kt,jt,zt,An,ei;function zn(){}zn.__reactDisabledLog=!0;function Ci(){{if(re===0){Ae=console.log,lt=console.info,kt=console.warn,jt=console.error,zt=console.group,An=console.groupCollapsed,ei=console.groupEnd;var $={configurable:!0,enumerable:!0,value:zn,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}re++}}function $t(){{if(re--,re===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},$,{value:Ae}),info:W({},$,{value:lt}),warn:W({},$,{value:kt}),error:W({},$,{value:jt}),group:W({},$,{value:zt}),groupCollapsed:W({},$,{value:An}),groupEnd:W({},$,{value:ei})})}re<0&&J("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ui=ie.ReactCurrentDispatcher,pi;function Gi($,ce,Ce){{if(pi===void 0)try{throw Error()}catch(ot){var Ue=ot.stack.trim().match(/\n( *(at )?)/);pi=Ue&&Ue[1]||""}return`
22
+ `+pi+$}}var Yi=!1,rr;{var sr=typeof WeakMap=="function"?WeakMap:Map;rr=new sr}function ar($,ce){if(!$||Yi)return"";{var Ce=rr.get($);if(Ce!==void 0)return Ce}var Ue;Yi=!0;var ot=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Mt;Mt=Ui.current,Ui.current=null,Ci();try{if(ce){var Nt=function(){throw Error()};if(Object.defineProperty(Nt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Nt,[])}catch(mi){Ue=mi}Reflect.construct($,[],Nt)}else{try{Nt.call()}catch(mi){Ue=mi}$.call(Nt.prototype)}}else{try{throw Error()}catch(mi){Ue=mi}$()}}catch(mi){if(mi&&Ue&&typeof mi.stack=="string"){for(var Wt=mi.stack.split(`
23
+ `),mn=Ue.stack.split(`
24
+ `),bn=Wt.length-1,Jn=mn.length-1;bn>=1&&Jn>=0&&Wt[bn]!==mn[Jn];)Jn--;for(;bn>=1&&Jn>=0;bn--,Jn--)if(Wt[bn]!==mn[Jn]){if(bn!==1||Jn!==1)do if(bn--,Jn--,Jn<0||Wt[bn]!==mn[Jn]){var In=`
25
+ `+Wt[bn].replace(" at new "," at ");return $.displayName&&In.includes("<anonymous>")&&(In=In.replace("<anonymous>",$.displayName)),typeof $=="function"&&rr.set($,In),In}while(bn>=1&&Jn>=0);break}}}finally{Yi=!1,Ui.current=Mt,$t(),Error.prepareStackTrace=ot}var on=$?$.displayName||$.name:"",si=on?Gi(on):"";return typeof $=="function"&&rr.set($,si),si}function fr($,ce,Ce){return ar($,!1)}function Ri($){var ce=$.prototype;return!!(ce&&ce.isReactComponent)}function Bi($,ce,Ce){if($==null)return"";if(typeof $=="function")return ar($,Ri($));if(typeof $=="string")return Gi($);switch($){case d:return Gi("Suspense");case w:return Gi("SuspenseList")}if(typeof $=="object")switch($.$$typeof){case b:return fr($.render);case x:return Bi($.type,ce,Ce);case j:{var Ue=$,ot=Ue._payload,Mt=Ue._init;try{return Bi(Mt(ot),ce,Ce)}catch{}}}return""}var Dr={},Vr=ie.ReactDebugCurrentFrame;function dn($){if($){var ce=$._owner,Ce=Bi($.type,$._source,ce?ce.type:null);Vr.setExtraStackFrame(Ce)}else Vr.setExtraStackFrame(null)}function is($,ce,Ce,Ue,ot){{var Mt=Function.call.bind(Re);for(var Nt in $)if(Mt($,Nt)){var Wt=void 0;try{if(typeof $[Nt]!="function"){var mn=Error((Ue||"React class")+": "+Ce+" type `"+Nt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof $[Nt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw mn.name="Invariant Violation",mn}Wt=$[Nt](ce,Nt,Ue,Ce,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(bn){Wt=bn}Wt&&!(Wt instanceof Error)&&(dn(ot),J("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ue||"React class",Ce,Nt,typeof Wt),dn(null)),Wt instanceof Error&&!(Wt.message in Dr)&&(Dr[Wt.message]=!0,dn(ot),J("Failed %s type: %s",Ce,Wt.message),dn(null))}}}function pr($){if($){var ce=$._owner,Ce=Bi($.type,$._source,ce?ce.type:null);L(Ce)}else L(null)}var te;te=!1;function Ne(){if(S.current){var $=le(S.current.type);if($)return`
26
+
27
+ Check the render method of \``+$+"`."}return""}function Ve($){if($!==void 0){var ce=$.fileName.replace(/^.*[\\\/]/,""),Ce=$.lineNumber;return`
28
+
29
+ Check your code at `+ce+":"+Ce+"."}return""}function wt($){return $!=null?Ve($.__source):""}var qn={};function Oi($){var ce=Ne();if(!ce){var Ce=typeof $=="string"?$:$.displayName||$.name;Ce&&(ce=`
30
+
31
+ Check the top-level render call using <`+Ce+">.")}return ce}function Pn($,ce){if(!(!$._store||$._store.validated||$.key!=null)){$._store.validated=!0;var Ce=Oi(ce);if(!qn[Ce]){qn[Ce]=!0;var Ue="";$&&$._owner&&$._owner!==S.current&&(Ue=" It was passed a child from "+le($._owner.type)+"."),pr($),J('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Ce,Ue),pr(null)}}}function Yt($,ce){if(typeof $=="object"){if(et($))for(var Ce=0;Ce<$.length;Ce++){var Ue=$[Ce];At(Ue)&&Pn(Ue,ce)}else if(At($))$._store&&($._store.validated=!0);else if($){var ot=f($);if(typeof ot=="function"&&ot!==$.entries)for(var Mt=ot.call($),Nt;!(Nt=Mt.next()).done;)At(Nt.value)&&Pn(Nt.value,ce)}}}function hi($){{var ce=$.type;if(ce==null||typeof ce=="string")return;var Ce;if(typeof ce=="function")Ce=ce.propTypes;else if(typeof ce=="object"&&(ce.$$typeof===b||ce.$$typeof===x))Ce=ce.propTypes;else return;if(Ce){var Ue=le(ce);is(Ce,$.props,"prop",Ue,$)}else if(ce.PropTypes!==void 0&&!te){te=!0;var ot=le(ce);J("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ot||"Unknown")}typeof ce.getDefaultProps=="function"&&!ce.getDefaultProps.isReactClassApproved&&J("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function $n($){{for(var ce=Object.keys($.props),Ce=0;Ce<ce.length;Ce++){var Ue=ce[Ce];if(Ue!=="children"&&Ue!=="key"){pr($),J("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ue),pr(null);break}}$.ref!==null&&(pr($),J("Invalid attribute `ref` supplied to `React.Fragment`."),pr(null))}}function xn($,ce,Ce){var Ue=ge($);if(!Ue){var ot="";($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(ot+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Mt=wt(ce);Mt?ot+=Mt:ot+=Ne();var Nt;$===null?Nt="null":et($)?Nt="array":$!==void 0&&$.$$typeof===g?(Nt="<"+(le($.type)||"Unknown")+" />",ot=" Did you accidentally export a JSX literal instead of a component?"):Nt=typeof $,J("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Nt,ot)}var Wt=Pe.apply(this,arguments);if(Wt==null)return Wt;if(Ue)for(var mn=2;mn<arguments.length;mn++)Yt(arguments[mn],$);return $===R?$n(Wt):hi(Wt),Wt}var hn=!1;function Ni($){var ce=xn.bind(null,$);return ce.type=$,hn||(hn=!0,q("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(ce,"type",{enumerable:!1,get:function(){return q("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:$}),$}}),ce}function Kn($,ce,Ce){for(var Ue=Ot.apply(this,arguments),ot=2;ot<arguments.length;ot++)Yt(arguments[ot],Ue.type);return hi(Ue),Ue}function vi($,ce){var Ce=E.transition;E.transition={};var Ue=E.transition;E.transition._updatedFibers=new Set;try{$()}finally{if(E.transition=Ce,Ce===null&&Ue._updatedFibers){var ot=Ue._updatedFibers.size;ot>10&&q("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),Ue._updatedFibers.clear()}}}var Fi=!1,Ei=null;function Xr($){if(Ei===null)try{var ce=("require"+Math.random()).slice(0,7),Ce=i&&i[ce];Ei=Ce.call(i,"timers").setImmediate}catch{Ei=function(ot){Fi===!1&&(Fi=!0,typeof MessageChannel>"u"&&J("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Mt=new MessageChannel;Mt.port1.onmessage=ot,Mt.port2.postMessage(void 0)}}return Ei($)}var Hi=0,gs=!1;function Vn($){{var ce=Hi;Hi++,T.current===null&&(T.current=[]);var Ce=T.isBatchingLegacy,Ue;try{if(T.isBatchingLegacy=!0,Ue=$(),!Ce&&T.didScheduleLegacyUpdate){var ot=T.current;ot!==null&&(T.didScheduleLegacyUpdate=!1,kr(ot))}}catch(on){throw vr(ce),on}finally{T.isBatchingLegacy=Ce}if(Ue!==null&&typeof Ue=="object"&&typeof Ue.then=="function"){var Mt=Ue,Nt=!1,Wt={then:function(on,si){Nt=!0,Mt.then(function(mi){vr(ce),Hi===0?Lt(mi,on,si):on(mi)},function(mi){vr(ce),si(mi)})}};return!gs&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Nt||(gs=!0,J("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),Wt}else{var mn=Ue;if(vr(ce),Hi===0){var bn=T.current;bn!==null&&(kr(bn),T.current=null);var Jn={then:function(on,si){T.current===null?(T.current=[],Lt(mn,on,si)):on(mn)}};return Jn}else{var In={then:function(on,si){on(mn)}};return In}}}}function vr($){$!==Hi-1&&J("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Hi=$}function Lt($,ce,Ce){{var Ue=T.current;if(Ue!==null)try{kr(Ue),Xr(function(){Ue.length===0?(T.current=null,ce($)):Lt($,ce,Ce)})}catch(ot){Ce(ot)}else ce($)}}var Ti=!1;function kr($){if(!Ti){Ti=!0;var ce=0;try{for(;ce<$.length;ce++){var Ce=$[ce];do Ce=Ce(!0);while(Ce!==null)}$.length=0}catch(Ue){throw $=$.slice(ce+1),Ue}finally{Ti=!1}}}var ma=xn,_s=Kn,Gs=Ni,Ys={map:Ht,forEach:En,count:Qn,toArray:yi,only:Zt};r.Children=Ys,r.Component=de,r.Fragment=R,r.Profiler=a,r.PureComponent=pe,r.StrictMode=y,r.Suspense=d,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,r.act=Vn,r.cloneElement=_s,r.createContext=oi,r.createElement=ma,r.createFactory=Gs,r.createRef=He,r.forwardRef=Fe,r.isValidElement=At,r.lazy=ae,r.memo=qe,r.startTransition=vi,r.unstable_act=Vn,r.useCallback=Jt,r.useContext=Le,r.useDebugValue=xi,r.useDeferredValue=Hn,r.useEffect=Xt,r.useId=On,r.useImperativeHandle=wi,r.useInsertionEffect=yn,r.useLayoutEffect=Et,r.useMemo=wn,r.useReducer=Ln,r.useRef=Qt,r.useState=vt,r.useSyncExternalStore=ht,r.useTransition=Pt,r.version=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(_f,_f.exports);var CM=_f.exports;tC.exports=CM;var A=tC.exports;/**
32
+ * @license React
33
+ * react-jsx-dev-runtime.development.js
34
+ *
35
+ * Copyright (c) Facebook, Inc. and its affiliates.
36
+ *
37
+ * This source code is licensed under the MIT license found in the
38
+ * LICENSE file in the root directory of this source tree.
39
+ */(function(){var i=A,r=Symbol.for("react.element"),l=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),j=Symbol.iterator,v="@@iterator";function o(ae){if(ae===null||typeof ae!="object")return null;var Fe=j&&ae[j]||ae[v];return typeof Fe=="function"?Fe:null}var p=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(ae){{for(var Fe=arguments.length,st=new Array(Fe>1?Fe-1:0),ge=1;ge<Fe;ge++)st[ge-1]=arguments[ge];_("error",ae,st)}}function _(ae,Fe,st){{var ge=p.ReactDebugCurrentFrame,qe=ge.getStackAddendum();qe!==""&&(Fe+="%s",st=st.concat([qe]));var it=st.map(function(Le){return String(Le)});it.unshift("Warning: "+Fe),Function.prototype.apply.call(console[ae],console,it)}}var E=!1,T=!1,S=!1,k=!1,D=!1,L;L=Symbol.for("react.module.reference");function U(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===g||ae===R||D||ae===N||ae===m||ae===b||k||ae===x||E||T||S||typeof ae=="object"&&ae!==null&&(ae.$$typeof===w||ae.$$typeof===d||ae.$$typeof===y||ae.$$typeof===a||ae.$$typeof===u||ae.$$typeof===L||ae.getModuleId!==void 0))}function F(ae,Fe,st){var ge=ae.displayName;if(ge)return ge;var qe=Fe.displayName||Fe.name||"";return qe!==""?st+"("+qe+")":st}function P(ae){return ae.displayName||"Context"}function I(ae){if(ae==null)return null;if(typeof ae.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ae=="function")return ae.displayName||ae.name||null;if(typeof ae=="string")return ae;switch(ae){case g:return"Fragment";case l:return"Portal";case R:return"Profiler";case N:return"StrictMode";case m:return"Suspense";case b:return"SuspenseList"}if(typeof ae=="object")switch(ae.$$typeof){case a:var Fe=ae;return P(Fe)+".Consumer";case y:var st=ae;return P(st._context)+".Provider";case u:return F(ae,ae.render,"ForwardRef");case d:var ge=ae.displayName||null;return ge!==null?ge:I(ae.type)||"Memo";case w:{var qe=ae,it=qe._payload,Le=qe._init;try{return I(Le(it))}catch{return null}}}return null}var G=Object.assign,ie=0,q,J,X,V,H,K,W;function oe(){}oe.__reactDisabledLog=!0;function de(){{if(ie===0){q=console.log,J=console.info,X=console.warn,V=console.error,H=console.group,K=console.groupCollapsed,W=console.groupEnd;var ae={configurable:!0,enumerable:!0,value:oe,writable:!0};Object.defineProperties(console,{info:ae,log:ae,warn:ae,error:ae,group:ae,groupCollapsed:ae,groupEnd:ae})}ie++}}function xe(){{if(ie--,ie===0){var ae={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},ae,{value:q}),info:G({},ae,{value:J}),warn:G({},ae,{value:X}),error:G({},ae,{value:V}),group:G({},ae,{value:H}),groupCollapsed:G({},ae,{value:K}),groupEnd:G({},ae,{value:W})})}ie<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Se=p.ReactCurrentDispatcher,se;function Y(ae,Fe,st){{if(se===void 0)try{throw Error()}catch(qe){var ge=qe.stack.trim().match(/\n( *(at )?)/);se=ge&&ge[1]||""}return`
40
+ `+se+ae}}var pe=!1,he;{var He=typeof WeakMap=="function"?WeakMap:Map;he=new He}function Oe(ae,Fe){if(!ae||pe)return"";{var st=he.get(ae);if(st!==void 0)return st}var ge;pe=!0;var qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var it;it=Se.current,Se.current=null,de();try{if(Fe){var Le=function(){throw Error()};if(Object.defineProperty(Le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Le,[])}catch(wn){ge=wn}Reflect.construct(ae,[],Le)}else{try{Le.call()}catch(wn){ge=wn}ae.call(Le.prototype)}}else{try{throw Error()}catch(wn){ge=wn}ae()}}catch(wn){if(wn&&ge&&typeof wn.stack=="string"){for(var vt=wn.stack.split(`
41
+ `),Ln=ge.stack.split(`
42
+ `),Qt=vt.length-1,Xt=Ln.length-1;Qt>=1&&Xt>=0&&vt[Qt]!==Ln[Xt];)Xt--;for(;Qt>=1&&Xt>=0;Qt--,Xt--)if(vt[Qt]!==Ln[Xt]){if(Qt!==1||Xt!==1)do if(Qt--,Xt--,Xt<0||vt[Qt]!==Ln[Xt]){var yn=`
43
+ `+vt[Qt].replace(" at new "," at ");return ae.displayName&&yn.includes("<anonymous>")&&(yn=yn.replace("<anonymous>",ae.displayName)),typeof ae=="function"&&he.set(ae,yn),yn}while(Qt>=1&&Xt>=0);break}}}finally{pe=!1,Se.current=it,xe(),Error.prepareStackTrace=qe}var Et=ae?ae.displayName||ae.name:"",Jt=Et?Y(Et):"";return typeof ae=="function"&&he.set(ae,Jt),Jt}function et(ae,Fe,st){return Oe(ae,!1)}function ve(ae){var Fe=ae.prototype;return!!(Fe&&Fe.isReactComponent)}function Ke(ae,Fe,st){if(ae==null)return"";if(typeof ae=="function")return Oe(ae,ve(ae));if(typeof ae=="string")return Y(ae);switch(ae){case m:return Y("Suspense");case b:return Y("SuspenseList")}if(typeof ae=="object")switch(ae.$$typeof){case u:return et(ae.render);case d:return Ke(ae.type,Fe,st);case w:{var ge=ae,qe=ge._payload,it=ge._init;try{return Ke(it(qe),Fe,st)}catch{}}}return""}var tt=Object.prototype.hasOwnProperty,Xe={},Bt=p.ReactDebugCurrentFrame;function Tt(ae){if(ae){var Fe=ae._owner,st=Ke(ae.type,ae._source,Fe?Fe.type:null);Bt.setExtraStackFrame(st)}else Bt.setExtraStackFrame(null)}function le(ae,Fe,st,ge,qe){{var it=Function.call.bind(tt);for(var Le in ae)if(it(ae,Le)){var vt=void 0;try{if(typeof ae[Le]!="function"){var Ln=Error((ge||"React class")+": "+st+" type `"+Le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ae[Le]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ln.name="Invariant Violation",Ln}vt=ae[Le](Fe,Le,ge,st,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Qt){vt=Qt}vt&&!(vt instanceof Error)&&(Tt(qe),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ge||"React class",st,Le,typeof vt),Tt(null)),vt instanceof Error&&!(vt.message in Xe)&&(Xe[vt.message]=!0,Tt(qe),f("Failed %s type: %s",st,vt.message),Tt(null))}}}var Re=Array.isArray;function ze(ae){return Re(ae)}function Me(ae){{var Fe=typeof Symbol=="function"&&Symbol.toStringTag,st=Fe&&ae[Symbol.toStringTag]||ae.constructor.name||"Object";return st}}function $e(ae){try{return at(ae),!1}catch{return!0}}function at(ae){return""+ae}function ct(ae){if($e(ae))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Me(ae)),at(ae)}var Te=p.ReactCurrentOwner,we={key:!0,ref:!0,__self:!0,__source:!0},Je,_e,Z;Z={};function Pe(ae){if(tt.call(ae,"ref")){var Fe=Object.getOwnPropertyDescriptor(ae,"ref").get;if(Fe&&Fe.isReactWarning)return!1}return ae.ref!==void 0}function xt(ae){if(tt.call(ae,"key")){var Fe=Object.getOwnPropertyDescriptor(ae,"key").get;if(Fe&&Fe.isReactWarning)return!1}return ae.key!==void 0}function Ot(ae,Fe){if(typeof ae.ref=="string"&&Te.current&&Fe&&Te.current.stateNode!==Fe){var st=I(Te.current.type);Z[st]||(f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(Te.current.type),ae.ref),Z[st]=!0)}}function At(ae,Fe){{var st=function(){Je||(Je=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Fe))};st.isReactWarning=!0,Object.defineProperty(ae,"key",{get:st,configurable:!0})}}function Vt(ae,Fe){{var st=function(){_e||(_e=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Fe))};st.isReactWarning=!0,Object.defineProperty(ae,"ref",{get:st,configurable:!0})}}var cn=function(ae,Fe,st,ge,qe,it,Le){var vt={$$typeof:r,type:ae,key:Fe,ref:st,props:Le,_owner:it};return vt._store={},Object.defineProperty(vt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(vt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ge}),Object.defineProperty(vt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:qe}),Object.freeze&&(Object.freeze(vt.props),Object.freeze(vt)),vt};function _n(ae,Fe,st,ge,qe){{var it,Le={},vt=null,Ln=null;st!==void 0&&(ct(st),vt=""+st),xt(Fe)&&(ct(Fe.key),vt=""+Fe.key),Pe(Fe)&&(Ln=Fe.ref,Ot(Fe,qe));for(it in Fe)tt.call(Fe,it)&&!we.hasOwnProperty(it)&&(Le[it]=Fe[it]);if(ae&&ae.defaultProps){var Qt=ae.defaultProps;for(it in Qt)Le[it]===void 0&&(Le[it]=Qt[it])}if(vt||Ln){var Xt=typeof ae=="function"?ae.displayName||ae.name||"Unknown":ae;vt&&At(Le,Xt),Ln&&Vt(Le,Xt)}return cn(ae,vt,Ln,qe,ge,Te.current,Le)}}var Kt=p.ReactCurrentOwner,Ft=p.ReactDebugCurrentFrame;function Tn(ae){if(ae){var Fe=ae._owner,st=Ke(ae.type,ae._source,Fe?Fe.type:null);Ft.setExtraStackFrame(st)}else Ft.setExtraStackFrame(null)}var an;an=!1;function Un(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===r}function Ht(){{if(Kt.current){var ae=I(Kt.current.type);if(ae)return`
44
+
45
+ Check the render method of \``+ae+"`."}return""}}function Qn(ae){{if(ae!==void 0){var Fe=ae.fileName.replace(/^.*[\\\/]/,""),st=ae.lineNumber;return`
46
+
47
+ Check your code at `+Fe+":"+st+"."}return""}}var En={};function yi(ae){{var Fe=Ht();if(!Fe){var st=typeof ae=="string"?ae:ae.displayName||ae.name;st&&(Fe=`
48
+
49
+ Check the top-level render call using <`+st+">.")}return Fe}}function Zt(ae,Fe){{if(!ae._store||ae._store.validated||ae.key!=null)return;ae._store.validated=!0;var st=yi(Fe);if(En[st])return;En[st]=!0;var ge="";ae&&ae._owner&&ae._owner!==Kt.current&&(ge=" It was passed a child from "+I(ae._owner.type)+"."),Tn(ae),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',st,ge),Tn(null)}}function oi(ae,Fe){{if(typeof ae!="object")return;if(ze(ae))for(var st=0;st<ae.length;st++){var ge=ae[st];Un(ge)&&Zt(ge,Fe)}else if(Un(ae))ae._store&&(ae._store.validated=!0);else if(ae){var qe=o(ae);if(typeof qe=="function"&&qe!==ae.entries)for(var it=qe.call(ae),Le;!(Le=it.next()).done;)Un(Le.value)&&Zt(Le.value,Fe)}}}function ci(ae){{var Fe=ae.type;if(Fe==null||typeof Fe=="string")return;var st;if(typeof Fe=="function")st=Fe.propTypes;else if(typeof Fe=="object"&&(Fe.$$typeof===u||Fe.$$typeof===d))st=Fe.propTypes;else return;if(st){var ge=I(Fe);le(st,ae.props,"prop",ge,ae)}else if(Fe.PropTypes!==void 0&&!an){an=!0;var qe=I(Fe);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",qe||"Unknown")}typeof Fe.getDefaultProps=="function"&&!Fe.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function rn(ae){{for(var Fe=Object.keys(ae.props),st=0;st<Fe.length;st++){var ge=Fe[st];if(ge!=="children"&&ge!=="key"){Tn(ae),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ge),Tn(null);break}}ae.ref!==null&&(Tn(ae),f("Invalid attribute `ref` supplied to `React.Fragment`."),Tn(null))}}var un={};function di(ae,Fe,st,ge,qe,it){{var Le=U(ae);if(!Le){var vt="";(ae===void 0||typeof ae=="object"&&ae!==null&&Object.keys(ae).length===0)&&(vt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ln=Qn(qe);Ln?vt+=Ln:vt+=Ht();var Qt;ae===null?Qt="null":ze(ae)?Qt="array":ae!==void 0&&ae.$$typeof===r?(Qt="<"+(I(ae.type)||"Unknown")+" />",vt=" Did you accidentally export a JSX literal instead of a component?"):Qt=typeof ae,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Qt,vt)}var Xt=_n(ae,Fe,st,qe,it);if(Xt==null)return Xt;if(Le){var yn=Fe.children;if(yn!==void 0)if(ge)if(ze(yn)){for(var Et=0;Et<yn.length;Et++)oi(yn[Et],ae);Object.freeze&&Object.freeze(yn)}else f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else oi(yn,ae)}if(tt.call(Fe,"key")){var Jt=I(ae),wn=Object.keys(Fe).filter(function(Pt){return Pt!=="key"}),wi=wn.length>0?"{key: someKey, "+wn.join(": ..., ")+": ...}":"{key: someKey}";if(!un[Jt+wi]){var xi=wn.length>0?"{"+wn.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
50
+ let props = %s;
51
+ <%s {...props} />
52
+ React keys must be passed directly to JSX without using spread:
53
+ let props = %s;
54
+ <%s key={someKey} {...props} />`,wi,Jt,xi,Jt),un[Jt+wi]=!0}}return ae===g?rn(Xt):ci(Xt),Xt}}var nt=di;fb.Fragment=g,fb.jsxDEV=nt})();eC.exports=fb;var c=eC.exports,nC={exports:{}},ps={},iC={exports:{}},rC={};(function(i){/**
55
+ * @license React
56
+ * scheduler.development.js
57
+ *
58
+ * Copyright (c) Facebook, Inc. and its affiliates.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var r=!1,l=5;function g(_e,Z){var Pe=_e.length;_e.push(Z),y(_e,Z,Pe)}function N(_e){return _e.length===0?null:_e[0]}function R(_e){if(_e.length===0)return null;var Z=_e[0],Pe=_e.pop();return Pe!==Z&&(_e[0]=Pe,a(_e,Pe,0)),Z}function y(_e,Z,Pe){for(var xt=Pe;xt>0;){var Ot=xt-1>>>1,At=_e[Ot];if(u(At,Z)>0)_e[Ot]=Z,_e[xt]=At,xt=Ot;else return}}function a(_e,Z,Pe){for(var xt=Pe,Ot=_e.length,At=Ot>>>1;xt<At;){var Vt=(xt+1)*2-1,cn=_e[Vt],_n=Vt+1,Kt=_e[_n];if(u(cn,Z)<0)_n<Ot&&u(Kt,cn)<0?(_e[xt]=Kt,_e[_n]=Z,xt=_n):(_e[xt]=cn,_e[Vt]=Z,xt=Vt);else if(_n<Ot&&u(Kt,Z)<0)_e[xt]=Kt,_e[_n]=Z,xt=_n;else return}}function u(_e,Z){var Pe=_e.sortIndex-Z.sortIndex;return Pe!==0?Pe:_e.id-Z.id}var m=1,b=2,d=3,w=4,x=5;function j(_e,Z){}var v=typeof performance=="object"&&typeof performance.now=="function";if(v){var o=performance;i.unstable_now=function(){return o.now()}}else{var p=Date,f=p.now();i.unstable_now=function(){return p.now()-f}}var _=1073741823,E=-1,T=250,S=5e3,k=1e4,D=_,L=[],U=[],F=1,P=null,I=d,G=!1,ie=!1,q=!1,J=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function H(_e){for(var Z=N(U);Z!==null;){if(Z.callback===null)R(U);else if(Z.startTime<=_e)R(U),Z.sortIndex=Z.expirationTime,g(L,Z);else return;Z=N(U)}}function K(_e){if(q=!1,H(_e),!ie)if(N(L)!==null)ie=!0,at(W);else{var Z=N(U);Z!==null&&ct(K,Z.startTime-_e)}}function W(_e,Z){ie=!1,q&&(q=!1,Te()),G=!0;var Pe=I;try{var xt;if(!r)return oe(_e,Z)}finally{P=null,I=Pe,G=!1}}function oe(_e,Z){var Pe=Z;for(H(Pe),P=N(L);P!==null&&!(P.expirationTime>Pe&&(!_e||Bt()));){var xt=P.callback;if(typeof xt=="function"){P.callback=null,I=P.priorityLevel;var Ot=P.expirationTime<=Pe,At=xt(Ot);Pe=i.unstable_now(),typeof At=="function"?P.callback=At:P===N(L)&&R(L),H(Pe)}else R(L);P=N(L)}if(P!==null)return!0;var Vt=N(U);return Vt!==null&&ct(K,Vt.startTime-Pe),!1}function de(_e,Z){switch(_e){case m:case b:case d:case w:case x:break;default:_e=d}var Pe=I;I=_e;try{return Z()}finally{I=Pe}}function xe(_e){var Z;switch(I){case m:case b:case d:Z=d;break;default:Z=I;break}var Pe=I;I=Z;try{return _e()}finally{I=Pe}}function Se(_e){var Z=I;return function(){var Pe=I;I=Z;try{return _e.apply(this,arguments)}finally{I=Pe}}}function se(_e,Z,Pe){var xt=i.unstable_now(),Ot;if(typeof Pe=="object"&&Pe!==null){var At=Pe.delay;typeof At=="number"&&At>0?Ot=xt+At:Ot=xt}else Ot=xt;var Vt;switch(_e){case m:Vt=E;break;case b:Vt=T;break;case x:Vt=D;break;case w:Vt=k;break;case d:default:Vt=S;break}var cn=Ot+Vt,_n={id:F++,callback:Z,priorityLevel:_e,startTime:Ot,expirationTime:cn,sortIndex:-1};return Ot>xt?(_n.sortIndex=Ot,g(U,_n),N(L)===null&&_n===N(U)&&(q?Te():q=!0,ct(K,Ot-xt))):(_n.sortIndex=cn,g(L,_n),!ie&&!G&&(ie=!0,at(W))),_n}function Y(){}function pe(){!ie&&!G&&(ie=!0,at(W))}function he(){return N(L)}function He(_e){_e.callback=null}function Oe(){return I}var et=!1,ve=null,Ke=-1,tt=l,Xe=-1;function Bt(){var _e=i.unstable_now()-Xe;return!(_e<tt)}function Tt(){}function le(_e){if(_e<0||_e>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}_e>0?tt=Math.floor(1e3/_e):tt=l}var Re=function(){if(ve!==null){var _e=i.unstable_now();Xe=_e;var Z=!0,Pe=!0;try{Pe=ve(Z,_e)}finally{Pe?ze():(et=!1,ve=null)}}else et=!1},ze;if(typeof V=="function")ze=function(){V(Re)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,$e=Me.port2;Me.port1.onmessage=Re,ze=function(){$e.postMessage(null)}}else ze=function(){J(Re,0)};function at(_e){ve=_e,et||(et=!0,ze())}function ct(_e,Z){Ke=J(function(){_e(i.unstable_now())},Z)}function Te(){X(Ke),Ke=-1}var we=Tt,Je=null;i.unstable_IdlePriority=x,i.unstable_ImmediatePriority=m,i.unstable_LowPriority=w,i.unstable_NormalPriority=d,i.unstable_Profiling=Je,i.unstable_UserBlockingPriority=b,i.unstable_cancelCallback=He,i.unstable_continueExecution=pe,i.unstable_forceFrameRate=le,i.unstable_getCurrentPriorityLevel=Oe,i.unstable_getFirstCallbackNode=he,i.unstable_next=xe,i.unstable_pauseExecution=Y,i.unstable_requestPaint=we,i.unstable_runWithPriority=de,i.unstable_scheduleCallback=se,i.unstable_shouldYield=Bt,i.unstable_wrapCallback=Se,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(rC);iC.exports=rC;var EM=iC.exports;/**
63
+ * @license React
64
+ * react-dom.development.js
65
+ *
66
+ * Copyright (c) Facebook, Inc. and its affiliates.
67
+ *
68
+ * This source code is licensed under the MIT license found in the
69
+ * LICENSE file in the root directory of this source tree.
70
+ */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var i=A,r=EM,l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,g=!1;function N(e){g=e}function R(e){if(!g){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];a("warn",e,n)}}function y(e){if(!g){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];a("error",e,n)}}function a(e,t,n){{var s=l.ReactDebugCurrentFrame,h=s.getStackAddendum();h!==""&&(t+="%s",n=n.concat([h]));var C=n.map(function(M){return String(M)});C.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,C)}}var u=0,m=1,b=2,d=3,w=4,x=5,j=6,v=7,o=8,p=9,f=10,_=11,E=12,T=13,S=14,k=15,D=16,L=17,U=18,F=19,P=21,I=22,G=23,ie=24,q=25,J=!0,X=!1,V=!1,H=!1,K=!1,W=!0,oe=!0,de=!0,xe=!0,Se=new Set,se={},Y={};function pe(e,t){he(e,t),he(e+"Capture",t)}function he(e,t){se[e]&&y("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),se[e]=t;{var n=e.toLowerCase();Y[n]=e,e==="onDoubleClick"&&(Y.ondblclick=e)}for(var s=0;s<t.length;s++)Se.add(t[s])}var He=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Oe=Object.prototype.hasOwnProperty;function et(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function ve(e){try{return Ke(e),!1}catch{return!0}}function Ke(e){return""+e}function tt(e,t){if(ve(e))return y("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,et(e)),Ke(e)}function Xe(e){if(ve(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",et(e)),Ke(e)}function Bt(e,t){if(ve(e))return y("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,et(e)),Ke(e)}function Tt(e,t){if(ve(e))return y("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,et(e)),Ke(e)}function le(e){if(ve(e))return y("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",et(e)),Ke(e)}function Re(e){if(ve(e))return y("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",et(e)),Ke(e)}var ze=0,Me=1,$e=2,at=3,ct=4,Te=5,we=6,Je=":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",_e=Je+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Z=new RegExp("^["+Je+"]["+_e+"]*$"),Pe={},xt={};function Ot(e){return Oe.call(xt,e)?!0:Oe.call(Pe,e)?!1:Z.test(e)?(xt[e]=!0,!0):(Pe[e]=!0,y("Invalid attribute name: `%s`",e),!1)}function At(e,t,n){return t!==null?t.type===ze:n?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function Vt(e,t,n,s){if(n!==null&&n.type===ze)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(s)return!1;if(n!==null)return!n.acceptsBooleans;var h=e.toLowerCase().slice(0,5);return h!=="data-"&&h!=="aria-"}default:return!1}}function cn(e,t,n,s){if(t===null||typeof t>"u"||Vt(e,t,n,s))return!0;if(s)return!1;if(n!==null)switch(n.type){case at:return!t;case ct:return t===!1;case Te:return isNaN(t);case we:return isNaN(t)||t<1}return!1}function _n(e){return Ft.hasOwnProperty(e)?Ft[e]:null}function Kt(e,t,n,s,h,C,M){this.acceptsBooleans=t===$e||t===at||t===ct,this.attributeName=s,this.attributeNamespace=h,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=C,this.removeEmptyString=M}var Ft={},Tn=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Tn.forEach(function(e){Ft[e]=new Kt(e,ze,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],n=e[1];Ft[t]=new Kt(t,Me,!1,n,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ft[e]=new Kt(e,$e,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ft[e]=new Kt(e,$e,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){Ft[e]=new Kt(e,at,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Ft[e]=new Kt(e,at,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Ft[e]=new Kt(e,ct,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Ft[e]=new Kt(e,we,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Ft[e]=new Kt(e,Te,!1,e.toLowerCase(),null,!1,!1)});var an=/[\-\:]([a-z])/g,Un=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(e){var t=e.replace(an,Un);Ft[t]=new Kt(t,Me,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(an,Un);Ft[t]=new Kt(t,Me,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(an,Un);Ft[t]=new Kt(t,Me,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Ft[e]=new Kt(e,Me,!1,e.toLowerCase(),null,!1,!1)});var Ht="xlinkHref";Ft[Ht]=new Kt("xlinkHref",Me,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Ft[e]=new Kt(e,Me,!1,e.toLowerCase(),null,!0,!0)});var Qn=/^[\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,En=!1;function yi(e){!En&&Qn.test(e)&&(En=!0,y("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function Zt(e,t,n,s){if(s.mustUseProperty){var h=s.propertyName;return e[h]}else{tt(n,t),s.sanitizeURL&&yi(""+n);var C=s.attributeName,M=null;if(s.type===ct){if(e.hasAttribute(C)){var B=e.getAttribute(C);return B===""?!0:cn(t,n,s,!1)?B:B===""+n?n:B}}else if(e.hasAttribute(C)){if(cn(t,n,s,!1))return e.getAttribute(C);if(s.type===at)return n;M=e.getAttribute(C)}return cn(t,n,s,!1)?M===null?n:M:M===""+n?n:M}}function oi(e,t,n,s){{if(!Ot(t))return;if(!e.hasAttribute(t))return n===void 0?void 0:null;var h=e.getAttribute(t);return tt(n,t),h===""+n?n:h}}function ci(e,t,n,s){var h=_n(t);if(!At(t,h,s)){if(cn(t,n,h,s)&&(n=null),s||h===null){if(Ot(t)){var C=t;n===null?e.removeAttribute(C):(tt(n,t),e.setAttribute(C,""+n))}return}var M=h.mustUseProperty;if(M){var B=h.propertyName;if(n===null){var z=h.type;e[B]=z===at?!1:""}else e[B]=n;return}var ee=h.attributeName,ne=h.attributeNamespace;if(n===null)e.removeAttribute(ee);else{var fe=h.type,me;fe===at||fe===ct&&n===!0?me="":(tt(n,ee),me=""+n,h.sanitizeURL&&yi(me.toString())),ne?e.setAttributeNS(ne,ee,me):e.setAttribute(ee,me)}}}var rn=Symbol.for("react.element"),un=Symbol.for("react.portal"),di=Symbol.for("react.fragment"),nt=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),Fe=Symbol.for("react.provider"),st=Symbol.for("react.context"),ge=Symbol.for("react.forward_ref"),qe=Symbol.for("react.suspense"),it=Symbol.for("react.suspense_list"),Le=Symbol.for("react.memo"),vt=Symbol.for("react.lazy"),Ln=Symbol.for("react.scope"),Qt=Symbol.for("react.debug_trace_mode"),Xt=Symbol.for("react.offscreen"),yn=Symbol.for("react.legacy_hidden"),Et=Symbol.for("react.cache"),Jt=Symbol.for("react.tracing_marker"),wn=Symbol.iterator,wi="@@iterator";function xi(e){if(e===null||typeof e!="object")return null;var t=wn&&e[wn]||e[wi];return typeof t=="function"?t:null}var Pt=Object.assign,Hn=0,On,ht,re,Ae,lt,kt,jt;function zt(){}zt.__reactDisabledLog=!0;function An(){{if(Hn===0){On=console.log,ht=console.info,re=console.warn,Ae=console.error,lt=console.group,kt=console.groupCollapsed,jt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:zt,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Hn++}}function ei(){{if(Hn--,Hn===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Pt({},e,{value:On}),info:Pt({},e,{value:ht}),warn:Pt({},e,{value:re}),error:Pt({},e,{value:Ae}),group:Pt({},e,{value:lt}),groupCollapsed:Pt({},e,{value:kt}),groupEnd:Pt({},e,{value:jt})})}Hn<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var zn=l.ReactCurrentDispatcher,Ci;function $t(e,t,n){{if(Ci===void 0)try{throw Error()}catch(h){var s=h.stack.trim().match(/\n( *(at )?)/);Ci=s&&s[1]||""}return`
71
+ `+Ci+e}}var Ui=!1,pi;{var Gi=typeof WeakMap=="function"?WeakMap:Map;pi=new Gi}function Yi(e,t){if(!e||Ui)return"";{var n=pi.get(e);if(n!==void 0)return n}var s;Ui=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var C;C=zn.current,zn.current=null,An();try{if(t){var M=function(){throw Error()};if(Object.defineProperty(M.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(M,[])}catch(ke){s=ke}Reflect.construct(e,[],M)}else{try{M.call()}catch(ke){s=ke}e.call(M.prototype)}}else{try{throw Error()}catch(ke){s=ke}e()}}catch(ke){if(ke&&s&&typeof ke.stack=="string"){for(var B=ke.stack.split(`
72
+ `),z=s.stack.split(`
73
+ `),ee=B.length-1,ne=z.length-1;ee>=1&&ne>=0&&B[ee]!==z[ne];)ne--;for(;ee>=1&&ne>=0;ee--,ne--)if(B[ee]!==z[ne]){if(ee!==1||ne!==1)do if(ee--,ne--,ne<0||B[ee]!==z[ne]){var fe=`
74
+ `+B[ee].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),typeof e=="function"&&pi.set(e,fe),fe}while(ee>=1&&ne>=0);break}}}finally{Ui=!1,zn.current=C,ei(),Error.prepareStackTrace=h}var me=e?e.displayName||e.name:"",De=me?$t(me):"";return typeof e=="function"&&pi.set(e,De),De}function rr(e,t,n){return Yi(e,!0)}function sr(e,t,n){return Yi(e,!1)}function ar(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function fr(e,t,n){if(e==null)return"";if(typeof e=="function")return Yi(e,ar(e));if(typeof e=="string")return $t(e);switch(e){case qe:return $t("Suspense");case it:return $t("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case ge:return sr(e.render);case Le:return fr(e.type,t,n);case vt:{var s=e,h=s._payload,C=s._init;try{return fr(C(h),t,n)}catch{}}}return""}function Ri(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case x:return $t(e.type);case D:return $t("Lazy");case T:return $t("Suspense");case F:return $t("SuspenseList");case u:case b:case k:return sr(e.type);case _:return sr(e.type.render);case m:return rr(e.type);default:return""}}function Bi(e){try{var t="",n=e;do t+=Ri(n),n=n.return;while(n);return t}catch(s){return`
75
+ Error generating stack: `+s.message+`
76
+ `+s.stack}}function Dr(e,t,n){var s=e.displayName;if(s)return s;var h=t.displayName||t.name||"";return h!==""?n+"("+h+")":n}function Vr(e){return e.displayName||"Context"}function dn(e){if(e==null)return null;if(typeof e.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case di:return"Fragment";case un:return"Portal";case ae:return"Profiler";case nt:return"StrictMode";case qe:return"Suspense";case it:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case st:var t=e;return Vr(t)+".Consumer";case Fe:var n=e;return Vr(n._context)+".Provider";case ge:return Dr(e,e.render,"ForwardRef");case Le:var s=e.displayName||null;return s!==null?s:dn(e.type)||"Memo";case vt:{var h=e,C=h._payload,M=h._init;try{return dn(M(C))}catch{return null}}}return null}function is(e,t,n){var s=t.displayName||t.name||"";return e.displayName||(s!==""?n+"("+s+")":n)}function pr(e){return e.displayName||"Context"}function te(e){var t=e.tag,n=e.type;switch(t){case ie:return"Cache";case p:var s=n;return pr(s)+".Consumer";case f:var h=n;return pr(h._context)+".Provider";case U:return"DehydratedFragment";case _:return is(n,n.render,"ForwardRef");case v:return"Fragment";case x:return n;case w:return"Portal";case d:return"Root";case j:return"Text";case D:return dn(n);case o:return n===nt?"StrictMode":"Mode";case I:return"Offscreen";case E:return"Profiler";case P:return"Scope";case T:return"Suspense";case F:return"SuspenseList";case q:return"TracingMarker";case m:case u:case L:case b:case S:case k:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break}return null}var Ne=l.ReactDebugCurrentFrame,Ve=null,wt=!1;function qn(){{if(Ve===null)return null;var e=Ve._debugOwner;if(e!==null&&typeof e<"u")return te(e)}return null}function Oi(){return Ve===null?"":Bi(Ve)}function Pn(){Ne.getCurrentStack=null,Ve=null,wt=!1}function Yt(e){Ne.getCurrentStack=e===null?null:Oi,Ve=e,wt=!1}function hi(){return Ve}function $n(e){wt=e}function xn(e){return""+e}function hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return Re(e),e;default:return""}}var Ni={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function Kn(e,t){Ni[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||y("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||y("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function vi(e){var t=e.type,n=e.nodeName;return n&&n.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fi(e){return e._valueTracker}function Ei(e){e._valueTracker=null}function Xr(e){var t="";return e&&(vi(e)?t=e.checked?"true":"false":t=e.value),t}function Hi(e){var t=vi(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);Re(e[t]);var s=""+e[t];if(!(e.hasOwnProperty(t)||typeof n>"u"||typeof n.get!="function"||typeof n.set!="function")){var h=n.get,C=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return h.call(this)},set:function(B){Re(B),s=""+B,C.call(this,B)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var M={getValue:function(){return s},setValue:function(B){Re(B),s=""+B},stopTracking:function(){Ei(e),delete e[t]}};return M}}function gs(e){Fi(e)||(e._valueTracker=Hi(e))}function Vn(e){if(!e)return!1;var t=Fi(e);if(!t)return!0;var n=t.getValue(),s=Xr(e);return s!==n?(t.setValue(s),!0):!1}function vr(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 Lt=!1,Ti=!1,kr=!1,ma=!1;function _s(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function Gs(e,t){var n=e,s=t.checked,h=Pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??n._wrapperState.initialChecked});return h}function Ys(e,t){Kn("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!Ti&&(y("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",qn()||"A component",t.type),Ti=!0),t.value!==void 0&&t.defaultValue!==void 0&&!Lt&&(y("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",qn()||"A component",t.type),Lt=!0);var n=e,s=t.defaultValue==null?"":t.defaultValue;n._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:hn(t.value!=null?t.value:s),controlled:_s(t)}}function $(e,t){var n=e,s=t.checked;s!=null&&ci(n,"checked",s,!1)}function ce(e,t){var n=e;{var s=_s(t);!n._wrapperState.controlled&&s&&!ma&&(y("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),ma=!0),n._wrapperState.controlled&&!s&&!kr&&(y("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),kr=!0)}$(e,t);var h=hn(t.value),C=t.type;if(h!=null)C==="number"?(h===0&&n.value===""||n.value!=h)&&(n.value=xn(h)):n.value!==xn(h)&&(n.value=xn(h));else if(C==="submit"||C==="reset"){n.removeAttribute("value");return}t.hasOwnProperty("value")?Mt(n,t.type,h):t.hasOwnProperty("defaultValue")&&Mt(n,t.type,hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(n.defaultChecked=!!t.defaultChecked)}function Ce(e,t,n){var s=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var h=t.type,C=h==="submit"||h==="reset";if(C&&(t.value===void 0||t.value===null))return;var M=xn(s._wrapperState.initialValue);n||M!==s.value&&(s.value=M),s.defaultValue=M}var B=s.name;B!==""&&(s.name=""),s.defaultChecked=!s.defaultChecked,s.defaultChecked=!!s._wrapperState.initialChecked,B!==""&&(s.name=B)}function Ue(e,t){var n=e;ce(n,t),ot(n,t)}function ot(e,t){var n=t.name;if(t.type==="radio"&&n!=null){for(var s=e;s.parentNode;)s=s.parentNode;tt(n,"name");for(var h=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),C=0;C<h.length;C++){var M=h[C];if(!(M===e||M.form!==e.form)){var B=Fh(M);if(!B)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Vn(M),ce(M,B)}}}}function Mt(e,t,n){(t!=="number"||vr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=xn(e._wrapperState.initialValue):e.defaultValue!==xn(n)&&(e.defaultValue=xn(n)))}var Nt=!1,Wt=!1,mn=!1;function bn(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?i.Children.forEach(t.children,function(n){n!=null&&(typeof n=="string"||typeof n=="number"||Wt||(Wt=!0,y("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):t.dangerouslySetInnerHTML!=null&&(mn||(mn=!0,y("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!Nt&&(y("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Nt=!0)}function Jn(e,t){t.value!=null&&e.setAttribute("value",xn(hn(t.value)))}var In=Array.isArray;function on(e){return In(e)}var si;si=!1;function mi(){var e=qn();return e?`
77
+
78
+ Check the render method of \``+e+"`.":""}var ji=["value","defaultValue"];function ks(e){{Kn("select",e);for(var t=0;t<ji.length;t++){var n=ji[t];if(e[n]!=null){var s=on(e[n]);e.multiple&&!s?y("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,mi()):!e.multiple&&s&&y("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,mi())}}}}function or(e,t,n,s){var h=e.options;if(t){for(var C=n,M={},B=0;B<C.length;B++)M["$"+C[B]]=!0;for(var z=0;z<h.length;z++){var ee=M.hasOwnProperty("$"+h[z].value);h[z].selected!==ee&&(h[z].selected=ee),ee&&s&&(h[z].defaultSelected=!0)}}else{for(var ne=xn(hn(n)),fe=null,me=0;me<h.length;me++){if(h[me].value===ne){h[me].selected=!0,s&&(h[me].defaultSelected=!0);return}fe===null&&!h[me].disabled&&(fe=h[me])}fe!==null&&(fe.selected=!0)}}function Rs(e,t){return Pt({},t,{value:void 0})}function fa(e,t){var n=e;ks(t),n._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!si&&(y("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),si=!0)}function bs(e,t){var n=e;n.multiple=!!t.multiple;var s=t.value;s!=null?or(n,!!t.multiple,s,!1):t.defaultValue!=null&&or(n,!!t.multiple,t.defaultValue,!0)}function pa(e,t){var n=e,s=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var h=t.value;h!=null?or(n,!!t.multiple,h,!1):s!==!!t.multiple&&(t.defaultValue!=null?or(n,!!t.multiple,t.defaultValue,!0):or(n,!!t.multiple,t.multiple?[]:"",!1))}function Ee(e,t){var n=e,s=t.value;s!=null&&or(n,!!t.multiple,s,!1)}var ut=!1;function Rt(e,t){var n=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var s=Pt({},t,{value:void 0,defaultValue:void 0,children:xn(n._wrapperState.initialValue)});return s}function fn(e,t){var n=e;Kn("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!ut&&(y("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",qn()||"A component"),ut=!0);var s=t.value;if(s==null){var h=t.children,C=t.defaultValue;if(h!=null){y("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(C!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(on(h)){if(h.length>1)throw new Error("<textarea> can only have at most one child.");h=h[0]}C=h}}C==null&&(C=""),s=C}n._wrapperState={initialValue:hn(s)}}function Wn(e,t){var n=e,s=hn(t.value),h=hn(t.defaultValue);if(s!=null){var C=xn(s);C!==n.value&&(n.value=C),t.defaultValue==null&&n.defaultValue!==C&&(n.defaultValue=C)}h!=null&&(n.defaultValue=xn(h))}function Si(e,t){var n=e,s=n.textContent;s===n._wrapperState.initialValue&&s!==""&&s!==null&&(n.value=s)}function Pi(e,t){Wn(e,t)}var St="http://www.w3.org/1999/xhtml",Zn="http://www.w3.org/1998/Math/MathML",Ir="http://www.w3.org/2000/svg";function Jr(e){switch(e){case"svg":return Ir;case"math":return Zn;default:return St}}function lr(e,t){return e==null||e===St?Jr(t):e===Ir&&t==="foreignObject"?St:e}var Rr=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,s,h){MSApp.execUnsafeLocalFunction(function(){return e(t,n,s,h)})}:e},rs,Di=Rr(function(e,t){if(e.namespaceURI===Ir&&!("innerHTML"in e)){rs=rs||document.createElement("div"),rs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=rs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild);return}e.innerHTML=t}),Sn=1,ai=3,gi=8,ss=9,Ec=11,pl=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===ai){n.nodeValue=t;return}}e.textContent=t},Yf={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},yo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function qf(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var wo=["Webkit","ms","Moz","O"];Object.keys(yo).forEach(function(e){wo.forEach(function(t){yo[qf(t,e)]=yo[e]})});function ys(e,t,n){var s=t==null||typeof t=="boolean"||t==="";return s?"":!n&&typeof t=="number"&&t!==0&&!(yo.hasOwnProperty(e)&&yo[e])?t+"px":(Tt(t,e),(""+t).trim())}var Kf=/([A-Z])/g,jc=/^ms-/;function Xf(e){return e.replace(Kf,"-$1").toLowerCase().replace(jc,"-ms-")}var Dc=function(){};{var Jf=/^(?:webkit|moz|o)[A-Z]/,Fd=/^-ms-/,Zf=/-(.)/g,vl=/;\s*$/,qs={},xo={},gl=!1,kc=!1,Qf=function(e){return e.replace(Zf,function(t,n){return n.toUpperCase()})},ep=function(e){qs.hasOwnProperty(e)&&qs[e]||(qs[e]=!0,y("Unsupported style property %s. Did you mean %s?",e,Qf(e.replace(Fd,"ms-"))))},_l=function(e){qs.hasOwnProperty(e)&&qs[e]||(qs[e]=!0,y("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},Hd=function(e,t){xo.hasOwnProperty(t)&&xo[t]||(xo[t]=!0,y(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(vl,"")))},zd=function(e,t){gl||(gl=!0,y("`NaN` is an invalid value for the `%s` css style property.",e))},Rc=function(e,t){kc||(kc=!0,y("`Infinity` is an invalid value for the `%s` css style property.",e))};Dc=function(e,t){e.indexOf("-")>-1?ep(e):Jf.test(e)?_l(e):vl.test(t)&&Hd(e,t),typeof t=="number"&&(isNaN(t)?zd(e,t):isFinite(t)||Rc(e,t))}}var tp=Dc;function Tc(e){{var t="",n="";for(var s in e)if(e.hasOwnProperty(s)){var h=e[s];if(h!=null){var C=s.indexOf("--")===0;t+=n+(C?s:Xf(s))+":",t+=ys(s,h,C),n=";"}}return t||null}}function $d(e,t){var n=e.style;for(var s in t)if(t.hasOwnProperty(s)){var h=s.indexOf("--")===0;h||tp(s,t[s]);var C=ys(s,t[s],h);s==="float"&&(s="cssFloat"),h?n.setProperty(s,C):n[s]=C}}function np(e){return e==null||typeof e=="boolean"||e===""}function Lc(e){var t={};for(var n in e)for(var s=Yf[n]||[n],h=0;h<s.length;h++)t[s[h]]=n;return t}function Wd(e,t){{if(!t)return;var n=Lc(e),s=Lc(t),h={};for(var C in n){var M=n[C],B=s[C];if(B&&M!==B){var z=M+","+B;if(h[z])continue;h[z]=!0,y("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",np(e[M])?"Removing":"Updating",M,B)}}}}var ip={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},rp=Pt({menuitem:!0},ip),sp="__html";function Ac(e,t){if(t){if(rp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw new Error(e+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof t.dangerouslySetInnerHTML!="object"||!(sp in t.dangerouslySetInnerHTML))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!t.suppressContentEditableWarning&&t.contentEditable&&t.children!=null&&y("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),t.style!=null&&typeof t.style!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function Ts(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 bl={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Mc={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},va={},ap=new RegExp("^(aria)-["+_e+"]*$"),Gd=new RegExp("^(aria)[A-Z]["+_e+"]*$");function Yd(e,t){{if(Oe.call(va,t)&&va[t])return!0;if(Gd.test(t)){var n="aria-"+t.slice(4).toLowerCase(),s=Mc.hasOwnProperty(n)?n:null;if(s==null)return y("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),va[t]=!0,!0;if(t!==s)return y("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,s),va[t]=!0,!0}if(ap.test(t)){var h=t.toLowerCase(),C=Mc.hasOwnProperty(h)?h:null;if(C==null)return va[t]=!0,!1;if(t!==C)return y("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,C),va[t]=!0,!0}}return!0}function qd(e,t){{var n=[];for(var s in t){var h=Yd(e,s);h||n.push(s)}var C=n.map(function(M){return"`"+M+"`"}).join(", ");n.length===1?y("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",C,e):n.length>1&&y("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",C,e)}}function op(e,t){Ts(e,t)||qd(e,t)}var Kd=!1;function lp(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!Kd&&(Kd=!0,e==="select"&&t.multiple?y("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):y("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}var Uc=function(){};{var gr={},Xd=/^on./,cp=/^on[^A-Z]/,Jd=new RegExp("^(aria)-["+_e+"]*$"),Zd=new RegExp("^(aria)[A-Z]["+_e+"]*$");Uc=function(e,t,n,s){if(Oe.call(gr,t)&&gr[t])return!0;var h=t.toLowerCase();if(h==="onfocusin"||h==="onfocusout")return y("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),gr[t]=!0,!0;if(s!=null){var C=s.registrationNameDependencies,M=s.possibleRegistrationNames;if(C.hasOwnProperty(t))return!0;var B=M.hasOwnProperty(h)?M[h]:null;if(B!=null)return y("Invalid event handler property `%s`. Did you mean `%s`?",t,B),gr[t]=!0,!0;if(Xd.test(t))return y("Unknown event handler property `%s`. It will be ignored.",t),gr[t]=!0,!0}else if(Xd.test(t))return cp.test(t)&&y("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),gr[t]=!0,!0;if(Jd.test(t)||Zd.test(t))return!0;if(h==="innerhtml")return y("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),gr[t]=!0,!0;if(h==="aria")return y("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),gr[t]=!0,!0;if(h==="is"&&n!==null&&n!==void 0&&typeof n!="string")return y("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),gr[t]=!0,!0;if(typeof n=="number"&&isNaN(n))return y("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),gr[t]=!0,!0;var z=_n(t),ee=z!==null&&z.type===ze;if(bl.hasOwnProperty(h)){var ne=bl[h];if(ne!==t)return y("Invalid DOM property `%s`. Did you mean `%s`?",t,ne),gr[t]=!0,!0}else if(!ee&&t!==h)return y("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,h),gr[t]=!0,!0;return typeof n=="boolean"&&Vt(t,n,z,!1)?(n?y('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):y('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),gr[t]=!0,!0):ee?!0:Vt(t,n,z,!1)?(gr[t]=!0,!1):((n==="false"||n==="true")&&z!==null&&z.type===at&&(y("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,n==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),gr[t]=!0),!0)}}var Qd=function(e,t,n){{var s=[];for(var h in t){var C=Uc(e,h,t[h],n);C||s.push(h)}var M=s.map(function(B){return"`"+B+"`"}).join(", ");s.length===1?y("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",M,e):s.length>1&&y("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",M,e)}};function eh(e,t,n){Ts(e,t)||Qd(e,t,n)}var Oc=1,yl=2,$a=4,th=Oc|yl|$a,Wa=null;function nh(e){Wa!==null&&y("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Wa=e}function ih(){Wa===null&&y("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),Wa=null}function rh(e){return e===Wa}function wl(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===ai?t.parentNode:t}var xl=null,ga=null,_a=null;function Pc(e){var t=eo(e);if(t){if(typeof xl!="function")throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var n=t.stateNode;if(n){var s=Fh(n);xl(t.stateNode,t.type,s)}}}function sh(e){xl=e}function Vc(e){ga?_a?_a.push(e):_a=[e]:ga=e}function ah(){return ga!==null||_a!==null}function Ic(){if(ga){var e=ga,t=_a;if(ga=null,_a=null,Pc(e),t)for(var n=0;n<t.length;n++)Pc(t[n])}}var Bc=function(e,t){return e(t)},Fc=function(){},Nl=!1;function oh(){var e=ah();e&&(Fc(),Ic())}function Hc(e,t,n){if(Nl)return e(t,n);Nl=!0;try{return Bc(e,t,n)}finally{Nl=!1,oh()}}function Q(e,t,n){Bc=e,Fc=n}function ue(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function je(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(n.disabled&&ue(t));default:return!1}}function We(e,t){var n=e.stateNode;if(n===null)return null;var s=Fh(n);if(s===null)return null;var h=s[t];if(je(t,e.type,s))return null;if(h&&typeof h!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof h+"` type.");return h}var Ze=!1;if(He)try{var Ge={};Object.defineProperty(Ge,"passive",{get:function(){Ze=!0}}),window.addEventListener("test",Ge,Ge),window.removeEventListener("test",Ge,Ge)}catch{Ze=!1}function ft(e,t,n,s,h,C,M,B,z){var ee=Array.prototype.slice.call(arguments,3);try{t.apply(n,ee)}catch(ne){this.onError(ne)}}var bt=ft;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Rn=document.createElement("react");bt=function(t,n,s,h,C,M,B,z,ee){if(typeof document>"u"||document===null)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var ne=document.createEvent("Event"),fe=!1,me=!0,De=window.event,ke=Object.getOwnPropertyDescriptor(window,"event");function Ie(){Rn.removeEventListener(Be,Ut,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=De)}var mt=Array.prototype.slice.call(arguments,3);function Ut(){fe=!0,Ie(),n.apply(s,mt),me=!1}var Dt,kn=!1,Nn=!1;function be(ye){if(Dt=ye.error,kn=!0,Dt===null&&ye.colno===0&&ye.lineno===0&&(Nn=!0),ye.defaultPrevented&&Dt!=null&&typeof Dt=="object")try{Dt._suppressLogging=!0}catch{}}var Be="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",be),Rn.addEventListener(Be,Ut,!1),ne.initEvent(Be,!1,!1),Rn.dispatchEvent(ne),ke&&Object.defineProperty(window,"event",ke),fe&&me&&(kn?Nn&&(Dt=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):Dt=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(Dt)),window.removeEventListener("error",be),!fe)return Ie(),ft.apply(this,arguments)}}var pn=bt,Vi=!1,cr=null,as=!1,Br=null,ba={onError:function(e){Vi=!0,cr=e}};function up(e,t,n,s,h,C,M,B,z){Vi=!1,cr=null,pn.apply(ba,arguments)}function nj(e,t,n,s,h,C,M,B,z){if(up.apply(this,arguments),Vi){var ee=dp();as||(as=!0,Br=ee)}}function ij(){if(as){var e=Br;throw as=!1,Br=null,e}}function rj(){return Vi}function dp(){if(Vi){var e=cr;return Vi=!1,cr=null,e}else throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function Sl(e){return e._reactInternals}function sj(e){return e._reactInternals!==void 0}function aj(e,t){e._reactInternals=t}var Gt=0,Cl=1,zi=2,Gn=4,No=16,zc=32,Cy=64,Yn=128,ya=256,So=512,El=1024,Ga=2048,wa=4096,Co=8192,hp=16384,oj=32767,lh=32768,Fr=65536,mp=131072,Ey=1048576,fp=2097152,Eo=4194304,pp=8388608,Ya=16777216,vp=33554432,gp=Gn|El|0,_p=zi|Gn|No|zc|So|wa|Co,$c=Gn|Cy|So|Co,jl=Ga|No,xa=Eo|pp|fp,lj=l.ReactCurrentOwner;function jo(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var s=t;do t=s,(t.flags&(zi|wa))!==Gt&&(n=t.return),s=t.return;while(s)}return t.tag===d?n:null}function jy(e){if(e.tag===T){var t=e.memoizedState;if(t===null){var n=e.alternate;n!==null&&(t=n.memoizedState)}if(t!==null)return t.dehydrated}return null}function Dy(e){return e.tag===d?e.stateNode.containerInfo:null}function cj(e){return jo(e)===e}function uj(e){{var t=lj.current;if(t!==null&&t.tag===m){var n=t,s=n.stateNode;s._warnedAboutRefsInRender||y("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",te(n)||"A component"),s._warnedAboutRefsInRender=!0}}var h=Sl(e);return h?jo(h)===h:!1}function ky(e){if(jo(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function Ry(e){var t=e.alternate;if(!t){var n=jo(e);if(n===null)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var s=e,h=t;;){var C=s.return;if(C===null)break;var M=C.alternate;if(M===null){var B=C.return;if(B!==null){s=h=B;continue}break}if(C.child===M.child){for(var z=C.child;z;){if(z===s)return ky(C),e;if(z===h)return ky(C),t;z=z.sibling}throw new Error("Unable to find node on an unmounted component.")}if(s.return!==h.return)s=C,h=M;else{for(var ee=!1,ne=C.child;ne;){if(ne===s){ee=!0,s=C,h=M;break}if(ne===h){ee=!0,h=C,s=M;break}ne=ne.sibling}if(!ee){for(ne=M.child;ne;){if(ne===s){ee=!0,s=M,h=C;break}if(ne===h){ee=!0,h=M,s=C;break}ne=ne.sibling}if(!ee)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(s.alternate!==h)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(s.tag!==d)throw new Error("Unable to find node on an unmounted component.");return s.stateNode.current===s?e:t}function Ty(e){var t=Ry(e);return t!==null?Ly(t):null}function Ly(e){if(e.tag===x||e.tag===j)return e;for(var t=e.child;t!==null;){var n=Ly(t);if(n!==null)return n;t=t.sibling}return null}function dj(e){var t=Ry(e);return t!==null?Ay(t):null}function Ay(e){if(e.tag===x||e.tag===j)return e;for(var t=e.child;t!==null;){if(t.tag!==w){var n=Ay(t);if(n!==null)return n}t=t.sibling}return null}var My=r.unstable_scheduleCallback,hj=r.unstable_cancelCallback,mj=r.unstable_shouldYield,fj=r.unstable_requestPaint,ur=r.unstable_now,pj=r.unstable_getCurrentPriorityLevel,ch=r.unstable_ImmediatePriority,bp=r.unstable_UserBlockingPriority,Do=r.unstable_NormalPriority,vj=r.unstable_LowPriority,yp=r.unstable_IdlePriority,gj=r.unstable_yieldValue,_j=r.unstable_setDisableYieldValue,Dl=null,Tr=null,gt=null,Ks=!1,Ls=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function bj(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return y("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{oe&&(e=Pt({},e,{getLaneLabelMap:Cj,injectProfilingHooks:Sj})),Dl=t.inject(e),Tr=t}catch(n){y("React instrumentation encountered an error: %s.",n)}return!!t.checkDCE}function yj(e,t){if(Tr&&typeof Tr.onScheduleFiberRoot=="function")try{Tr.onScheduleFiberRoot(Dl,e,t)}catch(n){Ks||(Ks=!0,y("React instrumentation encountered an error: %s",n))}}function wj(e,t){if(Tr&&typeof Tr.onCommitFiberRoot=="function")try{var n=(e.current.flags&Yn)===Yn;if(de){var s;switch(t){case cs:s=ch;break;case Sa:s=bp;break;case Ca:s=Do;break;case vh:s=yp;break;default:s=Do;break}Tr.onCommitFiberRoot(Dl,e,s,n)}}catch(h){Ks||(Ks=!0,y("React instrumentation encountered an error: %s",h))}}function xj(e){if(Tr&&typeof Tr.onPostCommitFiberRoot=="function")try{Tr.onPostCommitFiberRoot(Dl,e)}catch(t){Ks||(Ks=!0,y("React instrumentation encountered an error: %s",t))}}function Nj(e){if(Tr&&typeof Tr.onCommitFiberUnmount=="function")try{Tr.onCommitFiberUnmount(Dl,e)}catch(t){Ks||(Ks=!0,y("React instrumentation encountered an error: %s",t))}}function dr(e){if(typeof gj=="function"&&(_j(e),N(e)),Tr&&typeof Tr.setStrictMode=="function")try{Tr.setStrictMode(Dl,e)}catch(t){Ks||(Ks=!0,y("React instrumentation encountered an error: %s",t))}}function Sj(e){gt=e}function Cj(){{for(var e=new Map,t=1,n=0;n<xp;n++){var s=Wj(t);e.set(t,s),t*=2}return e}}function Ej(e){gt!==null&&typeof gt.markCommitStarted=="function"&&gt.markCommitStarted(e)}function Uy(){gt!==null&&typeof gt.markCommitStopped=="function"&&gt.markCommitStopped()}function Wc(e){gt!==null&&typeof gt.markComponentRenderStarted=="function"&&gt.markComponentRenderStarted(e)}function kl(){gt!==null&&typeof gt.markComponentRenderStopped=="function"&&gt.markComponentRenderStopped()}function jj(e){gt!==null&&typeof gt.markComponentPassiveEffectMountStarted=="function"&&gt.markComponentPassiveEffectMountStarted(e)}function Dj(){gt!==null&&typeof gt.markComponentPassiveEffectMountStopped=="function"&&gt.markComponentPassiveEffectMountStopped()}function kj(e){gt!==null&&typeof gt.markComponentPassiveEffectUnmountStarted=="function"&&gt.markComponentPassiveEffectUnmountStarted(e)}function Rj(){gt!==null&&typeof gt.markComponentPassiveEffectUnmountStopped=="function"&&gt.markComponentPassiveEffectUnmountStopped()}function Tj(e){gt!==null&&typeof gt.markComponentLayoutEffectMountStarted=="function"&&gt.markComponentLayoutEffectMountStarted(e)}function Lj(){gt!==null&&typeof gt.markComponentLayoutEffectMountStopped=="function"&&gt.markComponentLayoutEffectMountStopped()}function Oy(e){gt!==null&&typeof gt.markComponentLayoutEffectUnmountStarted=="function"&&gt.markComponentLayoutEffectUnmountStarted(e)}function Py(){gt!==null&&typeof gt.markComponentLayoutEffectUnmountStopped=="function"&&gt.markComponentLayoutEffectUnmountStopped()}function Aj(e,t,n){gt!==null&&typeof gt.markComponentErrored=="function"&&gt.markComponentErrored(e,t,n)}function Mj(e,t,n){gt!==null&&typeof gt.markComponentSuspended=="function"&&gt.markComponentSuspended(e,t,n)}function Uj(e){gt!==null&&typeof gt.markLayoutEffectsStarted=="function"&&gt.markLayoutEffectsStarted(e)}function Oj(){gt!==null&&typeof gt.markLayoutEffectsStopped=="function"&&gt.markLayoutEffectsStopped()}function Pj(e){gt!==null&&typeof gt.markPassiveEffectsStarted=="function"&&gt.markPassiveEffectsStarted(e)}function Vj(){gt!==null&&typeof gt.markPassiveEffectsStopped=="function"&&gt.markPassiveEffectsStopped()}function Vy(e){gt!==null&&typeof gt.markRenderStarted=="function"&&gt.markRenderStarted(e)}function Ij(){gt!==null&&typeof gt.markRenderYielded=="function"&&gt.markRenderYielded()}function Iy(){gt!==null&&typeof gt.markRenderStopped=="function"&&gt.markRenderStopped()}function Bj(e){gt!==null&&typeof gt.markRenderScheduled=="function"&&gt.markRenderScheduled(e)}function Fj(e,t){gt!==null&&typeof gt.markForceUpdateScheduled=="function"&&gt.markForceUpdateScheduled(e,t)}function wp(e,t){gt!==null&&typeof gt.markStateUpdateScheduled=="function"&&gt.markStateUpdateScheduled(e,t)}var It=0,jn=1,ti=2,Li=8,Xs=16,By=Math.clz32?Math.clz32:$j,Hj=Math.log,zj=Math.LN2;function $j(e){var t=e>>>0;return t===0?32:31-(Hj(t)/zj|0)|0}var xp=31,Qe=0,hr=0,en=1,Rl=2,Na=4,ko=8,Js=16,Gc=32,Tl=4194240,Yc=64,Np=128,Sp=256,Cp=512,Ep=1024,jp=2048,Dp=4096,kp=8192,Rp=16384,Tp=32768,Lp=65536,Ap=131072,Mp=262144,Up=524288,Op=1048576,Pp=2097152,uh=130023424,Ll=4194304,Vp=8388608,Ip=16777216,Bp=33554432,Fp=67108864,Fy=Ll,qc=134217728,Hy=268435455,Kc=268435456,Ro=536870912,os=1073741824;function Wj(e){{if(e&en)return"Sync";if(e&Rl)return"InputContinuousHydration";if(e&Na)return"InputContinuous";if(e&ko)return"DefaultHydration";if(e&Js)return"Default";if(e&Gc)return"TransitionHydration";if(e&Tl)return"Transition";if(e&uh)return"Retry";if(e&qc)return"SelectiveHydration";if(e&Kc)return"IdleHydration";if(e&Ro)return"Idle";if(e&os)return"Offscreen"}}var fi=-1,dh=Yc,hh=Ll;function Xc(e){switch(To(e)){case en:return en;case Rl:return Rl;case Na:return Na;case ko:return ko;case Js:return Js;case Gc:return Gc;case Yc:case Np:case Sp:case Cp:case Ep:case jp:case Dp:case kp:case Rp:case Tp:case Lp:case Ap:case Mp:case Up:case Op:case Pp:return e&Tl;case Ll:case Vp:case Ip:case Bp:case Fp:return e&uh;case qc:return qc;case Kc:return Kc;case Ro:return Ro;case os:return os;default:return y("Should have found matching lanes. This is a bug in React."),e}}function mh(e,t){var n=e.pendingLanes;if(n===Qe)return Qe;var s=Qe,h=e.suspendedLanes,C=e.pingedLanes,M=n&Hy;if(M!==Qe){var B=M&~h;if(B!==Qe)s=Xc(B);else{var z=M&C;z!==Qe&&(s=Xc(z))}}else{var ee=n&~h;ee!==Qe?s=Xc(ee):C!==Qe&&(s=Xc(C))}if(s===Qe)return Qe;if(t!==Qe&&t!==s&&(t&h)===Qe){var ne=To(s),fe=To(t);if(ne>=fe||ne===Js&&(fe&Tl)!==Qe)return t}(s&Na)!==Qe&&(s|=n&Js);var me=e.entangledLanes;if(me!==Qe)for(var De=e.entanglements,ke=s&me;ke>0;){var Ie=Lo(ke),mt=1<<Ie;s|=De[Ie],ke&=~mt}return s}function Gj(e,t){for(var n=e.eventTimes,s=fi;t>0;){var h=Lo(t),C=1<<h,M=n[h];M>s&&(s=M),t&=~C}return s}function Yj(e,t){switch(e){case en:case Rl:case Na:return t+250;case ko:case Js:case Gc:case Yc:case Np:case Sp:case Cp:case Ep:case jp:case Dp:case kp:case Rp:case Tp:case Lp:case Ap:case Mp:case Up:case Op:case Pp:return t+5e3;case Ll:case Vp:case Ip:case Bp:case Fp:return fi;case qc:case Kc:case Ro:case os:return fi;default:return y("Should have found matching lanes. This is a bug in React."),fi}}function qj(e,t){for(var n=e.pendingLanes,s=e.suspendedLanes,h=e.pingedLanes,C=e.expirationTimes,M=n;M>0;){var B=Lo(M),z=1<<B,ee=C[B];ee===fi?((z&s)===Qe||(z&h)!==Qe)&&(C[B]=Yj(z,t)):ee<=t&&(e.expiredLanes|=z),M&=~z}}function Kj(e){return Xc(e.pendingLanes)}function Hp(e){var t=e.pendingLanes&~os;return t!==Qe?t:t&os?os:Qe}function Xj(e){return(e&en)!==Qe}function zp(e){return(e&Hy)!==Qe}function zy(e){return(e&uh)===e}function Jj(e){var t=en|Na|Js;return(e&t)===Qe}function Zj(e){return(e&Tl)===e}function fh(e,t){var n=Rl|Na|ko|Js;return(t&n)!==Qe}function Qj(e,t){return(t&e.expiredLanes)!==Qe}function $y(e){return(e&Tl)!==Qe}function Wy(){var e=dh;return dh<<=1,(dh&Tl)===Qe&&(dh=Yc),e}function eD(){var e=hh;return hh<<=1,(hh&uh)===Qe&&(hh=Ll),e}function To(e){return e&-e}function Jc(e){return To(e)}function Lo(e){return 31-By(e)}function $p(e){return Lo(e)}function ls(e,t){return(e&t)!==Qe}function Al(e,t){return(e&t)===t}function ln(e,t){return e|t}function ph(e,t){return e&~t}function Gy(e,t){return e&t}function b6(e){return e}function tD(e,t){return e!==hr&&e<t?e:t}function Wp(e){for(var t=[],n=0;n<xp;n++)t.push(e);return t}function Zc(e,t,n){e.pendingLanes|=t,t!==Ro&&(e.suspendedLanes=Qe,e.pingedLanes=Qe);var s=e.eventTimes,h=$p(t);s[h]=n}function nD(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,s=t;s>0;){var h=Lo(s),C=1<<h;n[h]=fi,s&=~C}}function Yy(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function iD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=Qe,e.pingedLanes=Qe,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var s=e.entanglements,h=e.eventTimes,C=e.expirationTimes,M=n;M>0;){var B=Lo(M),z=1<<B;s[B]=Qe,h[B]=fi,C[B]=fi,M&=~z}}function Gp(e,t){for(var n=e.entangledLanes|=t,s=e.entanglements,h=n;h;){var C=Lo(h),M=1<<C;M&t|s[C]&t&&(s[C]|=t),h&=~M}}function rD(e,t){var n=To(t),s;switch(n){case Na:s=Rl;break;case Js:s=ko;break;case Yc:case Np:case Sp:case Cp:case Ep:case jp:case Dp:case kp:case Rp:case Tp:case Lp:case Ap:case Mp:case Up:case Op:case Pp:case Ll:case Vp:case Ip:case Bp:case Fp:s=Gc;break;case Ro:s=Kc;break;default:s=hr;break}return(s&(e.suspendedLanes|t))!==hr?hr:s}function qy(e,t,n){if(Ls)for(var s=e.pendingUpdatersLaneMap;n>0;){var h=$p(n),C=1<<h,M=s[h];M.add(t),n&=~C}}function Ky(e,t){if(Ls)for(var n=e.pendingUpdatersLaneMap,s=e.memoizedUpdaters;t>0;){var h=$p(t),C=1<<h,M=n[h];M.size>0&&(M.forEach(function(B){var z=B.alternate;(z===null||!s.has(z))&&s.add(B)}),M.clear()),t&=~C}}function Xy(e,t){return null}var cs=en,Sa=Na,Ca=Js,vh=Ro,Qc=hr;function As(){return Qc}function mr(e){Qc=e}function sD(e,t){var n=Qc;try{return Qc=e,t()}finally{Qc=n}}function aD(e,t){return e!==0&&e<t?e:t}function oD(e,t){return e>t?e:t}function Yp(e,t){return e!==0&&e<t}function Jy(e){var t=To(e);return Yp(cs,t)?Yp(Sa,t)?zp(t)?Ca:vh:Sa:cs}function gh(e){var t=e.current.memoizedState;return t.isDehydrated}var Zy;function lD(e){Zy=e}function cD(e){Zy(e)}var qp;function uD(e){qp=e}var Qy;function dD(e){Qy=e}var ew;function hD(e){ew=e}var tw;function mD(e){tw=e}var Kp=!1,_h=[],qa=null,Ka=null,Xa=null,eu=new Map,tu=new Map,Ja=[],fD=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function pD(e){return fD.indexOf(e)>-1}function vD(e,t,n,s,h){return{blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:h,targetContainers:[s]}}function nw(e,t){switch(e){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Xa=null;break;case"pointerover":case"pointerout":{var n=t.pointerId;eu.delete(n);break}case"gotpointercapture":case"lostpointercapture":{var s=t.pointerId;tu.delete(s);break}}}function nu(e,t,n,s,h,C){if(e===null||e.nativeEvent!==C){var M=vD(t,n,s,h,C);if(t!==null){var B=eo(t);B!==null&&qp(B)}return M}e.eventSystemFlags|=s;var z=e.targetContainers;return h!==null&&z.indexOf(h)===-1&&z.push(h),e}function gD(e,t,n,s,h){switch(t){case"focusin":{var C=h;return qa=nu(qa,e,t,n,s,C),!0}case"dragenter":{var M=h;return Ka=nu(Ka,e,t,n,s,M),!0}case"mouseover":{var B=h;return Xa=nu(Xa,e,t,n,s,B),!0}case"pointerover":{var z=h,ee=z.pointerId;return eu.set(ee,nu(eu.get(ee)||null,e,t,n,s,z)),!0}case"gotpointercapture":{var ne=h,fe=ne.pointerId;return tu.set(fe,nu(tu.get(fe)||null,e,t,n,s,ne)),!0}}return!1}function iw(e){var t=Uo(e.target);if(t!==null){var n=jo(t);if(n!==null){var s=n.tag;if(s===T){var h=jy(n);if(h!==null){e.blockedOn=h,tw(e.priority,function(){Qy(n)});return}}else if(s===d){var C=n.stateNode;if(gh(C)){e.blockedOn=Dy(n);return}}}}e.blockedOn=null}function _D(e){for(var t=ew(),n={blockedOn:null,target:e,priority:t},s=0;s<Ja.length&&Yp(t,Ja[s].priority);s++);Ja.splice(s,0,n),s===0&&iw(n)}function bh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var n=t[0],s=Zp(e.domEventName,e.eventSystemFlags,n,e.nativeEvent);if(s===null){var h=e.nativeEvent,C=new h.constructor(h.type,h);nh(C),h.target.dispatchEvent(C),ih()}else{var M=eo(s);return M!==null&&qp(M),e.blockedOn=s,!1}t.shift()}return!0}function rw(e,t,n){bh(e)&&n.delete(t)}function bD(){Kp=!1,qa!==null&&bh(qa)&&(qa=null),Ka!==null&&bh(Ka)&&(Ka=null),Xa!==null&&bh(Xa)&&(Xa=null),eu.forEach(rw),tu.forEach(rw)}function iu(e,t){e.blockedOn===t&&(e.blockedOn=null,Kp||(Kp=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,bD)))}function ru(e){if(_h.length>0){iu(_h[0],e);for(var t=1;t<_h.length;t++){var n=_h[t];n.blockedOn===e&&(n.blockedOn=null)}}qa!==null&&iu(qa,e),Ka!==null&&iu(Ka,e),Xa!==null&&iu(Xa,e);var s=function(B){return iu(B,e)};eu.forEach(s),tu.forEach(s);for(var h=0;h<Ja.length;h++){var C=Ja[h];C.blockedOn===e&&(C.blockedOn=null)}for(;Ja.length>0;){var M=Ja[0];if(M.blockedOn!==null)break;iw(M),M.blockedOn===null&&Ja.shift()}}var Ml=l.ReactCurrentBatchConfig,Xp=!0;function sw(e){Xp=!!e}function yD(){return Xp}function wD(e,t,n){var s=aw(t),h;switch(s){case cs:h=xD;break;case Sa:h=ND;break;case Ca:default:h=Jp;break}return h.bind(null,t,n,e)}function xD(e,t,n,s){var h=As(),C=Ml.transition;Ml.transition=null;try{mr(cs),Jp(e,t,n,s)}finally{mr(h),Ml.transition=C}}function ND(e,t,n,s){var h=As(),C=Ml.transition;Ml.transition=null;try{mr(Sa),Jp(e,t,n,s)}finally{mr(h),Ml.transition=C}}function Jp(e,t,n,s){Xp&&SD(e,t,n,s)}function SD(e,t,n,s){var h=Zp(e,t,n,s);if(h===null){hv(e,t,s,yh,n),nw(e,s);return}if(gD(h,e,t,n,s)){s.stopPropagation();return}if(nw(e,s),t&$a&&pD(e)){for(;h!==null;){var C=eo(h);C!==null&&cD(C);var M=Zp(e,t,n,s);if(M===null&&hv(e,t,s,yh,n),M===h)break;h=M}h!==null&&s.stopPropagation();return}hv(e,t,s,null,n)}var yh=null;function Zp(e,t,n,s){yh=null;var h=wl(s),C=Uo(h);if(C!==null){var M=jo(C);if(M===null)C=null;else{var B=M.tag;if(B===T){var z=jy(M);if(z!==null)return z;C=null}else if(B===d){var ee=M.stateNode;if(gh(ee))return Dy(M);C=null}else M!==C&&(C=null)}}return yh=C,null}function aw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return cs;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Sa;case"message":{var t=pj();switch(t){case ch:return cs;case bp:return Sa;case Do:case vj:return Ca;case yp:return vh;default:return Ca}}default:return Ca}}function CD(e,t,n){return e.addEventListener(t,n,!1),n}function ED(e,t,n){return e.addEventListener(t,n,!0),n}function jD(e,t,n,s){return e.addEventListener(t,n,{capture:!0,passive:s}),n}function DD(e,t,n,s){return e.addEventListener(t,n,{passive:s}),n}var su=null,Qp=null,au=null;function kD(e){return su=e,Qp=lw(),!0}function RD(){su=null,Qp=null,au=null}function ow(){if(au)return au;var e,t=Qp,n=t.length,s,h=lw(),C=h.length;for(e=0;e<n&&t[e]===h[e];e++);var M=n-e;for(s=1;s<=M&&t[n-s]===h[C-s];s++);var B=s>1?1-s:void 0;return au=h.slice(e,B),au}function lw(){return"value"in su?su.value:su.textContent}function wh(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),t>=32||t===13?t:0}function xh(){return!0}function cw(){return!1}function us(e){function t(n,s,h,C,M){this._reactName=n,this._targetInst=h,this.type=s,this.nativeEvent=C,this.target=M,this.currentTarget=null;for(var B in e)if(e.hasOwnProperty(B)){var z=e[B];z?this[B]=z(C):this[B]=C[B]}var ee=C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1;return ee?this.isDefaultPrevented=xh:this.isDefaultPrevented=cw,this.isPropagationStopped=cw,this}return Pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=xh)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=xh)},persist:function(){},isPersistent:xh}),t}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ev=us(Ul),ou=Pt({},Ul,{view:0,detail:0}),TD=us(ou),tv,nv,lu;function LD(e){e!==lu&&(lu&&e.type==="mousemove"?(tv=e.screenX-lu.screenX,nv=e.screenY-lu.screenY):(tv=0,nv=0),lu=e)}var Nh=Pt({},ou,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rv,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:(LD(e),tv)},movementY:function(e){return"movementY"in e?e.movementY:nv}}),uw=us(Nh),AD=Pt({},Nh,{dataTransfer:0}),MD=us(AD),UD=Pt({},ou,{relatedTarget:0}),iv=us(UD),OD=Pt({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),PD=us(OD),VD=Pt({},Ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ID=us(VD),BD=Pt({},Ul,{data:0}),dw=us(BD),FD=dw,HD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zD={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"};function $D(e){if(e.key){var t=HD[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var n=wh(e);return n===13?"Enter":String.fromCharCode(n)}return e.type==="keydown"||e.type==="keyup"?zD[e.keyCode]||"Unidentified":""}var WD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GD(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var s=WD[e];return s?!!n[s]:!1}function rv(e){return GD}var YD=Pt({},ou,{key:$D,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rv,charCode:function(e){return e.type==="keypress"?wh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qD=us(YD),KD=Pt({},Nh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hw=us(KD),XD=Pt({},ou,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rv}),JD=us(XD),ZD=Pt({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),QD=us(ZD),ek=Pt({},Nh,{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}),tk=us(ek),nk=[9,13,27,32],mw=229,sv=He&&"CompositionEvent"in window,cu=null;He&&"documentMode"in document&&(cu=document.documentMode);var ik=He&&"TextEvent"in window&&!cu,fw=He&&(!sv||cu&&cu>8&&cu<=11),pw=32,vw=String.fromCharCode(pw);function rk(){pe("onBeforeInput",["compositionend","keypress","textInput","paste"]),pe("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),pe("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),pe("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var gw=!1;function sk(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function ak(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function ok(e,t){return e==="keydown"&&t.keyCode===mw}function _w(e,t){switch(e){case"keyup":return nk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==mw;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bw(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function yw(e){return e.locale==="ko"}var Ol=!1;function lk(e,t,n,s,h){var C,M;if(sv?C=ak(t):Ol?_w(t,s)&&(C="onCompositionEnd"):ok(t,s)&&(C="onCompositionStart"),!C)return null;fw&&!yw(s)&&(!Ol&&C==="onCompositionStart"?Ol=kD(h):C==="onCompositionEnd"&&Ol&&(M=ow()));var B=Dh(n,C);if(B.length>0){var z=new dw(C,t,null,s,h);if(e.push({event:z,listeners:B}),M)z.data=M;else{var ee=bw(s);ee!==null&&(z.data=ee)}}}function ck(e,t){switch(e){case"compositionend":return bw(t);case"keypress":var n=t.which;return n!==pw?null:(gw=!0,vw);case"textInput":var s=t.data;return s===vw&&gw?null:s;default:return null}}function uk(e,t){if(Ol){if(e==="compositionend"||!sv&&_w(e,t)){var n=ow();return RD(),Ol=!1,n}return null}switch(e){case"paste":return null;case"keypress":if(!sk(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return fw&&!yw(t)?null:t.data;default:return null}}function dk(e,t,n,s,h){var C;if(ik?C=ck(t,s):C=uk(t,s),!C)return null;var M=Dh(n,"onBeforeInput");if(M.length>0){var B=new FD("onBeforeInput","beforeinput",null,s,h);e.push({event:B,listeners:M}),B.data=C}}function hk(e,t,n,s,h,C,M){lk(e,t,n,s,h),dk(e,t,n,s,h)}var mk={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 ww(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mk[e.type]:t==="textarea"}/**
79
+ * Checks if an event is supported in the current execution environment.
80
+ *
81
+ * NOTE: This will not work correctly for non-generic events such as `change`,
82
+ * `reset`, `load`, `error`, and `select`.
83
+ *
84
+ * Borrows from Modernizr.
85
+ *
86
+ * @param {string} eventNameSuffix Event name, e.g. "click".
87
+ * @return {boolean} True if the event is supported.
88
+ * @internal
89
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
90
+ */function fk(e){if(!He)return!1;var t="on"+e,n=t in document;if(!n){var s=document.createElement("div");s.setAttribute(t,"return;"),n=typeof s[t]=="function"}return n}function pk(){pe("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function xw(e,t,n,s){Vc(s);var h=Dh(t,"onChange");if(h.length>0){var C=new ev("onChange","change",null,n,s);e.push({event:C,listeners:h})}}var uu=null,du=null;function vk(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function gk(e){var t=[];xw(t,du,e,wl(e)),Hc(_k,t)}function _k(e){Bw(e,0)}function Sh(e){var t=Hl(e);if(Vn(t))return e}function bk(e,t){if(e==="change")return t}var Nw=!1;He&&(Nw=fk("input")&&(!document.documentMode||document.documentMode>9));function yk(e,t){uu=e,du=t,uu.attachEvent("onpropertychange",Cw)}function Sw(){uu&&(uu.detachEvent("onpropertychange",Cw),uu=null,du=null)}function Cw(e){e.propertyName==="value"&&Sh(du)&&gk(e)}function wk(e,t,n){e==="focusin"?(Sw(),yk(t,n)):e==="focusout"&&Sw()}function xk(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sh(du)}function Nk(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function Sk(e,t){if(e==="click")return Sh(t)}function Ck(e,t){if(e==="input"||e==="change")return Sh(t)}function Ek(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||Mt(e,"number",e.value)}function jk(e,t,n,s,h,C,M){var B=n?Hl(n):window,z,ee;if(vk(B)?z=bk:ww(B)?Nw?z=Ck:(z=xk,ee=wk):Nk(B)&&(z=Sk),z){var ne=z(t,n);if(ne){xw(e,ne,s,h);return}}ee&&ee(t,B,n),t==="focusout"&&Ek(B)}function Dk(){he("onMouseEnter",["mouseout","mouseover"]),he("onMouseLeave",["mouseout","mouseover"]),he("onPointerEnter",["pointerout","pointerover"]),he("onPointerLeave",["pointerout","pointerover"])}function kk(e,t,n,s,h,C,M){var B=t==="mouseover"||t==="pointerover",z=t==="mouseout"||t==="pointerout";if(B&&!rh(s)){var ee=s.relatedTarget||s.fromElement;if(ee&&(Uo(ee)||Eu(ee)))return}if(!(!z&&!B)){var ne;if(h.window===h)ne=h;else{var fe=h.ownerDocument;fe?ne=fe.defaultView||fe.parentWindow:ne=window}var me,De;if(z){var ke=s.relatedTarget||s.toElement;if(me=n,De=ke?Uo(ke):null,De!==null){var Ie=jo(De);(De!==Ie||De.tag!==x&&De.tag!==j)&&(De=null)}}else me=null,De=n;if(me!==De){var mt=uw,Ut="onMouseLeave",Dt="onMouseEnter",kn="mouse";(t==="pointerout"||t==="pointerover")&&(mt=hw,Ut="onPointerLeave",Dt="onPointerEnter",kn="pointer");var Nn=me==null?ne:Hl(me),be=De==null?ne:Hl(De),Be=new mt(Ut,kn+"leave",me,s,h);Be.target=Nn,Be.relatedTarget=be;var ye=null,rt=Uo(h);if(rt===n){var yt=new mt(Dt,kn+"enter",De,s,h);yt.target=be,yt.relatedTarget=Nn,ye=yt}Qk(e,Be,ye,me,De)}}}function Rk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ds=typeof Object.is=="function"?Object.is:Rk;function hu(e,t){if(ds(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(var h=0;h<n.length;h++){var C=n[h];if(!Oe.call(t,C)||!ds(e[C],t[C]))return!1}return!0}function Ew(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tk(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function jw(e,t){for(var n=Ew(e),s=0,h=0;n;){if(n.nodeType===ai){if(h=s+n.textContent.length,s<=t&&h>=t)return{node:n,offset:t-s};s=h}n=Ew(Tk(n))}}function Lk(e){var t=e.ownerDocument,n=t&&t.defaultView||window,s=n.getSelection&&n.getSelection();if(!s||s.rangeCount===0)return null;var h=s.anchorNode,C=s.anchorOffset,M=s.focusNode,B=s.focusOffset;try{h.nodeType,M.nodeType}catch{return null}return Ak(e,h,C,M,B)}function Ak(e,t,n,s,h){var C=0,M=-1,B=-1,z=0,ee=0,ne=e,fe=null;e:for(;;){for(var me=null;ne===t&&(n===0||ne.nodeType===ai)&&(M=C+n),ne===s&&(h===0||ne.nodeType===ai)&&(B=C+h),ne.nodeType===ai&&(C+=ne.nodeValue.length),(me=ne.firstChild)!==null;)fe=ne,ne=me;for(;;){if(ne===e)break e;if(fe===t&&++z===n&&(M=C),fe===s&&++ee===h&&(B=C),(me=ne.nextSibling)!==null)break;ne=fe,fe=ne.parentNode}ne=me}return M===-1||B===-1?null:{start:M,end:B}}function Mk(e,t){var n=e.ownerDocument||document,s=n&&n.defaultView||window;if(s.getSelection){var h=s.getSelection(),C=e.textContent.length,M=Math.min(t.start,C),B=t.end===void 0?M:Math.min(t.end,C);if(!h.extend&&M>B){var z=B;B=M,M=z}var ee=jw(e,M),ne=jw(e,B);if(ee&&ne){if(h.rangeCount===1&&h.anchorNode===ee.node&&h.anchorOffset===ee.offset&&h.focusNode===ne.node&&h.focusOffset===ne.offset)return;var fe=n.createRange();fe.setStart(ee.node,ee.offset),h.removeAllRanges(),M>B?(h.addRange(fe),h.extend(ne.node,ne.offset)):(fe.setEnd(ne.node,ne.offset),h.addRange(fe))}}}function Dw(e){return e&&e.nodeType===ai}function kw(e,t){return!e||!t?!1:e===t?!0:Dw(e)?!1:Dw(t)?kw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function Uk(e){return e&&e.ownerDocument&&kw(e.ownerDocument.documentElement,e)}function Ok(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function Rw(){for(var e=window,t=vr();t instanceof e.HTMLIFrameElement;){if(Ok(t))e=t.contentWindow;else return t;t=vr(e.document)}return t}function av(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")}function Pk(){var e=Rw();return{focusedElem:e,selectionRange:av(e)?Ik(e):null}}function Vk(e){var t=Rw(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&Uk(n)){s!==null&&av(n)&&Bk(n,s);for(var h=[],C=n;C=C.parentNode;)C.nodeType===Sn&&h.push({element:C,left:C.scrollLeft,top:C.scrollTop});typeof n.focus=="function"&&n.focus();for(var M=0;M<h.length;M++){var B=h[M];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}}function Ik(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=Lk(e),t||{start:0,end:0}}function Bk(e,t){var n=t.start,s=t.end;s===void 0&&(s=n),"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(s,e.value.length)):Mk(e,t)}var Fk=He&&"documentMode"in document&&document.documentMode<=11;function Hk(){pe("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var Pl=null,ov=null,mu=null,lv=!1;function zk(e){if("selectionStart"in e&&av(e))return{start:e.selectionStart,end:e.selectionEnd};var t=e.ownerDocument&&e.ownerDocument.defaultView||window,n=t.getSelection();return{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}}function $k(e){return e.window===e?e.document:e.nodeType===ss?e:e.ownerDocument}function Tw(e,t,n){var s=$k(n);if(!(lv||Pl==null||Pl!==vr(s))){var h=zk(Pl);if(!mu||!hu(mu,h)){mu=h;var C=Dh(ov,"onSelect");if(C.length>0){var M=new ev("onSelect","select",null,t,n);e.push({event:M,listeners:C}),M.target=Pl}}}}function Wk(e,t,n,s,h,C,M){var B=n?Hl(n):window;switch(t){case"focusin":(ww(B)||B.contentEditable==="true")&&(Pl=B,ov=n,mu=null);break;case"focusout":Pl=null,ov=null,mu=null;break;case"mousedown":lv=!0;break;case"contextmenu":case"mouseup":case"dragend":lv=!1,Tw(e,s,h);break;case"selectionchange":if(Fk)break;case"keydown":case"keyup":Tw(e,s,h)}}function Ch(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Vl={animationend:Ch("Animation","AnimationEnd"),animationiteration:Ch("Animation","AnimationIteration"),animationstart:Ch("Animation","AnimationStart"),transitionend:Ch("Transition","TransitionEnd")},cv={},Lw={};He&&(Lw=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function Eh(e){if(cv[e])return cv[e];if(!Vl[e])return e;var t=Vl[e];for(var n in t)if(t.hasOwnProperty(n)&&n in Lw)return cv[e]=t[n];return e}var Aw=Eh("animationend"),Mw=Eh("animationiteration"),Uw=Eh("animationstart"),Ow=Eh("transitionend"),Pw=new Map,Vw=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function Za(e,t){Pw.set(e,t),pe(t,[e])}function Gk(){for(var e=0;e<Vw.length;e++){var t=Vw[e],n=t.toLowerCase(),s=t[0].toUpperCase()+t.slice(1);Za(n,"on"+s)}Za(Aw,"onAnimationEnd"),Za(Mw,"onAnimationIteration"),Za(Uw,"onAnimationStart"),Za("dblclick","onDoubleClick"),Za("focusin","onFocus"),Za("focusout","onBlur"),Za(Ow,"onTransitionEnd")}function Yk(e,t,n,s,h,C,M){var B=Pw.get(t);if(B!==void 0){var z=ev,ee=t;switch(t){case"keypress":if(wh(s)===0)return;case"keydown":case"keyup":z=qD;break;case"focusin":ee="focus",z=iv;break;case"focusout":ee="blur",z=iv;break;case"beforeblur":case"afterblur":z=iv;break;case"click":if(s.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=uw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=MD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=JD;break;case Aw:case Mw:case Uw:z=PD;break;case Ow:z=QD;break;case"scroll":z=TD;break;case"wheel":z=tk;break;case"copy":case"cut":case"paste":z=ID;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=hw;break}var ne=(C&$a)!==0;{var fe=!ne&&t==="scroll",me=Jk(n,B,s.type,ne,fe);if(me.length>0){var De=new z(B,ee,null,s,h);e.push({event:De,listeners:me})}}}}Gk(),Dk(),pk(),Hk(),rk();function qk(e,t,n,s,h,C,M){Yk(e,t,n,s,h,C);var B=(C&th)===0;B&&(kk(e,t,n,s,h),jk(e,t,n,s,h),Wk(e,t,n,s,h),hk(e,t,n,s,h))}var fu=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],uv=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(fu));function Iw(e,t,n){var s=e.type||"unknown-event";e.currentTarget=n,nj(s,t,void 0,e),e.currentTarget=null}function Kk(e,t,n){var s;if(n)for(var h=t.length-1;h>=0;h--){var C=t[h],M=C.instance,B=C.currentTarget,z=C.listener;if(M!==s&&e.isPropagationStopped())return;Iw(e,z,B),s=M}else for(var ee=0;ee<t.length;ee++){var ne=t[ee],fe=ne.instance,me=ne.currentTarget,De=ne.listener;if(fe!==s&&e.isPropagationStopped())return;Iw(e,De,me),s=fe}}function Bw(e,t){for(var n=(t&$a)!==0,s=0;s<e.length;s++){var h=e[s],C=h.event,M=h.listeners;Kk(C,M,n)}ij()}function Xk(e,t,n,s,h){var C=wl(n),M=[];qk(M,e,s,n,C,t),Bw(M,t)}function _i(e,t){uv.has(e)||y('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=!1,s=ET(t),h=eR(e);s.has(h)||(Fw(t,e,yl,n),s.add(h))}function dv(e,t,n){uv.has(e)&&!t&&y('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var s=0;t&&(s|=$a),Fw(n,e,s,t)}var jh="_reactListening"+Math.random().toString(36).slice(2);function pu(e){if(!e[jh]){e[jh]=!0,Se.forEach(function(n){n!=="selectionchange"&&(uv.has(n)||dv(n,!1,e),dv(n,!0,e))});var t=e.nodeType===ss?e:e.ownerDocument;t!==null&&(t[jh]||(t[jh]=!0,dv("selectionchange",!1,t)))}}function Fw(e,t,n,s,h){var C=wD(e,t,n),M=void 0;Ze&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(M=!0),e=e,s?M!==void 0?jD(e,t,C,M):ED(e,t,C):M!==void 0?DD(e,t,C,M):CD(e,t,C)}function Hw(e,t){return e===t||e.nodeType===gi&&e.parentNode===t}function hv(e,t,n,s,h){var C=s;if(!(t&Oc)&&!(t&yl)){var M=h;if(s!==null){var B=s;e:for(;;){if(B===null)return;var z=B.tag;if(z===d||z===w){var ee=B.stateNode.containerInfo;if(Hw(ee,M))break;if(z===w)for(var ne=B.return;ne!==null;){var fe=ne.tag;if(fe===d||fe===w){var me=ne.stateNode.containerInfo;if(Hw(me,M))return}ne=ne.return}for(;ee!==null;){var De=Uo(ee);if(De===null)return;var ke=De.tag;if(ke===x||ke===j){B=C=De;continue e}ee=ee.parentNode}}B=B.return}}}Hc(function(){return Xk(e,t,n,C)})}function vu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jk(e,t,n,s,h,C){for(var M=t!==null?t+"Capture":null,B=s?M:t,z=[],ee=e,ne=null;ee!==null;){var fe=ee,me=fe.stateNode,De=fe.tag;if(De===x&&me!==null&&(ne=me,B!==null)){var ke=We(ee,B);ke!=null&&z.push(vu(ee,ke,ne))}if(h)break;ee=ee.return}return z}function Dh(e,t){for(var n=t+"Capture",s=[],h=e;h!==null;){var C=h,M=C.stateNode,B=C.tag;if(B===x&&M!==null){var z=M,ee=We(h,n);ee!=null&&s.unshift(vu(h,ee,z));var ne=We(h,t);ne!=null&&s.push(vu(h,ne,z))}h=h.return}return s}function Il(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==x);return e||null}function Zk(e,t){for(var n=e,s=t,h=0,C=n;C;C=Il(C))h++;for(var M=0,B=s;B;B=Il(B))M++;for(;h-M>0;)n=Il(n),h--;for(;M-h>0;)s=Il(s),M--;for(var z=h;z--;){if(n===s||s!==null&&n===s.alternate)return n;n=Il(n),s=Il(s)}return null}function zw(e,t,n,s,h){for(var C=t._reactName,M=[],B=n;B!==null&&B!==s;){var z=B,ee=z.alternate,ne=z.stateNode,fe=z.tag;if(ee!==null&&ee===s)break;if(fe===x&&ne!==null){var me=ne;if(h){var De=We(B,C);De!=null&&M.unshift(vu(B,De,me))}else if(!h){var ke=We(B,C);ke!=null&&M.push(vu(B,ke,me))}}B=B.return}M.length!==0&&e.push({event:t,listeners:M})}function Qk(e,t,n,s,h){var C=s&&h?Zk(s,h):null;s!==null&&zw(e,t,s,C,!1),h!==null&&n!==null&&zw(e,n,h,C,!0)}function eR(e,t){return e+"__bubble"}var Zr=!1,gu="dangerouslySetInnerHTML",kh="suppressContentEditableWarning",Qa="suppressHydrationWarning",$w="autoFocus",Ao="children",Mo="style",Rh="__html",mv,Th,_u,Ww,Lh,Gw,Yw;mv={dialog:!0,webview:!0},Th=function(e,t){op(e,t),lp(e,t),eh(e,t,{registrationNameDependencies:se,possibleRegistrationNames:Y})},Gw=He&&!document.documentMode,_u=function(e,t,n){if(!Zr){var s=Ah(n),h=Ah(t);h!==s&&(Zr=!0,y("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(h),JSON.stringify(s)))}},Ww=function(e){if(!Zr){Zr=!0;var t=[];e.forEach(function(n){t.push(n)}),y("Extra attributes from the server: %s",t)}},Lh=function(e,t){t===!1?y("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):y("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},Yw=function(e,t){var n=e.namespaceURI===St?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var tR=/\r\n?/g,nR=/\u0000|\uFFFD/g;function Ah(e){le(e);var t=typeof e=="string"?e:""+e;return t.replace(tR,`
91
+ `).replace(nR,"")}function Mh(e,t,n,s){var h=Ah(t),C=Ah(e);if(C!==h&&(s&&(Zr||(Zr=!0,y('Text content did not match. Server: "%s" Client: "%s"',C,h))),n&&J))throw new Error("Text content does not match server-rendered HTML.")}function qw(e){return e.nodeType===ss?e:e.ownerDocument}function iR(){}function Uh(e){e.onclick=iR}function rR(e,t,n,s,h){for(var C in s)if(s.hasOwnProperty(C)){var M=s[C];if(C===Mo)M&&Object.freeze(M),$d(t,M);else if(C===gu){var B=M?M[Rh]:void 0;B!=null&&Di(t,B)}else if(C===Ao)if(typeof M=="string"){var z=e!=="textarea"||M!=="";z&&pl(t,M)}else typeof M=="number"&&pl(t,""+M);else C===kh||C===Qa||C===$w||(se.hasOwnProperty(C)?M!=null&&(typeof M!="function"&&Lh(C,M),C==="onScroll"&&_i("scroll",t)):M!=null&&ci(t,C,M,h))}}function sR(e,t,n,s){for(var h=0;h<t.length;h+=2){var C=t[h],M=t[h+1];C===Mo?$d(e,M):C===gu?Di(e,M):C===Ao?pl(e,M):ci(e,C,M,s)}}function aR(e,t,n,s){var h,C=qw(n),M,B=s;if(B===St&&(B=Jr(e)),B===St){if(h=Ts(e,t),!h&&e!==e.toLowerCase()&&y("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var z=C.createElement("div");z.innerHTML="<script><\/script>";var ee=z.firstChild;M=z.removeChild(ee)}else if(typeof t.is=="string")M=C.createElement(e,{is:t.is});else if(M=C.createElement(e),e==="select"){var ne=M;t.multiple?ne.multiple=!0:t.size&&(ne.size=t.size)}}else M=C.createElementNS(B,e);return B===St&&!h&&Object.prototype.toString.call(M)==="[object HTMLUnknownElement]"&&!Oe.call(mv,e)&&(mv[e]=!0,y("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),M}function oR(e,t){return qw(t).createTextNode(e)}function lR(e,t,n,s){var h=Ts(t,n);Th(t,n);var C;switch(t){case"dialog":_i("cancel",e),_i("close",e),C=n;break;case"iframe":case"object":case"embed":_i("load",e),C=n;break;case"video":case"audio":for(var M=0;M<fu.length;M++)_i(fu[M],e);C=n;break;case"source":_i("error",e),C=n;break;case"img":case"image":case"link":_i("error",e),_i("load",e),C=n;break;case"details":_i("toggle",e),C=n;break;case"input":Ys(e,n),C=Gs(e,n),_i("invalid",e);break;case"option":bn(e,n),C=n;break;case"select":fa(e,n),C=Rs(e,n),_i("invalid",e);break;case"textarea":fn(e,n),C=Rt(e,n),_i("invalid",e);break;default:C=n}switch(Ac(t,C),rR(t,e,s,C,h),t){case"input":gs(e),Ce(e,n,!1);break;case"textarea":gs(e),Si(e);break;case"option":Jn(e,n);break;case"select":bs(e,n);break;default:typeof C.onClick=="function"&&Uh(e);break}}function cR(e,t,n,s,h){Th(t,s);var C=null,M,B;switch(t){case"input":M=Gs(e,n),B=Gs(e,s),C=[];break;case"select":M=Rs(e,n),B=Rs(e,s),C=[];break;case"textarea":M=Rt(e,n),B=Rt(e,s),C=[];break;default:M=n,B=s,typeof M.onClick!="function"&&typeof B.onClick=="function"&&Uh(e);break}Ac(t,B);var z,ee,ne=null;for(z in M)if(!(B.hasOwnProperty(z)||!M.hasOwnProperty(z)||M[z]==null))if(z===Mo){var fe=M[z];for(ee in fe)fe.hasOwnProperty(ee)&&(ne||(ne={}),ne[ee]="")}else z===gu||z===Ao||z===kh||z===Qa||z===$w||(se.hasOwnProperty(z)?C||(C=[]):(C=C||[]).push(z,null));for(z in B){var me=B[z],De=M!=null?M[z]:void 0;if(!(!B.hasOwnProperty(z)||me===De||me==null&&De==null))if(z===Mo)if(me&&Object.freeze(me),De){for(ee in De)De.hasOwnProperty(ee)&&(!me||!me.hasOwnProperty(ee))&&(ne||(ne={}),ne[ee]="");for(ee in me)me.hasOwnProperty(ee)&&De[ee]!==me[ee]&&(ne||(ne={}),ne[ee]=me[ee])}else ne||(C||(C=[]),C.push(z,ne)),ne=me;else if(z===gu){var ke=me?me[Rh]:void 0,Ie=De?De[Rh]:void 0;ke!=null&&Ie!==ke&&(C=C||[]).push(z,ke)}else z===Ao?(typeof me=="string"||typeof me=="number")&&(C=C||[]).push(z,""+me):z===kh||z===Qa||(se.hasOwnProperty(z)?(me!=null&&(typeof me!="function"&&Lh(z,me),z==="onScroll"&&_i("scroll",e)),!C&&De!==me&&(C=[])):(C=C||[]).push(z,me))}return ne&&(Wd(ne,B[Mo]),(C=C||[]).push(Mo,ne)),C}function uR(e,t,n,s,h){n==="input"&&h.type==="radio"&&h.name!=null&&$(e,h);var C=Ts(n,s),M=Ts(n,h);switch(sR(e,t,C,M),n){case"input":ce(e,h);break;case"textarea":Wn(e,h);break;case"select":pa(e,h);break}}function dR(e){{var t=e.toLowerCase();return bl.hasOwnProperty(t)&&bl[t]||null}}function hR(e,t,n,s,h,C,M){var B,z;switch(B=Ts(t,n),Th(t,n),t){case"dialog":_i("cancel",e),_i("close",e);break;case"iframe":case"object":case"embed":_i("load",e);break;case"video":case"audio":for(var ee=0;ee<fu.length;ee++)_i(fu[ee],e);break;case"source":_i("error",e);break;case"img":case"image":case"link":_i("error",e),_i("load",e);break;case"details":_i("toggle",e);break;case"input":Ys(e,n),_i("invalid",e);break;case"option":bn(e,n);break;case"select":fa(e,n),_i("invalid",e);break;case"textarea":fn(e,n),_i("invalid",e);break}Ac(t,n);{z=new Set;for(var ne=e.attributes,fe=0;fe<ne.length;fe++){var me=ne[fe].name.toLowerCase();switch(me){case"value":break;case"checked":break;case"selected":break;default:z.add(ne[fe].name)}}}var De=null;for(var ke in n)if(n.hasOwnProperty(ke)){var Ie=n[ke];if(ke===Ao)typeof Ie=="string"?e.textContent!==Ie&&(n[Qa]!==!0&&Mh(e.textContent,Ie,C,M),De=[Ao,Ie]):typeof Ie=="number"&&e.textContent!==""+Ie&&(n[Qa]!==!0&&Mh(e.textContent,Ie,C,M),De=[Ao,""+Ie]);else if(se.hasOwnProperty(ke))Ie!=null&&(typeof Ie!="function"&&Lh(ke,Ie),ke==="onScroll"&&_i("scroll",e));else if(M&&typeof B=="boolean"){var mt=void 0,Ut=_n(ke);if(n[Qa]!==!0){if(!(ke===kh||ke===Qa||ke==="value"||ke==="checked"||ke==="selected")){if(ke===gu){var Dt=e.innerHTML,kn=Ie?Ie[Rh]:void 0;if(kn!=null){var Nn=Yw(e,kn);Nn!==Dt&&_u(ke,Dt,Nn)}}else if(ke===Mo){if(z.delete(ke),Gw){var be=Tc(Ie);mt=e.getAttribute("style"),be!==mt&&_u(ke,mt,be)}}else if(B&&!K)z.delete(ke.toLowerCase()),mt=oi(e,ke,Ie),Ie!==mt&&_u(ke,mt,Ie);else if(!At(ke,Ut,B)&&!cn(ke,Ie,Ut,B)){var Be=!1;if(Ut!==null)z.delete(Ut.attributeName),mt=Zt(e,ke,Ie,Ut);else{var ye=s;if(ye===St&&(ye=Jr(t)),ye===St)z.delete(ke.toLowerCase());else{var rt=dR(ke);rt!==null&&rt!==ke&&(Be=!0,z.delete(rt)),z.delete(ke)}mt=oi(e,ke,Ie)}var yt=K;!yt&&Ie!==mt&&!Be&&_u(ke,mt,Ie)}}}}}switch(M&&z.size>0&&n[Qa]!==!0&&Ww(z),t){case"input":gs(e),Ce(e,n,!0);break;case"textarea":gs(e),Si(e);break;case"select":case"option":break;default:typeof n.onClick=="function"&&Uh(e);break}return De}function mR(e,t,n){var s=e.nodeValue!==t;return s}function fv(e,t){{if(Zr)return;Zr=!0,y("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function pv(e,t){{if(Zr)return;Zr=!0,y('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function vv(e,t,n){{if(Zr)return;Zr=!0,y("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function gv(e,t){{if(t===""||Zr)return;Zr=!0,y('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function fR(e,t,n){switch(t){case"input":Ue(e,n);return;case"textarea":Pi(e,n);return;case"select":Ee(e,n);return}}var bu=function(){},yu=function(){};{var pR=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Kw=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],vR=Kw.concat(["button"]),gR=["dd","dt","li","option","optgroup","p","rp","rt"],Xw={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};yu=function(e,t){var n=Pt({},e||Xw),s={tag:t};return Kw.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),vR.indexOf(t)!==-1&&(n.pTagInButtonScope=null),pR.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=s,t==="form"&&(n.formTag=s),t==="a"&&(n.aTagInScope=s),t==="button"&&(n.buttonTagInScope=s),t==="nobr"&&(n.nobrTagInScope=s),t==="p"&&(n.pTagInButtonScope=s),t==="li"&&(n.listItemTagAutoclosing=s),(t==="dd"||t==="dt")&&(n.dlItemTagAutoclosing=s),n};var _R=function(e,t){switch(t){case"select":return e==="option"||e==="optgroup"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return gR.indexOf(t)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null}return!0},bR=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},Jw={};bu=function(e,t,n){n=n||Xw;var s=n.current,h=s&&s.tag;t!=null&&(e!=null&&y("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var C=_R(e,h)?null:s,M=C?null:bR(e,n),B=C||M;if(B){var z=B.tag,ee=!!C+"|"+e+"|"+z;if(!Jw[ee]){Jw[ee]=!0;var ne=e,fe="";if(e==="#text"?/\S/.test(t)?ne="Text nodes":(ne="Whitespace text nodes",fe=" Make sure you don't have any extra whitespace between tags on each line of your source code."):ne="<"+e+">",C){var me="";z==="table"&&e==="tr"&&(me+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),y("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",ne,z,fe,me)}else y("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",ne,z)}}}}var Oh="suppressHydrationWarning",Ph="$",Vh="/$",wu="$?",xu="$!",yR="style",_v=null,bv=null;function wR(e){var t,n,s=e.nodeType;switch(s){case ss:case Ec:{t=s===ss?"#document":"#fragment";var h=e.documentElement;n=h?h.namespaceURI:lr(null,"");break}default:{var C=s===gi?e.parentNode:e,M=C.namespaceURI||null;t=C.tagName,n=lr(M,t);break}}{var B=t.toLowerCase(),z=yu(null,B);return{namespace:n,ancestorInfo:z}}}function xR(e,t,n){{var s=e,h=lr(s.namespace,t),C=yu(s.ancestorInfo,t);return{namespace:h,ancestorInfo:C}}}function y6(e){return e}function NR(e){_v=yD(),bv=Pk();var t=null;return sw(!1),t}function SR(e){Vk(bv),sw(_v),_v=null,bv=null}function CR(e,t,n,s,h){var C;{var M=s;if(bu(e,null,M.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var B=""+t.children,z=yu(M.ancestorInfo,e);bu(null,B,z)}C=M.namespace}var ee=aR(e,t,n,C);return Cu(h,ee),jv(ee,t),ee}function ER(e,t){e.appendChild(t)}function jR(e,t,n,s,h){switch(lR(e,t,n,s),t){case"button":case"input":case"select":case"textarea":return!!n.autoFocus;case"img":return!0;default:return!1}}function DR(e,t,n,s,h,C){{var M=C;if(typeof s.children!=typeof n.children&&(typeof s.children=="string"||typeof s.children=="number")){var B=""+s.children,z=yu(M.ancestorInfo,t);bu(null,B,z)}}return cR(e,t,n,s)}function yv(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function kR(e,t,n,s){{var h=n;bu(null,e,h.ancestorInfo)}var C=oR(e,t);return Cu(s,C),C}function RR(){var e=window.event;return e===void 0?Ca:aw(e.type)}var wv=typeof setTimeout=="function"?setTimeout:void 0,TR=typeof clearTimeout=="function"?clearTimeout:void 0,xv=-1,Zw=typeof Promise=="function"?Promise:void 0,LR=typeof queueMicrotask=="function"?queueMicrotask:typeof Zw<"u"?function(e){return Zw.resolve(null).then(e).catch(AR)}:wv;function AR(e){setTimeout(function(){throw e})}function MR(e,t,n,s){switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&e.focus();return;case"img":{n.src&&(e.src=n.src);return}}}function UR(e,t,n,s,h,C){uR(e,t,n,s,h),jv(e,h)}function Qw(e){pl(e,"")}function OR(e,t,n){e.nodeValue=n}function PR(e,t){e.appendChild(t)}function VR(e,t){var n;e.nodeType===gi?(n=e.parentNode,n.insertBefore(t,e)):(n=e,n.appendChild(t));var s=e._reactRootContainer;s==null&&n.onclick===null&&Uh(n)}function IR(e,t,n){e.insertBefore(t,n)}function BR(e,t,n){e.nodeType===gi?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}function FR(e,t){e.removeChild(t)}function HR(e,t){e.nodeType===gi?e.parentNode.removeChild(t):e.removeChild(t)}function Nv(e,t){var n=t,s=0;do{var h=n.nextSibling;if(e.removeChild(n),h&&h.nodeType===gi){var C=h.data;if(C===Vh)if(s===0){e.removeChild(h),ru(t);return}else s--;else(C===Ph||C===wu||C===xu)&&s++}n=h}while(n);ru(t)}function zR(e,t){e.nodeType===gi?Nv(e.parentNode,t):e.nodeType===Sn&&Nv(e,t),ru(e)}function $R(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function WR(e){e.nodeValue=""}function GR(e,t){e=e;var n=t[yR],s=n!=null&&n.hasOwnProperty("display")?n.display:null;e.style.display=ys("display",s)}function YR(e,t){e.nodeValue=t}function qR(e){e.nodeType===Sn?e.textContent="":e.nodeType===ss&&e.documentElement&&e.removeChild(e.documentElement)}function KR(e,t,n){return e.nodeType!==Sn||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function XR(e,t){return t===""||e.nodeType!==ai?null:e}function JR(e){return e.nodeType!==gi?null:e}function ex(e){return e.data===wu}function Sv(e){return e.data===xu}function ZR(e){var t=e.nextSibling&&e.nextSibling.dataset,n,s,h;return t&&(n=t.dgst,s=t.msg,h=t.stck),{message:s,digest:n,stack:h}}function QR(e,t){e._reactRetry=t}function Ih(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===Sn||t===ai)break;if(t===gi){var n=e.data;if(n===Ph||n===xu||n===wu)break;if(n===Vh)return null}}return e}function Nu(e){return Ih(e.nextSibling)}function eT(e){return Ih(e.firstChild)}function tT(e){return Ih(e.firstChild)}function nT(e){return Ih(e.nextSibling)}function iT(e,t,n,s,h,C,M){Cu(C,e),jv(e,n);var B;{var z=h;B=z.namespace}var ee=(C.mode&jn)!==It;return hR(e,t,n,B,s,ee,M)}function rT(e,t,n,s){return Cu(n,e),n.mode&jn,mR(e,t)}function sT(e,t){Cu(t,e)}function aT(e){for(var t=e.nextSibling,n=0;t;){if(t.nodeType===gi){var s=t.data;if(s===Vh){if(n===0)return Nu(t);n--}else(s===Ph||s===xu||s===wu)&&n++}t=t.nextSibling}return null}function tx(e){for(var t=e.previousSibling,n=0;t;){if(t.nodeType===gi){var s=t.data;if(s===Ph||s===xu||s===wu){if(n===0)return t;n--}else s===Vh&&n++}t=t.previousSibling}return null}function oT(e){ru(e)}function lT(e){ru(e)}function cT(e){return e!=="head"&&e!=="body"}function uT(e,t,n,s){var h=!0;Mh(t.nodeValue,n,s,h)}function dT(e,t,n,s,h,C){if(t[Oh]!==!0){var M=!0;Mh(s.nodeValue,h,C,M)}}function hT(e,t){t.nodeType===Sn?fv(e,t):t.nodeType===gi||pv(e,t)}function mT(e,t){{var n=e.parentNode;n!==null&&(t.nodeType===Sn?fv(n,t):t.nodeType===gi||pv(n,t))}}function fT(e,t,n,s,h){(h||t[Oh]!==!0)&&(s.nodeType===Sn?fv(n,s):s.nodeType===gi||pv(n,s))}function pT(e,t,n){vv(e,t)}function vT(e,t){gv(e,t)}function gT(e,t,n){{var s=e.parentNode;s!==null&&vv(s,t)}}function _T(e,t){{var n=e.parentNode;n!==null&&gv(n,t)}}function bT(e,t,n,s,h,C){(C||t[Oh]!==!0)&&vv(n,s)}function yT(e,t,n,s,h){(h||t[Oh]!==!0)&&gv(n,s)}function wT(e){y("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function xT(e){pu(e)}var Bl=Math.random().toString(36).slice(2),Fl="__reactFiber$"+Bl,Cv="__reactProps$"+Bl,Su="__reactContainer$"+Bl,Ev="__reactEvents$"+Bl,NT="__reactListeners$"+Bl,ST="__reactHandles$"+Bl;function CT(e){delete e[Fl],delete e[Cv],delete e[Ev],delete e[NT],delete e[ST]}function Cu(e,t){t[Fl]=e}function Bh(e,t){t[Su]=e}function nx(e){e[Su]=null}function Eu(e){return!!e[Su]}function Uo(e){var t=e[Fl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Su]||n[Fl],t){var s=t.alternate;if(t.child!==null||s!==null&&s.child!==null)for(var h=tx(e);h!==null;){var C=h[Fl];if(C)return C;h=tx(h)}return t}e=n,n=e.parentNode}return null}function eo(e){var t=e[Fl]||e[Su];return t&&(t.tag===x||t.tag===j||t.tag===T||t.tag===d)?t:null}function Hl(e){if(e.tag===x||e.tag===j)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Fh(e){return e[Cv]||null}function jv(e,t){e[Cv]=t}function ET(e){var t=e[Ev];return t===void 0&&(t=e[Ev]=new Set),t}var ix={},rx=l.ReactDebugCurrentFrame;function Hh(e){if(e){var t=e._owner,n=fr(e.type,e._source,t?t.type:null);rx.setExtraStackFrame(n)}else rx.setExtraStackFrame(null)}function Ms(e,t,n,s,h){{var C=Function.call.bind(Oe);for(var M in e)if(C(e,M)){var B=void 0;try{if(typeof e[M]!="function"){var z=Error((s||"React class")+": "+n+" type `"+M+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[M]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw z.name="Invariant Violation",z}B=e[M](t,M,s,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ee){B=ee}B&&!(B instanceof Error)&&(Hh(h),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",n,M,typeof B),Hh(null)),B instanceof Error&&!(B.message in ix)&&(ix[B.message]=!0,Hh(h),y("Failed %s type: %s",n,B.message),Hh(null))}}}var Dv=[],zh;zh=[];var Ea=-1;function to(e){return{current:e}}function Lr(e,t){if(Ea<0){y("Unexpected pop.");return}t!==zh[Ea]&&y("Unexpected Fiber popped."),e.current=Dv[Ea],Dv[Ea]=null,zh[Ea]=null,Ea--}function Ar(e,t,n){Ea++,Dv[Ea]=e.current,zh[Ea]=n,e.current=t}var kv;kv={};var hs={};Object.freeze(hs);var ja=to(hs),Zs=to(!1),Rv=hs;function zl(e,t,n){return n&&Qs(t)?Rv:ja.current}function sx(e,t,n){{var s=e.stateNode;s.__reactInternalMemoizedUnmaskedChildContext=t,s.__reactInternalMemoizedMaskedChildContext=n}}function $l(e,t){{var n=e.type,s=n.contextTypes;if(!s)return hs;var h=e.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===t)return h.__reactInternalMemoizedMaskedChildContext;var C={};for(var M in s)C[M]=t[M];{var B=te(e)||"Unknown";Ms(s,C,"context",B)}return h&&sx(e,t,C),C}}function $h(){return Zs.current}function Qs(e){{var t=e.childContextTypes;return t!=null}}function Wh(e){Lr(Zs,e),Lr(ja,e)}function Tv(e){Lr(Zs,e),Lr(ja,e)}function ax(e,t,n){{if(ja.current!==hs)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Ar(ja,t,e),Ar(Zs,n,e)}}function ox(e,t,n){{var s=e.stateNode,h=t.childContextTypes;if(typeof s.getChildContext!="function"){{var C=te(e)||"Unknown";kv[C]||(kv[C]=!0,y("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",C,C))}return n}var M=s.getChildContext();for(var B in M)if(!(B in h))throw new Error((te(e)||"Unknown")+'.getChildContext(): key "'+B+'" is not defined in childContextTypes.');{var z=te(e)||"Unknown";Ms(h,M,"child context",z)}return Pt({},n,M)}}function Gh(e){{var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||hs;return Rv=ja.current,Ar(ja,n,e),Ar(Zs,Zs.current,e),!0}}function lx(e,t,n){{var s=e.stateNode;if(!s)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(n){var h=ox(e,t,Rv);s.__reactInternalMemoizedMergedChildContext=h,Lr(Zs,e),Lr(ja,e),Ar(ja,h,e),Ar(Zs,n,e)}else Lr(Zs,e),Ar(Zs,n,e)}}function jT(e){{if(!cj(e)||e.tag!==m)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case d:return t.stateNode.context;case m:{var n=t.type;if(Qs(n))return t.stateNode.__reactInternalMemoizedMergedChildContext;break}}t=t.return}while(t!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var no=0,Yh=1,Da=null,Lv=!1,Av=!1;function cx(e){Da===null?Da=[e]:Da.push(e)}function DT(e){Lv=!0,cx(e)}function ux(){Lv&&io()}function io(){if(!Av&&Da!==null){Av=!0;var e=0,t=As();try{var n=!0,s=Da;for(mr(cs);e<s.length;e++){var h=s[e];do h=h(n);while(h!==null)}Da=null,Lv=!1}catch(C){throw Da!==null&&(Da=Da.slice(e+1)),My(ch,io),C}finally{mr(t),Av=!1}}return null}var Wl=[],Gl=0,qh=null,Kh=0,ws=[],xs=0,Oo=null,ka=1,Ra="";function kT(e){return Vo(),(e.flags&Ey)!==Gt}function RT(e){return Vo(),Kh}function TT(){var e=Ra,t=ka,n=t&~LT(t);return n.toString(32)+e}function Po(e,t){Vo(),Wl[Gl++]=Kh,Wl[Gl++]=qh,qh=e,Kh=t}function dx(e,t,n){Vo(),ws[xs++]=ka,ws[xs++]=Ra,ws[xs++]=Oo,Oo=e;var s=ka,h=Ra,C=Xh(s)-1,M=s&~(1<<C),B=n+1,z=Xh(t)+C;if(z>30){var ee=C-C%5,ne=(1<<ee)-1,fe=(M&ne).toString(32),me=M>>ee,De=C-ee,ke=Xh(t)+De,Ie=B<<De,mt=Ie|me,Ut=fe+h;ka=1<<ke|mt,Ra=Ut}else{var Dt=B<<C,kn=Dt|M,Nn=h;ka=1<<z|kn,Ra=Nn}}function Mv(e){Vo();var t=e.return;if(t!==null){var n=1,s=0;Po(e,n),dx(e,n,s)}}function Xh(e){return 32-By(e)}function LT(e){return 1<<Xh(e)-1}function Uv(e){for(;e===qh;)qh=Wl[--Gl],Wl[Gl]=null,Kh=Wl[--Gl],Wl[Gl]=null;for(;e===Oo;)Oo=ws[--xs],ws[xs]=null,Ra=ws[--xs],ws[xs]=null,ka=ws[--xs],ws[xs]=null}function AT(){return Vo(),Oo!==null?{id:ka,overflow:Ra}:null}function MT(e,t){Vo(),ws[xs++]=ka,ws[xs++]=Ra,ws[xs++]=Oo,ka=t.id,Ra=t.overflow,Oo=e}function Vo(){br()||y("Expected to be hydrating. This is a bug in React. Please file an issue.")}var _r=null,Ns=null,Us=!1,Io=!1,ro=null;function UT(){Us&&y("We should not be hydrating here. This is a bug in React. Please file a bug.")}function hx(){Io=!0}function OT(){return Io}function PT(e){var t=e.stateNode.containerInfo;return Ns=tT(t),_r=e,Us=!0,ro=null,Io=!1,!0}function VT(e,t,n){return Ns=nT(t),_r=e,Us=!0,ro=null,Io=!1,n!==null&&MT(e,n),!0}function mx(e,t){switch(e.tag){case d:{hT(e.stateNode.containerInfo,t);break}case x:{var n=(e.mode&jn)!==It;fT(e.type,e.memoizedProps,e.stateNode,t,n);break}case T:{var s=e.memoizedState;s.dehydrated!==null&&mT(s.dehydrated,t);break}}}function fx(e,t){mx(e,t);var n=HA();n.stateNode=t,n.return=e;var s=e.deletions;s===null?(e.deletions=[n],e.flags|=No):s.push(n)}function Ov(e,t){{if(Io)return;switch(e.tag){case d:{var n=e.stateNode.containerInfo;switch(t.tag){case x:var s=t.type;t.pendingProps,pT(n,s);break;case j:var h=t.pendingProps;vT(n,h);break}break}case x:{var C=e.type,M=e.memoizedProps,B=e.stateNode;switch(t.tag){case x:{var z=t.type,ee=t.pendingProps,ne=(e.mode&jn)!==It;bT(C,M,B,z,ee,ne);break}case j:{var fe=t.pendingProps,me=(e.mode&jn)!==It;yT(C,M,B,fe,me);break}}break}case T:{var De=e.memoizedState,ke=De.dehydrated;if(ke!==null)switch(t.tag){case x:var Ie=t.type;t.pendingProps,gT(ke,Ie);break;case j:var mt=t.pendingProps;_T(ke,mt);break}break}default:return}}}function px(e,t){t.flags=t.flags&~wa|zi,Ov(e,t)}function vx(e,t){switch(e.tag){case x:{var n=e.type;e.pendingProps;var s=KR(t,n);return s!==null?(e.stateNode=s,_r=e,Ns=eT(s),!0):!1}case j:{var h=e.pendingProps,C=XR(t,h);return C!==null?(e.stateNode=C,_r=e,Ns=null,!0):!1}case T:{var M=JR(t);if(M!==null){var B={dehydrated:M,treeContext:AT(),retryLane:os};e.memoizedState=B;var z=zA(M);return z.return=e,e.child=z,_r=e,Ns=null,!0}return!1}default:return!1}}function Pv(e){return(e.mode&jn)!==It&&(e.flags&Yn)===Gt}function Vv(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function Iv(e){if(Us){var t=Ns;if(!t){Pv(e)&&(Ov(_r,e),Vv()),px(_r,e),Us=!1,_r=e;return}var n=t;if(!vx(e,t)){Pv(e)&&(Ov(_r,e),Vv()),t=Nu(n);var s=_r;if(!t||!vx(e,t)){px(_r,e),Us=!1,_r=e;return}fx(s,n)}}}function IT(e,t,n){var s=e.stateNode,h=!Io,C=iT(s,e.type,e.memoizedProps,t,n,e,h);return e.updateQueue=C,C!==null}function BT(e){var t=e.stateNode,n=e.memoizedProps,s=rT(t,n,e);if(s){var h=_r;if(h!==null)switch(h.tag){case d:{var C=h.stateNode.containerInfo,M=(h.mode&jn)!==It;uT(C,t,n,M);break}case x:{var B=h.type,z=h.memoizedProps,ee=h.stateNode,ne=(h.mode&jn)!==It;dT(B,z,ee,t,n,ne);break}}}return s}function FT(e){var t=e.memoizedState,n=t!==null?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");sT(n,e)}function HT(e){var t=e.memoizedState,n=t!==null?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return aT(n)}function gx(e){for(var t=e.return;t!==null&&t.tag!==x&&t.tag!==d&&t.tag!==T;)t=t.return;_r=t}function Jh(e){if(e!==_r)return!1;if(!Us)return gx(e),Us=!0,!1;if(e.tag!==d&&(e.tag!==x||cT(e.type)&&!yv(e.type,e.memoizedProps))){var t=Ns;if(t)if(Pv(e))_x(e),Vv();else for(;t;)fx(e,t),t=Nu(t)}return gx(e),e.tag===T?Ns=HT(e):Ns=_r?Nu(e.stateNode):null,!0}function zT(){return Us&&Ns!==null}function _x(e){for(var t=Ns;t;)mx(e,t),t=Nu(t)}function Yl(){_r=null,Ns=null,Us=!1,Io=!1}function bx(){ro!==null&&(hN(ro),ro=null)}function br(){return Us}function Bv(e){ro===null?ro=[e]:ro.push(e)}var $T=l.ReactCurrentBatchConfig,WT=null;function GT(){return $T.transition}var Os={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var YT=function(e){for(var t=null,n=e;n!==null;)n.mode&Li&&(t=n),n=n.return;return t},Bo=function(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")},ju=[],Du=[],ku=[],Ru=[],Tu=[],Lu=[],Fo=new Set;Os.recordUnsafeLifecycleWarnings=function(e,t){Fo.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&ju.push(e),e.mode&Li&&typeof t.UNSAFE_componentWillMount=="function"&&Du.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&ku.push(e),e.mode&Li&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Ru.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&Tu.push(e),e.mode&Li&&typeof t.UNSAFE_componentWillUpdate=="function"&&Lu.push(e))},Os.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;ju.length>0&&(ju.forEach(function(me){e.add(te(me)||"Component"),Fo.add(me.type)}),ju=[]);var t=new Set;Du.length>0&&(Du.forEach(function(me){t.add(te(me)||"Component"),Fo.add(me.type)}),Du=[]);var n=new Set;ku.length>0&&(ku.forEach(function(me){n.add(te(me)||"Component"),Fo.add(me.type)}),ku=[]);var s=new Set;Ru.length>0&&(Ru.forEach(function(me){s.add(te(me)||"Component"),Fo.add(me.type)}),Ru=[]);var h=new Set;Tu.length>0&&(Tu.forEach(function(me){h.add(te(me)||"Component"),Fo.add(me.type)}),Tu=[]);var C=new Set;if(Lu.length>0&&(Lu.forEach(function(me){C.add(te(me)||"Component"),Fo.add(me.type)}),Lu=[]),t.size>0){var M=Bo(t);y(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
92
+
93
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
94
+
95
+ Please update the following components: %s`,M)}if(s.size>0){var B=Bo(s);y(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
96
+
97
+ * Move data fetching code or side effects to componentDidUpdate.
98
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
99
+
100
+ Please update the following components: %s`,B)}if(C.size>0){var z=Bo(C);y(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
101
+
102
+ * Move data fetching code or side effects to componentDidUpdate.
103
+
104
+ Please update the following components: %s`,z)}if(e.size>0){var ee=Bo(e);R(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
105
+
106
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
107
+ * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
108
+
109
+ Please update the following components: %s`,ee)}if(n.size>0){var ne=Bo(n);R(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
110
+
111
+ * Move data fetching code or side effects to componentDidUpdate.
112
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
113
+ * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
114
+
115
+ Please update the following components: %s`,ne)}if(h.size>0){var fe=Bo(h);R(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
116
+
117
+ * Move data fetching code or side effects to componentDidUpdate.
118
+ * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
119
+
120
+ Please update the following components: %s`,fe)}};var Zh=new Map,yx=new Set;Os.recordLegacyContextWarning=function(e,t){var n=YT(e);if(n===null){y("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!yx.has(e.type)){var s=Zh.get(n);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(s===void 0&&(s=[],Zh.set(n,s)),s.push(e))}},Os.flushLegacyContextWarning=function(){Zh.forEach(function(e,t){if(e.length!==0){var n=e[0],s=new Set;e.forEach(function(C){s.add(te(C)||"Component"),yx.add(C.type)});var h=Bo(s);try{Yt(n),y(`Legacy context API has been detected within a strict-mode tree.
121
+
122
+ The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
123
+
124
+ Please update the following components: %s
125
+
126
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,h)}finally{Pn()}}})},Os.discardPendingWarnings=function(){ju=[],Du=[],ku=[],Ru=[],Tu=[],Lu=[],Zh=new Map}}var Fv,Hv,zv,$v,Wv,wx=function(e,t){};Fv=!1,Hv=!1,zv={},$v={},Wv={},wx=function(e,t){if(!(e===null||typeof e!="object")&&!(!e._store||e._store.validated||e.key!=null)){if(typeof e._store!="object")throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var n=te(t)||"Component";$v[n]||($v[n]=!0,y('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function qT(e){return e.prototype&&e.prototype.isReactComponent}function Au(e,t,n){var s=n.ref;if(s!==null&&typeof s!="function"&&typeof s!="object"){if((e.mode&Li||W)&&!(n._owner&&n._self&&n._owner.stateNode!==n._self)&&!(n._owner&&n._owner.tag!==m)&&!(typeof n.type=="function"&&!qT(n.type))&&n._owner){var h=te(e)||"Component";zv[h]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',h,s),zv[h]=!0)}if(n._owner){var C=n._owner,M;if(C){var B=C;if(B.tag!==m)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");M=B.stateNode}if(!M)throw new Error("Missing owner for string ref "+s+". This error is likely caused by a bug in React. Please file an issue.");var z=M;Bt(s,"ref");var ee=""+s;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===ee)return t.ref;var ne=function(fe){var me=z.refs;fe===null?delete me[ee]:me[ee]=fe};return ne._stringRef=ee,ne}else{if(typeof s!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!n._owner)throw new Error("Element ref was specified as a string ("+s+`) but no owner was set. This could happen for one of the following reasons:
127
+ 1. You may be adding a ref to a function component
128
+ 2. You may be adding a ref to a component that was not created inside a component's render method
129
+ 3. You have multiple copies of React loaded
130
+ See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return s}function Qh(e,t){var n=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}function em(e){{var t=te(e)||"Component";if(Wv[t])return;Wv[t]=!0,y("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function xx(e){var t=e._payload,n=e._init;return n(t)}function Nx(e){function t(be,Be){if(e){var ye=be.deletions;ye===null?(be.deletions=[Be],be.flags|=No):ye.push(Be)}}function n(be,Be){if(!e)return null;for(var ye=Be;ye!==null;)t(be,ye),ye=ye.sibling;return null}function s(be,Be){for(var ye=new Map,rt=Be;rt!==null;)rt.key!==null?ye.set(rt.key,rt):ye.set(rt.index,rt),rt=rt.sibling;return ye}function h(be,Be){var ye=Xo(be,Be);return ye.index=0,ye.sibling=null,ye}function C(be,Be,ye){if(be.index=ye,!e)return be.flags|=Ey,Be;var rt=be.alternate;if(rt!==null){var yt=rt.index;return yt<Be?(be.flags|=zi,Be):yt}else return be.flags|=zi,Be}function M(be){return e&&be.alternate===null&&(be.flags|=zi),be}function B(be,Be,ye,rt){if(Be===null||Be.tag!==j){var yt=B_(ye,be.mode,rt);return yt.return=be,yt}else{var pt=h(Be,ye);return pt.return=be,pt}}function z(be,Be,ye,rt){var yt=ye.type;if(yt===di)return ne(be,Be,ye.props.children,rt,ye.key);if(Be!==null&&(Be.elementType===yt||DN(Be,ye)||typeof yt=="object"&&yt!==null&&yt.$$typeof===vt&&xx(yt)===Be.type)){var pt=h(Be,ye.props);return pt.ref=Au(be,Be,ye),pt.return=be,pt._debugSource=ye._source,pt._debugOwner=ye._owner,pt}var qt=I_(ye,be.mode,rt);return qt.ref=Au(be,Be,ye),qt.return=be,qt}function ee(be,Be,ye,rt){if(Be===null||Be.tag!==w||Be.stateNode.containerInfo!==ye.containerInfo||Be.stateNode.implementation!==ye.implementation){var yt=F_(ye,be.mode,rt);return yt.return=be,yt}else{var pt=h(Be,ye.children||[]);return pt.return=be,pt}}function ne(be,Be,ye,rt,yt){if(Be===null||Be.tag!==v){var pt=vo(ye,be.mode,rt,yt);return pt.return=be,pt}else{var qt=h(Be,ye);return qt.return=be,qt}}function fe(be,Be,ye){if(typeof Be=="string"&&Be!==""||typeof Be=="number"){var rt=B_(""+Be,be.mode,ye);return rt.return=be,rt}if(typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case rn:{var yt=I_(Be,be.mode,ye);return yt.ref=Au(be,null,Be),yt.return=be,yt}case un:{var pt=F_(Be,be.mode,ye);return pt.return=be,pt}case vt:{var qt=Be._payload,sn=Be._init;return fe(be,sn(qt),ye)}}if(on(Be)||xi(Be)){var ii=vo(Be,be.mode,ye,null);return ii.return=be,ii}Qh(be,Be)}return typeof Be=="function"&&em(be),null}function me(be,Be,ye,rt){var yt=Be!==null?Be.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return yt!==null?null:B(be,Be,""+ye,rt);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case rn:return ye.key===yt?z(be,Be,ye,rt):null;case un:return ye.key===yt?ee(be,Be,ye,rt):null;case vt:{var pt=ye._payload,qt=ye._init;return me(be,Be,qt(pt),rt)}}if(on(ye)||xi(ye))return yt!==null?null:ne(be,Be,ye,rt,null);Qh(be,ye)}return typeof ye=="function"&&em(be),null}function De(be,Be,ye,rt,yt){if(typeof rt=="string"&&rt!==""||typeof rt=="number"){var pt=be.get(ye)||null;return B(Be,pt,""+rt,yt)}if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case rn:{var qt=be.get(rt.key===null?ye:rt.key)||null;return z(Be,qt,rt,yt)}case un:{var sn=be.get(rt.key===null?ye:rt.key)||null;return ee(Be,sn,rt,yt)}case vt:var ii=rt._payload,Bn=rt._init;return De(be,Be,ye,Bn(ii),yt)}if(on(rt)||xi(rt)){var Ii=be.get(ye)||null;return ne(Be,Ii,rt,yt,null)}Qh(Be,rt)}return typeof rt=="function"&&em(Be),null}function ke(be,Be,ye){{if(typeof be!="object"||be===null)return Be;switch(be.$$typeof){case rn:case un:wx(be,ye);var rt=be.key;if(typeof rt!="string")break;if(Be===null){Be=new Set,Be.add(rt);break}if(!Be.has(rt)){Be.add(rt);break}y("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",rt);break;case vt:var yt=be._payload,pt=be._init;ke(pt(yt),Be,ye);break}}return Be}function Ie(be,Be,ye,rt){for(var yt=null,pt=0;pt<ye.length;pt++){var qt=ye[pt];yt=ke(qt,yt,be)}for(var sn=null,ii=null,Bn=Be,Ii=0,Fn=0,Ai=null;Bn!==null&&Fn<ye.length;Fn++){Bn.index>Fn?(Ai=Bn,Bn=null):Ai=Bn.sibling;var Ur=me(be,Bn,ye[Fn],rt);if(Ur===null){Bn===null&&(Bn=Ai);break}e&&Bn&&Ur.alternate===null&&t(be,Bn),Ii=C(Ur,Ii,Fn),ii===null?sn=Ur:ii.sibling=Ur,ii=Ur,Bn=Ai}if(Fn===ye.length){if(n(be,Bn),br()){var Er=Fn;Po(be,Er)}return sn}if(Bn===null){for(;Fn<ye.length;Fn++){var fs=fe(be,ye[Fn],rt);fs!==null&&(Ii=C(fs,Ii,Fn),ii===null?sn=fs:ii.sibling=fs,ii=fs)}if(br()){var Wr=Fn;Po(be,Wr)}return sn}for(var Gr=s(be,Bn);Fn<ye.length;Fn++){var Or=De(Gr,be,Fn,ye[Fn],rt);Or!==null&&(e&&Or.alternate!==null&&Gr.delete(Or.key===null?Fn:Or.key),Ii=C(Or,Ii,Fn),ii===null?sn=Or:ii.sibling=Or,ii=Or)}if(e&&Gr.forEach(function(hc){return t(be,hc)}),br()){var Pa=Fn;Po(be,Pa)}return sn}function mt(be,Be,ye,rt){var yt=xi(ye);if(typeof yt!="function")throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&ye[Symbol.toStringTag]==="Generator"&&(Hv||y("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Hv=!0),ye.entries===yt&&(Fv||y("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Fv=!0);var pt=yt.call(ye);if(pt)for(var qt=null,sn=pt.next();!sn.done;sn=pt.next()){var ii=sn.value;qt=ke(ii,qt,be)}}var Bn=yt.call(ye);if(Bn==null)throw new Error("An iterable object provided no iterator.");for(var Ii=null,Fn=null,Ai=Be,Ur=0,Er=0,fs=null,Wr=Bn.next();Ai!==null&&!Wr.done;Er++,Wr=Bn.next()){Ai.index>Er?(fs=Ai,Ai=null):fs=Ai.sibling;var Gr=me(be,Ai,Wr.value,rt);if(Gr===null){Ai===null&&(Ai=fs);break}e&&Ai&&Gr.alternate===null&&t(be,Ai),Ur=C(Gr,Ur,Er),Fn===null?Ii=Gr:Fn.sibling=Gr,Fn=Gr,Ai=fs}if(Wr.done){if(n(be,Ai),br()){var Or=Er;Po(be,Or)}return Ii}if(Ai===null){for(;!Wr.done;Er++,Wr=Bn.next()){var Pa=fe(be,Wr.value,rt);Pa!==null&&(Ur=C(Pa,Ur,Er),Fn===null?Ii=Pa:Fn.sibling=Pa,Fn=Pa)}if(br()){var hc=Er;Po(be,hc)}return Ii}for(var dd=s(be,Ai);!Wr.done;Er++,Wr=Bn.next()){var oa=De(dd,be,Er,Wr.value,rt);oa!==null&&(e&&oa.alternate!==null&&dd.delete(oa.key===null?Er:oa.key),Ur=C(oa,Ur,Er),Fn===null?Ii=oa:Fn.sibling=oa,Fn=oa)}if(e&&dd.forEach(function(yM){return t(be,yM)}),br()){var bM=Er;Po(be,bM)}return Ii}function Ut(be,Be,ye,rt){if(Be!==null&&Be.tag===j){n(be,Be.sibling);var yt=h(Be,ye);return yt.return=be,yt}n(be,Be);var pt=B_(ye,be.mode,rt);return pt.return=be,pt}function Dt(be,Be,ye,rt){for(var yt=ye.key,pt=Be;pt!==null;){if(pt.key===yt){var qt=ye.type;if(qt===di){if(pt.tag===v){n(be,pt.sibling);var sn=h(pt,ye.props.children);return sn.return=be,sn._debugSource=ye._source,sn._debugOwner=ye._owner,sn}}else if(pt.elementType===qt||DN(pt,ye)||typeof qt=="object"&&qt!==null&&qt.$$typeof===vt&&xx(qt)===pt.type){n(be,pt.sibling);var ii=h(pt,ye.props);return ii.ref=Au(be,pt,ye),ii.return=be,ii._debugSource=ye._source,ii._debugOwner=ye._owner,ii}n(be,pt);break}else t(be,pt);pt=pt.sibling}if(ye.type===di){var Bn=vo(ye.props.children,be.mode,rt,ye.key);return Bn.return=be,Bn}else{var Ii=I_(ye,be.mode,rt);return Ii.ref=Au(be,Be,ye),Ii.return=be,Ii}}function kn(be,Be,ye,rt){for(var yt=ye.key,pt=Be;pt!==null;){if(pt.key===yt)if(pt.tag===w&&pt.stateNode.containerInfo===ye.containerInfo&&pt.stateNode.implementation===ye.implementation){n(be,pt.sibling);var qt=h(pt,ye.children||[]);return qt.return=be,qt}else{n(be,pt);break}else t(be,pt);pt=pt.sibling}var sn=F_(ye,be.mode,rt);return sn.return=be,sn}function Nn(be,Be,ye,rt){var yt=typeof ye=="object"&&ye!==null&&ye.type===di&&ye.key===null;if(yt&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case rn:return M(Dt(be,Be,ye,rt));case un:return M(kn(be,Be,ye,rt));case vt:var pt=ye._payload,qt=ye._init;return Nn(be,Be,qt(pt),rt)}if(on(ye))return Ie(be,Be,ye,rt);if(xi(ye))return mt(be,Be,ye,rt);Qh(be,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?M(Ut(be,Be,""+ye,rt)):(typeof ye=="function"&&em(be),n(be,Be))}return Nn}var ql=Nx(!0),Sx=Nx(!1);function KT(e,t){if(e!==null&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(t.child!==null){var n=t.child,s=Xo(n,n.pendingProps);for(t.child=s,s.return=t;n.sibling!==null;)n=n.sibling,s=s.sibling=Xo(n,n.pendingProps),s.return=t;s.sibling=null}}function XT(e,t){for(var n=e.child;n!==null;)PA(n,t),n=n.sibling}var Gv=to(null),Yv;Yv={};var tm=null,Kl=null,qv=null,nm=!1;function im(){tm=null,Kl=null,qv=null,nm=!1}function Cx(){nm=!0}function Ex(){nm=!1}function jx(e,t,n){Ar(Gv,t._currentValue,e),t._currentValue=n,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==Yv&&y("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=Yv}function Kv(e,t){var n=Gv.current;Lr(Gv,t),e._currentValue=n}function Xv(e,t,n){for(var s=e;s!==null;){var h=s.alternate;if(Al(s.childLanes,t)?h!==null&&!Al(h.childLanes,t)&&(h.childLanes=ln(h.childLanes,t)):(s.childLanes=ln(s.childLanes,t),h!==null&&(h.childLanes=ln(h.childLanes,t))),s===n)break;s=s.return}s!==n&&y("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function JT(e,t,n){ZT(e,t,n)}function ZT(e,t,n){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var h=void 0,C=s.dependencies;if(C!==null){h=s.child;for(var M=C.firstContext;M!==null;){if(M.context===t){if(s.tag===m){var B=Jc(n),z=Ta(fi,B);z.tag=sm;var ee=s.updateQueue;if(ee!==null){var ne=ee.shared,fe=ne.pending;fe===null?z.next=z:(z.next=fe.next,fe.next=z),ne.pending=z}}s.lanes=ln(s.lanes,n);var me=s.alternate;me!==null&&(me.lanes=ln(me.lanes,n)),Xv(s.return,n,e),C.lanes=ln(C.lanes,n);break}M=M.next}}else if(s.tag===f)h=s.type===e.type?null:s.child;else if(s.tag===U){var De=s.return;if(De===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");De.lanes=ln(De.lanes,n);var ke=De.alternate;ke!==null&&(ke.lanes=ln(ke.lanes,n)),Xv(De,n,e),h=s.sibling}else h=s.child;if(h!==null)h.return=s;else for(h=s;h!==null;){if(h===e){h=null;break}var Ie=h.sibling;if(Ie!==null){Ie.return=h.return,h=Ie;break}h=h.return}s=h}}function Xl(e,t){tm=e,Kl=null,qv=null;var n=e.dependencies;if(n!==null){var s=n.firstContext;s!==null&&(ls(n.lanes,t)&&qu(),n.firstContext=null)}}function $i(e){nm&&y("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=e._currentValue;if(qv!==e){var n={context:e,memoizedValue:t,next:null};if(Kl===null){if(tm===null)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Kl=n,tm.dependencies={lanes:Qe,firstContext:n}}else Kl=Kl.next=n}return t}var Ho=null;function Jv(e){Ho===null?Ho=[e]:Ho.push(e)}function QT(){if(Ho!==null){for(var e=0;e<Ho.length;e++){var t=Ho[e],n=t.interleaved;if(n!==null){t.interleaved=null;var s=n.next,h=t.pending;if(h!==null){var C=h.next;h.next=s,n.next=C}t.pending=n}}Ho=null}}function Dx(e,t,n,s){var h=t.interleaved;return h===null?(n.next=n,Jv(t)):(n.next=h.next,h.next=n),t.interleaved=n,rm(e,s)}function e5(e,t,n,s){var h=t.interleaved;h===null?(n.next=n,Jv(t)):(n.next=h.next,h.next=n),t.interleaved=n}function t5(e,t,n,s){var h=t.interleaved;return h===null?(n.next=n,Jv(t)):(n.next=h.next,h.next=n),t.interleaved=n,rm(e,s)}function Qr(e,t){return rm(e,t)}var n5=rm;function rm(e,t){e.lanes=ln(e.lanes,t);var n=e.alternate;n!==null&&(n.lanes=ln(n.lanes,t)),n===null&&(e.flags&(zi|wa))!==Gt&&SN(e);for(var s=e,h=e.return;h!==null;)h.childLanes=ln(h.childLanes,t),n=h.alternate,n!==null?n.childLanes=ln(n.childLanes,t):(h.flags&(zi|wa))!==Gt&&SN(e),s=h,h=h.return;if(s.tag===d){var C=s.stateNode;return C}else return null}var kx=0,Rx=1,sm=2,Zv=3,am=!1,Qv,om;Qv=!1,om=null;function eg(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:Qe},effects:null};e.updateQueue=t}function Tx(e,t){var n=t.updateQueue,s=e.updateQueue;if(n===s){var h={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects};t.updateQueue=h}}function Ta(e,t){var n={eventTime:e,lane:t,tag:kx,payload:null,callback:null,next:null};return n}function so(e,t,n){var s=e.updateQueue;if(s===null)return null;var h=s.shared;if(om===h&&!Qv&&(y("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),Qv=!0),eA()){var C=h.pending;return C===null?t.next=t:(t.next=C.next,C.next=t),h.pending=t,n5(e,n)}else return t5(e,h,t,n)}function lm(e,t,n){var s=t.updateQueue;if(s!==null){var h=s.shared;if($y(n)){var C=h.lanes;C=Gy(C,e.pendingLanes);var M=ln(C,n);h.lanes=M,Gp(e,M)}}}function tg(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null){var h=s.updateQueue;if(n===h){var C=null,M=null,B=n.firstBaseUpdate;if(B!==null){var z=B;do{var ee={eventTime:z.eventTime,lane:z.lane,tag:z.tag,payload:z.payload,callback:z.callback,next:null};M===null?C=M=ee:(M.next=ee,M=ee),z=z.next}while(z!==null);M===null?C=M=t:(M.next=t,M=t)}else C=M=t;n={baseState:h.baseState,firstBaseUpdate:C,lastBaseUpdate:M,shared:h.shared,effects:h.effects},e.updateQueue=n;return}}var ne=n.lastBaseUpdate;ne===null?n.firstBaseUpdate=t:ne.next=t,n.lastBaseUpdate=t}function i5(e,t,n,s,h,C){switch(n.tag){case Rx:{var M=n.payload;if(typeof M=="function"){Cx();var B=M.call(C,s,h);{if(e.mode&Li){dr(!0);try{M.call(C,s,h)}finally{dr(!1)}}Ex()}return B}return M}case Zv:e.flags=e.flags&~Fr|Yn;case kx:{var z=n.payload,ee;if(typeof z=="function"){Cx(),ee=z.call(C,s,h);{if(e.mode&Li){dr(!0);try{z.call(C,s,h)}finally{dr(!1)}}Ex()}}else ee=z;return ee==null?s:Pt({},s,ee)}case sm:return am=!0,s}return s}function cm(e,t,n,s){var h=e.updateQueue;am=!1,om=h.shared;var C=h.firstBaseUpdate,M=h.lastBaseUpdate,B=h.shared.pending;if(B!==null){h.shared.pending=null;var z=B,ee=z.next;z.next=null,M===null?C=ee:M.next=ee,M=z;var ne=e.alternate;if(ne!==null){var fe=ne.updateQueue,me=fe.lastBaseUpdate;me!==M&&(me===null?fe.firstBaseUpdate=ee:me.next=ee,fe.lastBaseUpdate=z)}}if(C!==null){var De=h.baseState,ke=Qe,Ie=null,mt=null,Ut=null,Dt=C;do{var kn=Dt.lane,Nn=Dt.eventTime;if(Al(s,kn)){if(Ut!==null){var Be={eventTime:Nn,lane:hr,tag:Dt.tag,payload:Dt.payload,callback:Dt.callback,next:null};Ut=Ut.next=Be}De=i5(e,h,Dt,De,t,n);var ye=Dt.callback;if(ye!==null&&Dt.lane!==hr){e.flags|=Cy;var rt=h.effects;rt===null?h.effects=[Dt]:rt.push(Dt)}}else{var be={eventTime:Nn,lane:kn,tag:Dt.tag,payload:Dt.payload,callback:Dt.callback,next:null};Ut===null?(mt=Ut=be,Ie=De):Ut=Ut.next=be,ke=ln(ke,kn)}if(Dt=Dt.next,Dt===null){if(B=h.shared.pending,B===null)break;var yt=B,pt=yt.next;yt.next=null,Dt=pt,h.lastBaseUpdate=yt,h.shared.pending=null}}while(!0);Ut===null&&(Ie=De),h.baseState=Ie,h.firstBaseUpdate=mt,h.lastBaseUpdate=Ut;var qt=h.shared.interleaved;if(qt!==null){var sn=qt;do ke=ln(ke,sn.lane),sn=sn.next;while(sn!==qt)}else C===null&&(h.shared.lanes=Qe);ad(ke),e.lanes=ke,e.memoizedState=De}om=null}function r5(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function Lx(){am=!1}function um(){return am}function Ax(e,t,n){var s=t.effects;if(t.effects=null,s!==null)for(var h=0;h<s.length;h++){var C=s[h],M=C.callback;M!==null&&(C.callback=null,r5(M,n))}}var Mu={},ao=to(Mu),Uu=to(Mu),dm=to(Mu);function hm(e){if(e===Mu)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function Mx(){var e=hm(dm.current);return e}function ng(e,t){Ar(dm,t,e),Ar(Uu,e,e),Ar(ao,Mu,e);var n=wR(t);Lr(ao,e),Ar(ao,n,e)}function Jl(e){Lr(ao,e),Lr(Uu,e),Lr(dm,e)}function ig(){var e=hm(ao.current);return e}function Ux(e){hm(dm.current);var t=hm(ao.current),n=xR(t,e.type);t!==n&&(Ar(Uu,e,e),Ar(ao,n,e))}function rg(e){Uu.current===e&&(Lr(ao,e),Lr(Uu,e))}var s5=0,Ox=1,Px=1,Ou=2,Ps=to(s5);function sg(e,t){return(e&t)!==0}function Zl(e){return e&Ox}function ag(e,t){return e&Ox|t}function a5(e,t){return e|t}function oo(e,t){Ar(Ps,t,e)}function Ql(e){Lr(Ps,e)}function o5(e,t){var n=e.memoizedState;return n!==null?n.dehydrated!==null:(e.memoizedProps,!0)}function mm(e){for(var t=e;t!==null;){if(t.tag===T){var n=t.memoizedState;if(n!==null){var s=n.dehydrated;if(s===null||ex(s)||Sv(s))return t}}else if(t.tag===F&&t.memoizedProps.revealOrder!==void 0){var h=(t.flags&Yn)!==Gt;if(h)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)return null;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 es=0,qi=1,ea=2,Ki=4,yr=8,og=[];function lg(){for(var e=0;e<og.length;e++){var t=og[e];t._workInProgressVersionPrimary=null}og.length=0}function l5(e,t){var n=t._getVersion,s=n(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,s]:e.mutableSourceEagerHydrationData.push(t,s)}var _t=l.ReactCurrentDispatcher,Pu=l.ReactCurrentBatchConfig,cg,ec;cg=new Set;var zo=Qe,ni=null,Xi=null,Ji=null,fm=!1,Vu=!1,Iu=0,c5=0,u5=25,Ye=null,Ss=null,lo=-1,ug=!1;function Xn(){{var e=Ye;Ss===null?Ss=[e]:Ss.push(e)}}function dt(){{var e=Ye;Ss!==null&&(lo++,Ss[lo]!==e&&d5(e))}}function tc(e){e!=null&&!on(e)&&y("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Ye,typeof e)}function d5(e){{var t=te(ni);if(!cg.has(t)&&(cg.add(t),Ss!==null)){for(var n="",s=30,h=0;h<=lo;h++){for(var C=Ss[h],M=h===lo?e:C,B=h+1+". "+C;B.length<s;)B+=" ";B+=M+`
131
+ `,n+=B}y(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
132
+
133
+ Previous render Next render
134
+ ------------------------------------------------------
135
+ %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136
+ `,t,n)}}}function Mr(){throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
137
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
138
+ 2. You might be breaking the Rules of Hooks
139
+ 3. You might have more than one copy of React in the same app
140
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function dg(e,t){if(ug)return!1;if(t===null)return y("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Ye),!1;e.length!==t.length&&y(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
141
+
142
+ Previous: %s
143
+ Incoming: %s`,Ye,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!ds(e[n],t[n]))return!1;return!0}function nc(e,t,n,s,h,C){zo=C,ni=t,Ss=e!==null?e._debugHookTypes:null,lo=-1,ug=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=Qe,e!==null&&e.memoizedState!==null?_t.current=s0:Ss!==null?_t.current=r0:_t.current=i0;var M=n(s,h);if(Vu){var B=0;do{if(Vu=!1,Iu=0,B>=u5)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");B+=1,ug=!1,Xi=null,Ji=null,t.updateQueue=null,lo=-1,_t.current=a0,M=n(s,h)}while(Vu)}_t.current=jm,t._debugHookTypes=Ss;var z=Xi!==null&&Xi.next!==null;if(zo=Qe,ni=null,Xi=null,Ji=null,Ye=null,Ss=null,lo=-1,e!==null&&(e.flags&xa)!==(t.flags&xa)&&(e.mode&jn)!==It&&y("Internal React error: Expected static flag was missing. Please notify the React team."),fm=!1,z)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return M}function ic(){var e=Iu!==0;return Iu=0,e}function Vx(e,t,n){t.updateQueue=e.updateQueue,(t.mode&Xs)!==It?t.flags&=-50333701:t.flags&=-2053,e.lanes=ph(e.lanes,n)}function Ix(){if(_t.current=jm,fm){for(var e=ni.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fm=!1}zo=Qe,ni=null,Xi=null,Ji=null,Ss=null,lo=-1,Ye=null,Zx=!1,Vu=!1,Iu=0}function ta(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ji===null?ni.memoizedState=Ji=e:Ji=Ji.next=e,Ji}function Cs(){var e;if(Xi===null){var t=ni.alternate;t!==null?e=t.memoizedState:e=null}else e=Xi.next;var n;if(Ji===null?n=ni.memoizedState:n=Ji.next,n!==null)Ji=n,n=Ji.next,Xi=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");Xi=e;var s={memoizedState:Xi.memoizedState,baseState:Xi.baseState,baseQueue:Xi.baseQueue,queue:Xi.queue,next:null};Ji===null?ni.memoizedState=Ji=s:Ji=Ji.next=s}return Ji}function Bx(){return{lastEffect:null,stores:null}}function hg(e,t){return typeof t=="function"?t(e):t}function mg(e,t,n){var s=ta(),h;n!==void 0?h=n(t):h=t,s.memoizedState=s.baseState=h;var C={pending:null,interleaved:null,lanes:Qe,dispatch:null,lastRenderedReducer:e,lastRenderedState:h};s.queue=C;var M=C.dispatch=p5.bind(null,ni,C);return[s.memoizedState,M]}function fg(e,t,n){var s=Cs(),h=s.queue;if(h===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");h.lastRenderedReducer=e;var C=Xi,M=C.baseQueue,B=h.pending;if(B!==null){if(M!==null){var z=M.next,ee=B.next;M.next=ee,B.next=z}C.baseQueue!==M&&y("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),C.baseQueue=M=B,h.pending=null}if(M!==null){var ne=M.next,fe=C.baseState,me=null,De=null,ke=null,Ie=ne;do{var mt=Ie.lane;if(Al(zo,mt)){if(ke!==null){var Dt={lane:hr,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null};ke=ke.next=Dt}if(Ie.hasEagerState)fe=Ie.eagerState;else{var kn=Ie.action;fe=e(fe,kn)}}else{var Ut={lane:mt,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null};ke===null?(De=ke=Ut,me=fe):ke=ke.next=Ut,ni.lanes=ln(ni.lanes,mt),ad(mt)}Ie=Ie.next}while(Ie!==null&&Ie!==ne);ke===null?me=fe:ke.next=De,ds(fe,s.memoizedState)||qu(),s.memoizedState=fe,s.baseState=me,s.baseQueue=ke,h.lastRenderedState=fe}var Nn=h.interleaved;if(Nn!==null){var be=Nn;do{var Be=be.lane;ni.lanes=ln(ni.lanes,Be),ad(Be),be=be.next}while(be!==Nn)}else M===null&&(h.lanes=Qe);var ye=h.dispatch;return[s.memoizedState,ye]}function pg(e,t,n){var s=Cs(),h=s.queue;if(h===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");h.lastRenderedReducer=e;var C=h.dispatch,M=h.pending,B=s.memoizedState;if(M!==null){h.pending=null;var z=M.next,ee=z;do{var ne=ee.action;B=e(B,ne),ee=ee.next}while(ee!==z);ds(B,s.memoizedState)||qu(),s.memoizedState=B,s.baseQueue===null&&(s.baseState=B),h.lastRenderedState=B}return[B,C]}function w6(e,t,n){}function x6(e,t,n){}function vg(e,t,n){var s=ni,h=ta(),C,M=br();if(M){if(n===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");C=n(),ec||C!==n()&&(y("The result of getServerSnapshot should be cached to avoid an infinite loop"),ec=!0)}else{if(C=t(),!ec){var B=t();ds(C,B)||(y("The result of getSnapshot should be cached to avoid an infinite loop"),ec=!0)}var z=Gm();if(z===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");fh(z,zo)||Fx(s,t,C)}h.memoizedState=C;var ee={value:C,getSnapshot:t};return h.queue=ee,bm(zx.bind(null,s,ee,e),[e]),s.flags|=Ga,Bu(qi|yr,Hx.bind(null,s,ee,C,t),void 0,null),C}function pm(e,t,n){var s=ni,h=Cs(),C=t();if(!ec){var M=t();ds(C,M)||(y("The result of getSnapshot should be cached to avoid an infinite loop"),ec=!0)}var B=h.memoizedState,z=!ds(B,C);z&&(h.memoizedState=C,qu());var ee=h.queue;if(Hu(zx.bind(null,s,ee,e),[e]),ee.getSnapshot!==t||z||Ji!==null&&Ji.memoizedState.tag&qi){s.flags|=Ga,Bu(qi|yr,Hx.bind(null,s,ee,C,t),void 0,null);var ne=Gm();if(ne===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");fh(ne,zo)||Fx(s,t,C)}return C}function Fx(e,t,n){e.flags|=hp;var s={getSnapshot:t,value:n},h=ni.updateQueue;if(h===null)h=Bx(),ni.updateQueue=h,h.stores=[s];else{var C=h.stores;C===null?h.stores=[s]:C.push(s)}}function Hx(e,t,n,s){t.value=n,t.getSnapshot=s,$x(t)&&Wx(e)}function zx(e,t,n){var s=function(){$x(t)&&Wx(e)};return n(s)}function $x(e){var t=e.getSnapshot,n=e.value;try{var s=t();return!ds(n,s)}catch{return!0}}function Wx(e){var t=Qr(e,en);t!==null&&tr(t,e,en,fi)}function vm(e){var t=ta();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:Qe,dispatch:null,lastRenderedReducer:hg,lastRenderedState:e};t.queue=n;var s=n.dispatch=v5.bind(null,ni,n);return[t.memoizedState,s]}function gg(e){return fg(hg)}function _g(e){return pg(hg)}function Bu(e,t,n,s){var h={tag:e,create:t,destroy:n,deps:s,next:null},C=ni.updateQueue;if(C===null)C=Bx(),ni.updateQueue=C,C.lastEffect=h.next=h;else{var M=C.lastEffect;if(M===null)C.lastEffect=h.next=h;else{var B=M.next;M.next=h,h.next=B,C.lastEffect=h}}return h}function bg(e){var t=ta();{var n={current:e};return t.memoizedState=n,n}}function gm(e){var t=Cs();return t.memoizedState}function Fu(e,t,n,s){var h=ta(),C=s===void 0?null:s;ni.flags|=e,h.memoizedState=Bu(qi|t,n,void 0,C)}function _m(e,t,n,s){var h=Cs(),C=s===void 0?null:s,M=void 0;if(Xi!==null){var B=Xi.memoizedState;if(M=B.destroy,C!==null){var z=B.deps;if(dg(C,z)){h.memoizedState=Bu(t,n,M,C);return}}}ni.flags|=e,h.memoizedState=Bu(qi|t,n,M,C)}function bm(e,t){return(ni.mode&Xs)!==It?Fu(vp|Ga|pp,yr,e,t):Fu(Ga|pp,yr,e,t)}function Hu(e,t){return _m(Ga,yr,e,t)}function yg(e,t){return Fu(Gn,ea,e,t)}function ym(e,t){return _m(Gn,ea,e,t)}function wg(e,t){var n=Gn;return n|=Eo,(ni.mode&Xs)!==It&&(n|=Ya),Fu(n,Ki,e,t)}function wm(e,t){return _m(Gn,Ki,e,t)}function Gx(e,t){if(typeof t=="function"){var n=t,s=e();return n(s),function(){n(null)}}else if(t!=null){var h=t;h.hasOwnProperty("current")||y("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(h).join(", ")+"}");var C=e();return h.current=C,function(){h.current=null}}}function xg(e,t,n){typeof t!="function"&&y("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var s=n!=null?n.concat([e]):null,h=Gn;return h|=Eo,(ni.mode&Xs)!==It&&(h|=Ya),Fu(h,Ki,Gx.bind(null,t,e),s)}function xm(e,t,n){typeof t!="function"&&y("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var s=n!=null?n.concat([e]):null;return _m(Gn,Ki,Gx.bind(null,t,e),s)}function h5(e,t){}var Nm=h5;function Ng(e,t){var n=ta(),s=t===void 0?null:t;return n.memoizedState=[e,s],e}function Sm(e,t){var n=Cs(),s=t===void 0?null:t,h=n.memoizedState;if(h!==null&&s!==null){var C=h[1];if(dg(s,C))return h[0]}return n.memoizedState=[e,s],e}function Sg(e,t){var n=ta(),s=t===void 0?null:t,h=e();return n.memoizedState=[h,s],h}function Cm(e,t){var n=Cs(),s=t===void 0?null:t,h=n.memoizedState;if(h!==null&&s!==null){var C=h[1];if(dg(s,C))return h[0]}var M=e();return n.memoizedState=[M,s],M}function Cg(e){var t=ta();return t.memoizedState=e,e}function Yx(e){var t=Cs(),n=Xi,s=n.memoizedState;return Kx(t,s,e)}function qx(e){var t=Cs();if(Xi===null)return t.memoizedState=e,e;var n=Xi.memoizedState;return Kx(t,n,e)}function Kx(e,t,n){var s=!Jj(zo);if(s){if(!ds(n,t)){var h=Wy();ni.lanes=ln(ni.lanes,h),ad(h),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,qu()),e.memoizedState=n,n}function m5(e,t,n){var s=As();mr(aD(s,Sa)),e(!0);var h=Pu.transition;Pu.transition={};var C=Pu.transition;Pu.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(mr(s),Pu.transition=h,h===null&&C._updatedFibers){var M=C._updatedFibers.size;M>10&&R("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),C._updatedFibers.clear()}}}function Eg(){var e=vm(!1),t=e[0],n=e[1],s=m5.bind(null,n),h=ta();return h.memoizedState=s,[t,s]}function Xx(){var e=gg(),t=e[0],n=Cs(),s=n.memoizedState;return[t,s]}function Jx(){var e=_g(),t=e[0],n=Cs(),s=n.memoizedState;return[t,s]}var Zx=!1;function f5(){return Zx}function jg(){var e=ta(),t=Gm(),n=t.identifierPrefix,s;if(br()){var h=TT();s=":"+n+"R"+h;var C=Iu++;C>0&&(s+="H"+C.toString(32)),s+=":"}else{var M=c5++;s=":"+n+"r"+M.toString(32)+":"}return e.memoizedState=s,s}function Em(){var e=Cs(),t=e.memoizedState;return t}function p5(e,t,n){typeof arguments[3]=="function"&&y("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var s=fo(e),h={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qx(e))e0(t,h);else{var C=Dx(e,t,h,s);if(C!==null){var M=$r();tr(C,e,s,M),t0(C,t,s)}}n0(e,s)}function v5(e,t,n){typeof arguments[3]=="function"&&y("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var s=fo(e),h={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qx(e))e0(t,h);else{var C=e.alternate;if(e.lanes===Qe&&(C===null||C.lanes===Qe)){var M=t.lastRenderedReducer;if(M!==null){var B;B=_t.current,_t.current=Vs;try{var z=t.lastRenderedState,ee=M(z,n);if(h.hasEagerState=!0,h.eagerState=ee,ds(ee,z)){e5(e,t,h,s);return}}catch{}finally{_t.current=B}}}var ne=Dx(e,t,h,s);if(ne!==null){var fe=$r();tr(ne,e,s,fe),t0(ne,t,s)}}n0(e,s)}function Qx(e){var t=e.alternate;return e===ni||t!==null&&t===ni}function e0(e,t){Vu=fm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function t0(e,t,n){if($y(n)){var s=t.lanes;s=Gy(s,e.pendingLanes);var h=ln(s,n);t.lanes=h,Gp(e,h)}}function n0(e,t,n){wp(e,t)}var jm={readContext:$i,useCallback:Mr,useContext:Mr,useEffect:Mr,useImperativeHandle:Mr,useInsertionEffect:Mr,useLayoutEffect:Mr,useMemo:Mr,useReducer:Mr,useRef:Mr,useState:Mr,useDebugValue:Mr,useDeferredValue:Mr,useTransition:Mr,useMutableSource:Mr,useSyncExternalStore:Mr,useId:Mr,unstable_isNewReconciler:X},i0=null,r0=null,s0=null,a0=null,na=null,Vs=null,Dm=null;{var Dg=function(){y("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},tn=function(){y("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};i0={readContext:function(e){return $i(e)},useCallback:function(e,t){return Ye="useCallback",Xn(),tc(t),Ng(e,t)},useContext:function(e){return Ye="useContext",Xn(),$i(e)},useEffect:function(e,t){return Ye="useEffect",Xn(),tc(t),bm(e,t)},useImperativeHandle:function(e,t,n){return Ye="useImperativeHandle",Xn(),tc(n),xg(e,t,n)},useInsertionEffect:function(e,t){return Ye="useInsertionEffect",Xn(),tc(t),yg(e,t)},useLayoutEffect:function(e,t){return Ye="useLayoutEffect",Xn(),tc(t),wg(e,t)},useMemo:function(e,t){Ye="useMemo",Xn(),tc(t);var n=_t.current;_t.current=na;try{return Sg(e,t)}finally{_t.current=n}},useReducer:function(e,t,n){Ye="useReducer",Xn();var s=_t.current;_t.current=na;try{return mg(e,t,n)}finally{_t.current=s}},useRef:function(e){return Ye="useRef",Xn(),bg(e)},useState:function(e){Ye="useState",Xn();var t=_t.current;_t.current=na;try{return vm(e)}finally{_t.current=t}},useDebugValue:function(e,t){return Ye="useDebugValue",Xn(),void 0},useDeferredValue:function(e){return Ye="useDeferredValue",Xn(),Cg(e)},useTransition:function(){return Ye="useTransition",Xn(),Eg()},useMutableSource:function(e,t,n){return Ye="useMutableSource",Xn(),void 0},useSyncExternalStore:function(e,t,n){return Ye="useSyncExternalStore",Xn(),vg(e,t,n)},useId:function(){return Ye="useId",Xn(),jg()},unstable_isNewReconciler:X},r0={readContext:function(e){return $i(e)},useCallback:function(e,t){return Ye="useCallback",dt(),Ng(e,t)},useContext:function(e){return Ye="useContext",dt(),$i(e)},useEffect:function(e,t){return Ye="useEffect",dt(),bm(e,t)},useImperativeHandle:function(e,t,n){return Ye="useImperativeHandle",dt(),xg(e,t,n)},useInsertionEffect:function(e,t){return Ye="useInsertionEffect",dt(),yg(e,t)},useLayoutEffect:function(e,t){return Ye="useLayoutEffect",dt(),wg(e,t)},useMemo:function(e,t){Ye="useMemo",dt();var n=_t.current;_t.current=na;try{return Sg(e,t)}finally{_t.current=n}},useReducer:function(e,t,n){Ye="useReducer",dt();var s=_t.current;_t.current=na;try{return mg(e,t,n)}finally{_t.current=s}},useRef:function(e){return Ye="useRef",dt(),bg(e)},useState:function(e){Ye="useState",dt();var t=_t.current;_t.current=na;try{return vm(e)}finally{_t.current=t}},useDebugValue:function(e,t){return Ye="useDebugValue",dt(),void 0},useDeferredValue:function(e){return Ye="useDeferredValue",dt(),Cg(e)},useTransition:function(){return Ye="useTransition",dt(),Eg()},useMutableSource:function(e,t,n){return Ye="useMutableSource",dt(),void 0},useSyncExternalStore:function(e,t,n){return Ye="useSyncExternalStore",dt(),vg(e,t,n)},useId:function(){return Ye="useId",dt(),jg()},unstable_isNewReconciler:X},s0={readContext:function(e){return $i(e)},useCallback:function(e,t){return Ye="useCallback",dt(),Sm(e,t)},useContext:function(e){return Ye="useContext",dt(),$i(e)},useEffect:function(e,t){return Ye="useEffect",dt(),Hu(e,t)},useImperativeHandle:function(e,t,n){return Ye="useImperativeHandle",dt(),xm(e,t,n)},useInsertionEffect:function(e,t){return Ye="useInsertionEffect",dt(),ym(e,t)},useLayoutEffect:function(e,t){return Ye="useLayoutEffect",dt(),wm(e,t)},useMemo:function(e,t){Ye="useMemo",dt();var n=_t.current;_t.current=Vs;try{return Cm(e,t)}finally{_t.current=n}},useReducer:function(e,t,n){Ye="useReducer",dt();var s=_t.current;_t.current=Vs;try{return fg(e,t,n)}finally{_t.current=s}},useRef:function(e){return Ye="useRef",dt(),gm()},useState:function(e){Ye="useState",dt();var t=_t.current;_t.current=Vs;try{return gg(e)}finally{_t.current=t}},useDebugValue:function(e,t){return Ye="useDebugValue",dt(),Nm()},useDeferredValue:function(e){return Ye="useDeferredValue",dt(),Yx(e)},useTransition:function(){return Ye="useTransition",dt(),Xx()},useMutableSource:function(e,t,n){return Ye="useMutableSource",dt(),void 0},useSyncExternalStore:function(e,t,n){return Ye="useSyncExternalStore",dt(),pm(e,t)},useId:function(){return Ye="useId",dt(),Em()},unstable_isNewReconciler:X},a0={readContext:function(e){return $i(e)},useCallback:function(e,t){return Ye="useCallback",dt(),Sm(e,t)},useContext:function(e){return Ye="useContext",dt(),$i(e)},useEffect:function(e,t){return Ye="useEffect",dt(),Hu(e,t)},useImperativeHandle:function(e,t,n){return Ye="useImperativeHandle",dt(),xm(e,t,n)},useInsertionEffect:function(e,t){return Ye="useInsertionEffect",dt(),ym(e,t)},useLayoutEffect:function(e,t){return Ye="useLayoutEffect",dt(),wm(e,t)},useMemo:function(e,t){Ye="useMemo",dt();var n=_t.current;_t.current=Dm;try{return Cm(e,t)}finally{_t.current=n}},useReducer:function(e,t,n){Ye="useReducer",dt();var s=_t.current;_t.current=Dm;try{return pg(e,t,n)}finally{_t.current=s}},useRef:function(e){return Ye="useRef",dt(),gm()},useState:function(e){Ye="useState",dt();var t=_t.current;_t.current=Dm;try{return _g(e)}finally{_t.current=t}},useDebugValue:function(e,t){return Ye="useDebugValue",dt(),Nm()},useDeferredValue:function(e){return Ye="useDeferredValue",dt(),qx(e)},useTransition:function(){return Ye="useTransition",dt(),Jx()},useMutableSource:function(e,t,n){return Ye="useMutableSource",dt(),void 0},useSyncExternalStore:function(e,t,n){return Ye="useSyncExternalStore",dt(),pm(e,t)},useId:function(){return Ye="useId",dt(),Em()},unstable_isNewReconciler:X},na={readContext:function(e){return Dg(),$i(e)},useCallback:function(e,t){return Ye="useCallback",tn(),Xn(),Ng(e,t)},useContext:function(e){return Ye="useContext",tn(),Xn(),$i(e)},useEffect:function(e,t){return Ye="useEffect",tn(),Xn(),bm(e,t)},useImperativeHandle:function(e,t,n){return Ye="useImperativeHandle",tn(),Xn(),xg(e,t,n)},useInsertionEffect:function(e,t){return Ye="useInsertionEffect",tn(),Xn(),yg(e,t)},useLayoutEffect:function(e,t){return Ye="useLayoutEffect",tn(),Xn(),wg(e,t)},useMemo:function(e,t){Ye="useMemo",tn(),Xn();var n=_t.current;_t.current=na;try{return Sg(e,t)}finally{_t.current=n}},useReducer:function(e,t,n){Ye="useReducer",tn(),Xn();var s=_t.current;_t.current=na;try{return mg(e,t,n)}finally{_t.current=s}},useRef:function(e){return Ye="useRef",tn(),Xn(),bg(e)},useState:function(e){Ye="useState",tn(),Xn();var t=_t.current;_t.current=na;try{return vm(e)}finally{_t.current=t}},useDebugValue:function(e,t){return Ye="useDebugValue",tn(),Xn(),void 0},useDeferredValue:function(e){return Ye="useDeferredValue",tn(),Xn(),Cg(e)},useTransition:function(){return Ye="useTransition",tn(),Xn(),Eg()},useMutableSource:function(e,t,n){return Ye="useMutableSource",tn(),Xn(),void 0},useSyncExternalStore:function(e,t,n){return Ye="useSyncExternalStore",tn(),Xn(),vg(e,t,n)},useId:function(){return Ye="useId",tn(),Xn(),jg()},unstable_isNewReconciler:X},Vs={readContext:function(e){return Dg(),$i(e)},useCallback:function(e,t){return Ye="useCallback",tn(),dt(),Sm(e,t)},useContext:function(e){return Ye="useContext",tn(),dt(),$i(e)},useEffect:function(e,t){return Ye="useEffect",tn(),dt(),Hu(e,t)},useImperativeHandle:function(e,t,n){return Ye="useImperativeHandle",tn(),dt(),xm(e,t,n)},useInsertionEffect:function(e,t){return Ye="useInsertionEffect",tn(),dt(),ym(e,t)},useLayoutEffect:function(e,t){return Ye="useLayoutEffect",tn(),dt(),wm(e,t)},useMemo:function(e,t){Ye="useMemo",tn(),dt();var n=_t.current;_t.current=Vs;try{return Cm(e,t)}finally{_t.current=n}},useReducer:function(e,t,n){Ye="useReducer",tn(),dt();var s=_t.current;_t.current=Vs;try{return fg(e,t,n)}finally{_t.current=s}},useRef:function(e){return Ye="useRef",tn(),dt(),gm()},useState:function(e){Ye="useState",tn(),dt();var t=_t.current;_t.current=Vs;try{return gg(e)}finally{_t.current=t}},useDebugValue:function(e,t){return Ye="useDebugValue",tn(),dt(),Nm()},useDeferredValue:function(e){return Ye="useDeferredValue",tn(),dt(),Yx(e)},useTransition:function(){return Ye="useTransition",tn(),dt(),Xx()},useMutableSource:function(e,t,n){return Ye="useMutableSource",tn(),dt(),void 0},useSyncExternalStore:function(e,t,n){return Ye="useSyncExternalStore",tn(),dt(),pm(e,t)},useId:function(){return Ye="useId",tn(),dt(),Em()},unstable_isNewReconciler:X},Dm={readContext:function(e){return Dg(),$i(e)},useCallback:function(e,t){return Ye="useCallback",tn(),dt(),Sm(e,t)},useContext:function(e){return Ye="useContext",tn(),dt(),$i(e)},useEffect:function(e,t){return Ye="useEffect",tn(),dt(),Hu(e,t)},useImperativeHandle:function(e,t,n){return Ye="useImperativeHandle",tn(),dt(),xm(e,t,n)},useInsertionEffect:function(e,t){return Ye="useInsertionEffect",tn(),dt(),ym(e,t)},useLayoutEffect:function(e,t){return Ye="useLayoutEffect",tn(),dt(),wm(e,t)},useMemo:function(e,t){Ye="useMemo",tn(),dt();var n=_t.current;_t.current=Vs;try{return Cm(e,t)}finally{_t.current=n}},useReducer:function(e,t,n){Ye="useReducer",tn(),dt();var s=_t.current;_t.current=Vs;try{return pg(e,t,n)}finally{_t.current=s}},useRef:function(e){return Ye="useRef",tn(),dt(),gm()},useState:function(e){Ye="useState",tn(),dt();var t=_t.current;_t.current=Vs;try{return _g(e)}finally{_t.current=t}},useDebugValue:function(e,t){return Ye="useDebugValue",tn(),dt(),Nm()},useDeferredValue:function(e){return Ye="useDeferredValue",tn(),dt(),qx(e)},useTransition:function(){return Ye="useTransition",tn(),dt(),Jx()},useMutableSource:function(e,t,n){return Ye="useMutableSource",tn(),dt(),void 0},useSyncExternalStore:function(e,t,n){return Ye="useSyncExternalStore",tn(),dt(),pm(e,t)},useId:function(){return Ye="useId",tn(),dt(),Em()},unstable_isNewReconciler:X}}var co=r.unstable_now,o0=0,km=-1,zu=-1,Rm=-1,kg=!1,Tm=!1;function l0(){return kg}function g5(){Tm=!0}function _5(){kg=!1,Tm=!1}function b5(){kg=Tm,Tm=!1}function c0(){return o0}function u0(){o0=co()}function Rg(e){zu=co(),e.actualStartTime<0&&(e.actualStartTime=co())}function d0(e){zu=-1}function Lm(e,t){if(zu>=0){var n=co()-zu;e.actualDuration+=n,t&&(e.selfBaseDuration=n),zu=-1}}function ia(e){if(km>=0){var t=co()-km;km=-1;for(var n=e.return;n!==null;){switch(n.tag){case d:var s=n.stateNode;s.effectDuration+=t;return;case E:var h=n.stateNode;h.effectDuration+=t;return}n=n.return}}}function Tg(e){if(Rm>=0){var t=co()-Rm;Rm=-1;for(var n=e.return;n!==null;){switch(n.tag){case d:var s=n.stateNode;s!==null&&(s.passiveEffectDuration+=t);return;case E:var h=n.stateNode;h!==null&&(h.passiveEffectDuration+=t);return}n=n.return}}}function ra(){km=co()}function Lg(){Rm=co()}function Ag(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Is(e,t){if(e&&e.defaultProps){var n=Pt({},t),s=e.defaultProps;for(var h in s)n[h]===void 0&&(n[h]=s[h]);return n}return t}var Mg={},Ug,Og,Pg,Vg,Ig,h0,Am,Bg,Fg,Hg,$u;{Ug=new Set,Og=new Set,Pg=new Set,Vg=new Set,Bg=new Set,Ig=new Set,Fg=new Set,Hg=new Set,$u=new Set;var m0=new Set;Am=function(e,t){if(!(e===null||typeof e=="function")){var n=t+"_"+e;m0.has(n)||(m0.add(n),y("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},h0=function(e,t){if(t===void 0){var n=dn(e)||"Component";Ig.has(n)||(Ig.add(n),y("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(Mg,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(Mg)}function zg(e,t,n,s){var h=e.memoizedState,C=n(s,h);{if(e.mode&Li){dr(!0);try{C=n(s,h)}finally{dr(!1)}}h0(t,C)}var M=C==null?h:Pt({},h,C);if(e.memoizedState=M,e.lanes===Qe){var B=e.updateQueue;B.baseState=M}}var $g={isMounted:uj,enqueueSetState:function(e,t,n){var s=Sl(e),h=$r(),C=fo(s),M=Ta(h,C);M.payload=t,n!=null&&(Am(n,"setState"),M.callback=n);var B=so(s,M,C);B!==null&&(tr(B,s,C,h),lm(B,s,C)),wp(s,C)},enqueueReplaceState:function(e,t,n){var s=Sl(e),h=$r(),C=fo(s),M=Ta(h,C);M.tag=Rx,M.payload=t,n!=null&&(Am(n,"replaceState"),M.callback=n);var B=so(s,M,C);B!==null&&(tr(B,s,C,h),lm(B,s,C)),wp(s,C)},enqueueForceUpdate:function(e,t){var n=Sl(e),s=$r(),h=fo(n),C=Ta(s,h);C.tag=sm,t!=null&&(Am(t,"forceUpdate"),C.callback=t);var M=so(n,C,h);M!==null&&(tr(M,n,h,s),lm(M,n,h)),Fj(n,h)}};function f0(e,t,n,s,h,C,M){var B=e.stateNode;if(typeof B.shouldComponentUpdate=="function"){var z=B.shouldComponentUpdate(s,C,M);{if(e.mode&Li){dr(!0);try{z=B.shouldComponentUpdate(s,C,M)}finally{dr(!1)}}z===void 0&&y("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",dn(t)||"Component")}return z}return t.prototype&&t.prototype.isPureReactComponent?!hu(n,s)||!hu(h,C):!0}function y5(e,t,n){var s=e.stateNode;{var h=dn(t)||"Component",C=s.render;C||(t.prototype&&typeof t.prototype.render=="function"?y("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",h):y("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",h)),s.getInitialState&&!s.getInitialState.isReactClassApproved&&!s.state&&y("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",h),s.getDefaultProps&&!s.getDefaultProps.isReactClassApproved&&y("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",h),s.propTypes&&y("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",h),s.contextType&&y("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",h),t.childContextTypes&&!$u.has(t)&&(e.mode&Li)===It&&($u.add(t),y(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
144
+
145
+ .Learn more about this warning here: https://reactjs.org/link/legacy-context`,h)),t.contextTypes&&!$u.has(t)&&(e.mode&Li)===It&&($u.add(t),y(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
146
+
147
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,h)),s.contextTypes&&y("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",h),t.contextType&&t.contextTypes&&!Fg.has(t)&&(Fg.add(t),y("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",h)),typeof s.componentShouldUpdate=="function"&&y("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",h),t.prototype&&t.prototype.isPureReactComponent&&typeof s.shouldComponentUpdate<"u"&&y("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",dn(t)||"A pure component"),typeof s.componentDidUnmount=="function"&&y("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",h),typeof s.componentDidReceiveProps=="function"&&y("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",h),typeof s.componentWillRecieveProps=="function"&&y("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",h),typeof s.UNSAFE_componentWillRecieveProps=="function"&&y("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",h);var M=s.props!==n;s.props!==void 0&&M&&y("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",h,h),s.defaultProps&&y("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",h,h),typeof s.getSnapshotBeforeUpdate=="function"&&typeof s.componentDidUpdate!="function"&&!Pg.has(t)&&(Pg.add(t),y("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",dn(t))),typeof s.getDerivedStateFromProps=="function"&&y("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",h),typeof s.getDerivedStateFromError=="function"&&y("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",h),typeof t.getSnapshotBeforeUpdate=="function"&&y("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",h);var B=s.state;B&&(typeof B!="object"||on(B))&&y("%s.state: must be set to an object or null",h),typeof s.getChildContext=="function"&&typeof t.childContextTypes!="object"&&y("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",h)}}function p0(e,t){t.updater=$g,e.stateNode=t,aj(t,e),t._reactInternalInstance=Mg}function v0(e,t,n){var s=!1,h=hs,C=hs,M=t.contextType;if("contextType"in t){var B=M===null||M!==void 0&&M.$$typeof===st&&M._context===void 0;if(!B&&!Hg.has(t)){Hg.add(t);var z="";M===void 0?z=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof M!="object"?z=" However, it is set to a "+typeof M+".":M.$$typeof===Fe?z=" Did you accidentally pass the Context.Provider instead?":M._context!==void 0?z=" Did you accidentally pass the Context.Consumer instead?":z=" However, it is set to an object with keys {"+Object.keys(M).join(", ")+"}.",y("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",dn(t)||"Component",z)}}if(typeof M=="object"&&M!==null)C=$i(M);else{h=zl(e,t,!0);var ee=t.contextTypes;s=ee!=null,C=s?$l(e,h):hs}var ne=new t(n,C);if(e.mode&Li){dr(!0);try{ne=new t(n,C)}finally{dr(!1)}}var fe=e.memoizedState=ne.state!==null&&ne.state!==void 0?ne.state:null;p0(e,ne);{if(typeof t.getDerivedStateFromProps=="function"&&fe===null){var me=dn(t)||"Component";Og.has(me)||(Og.add(me),y("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",me,ne.state===null?"null":"undefined",me))}if(typeof t.getDerivedStateFromProps=="function"||typeof ne.getSnapshotBeforeUpdate=="function"){var De=null,ke=null,Ie=null;if(typeof ne.componentWillMount=="function"&&ne.componentWillMount.__suppressDeprecationWarning!==!0?De="componentWillMount":typeof ne.UNSAFE_componentWillMount=="function"&&(De="UNSAFE_componentWillMount"),typeof ne.componentWillReceiveProps=="function"&&ne.componentWillReceiveProps.__suppressDeprecationWarning!==!0?ke="componentWillReceiveProps":typeof ne.UNSAFE_componentWillReceiveProps=="function"&&(ke="UNSAFE_componentWillReceiveProps"),typeof ne.componentWillUpdate=="function"&&ne.componentWillUpdate.__suppressDeprecationWarning!==!0?Ie="componentWillUpdate":typeof ne.UNSAFE_componentWillUpdate=="function"&&(Ie="UNSAFE_componentWillUpdate"),De!==null||ke!==null||Ie!==null){var mt=dn(t)||"Component",Ut=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Vg.has(mt)||(Vg.add(mt),y(`Unsafe legacy lifecycles will not be called for components using new component APIs.
148
+
149
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
150
+
151
+ The above lifecycles should be removed. Learn more about this warning here:
152
+ https://reactjs.org/link/unsafe-component-lifecycles`,mt,Ut,De!==null?`
153
+ `+De:"",ke!==null?`
154
+ `+ke:"",Ie!==null?`
155
+ `+Ie:""))}}}return s&&sx(e,h,C),ne}function w5(e,t){var n=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),n!==t.state&&(y("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",te(e)||"Component"),$g.enqueueReplaceState(t,t.state,null))}function g0(e,t,n,s){var h=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==h){{var C=te(e)||"Component";Ug.has(C)||(Ug.add(C),y("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",C))}$g.enqueueReplaceState(t,t.state,null)}}function Wg(e,t,n,s){y5(e,t,n);var h=e.stateNode;h.props=n,h.state=e.memoizedState,h.refs={},eg(e);var C=t.contextType;if(typeof C=="object"&&C!==null)h.context=$i(C);else{var M=zl(e,t,!0);h.context=$l(e,M)}{if(h.state===n){var B=dn(t)||"Component";Bg.has(B)||(Bg.add(B),y("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",B))}e.mode&Li&&Os.recordLegacyContextWarning(e,h),Os.recordUnsafeLifecycleWarnings(e,h)}h.state=e.memoizedState;var z=t.getDerivedStateFromProps;if(typeof z=="function"&&(zg(e,t,z,n),h.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof h.getSnapshotBeforeUpdate!="function"&&(typeof h.UNSAFE_componentWillMount=="function"||typeof h.componentWillMount=="function")&&(w5(e,h),cm(e,n,h,s),h.state=e.memoizedState),typeof h.componentDidMount=="function"){var ee=Gn;ee|=Eo,(e.mode&Xs)!==It&&(ee|=Ya),e.flags|=ee}}function x5(e,t,n,s){var h=e.stateNode,C=e.memoizedProps;h.props=C;var M=h.context,B=t.contextType,z=hs;if(typeof B=="object"&&B!==null)z=$i(B);else{var ee=zl(e,t,!0);z=$l(e,ee)}var ne=t.getDerivedStateFromProps,fe=typeof ne=="function"||typeof h.getSnapshotBeforeUpdate=="function";!fe&&(typeof h.UNSAFE_componentWillReceiveProps=="function"||typeof h.componentWillReceiveProps=="function")&&(C!==n||M!==z)&&g0(e,h,n,z),Lx();var me=e.memoizedState,De=h.state=me;if(cm(e,n,h,s),De=e.memoizedState,C===n&&me===De&&!$h()&&!um()){if(typeof h.componentDidMount=="function"){var ke=Gn;ke|=Eo,(e.mode&Xs)!==It&&(ke|=Ya),e.flags|=ke}return!1}typeof ne=="function"&&(zg(e,t,ne,n),De=e.memoizedState);var Ie=um()||f0(e,t,C,n,me,De,z);if(Ie){if(!fe&&(typeof h.UNSAFE_componentWillMount=="function"||typeof h.componentWillMount=="function")&&(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"){var mt=Gn;mt|=Eo,(e.mode&Xs)!==It&&(mt|=Ya),e.flags|=mt}}else{if(typeof h.componentDidMount=="function"){var Ut=Gn;Ut|=Eo,(e.mode&Xs)!==It&&(Ut|=Ya),e.flags|=Ut}e.memoizedProps=n,e.memoizedState=De}return h.props=n,h.state=De,h.context=z,Ie}function N5(e,t,n,s,h){var C=t.stateNode;Tx(e,t);var M=t.memoizedProps,B=t.type===t.elementType?M:Is(t.type,M);C.props=B;var z=t.pendingProps,ee=C.context,ne=n.contextType,fe=hs;if(typeof ne=="object"&&ne!==null)fe=$i(ne);else{var me=zl(t,n,!0);fe=$l(t,me)}var De=n.getDerivedStateFromProps,ke=typeof De=="function"||typeof C.getSnapshotBeforeUpdate=="function";!ke&&(typeof C.UNSAFE_componentWillReceiveProps=="function"||typeof C.componentWillReceiveProps=="function")&&(M!==z||ee!==fe)&&g0(t,C,s,fe),Lx();var Ie=t.memoizedState,mt=C.state=Ie;if(cm(t,s,C,h),mt=t.memoizedState,M===z&&Ie===mt&&!$h()&&!um()&&!V)return typeof C.componentDidUpdate=="function"&&(M!==e.memoizedProps||Ie!==e.memoizedState)&&(t.flags|=Gn),typeof C.getSnapshotBeforeUpdate=="function"&&(M!==e.memoizedProps||Ie!==e.memoizedState)&&(t.flags|=El),!1;typeof De=="function"&&(zg(t,n,De,s),mt=t.memoizedState);var Ut=um()||f0(t,n,B,s,Ie,mt,fe)||V;return Ut?(!ke&&(typeof C.UNSAFE_componentWillUpdate=="function"||typeof C.componentWillUpdate=="function")&&(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(s,mt,fe),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(s,mt,fe)),typeof C.componentDidUpdate=="function"&&(t.flags|=Gn),typeof C.getSnapshotBeforeUpdate=="function"&&(t.flags|=El)):(typeof C.componentDidUpdate=="function"&&(M!==e.memoizedProps||Ie!==e.memoizedState)&&(t.flags|=Gn),typeof C.getSnapshotBeforeUpdate=="function"&&(M!==e.memoizedProps||Ie!==e.memoizedState)&&(t.flags|=El),t.memoizedProps=s,t.memoizedState=mt),C.props=s,C.state=mt,C.context=fe,Ut}function $o(e,t){return{value:e,source:t,stack:Bi(t),digest:null}}function Gg(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function S5(e,t){return!0}function Yg(e,t){try{var n=S5(e,t);if(n===!1)return;var s=t.value,h=t.source,C=t.stack,M=C!==null?C:"";if(s!=null&&s._suppressLogging){if(e.tag===m)return;console.error(s)}var B=h?te(h):null,z=B?"The above error occurred in the <"+B+"> component:":"The above error occurred in one of your React components:",ee;if(e.tag===d)ee=`Consider adding an error boundary to your tree to customize error handling behavior.
156
+ Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var ne=te(e)||"Anonymous";ee="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+ne+".")}var fe=z+`
157
+ `+M+`
158
+
159
+ `+(""+ee);console.error(fe)}catch(me){setTimeout(function(){throw me})}}var C5=typeof WeakMap=="function"?WeakMap:Map;function _0(e,t,n){var s=Ta(fi,n);s.tag=Zv,s.payload={element:null};var h=t.value;return s.callback=function(){gA(h),Yg(e,t)},s}function qg(e,t,n){var s=Ta(fi,n);s.tag=Zv;var h=e.type.getDerivedStateFromError;if(typeof h=="function"){var C=t.value;s.payload=function(){return h(C)},s.callback=function(){kN(e),Yg(e,t)}}var M=e.stateNode;return M!==null&&typeof M.componentDidCatch=="function"&&(s.callback=function(){kN(e),Yg(e,t),typeof h!="function"&&pA(this);var z=t.value,ee=t.stack;this.componentDidCatch(z,{componentStack:ee!==null?ee:""}),typeof h!="function"&&(ls(e.lanes,en)||y("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",te(e)||"Unknown"))}),s}function b0(e,t,n){var s=e.pingCache,h;if(s===null?(s=e.pingCache=new C5,h=new Set,s.set(t,h)):(h=s.get(t),h===void 0&&(h=new Set,s.set(t,h))),!h.has(n)){h.add(n);var C=_A.bind(null,e,t,n);Ls&&od(e,n),t.then(C,C)}}function E5(e,t,n,s){var h=e.updateQueue;if(h===null){var C=new Set;C.add(n),e.updateQueue=C}else h.add(n)}function j5(e,t){var n=e.tag;if((e.mode&jn)===It&&(n===u||n===_||n===k)){var s=e.alternate;s?(e.updateQueue=s.updateQueue,e.memoizedState=s.memoizedState,e.lanes=s.lanes):(e.updateQueue=null,e.memoizedState=null)}}function y0(e){var t=e;do{if(t.tag===T&&o5(t))return t;t=t.return}while(t!==null);return null}function w0(e,t,n,s,h){if((e.mode&jn)===It){if(e===t)e.flags|=Fr;else{if(e.flags|=Yn,n.flags|=mp,n.flags&=-52805,n.tag===m){var C=n.alternate;if(C===null)n.tag=L;else{var M=Ta(fi,en);M.tag=sm,so(n,M,en)}}n.lanes=ln(n.lanes,en)}return e}return e.flags|=Fr,e.lanes=h,e}function D5(e,t,n,s,h){if(n.flags|=lh,Ls&&od(e,h),s!==null&&typeof s=="object"&&typeof s.then=="function"){var C=s;j5(n),br()&&n.mode&jn&&hx();var M=y0(t);if(M!==null){M.flags&=~ya,w0(M,t,n,e,h),M.mode&jn&&b0(e,C,h),E5(M,e,C);return}else{if(!Xj(h)){b0(e,C,h),j_();return}var B=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");s=B}}else if(br()&&n.mode&jn){hx();var z=y0(t);if(z!==null){(z.flags&Fr)===Gt&&(z.flags|=ya),w0(z,t,n,e,h),Bv($o(s,n));return}}s=$o(s,n),oA(s);var ee=t;do{switch(ee.tag){case d:{var ne=s;ee.flags|=Fr;var fe=Jc(h);ee.lanes=ln(ee.lanes,fe);var me=_0(ee,ne,fe);tg(ee,me);return}case m:var De=s,ke=ee.type,Ie=ee.stateNode;if((ee.flags&Yn)===Gt&&(typeof ke.getDerivedStateFromError=="function"||Ie!==null&&typeof Ie.componentDidCatch=="function"&&!yN(Ie))){ee.flags|=Fr;var mt=Jc(h);ee.lanes=ln(ee.lanes,mt);var Ut=qg(ee,De,mt);tg(ee,Ut);return}break}ee=ee.return}while(ee!==null)}function k5(){return null}var Wu=l.ReactCurrentOwner,Bs=!1,Kg,Gu,Xg,Jg,Zg,Wo,Qg,Mm,Yu;Kg={},Gu={},Xg={},Jg={},Zg={},Wo=!1,Qg={},Mm={},Yu={};function Hr(e,t,n,s){e===null?t.child=Sx(t,null,n,s):t.child=ql(t,e.child,n,s)}function R5(e,t,n,s){t.child=ql(t,e.child,null,s),t.child=ql(t,null,n,s)}function x0(e,t,n,s,h){if(t.type!==t.elementType){var C=n.propTypes;C&&Ms(C,s,"prop",dn(n))}var M=n.render,B=t.ref,z,ee;Xl(t,h),Wc(t);{if(Wu.current=t,$n(!0),z=nc(e,t,M,s,B,h),ee=ic(),t.mode&Li){dr(!0);try{z=nc(e,t,M,s,B,h),ee=ic()}finally{dr(!1)}}$n(!1)}return kl(),e!==null&&!Bs?(Vx(e,t,h),La(e,t,h)):(br()&&ee&&Mv(t),t.flags|=Cl,Hr(e,t,z,h),t.child)}function N0(e,t,n,s,h){if(e===null){var C=n.type;if(UA(C)&&n.compare===null&&n.defaultProps===void 0){var M=C;return M=dc(C),t.tag=k,t.type=M,n_(t,C),S0(e,t,M,s,h)}{var B=C.propTypes;if(B&&Ms(B,s,"prop",dn(C)),n.defaultProps!==void 0){var z=dn(C)||"Unknown";Yu[z]||(y("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",z),Yu[z]=!0)}}var ee=V_(n.type,null,s,t,t.mode,h);return ee.ref=t.ref,ee.return=t,t.child=ee,ee}{var ne=n.type,fe=ne.propTypes;fe&&Ms(fe,s,"prop",dn(ne))}var me=e.child,De=l_(e,h);if(!De){var ke=me.memoizedProps,Ie=n.compare;if(Ie=Ie!==null?Ie:hu,Ie(ke,s)&&e.ref===t.ref)return La(e,t,h)}t.flags|=Cl;var mt=Xo(me,s);return mt.ref=t.ref,mt.return=t,t.child=mt,mt}function S0(e,t,n,s,h){if(t.type!==t.elementType){var C=t.elementType;if(C.$$typeof===vt){var M=C,B=M._payload,z=M._init;try{C=z(B)}catch{C=null}var ee=C&&C.propTypes;ee&&Ms(ee,s,"prop",dn(C))}}if(e!==null){var ne=e.memoizedProps;if(hu(ne,s)&&e.ref===t.ref&&t.type===e.type)if(Bs=!1,t.pendingProps=s=ne,l_(e,h))(e.flags&mp)!==Gt&&(Bs=!0);else return t.lanes=e.lanes,La(e,t,h)}return e_(e,t,n,s,h)}function C0(e,t,n){var s=t.pendingProps,h=s.children,C=e!==null?e.memoizedState:null;if(s.mode==="hidden"||H)if((t.mode&jn)===It){var M={baseLanes:Qe,cachePool:null,transitions:null};t.memoizedState=M,Ym(t,n)}else if(ls(n,os)){var fe={baseLanes:Qe,cachePool:null,transitions:null};t.memoizedState=fe;var me=C!==null?C.baseLanes:n;Ym(t,me)}else{var B=null,z;if(C!==null){var ee=C.baseLanes;z=ln(ee,n)}else z=n;t.lanes=t.childLanes=os;var ne={baseLanes:z,cachePool:B,transitions:null};return t.memoizedState=ne,t.updateQueue=null,Ym(t,z),null}else{var De;C!==null?(De=ln(C.baseLanes,n),t.memoizedState=null):De=n,Ym(t,De)}return Hr(e,t,h,n),t.child}function T5(e,t,n){var s=t.pendingProps;return Hr(e,t,s,n),t.child}function L5(e,t,n){var s=t.pendingProps.children;return Hr(e,t,s,n),t.child}function A5(e,t,n){{t.flags|=Gn;{var s=t.stateNode;s.effectDuration=0,s.passiveEffectDuration=0}}var h=t.pendingProps,C=h.children;return Hr(e,t,C,n),t.child}function E0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=So,t.flags|=fp)}function e_(e,t,n,s,h){if(t.type!==t.elementType){var C=n.propTypes;C&&Ms(C,s,"prop",dn(n))}var M;{var B=zl(t,n,!0);M=$l(t,B)}var z,ee;Xl(t,h),Wc(t);{if(Wu.current=t,$n(!0),z=nc(e,t,n,s,M,h),ee=ic(),t.mode&Li){dr(!0);try{z=nc(e,t,n,s,M,h),ee=ic()}finally{dr(!1)}}$n(!1)}return kl(),e!==null&&!Bs?(Vx(e,t,h),La(e,t,h)):(br()&&ee&&Mv(t),t.flags|=Cl,Hr(e,t,z,h),t.child)}function j0(e,t,n,s,h){{switch(XA(t)){case!1:{var C=t.stateNode,M=t.type,B=new M(t.memoizedProps,C.context),z=B.state;C.updater.enqueueSetState(C,z,null);break}case!0:{t.flags|=Yn,t.flags|=Fr;var ee=new Error("Simulated error coming from DevTools"),ne=Jc(h);t.lanes=ln(t.lanes,ne);var fe=qg(t,$o(ee,t),ne);tg(t,fe);break}}if(t.type!==t.elementType){var me=n.propTypes;me&&Ms(me,s,"prop",dn(n))}}var De;Qs(n)?(De=!0,Gh(t)):De=!1,Xl(t,h);var ke=t.stateNode,Ie;ke===null?(Om(e,t),v0(t,n,s),Wg(t,n,s,h),Ie=!0):e===null?Ie=x5(t,n,s,h):Ie=N5(e,t,n,s,h);var mt=t_(e,t,n,Ie,De,h);{var Ut=t.stateNode;Ie&&Ut.props!==s&&(Wo||y("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",te(t)||"a component"),Wo=!0)}return mt}function t_(e,t,n,s,h,C){E0(e,t);var M=(t.flags&Yn)!==Gt;if(!s&&!M)return h&&lx(t,n,!1),La(e,t,C);var B=t.stateNode;Wu.current=t;var z;if(M&&typeof n.getDerivedStateFromError!="function")z=null,d0();else{Wc(t);{if($n(!0),z=B.render(),t.mode&Li){dr(!0);try{B.render()}finally{dr(!1)}}$n(!1)}kl()}return t.flags|=Cl,e!==null&&M?R5(e,t,z,C):Hr(e,t,z,C),t.memoizedState=B.state,h&&lx(t,n,!0),t.child}function D0(e){var t=e.stateNode;t.pendingContext?ax(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ax(e,t.context,!1),ng(e,t.containerInfo)}function M5(e,t,n){if(D0(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var s=t.pendingProps,h=t.memoizedState,C=h.element;Tx(e,t),cm(t,s,null,n);var M=t.memoizedState;t.stateNode;var B=M.element;if(h.isDehydrated){var z={element:B,isDehydrated:!1,cache:M.cache,pendingSuspenseBoundaries:M.pendingSuspenseBoundaries,transitions:M.transitions},ee=t.updateQueue;if(ee.baseState=z,t.memoizedState=z,t.flags&ya){var ne=$o(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t);return k0(e,t,B,n,ne)}else if(B!==C){var fe=$o(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return k0(e,t,B,n,fe)}else{PT(t);var me=Sx(t,null,B,n);t.child=me;for(var De=me;De;)De.flags=De.flags&~zi|wa,De=De.sibling}}else{if(Yl(),B===C)return La(e,t,n);Hr(e,t,B,n)}return t.child}function k0(e,t,n,s,h){return Yl(),Bv(h),t.flags|=ya,Hr(e,t,n,s),t.child}function U5(e,t,n){Ux(t),e===null&&Iv(t);var s=t.type,h=t.pendingProps,C=e!==null?e.memoizedProps:null,M=h.children,B=yv(s,h);return B?M=null:C!==null&&yv(s,C)&&(t.flags|=zc),E0(e,t),Hr(e,t,M,n),t.child}function O5(e,t){return e===null&&Iv(t),null}function P5(e,t,n,s){Om(e,t);var h=t.pendingProps,C=n,M=C._payload,B=C._init,z=B(M);t.type=z;var ee=t.tag=OA(z),ne=Is(z,h),fe;switch(ee){case u:return n_(t,z),t.type=z=dc(z),fe=e_(null,t,z,ne,s),fe;case m:return t.type=z=L_(z),fe=j0(null,t,z,ne,s),fe;case _:return t.type=z=A_(z),fe=x0(null,t,z,ne,s),fe;case S:{if(t.type!==t.elementType){var me=z.propTypes;me&&Ms(me,ne,"prop",dn(z))}return fe=N0(null,t,z,Is(z.type,ne),s),fe}}var De="";throw z!==null&&typeof z=="object"&&z.$$typeof===vt&&(De=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+z+". "+("Lazy element type must resolve to a class or function."+De))}function V5(e,t,n,s,h){Om(e,t),t.tag=m;var C;return Qs(n)?(C=!0,Gh(t)):C=!1,Xl(t,h),v0(t,n,s),Wg(t,n,s,h),t_(null,t,n,!0,C,h)}function I5(e,t,n,s){Om(e,t);var h=t.pendingProps,C;{var M=zl(t,n,!1);C=$l(t,M)}Xl(t,s);var B,z;Wc(t);{if(n.prototype&&typeof n.prototype.render=="function"){var ee=dn(n)||"Unknown";Kg[ee]||(y("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",ee,ee),Kg[ee]=!0)}t.mode&Li&&Os.recordLegacyContextWarning(t,null),$n(!0),Wu.current=t,B=nc(null,t,n,h,C,s),z=ic(),$n(!1)}if(kl(),t.flags|=Cl,typeof B=="object"&&B!==null&&typeof B.render=="function"&&B.$$typeof===void 0){var ne=dn(n)||"Unknown";Gu[ne]||(y("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",ne,ne,ne),Gu[ne]=!0)}if(typeof B=="object"&&B!==null&&typeof B.render=="function"&&B.$$typeof===void 0){{var fe=dn(n)||"Unknown";Gu[fe]||(y("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",fe,fe,fe),Gu[fe]=!0)}t.tag=m,t.memoizedState=null,t.updateQueue=null;var me=!1;return Qs(n)?(me=!0,Gh(t)):me=!1,t.memoizedState=B.state!==null&&B.state!==void 0?B.state:null,eg(t),p0(t,B),Wg(t,n,h,s),t_(null,t,n,!0,me,s)}else{if(t.tag=u,t.mode&Li){dr(!0);try{B=nc(null,t,n,h,C,s),z=ic()}finally{dr(!1)}}return br()&&z&&Mv(t),Hr(null,t,B,s),n_(t,n),t.child}}function n_(e,t){{if(t&&t.childContextTypes&&y("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var n="",s=qn();s&&(n+=`
160
+
161
+ Check the render method of \``+s+"`.");var h=s||"",C=e._debugSource;C&&(h=C.fileName+":"+C.lineNumber),Zg[h]||(Zg[h]=!0,y("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",n))}if(t.defaultProps!==void 0){var M=dn(t)||"Unknown";Yu[M]||(y("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",M),Yu[M]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var B=dn(t)||"Unknown";Jg[B]||(y("%s: Function components do not support getDerivedStateFromProps.",B),Jg[B]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var z=dn(t)||"Unknown";Xg[z]||(y("%s: Function components do not support contextType.",z),Xg[z]=!0)}}}var i_={dehydrated:null,treeContext:null,retryLane:hr};function r_(e){return{baseLanes:e,cachePool:k5(),transitions:null}}function B5(e,t){var n=null;return{baseLanes:ln(e.baseLanes,t),cachePool:n,transitions:e.transitions}}function F5(e,t,n,s){if(t!==null){var h=t.memoizedState;if(h===null)return!1}return sg(e,Ou)}function H5(e,t){return ph(e.childLanes,t)}function R0(e,t,n){var s=t.pendingProps;JA(t)&&(t.flags|=Yn);var h=Ps.current,C=!1,M=(t.flags&Yn)!==Gt;if(M||F5(h,e)?(C=!0,t.flags&=~Yn):(e===null||e.memoizedState!==null)&&(h=a5(h,Px)),h=Zl(h),oo(t,h),e===null){Iv(t);var B=t.memoizedState;if(B!==null){var z=B.dehydrated;if(z!==null)return Y5(t,z)}var ee=s.children,ne=s.fallback;if(C){var fe=z5(t,ee,ne,n),me=t.child;return me.memoizedState=r_(n),t.memoizedState=i_,fe}else return s_(t,ee)}else{var De=e.memoizedState;if(De!==null){var ke=De.dehydrated;if(ke!==null)return q5(e,t,M,s,ke,De,n)}if(C){var Ie=s.fallback,mt=s.children,Ut=W5(e,t,mt,Ie,n),Dt=t.child,kn=e.child.memoizedState;return Dt.memoizedState=kn===null?r_(n):B5(kn,n),Dt.childLanes=H5(e,n),t.memoizedState=i_,Ut}else{var Nn=s.children,be=$5(e,t,Nn,n);return t.memoizedState=null,be}}}function s_(e,t,n){var s=e.mode,h={mode:"visible",children:t},C=a_(h,s);return C.return=e,e.child=C,C}function z5(e,t,n,s){var h=e.mode,C=e.child,M={mode:"hidden",children:t},B,z;return(h&jn)===It&&C!==null?(B=C,B.childLanes=Qe,B.pendingProps=M,e.mode&ti&&(B.actualDuration=0,B.actualStartTime=-1,B.selfBaseDuration=0,B.treeBaseDuration=0),z=vo(n,h,s,null)):(B=a_(M,h),z=vo(n,h,s,null)),B.return=e,z.return=e,B.sibling=z,e.child=B,z}function a_(e,t,n){return TN(e,t,Qe,null)}function T0(e,t){return Xo(e,t)}function $5(e,t,n,s){var h=e.child,C=h.sibling,M=T0(h,{mode:"visible",children:n});if((t.mode&jn)===It&&(M.lanes=s),M.return=t,M.sibling=null,C!==null){var B=t.deletions;B===null?(t.deletions=[C],t.flags|=No):B.push(C)}return t.child=M,M}function W5(e,t,n,s,h){var C=t.mode,M=e.child,B=M.sibling,z={mode:"hidden",children:n},ee;if((C&jn)===It&&t.child!==M){var ne=t.child;ee=ne,ee.childLanes=Qe,ee.pendingProps=z,t.mode&ti&&(ee.actualDuration=0,ee.actualStartTime=-1,ee.selfBaseDuration=M.selfBaseDuration,ee.treeBaseDuration=M.treeBaseDuration),t.deletions=null}else ee=T0(M,z),ee.subtreeFlags=M.subtreeFlags&xa;var fe;return B!==null?fe=Xo(B,s):(fe=vo(s,C,h,null),fe.flags|=zi),fe.return=t,ee.return=t,ee.sibling=fe,t.child=ee,fe}function Um(e,t,n,s){s!==null&&Bv(s),ql(t,e.child,null,n);var h=t.pendingProps,C=h.children,M=s_(t,C);return M.flags|=zi,t.memoizedState=null,M}function G5(e,t,n,s,h){var C=t.mode,M={mode:"visible",children:n},B=a_(M,C),z=vo(s,C,h,null);return z.flags|=zi,B.return=t,z.return=t,B.sibling=z,t.child=B,(t.mode&jn)!==It&&ql(t,e.child,null,h),z}function Y5(e,t,n){return(e.mode&jn)===It?(y("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=en):Sv(t)?e.lanes=ko:e.lanes=os,null}function q5(e,t,n,s,h,C,M){if(n)if(t.flags&ya){t.flags&=~ya;var be=Gg(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return Um(e,t,M,be)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=Yn,null;var Be=s.children,ye=s.fallback,rt=G5(e,t,Be,ye,M),yt=t.child;return yt.memoizedState=r_(M),t.memoizedState=i_,rt}else{if(UT(),(t.mode&jn)===It)return Um(e,t,M,null);if(Sv(h)){var B,z,ee;{var ne=ZR(h);B=ne.digest,z=ne.message,ee=ne.stack}var fe;z?fe=new Error(z):fe=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var me=Gg(fe,B,ee);return Um(e,t,M,me)}var De=ls(M,e.childLanes);if(Bs||De){var ke=Gm();if(ke!==null){var Ie=rD(ke,M);if(Ie!==hr&&Ie!==C.retryLane){C.retryLane=Ie;var mt=fi;Qr(e,Ie),tr(ke,e,Ie,mt)}}j_();var Ut=Gg(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return Um(e,t,M,Ut)}else if(ex(h)){t.flags|=Yn,t.child=e.child;var Dt=bA.bind(null,e);return QR(h,Dt),null}else{VT(t,h,C.treeContext);var kn=s.children,Nn=s_(t,kn);return Nn.flags|=wa,Nn}}}function L0(e,t,n){e.lanes=ln(e.lanes,t);var s=e.alternate;s!==null&&(s.lanes=ln(s.lanes,t)),Xv(e.return,t,n)}function K5(e,t,n){for(var s=t;s!==null;){if(s.tag===T){var h=s.memoizedState;h!==null&&L0(s,n,e)}else if(s.tag===F)L0(s,n,e);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===e)return;for(;s.sibling===null;){if(s.return===null||s.return===e)return;s=s.return}s.sibling.return=s.return,s=s.sibling}}function X5(e){for(var t=e,n=null;t!==null;){var s=t.alternate;s!==null&&mm(s)===null&&(n=t),t=t.sibling}return n}function J5(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!Qg[e])if(Qg[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{y('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{y('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break}default:y('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else y('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function Z5(e,t){e!==void 0&&!Mm[e]&&(e!=="collapsed"&&e!=="hidden"?(Mm[e]=!0,y('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Mm[e]=!0,y('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function A0(e,t){{var n=on(e),s=!n&&typeof xi(e)=="function";if(n||s){var h=n?"array":"iterable";return y("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",h,t,h),!1}}return!0}function Q5(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(on(e)){for(var n=0;n<e.length;n++)if(!A0(e[n],n))return}else{var s=xi(e);if(typeof s=="function"){var h=s.call(e);if(h)for(var C=h.next(),M=0;!C.done;C=h.next()){if(!A0(C.value,M))return;M++}}else y('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}function o_(e,t,n,s,h){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:h}:(C.isBackwards=t,C.rendering=null,C.renderingStartTime=0,C.last=s,C.tail=n,C.tailMode=h)}function M0(e,t,n){var s=t.pendingProps,h=s.revealOrder,C=s.tail,M=s.children;J5(h),Z5(C,h),Q5(M,h),Hr(e,t,M,n);var B=Ps.current,z=sg(B,Ou);if(z)B=ag(B,Ou),t.flags|=Yn;else{var ee=e!==null&&(e.flags&Yn)!==Gt;ee&&K5(t,t.child,n),B=Zl(B)}if(oo(t,B),(t.mode&jn)===It)t.memoizedState=null;else switch(h){case"forwards":{var ne=X5(t.child),fe;ne===null?(fe=t.child,t.child=null):(fe=ne.sibling,ne.sibling=null),o_(t,!1,fe,ne,C);break}case"backwards":{var me=null,De=t.child;for(t.child=null;De!==null;){var ke=De.alternate;if(ke!==null&&mm(ke)===null){t.child=De;break}var Ie=De.sibling;De.sibling=me,me=De,De=Ie}o_(t,!0,me,null,C);break}case"together":{o_(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function eL(e,t,n){ng(t,t.stateNode.containerInfo);var s=t.pendingProps;return e===null?t.child=ql(t,null,s,n):Hr(e,t,s,n),t.child}var U0=!1;function tL(e,t,n){var s=t.type,h=s._context,C=t.pendingProps,M=t.memoizedProps,B=C.value;{"value"in C||U0||(U0=!0,y("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var z=t.type.propTypes;z&&Ms(z,C,"prop","Context.Provider")}if(jx(t,h,B),M!==null){var ee=M.value;if(ds(ee,B)){if(M.children===C.children&&!$h())return La(e,t,n)}else JT(t,h,n)}var ne=C.children;return Hr(e,t,ne,n),t.child}var O0=!1;function nL(e,t,n){var s=t.type;s._context===void 0?s!==s.Consumer&&(O0||(O0=!0,y("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):s=s._context;var h=t.pendingProps,C=h.children;typeof C!="function"&&y("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Xl(t,n);var M=$i(s);Wc(t);var B;return Wu.current=t,$n(!0),B=C(M),$n(!1),kl(),t.flags|=Cl,Hr(e,t,B,n),t.child}function qu(){Bs=!0}function Om(e,t){(t.mode&jn)===It&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=zi)}function La(e,t,n){return e!==null&&(t.dependencies=e.dependencies),d0(),ad(t.lanes),ls(n,t.childLanes)?(KT(e,t),t.child):null}function iL(e,t,n){{var s=t.return;if(s===null)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,t===s.child)s.child=n;else{var h=s.child;if(h===null)throw new Error("Expected parent to have a child.");for(;h.sibling!==t;)if(h=h.sibling,h===null)throw new Error("Expected to find the previous sibling.");h.sibling=n}var C=s.deletions;return C===null?(s.deletions=[e],s.flags|=No):C.push(e),n.flags|=zi,n}}function l_(e,t){var n=e.lanes;return!!ls(n,t)}function rL(e,t,n){switch(t.tag){case d:D0(t),t.stateNode,Yl();break;case x:Ux(t);break;case m:{var s=t.type;Qs(s)&&Gh(t);break}case w:ng(t,t.stateNode.containerInfo);break;case f:{var h=t.memoizedProps.value,C=t.type._context;jx(t,C,h);break}case E:{var M=ls(n,t.childLanes);M&&(t.flags|=Gn);{var B=t.stateNode;B.effectDuration=0,B.passiveEffectDuration=0}}break;case T:{var z=t.memoizedState;if(z!==null){if(z.dehydrated!==null)return oo(t,Zl(Ps.current)),t.flags|=Yn,null;var ee=t.child,ne=ee.childLanes;if(ls(n,ne))return R0(e,t,n);oo(t,Zl(Ps.current));var fe=La(e,t,n);return fe!==null?fe.sibling:null}else oo(t,Zl(Ps.current));break}case F:{var me=(e.flags&Yn)!==Gt,De=ls(n,t.childLanes);if(me){if(De)return M0(e,t,n);t.flags|=Yn}var ke=t.memoizedState;if(ke!==null&&(ke.rendering=null,ke.tail=null,ke.lastEffect=null),oo(t,Ps.current),De)break;return null}case I:case G:return t.lanes=Qe,C0(e,t,n)}return La(e,t,n)}function P0(e,t,n){if(t._debugNeedsRemount&&e!==null)return iL(e,t,V_(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var s=e.memoizedProps,h=t.pendingProps;if(s!==h||$h()||t.type!==e.type)Bs=!0;else{var C=l_(e,n);if(!C&&(t.flags&Yn)===Gt)return Bs=!1,rL(e,t,n);(e.flags&mp)!==Gt?Bs=!0:Bs=!1}}else if(Bs=!1,br()&&kT(t)){var M=t.index,B=RT();dx(t,B,M)}switch(t.lanes=Qe,t.tag){case b:return I5(e,t,t.type,n);case D:{var z=t.elementType;return P5(e,t,z,n)}case u:{var ee=t.type,ne=t.pendingProps,fe=t.elementType===ee?ne:Is(ee,ne);return e_(e,t,ee,fe,n)}case m:{var me=t.type,De=t.pendingProps,ke=t.elementType===me?De:Is(me,De);return j0(e,t,me,ke,n)}case d:return M5(e,t,n);case x:return U5(e,t,n);case j:return O5(e,t);case T:return R0(e,t,n);case w:return eL(e,t,n);case _:{var Ie=t.type,mt=t.pendingProps,Ut=t.elementType===Ie?mt:Is(Ie,mt);return x0(e,t,Ie,Ut,n)}case v:return T5(e,t,n);case o:return L5(e,t,n);case E:return A5(e,t,n);case f:return tL(e,t,n);case p:return nL(e,t,n);case S:{var Dt=t.type,kn=t.pendingProps,Nn=Is(Dt,kn);if(t.type!==t.elementType){var be=Dt.propTypes;be&&Ms(be,Nn,"prop",dn(Dt))}return Nn=Is(Dt.type,Nn),N0(e,t,Dt,Nn,n)}case k:return S0(e,t,t.type,t.pendingProps,n);case L:{var Be=t.type,ye=t.pendingProps,rt=t.elementType===Be?ye:Is(Be,ye);return V5(e,t,Be,rt,n)}case F:return M0(e,t,n);case P:break;case I:return C0(e,t,n)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function rc(e){e.flags|=Gn}function V0(e){e.flags|=So,e.flags|=fp}var I0,c_,B0,F0;I0=function(e,t,n,s){for(var h=t.child;h!==null;){if(h.tag===x||h.tag===j)ER(e,h.stateNode);else if(h.tag!==w){if(h.child!==null){h.child.return=h,h=h.child;continue}}if(h===t)return;for(;h.sibling===null;){if(h.return===null||h.return===t)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},c_=function(e,t){},B0=function(e,t,n,s,h){var C=e.memoizedProps;if(C!==s){var M=t.stateNode,B=ig(),z=DR(M,n,C,s,h,B);t.updateQueue=z,z&&rc(t)}},F0=function(e,t,n,s){n!==s&&rc(t)};function Ku(e,t){if(!br())switch(e.tailMode){case"hidden":{for(var n=e.tail,s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break}case"collapsed":{for(var h=e.tail,C=null;h!==null;)h.alternate!==null&&(C=h),h=h.sibling;C===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:C.sibling=null;break}}}function wr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=Qe,s=Gt;if(t){if((e.mode&ti)!==It){for(var z=e.selfBaseDuration,ee=e.child;ee!==null;)n=ln(n,ln(ee.lanes,ee.childLanes)),s|=ee.subtreeFlags&xa,s|=ee.flags&xa,z+=ee.treeBaseDuration,ee=ee.sibling;e.treeBaseDuration=z}else for(var ne=e.child;ne!==null;)n=ln(n,ln(ne.lanes,ne.childLanes)),s|=ne.subtreeFlags&xa,s|=ne.flags&xa,ne.return=e,ne=ne.sibling;e.subtreeFlags|=s}else{if((e.mode&ti)!==It){for(var h=e.actualDuration,C=e.selfBaseDuration,M=e.child;M!==null;)n=ln(n,ln(M.lanes,M.childLanes)),s|=M.subtreeFlags,s|=M.flags,h+=M.actualDuration,C+=M.treeBaseDuration,M=M.sibling;e.actualDuration=h,e.treeBaseDuration=C}else for(var B=e.child;B!==null;)n=ln(n,ln(B.lanes,B.childLanes)),s|=B.subtreeFlags,s|=B.flags,B.return=e,B=B.sibling;e.subtreeFlags|=s}return e.childLanes=n,t}function sL(e,t,n){if(zT()&&(t.mode&jn)!==It&&(t.flags&Yn)===Gt)return _x(t),Yl(),t.flags|=ya|lh|Fr,!1;var s=Jh(t);if(n!==null&&n.dehydrated!==null)if(e===null){if(!s)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(FT(t),wr(t),(t.mode&ti)!==It){var h=n!==null;if(h){var C=t.child;C!==null&&(t.treeBaseDuration-=C.treeBaseDuration)}}return!1}else{if(Yl(),(t.flags&Yn)===Gt&&(t.memoizedState=null),t.flags|=Gn,wr(t),(t.mode&ti)!==It){var M=n!==null;if(M){var B=t.child;B!==null&&(t.treeBaseDuration-=B.treeBaseDuration)}}return!1}else return bx(),!0}function H0(e,t,n){var s=t.pendingProps;switch(Uv(t),t.tag){case b:case D:case k:case u:case _:case v:case o:case E:case p:case S:return wr(t),null;case m:{var h=t.type;return Qs(h)&&Wh(t),wr(t),null}case d:{var C=t.stateNode;if(Jl(t),Tv(t),lg(),C.pendingContext&&(C.context=C.pendingContext,C.pendingContext=null),e===null||e.child===null){var M=Jh(t);if(M)rc(t);else if(e!==null){var B=e.memoizedState;(!B.isDehydrated||(t.flags&ya)!==Gt)&&(t.flags|=El,bx())}}return c_(e,t),wr(t),null}case x:{rg(t);var z=Mx(),ee=t.type;if(e!==null&&t.stateNode!=null)B0(e,t,ee,s,z),e.ref!==t.ref&&V0(t);else{if(!s){if(t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return wr(t),null}var ne=ig(),fe=Jh(t);if(fe)IT(t,z,ne)&&rc(t);else{var me=CR(ee,s,z,ne,t);I0(me,t,!1,!1),t.stateNode=me,jR(me,ee,s,z)&&rc(t)}t.ref!==null&&V0(t)}return wr(t),null}case j:{var De=s;if(e&&t.stateNode!=null){var ke=e.memoizedProps;F0(e,t,ke,De)}else{if(typeof De!="string"&&t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var Ie=Mx(),mt=ig(),Ut=Jh(t);Ut?BT(t)&&rc(t):t.stateNode=kR(De,Ie,mt,t)}return wr(t),null}case T:{Ql(t);var Dt=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var kn=sL(e,t,Dt);if(!kn)return t.flags&Fr?t:null}if((t.flags&Yn)!==Gt)return t.lanes=n,(t.mode&ti)!==It&&Ag(t),t;var Nn=Dt!==null,be=e!==null&&e.memoizedState!==null;if(Nn!==be&&Nn){var Be=t.child;if(Be.flags|=Co,(t.mode&jn)!==It){var ye=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);ye||sg(Ps.current,Px)?aA():j_()}}var rt=t.updateQueue;if(rt!==null&&(t.flags|=Gn),wr(t),(t.mode&ti)!==It&&Nn){var yt=t.child;yt!==null&&(t.treeBaseDuration-=yt.treeBaseDuration)}return null}case w:return Jl(t),c_(e,t),e===null&&xT(t.stateNode.containerInfo),wr(t),null;case f:var pt=t.type._context;return Kv(pt,t),wr(t),null;case L:{var qt=t.type;return Qs(qt)&&Wh(t),wr(t),null}case F:{Ql(t);var sn=t.memoizedState;if(sn===null)return wr(t),null;var ii=(t.flags&Yn)!==Gt,Bn=sn.rendering;if(Bn===null)if(ii)Ku(sn,!1);else{var Ii=lA()&&(e===null||(e.flags&Yn)===Gt);if(!Ii)for(var Fn=t.child;Fn!==null;){var Ai=mm(Fn);if(Ai!==null){ii=!0,t.flags|=Yn,Ku(sn,!1);var Ur=Ai.updateQueue;return Ur!==null&&(t.updateQueue=Ur,t.flags|=Gn),t.subtreeFlags=Gt,XT(t,n),oo(t,ag(Ps.current,Ou)),t.child}Fn=Fn.sibling}sn.tail!==null&&ur()>cN()&&(t.flags|=Yn,ii=!0,Ku(sn,!1),t.lanes=Fy)}else{if(!ii){var Er=mm(Bn);if(Er!==null){t.flags|=Yn,ii=!0;var fs=Er.updateQueue;if(fs!==null&&(t.updateQueue=fs,t.flags|=Gn),Ku(sn,!0),sn.tail===null&&sn.tailMode==="hidden"&&!Bn.alternate&&!br())return wr(t),null}else ur()*2-sn.renderingStartTime>cN()&&n!==os&&(t.flags|=Yn,ii=!0,Ku(sn,!1),t.lanes=Fy)}if(sn.isBackwards)Bn.sibling=t.child,t.child=Bn;else{var Wr=sn.last;Wr!==null?Wr.sibling=Bn:t.child=Bn,sn.last=Bn}}if(sn.tail!==null){var Gr=sn.tail;sn.rendering=Gr,sn.tail=Gr.sibling,sn.renderingStartTime=ur(),Gr.sibling=null;var Or=Ps.current;return ii?Or=ag(Or,Ou):Or=Zl(Or),oo(t,Or),Gr}return wr(t),null}case P:break;case I:case G:{E_(t);var Pa=t.memoizedState,hc=Pa!==null;if(e!==null){var dd=e.memoizedState,oa=dd!==null;oa!==hc&&!H&&(t.flags|=Co)}return!hc||(t.mode&jn)===It?wr(t):ls(aa,os)&&(wr(t),t.subtreeFlags&(zi|Gn)&&(t.flags|=Co)),null}case ie:return null;case q:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function aL(e,t,n){switch(Uv(t),t.tag){case m:{var s=t.type;Qs(s)&&Wh(t);var h=t.flags;return h&Fr?(t.flags=h&~Fr|Yn,(t.mode&ti)!==It&&Ag(t),t):null}case d:{t.stateNode,Jl(t),Tv(t),lg();var C=t.flags;return(C&Fr)!==Gt&&(C&Yn)===Gt?(t.flags=C&~Fr|Yn,t):null}case x:return rg(t),null;case T:{Ql(t);var M=t.memoizedState;if(M!==null&&M.dehydrated!==null){if(t.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Yl()}var B=t.flags;return B&Fr?(t.flags=B&~Fr|Yn,(t.mode&ti)!==It&&Ag(t),t):null}case F:return Ql(t),null;case w:return Jl(t),null;case f:var z=t.type._context;return Kv(z,t),null;case I:case G:return E_(t),null;case ie:return null;default:return null}}function z0(e,t,n){switch(Uv(t),t.tag){case m:{var s=t.type.childContextTypes;s!=null&&Wh(t);break}case d:{t.stateNode,Jl(t),Tv(t),lg();break}case x:{rg(t);break}case w:Jl(t);break;case T:Ql(t);break;case F:Ql(t);break;case f:var h=t.type._context;Kv(h,t);break;case I:case G:E_(t);break}}var $0=null;$0=new Set;var Pm=!1,xr=!1,oL=typeof WeakSet=="function"?WeakSet:Set,Ct=null,sc=null,ac=null;function lL(e){up(null,function(){throw e}),dp()}var cL=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&ti)try{ra(),t.componentWillUnmount()}finally{ia(e)}else t.componentWillUnmount()};function W0(e,t){try{uo(Ki,e)}catch(n){ui(e,t,n)}}function u_(e,t,n){try{cL(e,n)}catch(s){ui(e,t,s)}}function uL(e,t,n){try{n.componentDidMount()}catch(s){ui(e,t,s)}}function G0(e,t){try{q0(e)}catch(n){ui(e,t,n)}}function oc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function"){var s;try{if(de&&xe&&e.mode&ti)try{ra(),s=n(null)}finally{ia(e)}else s=n(null)}catch(h){ui(e,t,h)}typeof s=="function"&&y("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",te(e))}else n.current=null}function Vm(e,t,n){try{n()}catch(s){ui(e,t,s)}}var Y0=!1;function dL(e,t){NR(e.containerInfo),Ct=t,hL();var n=Y0;return Y0=!1,n}function hL(){for(;Ct!==null;){var e=Ct,t=e.child;(e.subtreeFlags&gp)!==Gt&&t!==null?(t.return=e,Ct=t):mL()}}function mL(){for(;Ct!==null;){var e=Ct;Yt(e);try{fL(e)}catch(n){ui(e,e.return,n)}Pn();var t=e.sibling;if(t!==null){t.return=e.return,Ct=t;return}Ct=e.return}}function fL(e){var t=e.alternate,n=e.flags;if((n&El)!==Gt){switch(Yt(e),e.tag){case u:case _:case k:break;case m:{if(t!==null){var s=t.memoizedProps,h=t.memoizedState,C=e.stateNode;e.type===e.elementType&&!Wo&&(C.props!==e.memoizedProps&&y("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",te(e)||"instance"),C.state!==e.memoizedState&&y("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",te(e)||"instance"));var M=C.getSnapshotBeforeUpdate(e.elementType===e.type?s:Is(e.type,s),h);{var B=$0;M===void 0&&!B.has(e.type)&&(B.add(e.type),y("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",te(e)))}C.__reactInternalSnapshotBeforeUpdate=M}break}case d:{{var z=e.stateNode;qR(z.containerInfo)}break}case x:case j:case w:case L:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Pn()}}function Fs(e,t,n){var s=t.updateQueue,h=s!==null?s.lastEffect:null;if(h!==null){var C=h.next,M=C;do{if((M.tag&e)===e){var B=M.destroy;M.destroy=void 0,B!==void 0&&((e&yr)!==es?kj(t):(e&Ki)!==es&&Oy(t),(e&ea)!==es&&ld(!0),Vm(t,n,B),(e&ea)!==es&&ld(!1),(e&yr)!==es?Rj():(e&Ki)!==es&&Py())}M=M.next}while(M!==C)}}function uo(e,t){var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var h=s.next,C=h;do{if((C.tag&e)===e){(e&yr)!==es?jj(t):(e&Ki)!==es&&Tj(t);var M=C.create;(e&ea)!==es&&ld(!0),C.destroy=M(),(e&ea)!==es&&ld(!1),(e&yr)!==es?Dj():(e&Ki)!==es&&Lj();{var B=C.destroy;if(B!==void 0&&typeof B!="function"){var z=void 0;(C.tag&Ki)!==Gt?z="useLayoutEffect":(C.tag&ea)!==Gt?z="useInsertionEffect":z="useEffect";var ee=void 0;B===null?ee=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof B.then=="function"?ee=`
162
+
163
+ It looks like you wrote `+z+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
164
+
165
+ `+z+`(() => {
166
+ async function fetchData() {
167
+ // You can await here
168
+ const response = await MyAPI.getData(someId);
169
+ // ...
170
+ }
171
+ fetchData();
172
+ }, [someId]); // Or [] if effect doesn't need props or state
173
+
174
+ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:ee=" You returned: "+B,y("%s must not return anything besides a function, which is used for clean-up.%s",z,ee)}}}C=C.next}while(C!==h)}}function pL(e,t){if((t.flags&Gn)!==Gt)switch(t.tag){case E:{var n=t.stateNode.passiveEffectDuration,s=t.memoizedProps,h=s.id,C=s.onPostCommit,M=c0(),B=t.alternate===null?"mount":"update";l0()&&(B="nested-update"),typeof C=="function"&&C(h,B,n,M);var z=t.return;e:for(;z!==null;){switch(z.tag){case d:var ee=z.stateNode;ee.passiveEffectDuration+=n;break e;case E:var ne=z.stateNode;ne.passiveEffectDuration+=n;break e}z=z.return}break}}}function vL(e,t,n,s){if((n.flags&$c)!==Gt)switch(n.tag){case u:case _:case k:{if(!xr)if(n.mode&ti)try{ra(),uo(Ki|qi,n)}finally{ia(n)}else uo(Ki|qi,n);break}case m:{var h=n.stateNode;if(n.flags&Gn&&!xr)if(t===null)if(n.type===n.elementType&&!Wo&&(h.props!==n.memoizedProps&&y("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",te(n)||"instance"),h.state!==n.memoizedState&&y("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",te(n)||"instance")),n.mode&ti)try{ra(),h.componentDidMount()}finally{ia(n)}else h.componentDidMount();else{var C=n.elementType===n.type?t.memoizedProps:Is(n.type,t.memoizedProps),M=t.memoizedState;if(n.type===n.elementType&&!Wo&&(h.props!==n.memoizedProps&&y("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",te(n)||"instance"),h.state!==n.memoizedState&&y("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",te(n)||"instance")),n.mode&ti)try{ra(),h.componentDidUpdate(C,M,h.__reactInternalSnapshotBeforeUpdate)}finally{ia(n)}else h.componentDidUpdate(C,M,h.__reactInternalSnapshotBeforeUpdate)}var B=n.updateQueue;B!==null&&(n.type===n.elementType&&!Wo&&(h.props!==n.memoizedProps&&y("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",te(n)||"instance"),h.state!==n.memoizedState&&y("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",te(n)||"instance")),Ax(n,B,h));break}case d:{var z=n.updateQueue;if(z!==null){var ee=null;if(n.child!==null)switch(n.child.tag){case x:ee=n.child.stateNode;break;case m:ee=n.child.stateNode;break}Ax(n,z,ee)}break}case x:{var ne=n.stateNode;if(t===null&&n.flags&Gn){var fe=n.type,me=n.memoizedProps;MR(ne,fe,me)}break}case j:break;case w:break;case E:{{var De=n.memoizedProps,ke=De.onCommit,Ie=De.onRender,mt=n.stateNode.effectDuration,Ut=c0(),Dt=t===null?"mount":"update";l0()&&(Dt="nested-update"),typeof Ie=="function"&&Ie(n.memoizedProps.id,Dt,n.actualDuration,n.treeBaseDuration,n.actualStartTime,Ut);{typeof ke=="function"&&ke(n.memoizedProps.id,Dt,mt,Ut),mA(n);var kn=n.return;e:for(;kn!==null;){switch(kn.tag){case d:var Nn=kn.stateNode;Nn.effectDuration+=mt;break e;case E:var be=kn.stateNode;be.effectDuration+=mt;break e}kn=kn.return}}}break}case T:{SL(e,n);break}case F:case L:case P:case I:case G:case q:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}xr||n.flags&So&&q0(n)}function gL(e){switch(e.tag){case u:case _:case k:{if(e.mode&ti)try{ra(),W0(e,e.return)}finally{ia(e)}else W0(e,e.return);break}case m:{var t=e.stateNode;typeof t.componentDidMount=="function"&&uL(e,e.return,t),G0(e,e.return);break}case x:{G0(e,e.return);break}}}function _L(e,t){for(var n=null,s=e;;){if(s.tag===x){if(n===null){n=s;try{var h=s.stateNode;t?$R(h):GR(s.stateNode,s.memoizedProps)}catch(M){ui(e,e.return,M)}}}else if(s.tag===j){if(n===null)try{var C=s.stateNode;t?WR(C):YR(C,s.memoizedProps)}catch(M){ui(e,e.return,M)}}else if(!((s.tag===I||s.tag===G)&&s.memoizedState!==null&&s!==e)){if(s.child!==null){s.child.return=s,s=s.child;continue}}if(s===e)return;for(;s.sibling===null;){if(s.return===null||s.return===e)return;n===s&&(n=null),s=s.return}n===s&&(n=null),s.sibling.return=s.return,s=s.sibling}}function q0(e){var t=e.ref;if(t!==null){var n=e.stateNode,s;switch(e.tag){case x:s=n;break;default:s=n}if(typeof t=="function"){var h;if(e.mode&ti)try{ra(),h=t(s)}finally{ia(e)}else h=t(s);typeof h=="function"&&y("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",te(e))}else t.hasOwnProperty("current")||y("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",te(e)),t.current=s}}function bL(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function K0(e){var t=e.alternate;t!==null&&(e.alternate=null,K0(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===x){var n=e.stateNode;n!==null&&CT(n)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}}function yL(e){for(var t=e.return;t!==null;){if(X0(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function X0(e){return e.tag===x||e.tag===d||e.tag===w}function J0(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||X0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==x&&t.tag!==j&&t.tag!==U;){if(t.flags&zi||t.child===null||t.tag===w)continue e;t.child.return=t,t=t.child}if(!(t.flags&zi))return t.stateNode}}function wL(e){var t=yL(e);switch(t.tag){case x:{var n=t.stateNode;t.flags&zc&&(Qw(n),t.flags&=~zc);var s=J0(e);h_(e,s,n);break}case d:case w:{var h=t.stateNode.containerInfo,C=J0(e);d_(e,C,h);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function d_(e,t,n){var s=e.tag,h=s===x||s===j;if(h){var C=e.stateNode;t?BR(n,C,t):VR(n,C)}else if(s!==w){var M=e.child;if(M!==null){d_(M,t,n);for(var B=M.sibling;B!==null;)d_(B,t,n),B=B.sibling}}}function h_(e,t,n){var s=e.tag,h=s===x||s===j;if(h){var C=e.stateNode;t?IR(n,C,t):PR(n,C)}else if(s!==w){var M=e.child;if(M!==null){h_(M,t,n);for(var B=M.sibling;B!==null;)h_(B,t,n),B=B.sibling}}}var Nr=null,Hs=!1;function xL(e,t,n){{var s=t;e:for(;s!==null;){switch(s.tag){case x:{Nr=s.stateNode,Hs=!1;break e}case d:{Nr=s.stateNode.containerInfo,Hs=!0;break e}case w:{Nr=s.stateNode.containerInfo,Hs=!0;break e}}s=s.return}if(Nr===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Z0(e,t,n),Nr=null,Hs=!1}bL(n)}function ho(e,t,n){for(var s=n.child;s!==null;)Z0(e,t,s),s=s.sibling}function Z0(e,t,n){switch(Nj(n),n.tag){case x:xr||oc(n,t);case j:{{var s=Nr,h=Hs;Nr=null,ho(e,t,n),Nr=s,Hs=h,Nr!==null&&(Hs?HR(Nr,n.stateNode):FR(Nr,n.stateNode))}return}case U:{Nr!==null&&(Hs?zR(Nr,n.stateNode):Nv(Nr,n.stateNode));return}case w:{{var C=Nr,M=Hs;Nr=n.stateNode.containerInfo,Hs=!0,ho(e,t,n),Nr=C,Hs=M}return}case u:case _:case S:case k:{if(!xr){var B=n.updateQueue;if(B!==null){var z=B.lastEffect;if(z!==null){var ee=z.next,ne=ee;do{var fe=ne,me=fe.destroy,De=fe.tag;me!==void 0&&((De&ea)!==es?Vm(n,t,me):(De&Ki)!==es&&(Oy(n),n.mode&ti?(ra(),Vm(n,t,me),ia(n)):Vm(n,t,me),Py())),ne=ne.next}while(ne!==ee)}}}ho(e,t,n);return}case m:{if(!xr){oc(n,t);var ke=n.stateNode;typeof ke.componentWillUnmount=="function"&&u_(n,t,ke)}ho(e,t,n);return}case P:{ho(e,t,n);return}case I:{if(n.mode&jn){var Ie=xr;xr=Ie||n.memoizedState!==null,ho(e,t,n),xr=Ie}else ho(e,t,n);break}default:{ho(e,t,n);return}}}function NL(e){e.memoizedState}function SL(e,t){var n=t.memoizedState;if(n===null){var s=t.alternate;if(s!==null){var h=s.memoizedState;if(h!==null){var C=h.dehydrated;C!==null&&lT(C)}}}}function Q0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new oL),t.forEach(function(s){var h=yA.bind(null,e,s);if(!n.has(s)){if(n.add(s),Ls)if(sc!==null&&ac!==null)od(ac,sc);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");s.then(h,h)}})}}function CL(e,t,n){sc=n,ac=e,Yt(t),eN(t,e),Yt(t),sc=null,ac=null}function zs(e,t,n){var s=t.deletions;if(s!==null)for(var h=0;h<s.length;h++){var C=s[h];try{xL(e,t,C)}catch(z){ui(C,t,z)}}var M=hi();if(t.subtreeFlags&_p)for(var B=t.child;B!==null;)Yt(B),eN(B,e),B=B.sibling;Yt(M)}function eN(e,t,n){var s=e.alternate,h=e.flags;switch(e.tag){case u:case _:case S:case k:{if(zs(t,e),sa(e),h&Gn){try{Fs(ea|qi,e,e.return),uo(ea|qi,e)}catch(qt){ui(e,e.return,qt)}if(e.mode&ti){try{ra(),Fs(Ki|qi,e,e.return)}catch(qt){ui(e,e.return,qt)}ia(e)}else try{Fs(Ki|qi,e,e.return)}catch(qt){ui(e,e.return,qt)}}return}case m:{zs(t,e),sa(e),h&So&&s!==null&&oc(s,s.return);return}case x:{zs(t,e),sa(e),h&So&&s!==null&&oc(s,s.return);{if(e.flags&zc){var C=e.stateNode;try{Qw(C)}catch(qt){ui(e,e.return,qt)}}if(h&Gn){var M=e.stateNode;if(M!=null){var B=e.memoizedProps,z=s!==null?s.memoizedProps:B,ee=e.type,ne=e.updateQueue;if(e.updateQueue=null,ne!==null)try{UR(M,ne,ee,z,B,e)}catch(qt){ui(e,e.return,qt)}}}}return}case j:{if(zs(t,e),sa(e),h&Gn){if(e.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var fe=e.stateNode,me=e.memoizedProps,De=s!==null?s.memoizedProps:me;try{OR(fe,De,me)}catch(qt){ui(e,e.return,qt)}}return}case d:{if(zs(t,e),sa(e),h&Gn&&s!==null){var ke=s.memoizedState;if(ke.isDehydrated)try{oT(t.containerInfo)}catch(qt){ui(e,e.return,qt)}}return}case w:{zs(t,e),sa(e);return}case T:{zs(t,e),sa(e);var Ie=e.child;if(Ie.flags&Co){var mt=Ie.stateNode,Ut=Ie.memoizedState,Dt=Ut!==null;if(mt.isHidden=Dt,Dt){var kn=Ie.alternate!==null&&Ie.alternate.memoizedState!==null;kn||sA()}}if(h&Gn){try{NL(e)}catch(qt){ui(e,e.return,qt)}Q0(e)}return}case I:{var Nn=s!==null&&s.memoizedState!==null;if(e.mode&jn){var be=xr;xr=be||Nn,zs(t,e),xr=be}else zs(t,e);if(sa(e),h&Co){var Be=e.stateNode,ye=e.memoizedState,rt=ye!==null,yt=e;if(Be.isHidden=rt,rt&&!Nn&&(yt.mode&jn)!==It){Ct=yt;for(var pt=yt.child;pt!==null;)Ct=pt,jL(pt),pt=pt.sibling}_L(yt,rt)}return}case F:{zs(t,e),sa(e),h&Gn&&Q0(e);return}case P:return;default:{zs(t,e),sa(e);return}}}function sa(e){var t=e.flags;if(t&zi){try{wL(e)}catch(n){ui(e,e.return,n)}e.flags&=~zi}t&wa&&(e.flags&=~wa)}function EL(e,t,n){sc=n,ac=t,Ct=e,tN(e,t,n),sc=null,ac=null}function tN(e,t,n){for(var s=(e.mode&jn)!==It;Ct!==null;){var h=Ct,C=h.child;if(h.tag===I&&s){var M=h.memoizedState!==null,B=M||Pm;if(B){m_(e,t,n);continue}else{var z=h.alternate,ee=z!==null&&z.memoizedState!==null,ne=ee||xr,fe=Pm,me=xr;Pm=B,xr=ne,xr&&!me&&(Ct=h,DL(h));for(var De=C;De!==null;)Ct=De,tN(De,t,n),De=De.sibling;Ct=h,Pm=fe,xr=me,m_(e,t,n);continue}}(h.subtreeFlags&$c)!==Gt&&C!==null?(C.return=h,Ct=C):m_(e,t,n)}}function m_(e,t,n){for(;Ct!==null;){var s=Ct;if((s.flags&$c)!==Gt){var h=s.alternate;Yt(s);try{vL(t,h,s,n)}catch(M){ui(s,s.return,M)}Pn()}if(s===e){Ct=null;return}var C=s.sibling;if(C!==null){C.return=s.return,Ct=C;return}Ct=s.return}}function jL(e){for(;Ct!==null;){var t=Ct,n=t.child;switch(t.tag){case u:case _:case S:case k:{if(t.mode&ti)try{ra(),Fs(Ki,t,t.return)}finally{ia(t)}else Fs(Ki,t,t.return);break}case m:{oc(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&u_(t,t.return,s);break}case x:{oc(t,t.return);break}case I:{var h=t.memoizedState!==null;if(h){nN(e);continue}break}}n!==null?(n.return=t,Ct=n):nN(e)}}function nN(e){for(;Ct!==null;){var t=Ct;if(t===e){Ct=null;return}var n=t.sibling;if(n!==null){n.return=t.return,Ct=n;return}Ct=t.return}}function DL(e){for(;Ct!==null;){var t=Ct,n=t.child;if(t.tag===I){var s=t.memoizedState!==null;if(s){iN(e);continue}}n!==null?(n.return=t,Ct=n):iN(e)}}function iN(e){for(;Ct!==null;){var t=Ct;Yt(t);try{gL(t)}catch(s){ui(t,t.return,s)}if(Pn(),t===e){Ct=null;return}var n=t.sibling;if(n!==null){n.return=t.return,Ct=n;return}Ct=t.return}}function kL(e,t,n,s){Ct=t,RL(t,e,n,s)}function RL(e,t,n,s){for(;Ct!==null;){var h=Ct,C=h.child;(h.subtreeFlags&jl)!==Gt&&C!==null?(C.return=h,Ct=C):TL(e,t,n,s)}}function TL(e,t,n,s){for(;Ct!==null;){var h=Ct;if((h.flags&Ga)!==Gt){Yt(h);try{LL(t,h,n,s)}catch(M){ui(h,h.return,M)}Pn()}if(h===e){Ct=null;return}var C=h.sibling;if(C!==null){C.return=h.return,Ct=C;return}Ct=h.return}}function LL(e,t,n,s){switch(t.tag){case u:case _:case k:{if(t.mode&ti){Lg();try{uo(yr|qi,t)}finally{Tg(t)}}else uo(yr|qi,t);break}}}function AL(e){Ct=e,ML()}function ML(){for(;Ct!==null;){var e=Ct,t=e.child;if((Ct.flags&No)!==Gt){var n=e.deletions;if(n!==null){for(var s=0;s<n.length;s++){var h=n[s];Ct=h,PL(h,e)}{var C=e.alternate;if(C!==null){var M=C.child;if(M!==null){C.child=null;do{var B=M.sibling;M.sibling=null,M=B}while(M!==null)}}}Ct=e}}(e.subtreeFlags&jl)!==Gt&&t!==null?(t.return=e,Ct=t):UL()}}function UL(){for(;Ct!==null;){var e=Ct;(e.flags&Ga)!==Gt&&(Yt(e),OL(e),Pn());var t=e.sibling;if(t!==null){t.return=e.return,Ct=t;return}Ct=e.return}}function OL(e){switch(e.tag){case u:case _:case k:{e.mode&ti?(Lg(),Fs(yr|qi,e,e.return),Tg(e)):Fs(yr|qi,e,e.return);break}}}function PL(e,t){for(;Ct!==null;){var n=Ct;Yt(n),IL(n,t),Pn();var s=n.child;s!==null?(s.return=n,Ct=s):VL(e)}}function VL(e){for(;Ct!==null;){var t=Ct,n=t.sibling,s=t.return;if(K0(t),t===e){Ct=null;return}if(n!==null){n.return=s,Ct=n;return}Ct=s}}function IL(e,t){switch(e.tag){case u:case _:case k:{e.mode&ti?(Lg(),Fs(yr,e,t),Tg(e)):Fs(yr,e,t);break}}}function BL(e){switch(e.tag){case u:case _:case k:{try{uo(Ki|qi,e)}catch(n){ui(e,e.return,n)}break}case m:{var t=e.stateNode;try{t.componentDidMount()}catch(n){ui(e,e.return,n)}break}}}function FL(e){switch(e.tag){case u:case _:case k:{try{uo(yr|qi,e)}catch(t){ui(e,e.return,t)}break}}}function HL(e){switch(e.tag){case u:case _:case k:{try{Fs(Ki|qi,e,e.return)}catch(n){ui(e,e.return,n)}break}case m:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&u_(e,e.return,t);break}}}function zL(e){switch(e.tag){case u:case _:case k:try{Fs(yr|qi,e,e.return)}catch(t){ui(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var Xu=Symbol.for;Xu("selector.component"),Xu("selector.has_pseudo_class"),Xu("selector.role"),Xu("selector.test_id"),Xu("selector.text")}var $L=[];function WL(){$L.forEach(function(e){return e()})}var GL=l.ReactCurrentActQueue;function YL(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,n=typeof jest<"u";return n&&t!==!1}}function rN(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&GL.current!==null&&y("The current testing environment is not configured to support act(...)"),e}}var qL=Math.ceil,f_=l.ReactCurrentDispatcher,p_=l.ReactCurrentOwner,Sr=l.ReactCurrentBatchConfig,$s=l.ReactCurrentActQueue,Zi=0,sN=1,Cr=2,Es=4,Aa=0,Ju=1,Go=2,Im=3,Zu=4,aN=5,v_=6,Dn=Zi,zr=null,ki=null,Qi=Qe,aa=Qe,g_=to(Qe),er=Aa,Qu=null,Bm=Qe,ed=Qe,Fm=Qe,td=null,ts=null,__=0,oN=500,lN=1/0,KL=500,Ma=null;function nd(){lN=ur()+KL}function cN(){return lN}var Hm=!1,b_=null,lc=null,Yo=!1,mo=null,id=Qe,y_=[],w_=null,XL=50,rd=0,x_=null,N_=!1,zm=!1,JL=50,cc=0,$m=null,sd=fi,Wm=Qe,uN=!1;function Gm(){return zr}function $r(){return(Dn&(Cr|Es))!==Zi?ur():(sd!==fi||(sd=ur()),sd)}function fo(e){var t=e.mode;if((t&jn)===It)return en;if((Dn&Cr)!==Zi&&Qi!==Qe)return Jc(Qi);var n=GT()!==WT;if(n){if(Sr.transition!==null){var s=Sr.transition;s._updatedFibers||(s._updatedFibers=new Set),s._updatedFibers.add(e)}return Wm===hr&&(Wm=Wy()),Wm}var h=As();if(h!==hr)return h;var C=RR();return C}function ZL(e){var t=e.mode;return(t&jn)===It?en:eD()}function tr(e,t,n,s){xA(),uN&&y("useInsertionEffect must not schedule updates."),N_&&(zm=!0),Zc(e,n,s),(Dn&Cr)!==Qe&&e===zr?CA(t):(Ls&&qy(e,t,n),EA(t),e===zr&&((Dn&Cr)===Zi&&(ed=ln(ed,n)),er===Zu&&po(e,Qi)),ns(e,s),n===en&&Dn===Zi&&(t.mode&jn)===It&&!$s.isBatchingLegacy&&(nd(),ux()))}function QL(e,t,n){var s=e.current;s.lanes=t,Zc(e,t,n),ns(e,n)}function eA(e){return(Dn&Cr)!==Zi}function ns(e,t){var n=e.callbackNode;qj(e,t);var s=mh(e,e===zr?Qi:Qe);if(s===Qe){n!==null&&EN(n),e.callbackNode=null,e.callbackPriority=hr;return}var h=To(s),C=e.callbackPriority;if(C===h&&!($s.current!==null&&n!==R_)){n==null&&C!==en&&y("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}n!=null&&EN(n);var M;if(h===en)e.tag===no?($s.isBatchingLegacy!==null&&($s.didScheduleLegacyUpdate=!0),DT(mN.bind(null,e))):cx(mN.bind(null,e)),$s.current!==null?$s.current.push(io):LR(function(){(Dn&(Cr|Es))===Zi&&io()}),M=null;else{var B;switch(Jy(s)){case cs:B=ch;break;case Sa:B=bp;break;case Ca:B=Do;break;case vh:B=yp;break;default:B=Do;break}M=T_(B,dN.bind(null,e))}e.callbackPriority=h,e.callbackNode=M}function dN(e,t){if(_5(),sd=fi,Wm=Qe,(Dn&(Cr|Es))!==Zi)throw new Error("Should not already be working.");var n=e.callbackNode,s=Oa();if(s&&e.callbackNode!==n)return null;var h=mh(e,e===zr?Qi:Qe);if(h===Qe)return null;var C=!fh(e,h)&&!Qj(e,h)&&!t,M=C?uA(e,h):qm(e,h);if(M!==Aa){if(M===Go){var B=Hp(e);B!==Qe&&(h=B,M=S_(e,B))}if(M===Ju){var z=Qu;throw qo(e,Qe),po(e,h),ns(e,ur()),z}if(M===v_)po(e,h);else{var ee=!fh(e,h),ne=e.current.alternate;if(ee&&!nA(ne)){if(M=qm(e,h),M===Go){var fe=Hp(e);fe!==Qe&&(h=fe,M=S_(e,fe))}if(M===Ju){var me=Qu;throw qo(e,Qe),po(e,h),ns(e,ur()),me}}e.finishedWork=ne,e.finishedLanes=h,tA(e,M,h)}}return ns(e,ur()),e.callbackNode===n?dN.bind(null,e):null}function S_(e,t){var n=td;if(gh(e)){var s=qo(e,t);s.flags|=ya,wT(e.containerInfo)}var h=qm(e,t);if(h!==Go){var C=ts;ts=n,C!==null&&hN(C)}return h}function hN(e){ts===null?ts=e:ts.push.apply(ts,e)}function tA(e,t,n){switch(t){case Aa:case Ju:throw new Error("Root did not complete. This is a bug in React.");case Go:{Ko(e,ts,Ma);break}case Im:{if(po(e,n),zy(n)&&!jN()){var s=__+oN-ur();if(s>10){var h=mh(e,Qe);if(h!==Qe)break;var C=e.suspendedLanes;if(!Al(C,n)){$r(),Yy(e,C);break}e.timeoutHandle=wv(Ko.bind(null,e,ts,Ma),s);break}}Ko(e,ts,Ma);break}case Zu:{if(po(e,n),Zj(n))break;if(!jN()){var M=Gj(e,n),B=M,z=ur()-B,ee=wA(z)-z;if(ee>10){e.timeoutHandle=wv(Ko.bind(null,e,ts,Ma),ee);break}}Ko(e,ts,Ma);break}case aN:{Ko(e,ts,Ma);break}default:throw new Error("Unknown root exit status.")}}function nA(e){for(var t=e;;){if(t.flags&hp){var n=t.updateQueue;if(n!==null){var s=n.stores;if(s!==null)for(var h=0;h<s.length;h++){var C=s[h],M=C.getSnapshot,B=C.value;try{if(!ds(M(),B))return!1}catch{return!1}}}}var z=t.child;if(t.subtreeFlags&hp&&z!==null){z.return=t,t=z;continue}if(t===e)return!0;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 po(e,t){t=ph(t,Fm),t=ph(t,ed),nD(e,t)}function mN(e){if(b5(),(Dn&(Cr|Es))!==Zi)throw new Error("Should not already be working.");Oa();var t=mh(e,Qe);if(!ls(t,en))return ns(e,ur()),null;var n=qm(e,t);if(e.tag!==no&&n===Go){var s=Hp(e);s!==Qe&&(t=s,n=S_(e,s))}if(n===Ju){var h=Qu;throw qo(e,Qe),po(e,t),ns(e,ur()),h}if(n===v_)throw new Error("Root did not complete. This is a bug in React.");var C=e.current.alternate;return e.finishedWork=C,e.finishedLanes=t,Ko(e,ts,Ma),ns(e,ur()),null}function iA(e,t){t!==Qe&&(Gp(e,ln(t,en)),ns(e,ur()),(Dn&(Cr|Es))===Zi&&(nd(),io()))}function C_(e,t){var n=Dn;Dn|=sN;try{return e(t)}finally{Dn=n,Dn===Zi&&!$s.isBatchingLegacy&&(nd(),ux())}}function rA(e,t,n,s,h){var C=As(),M=Sr.transition;try{return Sr.transition=null,mr(cs),e(t,n,s,h)}finally{mr(C),Sr.transition=M,Dn===Zi&&nd()}}function Ua(e){mo!==null&&mo.tag===no&&(Dn&(Cr|Es))===Zi&&Oa();var t=Dn;Dn|=sN;var n=Sr.transition,s=As();try{return Sr.transition=null,mr(cs),e?e():void 0}finally{mr(s),Sr.transition=n,Dn=t,(Dn&(Cr|Es))===Zi&&io()}}function fN(){return(Dn&(Cr|Es))!==Zi}function Ym(e,t){Ar(g_,aa,e),aa=ln(aa,t)}function E_(e){aa=g_.current,Lr(g_,e)}function qo(e,t){e.finishedWork=null,e.finishedLanes=Qe;var n=e.timeoutHandle;if(n!==xv&&(e.timeoutHandle=xv,TR(n)),ki!==null)for(var s=ki.return;s!==null;){var h=s.alternate;z0(h,s),s=s.return}zr=e;var C=Xo(e.current,null);return ki=C,Qi=aa=t,er=Aa,Qu=null,Bm=Qe,ed=Qe,Fm=Qe,td=null,ts=null,QT(),Os.discardPendingWarnings(),C}function pN(e,t){do{var n=ki;try{if(im(),Ix(),Pn(),p_.current=null,n===null||n.return===null){er=Ju,Qu=t,ki=null;return}if(de&&n.mode&ti&&Lm(n,!0),oe)if(kl(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var s=t;Mj(n,s,Qi)}else Aj(n,t,Qi);D5(e,n.return,n,t,Qi),bN(n)}catch(h){t=h,ki===n&&n!==null?(n=n.return,ki=n):n=ki;continue}return}while(!0)}function vN(){var e=f_.current;return f_.current=jm,e===null?jm:e}function gN(e){f_.current=e}function sA(){__=ur()}function ad(e){Bm=ln(e,Bm)}function aA(){er===Aa&&(er=Im)}function j_(){(er===Aa||er===Im||er===Go)&&(er=Zu),zr!==null&&(zp(Bm)||zp(ed))&&po(zr,Qi)}function oA(e){er!==Zu&&(er=Go),td===null?td=[e]:td.push(e)}function lA(){return er===Aa}function qm(e,t){var n=Dn;Dn|=Cr;var s=vN();if(zr!==e||Qi!==t){if(Ls){var h=e.memoizedUpdaters;h.size>0&&(od(e,Qi),h.clear()),Ky(e,t)}Ma=Xy(),qo(e,t)}Vy(t);do try{cA();break}catch(C){pN(e,C)}while(!0);if(im(),Dn=n,gN(s),ki!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Iy(),zr=null,Qi=Qe,er}function cA(){for(;ki!==null;)_N(ki)}function uA(e,t){var n=Dn;Dn|=Cr;var s=vN();if(zr!==e||Qi!==t){if(Ls){var h=e.memoizedUpdaters;h.size>0&&(od(e,Qi),h.clear()),Ky(e,t)}Ma=Xy(),nd(),qo(e,t)}Vy(t);do try{dA();break}catch(C){pN(e,C)}while(!0);return im(),gN(s),Dn=n,ki!==null?(Ij(),Aa):(Iy(),zr=null,Qi=Qe,er)}function dA(){for(;ki!==null&&!mj();)_N(ki)}function _N(e){var t=e.alternate;Yt(e);var n;(e.mode&ti)!==It?(Rg(e),n=D_(t,e,aa),Lm(e,!0)):n=D_(t,e,aa),Pn(),e.memoizedProps=e.pendingProps,n===null?bN(e):ki=n,p_.current=null}function bN(e){var t=e;do{var n=t.alternate,s=t.return;if((t.flags&lh)===Gt){Yt(t);var h=void 0;if((t.mode&ti)===It?h=H0(n,t,aa):(Rg(t),h=H0(n,t,aa),Lm(t,!1)),Pn(),h!==null){ki=h;return}}else{var C=aL(n,t);if(C!==null){C.flags&=oj,ki=C;return}if((t.mode&ti)!==It){Lm(t,!1);for(var M=t.actualDuration,B=t.child;B!==null;)M+=B.actualDuration,B=B.sibling;t.actualDuration=M}if(s!==null)s.flags|=lh,s.subtreeFlags=Gt,s.deletions=null;else{er=v_,ki=null;return}}var z=t.sibling;if(z!==null){ki=z;return}t=s,ki=t}while(t!==null);er===Aa&&(er=aN)}function Ko(e,t,n){var s=As(),h=Sr.transition;try{Sr.transition=null,mr(cs),hA(e,t,n,s)}finally{Sr.transition=h,mr(s)}return null}function hA(e,t,n,s){do Oa();while(mo!==null);if(NA(),(Dn&(Cr|Es))!==Zi)throw new Error("Should not already be working.");var h=e.finishedWork,C=e.finishedLanes;if(Ej(C),h===null)return Uy(),null;if(C===Qe&&y("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=Qe,h===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=hr;var M=ln(h.lanes,h.childLanes);iD(e,M),e===zr&&(zr=null,ki=null,Qi=Qe),((h.subtreeFlags&jl)!==Gt||(h.flags&jl)!==Gt)&&(Yo||(Yo=!0,w_=n,T_(Do,function(){return Oa(),null})));var B=(h.subtreeFlags&(gp|_p|$c|jl))!==Gt,z=(h.flags&(gp|_p|$c|jl))!==Gt;if(B||z){var ee=Sr.transition;Sr.transition=null;var ne=As();mr(cs);var fe=Dn;Dn|=Es,p_.current=null,dL(e,h),u0(),CL(e,h,C),SR(e.containerInfo),e.current=h,Uj(C),EL(h,e,C),Oj(),fj(),Dn=fe,mr(ne),Sr.transition=ee}else e.current=h,u0();var me=Yo;if(Yo?(Yo=!1,mo=e,id=C):(cc=0,$m=null),M=e.pendingLanes,M===Qe&&(lc=null),me||NN(e.current,!1),wj(h.stateNode,s),Ls&&e.memoizedUpdaters.clear(),WL(),ns(e,ur()),t!==null)for(var De=e.onRecoverableError,ke=0;ke<t.length;ke++){var Ie=t[ke],mt=Ie.stack,Ut=Ie.digest;De(Ie.value,{componentStack:mt,digest:Ut})}if(Hm){Hm=!1;var Dt=b_;throw b_=null,Dt}return ls(id,en)&&e.tag!==no&&Oa(),M=e.pendingLanes,ls(M,en)?(g5(),e===x_?rd++:(rd=0,x_=e)):rd=0,io(),Uy(),null}function Oa(){if(mo!==null){var e=Jy(id),t=oD(Ca,e),n=Sr.transition,s=As();try{return Sr.transition=null,mr(t),fA()}finally{mr(s),Sr.transition=n}}return!1}function mA(e){y_.push(e),Yo||(Yo=!0,T_(Do,function(){return Oa(),null}))}function fA(){if(mo===null)return!1;var e=w_;w_=null;var t=mo,n=id;if(mo=null,id=Qe,(Dn&(Cr|Es))!==Zi)throw new Error("Cannot flush passive effects while already rendering.");N_=!0,zm=!1,Pj(n);var s=Dn;Dn|=Es,AL(t.current),kL(t,t.current,n,e);{var h=y_;y_=[];for(var C=0;C<h.length;C++){var M=h[C];pL(t,M)}}Vj(),NN(t.current,!0),Dn=s,io(),zm?t===$m?cc++:(cc=0,$m=t):cc=0,N_=!1,zm=!1,xj(t);{var B=t.current.stateNode;B.effectDuration=0,B.passiveEffectDuration=0}return!0}function yN(e){return lc!==null&&lc.has(e)}function pA(e){lc===null?lc=new Set([e]):lc.add(e)}function vA(e){Hm||(Hm=!0,b_=e)}var gA=vA;function wN(e,t,n){var s=$o(n,t),h=_0(e,s,en),C=so(e,h,en),M=$r();C!==null&&(Zc(C,en,M),ns(C,M))}function ui(e,t,n){if(lL(n),ld(!1),e.tag===d){wN(e,e,n);return}var s=null;for(s=t;s!==null;){if(s.tag===d){wN(s,e,n);return}else if(s.tag===m){var h=s.type,C=s.stateNode;if(typeof h.getDerivedStateFromError=="function"||typeof C.componentDidCatch=="function"&&!yN(C)){var M=$o(n,e),B=qg(s,M,en),z=so(s,B,en),ee=$r();z!==null&&(Zc(z,en,ee),ns(z,ee));return}}s=s.return}y(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
175
+
176
+ Error message:
177
+
178
+ %s`,n)}function _A(e,t,n){var s=e.pingCache;s!==null&&s.delete(t);var h=$r();Yy(e,n),jA(e),zr===e&&Al(Qi,n)&&(er===Zu||er===Im&&zy(Qi)&&ur()-__<oN?qo(e,Qe):Fm=ln(Fm,n)),ns(e,h)}function xN(e,t){t===hr&&(t=ZL(e));var n=$r(),s=Qr(e,t);s!==null&&(Zc(s,t,n),ns(s,n))}function bA(e){var t=e.memoizedState,n=hr;t!==null&&(n=t.retryLane),xN(e,n)}function yA(e,t){var n=hr,s;switch(e.tag){case T:s=e.stateNode;var h=e.memoizedState;h!==null&&(n=h.retryLane);break;case F:s=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}s!==null&&s.delete(t),xN(e,n)}function wA(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:qL(e/1960)*1960}function xA(){if(rd>XL)throw rd=0,x_=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");cc>JL&&(cc=0,$m=null,y("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function NA(){Os.flushLegacyContextWarning(),Os.flushPendingUnsafeLifecycleWarnings()}function NN(e,t){Yt(e),Km(e,Ya,HL),t&&Km(e,vp,zL),Km(e,Ya,BL),t&&Km(e,vp,FL),Pn()}function Km(e,t,n){for(var s=e,h=null;s!==null;){var C=s.subtreeFlags&t;s!==h&&s.child!==null&&C!==Gt?s=s.child:((s.flags&t)!==Gt&&n(s),s.sibling!==null?s=s.sibling:s=h=s.return)}}var Xm=null;function SN(e){{if((Dn&Cr)!==Zi||!(e.mode&jn))return;var t=e.tag;if(t!==b&&t!==d&&t!==m&&t!==u&&t!==_&&t!==S&&t!==k)return;var n=te(e)||"ReactComponent";if(Xm!==null){if(Xm.has(n))return;Xm.add(n)}else Xm=new Set([n]);var s=Ve;try{Yt(e),y("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{s?Yt(e):Pn()}}}var D_;{var SA=null;D_=function(e,t,n){var s=LN(SA,t);try{return P0(e,t,n)}catch(C){if(OT()||C!==null&&typeof C=="object"&&typeof C.then=="function")throw C;if(im(),Ix(),z0(e,t),LN(t,s),t.mode&ti&&Rg(t),up(null,P0,null,e,t,n),rj()){var h=dp();typeof h=="object"&&h!==null&&h._suppressLogging&&typeof C=="object"&&C!==null&&!C._suppressLogging&&(C._suppressLogging=!0)}throw C}}}var CN=!1,k_;k_=new Set;function CA(e){if(wt&&!f5())switch(e.tag){case u:case _:case k:{var t=ki&&te(ki)||"Unknown",n=t;if(!k_.has(n)){k_.add(n);var s=te(e)||"Unknown";y("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",s,t,t)}break}case m:{CN||(y("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),CN=!0);break}}}function od(e,t){if(Ls){var n=e.memoizedUpdaters;n.forEach(function(s){qy(e,s,t)})}}var R_={};function T_(e,t){{var n=$s.current;return n!==null?(n.push(t),R_):My(e,t)}}function EN(e){if(e!==R_)return hj(e)}function jN(){return $s.current!==null}function EA(e){{if(e.mode&jn){if(!rN())return}else if(!YL()||Dn!==Zi||e.tag!==u&&e.tag!==_&&e.tag!==k)return;if($s.current===null){var t=Ve;try{Yt(e),y(`An update to %s inside a test was not wrapped in act(...).
179
+
180
+ When testing, code that causes React state updates should be wrapped into act(...):
181
+
182
+ act(() => {
183
+ /* fire events that update state */
184
+ });
185
+ /* assert on the output */
186
+
187
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,te(e))}finally{t?Yt(e):Pn()}}}}function jA(e){e.tag!==no&&rN()&&$s.current===null&&y(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
188
+
189
+ When testing, code that resolves suspended data should be wrapped into act(...):
190
+
191
+ act(() => {
192
+ /* finish loading suspended data */
193
+ });
194
+ /* assert on the output */
195
+
196
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function ld(e){uN=e}var js=null,uc=null,DA=function(e){js=e};function dc(e){{if(js===null)return e;var t=js(e);return t===void 0?e:t.current}}function L_(e){return dc(e)}function A_(e){{if(js===null)return e;var t=js(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var n=dc(e.render);if(e.render!==n){var s={$$typeof:ge,render:n};return e.displayName!==void 0&&(s.displayName=e.displayName),s}}return e}return t.current}}function DN(e,t){{if(js===null)return!1;var n=e.elementType,s=t.type,h=!1,C=typeof s=="object"&&s!==null?s.$$typeof:null;switch(e.tag){case m:{typeof s=="function"&&(h=!0);break}case u:{(typeof s=="function"||C===vt)&&(h=!0);break}case _:{(C===ge||C===vt)&&(h=!0);break}case S:case k:{(C===Le||C===vt)&&(h=!0);break}default:return!1}if(h){var M=js(n);if(M!==void 0&&M===js(s))return!0}return!1}}function kN(e){{if(js===null||typeof WeakSet!="function")return;uc===null&&(uc=new WeakSet),uc.add(e)}}var kA=function(e,t){{if(js===null)return;var n=t.staleFamilies,s=t.updatedFamilies;Oa(),Ua(function(){M_(e.current,s,n)})}},RA=function(e,t){{if(e.context!==hs)return;Oa(),Ua(function(){cd(t,e,null,null)})}};function M_(e,t,n){{var s=e.alternate,h=e.child,C=e.sibling,M=e.tag,B=e.type,z=null;switch(M){case u:case k:case m:z=B;break;case _:z=B.render;break}if(js===null)throw new Error("Expected resolveFamily to be set during hot reload.");var ee=!1,ne=!1;if(z!==null){var fe=js(z);fe!==void 0&&(n.has(fe)?ne=!0:t.has(fe)&&(M===m?ne=!0:ee=!0))}if(uc!==null&&(uc.has(e)||s!==null&&uc.has(s))&&(ne=!0),ne&&(e._debugNeedsRemount=!0),ne||ee){var me=Qr(e,en);me!==null&&tr(me,e,en,fi)}h!==null&&!ne&&M_(h,t,n),C!==null&&M_(C,t,n)}}var TA=function(e,t){{var n=new Set,s=new Set(t.map(function(h){return h.current}));return U_(e.current,s,n),n}};function U_(e,t,n){{var s=e.child,h=e.sibling,C=e.tag,M=e.type,B=null;switch(C){case u:case k:case m:B=M;break;case _:B=M.render;break}var z=!1;B!==null&&t.has(B)&&(z=!0),z?LA(e,n):s!==null&&U_(s,t,n),h!==null&&U_(h,t,n)}}function LA(e,t){{var n=AA(e,t);if(n)return;for(var s=e;;){switch(s.tag){case x:t.add(s.stateNode);return;case w:t.add(s.stateNode.containerInfo);return;case d:t.add(s.stateNode.containerInfo);return}if(s.return===null)throw new Error("Expected to reach root first.");s=s.return}}}function AA(e,t){for(var n=e,s=!1;;){if(n.tag===x)s=!0,t.add(n.stateNode);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)return s;for(;n.sibling===null;){if(n.return===null||n.return===e)return s;n=n.return}n.sibling.return=n.return,n=n.sibling}return!1}var O_;{O_=!1;try{var RN=Object.preventExtensions({})}catch{O_=!0}}function MA(e,t,n,s){this.tag=e,this.key=n,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=s,this.flags=Gt,this.subtreeFlags=Gt,this.deletions=null,this.lanes=Qe,this.childLanes=Qe,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!O_&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var ms=function(e,t,n,s){return new MA(e,t,n,s)};function P_(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function UA(e){return typeof e=="function"&&!P_(e)&&e.defaultProps===void 0}function OA(e){if(typeof e=="function")return P_(e)?m:u;if(e!=null){var t=e.$$typeof;if(t===ge)return _;if(t===Le)return S}return b}function Xo(e,t){var n=e.alternate;n===null?(n=ms(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugSource=e._debugSource,n._debugOwner=e._debugOwner,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=Gt,n.subtreeFlags=Gt,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&xa,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue;var s=e.dependencies;switch(n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case b:case u:case k:n.type=dc(e.type);break;case m:n.type=L_(e.type);break;case _:n.type=A_(e.type);break}return n}function PA(e,t){e.flags&=xa|zi;var n=e.alternate;if(n===null)e.childLanes=Qe,e.lanes=t,e.child=null,e.subtreeFlags=Gt,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=Gt,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type;var s=n.dependencies;e.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration}return e}function VA(e,t,n){var s;return e===Yh?(s=jn,t===!0&&(s|=Li,s|=Xs)):s=It,Ls&&(s|=ti),ms(d,null,null,s)}function V_(e,t,n,s,h,C){var M=b,B=e;if(typeof e=="function")P_(e)?(M=m,B=L_(B)):B=dc(B);else if(typeof e=="string")M=x;else e:switch(e){case di:return vo(n.children,h,C,t);case nt:M=o,h|=Li,(h&jn)!==It&&(h|=Xs);break;case ae:return IA(n,h,C,t);case qe:return BA(n,h,C,t);case it:return FA(n,h,C,t);case Xt:return TN(n,h,C,t);case yn:case Ln:case Et:case Jt:case Qt:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fe:M=f;break e;case st:M=p;break e;case ge:M=_,B=A_(B);break e;case Le:M=S;break e;case vt:M=D,B=null;break e}var z="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ee=s?te(s):null;ee&&(z+=`
197
+
198
+ Check the render method of \``+ee+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(e==null?e:typeof e)+"."+z))}}var ne=ms(M,n,t,h);return ne.elementType=e,ne.type=B,ne.lanes=C,ne._debugOwner=s,ne}function I_(e,t,n){var s=null;s=e._owner;var h=e.type,C=e.key,M=e.props,B=V_(h,C,M,s,t,n);return B._debugSource=e._source,B._debugOwner=e._owner,B}function vo(e,t,n,s){var h=ms(v,e,s,t);return h.lanes=n,h}function IA(e,t,n,s){typeof e.id!="string"&&y('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var h=ms(E,e,s,t|ti);return h.elementType=ae,h.lanes=n,h.stateNode={effectDuration:0,passiveEffectDuration:0},h}function BA(e,t,n,s){var h=ms(T,e,s,t);return h.elementType=qe,h.lanes=n,h}function FA(e,t,n,s){var h=ms(F,e,s,t);return h.elementType=it,h.lanes=n,h}function TN(e,t,n,s){var h=ms(I,e,s,t);h.elementType=Xt,h.lanes=n;var C={isHidden:!1};return h.stateNode=C,h}function B_(e,t,n){var s=ms(j,e,null,t);return s.lanes=n,s}function HA(){var e=ms(x,null,null,It);return e.elementType="DELETED",e}function zA(e){var t=ms(U,null,null,It);return t.stateNode=e,t}function F_(e,t,n){var s=e.children!==null?e.children:[],h=ms(w,s,e.key,t);return h.lanes=n,h.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},h}function LN(e,t){return e===null&&(e=ms(b,null,null,It)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function $A(e,t,n,s,h){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=xv,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=hr,this.eventTimes=Wp(Qe),this.expirationTimes=Wp(fi),this.pendingLanes=Qe,this.suspendedLanes=Qe,this.pingedLanes=Qe,this.expiredLanes=Qe,this.mutableReadLanes=Qe,this.finishedLanes=Qe,this.entangledLanes=Qe,this.entanglements=Wp(Qe),this.identifierPrefix=s,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var C=this.pendingUpdatersLaneMap=[],M=0;M<xp;M++)C.push(new Set)}switch(t){case Yh:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case no:this._debugRootType=n?"hydrate()":"render()";break}}function AN(e,t,n,s,h,C,M,B,z,ee){var ne=new $A(e,t,n,B,z),fe=VA(t,C);ne.current=fe,fe.stateNode=ne;{var me={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};fe.memoizedState=me}return eg(fe),ne}var H_="18.3.1";function WA(e,t,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Xe(s),{$$typeof:un,key:s==null?null:""+s,children:e,containerInfo:t,implementation:n}}var z_,$_;z_=!1,$_={};function MN(e){if(!e)return hs;var t=Sl(e),n=jT(t);if(t.tag===m){var s=t.type;if(Qs(s))return ox(t,s,n)}return n}function GA(e,t){{var n=Sl(e);if(n===void 0){if(typeof e.render=="function")throw new Error("Unable to find node on an unmounted component.");var s=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+s)}var h=Ty(n);if(h===null)return null;if(h.mode&Li){var C=te(n)||"Component";if(!$_[C]){$_[C]=!0;var M=Ve;try{Yt(h),n.mode&Li?y("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,C):y("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,C)}finally{M?Yt(M):Pn()}}}return h.stateNode}}function UN(e,t,n,s,h,C,M,B){var z=!1,ee=null;return AN(e,t,z,ee,n,s,h,C,M)}function ON(e,t,n,s,h,C,M,B,z,ee){var ne=!0,fe=AN(n,s,ne,e,h,C,M,B,z);fe.context=MN(null);var me=fe.current,De=$r(),ke=fo(me),Ie=Ta(De,ke);return Ie.callback=t??null,so(me,Ie,ke),QL(fe,ke,De),fe}function cd(e,t,n,s){yj(t,e);var h=t.current,C=$r(),M=fo(h);Bj(M);var B=MN(n);t.context===null?t.context=B:t.pendingContext=B,wt&&Ve!==null&&!z_&&(z_=!0,y(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
199
+
200
+ Check the render method of %s.`,te(Ve)||"Unknown"));var z=Ta(C,M);z.payload={element:e},s=s===void 0?null:s,s!==null&&(typeof s!="function"&&y("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",s),z.callback=s);var ee=so(h,z,M);return ee!==null&&(tr(ee,h,M,C),lm(ee,h,M)),M}function Jm(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case x:return t.child.stateNode;default:return t.child.stateNode}}function YA(e){switch(e.tag){case d:{var t=e.stateNode;if(gh(t)){var n=Kj(t);iA(t,n)}break}case T:{Ua(function(){var h=Qr(e,en);if(h!==null){var C=$r();tr(h,e,en,C)}});var s=en;W_(e,s);break}}}function PN(e,t){var n=e.memoizedState;n!==null&&n.dehydrated!==null&&(n.retryLane=tD(n.retryLane,t))}function W_(e,t){PN(e,t);var n=e.alternate;n&&PN(n,t)}function qA(e){if(e.tag===T){var t=qc,n=Qr(e,t);if(n!==null){var s=$r();tr(n,e,t,s)}W_(e,t)}}function KA(e){if(e.tag===T){var t=fo(e),n=Qr(e,t);if(n!==null){var s=$r();tr(n,e,t,s)}W_(e,t)}}function VN(e){var t=dj(e);return t===null?null:t.stateNode}var IN=function(e){return null};function XA(e){return IN(e)}var BN=function(e){return!1};function JA(e){return BN(e)}var FN=null,HN=null,zN=null,$N=null,WN=null,GN=null,YN=null,qN=null,KN=null;{var XN=function(e,t,n){var s=t[n],h=on(e)?e.slice():Pt({},e);return n+1===t.length?(on(h)?h.splice(s,1):delete h[s],h):(h[s]=XN(e[s],t,n+1),h)},JN=function(e,t){return XN(e,t,0)},ZN=function(e,t,n,s){var h=t[s],C=on(e)?e.slice():Pt({},e);if(s+1===t.length){var M=n[s];C[M]=C[h],on(C)?C.splice(h,1):delete C[h]}else C[h]=ZN(e[h],t,n,s+1);return C},QN=function(e,t,n){if(t.length!==n.length){R("copyWithRename() expects paths of the same length");return}else for(var s=0;s<n.length-1;s++)if(t[s]!==n[s]){R("copyWithRename() expects paths to be the same except for the deepest key");return}return ZN(e,t,n,0)},e1=function(e,t,n,s){if(n>=t.length)return s;var h=t[n],C=on(e)?e.slice():Pt({},e);return C[h]=e1(e[h],t,n+1,s),C},t1=function(e,t,n){return e1(e,t,0,n)},G_=function(e,t){for(var n=e.memoizedState;n!==null&&t>0;)n=n.next,t--;return n};FN=function(e,t,n,s){var h=G_(e,t);if(h!==null){var C=t1(h.memoizedState,n,s);h.memoizedState=C,h.baseState=C,e.memoizedProps=Pt({},e.memoizedProps);var M=Qr(e,en);M!==null&&tr(M,e,en,fi)}},HN=function(e,t,n){var s=G_(e,t);if(s!==null){var h=JN(s.memoizedState,n);s.memoizedState=h,s.baseState=h,e.memoizedProps=Pt({},e.memoizedProps);var C=Qr(e,en);C!==null&&tr(C,e,en,fi)}},zN=function(e,t,n,s){var h=G_(e,t);if(h!==null){var C=QN(h.memoizedState,n,s);h.memoizedState=C,h.baseState=C,e.memoizedProps=Pt({},e.memoizedProps);var M=Qr(e,en);M!==null&&tr(M,e,en,fi)}},$N=function(e,t,n){e.pendingProps=t1(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var s=Qr(e,en);s!==null&&tr(s,e,en,fi)},WN=function(e,t){e.pendingProps=JN(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=Qr(e,en);n!==null&&tr(n,e,en,fi)},GN=function(e,t,n){e.pendingProps=QN(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var s=Qr(e,en);s!==null&&tr(s,e,en,fi)},YN=function(e){var t=Qr(e,en);t!==null&&tr(t,e,en,fi)},qN=function(e){IN=e},KN=function(e){BN=e}}function ZA(e){var t=Ty(e);return t===null?null:t.stateNode}function QA(e){return null}function eM(){return Ve}function tM(e){var t=e.findFiberByHostInstance,n=l.ReactCurrentDispatcher;return bj({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:FN,overrideHookStateDeletePath:HN,overrideHookStateRenamePath:zN,overrideProps:$N,overridePropsDeletePath:WN,overridePropsRenamePath:GN,setErrorHandler:qN,setSuspenseHandler:KN,scheduleUpdate:YN,currentDispatcherRef:n,findHostInstanceByFiber:ZA,findFiberByHostInstance:t||QA,findHostInstancesForRefresh:TA,scheduleRefresh:kA,scheduleRoot:RA,setRefreshHandler:DA,getCurrentFiber:eM,reconcilerVersion:H_})}var n1=typeof reportError=="function"?reportError:function(e){console.error(e)};function Y_(e){this._internalRoot=e}Zm.prototype.render=Y_.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?y("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):Qm(arguments[1])?y("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&y("You passed a second argument to root.render(...) but it only accepts one argument.");var n=t.containerInfo;if(n.nodeType!==gi){var s=VN(t.current);s&&s.parentNode!==n&&y("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}cd(e,t,null,null)},Zm.prototype.unmount=Y_.prototype.unmount=function(){typeof arguments[0]=="function"&&y("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fN()&&y("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Ua(function(){cd(null,e,null,null)}),nx(t)}};function nM(e,t){if(!Qm(e))throw new Error("createRoot(...): Target container is not a DOM element.");i1(e);var n=!1,s=!1,h="",C=n1;t!=null&&(t.hydrate?R("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===rn&&y(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
201
+
202
+ let root = createRoot(domContainer);
203
+ root.render(<App />);`),t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(h=t.identifierPrefix),t.onRecoverableError!==void 0&&(C=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var M=UN(e,Yh,null,n,s,h,C);Bh(M.current,e);var B=e.nodeType===gi?e.parentNode:e;return pu(B),new Y_(M)}function Zm(e){this._internalRoot=e}function iM(e){e&&_D(e)}Zm.prototype.unstable_scheduleHydration=iM;function rM(e,t,n){if(!Qm(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");i1(e),t===void 0&&y("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var s=n??null,h=n!=null&&n.hydratedSources||null,C=!1,M=!1,B="",z=n1;n!=null&&(n.unstable_strictMode===!0&&(C=!0),n.identifierPrefix!==void 0&&(B=n.identifierPrefix),n.onRecoverableError!==void 0&&(z=n.onRecoverableError));var ee=ON(t,null,e,Yh,s,C,M,B,z);if(Bh(ee.current,e),pu(e),h)for(var ne=0;ne<h.length;ne++){var fe=h[ne];l5(ee,fe)}return new Zm(ee)}function Qm(e){return!!(e&&(e.nodeType===Sn||e.nodeType===ss||e.nodeType===Ec))}function ud(e){return!!(e&&(e.nodeType===Sn||e.nodeType===ss||e.nodeType===Ec||e.nodeType===gi&&e.nodeValue===" react-mount-point-unstable "))}function i1(e){e.nodeType===Sn&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&y("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),Eu(e)&&(e._reactRootContainer?y("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):y("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var sM=l.ReactCurrentOwner,r1;r1=function(e){if(e._reactRootContainer&&e.nodeType!==gi){var t=VN(e._reactRootContainer.current);t&&t.parentNode!==e&&y("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,s=q_(e),h=!!(s&&eo(s));h&&!n&&y("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Sn&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&y("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function q_(e){return e?e.nodeType===ss?e.documentElement:e.firstChild:null}function s1(){}function aM(e,t,n,s,h){if(h){if(typeof s=="function"){var C=s;s=function(){var me=Jm(M);C.call(me)}}var M=ON(t,s,e,no,null,!1,!1,"",s1);e._reactRootContainer=M,Bh(M.current,e);var B=e.nodeType===gi?e.parentNode:e;return pu(B),Ua(),M}else{for(var z;z=e.lastChild;)e.removeChild(z);if(typeof s=="function"){var ee=s;s=function(){var me=Jm(ne);ee.call(me)}}var ne=UN(e,no,null,!1,!1,"",s1);e._reactRootContainer=ne,Bh(ne.current,e);var fe=e.nodeType===gi?e.parentNode:e;return pu(fe),Ua(function(){cd(t,ne,n,s)}),ne}}function oM(e,t){e!==null&&typeof e!="function"&&y("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function ef(e,t,n,s,h){r1(n),oM(h===void 0?null:h,"render");var C=n._reactRootContainer,M;if(!C)M=aM(n,t,e,h,s);else{if(M=C,typeof h=="function"){var B=h;h=function(){var z=Jm(M);B.call(z)}}cd(t,M,e,h)}return Jm(M)}var a1=!1;function lM(e){{a1||(a1=!0,y("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=sM.current;if(t!==null&&t.stateNode!==null){var n=t.stateNode._warnedAboutRefsInRender;n||y("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",dn(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Sn?e:GA(e,"findDOMNode")}function cM(e,t,n){if(y("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ud(t))throw new Error("Target container is not a DOM element.");{var s=Eu(t)&&t._reactRootContainer===void 0;s&&y("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return ef(null,e,t,!0,n)}function uM(e,t,n){if(y("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ud(t))throw new Error("Target container is not a DOM element.");{var s=Eu(t)&&t._reactRootContainer===void 0;s&&y("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return ef(null,e,t,!1,n)}function dM(e,t,n,s){if(y("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ud(n))throw new Error("Target container is not a DOM element.");if(e==null||!sj(e))throw new Error("parentComponent must be a valid React Component");return ef(e,t,n,!1,s)}var o1=!1;function hM(e){if(o1||(o1=!0,y("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!ud(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=Eu(e)&&e._reactRootContainer===void 0;t&&y("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var n=q_(e),s=n&&!eo(n);s&&y("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Ua(function(){ef(null,null,e,!1,function(){e._reactRootContainer=null,nx(e)})}),!0}else{{var h=q_(e),C=!!(h&&eo(h)),M=e.nodeType===Sn&&ud(e.parentNode)&&!!e.parentNode._reactRootContainer;C&&y("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",M?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}lD(YA),uD(qA),dD(KA),hD(As),mD(sD),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&y("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),sh(fR),Q(C_,rA,Ua);function mM(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Qm(t))throw new Error("Target container is not a DOM element.");return WA(e,t,null,n)}function fM(e,t,n,s){return dM(e,t,n,s)}var K_={usingClientEntryPoint:!1,Events:[eo,Hl,Fh,Vc,Ic,C_]};function pM(e,t){return K_.usingClientEntryPoint||y('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),nM(e,t)}function vM(e,t,n){return K_.usingClientEntryPoint||y('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),rM(e,t,n)}function gM(e){return fN()&&y("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Ua(e)}var _M=tM({findFiberByHostInstance:Uo,bundleType:1,version:H_,rendererPackageName:"react-dom"});if(!_M&&He&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var l1=window.location.protocol;/^(https?|file):$/.test(l1)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(l1==="file:"?`
204
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}ps.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K_,ps.createPortal=mM,ps.createRoot=pM,ps.findDOMNode=lM,ps.flushSync=gM,ps.hydrate=cM,ps.hydrateRoot=vM,ps.render=uM,ps.unmountComponentAtNode=hM,ps.unstable_batchedUpdates=C_,ps.unstable_renderSubtreeIntoContainer=fM,ps.version=H_,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();nC.exports=ps;var hl=nC.exports,sC,d1=hl;{var h1=d1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;sC=function(i,r){h1.usingClientEntryPoint=!0;try{return d1.createRoot(i,r)}finally{h1.usingClientEntryPoint=!1}}}const aC={"terminal.disconnected":"Connection lost. Reconnecting…","terminal.paneMissing":"This pane has closed. Switch to another pane.","terminal.transport_live":"Live","terminal.transport_snapshot":"Snapshot","terminal.transport_detail_title":"Terminal delivery","terminal.transport_detail_configured":"Configured","terminal.transport_detail_current":"Current","terminal.transport_detail_connection":"Connection","terminal.transport_detail_manual":"Snapshot pulling was selected manually and will not switch automatically.","terminal.transport_detail_live":"The terminal is receiving live pushes normally.","terminal.transport_detail_fallback":"Live pushing became unstable, so Handmux fell back to snapshot pulling.","terminal.transport_detail_unavailable":"The live channel could not connect. Check whether your proxy supports WebSocket upgrades.","terminal.transport_detail_waiting":"Waiting for the connection to become stable before retrying live pushing.","terminal.transport_detail_retry":"About {seconds}s until Handmux attempts to restore live pushing.","terminal.connection_connecting":"Checking","terminal.connection_good":"Good","terminal.connection_degraded":"Fair","terminal.connection_poor":"Poor","common.save":"Save","common.cancel":"Cancel","common.confirm":"Confirm","common.ok":"OK","common.close":"Close","common.delete":"Delete","common.undo":"Undo","common.copy":"Copy","common.rename":"Rename","common.create":"Create","common.back":"Back","common.open":"Open","common.loading":"Loading…","common.done":"Done","token.title":"Access token required","token.placeholder":"Paste HANDMUX_TOKEN","settings.language":"Language","home.empty":"No files opened yet","home.emptyHint":'Switch to "New" to pick one',"home.remove":"Remove","drawer.empty":"No sessions bound yet","drawer.unbind":"Unbind","drawer.bind":"Bind session","drawer.logout":"Log out","windowbar.newWindow":"New window","rename.new_name":"New name","rename.name_rule":"Letters, digits, hyphens only (≤16)","rename.failed":"Rename failed, please retry","rename.saving":"Saving…","newwindow.title":"New window","newwindow.window_name":"Window name (optional)","newwindow.name_placeholder":"Leave blank to auto-name · letters/digits/hyphens ≤16","newwindow.name_rule":"Letters, digits, hyphens only (≤16)","newwindow.start_dir":"Start directory","newwindow.session_dir_named":"{dir} (session dir)","newwindow.session_dir_default":"Session dir (default)","newwindow.choose":"Choose","newwindow.reset_to_session_dir":"Reset to session dir","newwindow.creating":"Creating…","startup.label":"Startup command (optional)","startup.aria":"Startup command","startup.preset_shell":"Plain shell (default)","startup.preset_claude":"claude (launch Claude Code)","startup.preset_claude_continue":"claude -c (resume last session)","startup.preset_codex":"codex (launch Codex CLI)","startup.custom":"Custom…","startup.custom_placeholder":'e.g. claude "fix login bug"',"bind.title":"Bind session","bind.sessionName":"Session name","bind.pickSession":"Choose a session to bind","bind.newSession":"+ New session","bind.modeNew":"New","bind.modeExisting":"Existing","bind.alreadyExists":"Session already exists","bind.bind":"Bind","bind.checking":"Checking…","bind.createAndOpen":"Create & open","bind.creating":"Creating…","bind.createHint":`Session "{name}" doesn't exist — tap "Create & open" to create it`,"bind.alreadyBound":"Session already bound","bind.createFailed":"Create failed, please retry","bind.invalidName":"Only letters, digits, hyphens (≤16)","bind.desktopHint":"On the computer, one command takes any session here back over: handmux open <name>","bind.checkFailed":"Check failed, please retry","bind.startDir":"Start directory","bind.homeDirDefault":"Home directory (default)","bind.choose":"Choose","bind.reset":"Reset","actionsheet.confirmAgain":"Confirm? Tap again","dirpicker.title":"Choose directory","inbox.title":"Inbox","inbox.working":"Working","inbox.done":"Done","inbox.needs":"Needs you","inbox.clearDone":"Clear done","inbox.empty":"No pane status yet","inbox.enableTitle":"Turn on AI session notifications","inbox.enableHint":"Tag every Claude / Codex pane working / waiting on you / done, and get pinged when one needs you.","inbox.enableBtn":"Enable","inbox.enabling":"Enabling…","inbox.enableFailed":"Could not enable — check the server logs.","drawer.orphans.title":"{n} not taken over","drawer.orphans.hint":"Take over to control remotely","inbox.orphans.takeover":"Take over","inbox.orphans.noSession":"no resumable history","inbox.orphans.busy":"busy","inbox.orphans.idle":"idle","inbox.orphans.working":"Taking over…","inbox.orphans.failed":"Takeover failed","inbox.orphans.targetLabel":"Take over into","inbox.orphans.targetNew":"New session","inbox.orphans.nameLabel":"Session name","inbox.orphans.namePlaceholder":"session name","inbox.orphans.killTitle":"The original process","inbox.orphans.killEnd":"End it","inbox.orphans.killKeep":"Keep it","inbox.orphans.recommended":"Recommended","inbox.orphans.killWhy":"If the same session is written from both your computer and your phone, its history gets scrambled. Ending the original lets this device own it cleanly.","inbox.orphans.reopenPre":"Want to continue on the computer instead? Run in a terminal:","idea.title":"Ideas","idea.editPlaceholder":"Edit idea…","idea.addPlaceholder":"Jot an idea…","idea.add":"Add","idea.empty":"No ideas yet — jot one down","idea.dragSort":"Drag to reorder","idea.fillInput":"Fill into input","idea.send":"Send","doclink.title":"Open file","localurl.title":"Proxy & preview","localurl.open":"Enable proxy","localurl.disabled":"Dynamic preview is off — set a preview domain in Settings to proxy local ports.","localurl.notListening":"Nothing is listening on :{port}.","localurl.badProtocol":"This link is not a proxyable HTTP or HTTPS address.","localurl.network":"Could not reach the handmux service. Check your connection and try again.","localurl.failed":"Could not start the preview: {reason}. Check the configuration and try again.","changelog.title":"What's new","preview.dynamic":"Dynamic preview","preview.static":"Static preview","preview.tabs":"Open previews","preview.remainTitle":"Time left — tap to renew / stop","preview.toPcView":"Switch to desktop view","preview.toMobileView":"Switch to mobile view","preview.pcView":"Desktop view","preview.mobileView":"Mobile view","preview.refresh":"Refresh","preview.minimize":"Minimize","preview.ttlDialog":"Preview lifetime","preview.renew":"Renew (reset to 1 hour)","preview.stop":"Stop preview","preview.iframeTitle":"Preview","preview.zoomOut":"Zoom out","preview.zoomIn":"Zoom in","imageviewer.loadFailed":"Failed to load image","imageviewer.saved":"Saved — find it in your album/gallery or Downloads","imageviewer.shareUnsupported":"Image sharing requires Chrome or Safari","imageviewer.zoomOut":"Zoom out","imageviewer.zoomIn":"Zoom in","imageviewer.imageTitle":"Image","imageviewer.saveImage":"Save image","imageviewer.shareImage":"Share image","mic.stop":"Stop voice input","mic.start":"Voice input","dock.send":"Send","dock.send.hint":"Tap to send · hold to insert","dock.phrases":"Phrases","dock.attach":"Upload","dock.history":"History","dock.kbdShow":"Keyboard","dock.kbdHide":"Hide keyboard","history.empty":"No history yet","history.scope":"This window only","dock.input.placeholder":"Say something…","dock.input.enterDraft":"Press Shift + Enter to enter draft mode","dock.input.exitDraft":"Press Esc to return to terminal mode · Shift + Enter for a new line","dock.command.placeholder":"Type a command · Enter runs it","dock.mode.agent":"Chat","dock.mode.toggle":"Switch input mode","dock.mode.command":"Command","dock.mode.chat":"Chat","fav.title":"Favorites","fav.add":"Add","fav.addPlaceholder":"Add a favorite…","cmd.editTitle":"Saved commands","cmd.global":"GLOBAL","cmd.window":"THIS WINDOW","cmd.withEnter":"Send directly","cmd.configPresets":"Config presets","cmd.removeDevice":"Remove from this device","cmd.removedDevice":"Removed from this device","cmd.addPlaceholder":"Add a command…","cmd.tabCmd":"Command","cmd.tabKey":"Key","cmd.addTo":"Add to","cmd.addTitle":"Add","cmd.added":"Added","cmd.editItem":"Edit","cmd.sticky":"Modifier","cmd.stickyNone":"None","cmd.baseKey":"Key","cmd.pickKey":"Pick a key","cmd.moveUp":"Move up","cmd.moveDown":"Move down","cmd.empty":"None yet","chat.editTitle":"Saved messages","chat.composer.placeholder":"Message Claude…","chat.stop":"Stop","chat.interrupted":"You stopped the response","chat.compacted":"Context compacted","chat.slash.handedOff":"Switched to terminal — run {cmd} there","chat.favs":"Saved","chat.tabMsg":"Message","chat.addPlaceholder":"Message / slash-command…","dock.upload.aria":"Upload file","dock.upload.title":"Upload file (saved to home upload area, not the project)","dock.upload.progress":"Uploading {name}{tag}","dock.upload.failed":"Upload failed: {names}","dock.upload.rejected":"Unsupported file type: {names}","app.nameExists":"That name already exists","app.renameFailed":"Rename failed, please retry","app.deleteFailed":"Delete failed, please retry","app.moveFailed":"Move failed, please retry","app.sessionGone":'Session "{name}" not found, it may have closed',"app.docNotFound":"File not found","app.docTooLarge":"File too large (over 2MB)","app.docUnsupported":"Unsupported file or path","app.docOpenFailed":"Open failed, please retry","app.preview":"Preview","app.openPreview":"Open preview","app.ideas":"Ideas","app.files":"Files","app.settings":"Settings","usage.title":"Usage","usage.win5h":"5-hour","usage.winWeekly":"Weekly","usage.winMonthly":"Monthly","usage.winGeneric":"{h}h window","usage.winPrimary":"Limit","usage.winSecondary":"Secondary","usage.resetIn":"resets in {t}","usage.resetSoon":"resetting…","usage.claudeOff":"Not wired yet — Claude's 5h/weekly usage needs the handmux statusLine:","usage.claudePending":"No data yet — send a message in a Claude session, then reopen.","usage.codexOff":"Codex not detected on this machine.","usage.codexNoQuota":"Codex has not returned quota data yet.","usage.loadFailed":"Failed to load usage.","usage.updatedNow":"updated just now","usage.updatedMin":"updated {n}m ago","usage.updatedHr":"updated {n}h ago","usage.updatedDay":"updated {n}d ago","usage.activityNote":"Shared across devices","usage.timeMark":"Time elapsed in this window","app.renameSession":"Rename session","app.renameWindow":"Rename window","app.manageWindow":"Window Management","app.moveLeft":"◀ Move left","app.moveRight":"Move right ▶","app.deleteWindow":"Delete window","pane.splitH":"Split left/right","pane.splitV":"Split top/bottom","pane.manage":"Manage split","pane.manageTitle":"Split Management","pane.close":"Close pane","pane.closeConfirm":"Close? Tap again","pane.splitFailed":"Split failed","pane.closeFailed":"Close failed","app.deleteLastWindowConfirm":"This is the last window; deleting it closes the whole session! Tap again","app.deleteConfirm":"Delete? Tap again","app.cannotLocate":"Cannot locate","app.pickItsDir":", pick the directory it lives in:","app.noBoundSession":"No bound session yet","app.tapToBind":"Tap here to bind one","app.selectSessionHint":"Tap ☰ at the top-left to pick a session","app.backToExit":"Press Back again to exit","settings.title":"Settings","settings.group_global":"Global settings","settings.font_size":"Font size","settings.font_decrease":"Decrease font size","settings.font_increase":"Increase font size","settings.font_auto":"Auto","settings.font_auto_title":"Auto-fit to height","settings.keyboard_mode":"Keyboard mode","settings.keyboard_mode_auto":"Auto detect","settings.keyboard_mode_mobile":"Mobile","settings.keyboard_mode_desktop":"Desktop","settings.keyboard_mode_hint":"Applies only to this browser; override it if detection is wrong.","settings.terminal_transport":"Terminal delivery mode","settings.terminal_transport_live":"Live pushing","settings.terminal_transport_snapshot":"Snapshot pulling","settings.terminal_transport_hint":"Live pushing uses WebSocket for lower latency, falls back to snapshot pulling on a poor connection, and retries after 30 stable seconds.","settings.snapshot_interval":"Active refresh rate","settings.snapshot_interval_hint":"The terminal refreshes less often while idle to reduce traffic and resource use.","settings.chat_lens":"Enable chat view (experimental)","settings.chat_lens_hint":"Experimental — may be unstable. View and drive Claude sessions as a chat; enables the view switch in the window bar and the chat colour tones below.","settings.chat_lens_need_hooks":"Requires Claude hooks first — question cards and status cues in the chat view depend on them.","settings.chat_lens_no_claude":"Claude Code not found — install and run it first.","settings.chat_lens_install_hooks":"Install hooks","settings.chat_lens_installing":"Installing…","settings.chat_lens_hooks_err":"Install failed — run handmux hooks install on your computer","boot.loading":"Loading","boot.chat_empty":"Send your first message to start the conversation","settings.chat_tone":"Chat colour","settings.chat_tone_dusk":"Warm Dusk","settings.chat_tone_ink":"Warm Gold","settings.chat_tone_light":"Warm Cream","settings.chat_tone_hint":"The colour tone of the 对话 (chat) view — all warm.","settings.path_highlight":"Highlight file paths","settings.path_highlight_hint":"Tint tappable file paths in the terminal. Paths stay tappable either way.","settings.whats_new":"What's new","settings.view_changelog":"View changelog","settings.reload_app":"Reload app","settings.has_update":"Has update","settings.version":"Version","settings.feedback":"Feedback","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat group","settings.feedback_hint":"Bugs and ideas welcome — issues are tracked and answered.","settings.update_available":"Version {v} available","settings.update_more":"{n} more version updates","settings.update_how":"On your computer, run","settings.push_notifications":"Push notifications","settings.notify_on":"Enabled ✓","settings.notify_enable":"Enable device notifications","settings.notify_enabled":"Enabled, you should receive a welcome notification","settings.notify_disabled":"Disabled","settings.notify_failed":"Operation failed","settings.processing":"Processing","settings.push_hint":'Listens for "Needs you" and "Done": when a watched session needs your authorization/answer, or a turn just finished, a push is sent to this device.',"settings.push_unsupported":"Push requires Chrome or Safari","settings.group_session":"Current session settings","settings.screen_cols":"Screen columns","settings.cols_dec":"Fewer","settings.cols_dec_title":"Fewer columns","settings.cols_inc":"More","settings.cols_inc_title":"More columns","settings.cols_restore":"Default","settings.cols_restore_title":"Restore default window size","settings.preview_site":"Preview site","settings.preview_static_site":"Preview static site","settings.preview_running_dynamic":"Dynamic preview running","settings.preview_running_static":"Static preview running","settings.preview_remain_title":"Time remaining","settings.preview_remain":"{time} left","settings.preview_renew":"Renew","settings.preview_confirm_stop":"Confirm stop","settings.preview_stop":"Stop","settings.preview_name":"Name: {name}","settings.preview_port":"(port :{port})","settings.preview_type":"Preview type","settings.preview_off":"Off","settings.preview_static":"Static","settings.preview_dynamic":"Dynamic","settings.preview_off_hint":'Preview is off. Choose "Static" to start.',"settings.preview_off_hint_both":'Preview is off. Choose "Static" or "Dynamic" to start.',"settings.preview_dynamic_disabled":"Dynamic port preview is off. To turn it on, point a wildcard preview domain (previewDomain, e.g. *.example.com) at the gateway with a matching TLS cert. See the README for the Cloudflare vs self-hosted specifics.","settings.preview_pick_dir":"Pick directory & start","settings.preview_static_hint":"Pick a directory containing index.html to preview on your phone.","settings.preview_port_placeholder":"Port, e.g. 3000","settings.preview_port_label":"Port","settings.preview_starting":"Starting…","settings.preview_start":"Start","settings.preview_dynamic_hint":"Enter a port running on this machine (dev server / backend); your phone accesses it directly via a subdomain.","settings.dir_picker_hint":"Pick the static site directory to preview (containing index.html)","settings.err_port_not_listening":"That port is not listening; make sure the service is running","settings.err_bad_port":"Invalid port (1–65535)","settings.err_dynamic_disabled":"Dynamic preview is not enabled","settings.err_start_failed":"Failed to start","filebrowser.openDirFailed":"Cannot open this directory","filebrowser.copiedPath":"Path copied: {abs}","filebrowser.mkdirFailed":"Failed to create folder (invalid name or already exists)","filebrowser.downloading":"Downloading {name}","filebrowser.downloadFailed":"Download failed","filebrowser.uploading":"Uploading {name}{tag}","filebrowser.uploadFailed":"Upload failed","filebrowser.uploadPartialFailed":"These files failed to upload: {names}","filebrowser.uploadRejected":"Unsupported file type: {names}","filebrowser.sessionDir":"Session directory","filebrowser.jumpToSessionDir":"Jump to current session directory","filebrowser.parentDir":"Parent directory","filebrowser.rootSelect":"Switch root (home / temp dirs)","filebrowser.pathPlaceholder":"Enter path (live filter / jump)","filebrowser.newFolder":"New folder","filebrowser.createBtn":"Create","filebrowser.uploadFile":"Upload file","filebrowser.uploadToCurrentDir":"Upload to current directory","filebrowser.enterSubdirToUpload":"Enter a subdirectory to upload","filebrowser.folderNamePlaceholder":"Folder name","filebrowser.uploadPendingTo":"Upload “{name}” to the current directory","filebrowser.enterSubdirFirst":"(enter a subdirectory first)","filebrowser.upload":"Upload","filebrowser.savedToDownloads":"Saved “{name}” to the Downloads folder; view it in the system file manager","filebrowser.noMatches":"No matching files or directories","filebrowser.tooMany":"Showing the first {shown} of {total} — type in the path box to filter","filebrowser.previewUnsupported":"Preview not supported for this file type; tap the button on the right to download","filebrowser.copyAbsPath":"Copy absolute path","filebrowser.download":"Download","filebrowser.pickThisDir":"Select this directory {path}","filebrowser.downloadConfirm":"Download {name}?","filemanager.files":"Files","filemanager.closeTab":"Close tab","filemanager.minimize":"Minimize","filemanager.recent":"Recent","filemanager.directory":"Directory","git.errReadRepo":"Cannot read repository","git.errLoad":"Load failed","git.noRepoInDir":"No git repository here yet — pick another directory, or run git init in this one.","git.outsideRoots":"This folder is outside the area handmux can open — only your home directory and /tmp are reachable. Move the repo under your home directory to browse it here.","git.errReadDir":"Cannot read this directory","git.commitDetail":"Commit details","git.diff":"Diff","git.bindRepo":"Bind repository","git.collapse":"Collapse","git.currentBranch":"Current branch","git.switchViewedBranch":"Switch viewed branch","git.switchBranch":"Switch branch","git.noBranches":"No branches","git.noRepoBound":'No repository bound — tap "+" at the top left to choose a directory.',"git.changes":"Changes","git.commits":"Commits","git.pullToLoadMore":"Pull to load more","git.pickerHint":"Choose a directory to auto-discover git repositories inside it","git.cleanTree":"Working tree clean","git.noCommits":"No commits","git.noDiff":"No diff","git.fontSmaller":"Decrease font size","git.fontLarger":"Increase font size","git.diffTruncated":"Diff too large, truncated","cmd.panel":"Command panel","cmd.title":"Commands","cmd.empty":"No commands yet — send one or save a favorite","cmd.favorites":"Favorites","cmd.scopeGlobal":"Global · all sessions","cmd.recent":"Recent","cmd.scopeSession":"This session only","cmd.favorite":"Favorite","cmd.itemConflict":"That shortcut already exists. Change its content or choose another list.","cmd.unfavorite":"Unfavorite","doc.home":"Recent","doc.read":"Read aloud","doc.pauseRead":"Pause reading","doc.resumeRead":"Resume reading","doc.stopRead":"Stop reading","doc.rate":"Speed","doc.fontSmaller":"Smaller font","doc.fontLarger":"Larger font","inbox.view.working":"Running","inbox.view.done":"Completed","inbox.view.needs":"Needs you","push.unsupported":"Push notifications require Chrome or Safari","push.iosAddToHome":'On iOS, first "Add to Home Screen", then open from the home-screen icon to enable',"a2hs.title":"Add handmux to your Home Screen","a2hs.lead":"Open it like an app — full-screen, no address bar. On iPhone it’s also how push reaches you the moment a pane needs you.","a2hs.install":"Install handmux","a2hs.ios1":"Tap the Share button (the ⬆︎ box) in Safari.","a2hs.ios2":"Tap “More”, or scroll down the list.","a2hs.ios3":"Choose “Add to Home Screen”, then “Add”.","a2hs.iosHint":"In Safari: Share → More → Add to Home Screen.","a2hs.iosOpenSafari":"You’re not in Safari. Open this page in Safari, then add it to your Home Screen — other iOS browsers can’t install it.","a2hs.androidManual":"Open your browser menu (⋮) and choose “Add to Home screen” or “Install app”.","a2hs.later":"Maybe later","push.permissionTimeout":"The system did not return the notification permission result. Check notification access for handmux or your browser in system settings, then try again.","push.permissionDenied":"Notification permission denied","push.swRegisterTimeout":"Registering the notification service timed out. Check your connection and try again.","push.swRegisterFailed":"Could not register the notification service: {reason}. Clear this site’s data, reopen it, and try again.","push.swTimeout":"The notification service was registered but did not activate. Clear this site’s data, reopen it, and try again.","push.unknownReason":"unknown reason","push.configTimeout":"Push configuration timed out. Check the connection to your handmux server and try again.","push.browserTimeout":"The browser push service did not respond. On Android Chrome, make sure Google Play services are available, then try again.","push.noVapid":"Push is not configured on the server (VAPID)","push.reportTimeout":"The subscription was created, but reporting it to the server timed out. Check the connection and try again.","push.subscriptionExpired":"Chrome returned an expired push subscription. It has been reset; tap Enable notifications again.","push.deliveryRejected":"The push service rejected the new subscription. Check the server log and try again.","push.subscribeFailed":"Failed to report subscription","push.sendFailed":"Send failed","api.loadFailed":"Load failed","api.uploadFailed":"Upload failed","upload.title":"Uploading","upload.processing":"Sent — receiving on the server…","api.uploadBadDir":"Cannot upload to this directory","api.uploadDuplicate":"A file with this name already exists","api.uploadTooLarge":"File too large (50MB limit)","api.uploadBadType":"Unsupported file type","time.secAgo":"{n}s ago","time.minAgo":"{n}m ago","time.hourAgo":"{n}h ago","time.dayAgo":"{n}d ago","time.expired":"Expired","time.minutes":"{n} min","settings.script_push":"Script push","settings.script_push_open":"How it works","settings.script_push_hint":"Let a script on your computer push a notification to your phone.","scriptPush.title":"Script push","scriptPush.intro":"Let scripts on your computer reuse handmux’s push channel: on the machine running handmux, one `handmux push` command sends a notification to your phone — handy when a build, CI run, or long task finishes, with no separate push service to wire up.","scriptPush.copied":"Copied","scriptPush.session_placeholder":"<session>","scriptPush.device_placeholder":"<device-key>","scriptPush.scope_all":"All subscribed devices (default)","scriptPush.scope_session":"Only devices in one session","scriptPush.scope_device":"Only this device","scriptPush.device_key_note":"The key above is this device’s — copy and run as-is.","scriptPush.device_need_enable":"Turn on push notifications above first to generate this device’s key.","scriptPush.opts_label":"Optional (append to any of the above)","scriptPush.opt_tag":"--tag <tag> — the same tag replaces the previous push instead of stacking.","scriptPush.opt_url":"--url <path> — opens this path when the notification is tapped.","scriptPush.reliability":"Heads-up: Web Push goes through the phone OS (FCM/APNs) and is best-effort — battery-saver, offline, or vendor policy can delay or drop it. It is not a guaranteed real-time channel. For delivery-critical alerts use a dedicated IM (WeChat / Telegram bot, etc.).","pushInbox.title":"Notifications","pushInbox.empty":"No notifications yet","pushInbox.delete":"Delete","pushInbox.justNow":"just now","pushInbox.minutesAgo":"{n} min ago","pushInbox.hoursAgo":"{n} h ago","pushInbox.detailTitle":"Notification","pushInbox.openUrl":"Open link","pushInbox.expired":"This message has expired","pushInbox.back":"Back","pushInbox.markAllRead":"Mark all read","pushInbox.unreadCount":"{n} unread","pushInbox.loadFailed":"Could not load notifications. Check the connection and retry.","pushInbox.deleteFailed":"Could not delete the notification. It was kept; please retry.","pushInbox.retry":"Retry","pushInbox.deliveryPending":"Sending","pushInbox.deliverySuccess":"Success","pushInbox.deliveryFailed":"Failed","pushInbox.deliveryReasonExpired":"subscription expired","pushInbox.deliveryReasonRateLimited":"push service rate limit","pushInbox.deliveryReasonUnavailable":"push service unavailable","pushInbox.deliveryReasonRejected":"push service rejected it","pushInbox.deliveryReasonNetwork":"network error","pushInbox.deliveryReasonNotConfigured":"push is not configured","pushInbox.deliveryReasonUnknown":"unknown reason","workspace.bootDetected":"Computer restart detected","workspace.tmuxDetected":"tmux restart detected","workspace.summary":"Last workspace · {sessions} sessions · saved {time}","workspace.restoreLast":"Restore last workspace","workspace.partialCard":"{failures} sessions still need attention","workspace.unknownTime":"unknown time","workspace.savedAt":"Saved {time}","workspace.topologySummary":"{sessions} sessions · {windows} windows · {panes} panes","workspace.planSummary":"Restore {restore} sessions; {already} already present","workspace.renameRule":"A -restored suffix is added only when a session with the same name already exists.","workspace.nonDestructive":"Current sessions will not be modified, renamed, or stopped.","workspace.progress":"Restoring {completed} / {total}…","workspace.progressDone":"Restored {completed} / {total}","workspace.complete":"Workspace restored.","workspace.completedSummary":"Restored: {sessions} sessions · {windows} windows · {panes} panes","workspace.rebindHint":"Restored sessions stay hidden until you choose which ones to bind to this phone.","workspace.rebind":"Bind restored sessions","workspace.sessionFailure":"{session}: {reason}","workspace.unknownSession":"Unknown session","workspace.restore":"Restore","workspace.ignore":"Ignore this backup","workspace.protectionTitle":"Workspace is not protected","workspace.protection.live-corrupt":"Workspace state copies are damaged. Check disk health and ~/.handmux permissions, then restart handmux.","workspace.protection.live-unavailable":"Workspace state cannot be read or written. Check free disk space and ~/.handmux permissions, then restart handmux.","workspace.protection.unknown":"Background snapshots are unavailable. Check the handmux log on your computer.","workspace.error.restore-interrupted":"restore was interrupted; retry this backup","workspace.error.checkpoint-not-found":"this backup is no longer available; refresh and choose another backup","workspace.error.storage-full":"workspace storage is full; free disk space and retry","workspace.error.permission-denied":"workspace storage is not writable; check permissions and retry","workspace.error.plan-failed":"the restore plan changed; refresh and retry","workspace.error.agent-unavailable":"the agent could not resume; open the restored shell and retry manually","workspace.error.tmux-unavailable":"tmux is unavailable; make sure tmux is running and retry","workspace.error.restore-failed":"the session was not restored; check the handmux log and retry","workspace.error.operation-not-found":"this restore operation is no longer available; retry the backup","workspace.sessionWarning":"{session}: {reason}","workspace.warning.cwd-fallback":"the working directory was unavailable; restored in the home directory","workspace.warning.layout-fallback":"the pane layout could not be fully restored; the default layout was kept","workspace.warning.agent-warning":"the agent did not resume automatically; the restored shell is still available","workspace.warning.live-reconcile-failed":"live workspace reconciliation failed; check the handmux log","workspace.warning.workspace-unavailable":"workspace storage is temporarily unavailable; check disk space and permissions","workspace.warning.restore-warning":"the restore completed with a warning that may need attention"},jM={"terminal.disconnected":"连接断开,重连中…","terminal.paneMissing":"窗格已关闭,请切换到其他窗格。","terminal.transport_live":"实时","terminal.transport_snapshot":"快照","terminal.transport_detail_title":"终端传输状态","terminal.transport_detail_configured":"设置模式","terminal.transport_detail_current":"当前模式","terminal.transport_detail_connection":"连接状态","terminal.transport_detail_manual":"你已手动选择快照拉取,不会自动切换。","terminal.transport_detail_live":"终端正在正常接收实时推送。","terminal.transport_detail_fallback":"实时推送不稳定,已自动降级为快照拉取。","terminal.transport_detail_unavailable":"实时通道无法建立,请检查反向代理是否支持 WebSocket。","terminal.transport_detail_waiting":"正在等待连接稳定,随后尝试恢复实时推送。","terminal.transport_detail_retry":"预计 {seconds} 秒后尝试恢复实时推送。","terminal.connection_connecting":"检测中","terminal.connection_good":"良好","terminal.connection_degraded":"一般","terminal.connection_poor":"较差","common.save":"保存","common.cancel":"取消","common.confirm":"确认","common.ok":"确定","common.close":"关闭","common.delete":"删除","common.undo":"撤销","common.copy":"复制","common.rename":"重命名","common.create":"新建","common.back":"返回","common.open":"打开","common.loading":"加载中…","common.done":"完成","token.title":"需要访问 token","token.placeholder":"粘贴 HANDMUX_TOKEN","settings.language":"语言 Language","home.empty":"还没有打开过文件","home.emptyHint":"切到「新增」去挑一个","home.remove":"移除","drawer.empty":"还没有绑定会话","drawer.unbind":"解绑","drawer.bind":"绑定会话","drawer.logout":"退出登录","windowbar.newWindow":"新建窗口","rename.new_name":"新名称","rename.name_rule":"只能用字母、数字、横线(≤16)","rename.failed":"重命名失败,请重试","rename.saving":"保存中…","newwindow.title":"新建窗口","newwindow.window_name":"窗口名称(可选)","newwindow.name_placeholder":"留空自动命名 · 字母/数字/横线 ≤16","newwindow.name_rule":"只能用字母、数字、横线(≤16)","newwindow.start_dir":"起始目录","newwindow.session_dir_named":"{dir}(会话目录)","newwindow.session_dir_default":"会话目录(默认)","newwindow.choose":"选择","newwindow.reset_to_session_dir":"重置为会话目录","newwindow.creating":"新建中…","startup.label":"启动命令(可选)","startup.aria":"启动命令","startup.preset_shell":"空 shell(默认)","startup.preset_claude":"claude(启动 Claude Code)","startup.preset_claude_continue":"claude -c(接着上次会话)","startup.preset_codex":"codex(启动 Codex CLI)","startup.custom":"自定义…","startup.custom_placeholder":'例如 claude "修复登录bug"',"bind.title":"绑定会话","bind.sessionName":"会话名称","bind.pickSession":"选择要绑定的会话","bind.newSession":"+ 新建会话","bind.modeNew":"新建会话","bind.modeExisting":"已有会话","bind.alreadyExists":"该会话已存在","bind.bind":"绑定","bind.checking":"校验中…","bind.createAndOpen":"新建并打开","bind.creating":"新建中…","bind.createHint":"会话「{name}」不存在,点「新建并打开」创建","bind.alreadyBound":"已绑定该会话","bind.createFailed":"新建失败,请重试","bind.invalidName":"只能用字母、数字、横线(≤16)","bind.desktopHint":"这里的会话(包括手机新建的),电脑上一条命令即可接管:handmux open <会话名>","bind.checkFailed":"校验失败,请重试","bind.startDir":"起始目录","bind.homeDirDefault":"主目录(默认)","bind.choose":"选择","bind.reset":"重置","actionsheet.confirmAgain":"确认?再点一次","dirpicker.title":"选择目录","inbox.title":"收件箱","inbox.working":"进行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"暂无面板状态","inbox.enableTitle":"开启 AI 会话通知","inbox.enableHint":"把每个 Claude / Codex 面板标记为进行中 / 需要你 / 已完成,需要你时还会推送提醒。","inbox.enableBtn":"开启","inbox.enabling":"开启中…","inbox.enableFailed":"开启失败 —— 看看服务端日志。","drawer.orphans.title":"{n} 个未接管会话","drawer.orphans.hint":"接管即可远程操控","inbox.orphans.takeover":"接管","inbox.orphans.noSession":"无可续接的历史","inbox.orphans.busy":"运行中","inbox.orphans.idle":"空闲","inbox.orphans.working":"接管中…","inbox.orphans.failed":"接管失败","inbox.orphans.targetLabel":"接管到","inbox.orphans.targetNew":"新建会话","inbox.orphans.nameLabel":"会话名称","inbox.orphans.namePlaceholder":"会话名","inbox.orphans.killTitle":"接管后原来的进程","inbox.orphans.killEnd":"结束","inbox.orphans.killKeep":"保留","inbox.orphans.recommended":"推荐","inbox.orphans.killWhy":"同一个会话如果电脑和手机同时在写,历史记录会错乱。结束原进程后由手机这边独占,更稳妥。","inbox.orphans.reopenPre":"想回电脑上继续?在电脑终端运行:","idea.title":"想法","idea.editPlaceholder":"编辑想法…","idea.addPlaceholder":"记一条想法…","idea.add":"添加","idea.empty":"还没有想法,记一条吧","idea.dragSort":"拖动排序","idea.fillInput":"填入输入框","idea.send":"发送","doclink.title":"打开文件","localurl.title":"开启代理并预览","localurl.open":"开启代理","localurl.disabled":"动态预览未开启——在设置里配置预览域名后可代理本机端口。","localurl.notListening":"端口 :{port} 没有服务在监听。","localurl.badProtocol":"该链接不是可代理的 HTTP 或 HTTPS 地址。","localurl.network":"连接 handmux 服务失败,请检查网络后重试。","localurl.failed":"无法开启预览:{reason}。请检查配置后重试。","changelog.title":"新功能","preview.dynamic":"动态预览","preview.static":"静态预览","preview.tabs":"打开的预览","preview.remainTitle":"剩余有效期 — 点击续期 / 停止","preview.toPcView":"切换到电脑视图","preview.toMobileView":"切换到手机视图","preview.pcView":"电脑视图","preview.mobileView":"手机视图","preview.refresh":"刷新","preview.minimize":"收起","preview.ttlDialog":"预览有效期","preview.renew":"续期(重置为 1 小时)","preview.stop":"停止预览","preview.iframeTitle":"预览","preview.zoomOut":"缩小","preview.zoomIn":"放大","imageviewer.loadFailed":"图片加载失败","imageviewer.saved":"已保存,可在相册/图库或「下载」中查看","imageviewer.shareUnsupported":"图片分享需要 Chrome 或 Safari 浏览器","imageviewer.zoomOut":"缩小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"图片","imageviewer.saveImage":"保存图片","imageviewer.shareImage":"分享图片","mic.stop":"停止语音输入","mic.start":"语音输入","dock.send":"发送","dock.send.hint":"点发送 · 长按填入","dock.phrases":"常用语","dock.attach":"上传","dock.history":"历史","dock.kbdShow":"展开键盘","dock.kbdHide":"收起键盘","history.empty":"还没有发送记录","history.scope":"仅当前窗口的记录","dock.input.placeholder":"说点什么…","dock.input.enterDraft":"按 Shift + Enter 进入草稿模式","dock.input.exitDraft":"按 Esc 回到终端模式 · Shift + Enter 换行","dock.command.placeholder":"输入命令 · 回车执行","dock.mode.agent":"对话","dock.mode.toggle":"切换输入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"添加","fav.addPlaceholder":"加一条常用…","cmd.editTitle":"常用命令","cmd.global":"全局","cmd.window":"当前窗口","cmd.withEnter":"直接发送","cmd.configPresets":"配置预置","cmd.removeDevice":"从本机移除","cmd.removedDevice":"已从本机移除","cmd.addPlaceholder":"加一条命令…","cmd.tabCmd":"命令","cmd.tabKey":"按键","cmd.addTo":"添加到","cmd.addTitle":"添加","cmd.added":"已添加","cmd.editItem":"编辑","cmd.sticky":"粘滞键","cmd.stickyNone":"无","cmd.baseKey":"基键","cmd.pickKey":"选择按键","cmd.moveUp":"上移","cmd.moveDown":"下移","cmd.empty":"还没有","chat.editTitle":"常用消息","chat.composer.placeholder":"和 Claude 对话…","chat.stop":"停止","chat.interrupted":"你终止了这次回复","chat.compacted":"上下文已压缩","chat.slash.handedOff":"已切到终端视图 · 在这里操作 {cmd}","chat.favs":"常用","chat.tabMsg":"消息","chat.addPlaceholder":"消息 / 斜杠命令…","dock.upload.aria":"上传文件","dock.upload.title":"上传文件(存到家目录上传区,不进项目)","dock.upload.progress":"上传 {name}{tag}","dock.upload.failed":"上传失败:{names}","dock.upload.rejected":"不支持的文件类型:{names}","app.nameExists":"该名已存在","app.renameFailed":"重命名失败,请重试","app.deleteFailed":"删除失败,请重试","app.moveFailed":"移动失败,请重试","app.sessionGone":"会话「{name}」不存在,可能已关闭","app.docNotFound":"文件不存在","app.docTooLarge":"文件过大(超过 2MB)","app.docUnsupported":"不支持的文件或路径","app.docOpenFailed":"打开失败,请重试","app.preview":"预览","app.openPreview":"打开预览","app.ideas":"想法","app.files":"文件","app.settings":"设置","usage.title":"用量","usage.win5h":"5 小时","usage.winWeekly":"本周","usage.winMonthly":"本月","usage.winGeneric":"{h} 小时窗口","usage.winPrimary":"额度","usage.winSecondary":"次级额度","usage.resetIn":"{t}后重置","usage.resetSoon":"即将重置…","usage.claudeOff":"尚未接入 —— Claude 的 5h/周额度需要 handmux statusLine:","usage.claudePending":"暂无数据 —— 在 Claude 会话里发一条消息,再重新打开。","usage.codexOff":"本机未检测到 Codex。","usage.codexNoQuota":"Codex 暂未返回额度数据。","usage.loadFailed":"加载用量失败。","usage.updatedNow":"刚刚更新","usage.updatedMin":"{n} 分钟前更新","usage.updatedHr":"{n} 小时前更新","usage.updatedDay":"{n} 天前更新","usage.activityNote":"所有设备共享","usage.timeMark":"本窗口已过去的时间","app.renameSession":"重命名会话","app.renameWindow":"重命名窗口","app.manageWindow":"窗口管理","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"删除窗口","pane.splitH":"左右分屏","pane.splitV":"上下分屏","pane.manage":"管理分屏","pane.manageTitle":"分屏管理","pane.close":"关闭此格","pane.closeConfirm":"确认关闭?再点一次","pane.splitFailed":"分屏失败","pane.closeFailed":"关闭失败","app.deleteLastWindowConfirm":"这是最后一个窗口,删除将关闭整个会话!再点一次","app.deleteConfirm":"确认删除?再点一次","app.cannotLocate":"无法定位","app.pickItsDir":",请选它所在的目录:","app.noBoundSession":"还没有绑定会话","app.tapToBind":"点此绑定一个","app.selectSessionHint":"点击左上角 ☰ 选择会话","app.backToExit":"再按一次返回键退出","settings.title":"设置","settings.group_global":"全局设置","settings.font_size":"字体大小","settings.font_decrease":"减小字体","settings.font_increase":"增大字体","settings.font_auto":"自适应","settings.font_auto_title":"按高度自动适配","settings.keyboard_mode":"键盘模式","settings.keyboard_mode_auto":"自动识别","settings.keyboard_mode_mobile":"手机","settings.keyboard_mode_desktop":"电脑","settings.keyboard_mode_hint":"仅应用于当前浏览器;识别不准时可手动指定。","settings.terminal_transport":"终端传输模式","settings.terminal_transport_live":"实时推送","settings.terminal_transport_snapshot":"快照拉取","settings.terminal_transport_hint":"实时推送使用 WebSocket;网络较差时会自动降级为快照拉取,持续稳定 30 秒后尝试恢复实时推送。","settings.snapshot_interval":"活跃时刷新频率","settings.snapshot_interval_hint":"终端空闲后会自动降低频率,减少流量和资源占用。","settings.chat_lens":"启用对话视图(实验性功能)","settings.chat_lens_hint":"实验性功能,可能不稳定。以对话形式查看和操作 Claude 会话;开启后,窗口栏出现视图切换,并可选择对话配色。","boot.loading":"正在加载","boot.chat_empty":"发送你的第一条消息,对话就开始啦","settings.chat_lens_need_hooks":"需先安装 Claude hooks:对话里的问题卡、状态提示都依赖它。","settings.chat_lens_no_claude":"未检测到 Claude Code;安装并运行后再开启。","settings.chat_lens_install_hooks":"一键安装 hooks","settings.chat_lens_installing":"安装中…","settings.chat_lens_hooks_err":"安装失败,请到电脑上运行 handmux hooks install","settings.chat_tone":"对话配色","settings.chat_tone_dusk":"暖夜","settings.chat_tone_ink":"暖金","settings.chat_tone_light":"暖黄","settings.chat_tone_hint":"对话视图的色调,均为暖色系。暖夜=暖棕暗、暖金=品牌橄榄金、暖黄=奶油亮。","settings.path_highlight":"高亮文件路径","settings.path_highlight_hint":"给终端里可点开的文件路径加底色。无论开关与否,路径都可点开。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日志","settings.reload_app":"重新加载应用","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"反馈与交流","settings.feedback_issues":"GitHub 反馈","settings.feedback_group":"微信用户群","settings.feedback_hint":"bug、想法都欢迎——Issue 会被跟踪处理;微信群反馈直达。","settings.update_available":"有新版本 v{v} 可用","settings.update_more":"另有 {n} 个版本更新","settings.update_how":"在电脑上运行","settings.push_notifications":"推送通知","settings.notify_on":"已开启 ✓","settings.notify_enable":"开启设备通知","settings.notify_enabled":"已开启,应会收到一条欢迎通知","settings.notify_disabled":"已关闭","settings.notify_failed":"操作失败","settings.processing":"处理中","settings.push_hint":"监听「需要你」和「已完成」:所关注会话需要你授权/回答,或一个回合刚做完时,推送到此设备。","settings.push_unsupported":"推送需要 Chrome 或 Safari 浏览器","settings.group_session":"当前会话设置","settings.screen_cols":"屏幕列数","settings.cols_dec":"减少","settings.cols_dec_title":"减少列数","settings.cols_inc":"增加","settings.cols_inc_title":"增加列数","settings.cols_restore":"默认","settings.cols_restore_title":"恢复窗口默认尺寸","settings.preview_site":"预览站点","settings.preview_static_site":"预览静态站点","settings.preview_running_dynamic":"动态预览 运行中","settings.preview_running_static":"静态预览 运行中","settings.preview_remain_title":"剩余有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"续期","settings.preview_confirm_stop":"确认停止","settings.preview_stop":"停止","settings.preview_name":"名称:{name}","settings.preview_port":"(端口 :{port})","settings.preview_type":"预览类型","settings.preview_off":"不开启","settings.preview_static":"静态","settings.preview_dynamic":"动态","settings.preview_off_hint":"未开启预览。选择「静态」开始。","settings.preview_off_hint_both":"未开启预览。选择「静态」或「动态」开始。","settings.preview_dynamic_disabled":"动态端口预览未启用。要开启:把一个通配预览域名(previewDomain,如 *.example.com)指向网关,并配上对应的 TLS 证书。Cloudflare / 自建的证书差异见 README。","settings.preview_pick_dir":"选择目录启动","settings.preview_static_hint":"选一个含 index.html 的目录,在手机上预览。","settings.preview_port_placeholder":"端口,如 3000","settings.preview_port_label":"端口","settings.preview_starting":"启动中…","settings.preview_start":"启动","settings.preview_dynamic_hint":"填本机正在运行的端口(dev server / 后端),手机经子域名直接访问。","settings.dir_picker_hint":"选择要预览的静态站点目录(含 index.html)","settings.err_port_not_listening":"该端口未在监听,请确认服务已启动","settings.err_bad_port":"端口不合法(1–65535)","settings.err_dynamic_disabled":"动态预览未开启","settings.err_start_failed":"启动失败","filebrowser.openDirFailed":"无法打开该目录","filebrowser.copiedPath":"已复制路径:{abs}","filebrowser.mkdirFailed":"新建目录失败(名称非法或已存在)","filebrowser.downloading":"下载 {name}","filebrowser.downloadFailed":"下载失败","filebrowser.uploading":"上传 {name}{tag}","filebrowser.uploadFailed":"上传失败","filebrowser.uploadPartialFailed":"以下文件上传失败:{names}","filebrowser.uploadRejected":"不支持的文件类型:{names}","filebrowser.sessionDir":"会话目录","filebrowser.jumpToSessionDir":"跳到当前会话目录","filebrowser.parentDir":"上级目录","filebrowser.rootSelect":"切换根目录(家目录 / 临时目录)","filebrowser.pathPlaceholder":"输入路径(实时筛选/跳转)","filebrowser.newFolder":"新建文件夹","filebrowser.createBtn":"创建","filebrowser.uploadFile":"上传文件","filebrowser.uploadToCurrentDir":"上传到当前目录","filebrowser.enterSubdirToUpload":"请进入一个子目录上传","filebrowser.folderNamePlaceholder":"文件夹名称","filebrowser.uploadPendingTo":"把「{name}」上传到当前目录","filebrowser.enterSubdirFirst":"(请先进入一个子目录)","filebrowser.upload":"上传","filebrowser.savedToDownloads":"已保存「{name}」到「下载」文件夹,可在系统文件管理器查看","filebrowser.noMatches":"没有匹配的文件或目录","filebrowser.tooMany":"共 {total} 项,只显示前 {shown} 项——在路径框输入关键词可筛选","filebrowser.previewUnsupported":"暂不支持该类型文件的预览,点右侧按钮可下载","filebrowser.copyAbsPath":"复制绝对路径","filebrowser.download":"下载","filebrowser.pickThisDir":"选定此目录 {path}","filebrowser.downloadConfirm":"下载 {name}?","filemanager.files":"文件","filemanager.closeTab":"关闭标签","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目录","git.errReadRepo":"无法读取仓库","git.errLoad":"加载失败","git.noRepoInDir":"这个目录还不是 git 仓库 —— 换一个目录,或在这里 git init 一下。","git.outsideRoots":"这个目录在 handmux 可访问范围之外 —— 只开放主目录和 /tmp。把仓库放到主目录下,就能在这里查看了。","git.errReadDir":"无法读取该目录","git.commitDetail":"提交详情","git.diff":"差异","git.bindRepo":"绑定仓库","git.collapse":"收起","git.currentBranch":"当前分支","git.switchViewedBranch":"切换查看的分支","git.switchBranch":"切换分支","git.noBranches":"暂无分支","git.noRepoBound":"未绑定仓库,点左上角「+」选择一个目录。","git.changes":"变更","git.commits":"提交","git.pullToLoadMore":"下拉加载更多","git.pickerHint":"选择一个目录,自动查找其中的 git 仓库","git.cleanTree":"工作区干净","git.noCommits":"暂无提交","git.noDiff":"无差异","git.fontSmaller":"缩小字体","git.fontLarger":"放大字体","git.diffTruncated":"diff 过大,已截断","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"还没有命令,发送一条或保存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全局 · 所有会话","cmd.recent":"最近","cmd.scopeSession":"仅本会话","cmd.favorite":"收藏","cmd.itemConflict":"该快捷项已存在,请更换内容或选择其他列表。","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗读","doc.pauseRead":"暂停朗读","doc.resumeRead":"继续朗读","doc.stopRead":"停止朗读","doc.rate":"语速","doc.fontSmaller":"缩小字体","doc.fontLarger":"放大字体","inbox.view.working":"进行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推送通知需要 Chrome 或 Safari 浏览器","push.iosAddToHome":'iOS 需先把本站"添加到主屏幕",从主屏图标打开后再开启',"a2hs.title":"把 handmux 添加到主屏","a2hs.lead":"像 App 一样打开——全屏、没有地址栏。在 iPhone 上,pane 需要你时的推送也靠它送达。","a2hs.install":"安装 handmux","a2hs.ios1":"点 Safari 里的分享按钮(⬆︎ 方框)。","a2hs.ios2":"点「更多」,或向下滑动列表。","a2hs.ios3":"选「添加到主屏幕」,再点「添加」。","a2hs.iosHint":"Safari 里:分享 → 更多 → 添加到主屏幕。","a2hs.iosOpenSafari":"当前不是 Safari。请在 Safari 里打开本页再添加到主屏——其他 iOS 浏览器无法安装。","a2hs.androidManual":"打开浏览器菜单(⋮),选「添加到主屏幕」或「安装应用」。","a2hs.later":"以后再说","push.permissionTimeout":"系统未返回通知授权结果,请在系统设置中检查 handmux 或浏览器的通知权限后重试","push.permissionDenied":"通知权限被拒绝","push.swRegisterTimeout":"注册通知服务超时,请检查网络后重试","push.swRegisterFailed":"注册通知服务失败:{reason}。请清除本站数据后重新打开再试","push.swTimeout":"通知服务已注册但未能激活,请清除本站数据后重新打开再试","push.unknownReason":"原因未知","push.configTimeout":"读取推送配置超时,请检查与 handmux 服务的连接后重试","push.browserTimeout":"浏览器推送服务没有响应;Android Chrome 请确认 Google Play 服务可用后重试","push.noVapid":"服务端未配置推送(VAPID)","push.reportTimeout":"订阅已创建,但上报服务器超时,请检查连接后重试","push.subscriptionExpired":"Chrome 返回的推送订阅已经失效,已为你重置;请再次点击开启通知","push.deliveryRejected":"推送服务拒绝了新订阅,请检查服务器日志后重试","push.subscribeFailed":"订阅上报失败","push.sendFailed":"发送失败","api.loadFailed":"加载失败","api.uploadFailed":"上传失败","upload.title":"上传中","upload.processing":"已发送,服务器接收中…","api.uploadBadDir":"无法上传到该目录","api.uploadDuplicate":"已存在同名文件","api.uploadTooLarge":"文件过大(上限 50MB)","api.uploadBadType":"不支持的文件类型","time.secAgo":"{n}秒前","time.minAgo":"{n}分钟前","time.hourAgo":"{n}小时前","time.dayAgo":"{n}天前","time.expired":"已过期","time.minutes":"{n} 分钟","settings.script_push":"脚本推送","settings.script_push_open":"怎么用","settings.script_push_hint":"让电脑上的脚本把一条通知推到手机。","scriptPush.title":"脚本推送","scriptPush.intro":"让电脑上的脚本复用 handmux 的推送通道:在运行 handmux 的电脑上,一条 handmux push 命令就能把通知推到手机——构建、CI 或长任务结束时提醒你,不用另接推送服务。","scriptPush.copied":"已复制","scriptPush.session_placeholder":"<会话名>","scriptPush.device_placeholder":"<本设备key>","scriptPush.scope_all":"推给所有已订阅设备(默认)","scriptPush.scope_session":"只推某个会话里的设备","scriptPush.scope_device":"只推这台设备","scriptPush.device_key_note":"上面这串 key 就是这台设备的,复制即用。","scriptPush.device_need_enable":"先在上方开启推送通知,才会生成这台设备的 key。","scriptPush.opts_label":"可选参数(追加到上面任意一条后面)","scriptPush.opt_tag":"--tag <标签> —— 相同 tag 会覆盖上一条推送,而不是堆叠。","scriptPush.opt_url":"--url <路径> —— 点击通知时打开这个路径。","scriptPush.reliability":"注意:Web 推送经手机系统(FCM/APNs)中转,属尽力而为——省电模式、离线或厂商策略都可能延迟或丢弃它,并不保证实时送达。对送达强依赖的场景,请改用专门的 IM(微信 / Telegram bot 等)。","pushInbox.title":"通知记录","pushInbox.empty":"还没有脚本通知","pushInbox.delete":"删除","pushInbox.justNow":"刚刚","pushInbox.minutesAgo":"{n}分钟前","pushInbox.hoursAgo":"{n}小时前","pushInbox.detailTitle":"通知详情","pushInbox.openUrl":"打开链接","pushInbox.expired":"这条消息已过期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已读","pushInbox.unreadCount":"{n} 未读","pushInbox.loadFailed":"通知记录加载失败,请检查连接后重试","pushInbox.deleteFailed":"通知删除失败,消息已保留,请重试","pushInbox.retry":"重试","pushInbox.deliveryPending":"发送中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失败","pushInbox.deliveryReasonExpired":"订阅已失效","pushInbox.deliveryReasonRateLimited":"推送服务限流","pushInbox.deliveryReasonUnavailable":"推送服务暂不可用","pushInbox.deliveryReasonRejected":"推送服务已拒绝","pushInbox.deliveryReasonNetwork":"网络错误","pushInbox.deliveryReasonNotConfigured":"服务端未配置推送","pushInbox.deliveryReasonUnknown":"未知原因","workspace.bootDetected":"检测到电脑已重启","workspace.tmuxDetected":"检测到 tmux 已重新启动","workspace.summary":"上次工作区 · {sessions} 个会话 · 保存于 {time}","workspace.restoreLast":"恢复上次工作区","workspace.partialCard":"仍有 {failures} 个会话需要处理","workspace.unknownTime":"未知时间","workspace.savedAt":"保存于 {time}","workspace.topologySummary":"{sessions} 个会话 · {windows} 个窗口 · {panes} 个窗格","workspace.planSummary":"将恢复 {restore} 个会话;{already} 个已经存在","workspace.renameRule":"仅当当前已有同名会话时,恢复名称才会添加 -restored 后缀。","workspace.nonDestructive":"当前会话不会被修改、重命名或停止。","workspace.progress":"正在恢复 {completed} / {total}…","workspace.progressDone":"已恢复 {completed} / {total}","workspace.complete":"工作区已恢复。","workspace.completedSummary":"本次恢复:{sessions} 个会话 · {windows} 个窗口 · {panes} 个窗格","workspace.rebindHint":"恢复的会话不会自动显示;可重新选择要绑定到这台手机的会话。","workspace.rebind":"重新绑定会话","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"未知会话","workspace.restore":"恢复","workspace.ignore":"忽略此备份","workspace.protectionTitle":"工作区未受保护","workspace.protection.live-corrupt":"工作区状态副本已损坏;请检查磁盘和 ~/.handmux 权限,然后重启 handmux。","workspace.protection.live-unavailable":"无法读写工作区状态;请检查磁盘空间和 ~/.handmux 权限,然后重启 handmux。","workspace.protection.unknown":"后台快照暂时不可用;请检查电脑上的 handmux 日志。","workspace.error.restore-interrupted":"恢复已中断;请重试此备份","workspace.error.checkpoint-not-found":"此备份已不可用;请刷新后选择其它备份","workspace.error.storage-full":"工作区存储空间不足;请释放磁盘空间后重试","workspace.error.permission-denied":"无法写入工作区存储;请检查权限后重试","workspace.error.plan-failed":"恢复计划已变化;请刷新后重试","workspace.error.agent-unavailable":"Agent 无法续接;请打开已恢复的 shell 后手动重试","workspace.error.tmux-unavailable":"tmux 不可用;请确认 tmux 已运行后重试","workspace.error.restore-failed":"会话未恢复;请检查 handmux 日志后重试","workspace.error.operation-not-found":"此恢复任务已不可用;请重新恢复此备份","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"工作目录不可用;已在主目录中恢复","workspace.warning.layout-fallback":"窗格布局无法完整恢复;已保留默认布局","workspace.warning.agent-warning":"Agent 未能自动续接;已恢复的 shell 仍可使用","workspace.warning.live-reconcile-failed":"实时工作区状态核对失败;请检查 handmux 日志","workspace.warning.workspace-unavailable":"工作区存储暂时不可用;请检查磁盘空间和权限","workspace.warning.restore-warning":"恢复时出现了可继续处理的提醒;请检查恢复结果"},DM={"terminal.transport_live":"即時","terminal.transport_snapshot":"快照","terminal.transport_detail_title":"終端傳輸狀態","terminal.transport_detail_configured":"設定模式","terminal.transport_detail_current":"目前模式","terminal.transport_detail_connection":"連線狀態","terminal.transport_detail_manual":"你已手動選擇快照拉取,不會自動切換。","terminal.transport_detail_live":"終端正在正常接收即時推送。","terminal.transport_detail_fallback":"即時推送不穩定,已自動降級為快照拉取。","terminal.transport_detail_unavailable":"即時通道無法建立,請檢查反向代理是否支援 WebSocket。","terminal.transport_detail_waiting":"正在等待連線穩定,隨後嘗試恢復即時推送。","terminal.transport_detail_retry":"預計 {seconds} 秒後嘗試恢復即時推送。","terminal.connection_connecting":"偵測中","terminal.connection_good":"良好","terminal.connection_degraded":"一般","terminal.connection_poor":"較差","settings.terminal_transport":"終端傳輸模式","settings.terminal_transport_live":"即時推送","settings.terminal_transport_snapshot":"快照拉取","settings.terminal_transport_hint":"即時推送使用 WebSocket;網路較差時會自動降級為快照拉取,持續穩定 30 秒後嘗試恢復即時推送。","settings.snapshot_interval":"活躍時更新頻率","settings.snapshot_interval_hint":"終端閒置後會自動降低頻率,減少流量和資源使用。","terminal.disconnected":"連線中斷,正在重新連線…","terminal.paneMissing":"窗格已關閉,請切換到其他窗格。","common.save":"儲存","common.cancel":"取消","common.confirm":"確認","common.ok":"確定","common.close":"關閉","common.delete":"刪除","common.copy":"複製","common.rename":"重新命名","common.create":"新增","common.back":"返回","common.open":"開啟","common.loading":"載入中…","common.done":"完成","token.title":"需要存取 Token","token.placeholder":"貼上 HANDMUX_TOKEN","settings.language":"語言 Language","home.empty":"尚未開啟任何檔案","home.emptyHint":"切換到「新增」挑選一個","home.remove":"移除","drawer.empty":"尚未綁定工作階段","drawer.unbind":"解除綁定","drawer.bind":"綁定工作階段","drawer.logout":"登出","windowbar.newWindow":"新增視窗","rename.new_name":"新名稱","rename.name_rule":"只能使用字母、數字、連字號(≤16)","rename.failed":"重新命名失敗,請重試","rename.saving":"儲存中…","newwindow.title":"新增視窗","newwindow.window_name":"視窗名稱(選填)","newwindow.name_placeholder":"留空自動命名 · 字母/數字/連字號 ≤16","newwindow.name_rule":"只能使用字母、數字、連字號(≤16)","newwindow.start_dir":"起始目錄","newwindow.session_dir_named":"{dir}(工作階段目錄)","newwindow.session_dir_default":"工作階段目錄(預設)","newwindow.choose":"選擇","newwindow.reset_to_session_dir":"重置為工作階段目錄","newwindow.creating":"建立中…","startup.label":"啟動命令(選填)","startup.aria":"啟動命令","startup.preset_shell":"空白 Shell(預設)","startup.preset_claude":"claude(啟動 Claude Code)","startup.preset_claude_continue":"claude -c(繼續上次工作階段)","startup.preset_codex":"codex(啟動 Codex CLI)","startup.custom":"自訂…","startup.custom_placeholder":'例如 claude "修復登入 bug"',"bind.title":"綁定工作階段","bind.sessionName":"工作階段名稱","bind.pickSession":"選擇要綁定的工作階段","bind.newSession":"+ 新增工作階段","bind.modeNew":"新增工作階段","bind.modeExisting":"既有工作階段","bind.alreadyExists":"此工作階段已存在","bind.bind":"綁定","bind.checking":"驗證中…","bind.createAndOpen":"新增並開啟","bind.creating":"建立中…","bind.createHint":"工作階段「{name}」不存在,點「新增並開啟」建立","bind.alreadyBound":"已綁定此工作階段","bind.createFailed":"建立失敗,請重試","bind.invalidName":"只能使用字母、數字、連字號(≤16)","bind.desktopHint":"這裡的工作階段(包括手機新建的),電腦上一條命令即可接管:handmux open <名稱>","bind.checkFailed":"驗證失敗,請重試","bind.startDir":"起始目錄","bind.homeDirDefault":"主目錄(預設)","bind.choose":"選擇","bind.reset":"重置","actionsheet.confirmAgain":"確認?再點一次","dirpicker.title":"選擇目錄","inbox.title":"收件匣","inbox.working":"進行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"目前沒有面板狀態","inbox.enableTitle":"開啟 AI 工作階段通知","inbox.enableHint":"將每個 Claude / Codex 面板標記為進行中 / 需要你 / 已完成,需要時也會推播提醒。","inbox.enableBtn":"開啟","inbox.enabling":"開啟中…","inbox.enableFailed":"開啟失敗——請查看伺服器日誌。","idea.title":"想法","idea.editPlaceholder":"編輯想法…","idea.addPlaceholder":"記錄一條想法…","idea.add":"新增","idea.empty":"還沒有想法,記錄一條吧","idea.dragSort":"拖曳排序","idea.fillInput":"填入輸入框","idea.send":"傳送","doclink.title":"開啟檔案","changelog.title":"新功能","preview.dynamic":"動態預覽","preview.static":"靜態預覽","preview.remainTitle":"剩餘有效期 — 點擊續期 / 停止","preview.toPcView":"切換到電腦檢視","preview.toMobileView":"切換到手機檢視","preview.pcView":"電腦檢視","preview.mobileView":"手機檢視","preview.refresh":"重新整理","preview.minimize":"收起","preview.ttlDialog":"預覽有效期","preview.renew":"續期(重置為 1 小時)","preview.stop":"停止預覽","preview.iframeTitle":"預覽","preview.zoomOut":"縮小","preview.zoomIn":"放大","imageviewer.loadFailed":"圖片載入失敗","imageviewer.saved":"已儲存,可在相簿或「下載」中查看","imageviewer.shareUnsupported":"圖片分享需要 Chrome 或 Safari 瀏覽器","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"圖片","imageviewer.saveImage":"儲存圖片","imageviewer.shareImage":"分享圖片","mic.stop":"停止語音輸入","mic.start":"語音輸入","dock.send":"傳送","dock.send.hint":"點傳送 · 長按填入","dock.phrases":"常用語","dock.attach":"上傳","dock.history":"歷史","history.empty":"還沒有發送記錄","history.scope":"僅目前視窗的記錄","dock.input.placeholder":"說點什麼…","dock.input.enterDraft":"按 Shift + Enter 進入草稿模式","dock.input.exitDraft":"按 Esc 回到終端模式 · Shift + Enter 換行","dock.command.placeholder":"輸入指令 · Enter 執行","dock.mode.agent":"對話","dock.mode.toggle":"切換輸入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"新增","fav.addPlaceholder":"新增常用…","dock.upload.aria":"上傳檔案","dock.upload.title":"上傳檔案(存到主目錄上傳區,不進專案)","dock.upload.progress":"上傳 {name}{tag}","dock.upload.failed":"上傳失敗:{names}","app.nameExists":"該名稱已存在","app.renameFailed":"重新命名失敗,請重試","app.deleteFailed":"刪除失敗,請重試","app.moveFailed":"移動失敗,請重試","app.sessionGone":"工作階段「{name}」不存在,可能已關閉","app.docNotFound":"檔案不存在","app.docTooLarge":"檔案過大(超過 2MB)","app.docUnsupported":"不支援的檔案或路徑","app.docOpenFailed":"開啟失敗,請重試","app.preview":"預覽","app.openPreview":"開啟預覽","app.ideas":"想法","app.files":"檔案","app.settings":"設定","app.renameSession":"重新命名工作階段","app.renameWindow":"重新命名視窗","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"刪除視窗","pane.splitH":"左右分割","pane.splitV":"上下分割","pane.manage":"管理分割","pane.close":"關閉此格","pane.closeConfirm":"確認關閉?再點一次","pane.splitFailed":"分割失敗","pane.closeFailed":"關閉失敗","app.deleteLastWindowConfirm":"這是最後一個視窗,刪除將關閉整個工作階段!再點一次","app.deleteConfirm":"確認刪除?再點一次","app.cannotLocate":"無法定位","app.pickItsDir":",請選擇所在目錄:","app.noBoundSession":"尚未綁定工作階段","app.tapToBind":"點此綁定一個","app.selectSessionHint":"點擊左上角 ☰ 選擇工作階段","app.backToExit":"再按一次返回鍵結束","settings.title":"設定","settings.group_global":"全域設定","settings.font_size":"字型大小","settings.font_decrease":"縮小字型","settings.font_increase":"放大字型","settings.font_auto":"自適應","settings.font_auto_title":"依高度自動調整","settings.keyboard_mode":"鍵盤模式","settings.keyboard_mode_auto":"自動識別","settings.keyboard_mode_mobile":"手機","settings.keyboard_mode_desktop":"電腦","settings.keyboard_mode_hint":"僅套用於目前瀏覽器;識別不準時可手動指定。","settings.chat_lens":"啟用對話視圖(實驗性功能)","settings.chat_lens_hint":"實驗性功能,可能不穩定。以對話形式查看和操作 Claude 工作階段;開啟後,視窗列出現視圖切換,並可選擇對話配色。","boot.loading":"正在載入","boot.chat_empty":"發送你的第一則訊息,對話就開始啦","settings.chat_lens_need_hooks":"需先安裝 Claude hooks:對話裡的問題卡、狀態提示都依賴它。","settings.chat_lens_no_claude":"未檢測到 Claude Code;安裝並運行後再開啟。","settings.chat_lens_install_hooks":"一鍵安裝 hooks","settings.chat_lens_installing":"安裝中…","settings.chat_lens_hooks_err":"安裝失敗,請到電腦上運行 handmux hooks install","settings.path_highlight":"高亮檔案路徑","settings.path_highlight_hint":"為終端機裡可點開的檔案路徑加底色。無論開關與否,路徑都可點開。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日誌","settings.reload_app":"重新載入應用程式","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"意見回饋","settings.feedback_issues":"GitHub 回報","settings.feedback_group":"微信用戶群","settings.feedback_hint":"bug、想法都歡迎——Issue 會被追蹤處理;微信群回饋直達。","settings.update_available":"有新版本 v{v} 可用","settings.update_more":"另有 {n} 個版本更新","settings.update_how":"在電腦上執行","settings.push_notifications":"推播通知","settings.notify_on":"已開啟 ✓","settings.notify_enable":"開啟裝置通知","settings.notify_enabled":"已開啟,應會收到一則歡迎通知","settings.notify_disabled":"已關閉","settings.notify_failed":"操作失敗","settings.processing":"處理中","settings.push_hint":"監聽「需要你」和「已完成」:所關注工作階段需要授權/回答,或一輪剛完成時,推播到此裝置。","settings.push_unsupported":"推播需要 Chrome 或 Safari 瀏覽器","settings.group_session":"目前工作階段設定","settings.screen_cols":"螢幕欄數","settings.cols_dec":"減少","settings.cols_dec_title":"減少欄數","settings.cols_inc":"增加","settings.cols_inc_title":"增加欄數","settings.cols_restore":"預設","settings.cols_restore_title":"恢復視窗預設尺寸","settings.preview_site":"預覽站台","settings.preview_static_site":"預覽靜態站台","settings.preview_running_dynamic":"動態預覽 執行中","settings.preview_running_static":"靜態預覽 執行中","settings.preview_remain_title":"剩餘有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"續期","settings.preview_confirm_stop":"確認停止","settings.preview_stop":"停止","settings.preview_name":"名稱:{name}","settings.preview_port":"(連接埠:{port})","settings.preview_type":"預覽類型","settings.preview_off":"不開啟","settings.preview_static":"靜態","settings.preview_dynamic":"動態","settings.preview_off_hint":"未開啟預覽。選擇「靜態」開始。","settings.preview_off_hint_both":"未開啟預覽。選擇「靜態」或「動態」開始。","settings.preview_dynamic_disabled":"動態連接埠預覽未啟用。要開啟:將一個萬用字元預覽網域(previewDomain,如 *.example.com)指向閘道,並設定對應的 TLS 憑證。Cloudflare / 自建憑證差異請見 README。","settings.preview_pick_dir":"選擇目錄啟動","settings.preview_static_hint":"選一個含 index.html 的目錄,在手機上預覽。","settings.preview_port_placeholder":"連接埠,如 3000","settings.preview_port_label":"連接埠","settings.preview_starting":"啟動中…","settings.preview_start":"啟動","settings.preview_dynamic_hint":"填入本機正在執行的連接埠(dev server / 後端),手機透過子網域直接存取。","settings.dir_picker_hint":"選擇要預覽的靜態站台目錄(含 index.html)","settings.err_port_not_listening":"該連接埠未在監聽,請確認服務已啟動","settings.err_bad_port":"連接埠不合法(1–65535)","settings.err_dynamic_disabled":"動態預覽未開啟","settings.err_start_failed":"啟動失敗","localurl.title":"開啟代理並預覽","localurl.open":"開啟代理","localurl.disabled":"動態預覽未開啟——在設定中配置預覽網域後即可代理本機連接埠。","localurl.notListening":"連接埠 :{port} 沒有服務在監聽。","localurl.badProtocol":"此連結不是可代理的 HTTP 或 HTTPS 位址。","localurl.network":"無法連線 handmux 服務,請檢查網路後重試。","localurl.failed":"無法開啟預覽:{reason}。請檢查設定後重試。","filebrowser.openDirFailed":"無法開啟該目錄","filebrowser.copiedPath":"已複製路徑:{abs}","filebrowser.mkdirFailed":"建立目錄失敗(名稱不合法或已存在)","filebrowser.downloading":"下載 {name}","filebrowser.downloadFailed":"下載失敗","filebrowser.uploading":"上傳 {name}{tag}","filebrowser.uploadFailed":"上傳失敗","filebrowser.uploadPartialFailed":"以下檔案上傳失敗:{names}","filebrowser.sessionDir":"工作階段目錄","filebrowser.jumpToSessionDir":"跳到目前工作階段目錄","filebrowser.parentDir":"上層目錄","filebrowser.rootSelect":"切換根目錄(主目錄 / 暫存目錄)","filebrowser.pathPlaceholder":"輸入路徑(即時篩選/跳轉)","filebrowser.newFolder":"新增資料夾","filebrowser.createBtn":"建立","filebrowser.uploadFile":"上傳檔案","filebrowser.uploadToCurrentDir":"上傳到目前目錄","filebrowser.enterSubdirToUpload":"請進入一個子目錄上傳","filebrowser.folderNamePlaceholder":"資料夾名稱","filebrowser.uploadPendingTo":"將「{name}」上傳到目前目錄","filebrowser.enterSubdirFirst":"(請先進入一個子目錄)","filebrowser.upload":"上傳","filebrowser.savedToDownloads":"已儲存「{name}」到「下載」資料夾,可在系統檔案管理員查看","filebrowser.noMatches":"沒有符合的檔案或目錄","filebrowser.tooMany":"共 {total} 項,僅顯示前 {shown} 項——在路徑框輸入關鍵字可篩選","filebrowser.previewUnsupported":"暫不支援此類型檔案的預覽,點右側按鈕可下載","filebrowser.copyAbsPath":"複製絕對路徑","filebrowser.download":"下載","filebrowser.pickThisDir":"選定此目錄 {path}","filebrowser.downloadConfirm":"下載 {name}?","filemanager.files":"檔案","filemanager.closeTab":"關閉標籤","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目錄","git.errReadRepo":"無法讀取儲存庫","git.errLoad":"載入失敗","git.noRepoInDir":"這個目錄還不是 git 儲存庫 —— 換一個目錄,或在這裡 git init 一下。","git.outsideRoots":"這個目錄在 handmux 可存取範圍之外 —— 只開放主目錄和 /tmp。把儲存庫放到主目錄下,就能在這裡檢視了。","git.errReadDir":"無法讀取該目錄","git.commitDetail":"提交詳情","git.diff":"差異","git.bindRepo":"綁定儲存庫","git.collapse":"收起","git.currentBranch":"目前分支","git.switchViewedBranch":"切換查看的分支","git.switchBranch":"切換分支","git.noBranches":"目前沒有分支","git.noRepoBound":"未綁定儲存庫,點左上角「+」選擇一個目錄。","git.changes":"變更","git.commits":"提交","git.pullToLoadMore":"下拉載入更多","git.pickerHint":"選擇一個目錄,自動尋找其中的 git 儲存庫","git.cleanTree":"工作區乾淨","git.noCommits":"目前沒有提交","git.noDiff":"無差異","git.fontSmaller":"縮小字型","git.fontLarger":"放大字型","git.diffTruncated":"diff 過大,已截斷","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"還沒有命令,傳送一條或儲存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全域 · 所有工作階段","cmd.recent":"最近","cmd.scopeSession":"僅本工作階段","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗讀","doc.pauseRead":"暫停朗讀","doc.resumeRead":"繼續朗讀","doc.stopRead":"停止朗讀","doc.rate":"語速","doc.fontSmaller":"縮小字型","doc.fontLarger":"放大字型","inbox.view.working":"進行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推播通知需要 Chrome 或 Safari 瀏覽器","push.iosAddToHome":"iOS 需先將本站「加入主畫面」,從主畫面圖示開啟後再開啟","a2hs.title":"將 handmux 加入主畫面","a2hs.lead":"像 App 一樣開啟——全螢幕、沒有網址列。在 iPhone 上,pane 需要你時的推播也靠它送達。","a2hs.install":"安裝 handmux","a2hs.ios1":"點 Safari 的分享按鈕(⬆︎ 方框)。","a2hs.ios2":"點「更多」,或向下滑動清單。","a2hs.ios3":"選「加入主畫面」,再點「加入」。","a2hs.iosHint":"Safari 裡:分享 → 更多 → 加入主畫面。","a2hs.iosOpenSafari":"目前不是 Safari。請在 Safari 開啟本頁再加入主畫面——其他 iOS 瀏覽器無法安裝。","a2hs.androidManual":"開啟瀏覽器選單(⋮),選「加入主畫面」或「安裝應用程式」。","a2hs.later":"稍後再說","push.permissionTimeout":"系統未回傳通知授權結果,請在系統設定中檢查 handmux 或瀏覽器的通知權限後再試","push.permissionDenied":"通知權限被拒絕","push.swRegisterTimeout":"註冊通知服務逾時,請檢查網路後再試","push.swRegisterFailed":"註冊通知服務失敗:{reason}。請清除本站資料後重新開啟再試","push.swTimeout":"通知服務已註冊但未能啟用,請清除本站資料後重新開啟再試","push.unknownReason":"原因不明","push.configTimeout":"讀取推播設定逾時,請檢查與 handmux 伺服器的連線後再試","push.browserTimeout":"瀏覽器推播服務沒有回應;Android Chrome 請確認 Google Play 服務可用後再試","push.noVapid":"伺服器未設定推播(VAPID)","push.reportTimeout":"訂閱已建立,但回報伺服器逾時,請檢查連線後再試","push.subscriptionExpired":"Chrome 回傳的推播訂閱已失效,已為你重設;請再次點擊開啟通知","push.deliveryRejected":"推播服務拒絕了新訂閱,請檢查伺服器記錄後再試","push.subscribeFailed":"訂閱回報失敗","push.sendFailed":"傳送失敗","api.loadFailed":"載入失敗","api.uploadFailed":"上傳失敗","upload.title":"上傳中","upload.processing":"已傳送,伺服器接收中…","api.uploadBadDir":"無法上傳到該目錄","api.uploadDuplicate":"已存在同名檔案","api.uploadTooLarge":"檔案過大(上限 50MB)","api.uploadBadType":"不支援的檔案類型","time.secAgo":"{n} 秒前","time.minAgo":"{n} 分鐘前","time.hourAgo":"{n} 小時前","time.dayAgo":"{n} 天前","time.expired":"已過期","time.minutes":"{n} 分鐘","settings.script_push":"腳本推送","settings.script_push_open":"怎麼用","settings.script_push_hint":"讓電腦上的腳本把一條通知推到手機。","scriptPush.title":"腳本推送","scriptPush.intro":"讓電腦上的腳本複用 handmux 的推送通道:在執行 handmux 的電腦上,一條 handmux push 命令就能把通知推到手機——建置、CI 或長任務結束時提醒你,不用另接推送服務。","scriptPush.copied":"已複製","scriptPush.session_placeholder":"<會話名>","scriptPush.device_placeholder":"<本裝置key>","scriptPush.scope_all":"推給所有已訂閱裝置(預設)","scriptPush.scope_session":"只推某個會話裡的裝置","scriptPush.scope_device":"只推這台裝置","scriptPush.device_key_note":"上面這串 key 就是這台裝置的,複製即用。","scriptPush.device_need_enable":"先在上方開啟推送通知,才會生成這台裝置的 key。","scriptPush.opts_label":"可選參數(追加到上面任意一條後面)","scriptPush.opt_tag":"--tag <標籤> —— 相同 tag 會覆蓋上一條推送,而不是堆疊。","scriptPush.opt_url":"--url <路徑> —— 點擊通知時開啟這個路徑。","scriptPush.reliability":"注意:Web 推送經手機系統(FCM/APNs)中轉,屬盡力而為——省電模式、離線或廠商策略都可能延遲或丟棄它,並不保證即時送達。對送達強依賴的場景,請改用專門的 IM(WeChat / Telegram bot 等)。","pushInbox.title":"通知記錄","pushInbox.empty":"還沒有腳本通知","pushInbox.delete":"刪除","pushInbox.justNow":"剛剛","pushInbox.minutesAgo":"{n}分鐘前","pushInbox.hoursAgo":"{n}小時前","pushInbox.detailTitle":"通知詳情","pushInbox.openUrl":"打開連結","pushInbox.expired":"這條訊息已過期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已讀","pushInbox.unreadCount":"{n} 未讀","pushInbox.loadFailed":"通知記錄載入失敗,請檢查連線後重試","pushInbox.deleteFailed":"通知刪除失敗,訊息已保留,請重試","pushInbox.retry":"重試","pushInbox.deliveryPending":"傳送中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失敗","pushInbox.deliveryReasonExpired":"訂閱已失效","pushInbox.deliveryReasonRateLimited":"推播服務限流","pushInbox.deliveryReasonUnavailable":"推播服務暫不可用","pushInbox.deliveryReasonRejected":"推播服務已拒絕","pushInbox.deliveryReasonNetwork":"網路錯誤","pushInbox.deliveryReasonNotConfigured":"伺服器未設定推播","pushInbox.deliveryReasonUnknown":"不明原因","workspace.bootDetected":"偵測到電腦已重新啟動","workspace.tmuxDetected":"偵測到 tmux 已重新啟動","workspace.summary":"上次工作區 · {sessions} 個工作階段 · 儲存於 {time}","workspace.restoreLast":"還原上次工作區","workspace.partialCard":"仍有 {failures} 個工作階段需要處理","workspace.unknownTime":"未知時間","workspace.savedAt":"儲存於 {time}","workspace.topologySummary":"{sessions} 個工作階段 · {windows} 個視窗 · {panes} 個窗格","workspace.planSummary":"將還原 {restore} 個工作階段;{already} 個已存在","workspace.renameRule":"僅當目前已有同名工作階段時,還原名稱才會加上 -restored 後綴。","workspace.nonDestructive":"目前的工作階段不會被修改、重新命名或停止。","workspace.progress":"正在還原 {completed} / {total}…","workspace.progressDone":"已還原 {completed} / {total}","workspace.complete":"工作區已還原。","workspace.completedSummary":"本次還原:{sessions} 個工作階段 · {windows} 個視窗 · {panes} 個窗格","workspace.rebindHint":"還原的工作階段不會自動顯示;可重新選擇要綁定到這台手機的工作階段。","workspace.rebind":"重新綁定工作階段","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"未知工作階段","workspace.restore":"還原","workspace.ignore":"忽略此備份","workspace.protectionTitle":"工作區未受保護","workspace.protection.live-corrupt":"工作區狀態副本已損壞;請檢查磁碟與 ~/.handmux 權限,然後重新啟動 handmux。","workspace.protection.live-unavailable":"無法讀寫工作區狀態;請檢查磁碟空間與 ~/.handmux 權限,然後重新啟動 handmux。","workspace.protection.unknown":"背景快照暫時無法使用;請檢查電腦上的 handmux 日誌。","workspace.error.restore-interrupted":"還原已中斷;請重試此備份","workspace.error.checkpoint-not-found":"此備份已無法使用;請重新整理後選擇其他備份","workspace.error.storage-full":"工作區儲存空間不足;請釋放磁碟空間後重試","workspace.error.permission-denied":"無法寫入工作區儲存;請檢查權限後重試","workspace.error.plan-failed":"還原計畫已變更;請重新整理後重試","workspace.error.agent-unavailable":"Agent 無法續接;請開啟已還原的 shell 後手動重試","workspace.error.tmux-unavailable":"tmux 無法使用;請確認 tmux 已執行後重試","workspace.error.restore-failed":"工作階段未還原;請檢查 handmux 日誌後重試","workspace.error.operation-not-found":"此還原任務已無法使用;請重新還原此備份","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"工作目錄無法使用;已在主目錄中還原","workspace.warning.layout-fallback":"窗格配置無法完整還原;已保留預設配置","workspace.warning.agent-warning":"Agent 未能自動續接;已還原的 shell 仍可使用","workspace.warning.live-reconcile-failed":"即時工作區狀態核對失敗;請檢查 handmux 日誌","workspace.warning.workspace-unavailable":"工作區儲存暫時無法使用;請檢查磁碟空間和權限","workspace.warning.restore-warning":"還原時出現可繼續處理的提醒;請檢查還原結果"},kM={"terminal.transport_live":"リアル","terminal.transport_snapshot":"スナップ","terminal.transport_detail_title":"ターミナル配信状態","terminal.transport_detail_configured":"設定モード","terminal.transport_detail_current":"現在のモード","terminal.transport_detail_connection":"接続状態","terminal.transport_detail_manual":"スナップショット取得が手動で選択されているため、自動では切り替わりません。","terminal.transport_detail_live":"ターミナルはリアルタイム配信を正常に受信しています。","terminal.transport_detail_fallback":"リアルタイム配信が不安定なため、スナップショット取得へ切り替えました。","terminal.transport_detail_unavailable":"リアルタイム接続を確立できません。リバースプロキシが WebSocket に対応しているか確認してください。","terminal.transport_detail_waiting":"接続が安定してからリアルタイム配信への復帰を試みます。","terminal.transport_detail_retry":"約 {seconds} 秒後にリアルタイム配信への復帰を試みます。","terminal.connection_connecting":"確認中","terminal.connection_good":"良好","terminal.connection_degraded":"普通","terminal.connection_poor":"不良","settings.terminal_transport":"ターミナル配信モード","settings.terminal_transport_live":"リアルタイム配信","settings.terminal_transport_snapshot":"スナップショット取得","settings.terminal_transport_hint":"リアルタイム配信は WebSocket を使用し、回線が不安定な場合はスナップショット取得へ切り替わり、30 秒安定すると復帰を試みます。","settings.snapshot_interval":"操作中の更新間隔","settings.snapshot_interval_hint":"ターミナルがアイドル状態になると更新頻度を下げ、通信量とリソースを節約します。","terminal.disconnected":"接続が切れました。再接続しています…","terminal.paneMissing":"このペインは閉じられました。別のペインに切り替えてください。","common.save":"保存","common.cancel":"キャンセル","common.confirm":"確認","common.ok":"OK","common.close":"閉じる","common.delete":"削除","common.copy":"コピー","common.rename":"名前を変更","common.create":"新規作成","common.back":"戻る","common.open":"開く","common.loading":"読み込み中…","common.done":"完了","token.title":"アクセストークンが必要です","token.placeholder":"HANDMUX_TOKEN を貼り付け","settings.language":"言語 Language","home.empty":"ファイルが開かれていません","home.emptyHint":"「新規」タブでファイルを選択してください","home.remove":"削除","drawer.empty":"セッションが紐付けられていません","drawer.unbind":"紐付け解除","drawer.bind":"セッションを紐付け","drawer.logout":"ログアウト","windowbar.newWindow":"新規ウィンドウ","rename.new_name":"新しい名前","rename.name_rule":"英数字とハイフンのみ(≤16文字)","rename.failed":"名前の変更に失敗しました。再試行してください","rename.saving":"保存中…","newwindow.title":"新規ウィンドウ","newwindow.window_name":"ウィンドウ名(任意)","newwindow.name_placeholder":"空白で自動命名 · 英数字/ハイフン ≤16","newwindow.name_rule":"英数字とハイフンのみ(≤16文字)","newwindow.start_dir":"開始ディレクトリ","newwindow.session_dir_named":"{dir}(セッションディレクトリ)","newwindow.session_dir_default":"セッションディレクトリ(デフォルト)","newwindow.choose":"選択","newwindow.reset_to_session_dir":"セッションディレクトリにリセット","newwindow.creating":"作成中…","startup.label":"起動コマンド(任意)","startup.aria":"起動コマンド","startup.preset_shell":"空のシェル(デフォルト)","startup.preset_claude":"claude(Claude Code を起動)","startup.preset_claude_continue":"claude -c(前回のセッションを継続)","startup.preset_codex":"codex(Codex CLI を起動)","startup.custom":"カスタム…","startup.custom_placeholder":'例:claude "ログインバグを修正"',"bind.title":"セッションを紐付け","bind.sessionName":"セッション名","bind.pickSession":"紐付けるセッションを選択","bind.newSession":"+ 新規セッション","bind.modeNew":"新規作成","bind.modeExisting":"既存を選択","bind.alreadyExists":"このセッションは既に存在します","bind.bind":"紐付け","bind.checking":"確認中…","bind.createAndOpen":"作成して開く","bind.creating":"作成中…","bind.createHint":"セッション「{name}」が存在しません。「作成して開く」をタップして作成してください","bind.alreadyBound":"このセッションはすでに紐付けられています","bind.createFailed":"作成に失敗しました。再試行してください","bind.invalidName":"英数字とハイフンのみ(≤16文字)","bind.desktopHint":"ここのセッション(スマホで作成したものも)は、PC で 1 コマンドで引き継げます:handmux open <名前>","bind.checkFailed":"確認に失敗しました。再試行してください","bind.startDir":"開始ディレクトリ","bind.homeDirDefault":"ホームディレクトリ(デフォルト)","bind.choose":"選択","bind.reset":"リセット","actionsheet.confirmAgain":"確認しますか?もう一度タップ","dirpicker.title":"ディレクトリを選択","inbox.title":"受信トレイ","inbox.working":"進行中","inbox.done":"完了","inbox.needs":"要対応","inbox.clearDone":"完了済みをクリア","inbox.empty":"パネルの状態なし","inbox.enableTitle":"AI セッション通知を有効にする","inbox.enableHint":"各 Claude / Codex パネルを「進行中」「要対応」「完了」にマークし、対応が必要なときにプッシュ通知を送信します。","inbox.enableBtn":"有効にする","inbox.enabling":"有効化中…","inbox.enableFailed":"有効化に失敗しました——サーバーログを確認してください。","idea.title":"アイデア","idea.editPlaceholder":"アイデアを編集…","idea.addPlaceholder":"アイデアを記録…","idea.add":"追加","idea.empty":"まだアイデアがありません。記録してみましょう","idea.dragSort":"ドラッグで並べ替え","idea.fillInput":"入力欄に挿入","idea.send":"送信","doclink.title":"ファイルを開く","changelog.title":"新機能","preview.dynamic":"ダイナミックプレビュー","preview.static":"静的プレビュー","preview.remainTitle":"残り有効期限 — タップして更新 / 停止","preview.toPcView":"PCビューに切り替え","preview.toMobileView":"モバイルビューに切り替え","preview.pcView":"PCビュー","preview.mobileView":"モバイルビュー","preview.refresh":"更新","preview.minimize":"最小化","preview.ttlDialog":"プレビュー有効期限","preview.renew":"更新(1時間にリセット)","preview.stop":"プレビューを停止","preview.iframeTitle":"プレビュー","preview.zoomOut":"縮小","preview.zoomIn":"拡大","imageviewer.loadFailed":"画像の読み込みに失敗しました","imageviewer.saved":"保存しました。フォトライブラリまたは「ダウンロード」で確認できます","imageviewer.shareUnsupported":"画像の共有には Chrome または Safari が必要です","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"拡大","imageviewer.imageTitle":"画像","imageviewer.saveImage":"画像を保存","imageviewer.shareImage":"画像を共有","mic.stop":"音声入力を停止","mic.start":"音声入力","dock.send":"送信","dock.send.hint":"タップで送信 · 長押しで挿入","dock.phrases":"よく使うフレーズ","dock.attach":"添付","dock.history":"履歴","history.empty":"履歴はまだありません","history.scope":"このウィンドウの記録のみ","dock.input.placeholder":"メッセージを入力…","dock.input.enterDraft":"Shift + Enter で下書きモードへ","dock.input.exitDraft":"Esc でターミナルモードへ戻る · Shift + Enter で改行","dock.command.placeholder":"コマンドを入力 · Enterで実行","dock.mode.agent":"会話","dock.mode.toggle":"入力モードを切替","dock.mode.command":"コマンド","dock.mode.chat":"チャット","fav.title":"よく使う","fav.add":"追加","fav.addPlaceholder":"よく使う項目を追加…","dock.upload.aria":"ファイルをアップロード","dock.upload.title":"ファイルをアップロード(ホームのアップロードフォルダに保存、プロジェクトには含まない)","dock.upload.progress":"{name}{tag} をアップロード中","dock.upload.failed":"アップロード失敗:{names}","app.nameExists":"その名前はすでに使われています","app.renameFailed":"名前の変更に失敗しました。再試行してください","app.deleteFailed":"削除に失敗しました。再試行してください","app.moveFailed":"移動に失敗しました。再試行してください","app.sessionGone":"セッション「{name}」が存在しません。閉じられた可能性があります","app.docNotFound":"ファイルが存在しません","app.docTooLarge":"ファイルが大きすぎます(2MB超)","app.docUnsupported":"サポートされていないファイルまたはパス","app.docOpenFailed":"開くのに失敗しました。再試行してください","app.preview":"プレビュー","app.openPreview":"プレビューを開く","app.ideas":"アイデア","app.files":"ファイル","app.settings":"設定","app.renameSession":"セッション名を変更","app.renameWindow":"ウィンドウ名を変更","app.moveLeft":"◀ 左へ移動","app.moveRight":"右へ移動 ▶","app.deleteWindow":"ウィンドウを削除","pane.splitH":"左右に分割","pane.splitV":"上下に分割","pane.manage":"分割を管理","pane.close":"ペインを閉じる","pane.closeConfirm":"閉じますか?もう一度タップ","pane.splitFailed":"分割に失敗しました","pane.closeFailed":"閉じる操作に失敗しました","app.deleteLastWindowConfirm":"これは最後のウィンドウです。削除するとセッション全体が閉じます!もう一度タップ","app.deleteConfirm":"削除しますか?もう一度タップ","app.cannotLocate":"場所を特定できません","app.pickItsDir":"。ディレクトリを選択してください:","app.noBoundSession":"セッションが紐付けられていません","app.tapToBind":"タップして紐付け","app.selectSessionHint":"左上の ☰ をタップしてセッションを選択","app.backToExit":"もう一度戻るで終了します","settings.title":"設定","settings.group_global":"グローバル設定","settings.font_size":"フォントサイズ","settings.font_decrease":"フォントを縮小","settings.font_increase":"フォントを拡大","settings.font_auto":"自動調整","settings.font_auto_title":"高さに合わせて自動調整","settings.keyboard_mode":"キーボードモード","settings.keyboard_mode_auto":"自動判定","settings.keyboard_mode_mobile":"モバイル","settings.keyboard_mode_desktop":"デスクトップ","settings.keyboard_mode_hint":"このブラウザだけに適用されます。判定が違う場合は手動で選択できます。","settings.path_highlight":"ファイルパスをハイライト","settings.path_highlight_hint":"ターミナル内のタップ可能なファイルパスに色を付けます。オフでもパスはタップできます。","settings.whats_new":"新機能","settings.view_changelog":"変更履歴を表示","settings.reload_app":"アプリを再読み込み","settings.has_update":"更新あり","settings.version":"バージョン","settings.feedback":"フィードバック","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat グループ","settings.feedback_hint":"バグ報告や要望は Issue へ — 必ず追跡・返信されます。","settings.update_available":"バージョン {v} が利用可能","settings.update_more":"ほか {n} バージョンの更新","settings.update_how":"パソコンで実行:","settings.push_notifications":"プッシュ通知","settings.notify_on":"有効 ✓","settings.notify_enable":"デバイス通知を有効にする","settings.notify_enabled":"有効にしました。ウェルカム通知が届くはずです","settings.notify_disabled":"無効","settings.notify_failed":"操作に失敗しました","settings.processing":"処理中","settings.push_hint":"「要対応」と「完了」を監視:注目しているセッションが承認/回答を必要としているとき、またはラウンドが完了したときにこのデバイスへ通知します。","settings.push_unsupported":"プッシュ通知には Chrome または Safari が必要です","settings.group_session":"現在のセッション設定","settings.screen_cols":"画面の列数","settings.cols_dec":"減らす","settings.cols_dec_title":"列数を減らす","settings.cols_inc":"増やす","settings.cols_inc_title":"列数を増やす","settings.cols_restore":"デフォルト","settings.cols_restore_title":"ウィンドウのデフォルトサイズに戻す","settings.preview_site":"プレビューサイト","settings.preview_static_site":"静的サイトをプレビュー","settings.preview_running_dynamic":"ダイナミックプレビュー 実行中","settings.preview_running_static":"静的プレビュー 実行中","settings.preview_remain_title":"残り有効期限","settings.preview_remain":"残り {time}","settings.preview_renew":"更新","settings.preview_confirm_stop":"停止を確認","settings.preview_stop":"停止","settings.preview_name":"名前:{name}","settings.preview_port":"(ポート:{port})","settings.preview_type":"プレビュータイプ","settings.preview_off":"無効","settings.preview_static":"静的","settings.preview_dynamic":"ダイナミック","settings.preview_off_hint":"プレビューは無効です。「静的」を選択して開始してください。","settings.preview_off_hint_both":"プレビューは無効です。「静的」または「ダイナミック」を選択して開始してください。","settings.preview_dynamic_disabled":"ダイナミックポートプレビューは無効です。有効にするには:ワイルドカードプレビュードメイン(previewDomain、例:*.example.com)をゲートウェイに向け、対応するTLS証明書を設定してください。Cloudflare /自己署名証明書の違いはREADMEを参照。","settings.preview_pick_dir":"ディレクトリを選択して開始","settings.preview_static_hint":"index.html を含むディレクトリを選択して、スマートフォンでプレビュー。","settings.preview_port_placeholder":"ポート番号(例:3000)","settings.preview_port_label":"ポート","settings.preview_starting":"起動中…","settings.preview_start":"起動","settings.preview_dynamic_hint":"ローカルで実行中のポート(devサーバー / バックエンド)を入力すると、スマートフォンからサブドメイン経由でアクセスできます。","settings.dir_picker_hint":"プレビューする静的サイトのディレクトリを選択(index.html を含む)","settings.err_port_not_listening":"そのポートはリッスンしていません。サービスが起動しているか確認してください","settings.err_bad_port":"ポート番号が無効です(1〜65535)","settings.err_dynamic_disabled":"ダイナミックプレビューは無効です","settings.err_start_failed":"起動に失敗しました","localurl.title":"プロキシを有効にしてプレビュー","localurl.open":"プロキシを有効化","localurl.disabled":"ダイナミックプレビューは無効です。設定でプレビュードメインを構成するとローカルポートをプロキシできます。","localurl.notListening":"ポート :{port} で待ち受けているサービスがありません。","localurl.badProtocol":"このリンクはプロキシ可能な HTTP または HTTPS アドレスではありません。","localurl.network":"handmux サービスに接続できません。ネットワークを確認して再試行してください。","localurl.failed":"プレビューを開始できません:{reason}。設定を確認して再試行してください。","filebrowser.openDirFailed":"ディレクトリを開けませんでした","filebrowser.copiedPath":"パスをコピーしました:{abs}","filebrowser.mkdirFailed":"ディレクトリの作成に失敗しました(名前が無効または既に存在します)","filebrowser.downloading":"{name} をダウンロード中","filebrowser.downloadFailed":"ダウンロードに失敗しました","filebrowser.uploading":"{name}{tag} をアップロード中","filebrowser.uploadFailed":"アップロードに失敗しました","filebrowser.uploadPartialFailed":"以下のファイルのアップロードに失敗しました:{names}","filebrowser.sessionDir":"セッションディレクトリ","filebrowser.jumpToSessionDir":"現在のセッションディレクトリへ移動","filebrowser.parentDir":"親ディレクトリ","filebrowser.rootSelect":"ルートディレクトリを切り替え(ホーム / 一時)","filebrowser.pathPlaceholder":"パスを入力(リアルタイムフィルタ / ジャンプ)","filebrowser.newFolder":"新規フォルダ","filebrowser.createBtn":"作成","filebrowser.uploadFile":"ファイルをアップロード","filebrowser.uploadToCurrentDir":"現在のディレクトリにアップロード","filebrowser.enterSubdirToUpload":"サブディレクトリに移動してからアップロードしてください","filebrowser.folderNamePlaceholder":"フォルダ名","filebrowser.uploadPendingTo":"「{name}」を現在のディレクトリにアップロード","filebrowser.enterSubdirFirst":"(先にサブディレクトリに移動してください)","filebrowser.upload":"アップロード","filebrowser.savedToDownloads":"「{name}」を「ダウンロード」フォルダに保存しました。ファイルマネージャーで確認できます","filebrowser.noMatches":"一致するファイルまたはディレクトリがありません","filebrowser.tooMany":"合計 {total} 件、最初の {shown} 件のみ表示——パス欄にキーワードを入力してフィルタできます","filebrowser.previewUnsupported":"このファイルタイプのプレビューはサポートされていません。右のボタンでダウンロードできます","filebrowser.copyAbsPath":"絶対パスをコピー","filebrowser.download":"ダウンロード","filebrowser.pickThisDir":"このディレクトリを選択 {path}","filebrowser.downloadConfirm":"{name} をダウンロードしますか?","filemanager.files":"ファイル","filemanager.closeTab":"タブを閉じる","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"ディレクトリ","git.errReadRepo":"リポジトリを読み込めませんでした","git.errLoad":"読み込みに失敗しました","git.noRepoInDir":"このディレクトリにはまだ git リポジトリがありません — 別のディレクトリを選ぶか、ここで git init してください。","git.outsideRoots":"このフォルダは handmux がアクセスできる範囲外です — ホームディレクトリと /tmp のみ開けます。リポジトリをホーム配下に移すとここで閲覧できます。","git.errReadDir":"ディレクトリを読み込めませんでした","git.commitDetail":"コミット詳細","git.diff":"差分","git.bindRepo":"リポジトリを紐付け","git.collapse":"折りたたむ","git.currentBranch":"現在のブランチ","git.switchViewedBranch":"表示するブランチを切り替え","git.switchBranch":"ブランチを切り替え","git.noBranches":"ブランチがありません","git.noRepoBound":"リポジトリが紐付けられていません。左上の「+」をタップしてディレクトリを選択してください。","git.changes":"変更","git.commits":"コミット","git.pullToLoadMore":"引っ張ってさらに読み込む","git.pickerHint":"ディレクトリを選択すると、その中の git リポジトリを自動的に検索します","git.cleanTree":"ワーキングツリーはクリーンです","git.noCommits":"コミットがありません","git.noDiff":"差分なし","git.fontSmaller":"フォントを縮小","git.fontLarger":"フォントを拡大","git.diffTruncated":"差分が大きすぎるため、切り捨てられました","cmd.panel":"コマンドパネル","cmd.title":"コマンド","cmd.empty":"コマンドがありません。送信するか、よく使うものを保存してください","cmd.favorites":"お気に入り","cmd.scopeGlobal":"グローバル · 全セッション","cmd.recent":"最近","cmd.scopeSession":"このセッションのみ","cmd.favorite":"お気に入りに追加","cmd.unfavorite":"お気に入りから削除","doc.home":"最近","doc.read":"読み上げ","doc.pauseRead":"一時停止","doc.resumeRead":"再開","doc.stopRead":"読み上げを停止","doc.rate":"読み上げ速度","doc.fontSmaller":"フォントを縮小","doc.fontLarger":"フォントを拡大","inbox.view.working":"進行中","inbox.view.done":"完了","inbox.view.needs":"要対応","push.unsupported":"プッシュ通知には Chrome または Safari が必要です","push.iosAddToHome":"iOS では先にこのサイトを「ホーム画面に追加」し、ホーム画面のアイコンから開いてください","a2hs.title":"handmux をホーム画面に追加","a2hs.lead":"アプリのように全画面で開けます。iPhone では、pane があなたを必要とするときの通知もこれで届きます。","a2hs.install":"handmux をインストール","a2hs.ios1":"Safari の共有ボタン(⬆︎ の四角)をタップ。","a2hs.ios2":"「その他」をタップ、または下にスクロール。","a2hs.ios3":"「ホーム画面に追加」を選び、「追加」をタップ。","a2hs.iosHint":"Safari で:共有 → その他 → ホーム画面に追加。","a2hs.iosOpenSafari":"現在 Safari ではありません。Safari でこのページを開いてからホーム画面に追加してください(他の iOS ブラウザではインストールできません)。","a2hs.androidManual":"ブラウザのメニュー(⋮)から「ホーム画面に追加」または「アプリをインストール」を選択。","a2hs.later":"あとで","push.permissionTimeout":"通知権限の結果が返されませんでした。システム設定で handmux またはブラウザの通知権限を確認して再試行してください。","push.permissionDenied":"通知の権限が拒否されました","push.swRegisterTimeout":"通知サービスの登録がタイムアウトしました。接続を確認して再試行してください。","push.swRegisterFailed":"通知サービスを登録できませんでした:{reason}。このサイトのデータを消去し、再度開いてお試しください。","push.swTimeout":"通知サービスは登録されましたが有効化できませんでした。このサイトのデータを消去し、再度開いてお試しください。","push.unknownReason":"原因不明","push.configTimeout":"プッシュ設定の読み込みがタイムアウトしました。handmux サーバーへの接続を確認して再試行してください。","push.browserTimeout":"ブラウザのプッシュサービスが応答しません。Android Chrome では Google Play 開発者サービスが利用可能か確認して再試行してください。","push.noVapid":"サーバーにプッシュ通知(VAPID)が設定されていません","push.reportTimeout":"購読は作成されましたが、サーバーへの登録がタイムアウトしました。接続を確認して再試行してください。","push.subscriptionExpired":"Chrome が期限切れのプッシュ購読を返しました。リセットしたので、もう一度「通知を有効にする」をタップしてください。","push.deliveryRejected":"プッシュサービスが新しい購読を拒否しました。サーバーログを確認して再試行してください。","push.subscribeFailed":"サブスクリプションの登録に失敗しました","push.sendFailed":"送信に失敗しました","pushInbox.loadFailed":"通知を読み込めませんでした。接続を確認して再試行してください。","pushInbox.deleteFailed":"通知を削除できませんでした。メッセージは保持されています。再試行してください。","pushInbox.retry":"再試行","pushInbox.deliveryPending":"送信中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失敗","pushInbox.deliveryReasonExpired":"購読の有効期限切れ","pushInbox.deliveryReasonRateLimited":"プッシュサービスの制限","pushInbox.deliveryReasonUnavailable":"プッシュサービスを利用できません","pushInbox.deliveryReasonRejected":"プッシュサービスが拒否","pushInbox.deliveryReasonNetwork":"ネットワークエラー","pushInbox.deliveryReasonNotConfigured":"プッシュ未設定","pushInbox.deliveryReasonUnknown":"原因不明","api.loadFailed":"読み込みに失敗しました","api.uploadFailed":"アップロードに失敗しました","upload.title":"アップロード中","upload.processing":"送信完了 — サーバーで受信中…","api.uploadBadDir":"そのディレクトリへはアップロードできません","api.uploadDuplicate":"同名のファイルが既に存在します","api.uploadTooLarge":"ファイルが大きすぎます(上限 50MB)","api.uploadBadType":"サポートされていないファイルタイプです","time.secAgo":"{n}秒前","time.minAgo":"{n}分前","time.hourAgo":"{n}時間前","time.dayAgo":"{n}日前","time.expired":"期限切れ","time.minutes":"{n} 分","workspace.bootDetected":"コンピュータの再起動を検出しました","workspace.tmuxDetected":"tmux の再起動を検出しました","workspace.summary":"前回のワークスペース · {sessions} セッション · {time} に保存","workspace.restoreLast":"前回のワークスペースを復元","workspace.partialCard":"残り {failures} セッションの確認が必要です","workspace.unknownTime":"時刻不明","workspace.savedAt":"{time} に保存","workspace.topologySummary":"{sessions} セッション · {windows} ウィンドウ · {panes} ペイン","workspace.planSummary":"{restore} セッションを復元;{already} セッションは既に存在します","workspace.renameRule":"同名のセッションが現在存在する場合にのみ、復元名に -restored が付きます。","workspace.nonDestructive":"現在のセッションは変更、名前変更、停止されません。","workspace.progress":"復元中 {completed} / {total}…","workspace.progressDone":"復元済み {completed} / {total}","workspace.complete":"ワークスペースを復元しました。","workspace.completedSummary":"今回の復元:{sessions} セッション · {windows} ウィンドウ · {panes} ペイン","workspace.rebindHint":"復元したセッションは自動表示されません。この端末にバインドするセッションを選択できます。","workspace.rebind":"セッションを再バインド","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"不明なセッション","workspace.restore":"復元","workspace.ignore":"このバックアップを無視","workspace.protectionTitle":"ワークスペースは保護されていません","workspace.protection.live-corrupt":"ワークスペース状態のコピーが破損しています。ディスクと ~/.handmux の権限を確認し、handmux を再起動してください。","workspace.protection.live-unavailable":"ワークスペース状態を読み書きできません。空き容量と ~/.handmux の権限を確認し、handmux を再起動してください。","workspace.protection.unknown":"バックグラウンドスナップショットを利用できません。コンピュータの handmux ログを確認してください。","workspace.error.restore-interrupted":"復元が中断されました;このバックアップを再試行してください","workspace.error.checkpoint-not-found":"このバックアップは利用できません;更新して別のバックアップを選んでください","workspace.error.storage-full":"ストレージの空きがありません;空き容量を増やして再試行してください","workspace.error.permission-denied":"ワークスペースを書き込めません;権限を確認して再試行してください","workspace.error.plan-failed":"復元計画が変わりました;更新して再試行してください","workspace.error.agent-unavailable":"Agent を再開できません;復元した shell を開いて手動で再試行してください","workspace.error.tmux-unavailable":"tmux を利用できません;tmux が起動中か確認して再試行してください","workspace.error.restore-failed":"セッションを復元できませんでした;handmux ログを確認して再試行してください","workspace.error.operation-not-found":"この復元処理は利用できません。バックアップの復元をやり直してください","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"作業ディレクトリを使用できなかったため、ホームディレクトリに復元しました","workspace.warning.layout-fallback":"ペイン配置を完全に復元できなかったため、既定の配置を維持しました","workspace.warning.agent-warning":"Agent を自動再開できませんでした。復元したシェルは利用できます","workspace.warning.live-reconcile-failed":"現在のワークスペース状態を照合できませんでした。handmux ログを確認してください","workspace.warning.workspace-unavailable":"ワークスペースストレージを一時的に利用できません。空き容量と権限を確認してください","workspace.warning.restore-warning":"復元は完了しましたが、確認が必要な警告があります"},RM={"terminal.transport_live":"실시간","terminal.transport_snapshot":"스냅샷","terminal.transport_detail_title":"터미널 전송 상태","terminal.transport_detail_configured":"설정 모드","terminal.transport_detail_current":"현재 모드","terminal.transport_detail_connection":"연결 상태","terminal.transport_detail_manual":"스냅샷 가져오기를 직접 선택했으므로 자동으로 전환되지 않습니다.","terminal.transport_detail_live":"터미널이 실시간 푸시를 정상적으로 받고 있습니다.","terminal.transport_detail_fallback":"실시간 푸시가 불안정하여 스냅샷 가져오기로 전환했습니다.","terminal.transport_detail_unavailable":"실시간 연결을 설정할 수 없습니다. 리버스 프록시가 WebSocket을 지원하는지 확인하세요.","terminal.transport_detail_waiting":"연결이 안정되면 실시간 푸시 복귀를 시도합니다.","terminal.transport_detail_retry":"약 {seconds}초 후 실시간 푸시 복귀를 시도합니다.","terminal.connection_connecting":"확인 중","terminal.connection_good":"양호","terminal.connection_degraded":"보통","terminal.connection_poor":"나쁨","settings.terminal_transport":"터미널 전송 모드","settings.terminal_transport_live":"실시간 푸시","settings.terminal_transport_snapshot":"스냅샷 가져오기","settings.terminal_transport_hint":"실시간 푸시는 WebSocket을 사용하며, 네트워크가 불안정하면 스냅샷 가져오기로 전환되고 30초 동안 안정되면 복귀를 시도합니다.","settings.snapshot_interval":"활성 상태 업데이트 간격","settings.snapshot_interval_hint":"터미널이 유휴 상태가 되면 트래픽과 리소스 사용을 줄이기 위해 업데이트 빈도를 낮춥니다.","terminal.disconnected":"연결이 끊겼습니다. 다시 연결하는 중…","terminal.paneMissing":"이 창이 닫혔습니다. 다른 창으로 전환하세요.","common.save":"저장","common.cancel":"취소","common.confirm":"확인","common.ok":"확인","common.close":"닫기","common.delete":"삭제","common.copy":"복사","common.rename":"이름 변경","common.create":"새로 만들기","common.back":"뒤로","common.open":"열기","common.loading":"로드 중…","common.done":"완료","token.title":"액세스 토큰이 필요합니다","token.placeholder":"HANDMUX_TOKEN 붙여넣기","settings.language":"언어 Language","home.empty":"열린 파일이 없습니다","home.emptyHint":"「새로 만들기」 탭에서 파일을 선택하세요","home.remove":"제거","drawer.empty":"연결된 세션이 없습니다","drawer.unbind":"연결 해제","drawer.bind":"세션 연결","drawer.logout":"로그아웃","windowbar.newWindow":"새 창","rename.new_name":"새 이름","rename.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","rename.failed":"이름 변경에 실패했습니다. 다시 시도하세요","rename.saving":"저장 중…","newwindow.title":"새 창","newwindow.window_name":"창 이름(선택 사항)","newwindow.name_placeholder":"비워두면 자동 이름 지정 · 영문/숫자/하이픈 ≤16","newwindow.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","newwindow.start_dir":"시작 디렉토리","newwindow.session_dir_named":"{dir}(세션 디렉토리)","newwindow.session_dir_default":"세션 디렉토리(기본값)","newwindow.choose":"선택","newwindow.reset_to_session_dir":"세션 디렉토리로 초기화","newwindow.creating":"생성 중…","startup.label":"시작 명령(선택 사항)","startup.aria":"시작 명령","startup.preset_shell":"빈 셸(기본값)","startup.preset_claude":"claude(Claude Code 시작)","startup.preset_claude_continue":"claude -c(이전 세션 이어서)","startup.preset_codex":"codex(Codex CLI 시작)","startup.custom":"사용자 정의…","startup.custom_placeholder":'예:claude "로그인 버그 수정"',"bind.title":"세션 연결","bind.sessionName":"세션 이름","bind.pickSession":"연결할 세션 선택","bind.newSession":"+ 새 세션","bind.modeNew":"새 세션","bind.modeExisting":"기존 세션","bind.alreadyExists":"이미 존재하는 세션입니다","bind.bind":"연결","bind.checking":"확인 중…","bind.createAndOpen":"생성 후 열기","bind.creating":"생성 중…","bind.createHint":"세션「{name}」이 존재하지 않습니다. 「생성 후 열기」를 탭하여 생성하세요","bind.alreadyBound":"이미 연결된 세션입니다","bind.createFailed":"생성에 실패했습니다. 다시 시도하세요","bind.invalidName":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","bind.desktopHint":"여기의 세션(폰에서 만든 것 포함)은 컴퓨터에서 명령 하나로 이어받을 수 있습니다: handmux open <이름>","bind.checkFailed":"확인에 실패했습니다. 다시 시도하세요","bind.startDir":"시작 디렉토리","bind.homeDirDefault":"홈 디렉토리(기본값)","bind.choose":"선택","bind.reset":"초기화","actionsheet.confirmAgain":"확인하시겠습니까? 한 번 더 탭하세요","dirpicker.title":"디렉토리 선택","inbox.title":"받은 편지함","inbox.working":"진행 중","inbox.done":"완료","inbox.needs":"확인 필요","inbox.clearDone":"완료 항목 지우기","inbox.empty":"패널 상태 없음","inbox.enableTitle":"AI 세션 알림 활성화","inbox.enableHint":"각 Claude / Codex 패널을 「진행 중」「확인 필요」「완료」로 표시하고, 확인이 필요할 때 푸시 알림을 보냅니다.","inbox.enableBtn":"활성화","inbox.enabling":"활성화 중…","inbox.enableFailed":"활성화에 실패했습니다——서버 로그를 확인하세요.","idea.title":"아이디어","idea.editPlaceholder":"아이디어 편집…","idea.addPlaceholder":"아이디어를 기록하세요…","idea.add":"추가","idea.empty":"아직 아이디어가 없습니다. 하나 기록해보세요","idea.dragSort":"드래그하여 정렬","idea.fillInput":"입력창에 삽입","idea.send":"보내기","doclink.title":"파일 열기","changelog.title":"새 기능","preview.dynamic":"동적 미리보기","preview.static":"정적 미리보기","preview.remainTitle":"남은 유효 기간 — 탭하여 갱신 / 중지","preview.toPcView":"PC 보기로 전환","preview.toMobileView":"모바일 보기로 전환","preview.pcView":"PC 보기","preview.mobileView":"모바일 보기","preview.refresh":"새로 고침","preview.minimize":"최소화","preview.ttlDialog":"미리보기 유효 기간","preview.renew":"갱신(1시간으로 초기화)","preview.stop":"미리보기 중지","preview.iframeTitle":"미리보기","preview.zoomOut":"축소","preview.zoomIn":"확대","imageviewer.loadFailed":"이미지를 불러오지 못했습니다","imageviewer.saved":"저장되었습니다. 사진 앱 또는 「다운로드」에서 확인할 수 있습니다","imageviewer.shareUnsupported":"이미지 공유는 Chrome 또는 Safari가 필요합니다","imageviewer.zoomOut":"축소","imageviewer.zoomIn":"확대","imageviewer.imageTitle":"이미지","imageviewer.saveImage":"이미지 저장","imageviewer.shareImage":"이미지 공유","mic.stop":"음성 입력 중지","mic.start":"음성 입력","dock.send":"보내기","dock.send.hint":"탭하여 보내기 · 길게 눌러 삽입","dock.phrases":"자주 쓰는 문구","dock.attach":"첨부","dock.history":"기록","history.empty":"기록이 아직 없습니다","history.scope":"현재 창의 기록만","dock.input.placeholder":"메시지를 입력하세요…","dock.input.enterDraft":"Shift + Enter로 초안 모드 열기","dock.input.exitDraft":"Esc로 터미널 모드 돌아가기 · Shift + Enter로 줄바꿈","dock.command.placeholder":"명령 입력 · Enter로 실행","dock.mode.agent":"대화","dock.mode.toggle":"입력 모드 전환","dock.mode.command":"명령 모드","dock.mode.chat":"채팅 모드","fav.title":"자주 쓰기","fav.add":"추가","fav.addPlaceholder":"자주 쓰는 항목 추가…","dock.upload.aria":"파일 업로드","dock.upload.title":"파일 업로드(홈 업로드 폴더에 저장, 프로젝트에는 포함되지 않음)","dock.upload.progress":"{name}{tag} 업로드 중","dock.upload.failed":"업로드 실패:{names}","app.nameExists":"해당 이름은 이미 사용 중입니다","app.renameFailed":"이름 변경에 실패했습니다. 다시 시도하세요","app.deleteFailed":"삭제에 실패했습니다. 다시 시도하세요","app.moveFailed":"이동에 실패했습니다. 다시 시도하세요","app.sessionGone":"세션「{name}」이 존재하지 않습니다. 이미 닫혔을 수 있습니다","app.docNotFound":"파일이 존재하지 않습니다","app.docTooLarge":"파일이 너무 큽니다(2MB 초과)","app.docUnsupported":"지원되지 않는 파일 또는 경로","app.docOpenFailed":"열기에 실패했습니다. 다시 시도하세요","app.preview":"미리보기","app.openPreview":"미리보기 열기","app.ideas":"아이디어","app.files":"파일","app.settings":"설정","app.renameSession":"세션 이름 변경","app.renameWindow":"창 이름 변경","app.moveLeft":"◀ 왼쪽으로 이동","app.moveRight":"오른쪽으로 이동 ▶","app.deleteWindow":"창 삭제","pane.splitH":"좌우 분할","pane.splitV":"상하 분할","pane.manage":"분할 관리","pane.close":"창 닫기","pane.closeConfirm":"닫을까요? 다시 탭","pane.splitFailed":"분할 실패","pane.closeFailed":"닫기 실패","app.deleteLastWindowConfirm":"마지막 창입니다. 삭제하면 전체 세션이 닫힙니다!한 번 더 탭하세요","app.deleteConfirm":"삭제하시겠습니까? 한 번 더 탭하세요","app.cannotLocate":"위치를 찾을 수 없습니다","app.pickItsDir":",디렉토리를 선택하세요:","app.noBoundSession":"연결된 세션이 없습니다","app.tapToBind":"탭하여 연결","app.selectSessionHint":"왼쪽 상단의 ☰ 를 탭하여 세션 선택","app.backToExit":"한 번 더 뒤로가기를 누르면 종료됩니다","settings.title":"설정","settings.group_global":"전체 설정","settings.font_size":"글꼴 크기","settings.font_decrease":"글꼴 축소","settings.font_increase":"글꼴 확대","settings.font_auto":"자동 조정","settings.font_auto_title":"높이에 맞게 자동 조정","settings.keyboard_mode":"키보드 모드","settings.keyboard_mode_auto":"자동 감지","settings.keyboard_mode_mobile":"모바일","settings.keyboard_mode_desktop":"데스크톱","settings.keyboard_mode_hint":"현재 브라우저에만 적용됩니다. 감지가 틀리면 직접 선택하세요.","settings.path_highlight":"파일 경로 강조","settings.path_highlight_hint":"터미널에서 탭 가능한 파일 경로에 색을 입힙니다. 꺼져 있어도 경로는 탭할 수 있습니다.","settings.whats_new":"새 기능","settings.view_changelog":"변경 내역 보기","settings.reload_app":"앱 새로고침","settings.has_update":"업데이트 있음","settings.version":"버전","settings.feedback":"피드백","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat 그룹","settings.feedback_hint":"버그와 아이디어 모두 환영 — Issue는 추적되고 답변됩니다.","settings.update_available":"버전 {v} 사용 가능","settings.update_more":"이전 버전 업데이트 {n}개 더 보기","settings.update_how":"컴퓨터에서 실행:","settings.push_notifications":"푸시 알림","settings.notify_on":"활성화됨 ✓","settings.notify_enable":"기기 알림 활성화","settings.notify_enabled":"활성화되었습니다. 환영 알림이 도착할 것입니다","settings.notify_disabled":"비활성화됨","settings.notify_failed":"작업에 실패했습니다","settings.processing":"처리 중","settings.push_hint":"「확인 필요」및「완료」를 모니터링:관심 세션에서 승인/응답이 필요하거나 한 라운드가 완료되면 이 기기로 알림을 보냅니다.","settings.push_unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","settings.group_session":"현재 세션 설정","settings.screen_cols":"화면 열 수","settings.cols_dec":"감소","settings.cols_dec_title":"열 수 감소","settings.cols_inc":"증가","settings.cols_inc_title":"열 수 증가","settings.cols_restore":"기본값","settings.cols_restore_title":"창 기본 크기로 복원","settings.preview_site":"미리보기 사이트","settings.preview_static_site":"정적 사이트 미리보기","settings.preview_running_dynamic":"동적 미리보기 실행 중","settings.preview_running_static":"정적 미리보기 실행 중","settings.preview_remain_title":"남은 유효 기간","settings.preview_remain":"남은 시간 {time}","settings.preview_renew":"갱신","settings.preview_confirm_stop":"중지 확인","settings.preview_stop":"중지","settings.preview_name":"이름:{name}","settings.preview_port":"(포트:{port})","settings.preview_type":"미리보기 유형","settings.preview_off":"비활성화","settings.preview_static":"정적","settings.preview_dynamic":"동적","settings.preview_off_hint":"미리보기가 비활성화되어 있습니다. 「정적」을 선택하여 시작하세요.","settings.preview_off_hint_both":"미리보기가 비활성화되어 있습니다. 「정적」또는「동적」을 선택하여 시작하세요.","settings.preview_dynamic_disabled":"동적 포트 미리보기가 비활성화되어 있습니다. 활성화하려면:와일드카드 미리보기 도메인(previewDomain, 예:*.example.com)을 게이트웨이로 지정하고 TLS 인증서를 설정하세요. Cloudflare /자체 서명 인증서 차이는 README를 참조하세요.","settings.preview_pick_dir":"디렉토리를 선택하여 시작","settings.preview_static_hint":"index.html이 포함된 디렉토리를 선택하여 스마트폰에서 미리보기.","settings.preview_port_placeholder":"포트 번호(예:3000)","settings.preview_port_label":"포트","settings.preview_starting":"시작 중…","settings.preview_start":"시작","settings.preview_dynamic_hint":"로컬에서 실행 중인 포트(dev 서버 / 백엔드)를 입력하면 스마트폰에서 서브도메인을 통해 직접 접속할 수 있습니다.","settings.dir_picker_hint":"미리볼 정적 사이트 디렉토리 선택(index.html 포함)","settings.err_port_not_listening":"해당 포트가 수신 대기 중이지 않습니다. 서비스가 시작되었는지 확인하세요","settings.err_bad_port":"포트 번호가 유효하지 않습니다(1–65535)","settings.err_dynamic_disabled":"동적 미리보기가 비활성화되어 있습니다","settings.err_start_failed":"시작에 실패했습니다","localurl.title":"프록시를 활성화하여 미리보기","localurl.open":"프록시 활성화","localurl.disabled":"동적 미리보기가 비활성화되어 있습니다. 설정에서 미리보기 도메인을 구성하면 로컬 포트를 프록시할 수 있습니다.","localurl.notListening":"포트 :{port}에서 수신 중인 서비스가 없습니다.","localurl.badProtocol":"이 링크는 프록시할 수 있는 HTTP 또는 HTTPS 주소가 아닙니다.","localurl.network":"handmux 서비스에 연결할 수 없습니다. 네트워크를 확인한 후 다시 시도하세요.","localurl.failed":"미리보기를 시작할 수 없습니다: {reason}. 설정을 확인한 후 다시 시도하세요.","filebrowser.openDirFailed":"디렉토리를 열 수 없습니다","filebrowser.copiedPath":"경로가 복사되었습니다:{abs}","filebrowser.mkdirFailed":"디렉토리 생성에 실패했습니다(이름이 유효하지 않거나 이미 존재합니다)","filebrowser.downloading":"{name} 다운로드 중","filebrowser.downloadFailed":"다운로드에 실패했습니다","filebrowser.uploading":"{name}{tag} 업로드 중","filebrowser.uploadFailed":"업로드에 실패했습니다","filebrowser.uploadPartialFailed":"다음 파일 업로드에 실패했습니다:{names}","filebrowser.sessionDir":"세션 디렉토리","filebrowser.jumpToSessionDir":"현재 세션 디렉토리로 이동","filebrowser.parentDir":"상위 디렉토리","filebrowser.rootSelect":"루트 디렉토리 전환(홈 / 임시)","filebrowser.pathPlaceholder":"경로 입력(실시간 필터 / 이동)","filebrowser.newFolder":"새 폴더","filebrowser.createBtn":"생성","filebrowser.uploadFile":"파일 업로드","filebrowser.uploadToCurrentDir":"현재 디렉토리에 업로드","filebrowser.enterSubdirToUpload":"하위 디렉토리로 이동한 후 업로드하세요","filebrowser.folderNamePlaceholder":"폴더 이름","filebrowser.uploadPendingTo":"「{name}」을 현재 디렉토리에 업로드","filebrowser.enterSubdirFirst":"(먼저 하위 디렉토리로 이동하세요)","filebrowser.upload":"업로드","filebrowser.savedToDownloads":"「{name}」이 「다운로드」 폴더에 저장되었습니다. 파일 관리자에서 확인할 수 있습니다","filebrowser.noMatches":"일치하는 파일 또는 디렉토리가 없습니다","filebrowser.tooMany":"총 {total}개, 처음 {shown}개만 표시——경로 입력창에 키워드를 입력하여 필터할 수 있습니다","filebrowser.previewUnsupported":"이 파일 유형의 미리보기는 지원되지 않습니다. 오른쪽 버튼으로 다운로드할 수 있습니다","filebrowser.copyAbsPath":"절대 경로 복사","filebrowser.download":"다운로드","filebrowser.pickThisDir":"이 디렉토리 선택 {path}","filebrowser.downloadConfirm":"{name}을 다운로드하시겠습니까?","filemanager.files":"파일","filemanager.closeTab":"탭 닫기","filemanager.minimize":"최소화","filemanager.recent":"최근","filemanager.directory":"디렉토리","git.errReadRepo":"저장소를 읽을 수 없습니다","git.errLoad":"불러오기에 실패했습니다","git.noRepoInDir":"아직 git 저장소가 없습니다 — 다른 디렉토리를 선택하거나 여기서 git init 하세요.","git.outsideRoots":"이 폴더는 handmux가 열 수 있는 범위 밖입니다 — 홈 디렉토리와 /tmp만 접근할 수 있습니다. 저장소를 홈 디렉토리 아래로 옮기면 여기서 볼 수 있습니다.","git.errReadDir":"디렉토리를 읽을 수 없습니다","git.commitDetail":"커밋 상세","git.diff":"변경 사항","git.bindRepo":"저장소 연결","git.collapse":"접기","git.currentBranch":"현재 브랜치","git.switchViewedBranch":"표시할 브랜치 전환","git.switchBranch":"브랜치 전환","git.noBranches":"브랜치가 없습니다","git.noRepoBound":"저장소가 연결되지 않았습니다. 왼쪽 상단의 「+」를 탭하여 디렉토리를 선택하세요.","git.changes":"변경사항","git.commits":"커밋","git.pullToLoadMore":"당겨서 더 불러오기","git.pickerHint":"디렉토리를 선택하면 그 안의 git 저장소를 자동으로 찾습니다","git.cleanTree":"작업 트리가 깨끗합니다","git.noCommits":"커밋이 없습니다","git.noDiff":"변경 사항 없음","git.fontSmaller":"글꼴 축소","git.fontLarger":"글꼴 확대","git.diffTruncated":"변경 사항이 너무 커서 잘렸습니다","cmd.panel":"명령 패널","cmd.title":"명령","cmd.empty":"명령이 없습니다. 보내거나 자주 쓰는 것을 저장하세요","cmd.favorites":"즐겨찾기","cmd.scopeGlobal":"전체 · 모든 세션","cmd.recent":"최근","cmd.scopeSession":"현재 세션만","cmd.favorite":"즐겨찾기 추가","cmd.unfavorite":"즐겨찾기 해제","doc.home":"최근","doc.read":"읽어주기","doc.pauseRead":"읽기 일시 정지","doc.resumeRead":"읽기 재개","doc.stopRead":"읽기 중지","doc.rate":"읽기 속도","doc.fontSmaller":"글꼴 축소","doc.fontLarger":"글꼴 확대","inbox.view.working":"진행 중","inbox.view.done":"완료","inbox.view.needs":"확인 필요","push.unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","push.iosAddToHome":"iOS에서는 먼저 이 사이트를 「홈 화면에 추가」한 후 홈 화면 아이콘에서 열어주세요","a2hs.title":"handmux를 홈 화면에 추가","a2hs.lead":"앱처럼 전체 화면으로 열 수 있습니다. iPhone에서는 pane이 당신을 필요로 할 때의 푸시도 이 방식으로 전달됩니다.","a2hs.install":"handmux 설치","a2hs.ios1":"Safari의 공유 버튼(⬆︎ 상자)을 탭하세요.","a2hs.ios2":"「더 보기」를 탭하거나 목록을 아래로 스크롤하세요.","a2hs.ios3":"「홈 화면에 추가」를 선택한 뒤 「추가」를 탭하세요.","a2hs.iosHint":"Safari에서: 공유 → 더 보기 → 홈 화면에 추가.","a2hs.iosOpenSafari":"현재 Safari가 아닙니다. Safari에서 이 페이지를 연 뒤 홈 화면에 추가하세요 — 다른 iOS 브라우저는 설치할 수 없습니다.","a2hs.androidManual":"브라우저 메뉴(⋮)에서 「홈 화면에 추가」 또는 「앱 설치」를 선택하세요.","a2hs.later":"나중에","push.permissionTimeout":"알림 권한 결과가 반환되지 않았습니다. 시스템 설정에서 handmux 또는 브라우저의 알림 권한을 확인한 후 다시 시도하세요.","push.permissionDenied":"알림 권한이 거부되었습니다","push.swRegisterTimeout":"알림 서비스 등록 시간이 초과되었습니다. 연결을 확인한 후 다시 시도하세요.","push.swRegisterFailed":"알림 서비스를 등록하지 못했습니다: {reason}. 이 사이트의 데이터를 삭제하고 다시 열어 시도하세요.","push.swTimeout":"알림 서비스가 등록되었지만 활성화되지 않았습니다. 이 사이트의 데이터를 삭제하고 다시 열어 시도하세요.","push.unknownReason":"알 수 없는 원인","push.configTimeout":"푸시 설정을 불러오는 시간이 초과되었습니다. handmux 서버 연결을 확인한 후 다시 시도하세요.","push.browserTimeout":"브라우저 푸시 서비스가 응답하지 않습니다. Android Chrome에서는 Google Play 서비스를 사용할 수 있는지 확인한 후 다시 시도하세요.","push.noVapid":"서버에 푸시 알림(VAPID)이 설정되지 않았습니다","push.reportTimeout":"구독은 생성되었지만 서버 등록 시간이 초과되었습니다. 연결을 확인한 후 다시 시도하세요.","push.subscriptionExpired":"Chrome이 만료된 푸시 구독을 반환했습니다. 구독을 초기화했으니 알림 켜기를 다시 누르세요.","push.deliveryRejected":"푸시 서비스가 새 구독을 거부했습니다. 서버 로그를 확인한 후 다시 시도하세요.","push.subscribeFailed":"구독 등록에 실패했습니다","push.sendFailed":"전송에 실패했습니다","pushInbox.loadFailed":"알림을 불러오지 못했습니다. 연결을 확인한 후 다시 시도하세요.","pushInbox.deleteFailed":"알림을 삭제하지 못했습니다. 메시지는 유지됩니다. 다시 시도하세요.","pushInbox.retry":"다시 시도","pushInbox.deliveryPending":"전송 중","pushInbox.deliverySuccess":"성공","pushInbox.deliveryFailed":"실패","pushInbox.deliveryReasonExpired":"구독 만료","pushInbox.deliveryReasonRateLimited":"푸시 서비스 요청 제한","pushInbox.deliveryReasonUnavailable":"푸시 서비스를 사용할 수 없음","pushInbox.deliveryReasonRejected":"푸시 서비스가 거부함","pushInbox.deliveryReasonNetwork":"네트워크 오류","pushInbox.deliveryReasonNotConfigured":"푸시가 설정되지 않음","pushInbox.deliveryReasonUnknown":"알 수 없는 원인","api.loadFailed":"불러오기에 실패했습니다","api.uploadFailed":"업로드에 실패했습니다","upload.title":"업로드 중","upload.processing":"전송 완료 — 서버에서 수신 중…","api.uploadBadDir":"해당 디렉토리에는 업로드할 수 없습니다","api.uploadDuplicate":"같은 이름의 파일이 이미 존재합니다","api.uploadTooLarge":"파일이 너무 큽니다(최대 50MB)","api.uploadBadType":"지원되지 않는 파일 유형입니다","time.secAgo":"{n}초 전","time.minAgo":"{n}분 전","time.hourAgo":"{n}시간 전","time.dayAgo":"{n}일 전","time.expired":"만료됨","time.minutes":"{n}분","workspace.bootDetected":"컴퓨터 재시작이 감지되었습니다","workspace.tmuxDetected":"tmux 재시작이 감지되었습니다","workspace.summary":"이전 작업 공간 · 세션 {sessions}개 · {time} 저장","workspace.restoreLast":"이전 작업 공간 복원","workspace.partialCard":"세션 {failures}개를 더 확인해야 합니다","workspace.unknownTime":"알 수 없는 시간","workspace.savedAt":"{time} 저장","workspace.topologySummary":"세션 {sessions}개 · 창 {windows}개 · 패널 {panes}개","workspace.planSummary":"세션 {restore}개 복원;{already}개는 이미 존재","workspace.renameRule":"현재 같은 이름의 세션이 있을 때만 복원 이름에 -restored 접미사가 붙습니다.","workspace.nonDestructive":"현재 세션은 수정하거나 이름을 바꾸거나 중지하지 않습니다.","workspace.progress":"복원 중 {completed} / {total}…","workspace.progressDone":"복원됨 {completed} / {total}","workspace.complete":"작업 공간을 복원했습니다.","workspace.completedSummary":"이번 복원: 세션 {sessions}개 · 창 {windows}개 · 패널 {panes}개","workspace.rebindHint":"복원된 세션은 자동으로 표시되지 않습니다. 이 휴대폰에 연결할 세션을 다시 선택할 수 있습니다.","workspace.rebind":"세션 다시 연결","workspace.sessionFailure":"{session}: {reason}","workspace.unknownSession":"알 수 없는 세션","workspace.restore":"복원","workspace.ignore":"이 백업 무시","workspace.protectionTitle":"작업 공간이 보호되지 않음","workspace.protection.live-corrupt":"작업 공간 상태 사본이 손상되었습니다. 디스크와 ~/.handmux 권한을 확인한 뒤 handmux를 재시작하세요.","workspace.protection.live-unavailable":"작업 공간 상태를 읽거나 쓸 수 없습니다. 디스크 여유 공간과 ~/.handmux 권한을 확인한 뒤 handmux를 재시작하세요.","workspace.protection.unknown":"백그라운드 스냅샷을 사용할 수 없습니다. 컴퓨터의 handmux 로그를 확인하세요.","workspace.error.restore-interrupted":"복원이 중단되었습니다. 이 백업을 다시 시도하세요","workspace.error.checkpoint-not-found":"이 백업을 더 이상 사용할 수 없습니다. 새로 고친 뒤 다른 백업을 선택하세요","workspace.error.storage-full":"작업 공간 저장소가 가득 찼습니다. 디스크 공간을 확보한 뒤 다시 시도하세요","workspace.error.permission-denied":"작업 공간 저장소에 쓸 수 없습니다. 권한을 확인한 뒤 다시 시도하세요","workspace.error.plan-failed":"복원 계획이 변경되었습니다. 새로 고친 뒤 다시 시도하세요","workspace.error.agent-unavailable":"Agent를 재개할 수 없습니다. 복원된 shell을 열고 수동으로 다시 시도하세요","workspace.error.tmux-unavailable":"tmux를 사용할 수 없습니다. tmux 실행 여부를 확인한 뒤 다시 시도하세요","workspace.error.restore-failed":"세션을 복원하지 못했습니다. handmux 로그를 확인한 뒤 다시 시도하세요","workspace.error.operation-not-found":"이 복원 작업을 더 이상 사용할 수 없습니다. 백업 복원을 다시 시작하세요","workspace.sessionWarning":"{session}: {reason}","workspace.warning.cwd-fallback":"작업 디렉터리를 사용할 수 없어 홈 디렉터리에 복원했습니다","workspace.warning.layout-fallback":"창 분할 배치를 완전히 복원하지 못해 기본 배치를 유지했습니다","workspace.warning.agent-warning":"Agent를 자동으로 재개하지 못했습니다. 복원된 셸은 계속 사용할 수 있습니다","workspace.warning.live-reconcile-failed":"현재 작업 공간 상태를 대조하지 못했습니다. handmux 로그를 확인하세요","workspace.warning.workspace-unavailable":"작업 공간 저장소를 일시적으로 사용할 수 없습니다. 디스크 공간과 권한을 확인하세요","workspace.warning.restore-warning":"복원 중 확인이 필요한 경고가 발생했습니다"},$b={zh:jM,"zh-TW":DM,en:aC,ja:kM,ko:RM},m1=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],oC="tw_lang";function TM(i,r,l=$b){if(i&&l[i])return i;for(const g of r&&r.length?r:["en"]){const N=String(g).toLowerCase();if(l[N])return N;const R=N.split("-")[0];if(l[R])return R}return"en"}function LM(i,r,l,g){let N=i&&i[l]!=null?i[l]:r&&r[l]!=null?r[l]:l;return g&&(N=N.replace(/\{(\w+)\}/g,(R,y)=>g[y]!=null?g[y]:`{${y}}`)),N}const AM=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,MM=()=>{try{return localStorage.getItem(oC)}catch{return null}};let bf=TM(MM(),AM());function O(i,r){return LM($b[bf],aC,i,r)}function go(){return bf}function UM(i){if(!(!$b[i]||i===bf)){try{localStorage.setItem(oC,i)}catch{}bf=i,typeof location<"u"&&location.reload()}}const Wb="tw_token",Gb="tw_font",Ud="tw_bound",yf="tw_last_session",Yb="tw_win",qb="tw_pane",Kb="tw_favs",OM="tw_recent",PM=30,wf="tw_inbox_seen",lC="tw_inbox_read_ts",Xb="tw_browse_dir",Jb="tw_preview_dir",cC="tw_startup_cmd",pb="tw_chat_draft",uC="tw_chat_tone",vb="tw_chat_lens",VM="tw_ideas",dC="tw_changelog_seen",hC="tw_version_seen",Pf="tw_git_repos",IM="tw_git_dirs",gb="tw_workspace_prompt",mC="tw_workspace_applied_mappings",BM=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,f1={sessions:/^\$\d+$/,windows:/^@\d+$/,panes:/^%\d+$/},wd=(i,r)=>Object.prototype.hasOwnProperty.call(i,r),Fa=()=>localStorage.getItem(Wb),FM=i=>localStorage.setItem(Wb,i),HM=()=>localStorage.removeItem(Wb);function ha(){try{const i=JSON.parse(localStorage.getItem(Ud));return Array.isArray(i)?i.filter(r=>typeof r=="string"):[]}catch{return[]}}function _b(i){const r=ha();return r.includes(i)||r.push(i),localStorage.setItem(Ud,JSON.stringify(r)),r}function p1(i){const r=ha().filter(l=>l!==i);return localStorage.setItem(Ud,JSON.stringify(r)),r}function zM(i){const r=new Set((Array.isArray(i)?i:[]).filter(g=>(g==null?void 0:g.status)==="restored"&&typeof g.targetName=="string"&&g.targetName).map(g=>g.targetName)),l=ha().filter(g=>!r.has(g));return localStorage.setItem(Ud,JSON.stringify(l)),l}function $M(i,r){const l=ha().map(g=>g===i?r:g);return localStorage.setItem(Ud,JSON.stringify(l)),Zb.renameSession(i,r),Vf.renameSession(i,r),l}function qr(i){try{const r=JSON.parse(localStorage.getItem(i));return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}catch{return{}}}function _o(i,r,l){const g=qr(i);g[r]=l,localStorage.setItem(i,JSON.stringify(g))}function fC(i,r){if(!i)return{};const l=qr(gb),g=l[i];return l[i]={...g&&typeof g=="object"&&!Array.isArray(g)?g:{},...r},localStorage.setItem(gb,JSON.stringify(l)),l[i]}const WM=i=>{if(!i)return{};const r=qr(gb)[i];return r&&typeof r=="object"&&!Array.isArray(r)?r:{}},v1=i=>fC(i,{autoShown:!0}),GM=i=>fC(i,{ignored:!0,autoShown:!0});function YM(){try{const i=JSON.parse(localStorage.getItem(mC));return Array.isArray(i)?i.filter(r=>typeof r=="string"):[]}catch{return[]}}function gd(i){if(!i||typeof i!="object"||Array.isArray(i))return!1;const r=Object.getPrototypeOf(i);return r===Object.prototype||r===null}function qM(i){try{if(!gd(i)||typeof i.id!="string"||!BM.test(i.id)||i.runtime!==void 0&&!gd(i.runtime)||i.names!==void 0&&!gd(i.names))return null;const r=i.runtime||{};if(Object.keys(r).some(R=>!wd(f1,R)))return null;const l={sessions:{},windows:{},panes:{}};for(const[R,y]of Object.entries(f1)){const a=r[R];if(a!==void 0){if(!gd(a))return null;for(const[u,m]of Object.entries(a)){if(!y.test(u)||typeof m!="string"||!y.test(m))return null;l[R][u]=m}}}const g={};for(const[R,y]of Object.entries(i.names||{})){if(!R||typeof y!="string"||!y)return null;g[R]=y}return Object.keys(g).length>0||Object.values(l).some(R=>Object.keys(R).length>0)?{id:i.id,runtime:l,names:g}:null}catch{return null}}function KM(i){const r=localStorage.getItem(i);if(r===null)return null;try{const l=JSON.parse(r);return gd(l)?{raw:r,value:l}:null}catch{return null}}function nf(i,r,l={}){const g=KM(i);if(!g)return;const N=g.value,R=Object.keys(r).filter(u=>wd(N,u));if(R.length===0)return;const y={};for(const[u,m]of Object.entries(N))wd(r,u)||(y[u]=m);for(const u of R){const m=r[u],b=N[u];y[m]=typeof b=="string"&&wd(l,b)?l[b]:b}const a=JSON.stringify(y);a!==g.raw&&localStorage.setItem(i,a)}function XM(i){const{sessions:r,windows:l,panes:g}=i;if(Object.keys(r).length>0){const N=localStorage.getItem(yf);N&&wd(r,N)&&localStorage.setItem(yf,r[N]),nf(Yb,r,l)}if(Object.keys(l).length>0){nf(qb,l,g);for(const N of[Pf,IM,Xb,Jb])nf(N,l)}if(Object.keys(g).length>0)for(const N of[ty,wf])nf(N,g)}function JM(i){const r=qM(i);if(!r)return!1;const l=YM();if(l.includes(r.id))return!1;if(XM(r.runtime),Object.keys(r.names).length>0){const g=ha();for(const[N,R]of Object.entries(r.names))g.includes(N)&&_b(R)}return localStorage.setItem(mC,JSON.stringify([...l,r.id])),!0}function pC(i){const r=l=>l&&typeof l=="object"&&!Array.isArray(l)?l:{};return{get(l,g){return!l||!g?[]:r(qr(i)[l])[g]??[]},set(l,g,N){const R=qr(i),y=r(R[l]);return N&&N.length?y[g]=N:delete y[g],Object.keys(y).length?R[l]=y:delete R[l],localStorage.setItem(i,JSON.stringify(R)),N??[]},renameWindow(l,g,N){if(!l||!g||!N||g===N)return;const R=qr(i),y=r(R[l]);y[g]!=null&&(y[N]=y[g],delete y[g],R[l]=y,localStorage.setItem(i,JSON.stringify(R)))},renameSession(l,g){const N=qr(i);N[l]!=null&&(N[g]=N[l],delete N[l],localStorage.setItem(i,JSON.stringify(N)))}}}const Zb=pC(OM),Vf=pC(VM),g1=()=>qr(wf);function _1(i,r){return _o(wf,i,r),qr(wf)}const ZM=()=>{const i=localStorage.getItem(lC);return i==null?null:Number(i)},b1=i=>localStorage.setItem(lC,String(i)),vC="tw_notif_seen_ts",QM=()=>{const i=localStorage.getItem(vC);return i==null?0:Number(i)},eU=i=>localStorage.setItem(vC,String(i)),Qb="tw_notif_read_ids",xd=()=>{try{const i=JSON.parse(localStorage.getItem(Qb)||"[]");return Array.isArray(i)?i:[]}catch{return[]}},y1=i=>{const r=xd();r.includes(i)||localStorage.setItem(Qb,JSON.stringify([...r,i]))},tU=i=>{const r=xd().filter(l=>i.includes(l));return localStorage.setItem(Qb,JSON.stringify(r)),r},nU=i=>i?qr(Xb)[i]??null:null,w1=(i,r)=>{i&&r&&_o(Xb,i,r)},iU=i=>i?qr(Jb)[i]??null:null,rU=(i,r)=>{i&&r&&_o(Jb,i,r)},sU=()=>localStorage.getItem(yf),aU=i=>qr(Yb)[i]??null,hd=i=>qr(qb)[i]??null;function Jo({sessionId:i,windowId:r,paneId:l}={}){i&&localStorage.setItem(yf,i),i&&r&&_o(Yb,i,r),r&&l&&_o(qb,r,l)}function oU(){const i=Number(localStorage.getItem(Gb));return Number.isFinite(i)&&i>0?i:null}const _d=i=>localStorage.setItem(Gb,String(i)),lU=()=>localStorage.removeItem(Gb),gC=["dusk","ink","light"],cU=()=>{const i=localStorage.getItem(uC);return gC.includes(i)?i:"dusk"},uU=i=>{gC.includes(i)&&localStorage.setItem(uC,i)},dU=()=>localStorage.getItem(vb)==="1",hU=i=>{i?localStorage.setItem(vb,"1"):localStorage.removeItem(vb)},_C=()=>localStorage.getItem(pb)||"",bC=i=>{i?localStorage.setItem(pb,i):localStorage.removeItem(pb)};function xf(){try{return JSON.parse(localStorage.getItem(Kb))||[]}catch{return[]}}function mU(i){const r=i.trim(),l=xf();return r&&!l.includes(r)&&l.push(r),localStorage.setItem(Kb,JSON.stringify(l)),l}function fU(i){const r=xf().filter(l=>l!==i);return localStorage.setItem(Kb,JSON.stringify(r)),r}const yC=()=>localStorage.getItem(cC)||"",wC=i=>localStorage.setItem(cC,i||""),xC="tw_orphan_kill",pU=()=>localStorage.getItem(xC)!=="0",vU=i=>localStorage.setItem(xC,i?"1":"0"),NC="tw_doc_highlight",SC=()=>localStorage.getItem(NC)==="1",gU=i=>localStorage.setItem(NC,i?"1":"0"),Nf=(i,r)=>Zb.get(i,r),CC=(i,r,l)=>Zb.set(i,r,l);function _U(i,r,l){const g=(l||"").trim(),N=Nf(i,r);return!g||!i||!r?N:CC(i,r,[g,...N.filter(R=>R!==g)].slice(0,PM))}function bU(i,r,l){return!i||!r?Nf(i,r):CC(i,r,Nf(i,r).filter(g=>g!==l))}const ey="tw_recent_docs",ty="tw_pane_base",yU=30;function Nd(){try{return JSON.parse(localStorage.getItem(ey))||[]}catch{return[]}}function x1({path:i,name:r,type:l,ts:g=Date.now()}){const N=[{path:i,name:r,type:l,ts:g},...Nd().filter(R=>R.path!==i)].slice(0,yU);return localStorage.setItem(ey,JSON.stringify(N)),N}function wU(i){const r=Nd().filter(l=>l.path!==i);return localStorage.setItem(ey,JSON.stringify(r)),r}const N1=i=>qr(ty)[i]??null,xU=(i,r)=>_o(ty,i,r),Ha=[10,11,12,13,14,16,18,20,22],NU=4,EC="tw_doc_font";function SU(){const i=localStorage.getItem(EC),r=Number(i);return i!==null&&Number.isInteger(r)&&r>=0&&r<Ha.length?r:NU}const CU=i=>localStorage.setItem(EC,String(Math.min(Ha.length-1,Math.max(0,i)))),EU=2,jC="tw_diff_font";function jU(){const i=localStorage.getItem(jC),r=Number(i);return i!==null&&Number.isInteger(r)&&r>=0&&r<Ha.length?r:EU}const DU=i=>localStorage.setItem(jC,String(Math.min(Ha.length-1,Math.max(0,i)))),DC=(i,r)=>Vf.get(i,r);function S1(i,r,l){return!i||!r?[]:Vf.set(i,r,l)}const kU=()=>localStorage.getItem(dC),RU=i=>{i&&localStorage.setItem(dC,i)},TU=()=>localStorage.getItem(hC),LU=i=>{i&&localStorage.setItem(hC,i)};function AU(i,r,l){Vf.renameWindow(i,r,l)}function ny(i){if(!i)return[];const r=qr(Pf)[i];return Array.isArray(r)?r:[]}function C1(i,r){if(!i)return[];const l=[...ny(i)];for(const g of r)g&&!l.includes(g)&&l.push(g);return _o(Pf,i,l),l}function MU(i,r){if(!i)return[];const l=ny(i).filter(g=>g!==r);return _o(Pf,i,l),l}const bb=[{version:"0.20.2",date:"2026-07-27",highlight:{zh:"实时终端长时间运行更流畅",en:"Smoother long-running live terminals"},items:{zh:["实时终端长时间打开、连续输出大量内容或电脑同时显示多个 PWA 时保持流畅;输出积压时会跳过过期画面并同步最新终端状态,tmux 历史仍可继续查看。"],en:["Live terminals stay responsive during long sessions, heavy output, and multiple visible PWAs; stale intermediate frames are skipped when output falls behind, while the latest tmux state and scrollback remain available."]}},{version:"0.20.1",date:"2026-07-26",highlight:{zh:"聊天发送修复 · 电脑键盘不中断",en:"Reliable chat sending · uninterrupted desktop input"},items:{zh:["电脑端焦点落在 Window 工具栏后,物理键盘输入和 Shift+Enter 仍会作用于当前终端;F5、F12 保留给浏览器。","修复了聊天模式选择文件后没有开始上传、快速连按重复发送同一条内容的问题;空内容发送 Enter 的能力保持不变。"],en:["Physical keyboard input and Shift+Enter keep working after focus lands on the Window toolbar; F5 and F12 remain available to the browser.","Fixed chat uploads not starting after file selection and rapid taps sending the same content more than once; sending Enter with an empty composer remains available."]}},{version:"0.20.0",date:"2026-07-26",highlight:{zh:"终端实时推送 · 弱网自动回退",en:"Live terminal pushing · automatic network fallback"},items:{zh:["手机和电脑的终端输出现在通过 WebSocket 实时推送;首次打开即可上滑浏览最近的 tmux 历史,继续上滑会加载更早内容,回到底部后重新同步最新画面。","实时连接不可用或持续较差时会自动回退到快照拉取,稳定 30 秒后尝试恢复;右上角显示当前模式与延迟,设置中也可固定使用快照拉取并选择刷新频率。","设置中新增「重新加载应用」,服务端更新后无需退出主屏应用即可载入新版客户端;设置二级页面和弹窗现在会按层返回。"],en:["Terminal output now uses WebSocket live pushing on phone and desktop; scroll up immediately for recent tmux history, keep scrolling for older content, and return to the bottom to resynchronize the latest screen.","An unavailable or persistently poor live connection automatically falls back to snapshot pulling and retries after 30 stable seconds; the top-right status shows the current mode and latency, while Settings can pin snapshot pulling and choose its refresh rate.","Settings now includes Reload app, so an updated server can load the new client without quitting the home-screen app; nested Settings pages and dialogs also return one layer at a time."]}},{version:"0.19.0",date:"2026-07-25",highlight:{zh:"电脑物理键盘直输 · Window 切换更流畅",en:"Desktop keyboard input · faster window switching"},items:{zh:["电脑浏览器现在可以用物理键盘直接操作终端,并支持常用终端快捷键、输入法和复制粘贴;Shift+Enter 可进入保留快捷用语、上传、历史和语音的草稿模式,设置中也可手动指定手机或电脑键盘模式。","全站滚动条现在更统一;终端内容超宽时会显示独立横向滚动条,网络较慢时切换 Window 也会立即进入目标终端的加载页面。","Agent 用量现在稳定展示所有设备共享的本机最新状态,Codex 主额度与 CLI /status 保持一致。"],en:["Desktop browsers can now drive the terminal directly from a physical keyboard, with common terminal shortcuts, IME, and copy/paste; Shift+Enter opens draft mode with shortcuts, uploads, history, and voice intact, and Settings can force Mobile or Desktop keyboard mode.","Scrollbars are now consistent across the app; wide terminal content gets its own horizontal scrollbar, and switching Windows on a slow network enters the target terminal loading view immediately.","Agent usage now keeps the latest machine state stable and shared across devices, while the main Codex quota matches CLI /status."]}},{version:"0.18.0",date:"2026-07-22",highlight:{zh:"Tmux 工作区恢复 · 快捷栏自由定制",en:"Tmux workspace recovery · customizable shortcuts"},items:{zh:["新增 Tmux 工作区恢复:电脑或 Tmux 重启后,可从手机或 handmux restore 恢复上次的会话、窗口、分屏、目录和布局;Claude Code / Codex 会话还能继续原对话。","新增 handmux shortcuts:可分别配置命令与聊天模式的共享快捷项;每台手机也能自由混排共享与本机项,或只在本机移除共享项。","handmux setup 现在可以配置动态预览域名;预览不再自动续期,需要延长时由你手动续期或重新打开。"],en:["Added Tmux workspace recovery: after the computer or Tmux restarts, restore the previous sessions, windows, panes, working directories, and layouts from the phone or handmux restore; Claude Code and Codex sessions can also continue their original conversations.","Added handmux shortcuts to configure shared command-mode and chat-mode items; each phone can also freely mix shared and local items or remove a shared item only on that device.","handmux setup can now configure the dynamic-preview domain; previews no longer renew automatically and can be extended manually or reopened when needed."]}},{version:"0.17.8",date:"2026-07-20",highlight:{zh:"分屏地图显示尺寸 · iPhone 交互修复",en:"Pane dimensions in the map · iPhone interaction fixes"},items:{zh:["分屏地图现在会在空间足够的窗格里低调显示真实终端尺寸(列×行),较小窗格仍保持简洁。","修复了分屏地图在 iPhone 上无法显示、长按窗格时触发系统文字选择的问题。","设置分屏列宽时现在会读取当前窗格的实际宽度,不同窗格不再互相沿用调整值。"],en:["The pane map now quietly shows each terminal's real columns × rows when space allows, while smaller tiles stay uncluttered.","Fixed the pane map failing to appear on iPhone and long-pressing a pane triggering the system text-selection UI.","Pane-width settings now read the active pane's actual width, so adjustments no longer carry over between panes."]}},{version:"0.17.7",date:"2026-07-20",highlight:{zh:"单实例启动兜底 · WSL 状态命令修复",en:"Single-instance startup guard · WSL status fix"},items:{zh:["修复安装开机自启后升级、重启可能产生两个后台实例,导致端口占用、URL 不出现或 stop 后仍可访问的问题;启停命令现在统一管理同一个服务,发现重复副本会列出 PID 并全部回收。","handmux status 现在显示实际运行版本,升级后可区分已安装版本;修复了 WSL 中内容显示完毕却不返回命令行的问题。"],en:["Fixed upgrades or restarts creating two background instances after autostart was installed, which could occupy the port, hide the URL, or remain reachable after stop; lifecycle commands now manage one service and list/reap every duplicate PID.","handmux status now shows the actual running version and distinguishes a newly installed version; fixed WSL terminals not returning to the prompt after status output completed."]}},{version:"0.17.6",date:"2026-07-20",highlight:{zh:"推送结果可追踪 · 对话与权限操作更可靠",en:"Traceable push results · safer chats and permissions"},items:{zh:["脚本通知现在会按设备显示成功或失败,失败详情会区分订阅失效、限流、推送服务不可用、拒绝和网络错误;handmux push 也不会再把零送达或部分失败报告为成功。","修复了关闭通知、打开或删除通知记录、查询设备 key 等操作在浏览器或网络无响应时可能一直等待的问题;关闭本地通知开关现在会立即生效。","长对话轮询不再遍历整段会话;历史记录统一每次加载 20 条,首次打开不足一屏时也会自动继续补取更早内容。","权限确认卡调整为左侧取消、右侧确认;取消需要在 2 秒内再次点击,避免误触中断正在等待的请求。"],en:["Script notifications now show success or failure per device, with details for expired subscriptions, rate limits, unavailable push services, rejection, and network errors; handmux push no longer reports zero delivery or partial failure as success.","Fixed notification disabling, inbox loading or deletion, and device-key lookup waiting forever when the browser or network stops responding; the local notification switch now turns off immediately.","Long-chat polling no longer walks the entire session; history loads 20 messages at a time and automatically keeps fetching older messages when the first page does not fill the screen.","Permission cards now place Cancel on the left and Confirm on the right; cancellation requires a second tap within two seconds to prevent accidentally interrupting a pending request."]}},{version:"0.17.5",date:"2026-07-20",highlight:{zh:"通知开启修复 · 长会话与设置可靠性提升",en:"Notification setup fixed · stronger chat and settings reliability"},items:{zh:["修复了安卓 Chrome 开启通知永久转圈、失效订阅假报成功以及更换域名后收不到通知的问题;注册、激活、FCM 与服务器上报现在会分别检查,失效订阅可自动重置。","修复了超长对话反复全量解析、可能拖慢服务并持续占用手机内存的问题;对话记录改为增量读取并限制缓存规模。","恢复设置里的完整版本更新历史;有新版本时的升级提示仍只展示最新一条,更早版本可按需展开。","修复通知记录加载或删除失败时误显示为空、消息短暂消失的问题,现在会保留已有内容并提示重试。","修复 Agent 退出后偶尔残留旧状态、普通 Node 程序被误认成 Codex 的问题;动态预览认证也限制在当前子域,启动失败会显示真实原因。"],en:["Fixed Android Chrome notification setup spinning forever, stale subscriptions being reported as enabled, and notifications not arriving after a domain change; registration, activation, FCM, and server reporting are now checked separately, with expired subscriptions reset automatically.","Fixed very long chats being repeatedly parsed in full, which could slow the service and keep growing phone memory use; transcripts now load incrementally with bounded caches.","Restored the complete version history in Settings; the upgrade prompt still shows only the newest release by default, with older versions expandable on demand.","Fixed notification history appearing empty or briefly losing a message when loading or deletion failed; existing content is now preserved with a retry action.","Fixed stale Agent state after exit and ordinary Node programs occasionally being mistaken for Codex; dynamic-preview authentication is now scoped to the current subdomain and startup failures show their real cause."]}},{version:"0.17.4",date:"2026-07-19",highlight:{zh:"HTTPS 本机预览修复 · 通知链接安全加固",en:"HTTPS localhost previews fixed · safer notification links"},items:{zh:["修复了 HTTPS/WSS 本机服务无法一键预览、带 # 的深链打开失败,以及 Codex pane 偶尔误出现 Claude 对话视图的问题;通知跳转链接也增加了安全校验。"],en:["Fixed one-tap previews for local HTTPS/WSS services, deep links with # fragments, and Claude chat view occasionally appearing on a Codex pane; notification links now receive stricter safety checks too."]}},{version:"0.17.3",date:"2026-07-19",highlight:{zh:"三修官方一键安装的 Claude 识别,真机已验证",en:"Third fix for native-install Claude detection, device-verified"},items:{zh:["修复了官方一键安装器版 Claude Code 仍识别不出的问题(0.17.2 的对账依据在真实环境不成立);本次按真机数据修正,已验证所有官方安装方式都能正确识别(agent 图标、对话视图切换钮正常出现)。"],en:["Fixed native-installer Claude detection still not working (0.17.2 relied on a signal that doesn't hold in the real environment); corrected against real-device data — verified across all official install methods (agent icon and chat-view switch appear)."]}},{version:"0.17.0",date:"2026-07-18",highlight:{zh:"对话视图(实验性)· 通知记录 · 本机地址一键预览",en:"Chat view (experimental) · notification inbox · one-tap localhost preview"},items:{zh:["新增「对话视图」(实验性功能,默认关):到设置里打开「启用对话视图(实验性功能)」后,窗口栏就能把 Claude 会话在终端/对话两个视图间一键切换(需已装 Claude hooks,没装可一键安装)。对话视图把会话读成聊天记录——气泡 + Markdown、工具卡(编辑文件带 +A/−B 和彩色 diff)、Claude 提问时点按即答的问题卡、上下文压缩动画、三套暖色配色;终端视图照旧,完全不受影响。","新增「通知记录」:脚本推送(handmux push)的通知按设备留存(各 100 条),全屏翻看、点开看详情、逐条删除;点手机上的通知直接跳到那条消息的详情。","终端里打印的本机地址(localhost:3000 等)自动变成可点的:点一下就能起代理在手机上预览(带路径),多个端口还能并行切换、自动续期。"],en:["New chat view (experimental, off by default): enable it in Settings → Enable chat view, then flip a Claude pane between terminal and chat from the window bar (requires Claude hooks — one-tap install offered). The chat view reads the session as a conversation — bubbles with Markdown, tool cards (+A/−B and colored diffs for file edits), question cards you answer with a tap, a visible compaction animation, and three warm colour tones. The terminal view is untouched.","New notification inbox: pushes from handmux push are kept per device (latest 100) — browse full-screen, open details, delete one by one; tapping a push lands on that message’s detail.","Localhost URLs printed in the terminal (localhost:3000, …) are now tappable: one tap proxies and previews them on your phone (path preserved), with several ports open in parallel and auto-renewed."]}},{version:"0.16.0",date:"2026-07-15",highlight:{zh:"分屏布局地图 · 手机也能建/删窗格",en:"Split-layout map · create & close panes from the phone"},items:{zh:["有多个窗格的窗口,选择器不再是一条干巴巴的下拉列表,而是照着你屏幕上真实的分屏样子画出来:每一格对应一个窗格,标着序号、正在跑的命令和 Agent 图标,一眼就看出谁在左谁在右、谁在上谁在下,点一下就切过去看那一格。","现在手机上就能直接分屏和关窗格了:长按地图里的某一格,就能把它「左右分屏」或「上下分屏」,也能「关闭」;还没分屏的窗口在它的菜单里也能分,已经分屏的窗口菜单里点「管理分屏」直接进地图。分好之后自动就落在新的那格里,地图也一直开着,随时能接着分或关。","绑定会话的弹窗更清楚了:「新建会话」和「选已有会话」分成两个明确的选项,不会再让人以为点一下「新建」就直接把会话建出来。"],en:["For a window with several panes, the picker is no longer a plain dropdown — it’s drawn to match the way your screen is actually split: each tile is one pane, labelled with its number, the command it’s running, and its agent, so you can tell at a glance which pane is where. Tap a tile to jump to that pane.","You can now split and close panes right from the phone: long-press a tile in the map to Split it left/right or top/bottom, or Close it; a window that isn’t split yet can be split from its menu, and a split window has a “Manage split” entry that opens the map. After a split you’re dropped into the new pane, and the map stays open so you can keep splitting or closing.","The bind-session dialog is clearer: “New session” and “Pick an existing session” are now two distinct choices, so tapping “New” no longer looks like it creates a session on the spot."]}},{version:"0.15.0",date:"2026-07-14",highlight:{zh:"键盘弹起终端自适应 · 全屏程序可上下滚动",en:"Keyboard-aware terminal · scroll inside full-screen apps"},items:{zh:["键盘弹起时终端不再被顶飞:内容自动重排到键盘上方,主屏短内容贴着键盘上沿显示;全屏程序(vim/less/htop 等)可以在里面上下滚动、到顶/底才翻页,默认显示程序的第一行,移动光标时自动跟随。","全屏程序翻页键上方新增「适配高度」和「定位」两个按钮:「适配高度」一键缩字号,收起键盘就能把整屏程序完整塞进手机屏;「定位」点亮后高亮光标所在行并跟随,方便在长内容里盯住光标。键盘弹起的瞬间光标也一直可见,不用再补按一下。","收件箱在一种特定场景下抓不到状态变更:你回应了权限弹窗、但那次回应没产生任何收尾信号时(普通授权、拒绝并反馈、或按 ESC 中断),它会停留在「需要你」。这一版补上识别——授权或拒绝反馈后回到「进行中」,ESC 中断则消掉状态。","光标不用点屏幕也能看到了:一进会话就能看到光标位置,发键/发指令后即使 Claude 正在忙也会亮着。","从设置里启动动态端口预览,现在会像静态预览一样自动弹出预览面板。","会话重命名撞到已有名字时,会明确提示「名称已存在」;修复了终端上滑一点后画面自己往上爬的问题。"],en:["The terminal no longer gets shoved off-screen when the keyboard opens: content reflows to sit just above the keyboard, with short main-screen output resting on its top edge. Full-screen programs (vim/less/htop, etc.) now scroll up/down inside themselves and only page at the edges, default to showing the program’s first line, and follow the cursor as you move it.","Two new buttons above the full-screen pager: “Fit height” shrinks the font in one tap so the whole program fits on the phone with the keyboard down, and “Locate” highlights and follows the cursor’s row so you can keep track of it in long content. The cursor also stays visible the moment the keyboard opens — no extra tap needed.","In one specific case the inbox couldn’t pick up a state change: when you responded to a permission prompt but that response produced no closing signal (a normal approval, a deny-with-feedback, or an ESC interrupt), it would linger on “needs you”. This release adds that detection — approving or denying returns it to “working”, and an ESC interrupt clears it.","The cursor now shows without tapping the screen: you can see where it is the moment you open a session, and it stays lit after you send a key/command even while Claude is busy.","Starting a dynamic-port preview from Settings now auto-opens the preview sheet, just like a static one.","Renaming a session to a name that already exists now says so clearly; and fixed the terminal creeping upward a line at a time after a small scroll up."]}},{version:"0.14.0",date:"2026-07-13",highlight:{zh:"终端文字选中拷贝 · 脚本复用推送通道",en:"Terminal select & copy · scripts reuse the push channel"},items:{zh:["终端可以长按选中文字了:iOS 式首尾手柄精调、跨屏选择,浮条一键拷贝/整行/整段,复制自动去掉行尾空格;选中期间顶部显示「复制模式 · N 行 · M 字」。","你自己的脚本也能复用 handmux 的推送通道:命令行用 handmux push <标题> <正文> 直接给手机发通知(可选 --session/--device 限定范围),脚本跑完主动提醒你。","滚动终端不再收起键盘:滑动时键盘保持、单击才收起;还能用 ⌨ 按钮或底部手柄拖拽显隐键盘,命令/聊天切换也保持键盘不掉。","往上滑看历史更顺了:一次滑到顶只加载一页、不再叠加拉取来回跳,位置稳停在你看的那行,顶部显示「距底 N/M 行」。","全屏程序(vim/less/htop 等)上方不再串出无关的终端历史。","修复了主页误触返回直接退出、以及从通知进入要多按一次返回才能退出的问题。"],en:["You can now long-press to select text in the terminal: iOS-style start/end handles, selection across screens, a callout to copy / whole line / whole paragraph, with trailing spaces trimmed on copy. A “copy mode · N lines · M chars” bar shows while selecting.","Your own scripts can reuse handmux’s push channel: run handmux push <title> <body> to send a notification straight to your phone (optionally scoped with --session/--device) — handy for a script pinging you when it finishes.","Scrolling the terminal no longer dismisses the keyboard: a swipe keeps it up, a single tap puts it away; you can also show/hide it with the ⌨ button or the dock’s grip handle, and it stays up when you switch between command and chat.","Scrolling up through history is smoother: reaching the top loads exactly one page instead of stacking pulls and jumping around, and your place holds steady on the line you were reading, with a “N/M lines from bottom” readout.","A full-screen program (vim/less/htop, etc.) no longer leaks unrelated terminal history above it.","Fixed a stray Back on the home page dropping you straight out, and needing an extra Back to leave after opening the app from a notification."]}},{version:"0.13.0",date:"2026-07-12",highlight:{zh:"终端文件路径高亮可点",en:"Tappable, highlighted file paths"},items:{zh:["终端里的文件路径现在会高亮显示、可以直接点开;这个高亮可以在设置里开关(默认关闭)。","桌面浏览器用鼠标滚轮往上翻,现在能拉出更深的历史了(不再卡在第一屏);桌面和手机都加了一条纤细的滚动条。","设置面板太高时可以整体滚动了,标题和关闭按钮始终可见、够得到。","修复了 agent 图标和底部输入模式偶尔乱跳的问题——现在按 agent 是否真的在运行来判断,分屏里每个窗格也各显各的图标。","handmux setup 新增「令牌」一项:可以手动固定访问令牌,这样每次重启后手机网址不再变化(留空则仍每次自动生成一个)。"],en:["File paths in the terminal are now highlighted and tappable — tap one to open it. You can toggle the highlight in Settings (off by default).","On a desktop browser the mouse wheel now pulls deeper history instead of stalling at the first screen, and a thin scrollbar was added on both desktop and mobile.","The Settings sheet scrolls as a whole when it is taller than the screen, with the title and close button always reachable.","Fixed the agent icon and the bottom input mode occasionally jumping around — both now track whether the agent is actually running, and each pane in a split shows its own icon.","handmux setup has a new “Token” item: you can pin the access token by hand so the phone URL stops changing on every restart (leave it blank to keep auto-generating one each start)."]}},{version:"0.12.3",date:"2026-07-11",highlight:{zh:"接管会话可自定义名称 + Homebrew 一键安装",en:"Name a takeover session · Homebrew install"},items:{zh:["接管电脑上的会话时,可以自己给新会话起名(默认也帮你填好);接管后想回电脑继续的命令,现在直接显示成 handmux open <名称>,照着敲即可。","新增 Homebrew 一键安装:没装 Node 的 Mac 也能用 brew install handmux/tap/handmux 一条命令装好(handmux + Node + tmux)。已有 Node 的话,npm i -g handmux 仍是更轻的选择。"],en:["When taking over a session running on your computer, you can now name the new session yourself (a default is filled in), and the “continue on the computer” hint shows the exact command to run — handmux open <name>.","New Homebrew install: on a Mac without Node, brew install handmux/tap/handmux sets up handmux, Node, and tmux in one command. If you already have Node, npm i -g handmux stays the lighter option."]}},{version:"0.12.2",date:"2026-07-11",highlight:{zh:"修复主屏图标偏大 / 换图标后不刷新",en:"Home-screen icon: right size & always fresh"},items:{zh:["修复了「添加到主屏」的图标在安卓上偏大、以及更换图标后旧图标不刷新的问题——图标更新现在会自动生效(已加到 iPhone 主屏的需删掉重加一次)。"],en:["Fixed the Add-to-Home-Screen icon looking oversized on Android and a changed icon not refreshing for returning users — icon updates now apply automatically (one already on an iOS home screen needs a one-time remove + re-add)."]}},{version:"0.12.1",date:"2026-07-11",highlight:{zh:"全新品牌图标与双色字标",en:"New brand icon & two-tone wordmark"},items:{zh:["焕新品牌:全新的发光终端图标(主屏图标、启动页都换了)+ 圆润的双色「handmux」字标(hand 白、mux 青→绿),官网、分享卡和 README 也一并更新。"],en:['Brand refresh: a new glowing terminal app icon (home-screen icon + boot splash) and a rounded two-tone "handmux" wordmark (hand in white, mux teal→green), with the site, share cards, and README updated to match.']}},{version:"0.12.0",date:"2026-07-11",highlight:{zh:"全屏程序也能滑动滚动 · 反馈入口 · 聊天草稿不丢",en:"Swipe-scroll full-screen apps · feedback channels · chat drafts kept"},items:{zh:["全屏程序(vim / htop / less 等)现在能直接滑动滚动了:开了鼠标的程序像电脑滚轮一样滑着滚,没开鼠标的分页器(less / man / git log)靠滑动逐行滚;每个全屏画面右侧还多了一枚翻页按钮做整页跳。","设置里新增「反馈与交流」:直达 GitHub Issues,中文用户还能扫码进微信交流群;README、官网、文档里也都能找到入口。","聊天框里没发出去的内容现在会自动保存,下次打开自动填回——误划走、切后台被杀、崩溃都不会再丢半截提示词。","修复:从终端链接或「最近」直接打开的文档,点返回会一次收起面板,不再被硬塞进「目录」层、再返一次直接退出 App。"],en:["Full-screen apps (vim / htop / less …) now scroll by swipe: mouse-mode apps scroll like a desktop wheel, and pagers (less / man / git log) scroll line-by-line on a swipe; every full-screen view also gets a page up/down button on the right for whole-page jumps.",'New "Feedback" section in Settings: a direct link to GitHub Issues, plus a WeChat user group for Chinese users — also surfaced in the README, the site, and the docs.',"Whatever you've typed in the chat box is now saved automatically and restored next time you open it — an accidental swipe-away, a background kill, or a crash no longer eats a half-written prompt.","Fixed: a doc opened straight from a terminal link or 最近 now closes the sheet in one Back press, instead of being forced into its folder view and then dropping you out of the app on the next Back."]}},{version:"0.11.1",date:"2026-07-09",highlight:{zh:"修复 Node 18 下无法启动的问题",en:"Fixes startup crash on Node 18"},items:{zh:["修复了电脑用 Node 18 时 handmux 任何命令都启动不了的问题(0.11.0 配置向导引入的依赖要求过新的 Node)。"],en:["Fixed handmux failing to start any command on Node 18 (a dependency introduced by the 0.11.0 setup wizard required a newer Node)."]}},{version:"0.11.0",date:"2026-07-08",highlight:{zh:"国内可用隧道 natapp/cpolar · 配置向导重做",en:"China-usable tunnels · setup redesigned"},items:{zh:["新增两条国内可用的隧道 natapp 和 cpolar:当 Cloudflare 在国内不稳定时,用你自己的免费账号就能把手机连到电脑。只要一个 authtoken;想要固定地址就填公网地址,留空则用免费临时域名;cpolar 的客户端还会自动下载。","`handmux setup` 重做成菜单式向导:每项设置一行、直接显示当前值,想改哪项就点哪项,不用再一路问到底。连接分两级——先选隧道类型,再进去配它的参数;推送、语音也各成小面板。第一次用会一步步带你走,默认落在「直连」并停在「保存并启动」,小白也能顺下来。"],en:["Two China-usable tunnels, natapp and cpolar: when Cloudflare is unreliable inside mainland China, reach your computer from your phone using your own free account. Just an authtoken; add a public URL for a fixed address or leave it blank for a free temporary one — and cpolar's client auto-downloads.",'`handmux setup` is now a menu-style wizard: every setting is a row showing its current value, so you jump straight to what you want to change instead of answering every prompt in order. Connection is two levels — pick the tunnel type, then configure it inside; push and voice are their own mini-panels. A first run walks you through it, defaulting to "Direct" with the cursor on "Save & start".']}},{version:"0.10.0",date:"2026-07-06",highlight:{zh:"升级前预览新功能 · 电脑 handmux open 接管",en:"Preview an update before installing · handmux open"},items:{zh:["更新提示现在会提前告诉你新版有什么:检测到有新版本时,设置里会逐版列出这次升级带来的新功能(一句话说明),让你在电脑上跑 `handmux update` 之前就知道值不值得。","电脑上新增 `handmux open <会话名>`:把你在手机上建的会话直接在电脑终端接回来(没有就新建),不用再记 `tmux new -A -s`。绑定/新建会话的弹窗里也加了这句提示。"],en:["The update notice now tells you what a new version brings before you install it: when an update is detected, Settings lists each newer version's highlight in one line, so you know whether it's worth running `handmux update` on your computer.","New `handmux open <session>` on the computer: reclaim a session you created from your phone straight into your computer's terminal (created if missing) — no need to remember `tmux new -A -s`. The bind/create dialog now hints at it too."]}},{version:"0.9.1",date:"2026-07-06",highlight:{zh:"「添加到主屏」引导",en:'"Add to Home Screen" coach'},items:{zh:["新增「添加到主屏」引导:第一次在浏览器里打开时,提示你把 handmux 装到主屏,像 App 一样全屏打开。安卓可一键安装;iPhone 给出 Safari 的「分享 → 更多 → 添加到主屏幕」三步——iOS 上收推送也需要它。装好后不再打扰。"],en:[`New "Add to Home Screen" coach: the first time you open handmux in a browser, it shows how to install it to your home screen and run it full-screen like an app. Android installs in one tap; iPhone gets the Safari steps (Share → More → Add to Home Screen) — which is also what iOS push needs. It won't nag once you've added it.`]}},{version:"0.9.0",date:"2026-07-05",highlight:{zh:"聊天输入框多行重做",en:"Multi-line chat composer redone"},items:{zh:["聊天输入框多行重做:文字占满整行,麦克风/发送悬到右下角,末行快挤到按钮才让出一行——长消息不再被右侧按钮列挤窄,多行时拖光标也不会误收键盘。"],en:["Chat composer redone for multi-line: text takes the full width, mic/send float in the bottom-right corner, and a row is yielded only when the last line actually reaches them — long messages are no longer squeezed by a right-hand button column, and dragging the caret no longer collapses the keyboard."]}},{version:"0.8.0",date:"2026-07-05",highlight:{zh:"快捷栏可自定义 · 上传体验重做",en:"Customizable quick-bars · upload redone"},items:{zh:["命令模式的常用命令分成「全局」和「当前窗口」两组:快捷栏里全局的(灰)排前、当前窗口的(绿)排后。尾部改成 ⚙ 齿轮,点开更高的编辑器分两区、各自 ▲▼ 排序。新增区一行搞定:顶部「命令/按键」大 Tab 选类型,左侧开关选加到全局还是本窗口。命令可勾「带回车」(点一下直接执行,末尾带 ⏎);按键用 ⌃⇧⌥ + 一个基键拼出组合键(如 Ctrl+C),点一下直接发到终端。","聊天模式的快捷条也能自定义了:末尾同样是 ⚙,点开编辑器,「消息/按键」两个 Tab —— 消息就是一句发给 agent 的话(以 / 开头当斜杠命令),按键用同一套 ⌃⇧⌥ + 基键拼组合键(ESC/Tab/退格默认就在里面)。点任意一条可回到弹窗改,▲▼ 排序。","上传体验重做:进度条不再一冲到 100% 就假装完事——先显示真实发送进度,字节发完后转成「服务器接收中…」,大文件不再像卡死。上传中可随时「取消」,已传完的文件会保留。","重名不再报错:上传一个已存在的文件名会自动改名(如 `报告 (1).pdf`),绝不覆盖原文件。上传失败时也会告诉你具体原因(过大 / 不支持的类型)。","现在可以上传视频了(mp4、mov、webm 等)。","Git 面板现在能打开 `/tmp` 等家目录以外的仓库(比如 agent 在 /tmp 里干活的项目),不再报红。","用量进度条新增「时间竖线」:标出当前重置窗口已过去的时间比例。已用量在竖线左边=烧得比时间慢(稳),越过竖线=烧得偏快,一眼看出自己的节奏。","新增版本更新提示:每次打开检测一次,服务端落后于 npm 最新版时设置齿轮亮红点,进设置能看到当前/最新版本号,按提示在电脑上跑 `handmux update` 升级即可。"],en:[`Command mode's saved commands now split into "Global" and "This window": the quick-bar shows global ones (grey) first, then this window's (green). The trailing + is now a ⚙ opening a taller two-section editor, each reorderable with ▲▼. One add row does it all: a big Command/Key tab picks the type, a left switch picks which list it lands in. Commands can tick "Send Enter" (a tap runs it, marked ⏎); keys are built from ⌃⇧⌥ + a base key into a combo like Ctrl+C that fires straight into the terminal.`,"Chat mode's quick-bar is now customizable too: the same ⚙ at the end opens an editor with a Message/Key tab — a message is a line sent to the agent (starts with / for a slash-command), a key is built from the same ⌃⇧⌥ + base-key picker (ESC/Tab/Backspace ship as defaults). Tap any row to re-open the card and edit it, ▲▼ to reorder.","Upload redone: the bar no longer jumps to 100% and then hangs — it shows real send progress, then flips to “receiving on the server…” once bytes are flushed, so a big file no longer looks stuck. You can Cancel mid-upload; already-uploaded files are kept.","Name clashes no longer fail: uploading an existing name auto-renames (e.g. `report (1).pdf`) and never overwrites. Failures now tell you why (too large / unsupported type).","Video files can now be uploaded (mp4, mov, webm, …).","The git panel can now open repos outside your home directory (e.g. a project an agent is working in under `/tmp`) instead of erroring.",`Usage bars now show a "time marker": a thin vertical line at how far the current reset window has elapsed. Usage left of the line = you're burning slower than the clock; past it = faster — pacing at a glance.`,"New update notice: checked once each time you open the app — when the server is behind the latest npm release, the settings gear lights a dot and Settings shows the current/latest version so you can run `handmux update` on your computer."]}},{version:"0.7.0",date:"2026-07-03",highlight:{zh:"新增「用量」页",en:'New "Usage" page'},items:{zh:["新增「用量」页(顶栏仪表盘图标):一眼看 Claude 的 5 小时 / 本周额度进度条 + 重置倒计时,以及 Codex 的额度环。全部读主机本地文件,不登录账号、不调用 API。Codex 零配置即用;Claude 的实时额度需要在电脑上运行一次 handmux hooks install(会装一个 statusLine 捕获器,已有自定义 statusLine 的绝不覆盖)。"],en:["New \"Usage\" page (gauge icon in the top bar): see Claude's 5-hour / weekly limit bars with reset countdowns, plus Codex's quota ring — at a glance. All read from local files on the host: no account login, no API calls. Codex works with zero setup; Claude's live limits need a one-time `handmux hooks install` on the computer (it adds a statusLine capturer and never clobbers an existing custom statusLine)."]}},{version:"0.6.0",date:"2026-07-02",highlight:{zh:"新增 Codex 支持",en:"Codex support added"},items:{zh:["新增 Codex 支持:收件箱与推送现在同时认得 Claude 和 Codex——Codex 会话的「进行中 / 需要你 / 已完成」都会像 Claude 一样推到手机;tmux 外跑着的 Codex 会话也能一键「接管」进来(codex resume);新建会话的启动命令预设新增 codex。收件箱每一条、以及顶栏当前会话,都带上 Claude / Codex 标记,一眼区分是哪种 agent。","会话抽屉底部新增「未接管会话」:一眼看到在 tmux 外跑着、手机还控制不了的 Claude / Codex(带状态、时间、最后一条消息),点「接管」即可在 tmux 里续接同一会话——自动加进会话列表并跳进去,以后手机随时回来。"],en:["Added Codex support: the inbox and push now recognize both Claude and Codex — a Codex session's working / waiting-on-you / done states reach your phone just like Claude. You can take over Codex sessions running outside tmux (codex resume), and there's a new codex startup-command preset. Every inbox row and the current-session topbar now carry a Claude / Codex mark so you can tell the two apart at a glance.",`The session drawer now has a "not taken over" section at the bottom: Claude / Codex sessions running outside tmux that your phone can't steer yet (with their state, time, and last message). Tap Take over to resume the same conversation inside tmux — it's added to your session list and opened, so you can return to it from your phone anytime.`]}},{version:"0.5.0",date:"2026-06-28",highlight:{zh:"首个公开版 · 多语言界面",en:"First public release · multi-language UI"},items:{zh:["首个公开发布版本(npm 上的 handmux)。","新增繁体中文、日语、韩语界面(设置 → Language 切换)。","想法角标:有未完成想法时,灯泡图标右上角显示数量。","设置面板列数调节:实时显示当前列数,新增 ±1 精细调节按钮。"],en:["First public release (handmux on npm).","Added Traditional Chinese, Japanese, and Korean UI (Settings → Language to switch).","Idea badge: when there are pending ideas, the lightbulb icon shows a count in the corner.","Settings column control: shows the current column count live, with new ±1 fine-adjust buttons."]}},{date:"2026-06",label:{zh:"早期内测",en:"Early builds"},highlight:{zh:"早期内测",en:"Early builds"},items:{zh:["新增「Git」面板(顶栏图标):仿 VS Code,一页同屏看变更 + 提交历史,点文件/提交看全屏彩色 diff;只读,不动你的工作树。可绑多个目录用 tab 切换。","新增「想法」管理器(顶栏灯泡):按窗口记待办,可编辑、拖拽排序、一键填入、语音输入。","网站预览:选目录预览静态站点,或填端口预览本机正在跑的服务(走专属子域名);图片预览:文件/终端里点图片(含 GIF)直接内嵌打开,可捏合缩放、长按保存。","文件:上传/下载(进度条、系统分享上传),浏览器打开即落到当前会话目录,支持 /tmp、$TMPDIR;文档在应用内预览 Markdown/txt/log/sh,可语音朗读(逐句高亮)。","收件箱 + Web Push:汇总各会话「进行中/已完成/需要你」,窗口标签带状态色点,需要你时推送到手机。","命令面板:常用 + 每会话最近命令,斜杠命令快捷键(/clear、/compact、/model…)。","可靠性:断线重连(退避 + 每请求超时 + 断线横幅,后台自动暂停轮询),离线兜底页。","首版:手机浏览器驱动真实 tmux 面板(xterm 终端 + 会话/窗口/pane 导航 + 深链),移动按键区、键盘自动抬升、列宽/字号调节,可添加到主屏(PWA)。"],en:['New "Git" panel (top-bar icon): VS Code style — changes + commit history on one screen, tap a file/commit for a full-screen colored diff; read-only, never touches your working tree. Bind multiple dirs and switch via tabs.','New "Ideas" manager (top-bar lightbulb): per-window to-dos — edit, drag to reorder, one-tap insert, voice input.',"Website preview: pick a directory for a static site, or a port for a service running locally (dedicated subdomain); image preview: tap an image (including GIFs) in Files or the terminal to open inline, pinch to zoom, long-press to save.","Files: upload/download (progress bar, share-to-upload), the browser opens straight to the current session dir, /tmp and $TMPDIR supported; documents preview in-app (Markdown/txt/log/sh) and can be read aloud (sentence-by-sentence highlight).","Inbox + Web Push: summarizes each session's In-progress / Done / Needs-you, window tabs get a status color dot, and Needs-you pushes to your phone.","Command panel: frequent + per-session recent commands, slash-command shortcuts (/clear, /compact, /model, …).","Reliability: reconnect on disconnect (backoff + per-request timeout + connection-lost banner, polling auto-paused in the background) and an offline fallback page.","First release: a phone browser drives real tmux panes (xterm terminal + session/window/pane navigation + deep links), a mobile key bar, keyboard auto-lift, column-width/font-size adjustment, and add-to-home-screen (PWA)."]}}],UU=i=>i.version||i.date,rf=bb[0]?UU(bb[0]):null,OU={jpg:"image/jpeg",jpeg:"image/jpeg",jfif:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",svg:"image/svg+xml",ico:"image/x-icon",heic:"image/heic",heif:"image/heif",avif:"image/avif",tif:"image/tiff",tiff:"image/tiff",pdf:"application/pdf",txt:"text/plain",log:"text/plain",md:"text/markdown",markdown:"text/markdown",csv:"text/csv",json:"application/json",xml:"application/xml",html:"text/html",htm:"text/html",zip:"application/zip",mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",mkv:"video/x-matroska",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv","3gp":"video/3gpp",ogv:"video/ogg",mpeg:"video/mpeg",mpg:"video/mpeg",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};function If(i){const r=(i||"").lastIndexOf(".");return r<0?"":OU[i.slice(r+1).toLowerCase()]||""}function PU(i){return If(i).startsWith("image/")}class ir extends Error{}class kC extends Error{constructor(r,l,g){super(r),this.status=l,this.serverError=g??null}}async function nn(i,r={}){const l=Fa(),{timeoutMs:g,...N}=r,R={Authorization:`Bearer ${l??""}`,...N.headers||{}};N.body&&(R["Content-Type"]="application/json");let y=null,a=null;g&&(y=new AbortController,a=setTimeout(()=>y.abort(),g));try{const u=await fetch(i,{cache:"no-store",...N,headers:R,signal:y==null?void 0:y.signal});if(u.status===401)throw new ir;if(!u.ok){let m=null;try{const b=await u.json();b!=null&&b.error&&(m=b.error)}catch{}throw new kC(m||`${i} -> ${u.status}`,u.status,m)}return u.status===204?{unchanged:!0}:await u.json()}catch(u){throw y!=null&&y.signal.aborted?new Error(`${i} -> timeout`):u}finally{a&&clearTimeout(a)}}const Qo=()=>nn("/api/sessions"),VU=()=>nn("/api/usage"),mc=i=>nn(`/api/windows?session=${encodeURIComponent(i)}`),Ws=i=>nn(`/api/panes?window=${encodeURIComponent(i)}`,{timeoutMs:8e3}),IU=(i,r=1500,l)=>nn(`/api/history?pane=${encodeURIComponent(i)}&lines=${r}${l?`&since=${l}`:""}`,{timeoutMs:8e3}),E1=(i,{since:r,before:l,limit:g=10}={})=>{let N=`/api/transcript?pane=${encodeURIComponent(i)}&agent=claude&limit=${encodeURIComponent(g)}`;return r&&(N+=`&since=${encodeURIComponent(r)}`),l!=null&&(N+=`&before=${encodeURIComponent(l)}`),nn(N,{timeoutMs:8e3}).then(R=>R.unchanged?null:R)},BU=i=>nn(`/api/context?pane=${encodeURIComponent(i)}&agent=claude`,{timeoutMs:8e3}),FU=i=>nn(`/api/pending-prompt?pane=${encodeURIComponent(i)}&agent=claude`,{timeoutMs:8e3}).then(r=>r.prompt||null),Nc=(i,r,l=!0)=>nn("/api/send",{method:"POST",body:JSON.stringify({pane:i,text:r,enter:l})}),Od=(i,r)=>nn("/api/keys",{method:"POST",body:JSON.stringify({pane:i,keys:r})}),HU=(i,r)=>nn("/api/input",{method:"POST",body:JSON.stringify({pane:i,hex:r})}),zU=(i,r,l=1)=>nn("/api/scroll",{method:"POST",body:JSON.stringify({pane:i,dir:r,lines:l})}),$U=(i,r,l)=>nn("/api/resize",{method:"POST",body:JSON.stringify({window:i,cols:r,rows:l})}),WU=(i,r)=>nn("/api/resize",{method:"POST",body:JSON.stringify({pane:i,cols:r})}),GU=i=>nn(`/api/layout?window=${encodeURIComponent(i)}`),YU=(i,r)=>nn("/api/resize",{method:"POST",body:JSON.stringify({window:i,auto:!0,layout:r})}),qU=(i,r,l)=>nn("/api/sessions",{method:"POST",body:JSON.stringify({name:i,cwd:r,cmd:l})}),KU=(i,r,l,g,N)=>nn("/api/windows",{method:"POST",body:JSON.stringify({session:i,pane:r,name:l,cwd:g,cmd:N})}),XU=(i,r)=>nn("/api/sessions",{method:"PATCH",body:JSON.stringify({id:i,name:r})}),JU=(i,r)=>nn("/api/windows",{method:"PATCH",body:JSON.stringify({id:i,name:r})}),ZU=i=>nn(`/api/windows?window=${encodeURIComponent(i)}`,{method:"DELETE"}),QU=(i,r)=>nn("/api/windows/swap",{method:"POST",body:JSON.stringify({a:i,b:r})}),j1=(i,r)=>nn("/api/panes/split",{method:"POST",body:JSON.stringify({pane:i,dir:r})}),e3=i=>nn(`/api/panes?pane=${encodeURIComponent(i)}`,{method:"DELETE"}),t3=(i,r)=>nn("/api/dir",{method:"POST",body:JSON.stringify({dir:i,name:r})}),D1=(i,r=null)=>nn(`/api/file?path=${encodeURIComponent(i)}${r!=null?`&mtime=${encodeURIComponent(r)}`:""}`,{timeoutMs:8e3}),RC=i=>nn(`/api/dir${i?`?path=${encodeURIComponent(i)}`:""}`,{timeoutMs:8e3}),al=i=>nn(`/api/pane-cwd?pane=${encodeURIComponent(i)}`,{timeoutMs:8e3}),n3=()=>nn("/api/asr/sign",{timeoutMs:8e3}),i3=()=>nn("/api/config",{timeoutMs:8e3}),r3=()=>nn("/api/version",{timeoutMs:8e3}),k1=()=>nn("/api/workspace/status",{timeoutMs:8e3}),R1=(i="latest")=>nn(`/api/workspace/restore-plan?checkpoint=${encodeURIComponent(i)}`,{timeoutMs:8e3}),s3=(i={checkpointId:"latest"})=>nn("/api/workspace/restore",{method:"POST",body:JSON.stringify(i),timeoutMs:8e3}),a3=i=>nn(`/api/workspace/restore/${encodeURIComponent(i)}`,{timeoutMs:8e3}),o3=()=>nn("/api/hooks/install",{method:"POST",timeoutMs:15e3}),l3=(i=[])=>nn(`/api/states?sessions=${encodeURIComponent(i.join(","))}`,{timeoutMs:4e3}),T1=()=>nn("/api/orphans",{timeoutMs:8e3}),c3=i=>nn("/api/orphans/takeover",{method:"POST",body:JSON.stringify(i),timeoutMs:15e3}),L1=i=>nn(`/api/git/repos?dir=${encodeURIComponent(i)}`,{timeoutMs:8e3}),u3=i=>nn(`/api/git/status?repo=${encodeURIComponent(i)}`,{timeoutMs:8e3}),d3=(i,{limit:r=50,ref:l}={})=>{let g=`/api/git/log?repo=${encodeURIComponent(i)}&limit=${r}`;return l&&(g+=`&ref=${encodeURIComponent(l)}`),nn(g,{timeoutMs:8e3})},h3=i=>nn(`/api/git/branches?repo=${encodeURIComponent(i)}`,{timeoutMs:8e3}),m3=(i,{path:r,commit:l,staged:g}={})=>{let N=`/api/git/diff?repo=${encodeURIComponent(i)}&path=${encodeURIComponent(r??"")}`;return l&&(N+=`&commit=${encodeURIComponent(l)}`),g&&(N+="&staged=1"),nn(N,{timeoutMs:8e3})},f3=(i,r)=>nn(`/api/git/commit?repo=${encodeURIComponent(i)}&hash=${encodeURIComponent(r)}`,{timeoutMs:8e3});function p3(i,r){return new Promise((l,g)=>{const N=Fa(),R=new XMLHttpRequest;R.open("GET",`/api/download?path=${encodeURIComponent(i)}`),R.setRequestHeader("Authorization",`Bearer ${N??""}`),R.responseType="blob",R.onprogress=y=>{r&&y.lengthComputable&&r(y.loaded/y.total)},R.onerror=()=>g(new Error("download failed")),R.onload=()=>{if(R.status===401)return g(new ir);if(R.status<200||R.status>=300)return g(new Error(`download -> ${R.status}`));const y=i.split("/").pop()||"download";let a=R.response;const u=If(y);u&&a&&a.type!==u&&(a=a.slice(0,a.size,u));const m=URL.createObjectURL(a),b=document.createElement("a");b.href=m,b.download=y,document.body.appendChild(b),b.click(),b.remove(),setTimeout(()=>URL.revokeObjectURL(m),1e3),l()},R.send()})}function A1(i,r=null){return new Promise((l,g)=>{const N=Fa(),R=new XMLHttpRequest,y=r!=null?`&mtime=${encodeURIComponent(r)}`:"";R.open("GET",`/api/download?path=${encodeURIComponent(i)}${y}`),R.setRequestHeader("Authorization",`Bearer ${N??""}`),R.responseType="blob",R.onerror=()=>g(new Error(O("api.loadFailed"))),R.onload=()=>{if(R.status===304)return l({notModified:!0});if(R.status===401)return g(new ir);if(R.status<200||R.status>=300)return g(new Error(`image -> ${R.status}`));let a=R.response;const u=If(i.split("/").pop()||"");u&&a&&a.type!==u&&(a=a.slice(0,a.size,u));const m=Number(R.getResponseHeader("X-Mtime"));l({url:URL.createObjectURL(a),mtimeMs:Number.isFinite(m)?m:null})},R.send()})}const v3=(i,r,l="/")=>{if((i==null?void 0:i.kind)==="dynamic"){const g=l&&l.startsWith("/")?l:"/",N=new URL(g,`https://${encodeURIComponent(i.name)}.${r}/`);return N.searchParams.set("token",Fa()??""),N.toString()}return`/preview/${encodeURIComponent(i==null?void 0:i.name)}/?token=${encodeURIComponent(Fa()??"")}`},sf=(i,r={})=>{const l=r.port!=null?{name:i,port:r.port}:{name:i,dir:r.dir};return r.port!=null&&r.protocol&&(l.protocol=r.protocol),nn("/api/previews",{method:"POST",body:JSON.stringify(l)})},g3=()=>nn("/api/previews"),_3=i=>nn(`/api/previews/${encodeURIComponent(i)}`,{method:"DELETE"});class Sf extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function TC(i,r,l,g=!1,{signal:N}={}){return new Promise((R,y)=>{if(N!=null&&N.aborted)return y(new Sf);const a=Fa(),u=new FormData;u.append("dir",i),g&&u.append("stash","1"),u.append("file",r,r.name);const m=new XMLHttpRequest;m.open("POST","/api/upload"),m.setRequestHeader("Authorization",`Bearer ${a??""}`),m.upload.onprogress=w=>{l&&w.lengthComputable&&l(w.loaded/w.total,"sending")},m.upload.onload=()=>{l==null||l(1,"processing")};const b=()=>m.abort();N&&N.addEventListener("abort",b,{once:!0});const d=()=>{N&&N.removeEventListener("abort",b)};m.onabort=()=>{d(),y(new Sf)},m.onerror=()=>{d(),y(new Error(O("api.uploadFailed")))},m.onload=()=>{if(d(),m.status===401)return y(new ir);if(m.status>=200&&m.status<300)try{return R(JSON.parse(m.responseText))}catch{return R({})}const w={400:O("api.uploadBadDir"),409:O("api.uploadDuplicate"),413:O("api.uploadTooLarge"),415:O("api.uploadBadType")}[m.status]||O("api.uploadFailed");y(new Error(w))},m.send(u)})}async function M1({paneId:i,dir:r,windowId:l,api:g,getPanes:N}){const{id:R}=await g.splitPane(i,r);return{panes:await N(l),selectPaneId:R}}async function b3({paneId:i,windowId:r,viewedPaneId:l,api:g,getPanes:N,pickId:R}){await g.closePane(i);const y=await N(r),a=i===l&&y.length?R(y,null):null;return{panes:y,selectPaneId:a}}const y3=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Claude"><title>Claude</title><path fill="#d97757" d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/></svg>
205
+ `,w3=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Codex"><title>Codex (OpenAI)</title><path fill="#ededed" d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>
206
+ `,Cn={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function Dd(){return c.jsxDEV("svg",{...Cn,children:c.jsxDEV("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:14,columnNumber:5},this)}function x3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:24,columnNumber:7},this),c.jsxDEV("path",{d:"M12 10v6M9 13h6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:25,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:23,columnNumber:5},this)}function Cf(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:33,columnNumber:7},this),c.jsxDEV("circle",{cx:"12",cy:"12",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:34,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:32,columnNumber:5},this)}function LC(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:43,columnNumber:7},this),c.jsxDEV("path",{d:"M14 3v5h5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:44,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:42,columnNumber:5},this)}function N3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:53,columnNumber:7},this),c.jsxDEV("circle",{cx:"9",cy:"9",r:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:54,columnNumber:7},this),c.jsxDEV("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:55,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:52,columnNumber:5},this)}function iy(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M12 19V5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:64,columnNumber:7},this),c.jsxDEV("path",{d:"m5 12 7-7 7 7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:65,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:63,columnNumber:5},this)}function S3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("line",{x1:"2",x2:"5",y1:"12",y2:"12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:74,columnNumber:7},this),c.jsxDEV("line",{x1:"19",x2:"22",y1:"12",y2:"12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:75,columnNumber:7},this),c.jsxDEV("line",{x1:"12",x2:"12",y1:"2",y2:"5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:76,columnNumber:7},this),c.jsxDEV("line",{x1:"12",x2:"12",y1:"19",y2:"22"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:77,columnNumber:7},this),c.jsxDEV("circle",{cx:"12",cy:"12",r:"7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:73,columnNumber:5},this)}function za(){return c.jsxDEV("svg",{...Cn,children:c.jsxDEV("path",{d:"m6 9 6 6 6-6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:87,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:86,columnNumber:5},this)}function ry(){return c.jsxDEV("svg",{...Cn,children:c.jsxDEV("path",{d:"M12 5v14M5 12h14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:96,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:95,columnNumber:5},this)}function sy(){return c.jsxDEV("svg",{...Cn,children:c.jsxDEV("path",{d:"M20 6 9 17l-5-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:105,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:104,columnNumber:5},this)}function AC(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("circle",{cx:"12",cy:"12",r:"9"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:124,columnNumber:7},this),c.jsxDEV("path",{d:"M12 7v5l3 2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:125,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:123,columnNumber:5},this)}function C3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M9 18h6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:135,columnNumber:7},this),c.jsxDEV("path",{d:"M10 22h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:136,columnNumber:7},this),c.jsxDEV("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:137,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:134,columnNumber:5},this)}function E3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:146,columnNumber:7},this),c.jsxDEV("path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:147,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:145,columnNumber:5},this)}function j3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M12 3v12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:156,columnNumber:7},this),c.jsxDEV("path",{d:"m7 10 5 5 5-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:157,columnNumber:7},this),c.jsxDEV("path",{d:"M5 21h14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:158,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:155,columnNumber:5},this)}function MC(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:168,columnNumber:7},this),c.jsxDEV("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:169,columnNumber:7},this),c.jsxDEV("path",{d:"M12 18v-6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:170,columnNumber:7},this),c.jsxDEV("path",{d:"m9 15 3-3 3 3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:171,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:167,columnNumber:5},this)}function UC(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:180,columnNumber:7},this),c.jsxDEV("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:181,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:179,columnNumber:5},this)}function D3(){return c.jsxDEV("svg",{...Cn,children:c.jsxDEV("path",{d:"M7 5l12 7-12 7z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:190,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:189,columnNumber:5},this)}function k3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("line",{x1:"9",y1:"5",x2:"9",y2:"19"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:199,columnNumber:7},this),c.jsxDEV("line",{x1:"15",y1:"5",x2:"15",y2:"19"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:200,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:198,columnNumber:5},this)}function OC(){return c.jsxDEV("svg",{...Cn,children:c.jsxDEV("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:209,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:208,columnNumber:5},this)}function R3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"9",y:"3",width:"6",height:"11",rx:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:218,columnNumber:7},this),c.jsxDEV("path",{d:"M5 11a7 7 0 0 0 14 0"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:219,columnNumber:7},this),c.jsxDEV("line",{x1:"12",y1:"18",x2:"12",y2:"21"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:220,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:217,columnNumber:5},this)}function Ef(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:229,columnNumber:7},this),c.jsxDEV("path",{d:"M8 21h8M12 17v4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:230,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:228,columnNumber:5},this)}function T3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M12 14l4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:239,columnNumber:7},this),c.jsxDEV("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:240,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:238,columnNumber:5},this)}function L3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:249,columnNumber:7},this),c.jsxDEV("path",{d:"M12 18h.01"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:250,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:248,columnNumber:5},this)}function A3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:259,columnNumber:7},this),c.jsxDEV("path",{d:"M21 3v5h-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:260,columnNumber:7},this),c.jsxDEV("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:261,columnNumber:7},this),c.jsxDEV("path",{d:"M3 21v-5h5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:262,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:258,columnNumber:5},this)}function PC(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("line",{x1:"6",y1:"3",x2:"6",y2:"15"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:271,columnNumber:7},this),c.jsxDEV("circle",{cx:"18",cy:"6",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:272,columnNumber:7},this),c.jsxDEV("circle",{cx:"6",cy:"18",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:273,columnNumber:7},this),c.jsxDEV("path",{d:"M18 9a9 9 0 0 1-9 9"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:274,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:270,columnNumber:5},this)}function Va(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M18 6 6 18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:283,columnNumber:7},this),c.jsxDEV("path",{d:"m6 6 12 12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:284,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:282,columnNumber:5},this)}function M3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"m7 11 2-2-2-2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:302,columnNumber:7},this),c.jsxDEV("path",{d:"M11 13h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:303,columnNumber:7},this),c.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:304,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:301,columnNumber:5},this)}function U3({down:i=!1}){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"3",y:"9",width:"18",height:"11",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:326,columnNumber:7},this),c.jsxDEV("path",{d:"M7 13h.01M11 13h.01M15 13h.01M8 16.5h8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:327,columnNumber:7},this),i?c.jsxDEV("path",{d:"M9 4.5l3 3 3-3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:328,columnNumber:15},this):c.jsxDEV("path",{d:"M9 6.5l3-3 3 3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:328,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:325,columnNumber:5},this)}function U1(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:337,columnNumber:7},this),c.jsxDEV("path",{d:"M12 4v16"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:338,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:336,columnNumber:5},this)}function O1(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:347,columnNumber:7},this),c.jsxDEV("path",{d:"M3 12h18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:348,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:346,columnNumber:5},this)}function O3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:357,columnNumber:7},this),c.jsxDEV("path",{d:"M12 3v18M3 12h18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:358,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:356,columnNumber:5},this)}function VC(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"m18 5-2.4-2.4A2 2 0 0 0 14.2 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:369,columnNumber:7},this),c.jsxDEV("path",{d:"M21.4 12.6a1 1 0 0 0-3-3l-4 4a2 2 0 0 0-.5.9l-.8 2.9a.5.5 0 0 0 .6.6l2.9-.8a2 2 0 0 0 .8-.5z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:370,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:368,columnNumber:5},this)}function P3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("circle",{cx:"11",cy:"11",r:"8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:378,columnNumber:7},this),c.jsxDEV("path",{d:"m21 21-4.3-4.3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:379,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:377,columnNumber:5},this)}function V3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("circle",{cx:"12",cy:"12",r:"10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:387,columnNumber:7},this),c.jsxDEV("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:388,columnNumber:7},this),c.jsxDEV("path",{d:"M2 12h20"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:389,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:386,columnNumber:5},this)}function I3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"m3 17 2 2 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:397,columnNumber:7},this),c.jsxDEV("path",{d:"m3 7 2 2 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:398,columnNumber:7},this),c.jsxDEV("path",{d:"M13 6h8M13 12h8M13 18h8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:399,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:396,columnNumber:5},this)}function B3(){return c.jsxDEV("svg",{...Cn,children:c.jsxDEV("path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:407,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:406,columnNumber:5},this)}function F3(){return c.jsxDEV("svg",{...Cn,children:[c.jsxDEV("path",{d:"M12 8V4H8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:415,columnNumber:7},this),c.jsxDEV("rect",{x:"4",y:"8",width:"16",height:"12",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:416,columnNumber:7},this),c.jsxDEV("path",{d:"M2 14h2M20 14h2M15 13v2M9 13v2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:417,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:414,columnNumber:5},this)}function H3(){return c.jsxDEV("svg",{...Cn,children:c.jsxDEV("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:425,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:424,columnNumber:5},this)}const P1={claude:y3,codex:w3};function ol({agent:i}){const r=P1[i]?i:"claude";return c.jsxDEV("span",{className:"agent-mark",role:"img","aria-label":r,dangerouslySetInnerHTML:{__html:P1[r]}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:440,columnNumber:10},this)}const IC=i=>{if(i<=0)return O("time.expired");const r=Math.max(1,Math.round(i/6e4));return O("time.minutes",{n:r})};function BC(i,r=!0){const[l,g]=A.useState(()=>Date.now());return A.useEffect(()=>{if(!r||i==null)return;g(Date.now());const N=setInterval(()=>g(Date.now()),1e3);return()=>clearInterval(N)},[r,i]),i!=null?Math.max(0,i-l):0}const el=[],V1=i=>{var l,g,N;if(i.key!=="Escape"||i.repeat||i.isComposing)return;const r=el[el.length-1];r&&(i.preventDefault(),i.stopPropagation(),(l=i.stopImmediatePropagation)==null||l.call(i),(N=(g=r.callback).current)==null||N.call(g))};function ay(i,r){const l=A.useRef(r),g=A.useRef(null);l.current=r,g.current||(g.current={callback:l}),A.useEffect(()=>{if(!i)return;const N=g.current;return el.push(N),el.length===1&&window.addEventListener("keydown",V1,!0),()=>{const R=el.lastIndexOf(N);R>=0&&el.splice(R,1),el.length===0&&window.removeEventListener("keydown",V1,!0)}},[i])}let FC=1;const Ia=[];let I1=!1,kd=0;const z3=()=>{var r,l;if(kd>0){kd-=1;return}const i=Ia[Ia.length-1];i&&((l=(r=i.callback).current)==null||l.call(r))},HC=()=>{I1||(window.addEventListener("popstate",z3,!0),I1=!0)},zC=i=>{const r=Ia.lastIndexOf(i);r>=0&&Ia.splice(r,1),Ia.length===0&&(kd=0)};function Bf(i,r){const l=A.useRef(r),g=A.useRef(null);l.current=r,g.current||(g.current={id:FC++,callback:l}),ay(i,()=>window.history.back()),A.useEffect(()=>{if(!i)return;const N=g.current;return HC(),Ia.push(N),()=>zC(N)},[i])}function Ff(i){i<=0||(Ia.length>0&&(kd+=1),window.history.go(-i))}function Mn(i,r){const l=A.useRef(r),g=A.useRef(null);l.current=r,g.current||(g.current={id:FC++,callback:l}),ay(i,()=>window.history.back()),A.useEffect(()=>{if(!i)return;const N=g.current;return HC(),Ia.push(N),window.history.pushState({overlay:!0,overlayId:N.id},""),()=>{var R;zC(N),((R=window.history.state)==null?void 0:R.overlayId)===N.id&&(Ia.length>0&&(kd+=1),window.history.back())}},[i])}const X_=1280,B1=6;function $3({open:i,tabs:r,activeName:l,name:g,kind:N="static",domain:R=null,port:y,dir:a,expiresAt:u,initialPath:m="/",onSwitchTab:b,onCloseTab:d,onRenew:w,onStop:x,onMinimize:j}){const v=r&&r.length?r:g?[{name:g,kind:N,port:y,dir:a,expiresAt:u,path:m}]:[],o=v.find(W=>W.name===l)||v[0]||null,[p,f]=A.useState(!1),[_,E]=A.useState("mobile"),[T,S]=A.useState(1),[k,D]=A.useState({w:0,h:0}),L=A.useRef(null),U=A.useRef(null);A.useEffect(()=>{i||f(!1)},[i]),Mn(i&&p,()=>f(!1)),A.useEffect(()=>{_==="mobile"&&S(1)},[_]),A.useEffect(()=>{const W=U.current;if(!i||!W)return;const oe=()=>D({w:W.clientWidth,h:W.clientHeight});if(oe(),typeof ResizeObserver>"u")return;const de=new ResizeObserver(oe);return de.observe(W),()=>de.disconnect()},[i]);const F=BC(o==null?void 0:o.expiresAt,i),P=(o==null?void 0:o.kind)==="dynamic"?o.port!=null?`:${o.port}`:"":(o==null?void 0:o.dir)||"",I=W=>W.kind==="dynamic"?W.port!=null?`:${W.port}`:W.name:W.dir?W.dir.split("/").filter(Boolean).pop():O("preview.static"),G=_==="pc"&&k.w>0,ie=k.w>0?k.w/X_:1,q=k.h>0?k.h/ie:0,J=ie*T,X=G?{width:`${X_*J}px`,height:`${q*J}px`}:void 0,V=G?{width:`${X_}px`,height:`${q}px`,transform:`scale(${J})`,transformOrigin:"0 0"}:void 0,H=W=>S(oe=>Math.min(B1,Math.max(1,+(oe+W).toFixed(2)))),K=()=>{const W=L.current;if(W)try{W.contentWindow.location.reload()}catch{W.src=W.src}};return hl.createPortal(c.jsxDEV("div",{className:`file-sheet ${i?"open":""}`,"aria-hidden":!i,children:[c.jsxDEV("div",{className:"file-tabs preview-head",children:[c.jsxDEV("span",{className:"preview-status",children:[c.jsxDEV(Ef,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:81,columnNumber:11},this),c.jsxDEV("span",{className:"preview-state",children:(o==null?void 0:o.kind)==="dynamic"?O("preview.dynamic"):O("preview.static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:82,columnNumber:11},this),(o==null?void 0:o.name)&&c.jsxDEV("span",{className:"preview-name",title:`${o.name}${P?" "+P:""}`,children:[o.name,P&&c.jsxDEV("span",{className:"preview-detail",children:P},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:85,columnNumber:39},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:84,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:80,columnNumber:9},this),c.jsxDEV("button",{className:"preview-remain",title:O("preview.remainTitle"),"aria-haspopup":"dialog","aria-expanded":p,onClick:()=>f(W=>!W),children:IC(F)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:89,columnNumber:9},this),c.jsxDEV("button",{className:"preview-iconbtn",onClick:()=>E(W=>W==="mobile"?"pc":"mobile"),"aria-label":O(_==="mobile"?"preview.toPcView":"preview.toMobileView"),title:O(_==="mobile"?"preview.pcView":"preview.mobileView"),"aria-pressed":_==="pc",children:_==="mobile"?c.jsxDEV(Ef,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:94,columnNumber:34},this):c.jsxDEV(L3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:94,columnNumber:52},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:91,columnNumber:9},this),c.jsxDEV("button",{className:"preview-iconbtn",onClick:K,"aria-label":O("preview.refresh"),title:O("preview.refresh"),children:c.jsxDEV(A3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:96,columnNumber:126},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:96,columnNumber:9},this),c.jsxDEV("button",{className:"file-min","aria-label":O("preview.minimize"),title:O("preview.minimize"),onClick:j,children:c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:97,columnNumber:124},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:97,columnNumber:9},this),p&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"preview-pop-backdrop",onClick:()=>f(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:100,columnNumber:13},this),c.jsxDEV("div",{className:"preview-pop",role:"dialog","aria-label":O("preview.ttlDialog"),children:[c.jsxDEV("button",{className:"preview-pop-item",onClick:()=>{f(!1),w==null||w()},children:O("preview.renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:102,columnNumber:15},this),c.jsxDEV("button",{className:"preview-pop-item preview-pop-danger",onClick:()=>{f(!1),x==null||x()},children:O("preview.stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:103,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:99,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:79,columnNumber:7},this),v.length>1&&c.jsxDEV("div",{className:"preview-tabs",role:"tablist","aria-label":O("preview.tabs"),children:v.map(W=>{const oe=o&&W.name===o.name;return c.jsxDEV("span",{className:`preview-tab ${oe?"active":""}`,children:[c.jsxDEV("button",{className:"preview-tab-btn",role:"tab","aria-selected":oe,title:W.name,onClick:()=>b==null?void 0:b(W.name),children:I(W)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:114,columnNumber:17},this),c.jsxDEV("button",{className:"preview-tab-close","aria-label":O("preview.stop"),title:O("preview.stop"),onClick:()=>d==null?void 0:d(W.name),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:116,columnNumber:17},this)]},W.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:113,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:109,columnNumber:9},this),c.jsxDEV("div",{className:`file-body preview-body ${G?"pc":""}`,ref:U,children:v.map(W=>{const oe=o&&W.name===o.name,de=Se=>{oe&&(L.current=Se)},xe=v3({name:W.name,kind:W.kind},R,W.path||"/");return c.jsxDEV("div",{className:"preview-pane",style:oe?void 0:{display:"none"},children:oe&&G?c.jsxDEV("div",{className:"preview-scaler",style:X,children:c.jsxDEV("iframe",{ref:de,className:"preview-frame",title:O("preview.iframeTitle"),style:V,src:xe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:134,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:133,columnNumber:17},this):c.jsxDEV("iframe",{ref:de,className:"preview-frame",title:O("preview.iframeTitle"),src:xe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:137,columnNumber:17},this)},W.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:131,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:123,columnNumber:7},this),G&&c.jsxDEV("div",{className:"preview-zoom",children:[c.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>H(-.5),disabled:T<=1,"aria-label":O("preview.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:145,columnNumber:11},this),c.jsxDEV("span",{className:"preview-zoom-val","aria-hidden":"true",children:[Math.round(T*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:146,columnNumber:11},this),c.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>H(.5),disabled:T>=B1,"aria-label":O("preview.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:147,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:144,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:78,columnNumber:5},this),document.body)}const W3={working:"working",compacting:"working",done:"done",idle:"done",permission:"needs"},yb={needs:3,done:2,working:1},G3={working:O("inbox.view.working"),done:O("inbox.view.done"),needs:O("inbox.view.needs")};function Y3(i,r={},l=0){const g=[];for(const[N,R]of Object.entries(i)){const y=W3[R.kind];if(!y)continue;const a=R.ts||0;y==="done"&&!(a>Math.max(l||0,r[N]||0))||g.push({pane:N,session:R.session,window:R.window,windowName:R.windowName,view:y,msg:R.msg||"",ts:a,agent:R.agent||"claude"})}return g.sort((N,R)=>N.session<R.session?-1:N.session>R.session?1:yb[R.view]-yb[N.view]||R.ts-N.ts),g}function q3(i){const r={working:0,done:0,needs:0};for(const l of i)r[l.view]!=null&&(r[l.view]+=1);return r}function K3(i){let r=null,l=0;for(const g of i){const N=yb[g.view]||0;N>l&&(l=N,r=g.view)}return r}function F1(i){let r=0;for(const l of Object.values(i))(l.ts||0)>r&&(r=l.ts);return r}function $C(i,r){if(!i)return"";const l=Math.max(0,Math.round((r-i)/1e3));if(l<60)return O("time.secAgo",{n:l});const g=Math.round(l/60);if(g<60)return O("time.minAgo",{n:g});const N=Math.round(g/60);return N<24?O("time.hourAgo",{n:N}):O("time.dayAgo",{n:Math.round(N/24)})}function J_(i,r,l){const g=i.findIndex(N=>N.id===r);return g<0?null:i[l==="left"?g-1:g+1]??null}const WC="tw_notify",Rd=1e4,oy=2e4,jf=()=>localStorage.getItem(WC)==="1",wb=i=>localStorage.setItem(WC,i?"1":"0");function Sc(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window&&"Notification"in window}function GC(){var i;return typeof window<"u"&&(((i=window.matchMedia)==null?void 0:i.call(window,"(display-mode: standalone)").matches)||window.navigator.standalone===!0)||!1}const X3=()=>/iP(hone|ad|od)/.test(navigator.userAgent||"");function ll(i={}){return{Authorization:`Bearer ${Fa()??""}`,...i}}function xb(i){const r=new Error(O(i));return r.code=i,r}function Z_(i,r){const l=new Error(O(i,r));return l.code=i,l}function rl(i,r,l){let g;return Promise.race([Promise.resolve(i),new Promise((N,R)=>{g=setTimeout(()=>R(xb(l)),r)})]).finally(()=>clearTimeout(g))}async function cl(i,r,l){const g=new AbortController;let N,R=!1;try{return await Promise.race([fetch(i,{...r,signal:g.signal}),new Promise((y,a)=>{N=setTimeout(()=>{R=!0,g.abort(),a(xb(l))},Rd)})])}catch(y){throw R?xb(l):y}finally{clearTimeout(N)}}const Pd=()=>rl(navigator.serviceWorker.ready,Rd,"push.swTimeout"),Hf=i=>rl(i.pushManager.getSubscription(),oy,"push.browserTimeout");function J3(i){const r="=".repeat((4-i.length%4)%4),l=(i+r).replace(/-/g,"+").replace(/_/g,"/"),g=atob(l),N=new Uint8Array(g.length);for(let R=0;R<g.length;R+=1)N[R]=g.charCodeAt(R);return N}async function Z3(){if(!Sc())throw new Error(O("push.unsupported"));if(X3()&&!GC())throw new Error(O("push.iosAddToHome"));if(await rl(Notification.requestPermission(),Rd,"push.permissionTimeout")!=="granted")throw new Error(O("push.permissionDenied"));try{await rl(navigator.serviceWorker.register("/sw.js"),Rd,"push.swRegisterTimeout")}catch(y){throw(y==null?void 0:y.code)==="push.swRegisterTimeout"?y:Z_("push.swRegisterFailed",{reason:(y==null?void 0:y.message)||O("push.unknownReason")})}const r=await Pd(),l=await cl("/api/push/vapid",{headers:ll(),cache:"no-store"},"push.configTimeout");if(!l.ok)throw new Error(O("push.noVapid"));const{key:g}=await l.json();let N=await Hf(r);N||(N=await rl(r.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:J3(g)}),oy,"push.browserTimeout"));const R=await cl("/api/push/subscribe",{method:"POST",headers:ll({"Content-Type":"application/json"}),body:JSON.stringify({subscription:N,boundSessions:ha()})},"push.reportTimeout");if(!R.ok){if(R.status===410){try{await N.unsubscribe()}catch{}throw wb(!1),Z_("push.subscriptionExpired")}throw R.status===502?Z_("push.deliveryRejected"):new Error(O("push.subscribeFailed"))}return wb(!0),!0}async function Q3(){wb(!1),(async()=>{try{const i=await Pd(),r=await Hf(i);if(!r)return;await Promise.allSettled([cl("/api/push/unsubscribe",{method:"POST",headers:ll({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:r.endpoint})},"push.reportTimeout"),rl(Promise.resolve().then(()=>r.unsubscribe()),oy,"push.browserTimeout")])}catch{}})()}async function fc(){if(!(!jf()||!Sc()))try{const i=await Pd(),r=await Hf(i);if(!r)return;await cl("/api/push/bound",{method:"POST",headers:ll({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:r.endpoint,boundSessions:ha()})},"push.reportTimeout")}catch{}}async function ly(i){if(!Sc())return null;try{const r=await Pd(),l=await Hf(r);if(!l)return null;const g=await cl("/api/push/key",{method:"POST",headers:ll({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:l.endpoint})},"push.configTimeout");if(g.status===401)throw new ir;if(!g.ok){if(i){const N=new Error("push key lookup failed");throw N.status=g.status,N}return null}return(await g.json()).pushKey||null}catch(r){if(i)throw r;return null}}const e2=()=>ly(!1);async function t2(i){if(Sc())try{const r=await Pd();(await rl(r.getNotifications({tag:`pane-${i}`}),Rd,"push.swTimeout")).forEach(g=>g.close())}catch{}}async function n2(){if(!jf())return[];const i=await ly(!0);if(!i)return[];const r=await cl(`/api/notifications?device=${encodeURIComponent(i)}`,{headers:ll(),cache:"no-store"},"push.configTimeout");if(r.status===401)throw new ir;if(!r.ok){const l=new Error("notification inbox load failed");throw l.status=r.status,l}return(await r.json()).items||[]}async function i2(i){const r=await ly(!0);if(!r)throw new Error("notification device unavailable");const l=await cl(`/api/notifications/${encodeURIComponent(i)}?device=${encodeURIComponent(r)}`,{method:"DELETE",headers:ll()},"push.reportTimeout");if(l.status===401)throw new ir;if(!l.ok||(await l.json()).ok!==!0)throw new Error("notification delete failed");return!0}function r2(i){if(typeof i!="string")return null;const r=i.trim();if(!r)return null;try{const l=new URL(r,window.location.origin);return l.protocol!=="http:"&&l.protocol!=="https:"?null:r}catch{return null}}function H1(i){const r=Math.max(0,Date.now()-i),l=Math.floor(r/6e4);if(l<1)return O("pushInbox.justNow");if(l<60)return O("pushInbox.minutesAgo").replace("{n}",l);const g=Math.floor(l/60);return g<24?O("pushInbox.hoursAgo").replace("{n}",g):new Date(i).toLocaleDateString()}const s2={expired:"pushInbox.deliveryReasonExpired",rate_limited:"pushInbox.deliveryReasonRateLimited",service_unavailable:"pushInbox.deliveryReasonUnavailable",rejected:"pushInbox.deliveryReasonRejected",network_error:"pushInbox.deliveryReasonNetwork",not_configured:"pushInbox.deliveryReasonNotConfigured"};function Q_(i,r=!1){if((i==null?void 0:i.status)==="pending")return O("pushInbox.deliveryPending");if((i==null?void 0:i.status)==="success")return O("pushInbox.deliverySuccess");if((i==null?void 0:i.status)==="failed"){if(!r)return O("pushInbox.deliveryFailed");const l=O(s2[i.reason]||"pushInbox.deliveryReasonUnknown");return`${O("pushInbox.deliveryFailed")} · ${l}`}return""}function a2({open:i,detailId:r,items:l,readIds:g=[],onOpenDetail:N,onCloseDetail:R,onClose:y,onDelete:a,deletingId:u=null,error:m="",onRetry:b,onMarkAllRead:d,unreadCount:w=0}){const x=new Set(g),j=r!=null,v=j?l.find(_=>_.id===r):null,o=r2(v==null?void 0:v.url),p=Q_(v==null?void 0:v.delivery,!0),f=l.some(_=>!x.has(_.id));return hl.createPortal(c.jsxDEV("div",{className:`file-sheet push-inbox-sheet ${i?"open":""}`,"aria-hidden":!i,role:"dialog","aria-label":O("pushInbox.title"),children:[c.jsxDEV("div",{className:"file-tabs push-inbox-head",children:[j?c.jsxDEV("div",{className:"push-inbox-drill-head",children:[c.jsxDEV("button",{className:"push-inbox-back","aria-label":O("pushInbox.back"),title:O("pushInbox.back"),onClick:R,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:57,columnNumber:13},this),c.jsxDEV("span",{className:"push-inbox-head-title",children:O("pushInbox.detailTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:58,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:56,columnNumber:11},this):c.jsxDEV("span",{className:"push-inbox-head-title push-inbox-list-title",children:[O("pushInbox.title"),w>0&&c.jsxDEV("span",{className:"push-inbox-unread-count",children:O("pushInbox.unreadCount").replace("{n}",w)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:63,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:61,columnNumber:11},this),!j&&f&&c.jsxDEV("button",{className:"push-inbox-markall",onClick:d,children:O("pushInbox.markAllRead")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:67,columnNumber:11},this),c.jsxDEV("button",{className:"file-min","aria-label":O("common.close"),title:O("common.close"),onClick:y,children:c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:69,columnNumber:113},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:54,columnNumber:7},this),c.jsxDEV("div",{className:"push-inbox-body",children:[m&&c.jsxDEV("div",{className:"push-inbox-error",role:"alert",children:[c.jsxDEV("span",{children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:75,columnNumber:13},this),c.jsxDEV("button",{type:"button",onClick:b,children:O("pushInbox.retry")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:76,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:74,columnNumber:11},this),j?v?c.jsxDEV("div",{className:"push-inbox-detail",children:[c.jsxDEV("div",{className:"push-inbox-detail-title",children:v.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:82,columnNumber:15},this),c.jsxDEV("div",{className:"push-inbox-detail-time",children:H1(v.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:83,columnNumber:15},this),p&&c.jsxDEV("div",{className:`push-inbox-delivery detail ${v.delivery.status}`,children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:84,columnNumber:34},this),c.jsxDEV("div",{className:"push-inbox-detail-text",children:v.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:85,columnNumber:15},this),o&&c.jsxDEV("a",{className:"fontbtn push-inbox-openurl",href:o,children:O("pushInbox.openUrl")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:86,columnNumber:29},this),c.jsxDEV("button",{className:"fontbtn push-inbox-detail-del",disabled:u!=null,onClick:async()=>{await a(v.id)&&R()},children:O("pushInbox.delete")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:87,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:81,columnNumber:13},this):c.jsxDEV("p",{className:"push-inbox-empty",children:O("pushInbox.expired")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:93,columnNumber:13},this):l.length===0&&!m?c.jsxDEV("p",{className:"push-inbox-empty",children:O("pushInbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:96,columnNumber:11},this):l.length>0?c.jsxDEV("ul",{className:"push-inbox-list",children:l.map(_=>c.jsxDEV("li",{className:`push-inbox-row${x.has(_.id)?"":" push-inbox-unread"}`,children:[c.jsxDEV("button",{className:"push-inbox-main",onClick:()=>N(_.id),children:[c.jsxDEV("div",{className:"push-inbox-row-top",children:[c.jsxDEV("span",{className:"push-inbox-row-title",children:_.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:103,columnNumber:21},this),Q_(_.delivery)&&c.jsxDEV("span",{className:`push-inbox-delivery ${_.delivery.status}`,children:Q_(_.delivery)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:105,columnNumber:23},this),c.jsxDEV("span",{className:"push-inbox-row-time",children:H1(_.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:107,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:102,columnNumber:19},this),c.jsxDEV("div",{className:"push-inbox-row-body",children:_.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:109,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:101,columnNumber:17},this),c.jsxDEV("button",{className:"push-inbox-del",disabled:u!=null,onClick:()=>a(_.id),"aria-label":O("pushInbox.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:111,columnNumber:17},this)]},_.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:100,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:98,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:72,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:52,columnNumber:5},this),document.body)}const Nb="\\s'\"`()\\[\\]<>,;,。、;:!?()【】《》「」“”‘’*…:│",o2=["md","markdown","html","htm","txt","log","sh"],l2=["png","jpg","jpeg","jfif","gif","webp","svg","bmp","ico","avif","apng"],c2=[...o2,...l2].join("|"),z1=new RegExp(`[^${Nb}]+\\.(?:${c2})(?=$|[${Nb}.])`,"gi");function u2(i){const r=[];if(!i)return r;z1.lastIndex=0;let l;for(;(l=z1.exec(i))!==null;){let g=l.index,N=l[0];const R=/^@+/.exec(N);R&&(g+=R[0].length,N=N.slice(R[0].length)),N&&r.push({start:g,end:g+N.length,path:N})}return r}const YC=i=>typeof i=="string"&&i.startsWith("/");function tl(i,r){const l=YC(r)?r:`${i.replace(/\/+$/,"")}/${r}`,g=l.startsWith("/"),N=[];for(const R of l.split("/"))if(!(!R||R===".")){if(R===".."){N.pop();continue}N.push(R)}return(g?"/":"")+N.join("/")}const d2={key:"home",type:"home",name:O("doc.home")},qC=(i,r)=>({...i,type:r.type??i.type,name:r.name??i.name,content:r.content!==void 0?r.content:i.content,mtime:r.mtime!==void 0?r.mtime:i.mtime});function h2(i,r,l){if(i.tabs.some(N=>N.key===r))return{tabs:i.tabs.map(N=>N.key===r?qC(N,l):N),active:r};const g={key:r,type:l.type,name:l.name,content:l.content,mtime:l.mtime,path:r};return{tabs:[...i.tabs,g],active:r}}function m2(i,r,l){return i.tabs.some(g=>g.key===r)?{...i,tabs:i.tabs.map(g=>g.key===r?qC(g,l):g)}:i}function f2(i,r){const l=i.tabs.findIndex(R=>R.key===r);if(l<=0)return i;const g=i.tabs.filter(R=>R.key!==r),N=i.active===r?i.tabs[l-1].key:i.active;return{tabs:g,active:N}}function p2(){const[i,r]=A.useState({tabs:[d2],active:"home"}),l=A.useCallback((y,a)=>r(u=>h2(u,y,a)),[]),g=A.useCallback((y,a)=>r(u=>m2(u,y,a)),[]),N=A.useCallback(y=>r(a=>f2(a,y)),[]),R=A.useCallback(y=>r(a=>({...a,active:y})),[]);return{tabs:i.tabs,active:i.active,openDoc:l,refreshDoc:g,closeTab:N,activate:R}}function $1(i){return String(i||"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|-+$/g,"").toLowerCase()}function v2({session:i,windowName:r,windowId:l}){const g=[i,r].map($1).filter(Boolean);return g.push($1(l)||"w"),g.join("-")}function g2(i){var q,J,X,V,H,K;const[r,l]=A.useState([]),[g,N]=A.useState(null),[R,y]=A.useState(!1),[a,u]=A.useState(!1),[m,b]=A.useState(null),[d,w]=A.useState({}),x=A.useCallback(async()=>{try{const W=await g3();l(W.previews||[]),N(W.domain??null),y(!!W.dynamicEnabled)}catch{}},[]);A.useEffect(()=>{x()},[x]);const j=i?v2({session:(q=i.session)==null?void 0:q.name,windowName:(J=i.window)==null?void 0:J.name,windowId:(X=i.window)==null?void 0:X.id}):null,v=r.find(W=>W.name===j&&W.expiresAt>Date.now())||null,o=(v==null?void 0:v.expiresAt)??null,p=W=>!!j&&(W===j||W.startsWith(`${j}-`)),f=Date.now(),_=r.filter(W=>W&&W.expiresAt>f&&p(W.name)).map(W=>({name:W.name,kind:W.kind,port:W.port,protocol:W.protocol,dir:W.dir,expiresAt:W.expiresAt,path:d[W.name]||"/"})).sort((W,oe)=>W.name===j?-1:oe.name===j?1:(W.port||0)-(oe.port||0)),E=((V=_.find(W=>W.name===m))==null?void 0:V.name)??((H=_[0])==null?void 0:H.name)??null,T=_.find(W=>W.name===E)??null,S=(T==null?void 0:T.path)||"/";A.useEffect(()=>{b(null)},[j]);const k=_.length>0;A.useEffect(()=>{k||u(!1)},[k]),A.useEffect(()=>{if(o==null)return;const W=setTimeout(x,Math.max(0,o-Date.now())+500);return()=>clearTimeout(W)},[o,x]);const D=A.useCallback(()=>{b(j),u(!0)},[j]),L=A.useCallback(async W=>{var oe;if(j)try{await sf(j,{dir:W}),rU((oe=i==null?void 0:i.window)==null?void 0:oe.id,W),w(de=>({...de,[j]:"/"})),await x(),D()}catch{}},[j,(K=i==null?void 0:i.window)==null?void 0:K.id,x,D]),U=A.useCallback(async W=>{j&&(await sf(j,{port:W}),w(oe=>({...oe,[j]:"/"})),b(j),await x(),u(!0))},[j,x]),F=A.useCallback(async({protocol:W="http",port:oe,path:de})=>{if(!j)return;const xe=`${j}-${oe}`;await sf(xe,{port:oe,protocol:W}),w(Se=>({...Se,[xe]:de||"/"})),b(xe),await x(),u(!0)},[j,x]),P=A.useCallback(W=>b(W),[]),I=A.useCallback(async W=>{if(W)try{await _3(W),w(oe=>{const de={...oe};return delete de[W],de}),m===W&&b(null),await x()}catch{}},[m,x]),G=A.useCallback(()=>I(E),[I,E]),ie=A.useCallback(async()=>{const W=_.find(de=>de.name===E);if(!W)return;const oe=W.kind==="dynamic"?{port:W.port,protocol:W.protocol||"http"}:{dir:W.dir};try{await sf(W.name,oe),await x()}catch{}},[_,E,x]);return{previews:r,previewDomain:g,dynamicEnabled:R,previewSheetOpen:a,setPreviewSheetOpen:u,activePreview:v,curPreviewName:j,tabs:_,activeName:E,shownPreview:T,shownPath:S,refreshPreviews:x,openPreviewSheet:D,startPreview:L,startDynamicPreview:U,startUrlPreview:F,switchTab:P,closeTab:I,stopPreview:G,renewPreview:ie}}function KC(i,{port:r}={}){const l=(i==null?void 0:i.serverError)||(i==null?void 0:i.message)||"";return l==="port not listening"?O("localurl.notListening",{port:r??"?"}):l==="bad port"?O("settings.err_bad_port"):l==="dynamic disabled"||l==="previews disabled"?O("localurl.disabled"):l==="bad protocol"?O("localurl.badProtocol"):(i==null?void 0:i.name)==="TypeError"||/(?:timeout|failed to fetch|network)/i.test(l)?O("localurl.network"):l?O("localurl.failed",{reason:l}):O("settings.err_start_failed")}function ff({fetch:i,apply:r,intervalMs:l,enabled:g=!0,deps:N=[]}){const R=A.useRef(i),y=A.useRef(r);R.current=i,y.current=r,A.useEffect(()=>{if(!g)return;let a=!1,u=null;const m=async()=>{if(!document.hidden)try{const w=await R.current();a||y.current(w)}catch{}},b=()=>{m(),u=setTimeout(b,l)};b();const d=()=>{document.hidden||(clearTimeout(u),b())};return document.addEventListener("visibilitychange",d),()=>{a=!0,clearTimeout(u),document.removeEventListener("visibilitychange",d)}},[g,l,...N])}const W1={type:"key",key:"C-c",label:"Ctrl+C"},zf={command:[{...W1}],chat:[{...W1},{type:"key",key:"Escape",label:"Esc"},{type:"key",key:"Tab",label:"Tab"},{type:"key",key:"BSpace",label:"⌫"},{type:"text",text:"ok",enter:!0},{type:"text",text:"go on",enter:!0},{type:"text",text:"1",enter:!0},{type:"text",text:"2",enter:!0},{type:"text",text:"3",enter:!0},{type:"text",text:"/compact",enter:!0},{type:"text",text:"/clear",enter:!0},{type:"text",text:"/model",enter:!0}]};function gn(i){return i.type==="key"||i.kind==="key"?`key:${i.key||i.text}`:`text:${i.text}:${i.enter?"enter":"no-enter"}`}function _2(i,r){return i.type==="key"?{kind:"key",text:i.key,label:i.label||i.key,source:"config"}:{kind:r==="chat"&&!i.text.startsWith("/")?"reply":"cmd",text:i.text,enter:!!i.enter,source:"config"}}function sl(i,r,l){const g=(Array.isArray(i)?i:[]).map(y=>_2(y,l)),N=new Set(g.map(gn)),R=(Array.isArray(r)?r:[]).filter(y=>!N.has(gn(y))).map(y=>({...y,source:"local"}));return[...g,...R]}function b2(i){return i&&Array.isArray(i.command)&&Array.isArray(i.chat)}function y2({enabled:i=!0}={}){const[r,l]=A.useState(null),g=A.useRef(!1),N=A.useRef(!1),R=A.useRef(!0),y=A.useRef(i),a=A.useRef(0);A.useLayoutEffect(()=>(R.current=!0,()=>{R.current=!1}),[]),A.useLayoutEffect(()=>{y.current!==i&&(y.current=i,a.current+=1)},[i]);const u=A.useCallback(()=>{if(!R.current||!y.current||N.current)return;N.current=!0;const m=a.current;let b;try{b=i3()}catch{N.current=!1;return}Promise.resolve(b).then(d=>{!R.current||!y.current||a.current!==m||!d||typeof d!="object"||l({...d,shortcuts:b2(d.shortcuts)?d.shortcuts:zf})}).catch(()=>{}).finally(()=>{N.current=!1})},[]);return A.useEffect(()=>{!i||g.current||(g.current=!0,u())},[i,u]),A.useEffect(()=>{if(!i)return;const m=()=>{document.hidden||u()};return document.addEventListener("visibilitychange",m),()=>{document.removeEventListener("visibilitychange",m)}},[i,u]),r}function w2(i,r){return i instanceof ir?(r==null||r(),!0):!1}function x2(i,{ignored:r=!1,autoShown:l=!1,liveSessionCount:g=0}={}){return!i||!i.promptEligible||r===!0||i.resolved||i.pendingCount<1?"none":g===0&&l!==!0?"auto-dialog":"card"}function XC(i){return(i==null?void 0:i.changeReason)==="boot-changed"?"workspace.bootDetected":"workspace.tmuxDetected"}function JC(i){const r=Date.parse(i);if(!Number.isFinite(r))return O("workspace.unknownTime");try{return new Intl.DateTimeFormat(go(),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(r))}catch{return new Date(r).toLocaleString()}}function N2({plan:i,operation:r=null,onOpen:l}){var N;if(!i)return null;const g=(r==null?void 0:r.status)==="partial"?(r.results||[]).filter(R=>R.status==="failed").length:0;return c.jsxDEV("button",{type:"button",className:"workspace-recovery-card",onClick:l,children:[c.jsxDEV("strong",{children:O(XC(i))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:23,columnNumber:7},this),c.jsxDEV("span",{children:O("workspace.summary",{sessions:((N=i.summary)==null?void 0:N.sessions)??0,time:JC(i.capturedAt)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:24,columnNumber:7},this),g>0&&c.jsxDEV("span",{className:"workspace-recovery-partial",children:O("workspace.partialCard",{failures:g})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:28,columnNumber:24},this),c.jsxDEV("span",{className:"workspace-recovery-action",children:O("workspace.restoreLast")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:22,columnNumber:5},this)}function S2({open:i,currentSessionName:r,bound:l,onSelectSession:g,onUnbind:N,onBind:R,onClose:y,onLogout:a,orphans:u=[],onTakeoverRequest:m,recoveryPlan:b=null,recoveryOperation:d=null,onOpenRecovery:w}){const[x,j]=A.useState(!1);return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:`drawer ${i?"open":""}`,children:[c.jsxDEV("div",{className:"drawer-list",children:[c.jsxDEV("div",{className:"drawer-title",children:"SESSIONS"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:21,columnNumber:11},this),l.length===0&&c.jsxDEV("div",{className:"drawer-empty",children:O("drawer.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:22,columnNumber:34},this),l.map(v=>c.jsxDEV("div",{className:`drawer-row drawer-session ${v===r?"active":""}`,children:[c.jsxDEV("span",{className:"drawer-name",onClick:()=>g(v),children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:28,columnNumber:15},this),c.jsxDEV("button",{className:"drawer-unbind",onClick:o=>{o.stopPropagation(),N(v)},"aria-label":O("drawer.unbind"),title:O("drawer.unbind"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:29,columnNumber:15},this)]},v,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:24,columnNumber:13},this)),c.jsxDEV("button",{className:"drawer-bind",onClick:R,children:["+ ",O("drawer.bind")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:37,columnNumber:11},this),u.length>0&&c.jsxDEV("div",{className:"drawer-orphans",children:[c.jsxDEV("button",{className:"drawer-orphans-head",onClick:()=>j(v=>!v),children:[c.jsxDEV("span",{children:O("drawer.orphans.title",{n:u.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:42,columnNumber:17},this),c.jsxDEV("span",{className:"drawer-orphans-caret","aria-hidden":"true",children:x?"▾":"▸"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:43,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:41,columnNumber:15},this),x&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"drawer-orphans-hint",children:O("drawer.orphans.hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:47,columnNumber:19},this),u.map(v=>{const o=!v.sessionId,p=v.state==="busy"||o;return c.jsxDEV("div",{className:"drawer-orphan-row",children:[c.jsxDEV("div",{className:"drawer-orphan-head",children:[c.jsxDEV("span",{className:"drawer-orphan-cwd",title:v.cwd,children:v.cwdLabel||v.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:54,columnNumber:27},this),c.jsxDEV("button",{className:"drawer-orphan-btn",disabled:p,title:o?O("inbox.orphans.noSession"):void 0,onClick:()=>m==null?void 0:m(v),children:O("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:55,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:53,columnNumber:25},this),c.jsxDEV("div",{className:"drawer-orphan-meta",children:[v.agentLabel&&c.jsxDEV("span",{className:"drawer-orphan-agent",children:v.agentLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:65,columnNumber:44},this),c.jsxDEV("span",{className:`drawer-orphan-state ${v.state==="busy"?"busy":"idle"}`,children:v.state==="busy"?O("inbox.orphans.busy"):O("inbox.orphans.idle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:66,columnNumber:27},this),c.jsxDEV("span",{className:"drawer-orphan-time",children:$C(v.startedAt||v.lastActivity,Date.now())},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:69,columnNumber:27},this),v.snippet&&c.jsxDEV("span",{className:"drawer-orphan-msg",children:v.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:70,columnNumber:41},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:64,columnNumber:25},this)]},v.pid,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:52,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:46,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:40,columnNumber:13},this),b&&c.jsxDEV(N2,{plan:b,operation:d,onOpen:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:80,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:20,columnNumber:9},this),c.jsxDEV("button",{className:"drawer-logout",onClick:a,children:O("drawer.logout")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:83,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:19,columnNumber:7},this),i&&c.jsxDEV("div",{className:"drawer-backdrop",onClick:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:85,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:18,columnNumber:5},this)}const C2=500,G1=10;function $f(i,{onClick:r}={}){const l=A.useRef(null),g=A.useRef(null),N=A.useRef(!1),R=()=>{l.current&&(clearTimeout(l.current),l.current=null)};return{onPointerDown:y=>{N.current=!1,g.current={x:y.clientX,y:y.clientY},R(),l.current=setTimeout(()=>{l.current=null,N.current=!0,i==null||i()},C2)},onPointerMove:y=>{!l.current||!g.current||(Math.abs(y.clientX-g.current.x)>G1||Math.abs(y.clientY-g.current.y)>G1)&&R()},onPointerUp:R,onPointerLeave:R,onPointerCancel:R,onClick:y=>{var a,u;if(N.current){N.current=!1,(a=y.preventDefault)==null||a.call(y),(u=y.stopPropagation)==null||u.call(y);return}r==null||r(y)}}}const Sb=248,Cb=158,Df=6,Y1=2,E2=52,j2=34,af=i=>typeof i=="number"&&Number.isFinite(i);function Eb(i){return Array.isArray(i)&&i.length>0&&i.every(r=>af(r.left)&&af(r.top)&&af(r.width)&&af(r.height))}const q1=i=>[...new Set(i)].sort((r,l)=>r-l);function K1(i,r,l){const g=[];for(let u=0;u<i.length-1;u+=1){const m=i[u],b=i[u+1],d=r.some(([w,x])=>w===m&&x===b);g.push(b-m<=1&&!d)}const N=g.filter(u=>!u).length,R=N>0?(l-g.filter(Boolean).length*Y1)/N:l,y=[{at:0}];let a=0;for(let u=0;u<g.length;u+=1)a+=g[u]?Y1:R,y.push({at:a});return y}function D2(i){if(!Eb(i))return null;const r=Math.max(...i.map(b=>b.left+b.width)),l=Math.max(...i.map(b=>b.top+b.height));if(r<=0||l<=0)return null;const g=q1(i.flatMap(b=>[b.left,b.left+b.width])),N=q1(i.flatMap(b=>[b.top,b.top+b.height])),R=i.map(b=>[b.left,b.left+b.width]),y=i.map(b=>[b.top,b.top+b.height]),a=K1(g,R,Sb-Df*2),u=K1(N,y,Cb-Df*2),m=i.map((b,d)=>{const w=a[g.indexOf(b.left)].at,x=a[g.indexOf(b.left+b.width)].at,j=u[N.indexOf(b.top)].at,v=u[N.indexOf(b.top+b.height)].at;return{id:b.id,active:!!b.active,command:b.command,seq:d,left:w,top:j,width:x-w,height:v-j,cols:b.width,rows:b.height}});return{w:Sb,h:Cb,cells:m}}function k2(i){const r=i.width<E2,l=i.height<j2;return r&&l?"tiny":r?"narrow":l?"flat":""}const eb={terminal:"终端",chat:"对话"};function R2(){return c.jsxDEV("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsxDEV("path",{d:"M4 8h13M13 4l4 4-4 4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:12,columnNumber:7},this),c.jsxDEV("path",{d:"M20 16H7M11 20l-4-4 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:13,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:10,columnNumber:5},this)}function T2({value:i,onChange:r}){const l=i==="chat"?"terminal":"chat";return c.jsxDEV("button",{type:"button",className:"lens-toggle",onClick:()=>r(l),"aria-label":`切换到${eb[l]}视图`,title:`切换到${eb[l]}视图`,children:[c.jsxDEV(R2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:28,columnNumber:7},this),c.jsxDEV("span",{className:"lens-toggle-label",children:eb[i]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:21,columnNumber:5},this)}const X1="①②③④⑤⑥⑦⑧⑨",Sd=i=>i<X1.length?X1[i]:String(i+1),L2=(i,r)=>`${Sd(r)} ${i.command||i.id}`;function A2({window:i,active:r,agent:l,onSelect:g,onManage:N}){const R=$f(()=>N(i),{onClick:()=>g(i)});return c.jsxDEV("button",{"data-win":i.id,className:`win-tab ${r?"active":""}`,...R,children:[c.jsxDEV("span",{className:"win-title",children:[l&&c.jsxDEV(ol,{agent:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:27,columnNumber:19},this),c.jsxDEV("span",{children:i.name||i.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:28,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:26,columnNumber:7},this),i.panes>1&&c.jsxDEV("span",{className:"win-panes",children:i.panes},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:30,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:25,columnNumber:5},this)}const M2=200,U2=90;function O2({cell:i,cur:r,releasing:l,picking:g,agent:N,onChoose:R,onManage:y}){const a=k2(i),u=i.command||i.id,b=Number.isFinite(i.cols)&&Number.isFinite(i.rows)?`${i.cols}×${i.rows}`:"",d=a===""&&i.width>=U2&&b,w=$f(()=>y(i.id),{onClick:()=>R(i.id)});return c.jsxDEV("button",{type:"button",role:"option","aria-selected":r,"aria-label":b?`${u}, ${b}`:u,className:`pane-map-cell${r?" is-current":""}${l?" is-releasing":""}${a?` is-${a}`:""}${g?" is-picking":""}`,style:{left:`${i.left+Df}px`,top:`${i.top+Df}px`,width:`${i.width}px`,height:`${i.height}px`},...w,children:c.jsxDEV("span",{className:"pmc-surf",children:a==="narrow"||a==="tiny"?c.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Sd(i.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:64,columnNumber:11},this):a==="flat"?c.jsxDEV(c.Fragment,{children:[c.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Sd(i.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:67,columnNumber:13},this),c.jsxDEV("span",{className:"pmc-cmd",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:68,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:66,columnNumber:11},this):c.jsxDEV(c.Fragment,{children:[c.jsxDEV("span",{className:"pmc-row",children:[c.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Sd(i.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:73,columnNumber:15},this),N&&c.jsxDEV(ol,{agent:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:74,columnNumber:25},this),d&&c.jsxDEV("span",{className:"pmc-dims","aria-hidden":"true",children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:75,columnNumber:34},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:72,columnNumber:13},this),c.jsxDEV("span",{className:"pmc-cmd",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:77,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:71,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:62,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:53,columnNumber:5},this)}function P2({window:i,panes:r,paneAgents:l={},currentPaneId:g,agent:N,onManage:R,onManagePane:y,onSelectPane:a,onBeforePaneMapOpen:u,paneSheetOpen:m=!1,openMapFor:b=null,onMapOpened:d,onPaneMapOpenChange:w}){const[x,j]=A.useState(!1);Mn(x,()=>j(!1));const v=A.useRef(x),o=A.useRef(w);v.current=x,o.current=w,A.useEffect(()=>{w==null||w(x)},[x,w]),A.useEffect(()=>()=>{var q;v.current&&((q=o.current)==null||q.call(o,!1))},[]);const[p,f]=A.useState(null),_=A.useRef(null);A.useEffect(()=>()=>clearTimeout(_.current),[]);const E=q=>{var X;try{(X=navigator.vibrate)==null||X.call(navigator,10)}catch{}if(m&&(y==null||y(q)),typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(q);return}f(q),clearTimeout(_.current),_.current=setTimeout(()=>{f(null),a(q)},M2)},[T,S]=A.useState(null),k=A.useRef(null),D=A.useRef(null),L=Eb(r)?D2(r):null,U=L?L.w:Sb,F=L?L.h:Cb,P=()=>{var W;const q=(W=k.current)==null?void 0:W.getBoundingClientRect();if(!q)return;const J=8,X=window.innerWidth,V=window.innerHeight,H=Math.max(J,Math.min(q.left,X-U-J));let K=q.bottom+6;if(K+F+J>V){const oe=q.top-6-F;K=oe>=J?oe:Math.max(J,V-F-J)}S({top:K,left:H})},I=$f(()=>R(i),{onClick:()=>{if(x){j(!1);return}const q=()=>{P(),j(!0)};u?Promise.resolve(u(i.id)).then(q,q):q()}});A.useEffect(()=>{b&&b===i.id&&(P(),j(!0),d==null||d())},[b,i.id]),A.useEffect(()=>{if(!x)return;const q=X=>{var V,H;m||!((V=k.current)!=null&&V.contains(X.target))&&!((H=D.current)!=null&&H.contains(X.target))&&j(!1)},J=()=>P();return document.addEventListener("pointerdown",q,!0),window.addEventListener("scroll",J,!0),window.addEventListener("resize",J),()=>{document.removeEventListener("pointerdown",q,!0),window.removeEventListener("scroll",J,!0),window.removeEventListener("resize",J)}},[x,m]);const G=Math.max(0,r.findIndex(q=>q.id===g)),ie=r[G];return c.jsxDEV("div",{className:"wt-dd active","data-win":i.id,ref:k,children:[c.jsxDEV("button",{className:"win-tab active wt-trigger","aria-haspopup":"listbox","aria-expanded":x,...I,children:[c.jsxDEV("span",{className:"win-title",children:[N&&c.jsxDEV(ol,{agent:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:204,columnNumber:21},this),c.jsxDEV("span",{className:"wt-name",children:i.name||i.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:205,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:203,columnNumber:9},this),c.jsxDEV("span",{className:"wt-sep","aria-hidden":"true",children:"│"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:207,columnNumber:9},this),c.jsxDEV("span",{className:"wt-pane",children:L2(ie,G)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:208,columnNumber:9},this),c.jsxDEV("span",{className:`wt-caret${x?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:209,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:197,columnNumber:7},this),x&&T&&(Eb(r)?hl.createPortal(c.jsxDEV("div",{ref:D,className:"pane-map",role:"listbox",style:{top:T.top,left:T.left,width:U,height:F},children:L.cells.map(q=>{const J=q.id===g;return c.jsxDEV(O2,{cell:q,cur:J,releasing:J&&!!p&&p!==g,picking:p===q.id,agent:l[q.id],onChoose:E,onManage:y},q.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:218,columnNumber:19},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:214,columnNumber:13},this),document.body):c.jsxDEV("div",{className:"dd-menu wt-menu",role:"listbox",style:{top:T.top,left:T.left},children:r.map((q,J)=>c.jsxDEV("button",{type:"button",role:"option","aria-selected":q.id===g,className:`dd-option${q.id===g?" is-selected":""}`,onClick:()=>{a(q.id),j(!1)},children:[c.jsxDEV("span",{className:"dd-option-label",children:[c.jsxDEV("span",{className:"dd-pane-seq","aria-hidden":"true",children:Sd(J)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:245,columnNumber:19},this),l[q.id]&&c.jsxDEV(ol,{agent:l[q.id]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:246,columnNumber:40},this),c.jsxDEV("span",{className:"dd-pane-cmd",children:q.command||q.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:247,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:244,columnNumber:17},this),q.id===g&&c.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:249,columnNumber:44},this)]},q.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:236,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:234,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:196,columnNumber:5},this)}function V2({windows:i,windowAgents:r={},paneAgents:l={},currentAgent:g,currentWindowId:N,panes:R,currentPaneId:y,onSelectWindow:a,onSelectPane:u,onNewWindow:m,onManageWindow:b,onManagePane:d,onBeforePaneMapOpen:w,paneSheetOpen:x=!1,openMapFor:j=null,onMapOpened:v,onPaneMapOpenChange:o,trackWindowId:p,lens:f="terminal",onLensChange:_=()=>{},chatLensEnabled:E=!1}){const T=A.useRef(null);return A.useLayoutEffect(()=>{var S,k;p&&((k=(S=T.current)==null?void 0:S.querySelector(`[data-win="${p}"]`))==null||k.scrollIntoView({block:"nearest",inline:"nearest"}))},[i,p]),c.jsxDEV("div",{className:"windowbar",children:[c.jsxDEV("div",{className:"windowbar-scroll",ref:T,children:[i.map(S=>{const k=S.id===N;return k&&R.length>1?c.jsxDEV(P2,{window:S,panes:R,paneAgents:l,currentPaneId:y,agent:g,onManage:b,onManagePane:d,onSelectPane:u,onBeforePaneMapOpen:w,paneSheetOpen:x,openMapFor:j,onMapOpened:v,onPaneMapOpenChange:o},S.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:281,columnNumber:15},this):c.jsxDEV(A2,{window:S,active:k,agent:r[S.id],onSelect:a,onManage:b},S.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:300,columnNumber:13},this)}),c.jsxDEV("button",{className:"win-tab win-new",onClick:m,"aria-label":O("windowbar.newWindow"),title:O("windowbar.newWindow"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:310,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:276,columnNumber:7},this),g==="claude"&&E&&c.jsxDEV(T2,{value:f,onChange:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:313,columnNumber:56},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:275,columnNumber:5},this)}function I2(i){return i.replace(/\r?\n/g,`\r
207
+ `)}function B2(i,r){let l=r,g=!1,N=!1,R=!1;const y=b=>{/\S/.test(b)&&(g=!0,l&&(N=!0)),l&&b.length&&(R=!0)},a=/\x1b\[([0-9;]*)m/g;let u=0,m=a.exec(i);for(;m;){y(i.slice(u,m.index)),u=a.lastIndex;const b=m[1]===""?[0]:m[1].split(";").map(Number);for(let d=0;d<b.length;d+=1){const w=b[d];if(w===0||w===49)l=!1;else if(w>=40&&w<=47||w>=100&&w<=107)l=!0;else if(w===38||w===48){const x=w===48;b[d+1]===5?(d+=2,x&&(l=!0)):b[d+1]===2&&(d+=4,x&&(l=!0))}}m=a.exec(i)}return y(i.slice(u)),{bgEnd:l,hasText:g,hasShadeText:N,hasShadeBlank:R}}function F2(i){const r=[];let l=!1,g=[],N=-1,R=!1;const y=()=>{if(g.length){r.push(`${g[0].line}${g[0].bgEnd?"\x1B[49m":""}`);for(let u=1;u<g.length;u+=1)r.push("")}else N>=0&&R&&(r[N]+="\x1B[49m");g=[],N=-1,R=!1},a=()=>{g.length&&(r.push(...g.map(({line:u})=>u)),g=[])};for(const u of i){const m=B2(u,l);m.hasShadeText?(a(),r.push(u),N=r.length-1,R=m.bgEnd):!m.hasText&&(m.bgEnd||m.hasShadeBlank)?g.push({line:u,bgEnd:m.bgEnd}):(y(),r.push(u)),l=m.bgEnd}return y(),r}function ZC(i){const r=I2(i.replace(/\n$/,""));return F2(r.split(`\r
208
+ `)).join(`\r
209
+ `)}function H2(i,r){const l=ZC(i).split(`\r
210
+ `),g=Math.max(1,Number(r)||1);for(;l.length<g;)l.push("");return l.join(`\r
211
+ `)}function QC(i,r,l=0,g=!1){if(!i||!i.vis&&!g)return"\x1B[?25l";const N=l?Math.min(r|0,l|0):r|0,R=Math.max(1,N-Math.max(0,i.row|0)),y=Math.max(0,i.col|0)+1;return`\x1B[${R};${y}H\x1B[?25h`}function z2(i,{base:r=1e3,max:l=1e4,factor:g=2,jitter:N=.2,rng:R=Math.random}={}){if(i<=0)return 0;const y=Math.min(l,r*g**(i-1));return Math.round(y*(1+N*(R()*2-1)))}const $2=1e3;function W2(i,r=$2){return i<8e3?r:i<6e4?5e3:1e4}const G2={failCount:0,connected:!0};function pc(i,r,{threshold:l=2}={}){switch(r){case"ok":case"reset":return{failCount:0,connected:!0};case"fail":{const g=i.failCount+1;return{failCount:g,connected:g<l}}default:return i}}const Y2="(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0|\\[::1\\])",J1=new RegExp(`https?://${Y2}(?::(\\d{1,5}))?(/[^${Nb}]*)?`,"gi");function eE(i){const r=[];if(!i)return r;J1.lastIndex=0;let l;for(;(l=J1.exec(i))!==null;){const g=/^https:/i.test(l[0]),N=l[1]?Number(l[1]):g?443:80;if(!Number.isInteger(N)||N<1||N>65535)continue;const R=l[2]||"",y=R.replace(/\.+$/,""),a=l.index+l[0].length-(R.length-y.length);r.push({start:l.index,end:a,protocol:g?"https":"http",port:N,path:y||"/",raw:i.slice(l.index,a)})}return r}function tE(i){const r=eE(i),l=r.map(g=>({start:g.start,end:g.end,kind:"url",protocol:g.protocol,port:g.port,urlPath:g.path,raw:g.raw}));for(const g of u2(i))r.some(N=>g.start<N.end&&g.end>N.start)||l.push({start:g.start,end:g.end,kind:"doc"});return l.sort((g,N)=>g.start-N.start),l}function q2(i,r){const l=i.getCell(r-1);if(!l)return!1;if(l.getWidth()===0)return!0;const g=l.getChars();if(g&&g!==" ")return!0;const N=i.getCell(r-2);return!!N&&N.getWidth()===0}function jb(i,r,l){var y;const g=i.getLine(r+1);if(!g)return!1;if(g.isWrapped)return!0;const N=i.getLine(r);if(!N||!q2(N,l))return!1;const R=(y=g.getCell(0))==null?void 0:y.getChars();return!!R&&R!==" "}function nE(i,r,l){let g=r;for(;g>0&&jb(i,g-1,l);)g--;let N="";const R=[];let y=g;for(;;){const a=i.getLine(y);if(!a)break;const u=y+1<i.length&&jb(i,y,l),m=[],b=[];for(let w=0;w<l;w++){const x=a.getCell(w);if(!x)continue;const j=x.getWidth();j!==0&&(m.push(x.getChars()),b.push({row:y,col:w,w:j}))}let d=m.length;if(u)for(;d>0&&(m[d-1]===""||m[d-1]===" ");)d--;for(let w=0;w<d;w++)N+=m[w]||" ",R.push(b[w]);if(u){y++;continue}break}return{text:N,cells:R}}function K2(i){const r=i.buffer.active,l=i.cols,g=0,N=r.length,R=[];let y=g;for(;y>0&&jb(r,y-1,l);)y--;for(;y<N;){if(!r.getLine(y)){y++;continue}const{text:a,cells:u}=nE(r,y,l);for(const{start:m,end:b,kind:d}of tE(a)){let w=m;for(;w<b;){const x=u[w].row;let j=w;for(;j<b&&u[j].row===x;)j++;const v=u[w].col,o=u[j-1],p=o.col+o.w;x>=g&&x<N&&R.push({y:x,x:v,width:p-v,kind:d,path:a.slice(m,b)}),w=j}}y=u.length?u[u.length-1].row+1:y+1}return R}function X2(i,r){const l=i.buffer.active,g=i.cols,N=r-1;if(N<0||N>=l.length)return[];const{text:R,cells:y}=nE(l,N,g),a=[];for(const{start:u,end:m,kind:b,protocol:d,port:w,urlPath:x,raw:j}of tE(R)){const v=y[u],o=y[m-1];N<v.row||N>o.row||a.push({range:{start:{x:v.col+1,y:v.row+1},end:{x:o.col+o.w,y:o.row+1}},kind:b,path:R.slice(u,m),protocol:d,port:w,urlPath:x,raw:j})}return a}const iE=(i,r,l)=>Math.max(r,Math.min(l,i));function J2(i,r){return!r||r<=0?1:Math.max(1,Math.floor(i/r))}function rE(i,r,l){return l<0?i>0?"internal":"forward":i<r?"internal":"forward"}function Z2(i,r){return Number.isFinite(r)?r<=1:i===0}function Q2(i,r){return iE(i,0,r)}function eO(i,r,l){return iE(i-r+1,0,l)}function Z1(i,r){return!i||!i.vis?null:Math.max(0,r-1-Math.max(0,i.row|0))}function Q1(i,r){return Math.max(0,r-i)}function tb({cursorLine:i,viewportY:r,visibleRows:l,baseY:g,armed:N}){return N?i<r?Q2(i,g):i>=r+l?eO(i,l,g):null:null}function sE(i){const r=i.split(`
212
+ `).map(N=>N.trim());let l=0,g=r.length;for(;l<g&&r[l]==="";)l++;for(;g>l&&r[g-1]==="";)g--;return r.slice(l,g).join(`
213
+ `)}function tO(i){return i?{lines:i.split(`
214
+ `).length,chars:sE(i).replace(/\n/g,"").length}:{lines:0,chars:0}}function nO(i,r){return{start:{col:0,row:i.start.row},end:{col:r-1,row:i.end.row}}}function iO(i,r,l,g,N){let R=i.start.row,y=i.end.row;for(;R>g&&l(R-1).trim()!=="";)R--;for(;y<N&&l(y+1).trim()!=="";)y++;return{start:{col:0,row:R},end:{col:r-1,row:y}}}function eS(i,r,l,g,N){return{x:i*g,y:(r-l)*N}}function rO(i){const[r,l]=A.useState(""),[g,N]=A.useState(!1),R=A.useRef(null),y=A.useRef(null);return A.useEffect(()=>()=>{clearTimeout(R.current),clearInterval(y.current)},[]),{dbg:r,dbgVisible:g,flash:()=>{const u=()=>{const m=i.current;m&&l(`${m.cols}×${m.rows} · ${m.options.fontSize}px`)};u(),N(!0),clearTimeout(R.current),clearInterval(y.current),y.current=setInterval(u,400),R.current=setTimeout(()=>{N(!1),clearInterval(y.current)},3e3)}}}const sO=1e3,aO=3e3,oO=300,lO=256*1024,cO=1e4,uO=5e3;function dO({pane:i,onSeed:r,onData:l,onReady:g,onStatus:N,onProbe:R,onAuthFail:y,WebSocketCtor:a=window.WebSocket,token:u=Fa()??"",reconnectMs:m=sO,connectTimeoutMs:b=aO,maxFrameLagMs:d=oO,maxPendingDataBytes:w=lO,probeIntervalMs:x=cO,probeTimeoutMs:j=uO,now:v=()=>Date.now()}){let o=null,p=null,f=null,_=!1,E=!1,T=Promise.resolve(),S=null,k=0,D=null,L=null,U=0,F=null,P=0,I=!0;const G=()=>{D&&clearInterval(D),L&&clearTimeout(L),D=null,L=null,F=null},ie=()=>{S&&(clearTimeout(S),S=null)},q=de=>{ie(),S=setTimeout(()=>{o===de&&de.readyState!==3&&de.close(4e3,"stream timeout")},b)},J=de=>{(o==null?void 0:o.readyState)===a.OPEN&&o.send(JSON.stringify(de))},X=()=>{if(_||E||!p||F)return;const de=++U;F={id:de,sentAt:v()},J({type:"probe",id:de}),L=setTimeout(()=>{(F==null?void 0:F.id)===de&&(F=null,L=null,R==null||R({ok:!1}))},j)},V=()=>{G(),X(),D=setInterval(X,x)},H=()=>{f&&(clearTimeout(f),f=null)},K=()=>{const de=o;o=null,p===de&&(p=null),P=0,I=!0,ie(),G();try{de==null||de.close()}catch{}},W=()=>{_||E||I||(k+=1,P=0,I=!0,(o==null?void 0:o.readyState)===a.OPEN?(N==null||N("connecting"),q(o),G(),p===o?J({type:"resync"}):(p=o,J({type:"subscribe",token:u,pane:i}))):oe())},oe=()=>{if(_||E||o&&(o.readyState===0||o.readyState===a.OPEN))return;H(),N==null||N("connecting");const de=window.location.protocol==="https:"?"wss:":"ws:",xe=new a(`${de}//${window.location.host}/api/terminal-stream`);o=xe,P=0,I=!0,q(xe),xe.binaryType="arraybuffer",xe.onopen=()=>{o!==xe||_||E||(p=xe,J({type:"subscribe",token:u,pane:i}))},xe.onmessage=Se=>{if(o!==xe)return;let se=null;if(typeof Se.data=="string"){try{se=JSON.parse(Se.data)}catch{xe.close(1003,"bad stream frame");return}if(se.type==="probe"){if((F==null?void 0:F.id)===se.id){const He=Math.max(0,v()-F.sentAt);F=null,L&&clearTimeout(L),L=null,R==null||R({ok:!0,rttMs:He})}return}if(I&&se.type!=="seed")return;se.type==="seed"&&(I=!1)}else{if(I)return;if(P+=Se.data.byteLength,P>w){W();return}}const Y=k,pe=Date.now(),he=typeof Se.data=="string"?0:Se.data.byteLength;T=T.then(async()=>{if(!(_||E||Y!==k)){if(P=Math.max(0,P-he),he>0&&Date.now()-pe>d){W();return}if(typeof Se.data!="string"){await(l==null?void 0:l(new Uint8Array(Se.data)));return}se.type==="seed"?await(r==null?void 0:r(se)):se.type==="ready"&&(await(g==null?void 0:g(se)),ie(),N==null||N("live"),V())}}).catch(()=>{N==null||N("error"),o===xe&&xe.close(1003,"bad stream frame")})},xe.onclose=Se=>{if(o===xe&&(o=null,p===xe&&(p=null),ie(),G(),!_)){if(Se.code===4001){y==null||y();return}N==null||N("reconnecting"),E||(f=setTimeout(oe,m))}},xe.onerror=()=>{o===xe&&xe.close()}};return oe(),{pause(){_||E||(E=!0,k+=1,P=0,I=!0,H(),ie(),G(),J({type:"pause"}),N==null||N("paused"))},suspend(){return _||(E=!0,k+=1,H(),K(),N==null||N("paused")),T},resync(){_||(E=!1,k+=1,P=0,I=!0,(o==null?void 0:o.readyState)===a.OPEN?(N==null||N("connecting"),q(o),G(),p===o?J({type:"resync"}):(p=o,J({type:"subscribe",token:u,pane:i}))):oe())},close(){return _=!0,k+=1,P=0,H(),K(),T}}}var aE={exports:{}};(function(i,r){(function(l,g){i.exports=g()})(globalThis,()=>(()=>{var l={4567:function(y,a,u){var m=this&&this.__decorate||function(f,_,E,T){var S,k=arguments.length,D=k<3?_:T===null?T=Object.getOwnPropertyDescriptor(_,E):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,_,E,T);else for(var L=f.length-1;L>=0;L--)(S=f[L])&&(D=(k<3?S(D):k>3?S(_,E,D):S(_,E))||D);return k>3&&D&&Object.defineProperty(_,E,D),D},b=this&&this.__param||function(f,_){return function(E,T){_(E,T,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const d=u(9042),w=u(9924),x=u(844),j=u(4725),v=u(2585),o=u(3656);let p=a.AccessibilityManager=class extends x.Disposable{constructor(f,_,E,T){super(),this._terminal=f,this._coreBrowserService=E,this._renderService=T,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 S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,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 w.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(S=>this._handleResize(S.rows))),this.register(this._terminal.onRender(S=>this._refreshRows(S.start,S.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(S=>this._handleChar(S))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
215
+ `))),this.register(this._terminal.onA11yTab(S=>this._handleTab(S))),this.register(this._terminal.onKey(S=>this._handleKey(S.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,o.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(f){for(let _=0;_<f;_++)this._handleChar(" ")}_handleChar(f){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==f&&(this._charsToAnnounce+=f):this._charsToAnnounce+=f,f===`
216
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(f){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(f)||this._charsToConsume.push(f)}_refreshRows(f,_){this._liveRegionDebouncer.refresh(f,_,this._terminal.rows)}_renderRows(f,_){const E=this._terminal.buffer,T=E.lines.length.toString();for(let S=f;S<=_;S++){const k=E.lines.get(E.ydisp+S),D=[],L=(k==null?void 0:k.translateToString(!0,void 0,void 0,D))||"",U=(E.ydisp+S+1).toString(),F=this._rowElements[S];F&&(L.length===0?(F.innerText=" ",this._rowColumns.set(F,[0,1])):(F.textContent=L,this._rowColumns.set(F,D)),F.setAttribute("aria-posinset",U),F.setAttribute("aria-setsize",T))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(f,_){const E=f.target,T=this._rowElements[_===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||f.relatedTarget!==T)return;let S,k;if(_===0?(S=E,k=this._rowElements.pop(),this._rowContainer.removeChild(k)):(S=this._rowElements.shift(),k=E,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),k.removeEventListener("focus",this._bottomBoundaryFocusListener),_===0){const D=this._createAccessibilityTreeNode();this._rowElements.unshift(D),this._rowContainer.insertAdjacentElement("afterbegin",D)}else{const D=this._createAccessibilityTreeNode();this._rowElements.push(D),this._rowContainer.appendChild(D)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_===0?-1:1),this._rowElements[_===0?1:this._rowElements.length-2].focus(),f.preventDefault(),f.stopImmediatePropagation()}_handleSelectionChange(){var L;if(this._rowElements.length===0)return;const f=document.getSelection();if(!f)return;if(f.isCollapsed)return void(this._rowContainer.contains(f.anchorNode)&&this._terminal.clearSelection());if(!f.anchorNode||!f.focusNode)return void console.error("anchorNode and/or focusNode are null");let _={node:f.anchorNode,offset:f.anchorOffset},E={node:f.focusNode,offset:f.focusOffset};if((_.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||_.node===E.node&&_.offset>E.offset)&&([_,E]=[E,_]),_.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(_={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(_.node))return;const T=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(T)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:T,offset:((L=T.textContent)==null?void 0:L.length)??0}),!this._rowContainer.contains(E.node))return;const S=({node:U,offset:F})=>{const P=U instanceof Text?U.parentNode:U;let I=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const G=this._rowColumns.get(P);if(!G)return console.warn("columns is null. Race condition?"),null;let ie=F<G.length?G[F]:G.slice(-1)[0]+1;return ie>=this._terminal.cols&&(++I,ie=0),{row:I,column:ie}},k=S(_),D=S(E);if(k&&D){if(k.row>D.row||k.row===D.row&&k.column>=D.column)throw new Error("invalid range");this._terminal.select(k.column,k.row,(D.row-k.row)*this._terminal.cols-k.column+D.column)}}_handleResize(f){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let _=this._rowContainer.children.length;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);for(;this._rowElements.length>f;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const f=this._coreBrowserService.mainDocument.createElement("div");return f.setAttribute("role","listitem"),f.tabIndex=-1,this._refreshRowDimensions(f),f}_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 f=0;f<this._terminal.rows;f++)this._refreshRowDimensions(this._rowElements[f])}}_refreshRowDimensions(f){f.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=p=m([b(1,v.IInstantiationService),b(2,j.ICoreBrowserService),b(3,j.IRenderService)],p)},3614:(y,a)=>{function u(w){return w.replace(/\r?\n/g,"\r")}function m(w,x){return x?"\x1B[200~"+w+"\x1B[201~":w}function b(w,x,j,v){w=m(w=u(w),j.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),j.triggerDataEvent(w,!0),x.value=""}function d(w,x,j){const v=j.getBoundingClientRect(),o=w.clientX-v.left-10,p=w.clientY-v.top-10;x.style.width="20px",x.style.height="20px",x.style.left=`${o}px`,x.style.top=`${p}px`,x.style.zIndex="1000",x.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=u,a.bracketTextForPaste=m,a.copyHandler=function(w,x){w.clipboardData&&w.clipboardData.setData("text/plain",x.selectionText),w.preventDefault()},a.handlePasteEvent=function(w,x,j,v){w.stopPropagation(),w.clipboardData&&b(w.clipboardData.getData("text/plain"),x,j,v)},a.paste=b,a.moveTextAreaUnderMouseCursor=d,a.rightClickHandler=function(w,x,j,v,o){d(w,x,j),o&&v.rightClickSelect(w),x.value=v.selectionText,x.select()}},7239:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const m=u(1505);a.ColorContrastCache=class{constructor(){this._color=new m.TwoKeyMap,this._css=new m.TwoKeyMap}setCss(b,d,w){this._css.set(b,d,w)}getCss(b,d){return this._css.get(b,d)}setColor(b,d,w){this._color.set(b,d,w)}getColor(b,d){return this._color.get(b,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,m,b,d){u.addEventListener(m,b,d);let w=!1;return{dispose:()=>{w||(w=!0,u.removeEventListener(m,b,d))}}}},3551:function(y,a,u){var m=this&&this.__decorate||function(p,f,_,E){var T,S=arguments.length,k=S<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,f,_,E);else for(var D=p.length-1;D>=0;D--)(T=p[D])&&(k=(S<3?T(k):S>3?T(f,_,k):T(f,_))||k);return S>3&&k&&Object.defineProperty(f,_,k),k},b=this&&this.__param||function(p,f){return function(_,E){f(_,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const d=u(3656),w=u(8460),x=u(844),j=u(2585),v=u(4725);let o=a.Linkifier=class extends x.Disposable{get currentLink(){return this._currentLink}constructor(p,f,_,E,T){super(),this._element=p,this._mouseService=f,this._renderService=_,this._bufferService=E,this._linkProviderService=T,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new w.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new w.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,x.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,x.toDisposable)(()=>{var S;this._lastMouseEvent=void 0,(S=this._activeProviderReplies)==null||S.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,d.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(p){this._lastMouseEvent=p;const f=this._positionFromMouseEvent(p,this._element,this._mouseService);if(!f)return;this._isMouseOut=!1;const _=p.composedPath();for(let E=0;E<_.length;E++){const T=_[E];if(T.classList.contains("xterm"))break;if(T.classList.contains("xterm-hover"))return}this._lastBufferCell&&f.x===this._lastBufferCell.x&&f.y===this._lastBufferCell.y||(this._handleHover(f),this._lastBufferCell=f)}_handleHover(p){if(this._activeLine!==p.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(p,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,p)||(this._clearCurrentLink(),this._askForLink(p,!0))}_askForLink(p,f){var E,T;this._activeProviderReplies&&f||((E=this._activeProviderReplies)==null||E.forEach(S=>{S==null||S.forEach(k=>{k.link.dispose&&k.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=p.y);let _=!1;for(const[S,k]of this._linkProviderService.linkProviders.entries())f?(T=this._activeProviderReplies)!=null&&T.get(S)&&(_=this._checkLinkProviderResult(S,p,_)):k.provideLinks(p.y,D=>{var U,F;if(this._isMouseOut)return;const L=D==null?void 0:D.map(P=>({link:P}));(U=this._activeProviderReplies)==null||U.set(S,L),_=this._checkLinkProviderResult(S,p,_),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(p.y,this._activeProviderReplies)})}_removeIntersectingLinks(p,f){const _=new Set;for(let E=0;E<f.size;E++){const T=f.get(E);if(T)for(let S=0;S<T.length;S++){const k=T[S],D=k.link.range.start.y<p?0:k.link.range.start.x,L=k.link.range.end.y>p?this._bufferService.cols:k.link.range.end.x;for(let U=D;U<=L;U++){if(_.has(U)){T.splice(S--,1);break}_.add(U)}}}}_checkLinkProviderResult(p,f,_){var S;if(!this._activeProviderReplies)return _;const E=this._activeProviderReplies.get(p);let T=!1;for(let k=0;k<p;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(T=!0);if(!T&&E){const k=E.find(D=>this._linkAtPosition(D.link,f));k&&(_=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!_)for(let k=0;k<this._activeProviderReplies.size;k++){const D=(S=this._activeProviderReplies.get(k))==null?void 0:S.find(L=>this._linkAtPosition(L.link,f));if(D){_=!0,this._handleNewLink(D);break}}return _}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(p){if(!this._currentLink)return;const f=this._positionFromMouseEvent(p,this._element,this._mouseService);f&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,f)&&this._currentLink.link.activate(p,this._currentLink.link.text)}_clearCurrentLink(p,f){this._currentLink&&this._lastMouseEvent&&(!p||!f||this._currentLink.link.range.start.y>=p&&this._currentLink.link.range.end.y<=f)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,x.disposeArray)(this._linkCacheDisposables))}_handleNewLink(p){if(!this._lastMouseEvent)return;const f=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);f&&this._linkAtPosition(p.link,f)&&(this._currentLink=p,this._currentLink.state={decorations:{underline:p.link.decorations===void 0||p.link.decorations.underline,pointerCursor:p.link.decorations===void 0||p.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,p.link,this._lastMouseEvent),p.link.decorations={},Object.defineProperties(p.link.decorations,{pointerCursor:{get:()=>{var _,E;return(E=(_=this._currentLink)==null?void 0:_.state)==null?void 0:E.decorations.pointerCursor},set:_=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==_&&(this._currentLink.state.decorations.pointerCursor=_,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",_))}},underline:{get:()=>{var _,E;return(E=(_=this._currentLink)==null?void 0:_.state)==null?void 0:E.decorations.underline},set:_=>{var E,T,S;(E=this._currentLink)!=null&&E.state&&((S=(T=this._currentLink)==null?void 0:T.state)==null?void 0:S.decorations.underline)!==_&&(this._currentLink.state.decorations.underline=_,this._currentLink.state.isHovered&&this._fireUnderlineEvent(p.link,_))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(_=>{if(!this._currentLink)return;const E=_.start===0?0:_.start+1+this._bufferService.buffer.ydisp,T=this._bufferService.buffer.ydisp+1+_.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=T&&(this._clearCurrentLink(E,T),this._lastMouseEvent)){const S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._askForLink(S,!1)}})))}_linkHover(p,f,_){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!0),this._currentLink.state.decorations.pointerCursor&&p.classList.add("xterm-cursor-pointer")),f.hover&&f.hover(_,f.text)}_fireUnderlineEvent(p,f){const _=p.range,E=this._bufferService.buffer.ydisp,T=this._createLinkUnderlineEvent(_.start.x-1,_.start.y-E-1,_.end.x,_.end.y-E-1,void 0);(f?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(T)}_linkLeave(p,f,_){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!1),this._currentLink.state.decorations.pointerCursor&&p.classList.remove("xterm-cursor-pointer")),f.leave&&f.leave(_,f.text)}_linkAtPosition(p,f){const _=p.range.start.y*this._bufferService.cols+p.range.start.x,E=p.range.end.y*this._bufferService.cols+p.range.end.x,T=f.y*this._bufferService.cols+f.x;return _<=T&&T<=E}_positionFromMouseEvent(p,f,_){const E=_.getCoords(p,f,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(p,f,_,E,T){return{x1:p,y1:f,x2:_,y2:E,cols:this._bufferService.cols,fg:T}}};a.Linkifier=o=m([b(1,v.IMouseService),b(2,v.IRenderService),b(3,j.IBufferService),b(4,v.ILinkProviderService)],o)},9042:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(y,a,u){var m=this&&this.__decorate||function(v,o,p,f){var _,E=arguments.length,T=E<3?o:f===null?f=Object.getOwnPropertyDescriptor(o,p):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,o,p,f);else for(var S=v.length-1;S>=0;S--)(_=v[S])&&(T=(E<3?_(T):E>3?_(o,p,T):_(o,p))||T);return E>3&&T&&Object.defineProperty(o,p,T),T},b=this&&this.__param||function(v,o){return function(p,f){o(p,f,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const d=u(511),w=u(2585);let x=a.OscLinkProvider=class{constructor(v,o,p){this._bufferService=v,this._optionsService=o,this._oscLinkService=p}provideLinks(v,o){var L;const p=this._bufferService.buffer.lines.get(v-1);if(!p)return void o(void 0);const f=[],_=this._optionsService.rawOptions.linkHandler,E=new d.CellData,T=p.getTrimmedLength();let S=-1,k=-1,D=!1;for(let U=0;U<T;U++)if(k!==-1||p.hasContent(U)){if(p.loadCell(U,E),E.hasExtendedAttrs()&&E.extended.urlId){if(k===-1){k=U,S=E.extended.urlId;continue}D=E.extended.urlId!==S}else k!==-1&&(D=!0);if(D||k!==-1&&U===T-1){const F=(L=this._oscLinkService.getLinkData(S))==null?void 0:L.uri;if(F){const P={start:{x:k+1,y:v},end:{x:U+(D||U!==T-1?0:1),y:v}};let I=!1;if(!(_!=null&&_.allowNonHttpProtocols))try{const G=new URL(F);["http:","https:"].includes(G.protocol)||(I=!0)}catch{I=!0}I||f.push({text:F,range:P,activate:(G,ie)=>_?_.activate(G,ie,P):j(0,ie),hover:(G,ie)=>{var q;return(q=_==null?void 0:_.hover)==null?void 0:q.call(_,G,ie,P)},leave:(G,ie)=>{var q;return(q=_==null?void 0:_.leave)==null?void 0:q.call(_,G,ie,P)}})}D=!1,E.hasExtendedAttrs()&&E.extended.urlId?(k=U,S=E.extended.urlId):(k=-1,S=-1)}}o(f)}};function j(v,o){if(confirm(`Do you want to navigate to ${o}?
217
+
218
+ WARNING: This link could potentially be dangerous`)){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=x=m([b(0,w.IBufferService),b(1,w.IOptionsService),b(2,w.IOscLinkService)],x)},6193:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,m){this._renderCallback=u,this._coreBrowserService=m,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,m,b){this._rowCount=b,u=u!==void 0?u:0,m=m!==void 0?m: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,m):m,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),m=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,m),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const m=u(3614),b=u(3656),d=u(3551),w=u(9042),x=u(3730),j=u(1680),v=u(3107),o=u(5744),p=u(2950),f=u(1296),_=u(428),E=u(4269),T=u(5114),S=u(8934),k=u(3230),D=u(9312),L=u(4725),U=u(6731),F=u(8055),P=u(8969),I=u(8460),G=u(844),ie=u(6114),q=u(8437),J=u(2584),X=u(7399),V=u(5941),H=u(9074),K=u(2585),W=u(5435),oe=u(4567),de=u(779);class xe extends P.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(se={}){super(se),this.browser=ie,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new G.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(K.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(de.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(x.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((Y,pe)=>this.refresh(Y,pe))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(Y=>this._reportWindowsOptions(Y))),this.register(this._inputHandler.onColor(Y=>this._handleColorEvent(Y))),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(Y=>this._afterResize(Y.cols,Y.rows))),this.register((0,G.toDisposable)(()=>{var Y,pe;this._customKeyEventHandler=void 0,(pe=(Y=this.element)==null?void 0:Y.parentNode)==null||pe.removeChild(this.element)}))}_handleColorEvent(se){if(this._themeService)for(const Y of se){let pe,he="";switch(Y.index){case 256:pe="foreground",he="10";break;case 257:pe="background",he="11";break;case 258:pe="cursor",he="12";break;default:pe="ansi",he="4;"+Y.index}switch(Y.type){case 0:const He=F.color.toColorRGB(pe==="ansi"?this._themeService.colors.ansi[Y.index]:this._themeService.colors[pe]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${he};${(0,V.toRgbString)(He)}${J.C1_ESCAPED.ST}`);break;case 1:if(pe==="ansi")this._themeService.modifyColors(Oe=>Oe.ansi[Y.index]=F.channels.toColor(...Y.color));else{const Oe=pe;this._themeService.modifyColors(et=>et[Oe]=F.channels.toColor(...Y.color))}break;case 2:this._themeService.restoreColor(Y.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(se){se?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(oe.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var se;return(se=this.textarea)==null?void 0:se.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.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 se=this.buffer.ybase+this.buffer.y,Y=this.buffer.lines.get(se);if(!Y)return;const pe=Math.min(this.buffer.x,this.cols-1),he=this._renderService.dimensions.css.cell.height,He=Y.getWidth(pe),Oe=this._renderService.dimensions.css.cell.width*He,et=this.buffer.y*this._renderService.dimensions.css.cell.height,ve=pe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ve+"px",this.textarea.style.top=et+"px",this.textarea.style.width=Oe+"px",this.textarea.style.height=he+"px",this.textarea.style.lineHeight=he+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,b.addDisposableDomListener)(this.element,"copy",Y=>{this.hasSelection()&&(0,m.copyHandler)(Y,this._selectionService)}));const se=Y=>(0,m.handlePasteEvent)(Y,this.textarea,this.coreService,this.optionsService);this.register((0,b.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,b.addDisposableDomListener)(this.element,"paste",se)),ie.isFirefox?this.register((0,b.addDisposableDomListener)(this.element,"mousedown",Y=>{Y.button===2&&(0,m.rightClickHandler)(Y,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,b.addDisposableDomListener)(this.element,"contextmenu",Y=>{(0,m.rightClickHandler)(Y,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),ie.isLinux&&this.register((0,b.addDisposableDomListener)(this.element,"auxclick",Y=>{Y.button===1&&(0,m.moveTextAreaUnderMouseCursor)(Y,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,b.addDisposableDomListener)(this.textarea,"keyup",se=>this._keyUp(se),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keydown",se=>this._keyDown(se),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keypress",se=>this._keyPress(se),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionupdate",se=>this._compositionHelper.compositionupdate(se))),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,b.addDisposableDomListener)(this.textarea,"input",se=>this._inputEvent(se),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(se){var pe;if(!se)throw new Error("Terminal requires a parent element.");if(se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((pe=this.element)==null?void 0:pe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=se.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"),se.appendChild(this.element);const Y=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Y.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,b.addDisposableDomListener)(this.screenElement,"mousemove",he=>this.updateCursorStyle(he))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Y.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",w.promptLabel),ie.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(T.CoreBrowserService,this.textarea,se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,b.addDisposableDomListener)(this.textarea,"focus",he=>this._handleTextAreaFocus(he))),this.register((0,b.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(_.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(U.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(he=>this._onRender.fire(he))),this.onResize(he=>this._renderService.resize(he.cols,he.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(p.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(d.Linkifier,this.screenElement)),this.element.appendChild(Y);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(j.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(he=>this.scrollLines(he.amount,he.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(D.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(he=>this.scrollLines(he.amount,he.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(he=>this._renderService.handleSelectionChanged(he.start,he.end,he.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(he=>{this.textarea.value=he,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(he=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,b.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,b.addDisposableDomListener)(this.element,"mousedown",he=>this._selectionService.handleMouseDown(he))),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(oe.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",he=>this._handleScreenReaderModeOptionChange(he))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",he=>{!this._overviewRulerRenderer&&he&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(f.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,Y=this.element;function pe(Oe){const et=se._mouseService.getMouseReportCoords(Oe,se.screenElement);if(!et)return!1;let ve,Ke;switch(Oe.overrideType||Oe.type){case"mousemove":Ke=32,Oe.buttons===void 0?(ve=3,Oe.button!==void 0&&(ve=Oe.button<3?Oe.button:3)):ve=1&Oe.buttons?0:4&Oe.buttons?1:2&Oe.buttons?2:3;break;case"mouseup":Ke=0,ve=Oe.button<3?Oe.button:3;break;case"mousedown":Ke=1,ve=Oe.button<3?Oe.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(Oe)===!1||se.viewport.getLinesScrolled(Oe)===0)return!1;Ke=Oe.deltaY<0?0:1,ve=4;break;default:return!1}return!(Ke===void 0||ve===void 0||ve>4)&&se.coreMouseService.triggerMouseEvent({col:et.col,row:et.row,x:et.x,y:et.y,button:ve,action:Ke,ctrl:Oe.ctrlKey,alt:Oe.altKey,shift:Oe.shiftKey})}const he={mouseup:null,wheel:null,mousedrag:null,mousemove:null},He={mouseup:Oe=>(pe(Oe),Oe.buttons||(this._document.removeEventListener("mouseup",he.mouseup),he.mousedrag&&this._document.removeEventListener("mousemove",he.mousedrag)),this.cancel(Oe)),wheel:Oe=>(pe(Oe),this.cancel(Oe,!0)),mousedrag:Oe=>{Oe.buttons&&pe(Oe)},mousemove:Oe=>{Oe.buttons||pe(Oe)}};this.register(this.coreMouseService.onProtocolChange(Oe=>{Oe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Oe)),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&Oe?he.mousemove||(Y.addEventListener("mousemove",He.mousemove),he.mousemove=He.mousemove):(Y.removeEventListener("mousemove",he.mousemove),he.mousemove=null),16&Oe?he.wheel||(Y.addEventListener("wheel",He.wheel,{passive:!1}),he.wheel=He.wheel):(Y.removeEventListener("wheel",he.wheel),he.wheel=null),2&Oe?he.mouseup||(he.mouseup=He.mouseup):(this._document.removeEventListener("mouseup",he.mouseup),he.mouseup=null),4&Oe?he.mousedrag||(he.mousedrag=He.mousedrag):(this._document.removeEventListener("mousemove",he.mousedrag),he.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,b.addDisposableDomListener)(Y,"mousedown",Oe=>{if(Oe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Oe))return pe(Oe),he.mouseup&&this._document.addEventListener("mouseup",he.mouseup),he.mousedrag&&this._document.addEventListener("mousemove",he.mousedrag),this.cancel(Oe)})),this.register((0,b.addDisposableDomListener)(Y,"wheel",Oe=>{if(!he.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Oe)===!1)return!1;if(!this.buffer.hasScrollback){const et=this.viewport.getLinesScrolled(Oe);if(et===0)return;const ve=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Oe.deltaY<0?"A":"B");let Ke="";for(let tt=0;tt<Math.abs(et);tt++)Ke+=ve;return this.coreService.triggerDataEvent(Ke,!0),this.cancel(Oe,!0)}return this.viewport.handleWheel(Oe)?this.cancel(Oe):void 0}},{passive:!1})),this.register((0,b.addDisposableDomListener)(Y,"touchstart",Oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Oe),this.cancel(Oe)},{passive:!0})),this.register((0,b.addDisposableDomListener)(Y,"touchmove",Oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Oe)?void 0:this.cancel(Oe)},{passive:!1}))}refresh(se,Y){var pe;(pe=this._renderService)==null||pe.refreshRows(se,Y)}updateCursorStyle(se){var Y;(Y=this._selectionService)!=null&&Y.shouldColumnSelect(se)?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(se,Y,pe=0){var he;pe===1?(super.scrollLines(se,Y,pe),this.refresh(0,this.rows-1)):(he=this.viewport)==null||he.scrollLines(se)}paste(se){(0,m.paste)(se,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(se){this._customKeyEventHandler=se}attachCustomWheelEventHandler(se){this._customWheelEventHandler=se}registerLinkProvider(se){return this._linkProviderService.registerLinkProvider(se)}registerCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Y=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),Y}deregisterCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(se){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)}registerDecoration(se){return this._decorationService.registerDecoration(se)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(se,Y,pe){this._selectionService.setSelection(se,Y,pe)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var se;(se=this._selectionService)==null||se.clearSelection()}selectAll(){var se;(se=this._selectionService)==null||se.selectAll()}selectLines(se,Y){var pe;(pe=this._selectionService)==null||pe.selectLines(se,Y)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const Y=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!Y&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Y||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const pe=(0,X.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),pe.type===3||pe.type===2){const he=this.rows-1;return this.scrollLines(pe.type===2?-he:he),this.cancel(se,!0)}return pe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(pe.cancel&&this.cancel(se,!0),!pe.key||!!(se.key&&!se.ctrlKey&&!se.altKey&&!se.metaKey&&se.key.length===1&&se.key.charCodeAt(0)>=65&&se.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(pe.key!==J.C0.ETX&&pe.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:pe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(pe.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,Y){const pe=se.isMac&&!this.options.macOptionIsMeta&&Y.altKey&&!Y.ctrlKey&&!Y.metaKey||se.isWindows&&Y.altKey&&Y.ctrlKey&&!Y.metaKey||se.isWindows&&Y.getModifierState("AltGraph");return Y.type==="keypress"?pe:pe&&(!Y.keyCode||Y.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||(function(Y){return Y.keyCode===16||Y.keyCode===17||Y.keyCode===18}(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let Y;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)Y=se.charCode;else if(se.which===null||se.which===void 0)Y=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;Y=se.which}return!(!Y||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(Y=String.fromCharCode(Y),this._onKey.fire({key:Y,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(Y,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(se){if(se.data&&se.inputType==="insertText"&&(!se.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Y=se.data;return this.coreService.triggerDataEvent(Y,!0),this.cancel(se),!0}return!1}resize(se,Y){se!==this.cols||Y!==this.rows?super.resize(se,Y):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,Y){var pe,he;(pe=this._charSizeService)==null||pe.measure(),(he=this.viewport)==null||he.syncScrollArea(!0)}clear(){var se;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 Y=1;Y<this.rows;Y++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(se=this.viewport)==null||se.reset(),this.refresh(0,this.rows-1)}}reset(){var Y,pe;this.options.rows=this.rows,this.options.cols=this.cols;const se=this._customKeyEventHandler;this._setup(),super.reset(),(Y=this._selectionService)==null||Y.reset(),this._decorationService.reset(),(pe=this.viewport)==null||pe.reset(),this._customKeyEventHandler=se,this.refresh(0,this.rows-1)}clearTextureAtlas(){var se;(se=this._renderService)==null||se.clearTextureAtlas()}_reportFocus(){var se;(se=this.element)!=null&&se.classList.contains("focus")?this.coreService.triggerDataEvent(J.C0.ESC+"[I"):this.coreService.triggerDataEvent(J.C0.ESC+"[O")}_reportWindowsOptions(se){if(this._renderService)switch(se){case W.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const Y=this._renderService.dimensions.css.canvas.width.toFixed(0),pe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[4;${pe};${Y}t`);break;case W.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const he=this._renderService.dimensions.css.cell.width.toFixed(0),He=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[6;${He};${he}t`)}}cancel(se,Y){if(this.options.cancelEvents||Y)return se.preventDefault(),se.stopPropagation(),!1}}a.Terminal=xe},9924:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,m=1e3){this._renderCallback=u,this._debounceThresholdMS=m,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,m,b){this._rowCount=b,u=u!==void 0?u:0,m=m!==void 0?m: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,m):m;const d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const w=d-this._lastRefreshMs,x=this._debounceThresholdMS-w;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),m=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,m)}}},1680:function(y,a,u){var m=this&&this.__decorate||function(p,f,_,E){var T,S=arguments.length,k=S<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,f,_,E);else for(var D=p.length-1;D>=0;D--)(T=p[D])&&(k=(S<3?T(k):S>3?T(f,_,k):T(f,_))||k);return S>3&&k&&Object.defineProperty(f,_,k),k},b=this&&this.__param||function(p,f){return function(_,E){f(_,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const d=u(3656),w=u(4725),x=u(8460),j=u(844),v=u(2585);let o=a.Viewport=class extends j.Disposable{constructor(p,f,_,E,T,S,k,D){super(),this._viewportElement=p,this._scrollArea=f,this._bufferService=_,this._optionsService=E,this._charSizeService=T,this._renderService=S,this._coreBrowserService=k,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,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(L=>this._renderDimensions=L)),this._handleThemeChange(D.colors),this.register(D.onChangeColors(L=>this._handleThemeChange(L))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(p){this._viewportElement.style.backgroundColor=p.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(p){if(p)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 f=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==f&&(this._lastRecordedBufferHeight=f,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const p=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==p&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=p),this._refreshAnimationFrame=null}syncScrollArea(p=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(p);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(p)}_handleScroll(p){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 f=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:f,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const p=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(p*(this._smoothScrollState.target-this._smoothScrollState.origin)),p<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(p,f){const _=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(f<0&&this._viewportElement.scrollTop!==0||f>0&&_<this._lastRecordedBufferHeight)||(p.cancelable&&p.preventDefault(),!1)}handleWheel(p){const f=this._getPixelsScrolled(p);return f!==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+f:this._smoothScrollState.target+=f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=f,this._bubbleScroll(p,f))}scrollLines(p){if(p!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const f=p*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:p,suppressScrollEvent:!1})}_getPixelsScrolled(p){if(p.deltaY===0||p.shiftKey)return 0;let f=this._applyScrollModifier(p.deltaY,p);return p.deltaMode===WheelEvent.DOM_DELTA_LINE?f*=this._currentRowHeight:p.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._currentRowHeight*this._bufferService.rows),f}getBufferElements(p,f){var D;let _,E="";const T=[],S=f??this._bufferService.buffer.lines.length,k=this._bufferService.buffer.lines;for(let L=p;L<S;L++){const U=k.get(L);if(!U)continue;const F=(D=k.get(L+1))==null?void 0:D.isWrapped;if(E+=U.translateToString(!F),!F||L===k.length-1){const P=document.createElement("div");P.textContent=E,T.push(P),E.length>0&&(_=P),E=""}}return{bufferElements:T,cursorElement:_}}getLinesScrolled(p){if(p.deltaY===0||p.shiftKey)return 0;let f=this._applyScrollModifier(p.deltaY,p);return p.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(f/=this._currentRowHeight+0,this._wheelPartialScroll+=f,f=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):p.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._bufferService.rows),f}_applyScrollModifier(p,f){const _=this._optionsService.rawOptions.fastScrollModifier;return _==="alt"&&f.altKey||_==="ctrl"&&f.ctrlKey||_==="shift"&&f.shiftKey?p*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:p*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(p){this._lastTouchY=p.touches[0].pageY}handleTouchMove(p){const f=this._lastTouchY-p.touches[0].pageY;return this._lastTouchY=p.touches[0].pageY,f!==0&&(this._viewportElement.scrollTop+=f,this._bubbleScroll(p,f))}};a.Viewport=o=m([b(2,v.IBufferService),b(3,v.IOptionsService),b(4,w.ICharSizeService),b(5,w.IRenderService),b(6,w.ICoreBrowserService),b(7,w.IThemeService)],o)},3107:function(y,a,u){var m=this&&this.__decorate||function(v,o,p,f){var _,E=arguments.length,T=E<3?o:f===null?f=Object.getOwnPropertyDescriptor(o,p):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,o,p,f);else for(var S=v.length-1;S>=0;S--)(_=v[S])&&(T=(E<3?_(T):E>3?_(o,p,T):_(o,p))||T);return E>3&&T&&Object.defineProperty(o,p,T),T},b=this&&this.__param||function(v,o){return function(p,f){o(p,f,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const d=u(4725),w=u(844),x=u(2585);let j=a.BufferDecorationRenderer=class extends w.Disposable{constructor(v,o,p,f,_){super(),this._screenElement=v,this._bufferService=o,this._coreBrowserService=p,this._decorationService=f,this._renderService=_,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(E=>this._removeDecoration(E))),this.register((0,w.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 v of this._decorationService.decorations)this._renderDecoration(v);this._dimensionsChanged=!1}_renderDecoration(v){this._refreshStyle(v),this._dimensionsChanged&&this._refreshXPosition(v)}_createElement(v){var f;const o=this._coreBrowserService.mainDocument.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",((f=v==null?void 0:v.options)==null?void 0:f.layer)==="top"),o.style.width=`${Math.round((v.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(v.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(v.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",o.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const p=v.options.x??0;return p&&p>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(v,o),o}_refreshStyle(v){const o=v.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)v.element&&(v.element.style.display="none",v.onRenderEmitter.fire(v.element));else{let p=this._decorationElements.get(v);p||(p=this._createElement(v),v.element=p,this._decorationElements.set(v,p),this._container.appendChild(p),v.onDispose(()=>{this._decorationElements.delete(v),p.remove()})),p.style.top=o*this._renderService.dimensions.css.cell.height+"px",p.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(p)}}_refreshXPosition(v,o=v.element){if(!o)return;const p=v.options.x??0;(v.options.anchor||"left")==="right"?o.style.right=p?p*this._renderService.dimensions.css.cell.width+"px":"":o.style.left=p?p*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(v){var o;(o=this._decorationElements.get(v))==null||o.remove(),this._decorationElements.delete(v),v.dispose()}};a.BufferDecorationRenderer=j=m([b(1,x.IBufferService),b(2,d.ICoreBrowserService),b(3,x.IDecorationService),b(4,d.IRenderService)],j)},5871:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const m of this._zones)if(m.color===u.options.overviewRulerOptions.color&&m.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(m,u.marker.line))return;if(this._lineAdjacentToZone(m,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(m,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,m){return m>=u.startBufferLine&&m<=u.endBufferLine}_lineAdjacentToZone(u,m,b){return m>=u.startBufferLine-this._linePadding[b||"full"]&&m<=u.endBufferLine+this._linePadding[b||"full"]}_addLineToZone(u,m){u.startBufferLine=Math.min(u.startBufferLine,m),u.endBufferLine=Math.max(u.endBufferLine,m)}}},5744:function(y,a,u){var m=this&&this.__decorate||function(_,E,T,S){var k,D=arguments.length,L=D<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,T):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,E,T,S);else for(var U=_.length-1;U>=0;U--)(k=_[U])&&(L=(D<3?k(L):D>3?k(E,T,L):k(E,T))||L);return D>3&&L&&Object.defineProperty(E,T,L),L},b=this&&this.__param||function(_,E){return function(T,S){E(T,S,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const d=u(5871),w=u(4725),x=u(844),j=u(2585),v={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},p={full:0,left:0,center:0,right:0};let f=a.OverviewRulerRenderer=class extends x.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(_,E,T,S,k,D,L){var F;super(),this._viewportElement=_,this._screenElement=E,this._bufferService=T,this._decorationService=S,this._renderService=k,this._optionsService=D,this._coreBrowserService=L,this._colorZoneStore=new d.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(),(F=this._viewportElement.parentElement)==null||F.insertBefore(this._canvas,this._viewportElement);const U=this._canvas.getContext("2d");if(!U)throw new Error("Ctx cannot be null");this._ctx=U,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,x.toDisposable)(()=>{var P;(P=this._canvas)==null||P.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 _=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=_,o.center=E,o.right=_,this._refreshDrawHeightConstants(),p.full=0,p.left=0,p.center=o.left,p.right=o.left+o.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const _=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(_,12),6)*this._coreBrowserService.dpr);v.left=E,v.center=E,v.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const _=this._colorZoneStore.zones;for(const E of _)E.position!=="full"&&this._renderColorZone(E);for(const E of _)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(_){this._ctx.fillStyle=_.color,this._ctx.fillRect(p[_.position||"full"],Math.round((this._canvas.height-1)*(_.startBufferLine/this._bufferService.buffers.active.lines.length)-v[_.position||"full"]/2),o[_.position||"full"],Math.round((this._canvas.height-1)*((_.endBufferLine-_.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[_.position||"full"]))}_queueRefresh(_,E){this._shouldUpdateDimensions=_||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};a.OverviewRulerRenderer=f=m([b(2,j.IBufferService),b(3,j.IDecorationService),b(4,w.IRenderService),b(5,j.IOptionsService),b(6,w.ICoreBrowserService)],f)},2950:function(y,a,u){var m=this&&this.__decorate||function(v,o,p,f){var _,E=arguments.length,T=E<3?o:f===null?f=Object.getOwnPropertyDescriptor(o,p):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,o,p,f);else for(var S=v.length-1;S>=0;S--)(_=v[S])&&(T=(E<3?_(T):E>3?_(o,p,T):_(o,p))||T);return E>3&&T&&Object.defineProperty(o,p,T),T},b=this&&this.__param||function(v,o){return function(p,f){o(p,f,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const d=u(4725),w=u(2585),x=u(2584);let j=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,o,p,f,_,E){this._textarea=v,this._compositionView=o,this._bufferService=p,this._optionsService=f,this._coreService=_,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(v){this._compositionView.textContent=v.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(v){if(this._isComposing||this._isSendingComposition){if(v.keyCode===229||v.keyCode===16||v.keyCode===17||v.keyCode===18)return!1;this._finalizeComposition(!1)}return v.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(v){if(this._compositionView.classList.remove("active"),this._isComposing=!1,v){const o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let p;this._isSendingComposition=!1,o.start+=this._dataAlreadySent.length,p=this._isComposing?this._textarea.value.substring(o.start,o.end):this._textarea.value.substring(o.start),p.length>0&&this._coreService.triggerDataEvent(p,!0)}},0)}else{this._isSendingComposition=!1;const o=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(o,!0)}}_handleAnyTextareaChanges(){const v=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const o=this._textarea.value,p=o.replace(v,"");this._dataAlreadySent=p,o.length>v.length?this._coreService.triggerDataEvent(p,!0):o.length<v.length?this._coreService.triggerDataEvent(`${x.C0.DEL}`,!0):o.length===v.length&&o!==v&&this._coreService.triggerDataEvent(o,!0)}},0)}updateCompositionElements(v){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),p=this._renderService.dimensions.css.cell.height,f=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,_=o*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=_+"px",this._compositionView.style.top=f+"px",this._compositionView.style.height=p+"px",this._compositionView.style.lineHeight=p+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=_+"px",this._textarea.style.top=f+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}v||setTimeout(()=>this.updateCompositionElements(!0),0)}}};a.CompositionHelper=j=m([b(2,w.IBufferService),b(3,w.IOptionsService),b(4,w.ICoreService),b(5,d.IRenderService)],j)},9806:(y,a)=>{function u(m,b,d){const w=d.getBoundingClientRect(),x=m.getComputedStyle(d),j=parseInt(x.getPropertyValue("padding-left")),v=parseInt(x.getPropertyValue("padding-top"));return[b.clientX-w.left-j,b.clientY-w.top-v]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(m,b,d,w,x,j,v,o,p){if(!j)return;const f=u(m,b,d);return f?(f[0]=Math.ceil((f[0]+(p?v/2:0))/v),f[1]=Math.ceil(f[1]/o),f[0]=Math.min(Math.max(f[0],1),w+(p?1:0)),f[1]=Math.min(Math.max(f[1],1),x),f):void 0}},9504:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const m=u(2584);function b(o,p,f,_){const E=o-d(o,f),T=p-d(p,f),S=Math.abs(E-T)-function(k,D,L){let U=0;const F=k-d(k,L),P=D-d(D,L);for(let I=0;I<Math.abs(F-P);I++){const G=w(k,D)==="A"?-1:1,ie=L.buffer.lines.get(F+G*I);ie!=null&&ie.isWrapped&&U++}return U}(o,p,f);return v(S,j(w(o,p),_))}function d(o,p){let f=0,_=p.buffer.lines.get(o),E=_==null?void 0:_.isWrapped;for(;E&&o>=0&&o<p.rows;)f++,_=p.buffer.lines.get(--o),E=_==null?void 0:_.isWrapped;return f}function w(o,p){return o>p?"A":"B"}function x(o,p,f,_,E,T){let S=o,k=p,D="";for(;S!==f||k!==_;)S+=E?1:-1,E&&S>T.cols-1?(D+=T.buffer.translateBufferLineToString(k,!1,o,S),S=0,o=0,k++):!E&&S<0&&(D+=T.buffer.translateBufferLineToString(k,!1,0,o+1),S=T.cols-1,o=S,k--);return D+T.buffer.translateBufferLineToString(k,!1,o,S)}function j(o,p){const f=p?"O":"[";return m.C0.ESC+f+o}function v(o,p){o=Math.floor(o);let f="";for(let _=0;_<o;_++)f+=p;return f}a.moveToCellSequence=function(o,p,f,_){const E=f.buffer.x,T=f.buffer.y;if(!f.buffer.hasScrollback)return function(D,L,U,F,P,I){return b(L,F,P,I).length===0?"":v(x(D,L,D,L-d(L,P),!1,P).length,j("D",I))}(E,T,0,p,f,_)+b(T,p,f,_)+function(D,L,U,F,P,I){let G;G=b(L,F,P,I).length>0?F-d(F,P):L;const ie=F,q=function(J,X,V,H,K,W){let oe;return oe=b(V,H,K,W).length>0?H-d(H,K):X,J<V&&oe<=H||J>=V&&oe<H?"C":"D"}(D,L,U,F,P,I);return v(x(D,G,U,ie,q==="C",P).length,j(q,I))}(E,T,o,p,f,_);let S;if(T===p)return S=E>o?"D":"C",v(Math.abs(E-o),j(S,_));S=T>p?"D":"C";const k=Math.abs(T-p);return v(function(D,L){return L.cols-D}(T>p?o:E,f)+(k-1)*f.cols+1+((T>p?E:o)-1),j(S,_))}},1296:function(y,a,u){var m=this&&this.__decorate||function(I,G,ie,q){var J,X=arguments.length,V=X<3?G:q===null?q=Object.getOwnPropertyDescriptor(G,ie):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(I,G,ie,q);else for(var H=I.length-1;H>=0;H--)(J=I[H])&&(V=(X<3?J(V):X>3?J(G,ie,V):J(G,ie))||V);return X>3&&V&&Object.defineProperty(G,ie,V),V},b=this&&this.__param||function(I,G){return function(ie,q){G(ie,q,I)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const d=u(3787),w=u(2550),x=u(2223),j=u(6171),v=u(6052),o=u(4725),p=u(8055),f=u(8460),_=u(844),E=u(2585),T="xterm-dom-renderer-owner-",S="xterm-rows",k="xterm-fg-",D="xterm-bg-",L="xterm-focus",U="xterm-selection";let F=1,P=a.DomRenderer=class extends _.Disposable{constructor(I,G,ie,q,J,X,V,H,K,W,oe,de,xe){super(),this._terminal=I,this._document=G,this._element=ie,this._screenElement=q,this._viewportElement=J,this._helperContainer=X,this._linkifier2=V,this._charSizeService=K,this._optionsService=W,this._bufferService=oe,this._coreBrowserService=de,this._themeService=xe,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,v.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new f.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),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(U),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,j.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Se=>this._injectCss(Se))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(d.DomRendererRowFactory,document),this._element.classList.add(T+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Se=>this._handleLinkHover(Se))),this.register(this._linkifier2.onHideLinkUnderline(Se=>this._handleLinkLeave(Se))),this.register((0,_.toDisposable)(()=>{this._element.classList.remove(T+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new w.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 ie of this._rowElements)ie.style.width=`${this.dimensions.css.canvas.width}px`,ie.style.height=`${this.dimensions.css.cell.height}px`,ie.style.lineHeight=`${this.dimensions.css.cell.height}px`,ie.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const G=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=G,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 G=`${this._terminalSelector} .${S} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;G+=`${this._terminalSelector} .${S} .xterm-dim { color: ${p.color.multiplyOpacity(I.foreground,.5).css};}`,G+=`${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 ie=`blink_underline_${this._terminalClass}`,q=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;G+=`@keyframes ${ie} { 50% { border-bottom-style: hidden; }}`,G+=`@keyframes ${q} { 50% { box-shadow: none; }}`,G+=`@keyframes ${J} { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,G+=`${this._terminalSelector} .${S}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ie} 1s step-end infinite;}${this._terminalSelector} .${S}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${S}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,G+=`${this._terminalSelector} .${U} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${U} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${U} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[X,V]of I.ansi.entries())G+=`${this._terminalSelector} .${k}${X} { color: ${V.css}; }${this._terminalSelector} .${k}${X}.xterm-dim { color: ${p.color.multiplyOpacity(V,.5).css}; }${this._terminalSelector} .${D}${X} { background-color: ${V.css}; }`;G+=`${this._terminalSelector} .${k}${x.INVERTED_DEFAULT_COLOR} { color: ${p.color.opaque(I.background).css}; }${this._terminalSelector} .${k}${x.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${p.color.multiplyOpacity(p.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${D}${x.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=G}_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,G){for(let ie=this._rowElements.length;ie<=G;ie++){const q=this._document.createElement("div");this._rowContainer.appendChild(q),this._rowElements.push(q)}for(;this._rowElements.length>G;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,G){this._refreshRowElements(I,G),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(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,G,ie){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,G,ie),this.renderRows(0,this._bufferService.rows-1),!I||!G)return;this._selectionRenderModel.update(this._terminal,I,G,ie);const q=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,X=this._selectionRenderModel.viewportCappedStartRow,V=this._selectionRenderModel.viewportCappedEndRow;if(X>=this._bufferService.rows||V<0)return;const H=this._document.createDocumentFragment();if(ie){const K=I[0]>G[0];H.appendChild(this._createSelectionElement(X,K?G[0]:I[0],K?I[0]:G[0],V-X+1))}else{const K=q===X?I[0]:0,W=X===J?G[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(X,K,W));const oe=V-X-1;if(H.appendChild(this._createSelectionElement(X+1,0,this._bufferService.cols,oe)),X!==V){const de=J===V?G[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(V,0,de))}}this._selectionContainer.appendChild(H)}_createSelectionElement(I,G,ie,q=1){const J=this._document.createElement("div"),X=G*this.dimensions.css.cell.width;let V=this.dimensions.css.cell.width*(ie-G);return X+V>this.dimensions.css.canvas.width&&(V=this.dimensions.css.canvas.width-X),J.style.height=q*this.dimensions.css.cell.height+"px",J.style.top=I*this.dimensions.css.cell.height+"px",J.style.left=`${X}px`,J.style.width=`${V}px`,J}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,G){const ie=this._bufferService.buffer,q=ie.ybase+ie.y,J=Math.min(ie.x,this._bufferService.cols-1),X=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let K=I;K<=G;K++){const W=K+ie.ydisp,oe=this._rowElements[K],de=ie.lines.get(W);if(!oe||!de)break;oe.replaceChildren(...this._rowFactory.createRow(de,W,W===q,V,H,J,X,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${T}${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,G,ie,q,J,X){ie<0&&(I=0),q<0&&(G=0);const V=this._bufferService.rows-1;ie=Math.max(Math.min(ie,V),0),q=Math.max(Math.min(q,V),0),J=Math.min(J,this._bufferService.cols);const H=this._bufferService.buffer,K=H.ybase+H.y,W=Math.min(H.x,J-1),oe=this._optionsService.rawOptions.cursorBlink,de=this._optionsService.rawOptions.cursorStyle,xe=this._optionsService.rawOptions.cursorInactiveStyle;for(let Se=ie;Se<=q;++Se){const se=Se+H.ydisp,Y=this._rowElements[Se],pe=H.lines.get(se);if(!Y||!pe)break;Y.replaceChildren(...this._rowFactory.createRow(pe,se,se===K,de,xe,W,oe,this.dimensions.css.cell.width,this._widthCache,X?Se===ie?I:0:-1,X?(Se===q?G:J)-1:-1))}}};a.DomRenderer=P=m([b(7,E.IInstantiationService),b(8,o.ICharSizeService),b(9,E.IOptionsService),b(10,E.IBufferService),b(11,o.ICoreBrowserService),b(12,o.IThemeService)],P)},3787:function(y,a,u){var m=this&&this.__decorate||function(S,k,D,L){var U,F=arguments.length,P=F<3?k:L===null?L=Object.getOwnPropertyDescriptor(k,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(S,k,D,L);else for(var I=S.length-1;I>=0;I--)(U=S[I])&&(P=(F<3?U(P):F>3?U(k,D,P):U(k,D))||P);return F>3&&P&&Object.defineProperty(k,D,P),P},b=this&&this.__param||function(S,k){return function(D,L){k(D,L,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const d=u(2223),w=u(643),x=u(511),j=u(2585),v=u(8055),o=u(4725),p=u(4269),f=u(6171),_=u(3734);let E=a.DomRendererRowFactory=class{constructor(S,k,D,L,U,F,P){this._document=S,this._characterJoinerService=k,this._optionsService=D,this._coreBrowserService=L,this._coreService=U,this._decorationService=F,this._themeService=P,this._workCell=new x.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,k,D){this._selectionStart=S,this._selectionEnd=k,this._columnSelectMode=D}createRow(S,k,D,L,U,F,P,I,G,ie,q){const J=[],X=this._characterJoinerService.getJoinedCharacters(k),V=this._themeService.colors;let H,K=S.getNoBgTrimmedLength();D&&K<F+1&&(K=F+1);let W=0,oe="",de=0,xe=0,Se=0,se=!1,Y=0,pe=!1,he=0;const He=[],Oe=ie!==-1&&q!==-1;for(let et=0;et<K;et++){S.loadCell(et,this._workCell);let ve=this._workCell.getWidth();if(ve===0)continue;let Ke=!1,tt=et,Xe=this._workCell;if(X.length>0&&et===X[0][0]){Ke=!0;const Pe=X.shift();Xe=new p.JoinedCellData(this._workCell,S.translateToString(!0,Pe[0],Pe[1]),Pe[1]-Pe[0]),tt=Pe[1]-1,ve=Xe.getWidth()}const Bt=this._isCellInSelection(et,k),Tt=D&&et===F,le=Oe&&et>=ie&&et<=q;let Re=!1;this._decorationService.forEachDecorationAtCell(et,k,void 0,Pe=>{Re=!0});let ze=Xe.getChars()||w.WHITESPACE_CELL_CHAR;if(ze===" "&&(Xe.isUnderline()||Xe.isOverline())&&(ze=" "),he=ve*I-G.get(ze,Xe.isBold(),Xe.isItalic()),H){if(W&&(Bt&&pe||!Bt&&!pe&&Xe.bg===de)&&(Bt&&pe&&V.selectionForeground||Xe.fg===xe)&&Xe.extended.ext===Se&&le===se&&he===Y&&!Tt&&!Ke&&!Re){Xe.isInvisible()?oe+=w.WHITESPACE_CELL_CHAR:oe+=ze,W++;continue}W&&(H.textContent=oe),H=this._document.createElement("span"),W=0,oe=""}else H=this._document.createElement("span");if(de=Xe.bg,xe=Xe.fg,Se=Xe.extended.ext,se=le,Y=he,pe=Bt,Ke&&F>=et&&F<=tt&&(F=et),!this._coreService.isCursorHidden&&Tt&&this._coreService.isCursorInitialized){if(He.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&He.push("xterm-cursor-blink"),He.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(U)switch(U){case"outline":He.push("xterm-cursor-outline");break;case"block":He.push("xterm-cursor-block");break;case"bar":He.push("xterm-cursor-bar");break;case"underline":He.push("xterm-cursor-underline")}}if(Xe.isBold()&&He.push("xterm-bold"),Xe.isItalic()&&He.push("xterm-italic"),Xe.isDim()&&He.push("xterm-dim"),oe=Xe.isInvisible()?w.WHITESPACE_CELL_CHAR:Xe.getChars()||w.WHITESPACE_CELL_CHAR,Xe.isUnderline()&&(He.push(`xterm-underline-${Xe.extended.underlineStyle}`),oe===" "&&(oe=" "),!Xe.isUnderlineColorDefault()))if(Xe.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${_.AttributeData.toColorRGB(Xe.getUnderlineColor()).join(",")})`;else{let Pe=Xe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Xe.isBold()&&Pe<8&&(Pe+=8),H.style.textDecorationColor=V.ansi[Pe].css}Xe.isOverline()&&(He.push("xterm-overline"),oe===" "&&(oe=" ")),Xe.isStrikethrough()&&He.push("xterm-strikethrough"),le&&(H.style.textDecoration="underline");let Me=Xe.getFgColor(),$e=Xe.getFgColorMode(),at=Xe.getBgColor(),ct=Xe.getBgColorMode();const Te=!!Xe.isInverse();if(Te){const Pe=Me;Me=at,at=Pe;const xt=$e;$e=ct,ct=xt}let we,Je,_e,Z=!1;switch(this._decorationService.forEachDecorationAtCell(et,k,void 0,Pe=>{Pe.options.layer!=="top"&&Z||(Pe.backgroundColorRGB&&(ct=50331648,at=Pe.backgroundColorRGB.rgba>>8&16777215,we=Pe.backgroundColorRGB),Pe.foregroundColorRGB&&($e=50331648,Me=Pe.foregroundColorRGB.rgba>>8&16777215,Je=Pe.foregroundColorRGB),Z=Pe.options.layer==="top")}),!Z&&Bt&&(we=this._coreBrowserService.isFocused?V.selectionBackgroundOpaque:V.selectionInactiveBackgroundOpaque,at=we.rgba>>8&16777215,ct=50331648,Z=!0,V.selectionForeground&&($e=50331648,Me=V.selectionForeground.rgba>>8&16777215,Je=V.selectionForeground)),Z&&He.push("xterm-decoration-top"),ct){case 16777216:case 33554432:_e=V.ansi[at],He.push(`xterm-bg-${at}`);break;case 50331648:_e=v.channels.toColor(at>>16,at>>8&255,255&at),this._addStyle(H,`background-color:#${T((at>>>0).toString(16),"0",6)}`);break;default:Te?(_e=V.foreground,He.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):_e=V.background}switch(we||Xe.isDim()&&(we=v.color.multiplyOpacity(_e,.5)),$e){case 16777216:case 33554432:Xe.isBold()&&Me<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Me+=8),this._applyMinimumContrast(H,_e,V.ansi[Me],Xe,we,void 0)||He.push(`xterm-fg-${Me}`);break;case 50331648:const Pe=v.channels.toColor(Me>>16&255,Me>>8&255,255&Me);this._applyMinimumContrast(H,_e,Pe,Xe,we,Je)||this._addStyle(H,`color:#${T(Me.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,_e,V.foreground,Xe,we,Je)||Te&&He.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}He.length&&(H.className=He.join(" "),He.length=0),Tt||Ke||Re?H.textContent=oe:W++,he!==this.defaultSpacing&&(H.style.letterSpacing=`${he}px`),J.push(H),et=tt}return H&&W&&(H.textContent=oe),J}_applyMinimumContrast(S,k,D,L,U,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.treatGlyphAsBackgroundColor)(L.getCode()))return!1;const P=this._getContrastCache(L);let I;if(U||F||(I=P.getColor(k.rgba,D.rgba)),I===void 0){const G=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);I=v.color.ensureContrastRatio(U||k,F||D,G),P.setColor((U||k).rgba,(F||D).rgba,I??null)}return!!I&&(this._addStyle(S,`color:${I.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,k){S.setAttribute("style",`${S.getAttribute("style")||""}${k};`)}_isCellInSelection(S,k){const D=this._selectionStart,L=this._selectionEnd;return!(!D||!L)&&(this._columnSelectMode?D[0]<=L[0]?S>=D[0]&&k>=D[1]&&S<L[0]&&k<=L[1]:S<D[0]&&k>=D[1]&&S>=L[0]&&k<=L[1]:k>D[1]&&k<L[1]||D[1]===L[1]&&k===D[1]&&S>=D[0]&&S<L[0]||D[1]<L[1]&&k===L[1]&&S<L[0]||D[1]<L[1]&&k===D[1]&&S>=D[0])}};function T(S,k,D){for(;S.length<D;)S=k+S;return S}a.DomRendererRowFactory=E=m([b(1,o.ICharacterJoinerService),b(2,j.IOptionsService),b(3,o.ICoreBrowserService),b(4,j.ICoreService),b(5,j.IDecorationService),b(6,o.IThemeService)],E)},2550:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,m){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 b=u.createElement("span");b.classList.add("xterm-char-measure-element");const d=u.createElement("span");d.classList.add("xterm-char-measure-element"),d.style.fontWeight="bold";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.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=[b,d,w,x],this._container.appendChild(b),this._container.appendChild(d),this._container.appendChild(w),this._container.appendChild(x),m.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,m,b,d){u===this._font&&m===this._fontSize&&b===this._weight&&d===this._weightBold||(this._font=u,this._fontSize=m,this._weight=b,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${b}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${b}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(u,m,b){let d=0;if(!m&&!b&&u.length===1&&(d=u.charCodeAt(0))<256){if(this._flat[d]!==-9999)return this._flat[d];const j=this._measure(u,0);return j>0&&(this._flat[d]=j),j}let w=u;m&&(w+="B"),b&&(w+="I");let x=this._holey.get(w);if(x===void 0){let j=0;m&&(j|=1),b&&(j|=2),x=this._measure(u,j),x>0&&this._holey.set(w,x)}return x}_measure(u,m){const b=this._measureElements[m];return b.textContent=u.repeat(32),b.offsetWidth/32}}},2223:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const m=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=m.isFirefox||m.isLegacyEdge?"bottom":"ideographic"},6171:(y,a)=>{function u(b){return 57508<=b&&b<=57558}function m(b){return b>=128512&&b<=128591||b>=127744&&b<=128511||b>=128640&&b<=128767||b>=9728&&b<=9983||b>=9984&&b<=10175||b>=65024&&b<=65039||b>=129280&&b<=129535||b>=127462&&b<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(b){if(!b)throw new Error("value must not be falsy");return b},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(b){return 57520<=b&&b<=57527},a.isEmoji=m,a.allowRescaling=function(b,d,w,x){return d===1&&w>Math.ceil(1.5*x)&&b!==void 0&&b>255&&!m(b)&&!u(b)&&!function(j){return 57344<=j&&j<=63743}(b)},a.treatGlyphAsBackgroundColor=function(b){return u(b)||function(d){return 9472<=d&&d<=9631}(b)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(b,d,w=0){return(b-(2*Math.round(d)-w))%(2*Math.round(d))}},6052:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.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(b,d,w,x=!1){if(this.selectionStart=d,this.selectionEnd=w,!d||!w||d[0]===w[0]&&d[1]===w[1])return void this.clear();const j=b.buffers.active.ydisp,v=d[1]-j,o=w[1]-j,p=Math.max(v,0),f=Math.min(o,b.rows-1);p>=b.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=x,this.viewportStartRow=v,this.viewportEndRow=o,this.viewportCappedStartRow=p,this.viewportCappedEndRow=f,this.startCol=d[0],this.endCol=w[0])}isCellSelected(b,d,w){return!!this.hasSelection&&(w-=b.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&w>=this.viewportCappedStartRow&&d<this.endCol&&w<=this.viewportCappedEndRow:d<this.startCol&&w>=this.viewportCappedStartRow&&d>=this.endCol&&w<=this.viewportCappedEndRow:w>this.viewportStartRow&&w<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&w===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&w===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&w===this.viewportStartRow&&d>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.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,m=this.selectionEnd;return!(!u||!m)&&(u[1]>m[1]||u[1]===m[1]&&u[0]>m[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(y,a,u){var m=this&&this.__decorate||function(f,_,E,T){var S,k=arguments.length,D=k<3?_:T===null?T=Object.getOwnPropertyDescriptor(_,E):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,_,E,T);else for(var L=f.length-1;L>=0;L--)(S=f[L])&&(D=(k<3?S(D):k>3?S(_,E,D):S(_,E))||D);return k>3&&D&&Object.defineProperty(_,E,D),D},b=this&&this.__param||function(f,_){return function(E,T){_(E,T,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const d=u(2585),w=u(8460),x=u(844);let j=a.CharSizeService=class extends x.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(f,_,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new w.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new p(this._optionsService))}catch{this._measureStrategy=this.register(new o(f,_,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const f=this._measureStrategy.measure();f.width===this.width&&f.height===this.height||(this.width=f.width,this.height=f.height,this._onCharSizeChange.fire())}};a.CharSizeService=j=m([b(2,d.IOptionsService)],j);class v extends x.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(_,E){_!==void 0&&_>0&&E!==void 0&&E>0&&(this._result.width=_,this._result.height=E)}}class o extends v{constructor(_,E,T){super(),this._document=_,this._parentElement=E,this._optionsService=T,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 p extends v{constructor(_){super(),this._optionsService=_,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const _=this._ctx.measureText("W");return this._validateAndSet(_.width,_.fontBoundingBoxAscent+_.fontBoundingBoxDescent),this._result}}},4269:function(y,a,u){var m=this&&this.__decorate||function(p,f,_,E){var T,S=arguments.length,k=S<3?f:E===null?E=Object.getOwnPropertyDescriptor(f,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,f,_,E);else for(var D=p.length-1;D>=0;D--)(T=p[D])&&(k=(S<3?T(k):S>3?T(f,_,k):T(f,_))||k);return S>3&&k&&Object.defineProperty(f,_,k),k},b=this&&this.__param||function(p,f){return function(_,E){f(_,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const d=u(3734),w=u(643),x=u(511),j=u(2585);class v extends d.AttributeData{constructor(f,_,E){super(),this.content=0,this.combinedData="",this.fg=f.fg,this.bg=f.bg,this.combinedData=_,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(f){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=v;let o=a.CharacterJoinerService=class oE{constructor(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new x.CellData}register(f){const _={id:this._nextCharacterJoinerId++,handler:f};return this._characterJoiners.push(_),_.id}deregister(f){for(let _=0;_<this._characterJoiners.length;_++)if(this._characterJoiners[_].id===f)return this._characterJoiners.splice(_,1),!0;return!1}getJoinedCharacters(f){if(this._characterJoiners.length===0)return[];const _=this._bufferService.buffer.lines.get(f);if(!_||_.length===0)return[];const E=[],T=_.translateToString(!0);let S=0,k=0,D=0,L=_.getFg(0),U=_.getBg(0);for(let F=0;F<_.getTrimmedLength();F++)if(_.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==U){if(F-S>1){const P=this._getJoinedRanges(T,D,k,_,S);for(let I=0;I<P.length;I++)E.push(P[I])}S=F,D=k,L=this._workCell.fg,U=this._workCell.bg}k+=this._workCell.getChars().length||w.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const F=this._getJoinedRanges(T,D,k,_,S);for(let P=0;P<F.length;P++)E.push(F[P])}return E}_getJoinedRanges(f,_,E,T,S){const k=f.substring(_,E);let D=[];try{D=this._characterJoiners[0].handler(k)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const U=this._characterJoiners[L].handler(k);for(let F=0;F<U.length;F++)oE._mergeRanges(D,U[F])}catch(U){console.error(U)}return this._stringRangesToCellRanges(D,T,S),D}_stringRangesToCellRanges(f,_,E){let T=0,S=!1,k=0,D=f[T];if(D){for(let L=E;L<this._bufferService.cols;L++){const U=_.getWidth(L),F=_.getString(L).length||w.WHITESPACE_CELL_CHAR.length;if(U!==0){if(!S&&D[0]<=k&&(D[0]=L,S=!0),D[1]<=k){if(D[1]=L,D=f[++T],!D)break;D[0]<=k?(D[0]=L,S=!0):S=!1}k+=F}}D&&(D[1]=this._bufferService.cols)}}static _mergeRanges(f,_){let E=!1;for(let T=0;T<f.length;T++){const S=f[T];if(E){if(_[1]<=S[0])return f[T-1][1]=_[1],f;if(_[1]<=S[1])return f[T-1][1]=Math.max(_[1],S[1]),f.splice(T,1),f;f.splice(T,1),T--}else{if(_[1]<=S[0])return f.splice(T,0,_),f;if(_[1]<=S[1])return S[0]=Math.min(_[0],S[0]),f;_[0]<S[1]&&(S[0]=Math.min(_[0],S[0]),E=!0)}}return E?f[f.length-1][1]=_[1]:f.push(_),f}};a.CharacterJoinerService=o=m([b(0,j.IBufferService)],o)},5114:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const m=u(844),b=u(8460),d=u(3656);class w extends m.Disposable{constructor(v,o,p){super(),this._textarea=v,this._window=o,this.mainDocument=p,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new x(this._window),this._onDprChange=this.register(new b.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new b.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(f=>this._screenDprMonitor.setWindow(f))),this.register((0,b.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(v){this._window!==v&&(this._window=v,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}a.CoreBrowserService=w;class x extends m.Disposable{constructor(v){super(),this._parentWindow=v,this._windowResizeListener=this.register(new m.MutableDisposable),this._onDprChange=this.register(new b.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,m.toDisposable)(()=>this.clearListener()))}setWindow(v){this._parentWindow=v,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,d.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)==null||v.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:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const m=u(844);class b extends m.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,m.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(w){return this.linkProviders.push(w),{dispose:()=>{const x=this.linkProviders.indexOf(w);x!==-1&&this.linkProviders.splice(x,1)}}}}a.LinkProviderService=b},8934:function(y,a,u){var m=this&&this.__decorate||function(j,v,o,p){var f,_=arguments.length,E=_<3?v:p===null?p=Object.getOwnPropertyDescriptor(v,o):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(j,v,o,p);else for(var T=j.length-1;T>=0;T--)(f=j[T])&&(E=(_<3?f(E):_>3?f(v,o,E):f(v,o))||E);return _>3&&E&&Object.defineProperty(v,o,E),E},b=this&&this.__param||function(j,v){return function(o,p){v(o,p,j)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const d=u(4725),w=u(9806);let x=a.MouseService=class{constructor(j,v){this._renderService=j,this._charSizeService=v}getCoords(j,v,o,p,f){return(0,w.getCoords)(window,j,v,o,p,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,f)}getMouseReportCoords(j,v){const o=(0,w.getCoordsRelativeToElement)(window,j,v);if(this._charSizeService.hasValidSize)return o[0]=Math.min(Math.max(o[0],0),this._renderService.dimensions.css.canvas.width-1),o[1]=Math.min(Math.max(o[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(o[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(o[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(o[0]),y:Math.floor(o[1])}}};a.MouseService=x=m([b(0,d.IRenderService),b(1,d.ICharSizeService)],x)},3230:function(y,a,u){var m=this&&this.__decorate||function(f,_,E,T){var S,k=arguments.length,D=k<3?_:T===null?T=Object.getOwnPropertyDescriptor(_,E):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,_,E,T);else for(var L=f.length-1;L>=0;L--)(S=f[L])&&(D=(k<3?S(D):k>3?S(_,E,D):S(_,E))||D);return k>3&&D&&Object.defineProperty(_,E,D),D},b=this&&this.__param||function(f,_){return function(E,T){_(E,T,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const d=u(6193),w=u(4725),x=u(8460),j=u(844),v=u(7226),o=u(2585);let p=a.RenderService=class extends j.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(f,_,E,T,S,k,D,L){super(),this._rowCount=f,this._charSizeService=T,this._renderer=this.register(new j.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new j.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 d.RenderDebouncer((U,F)=>this._renderRows(U,F),D),this.register(this._renderDebouncer),this.register(D.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(k.onResize(()=>this._fullRefresh())),this.register(k.buffers.onBufferActivate(()=>{var U;return(U=this._renderer.value)==null?void 0:U.clear()})),this.register(E.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(S.onDecorationRegistered(()=>this._fullRefresh())),this.register(S.onDecorationRemoved(()=>this._fullRefresh())),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(k.cols,k.rows),this._fullRefresh()})),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(k.buffer.y,k.buffer.y,!0))),this.register(L.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(D.window,_),this.register(D.onWindowChange(U=>this._registerIntersectionObserver(U,_)))}_registerIntersectionObserver(f,_){if("IntersectionObserver"in f){const E=new f.IntersectionObserver(T=>this._handleIntersectionChange(T[T.length-1]),{threshold:0});E.observe(_),this._observerDisposable.value=(0,j.toDisposable)(()=>E.disconnect())}}_handleIntersectionChange(f){this._isPaused=f.isIntersecting===void 0?f.intersectionRatio===0:!f.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(f,_,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(f,_,this._rowCount))}_renderRows(f,_){this._renderer.value&&(f=Math.min(f,this._rowCount-1),_=Math.min(_,this._rowCount-1),this._renderer.value.renderRows(f,_),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:f,end:_}),this._onRender.fire({start:f,end:_}),this._isNextRenderRedrawOnly=!0)}resize(f,_){this._rowCount=_,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(f){this._renderer.value=f,this._renderer.value&&(this._renderer.value.onRequestRedraw(_=>this.refreshRows(_.start,_.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(f){return this._renderDebouncer.addRefreshCallback(f)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var f,_;this._renderer.value&&((_=(f=this._renderer.value).clearTextureAtlas)==null||_.call(f),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(f,_){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(f,_)}):this._renderer.value.handleResize(f,_),this._fullRefresh())}handleCharSizeChanged(){var f;(f=this._renderer.value)==null||f.handleCharSizeChanged()}handleBlur(){var f;(f=this._renderer.value)==null||f.handleBlur()}handleFocus(){var f;(f=this._renderer.value)==null||f.handleFocus()}handleSelectionChanged(f,_,E){var T;this._selectionState.start=f,this._selectionState.end=_,this._selectionState.columnSelectMode=E,(T=this._renderer.value)==null||T.handleSelectionChanged(f,_,E)}handleCursorMove(){var f;(f=this._renderer.value)==null||f.handleCursorMove()}clear(){var f;(f=this._renderer.value)==null||f.clear()}};a.RenderService=p=m([b(2,o.IOptionsService),b(3,w.ICharSizeService),b(4,o.IDecorationService),b(5,o.IBufferService),b(6,w.ICoreBrowserService),b(7,w.IThemeService)],p)},9312:function(y,a,u){var m=this&&this.__decorate||function(D,L,U,F){var P,I=arguments.length,G=I<3?L:F===null?F=Object.getOwnPropertyDescriptor(L,U):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(D,L,U,F);else for(var ie=D.length-1;ie>=0;ie--)(P=D[ie])&&(G=(I<3?P(G):I>3?P(L,U,G):P(L,U))||G);return I>3&&G&&Object.defineProperty(L,U,G),G},b=this&&this.__param||function(D,L){return function(U,F){L(U,F,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const d=u(9806),w=u(9504),x=u(456),j=u(4725),v=u(8460),o=u(844),p=u(6114),f=u(4841),_=u(511),E=u(2585),T=" ",S=new RegExp(T,"g");let k=a.SelectionService=class extends o.Disposable{constructor(D,L,U,F,P,I,G,ie,q){super(),this._element=D,this._screenElement=L,this._linkifier=U,this._bufferService=F,this._coreService=P,this._mouseService=I,this._optionsService=G,this._renderService=ie,this._coreBrowserService=q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new _.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new v.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new v.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new v.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new v.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(J=>this._handleTrim(J)),this.register(this._bufferService.buffers.onBufferActivate(J=>this._handleBufferActivate(J))),this.enable(),this._model=new x.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,o.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 D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!D||!L||D[0]===L[0]&&D[1]===L[1])}get selectionText(){const D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!D||!L)return"";const U=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(D[0]===L[0])return"";const P=D[0]<L[0]?D[0]:L[0],I=D[0]<L[0]?L[0]:D[0];for(let G=D[1];G<=L[1];G++){const ie=U.translateBufferLineToString(G,!0,P,I);F.push(ie)}}else{const P=D[1]===L[1]?L[0]:void 0;F.push(U.translateBufferLineToString(D[1],!0,D[0],P));for(let I=D[1]+1;I<=L[1]-1;I++){const G=U.lines.get(I),ie=U.translateBufferLineToString(I,!0);G!=null&&G.isWrapped?F[F.length-1]+=ie:F.push(ie)}if(D[1]!==L[1]){const I=U.lines.get(L[1]),G=U.translateBufferLineToString(L[1],!0,0,L[0]);I&&I.isWrapped?F[F.length-1]+=G:F.push(G)}}return F.map(P=>P.replace(S," ")).join(p.isWindows?`\r
219
+ `:`
220
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(D){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),p.isLinux&&D&&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(D){const L=this._getMouseBufferCoords(D),U=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(U&&F&&L)&&this._areCoordsInSelection(L,U,F)}isCellInSelection(D,L){const U=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!U||!F)&&this._areCoordsInSelection([D,L],U,F)}_areCoordsInSelection(D,L,U){return D[1]>L[1]&&D[1]<U[1]||L[1]===U[1]&&D[1]===L[1]&&D[0]>=L[0]&&D[0]<U[0]||L[1]<U[1]&&D[1]===U[1]&&D[0]<U[0]||L[1]<U[1]&&D[1]===L[1]&&D[0]>=L[0]}_selectWordAtCursor(D,L){var P,I;const U=(I=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:I.range;if(U)return this._model.selectionStart=[U.start.x-1,U.start.y-1],this._model.selectionStartLength=(0,f.getRangeLength)(U,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(D);return!!F&&(this._selectWordAt(F,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(D,L){this._model.clearSelection(),D=Math.max(D,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,D],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(D){this._model.handleTrim(D)&&this.refresh()}_getMouseBufferCoords(D){const L=this._mouseService.getCoords(D,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(D){let L=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,D,this._screenElement)[1];const U=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=U?0:(L>U&&(L-=U),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(D){return p.isMac?D.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:D.shiftKey}handleMouseDown(D){if(this._mouseDownTimeStamp=D.timeStamp,(D.button!==2||!this.hasSelection)&&D.button===0){if(!this._enabled){if(!this.shouldForceSelection(D))return;D.stopPropagation()}D.preventDefault(),this._dragScrollAmount=0,this._enabled&&D.shiftKey?this._handleIncrementalClick(D):D.detail===1?this._handleSingleClick(D):D.detail===2?this._handleDoubleClick(D):D.detail===3&&this._handleTripleClick(D),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(D){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(D))}_handleSingleClick(D){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(D)?3:0,this._model.selectionStart=this._getMouseBufferCoords(D),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(D){this._selectWordAtCursor(D,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(D){const L=this._getMouseBufferCoords(D);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(D){return D.altKey&&!(p.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(D){if(D.stopImmediatePropagation(),!this._model.selectionStart)return;const L=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(D),!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(D),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const U=this._bufferService.buffer;if(this._model.selectionEnd[1]<U.lines.length){const F=U.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}L&&L[0]===this._model.selectionEnd[0]&&L[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 D=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(D.ydisp+this._bufferService.rows,D.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=D.ydisp),this.refresh()}}_handleMouseUp(D){const L=D.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&D.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const U=this._mouseService.getCoords(D,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(U&&U[0]!==void 0&&U[1]!==void 0){const F=(0,w.moveToCellSequence)(U[0]-1,U[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,U=!(!D||!L||D[0]===L[0]&&D[1]===L[1]);U?D&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&D[0]===this._oldSelectionStart[0]&&D[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(D,L,U)):this._oldHasSelection&&this._fireOnSelectionChange(D,L,U)}_fireOnSelectionChange(D,L,U){this._oldSelectionStart=D,this._oldSelectionEnd=L,this._oldHasSelection=U,this._onSelectionChange.fire()}_handleBufferActivate(D){this.clearSelection(),this._trimListener.dispose(),this._trimListener=D.activeBuffer.lines.onTrim(L=>this._handleTrim(L))}_convertViewportColToCharacterIndex(D,L){let U=L;for(let F=0;L>=F;F++){const P=D.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?U--:P>1&&L!==F&&(U+=P-1)}return U}setSelection(D,L,U){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[D,L],this._model.selectionStartLength=U,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(D){this._isClickInSelection(D)||(this._selectWordAtCursor(D,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(D,L,U=!0,F=!0){if(D[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,I=P.lines.get(D[1]);if(!I)return;const G=P.translateBufferLineToString(D[1],!1);let ie=this._convertViewportColToCharacterIndex(I,D[0]),q=ie;const J=D[0]-ie;let X=0,V=0,H=0,K=0;if(G.charAt(ie)===" "){for(;ie>0&&G.charAt(ie-1)===" ";)ie--;for(;q<G.length&&G.charAt(q+1)===" ";)q++}else{let de=D[0],xe=D[0];I.getWidth(de)===0&&(X++,de--),I.getWidth(xe)===2&&(V++,xe++);const Se=I.getString(xe).length;for(Se>1&&(K+=Se-1,q+=Se-1);de>0&&ie>0&&!this._isCharWordSeparator(I.loadCell(de-1,this._workCell));){I.loadCell(de-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(X++,de--):se>1&&(H+=se-1,ie-=se-1),ie--,de--}for(;xe<I.length&&q+1<G.length&&!this._isCharWordSeparator(I.loadCell(xe+1,this._workCell));){I.loadCell(xe+1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===2?(V++,xe++):se>1&&(K+=se-1,q+=se-1),q++,xe++}}q++;let W=ie+J-X+H,oe=Math.min(this._bufferService.cols,q-ie+X+V-H-K);if(L||G.slice(ie,q).trim()!==""){if(U&&W===0&&I.getCodePoint(0)!==32){const de=P.lines.get(D[1]-1);if(de&&I.isWrapped&&de.getCodePoint(this._bufferService.cols-1)!==32){const xe=this._getWordAt([this._bufferService.cols-1,D[1]-1],!1,!0,!1);if(xe){const Se=this._bufferService.cols-xe.start;W-=Se,oe+=Se}}}if(F&&W+oe===this._bufferService.cols&&I.getCodePoint(this._bufferService.cols-1)!==32){const de=P.lines.get(D[1]+1);if(de!=null&&de.isWrapped&&de.getCodePoint(0)!==32){const xe=this._getWordAt([0,D[1]+1],!1,!1,!0);xe&&(oe+=xe.length)}}return{start:W,length:oe}}}_selectWordAt(D,L){const U=this._getWordAt(D,L);if(U){for(;U.start<0;)U.start+=this._bufferService.cols,D[1]--;this._model.selectionStart=[U.start,D[1]],this._model.selectionStartLength=U.length}}_selectToWordAt(D){const L=this._getWordAt(D,!0);if(L){let U=D[1];for(;L.start<0;)L.start+=this._bufferService.cols,U--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,U++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,U]}}_isCharWordSeparator(D){return D.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(D.getChars())>=0}_selectLineAt(D){const L=this._bufferService.buffer.getWrappedRangeForLine(D),U={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,f.getRangeLength)(U,this._bufferService.cols)}};a.SelectionService=k=m([b(3,E.IBufferService),b(4,E.ICoreService),b(5,j.IMouseService),b(6,E.IOptionsService),b(7,j.IRenderService),b(8,j.ICoreBrowserService)],k)},4725:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const m=u(8343);a.ICharSizeService=(0,m.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,m.createDecorator)("CoreBrowserService"),a.IMouseService=(0,m.createDecorator)("MouseService"),a.IRenderService=(0,m.createDecorator)("RenderService"),a.ISelectionService=(0,m.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,m.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,m.createDecorator)("ThemeService"),a.ILinkProviderService=(0,m.createDecorator)("LinkProviderService")},6731:function(y,a,u){var m=this&&this.__decorate||function(k,D,L,U){var F,P=arguments.length,I=P<3?D:U===null?U=Object.getOwnPropertyDescriptor(D,L):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(k,D,L,U);else for(var G=k.length-1;G>=0;G--)(F=k[G])&&(I=(P<3?F(I):P>3?F(D,L,I):F(D,L))||I);return P>3&&I&&Object.defineProperty(D,L,I),I},b=this&&this.__param||function(k,D){return function(L,U){D(L,U,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const d=u(7239),w=u(8055),x=u(8460),j=u(844),v=u(2585),o=w.css.toColor("#ffffff"),p=w.css.toColor("#000000"),f=w.css.toColor("#ffffff"),_=w.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const k=[w.css.toColor("#2e3436"),w.css.toColor("#cc0000"),w.css.toColor("#4e9a06"),w.css.toColor("#c4a000"),w.css.toColor("#3465a4"),w.css.toColor("#75507b"),w.css.toColor("#06989a"),w.css.toColor("#d3d7cf"),w.css.toColor("#555753"),w.css.toColor("#ef2929"),w.css.toColor("#8ae234"),w.css.toColor("#fce94f"),w.css.toColor("#729fcf"),w.css.toColor("#ad7fa8"),w.css.toColor("#34e2e2"),w.css.toColor("#eeeeec")],D=[0,95,135,175,215,255];for(let L=0;L<216;L++){const U=D[L/36%6|0],F=D[L/6%6|0],P=D[L%6];k.push({css:w.channels.toCss(U,F,P),rgba:w.channels.toRgba(U,F,P)})}for(let L=0;L<24;L++){const U=8+10*L;k.push({css:w.channels.toCss(U,U,U),rgba:w.channels.toRgba(U,U,U)})}return k})());let T=a.ThemeService=class extends j.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new x.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:o,background:p,cursor:f,cursorAccent:_,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:w.color.blend(p,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:w.color.blend(p,E),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(k={}){const D=this._colors;if(D.foreground=S(k.foreground,o),D.background=S(k.background,p),D.cursor=S(k.cursor,f),D.cursorAccent=S(k.cursorAccent,_),D.selectionBackgroundTransparent=S(k.selectionBackground,E),D.selectionBackgroundOpaque=w.color.blend(D.background,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundTransparent=S(k.selectionInactiveBackground,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundOpaque=w.color.blend(D.background,D.selectionInactiveBackgroundTransparent),D.selectionForeground=k.selectionForeground?S(k.selectionForeground,w.NULL_COLOR):void 0,D.selectionForeground===w.NULL_COLOR&&(D.selectionForeground=void 0),w.color.isOpaque(D.selectionBackgroundTransparent)&&(D.selectionBackgroundTransparent=w.color.opacity(D.selectionBackgroundTransparent,.3)),w.color.isOpaque(D.selectionInactiveBackgroundTransparent)&&(D.selectionInactiveBackgroundTransparent=w.color.opacity(D.selectionInactiveBackgroundTransparent,.3)),D.ansi=a.DEFAULT_ANSI_COLORS.slice(),D.ansi[0]=S(k.black,a.DEFAULT_ANSI_COLORS[0]),D.ansi[1]=S(k.red,a.DEFAULT_ANSI_COLORS[1]),D.ansi[2]=S(k.green,a.DEFAULT_ANSI_COLORS[2]),D.ansi[3]=S(k.yellow,a.DEFAULT_ANSI_COLORS[3]),D.ansi[4]=S(k.blue,a.DEFAULT_ANSI_COLORS[4]),D.ansi[5]=S(k.magenta,a.DEFAULT_ANSI_COLORS[5]),D.ansi[6]=S(k.cyan,a.DEFAULT_ANSI_COLORS[6]),D.ansi[7]=S(k.white,a.DEFAULT_ANSI_COLORS[7]),D.ansi[8]=S(k.brightBlack,a.DEFAULT_ANSI_COLORS[8]),D.ansi[9]=S(k.brightRed,a.DEFAULT_ANSI_COLORS[9]),D.ansi[10]=S(k.brightGreen,a.DEFAULT_ANSI_COLORS[10]),D.ansi[11]=S(k.brightYellow,a.DEFAULT_ANSI_COLORS[11]),D.ansi[12]=S(k.brightBlue,a.DEFAULT_ANSI_COLORS[12]),D.ansi[13]=S(k.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),D.ansi[14]=S(k.brightCyan,a.DEFAULT_ANSI_COLORS[14]),D.ansi[15]=S(k.brightWhite,a.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const L=Math.min(D.ansi.length-16,k.extendedAnsi.length);for(let U=0;U<L;U++)D.ansi[U+16]=S(k.extendedAnsi[U],a.DEFAULT_ANSI_COLORS[U+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(k){this._restoreColor(k),this._onChangeColors.fire(this.colors)}_restoreColor(k){if(k!==void 0)switch(k){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[k]=this._restoreColors.ansi[k]}else for(let D=0;D<this._restoreColors.ansi.length;++D)this._colors.ansi[D]=this._restoreColors.ansi[D]}modifyColors(k){k(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 S(k,D){if(k!==void 0)try{return w.css.toColor(k)}catch{}return D}a.ThemeService=T=m([b(0,v.IOptionsService)],T)},6349:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const m=u(8460),b=u(844);class d extends b.Disposable{constructor(x){super(),this._maxLength=x,this.onDeleteEmitter=this.register(new m.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new m.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new m.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 j=new Array(x);for(let v=0;v<Math.min(x,this.length);v++)j[v]=this._array[this._getCyclicIndex(v)];this._array=j,this._maxLength=x,this._startIndex=0}get length(){return this._length}set length(x){if(x>this._length)for(let j=this._length;j<x;j++)this._array[j]=void 0;this._length=x}get(x){return this._array[this._getCyclicIndex(x)]}set(x,j){this._array[this._getCyclicIndex(x)]=j}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,j,...v){if(j){for(let o=x;o<this._length-j;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+j)];this._length-=j,this.onDeleteEmitter.fire({index:x,amount:j})}for(let o=this._length-1;o>=x;o--)this._array[this._getCyclicIndex(o+v.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<v.length;o++)this._array[this._getCyclicIndex(x+o)]=v[o];if(v.length&&this.onInsertEmitter.fire({index:x,amount:v.length}),this._length+v.length>this._maxLength){const o=this._length+v.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=v.length}trimStart(x){x>this._length&&(x=this._length),this._startIndex+=x,this._length-=x,this.onTrimEmitter.fire(x)}shiftElements(x,j,v){if(!(j<=0)){if(x<0||x>=this._length)throw new Error("start argument out of range");if(x+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(let p=j-1;p>=0;p--)this.set(x+p+v,this.get(x+p));const o=x+j+v-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let o=0;o<j;o++)this.set(x+o+v,this.get(x+o))}}_getCyclicIndex(x){return(this._startIndex+x)%this._maxLength}}a.CircularList=d},1439:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(m,b=5){if(typeof m!="object")return m;const d=Array.isArray(m)?[]:{};for(const w in m)d[w]=b<=1?m[w]:m[w]&&u(m[w],b-1);return d}},8055:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,m=0,b=0,d=0;var w,x,j,v,o;function p(_){const E=_.toString(16);return E.length<2?"0"+E:E}function f(_,E){return _<E?(E+.05)/(_+.05):(_+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(_){_.toCss=function(E,T,S,k){return k!==void 0?`#${p(E)}${p(T)}${p(S)}${p(k)}`:`#${p(E)}${p(T)}${p(S)}`},_.toRgba=function(E,T,S,k=255){return(E<<24|T<<16|S<<8|k)>>>0},_.toColor=function(E,T,S,k){return{css:_.toCss(E,T,S,k),rgba:_.toRgba(E,T,S,k)}}}(w||(a.channels=w={})),function(_){function E(T,S){return d=Math.round(255*S),[u,m,b]=o.toChannels(T.rgba),{css:w.toCss(u,m,b,d),rgba:w.toRgba(u,m,b,d)}}_.blend=function(T,S){if(d=(255&S.rgba)/255,d===1)return{css:S.css,rgba:S.rgba};const k=S.rgba>>24&255,D=S.rgba>>16&255,L=S.rgba>>8&255,U=T.rgba>>24&255,F=T.rgba>>16&255,P=T.rgba>>8&255;return u=U+Math.round((k-U)*d),m=F+Math.round((D-F)*d),b=P+Math.round((L-P)*d),{css:w.toCss(u,m,b),rgba:w.toRgba(u,m,b)}},_.isOpaque=function(T){return(255&T.rgba)==255},_.ensureContrastRatio=function(T,S,k){const D=o.ensureContrastRatio(T.rgba,S.rgba,k);if(D)return w.toColor(D>>24&255,D>>16&255,D>>8&255)},_.opaque=function(T){const S=(255|T.rgba)>>>0;return[u,m,b]=o.toChannels(S),{css:w.toCss(u,m,b),rgba:S}},_.opacity=E,_.multiplyOpacity=function(T,S){return d=255&T.rgba,E(T,d*S/255)},_.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(x||(a.color=x={})),function(_){let E,T;try{const S=document.createElement("canvas");S.width=1,S.height=1;const k=S.getContext("2d",{willReadFrequently:!0});k&&(E=k,E.globalCompositeOperation="copy",T=E.createLinearGradient(0,0,1,1))}catch{}_.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),m=parseInt(S.slice(2,3).repeat(2),16),b=parseInt(S.slice(3,4).repeat(2),16),w.toColor(u,m,b);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),m=parseInt(S.slice(2,3).repeat(2),16),b=parseInt(S.slice(3,4).repeat(2),16),d=parseInt(S.slice(4,5).repeat(2),16),w.toColor(u,m,b,d);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const k=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return u=parseInt(k[1]),m=parseInt(k[2]),b=parseInt(k[3]),d=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),w.toColor(u,m,b,d);if(!E||!T)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=T,E.fillStyle=S,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,m,b,d]=E.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:w.toRgba(u,m,b,d),css:S}}}(j||(a.css=j={})),function(_){function E(T,S,k){const D=T/255,L=S/255,U=k/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(U<=.03928?U/12.92:Math.pow((U+.055)/1.055,2.4))}_.relativeLuminance=function(T){return E(T>>16&255,T>>8&255,255&T)},_.relativeLuminance2=E}(v||(a.rgb=v={})),function(_){function E(S,k,D){const L=S>>24&255,U=S>>16&255,F=S>>8&255;let P=k>>24&255,I=k>>16&255,G=k>>8&255,ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));for(;ie<D&&(P>0||I>0||G>0);)P-=Math.max(0,Math.ceil(.1*P)),I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));return(P<<24|I<<16|G<<8|255)>>>0}function T(S,k,D){const L=S>>24&255,U=S>>16&255,F=S>>8&255;let P=k>>24&255,I=k>>16&255,G=k>>8&255,ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));for(;ie<D&&(P<255||I<255||G<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),I=Math.min(255,I+Math.ceil(.1*(255-I))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));return(P<<24|I<<16|G<<8|255)>>>0}_.blend=function(S,k){if(d=(255&k)/255,d===1)return k;const D=k>>24&255,L=k>>16&255,U=k>>8&255,F=S>>24&255,P=S>>16&255,I=S>>8&255;return u=F+Math.round((D-F)*d),m=P+Math.round((L-P)*d),b=I+Math.round((U-I)*d),w.toRgba(u,m,b)},_.ensureContrastRatio=function(S,k,D){const L=v.relativeLuminance(S>>8),U=v.relativeLuminance(k>>8);if(f(L,U)<D){if(U<L){const I=E(S,k,D),G=f(L,v.relativeLuminance(I>>8));if(G<D){const ie=T(S,k,D);return G>f(L,v.relativeLuminance(ie>>8))?I:ie}return I}const F=T(S,k,D),P=f(L,v.relativeLuminance(F>>8));if(P<D){const I=E(S,k,D);return P>f(L,v.relativeLuminance(I>>8))?F:I}return F}},_.reduceLuminance=E,_.increaseLuminance=T,_.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}}(o||(a.rgba=o={})),a.toPaddedHex=p,a.contrastRatio=f},8969:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const m=u(844),b=u(2585),d=u(4348),w=u(7866),x=u(744),j=u(7302),v=u(6975),o=u(8460),p=u(1753),f=u(1480),_=u(7994),E=u(9282),T=u(5435),S=u(5981),k=u(2660);let D=!1;class L extends m.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new o.EventEmitter),this._onScroll.event(F=>{var P;(P=this._onScrollApi)==null||P.fire(F.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(F){for(const P in F)this.optionsService.options[P]=F[P]}constructor(F){super(),this._windowsWrappingHeuristics=this.register(new m.MutableDisposable),this._onBinary=this.register(new o.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new o.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new o.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new o.EventEmitter),this._instantiationService=new d.InstantiationService,this.optionsService=this.register(new j.OptionsService(F)),this._instantiationService.setService(b.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(x.BufferService)),this._instantiationService.setService(b.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(w.LogService)),this._instantiationService.setService(b.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.CoreService)),this._instantiationService.setService(b.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(p.CoreMouseService)),this._instantiationService.setService(b.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(f.UnicodeService)),this._instantiationService.setService(b.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(_.CharsetService),this._instantiationService.setService(b.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(b.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new T.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,o.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,o.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,o.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,o.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(P=>{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(P=>{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 S.WriteBuffer((P,I)=>this._inputHandler.parse(P,I))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,P){this._writeBuffer.write(F,P)}writeSync(F,P){this._logService.logLevel<=b.LogLevelEnum.WARN&&!D&&(this._logService.warn("writeSync is unreliable and will be removed soon."),D=!0),this._writeBuffer.writeSync(F,P)}input(F,P=!0){this.coreService.triggerDataEvent(F,P)}resize(F,P){isNaN(F)||isNaN(P)||(F=Math.max(F,x.MINIMUM_COLS),P=Math.max(P,x.MINIMUM_ROWS),this._bufferService.resize(F,P))}scroll(F,P=!1){this._bufferService.scroll(F,P)}scrollLines(F,P,I){this._bufferService.scrollLines(F,P,I)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const P=F-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(F,P){return this._inputHandler.registerEscHandler(F,P)}registerDcsHandler(F,P){return this._inputHandler.registerDcsHandler(F,P)}registerCsiHandler(F,P){return this._inputHandler.registerCsiHandler(F,P)}registerOscHandler(F,P){return this._inputHandler.registerOscHandler(F,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?F=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,m.toDisposable)(()=>{for(const P of F)P.dispose()})}}}a.CoreTerminal=L},8460:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let m=0;m<this._listeners.length;m++)if(this._listeners[m]===u)return void this._listeners.splice(m,1)}}})),this._event}fire(u,m){const b=[];for(let d=0;d<this._listeners.length;d++)b.push(this._listeners[d]);for(let d=0;d<b.length;d++)b[d].call(void 0,u,m)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,m){return u(b=>m.fire(b))},a.runAndSubscribe=function(u,m){return m(void 0),u(b=>m(b))}},5435:function(y,a,u){var m=this&&this.__decorate||function(X,V,H,K){var W,oe=arguments.length,de=oe<3?V:K===null?K=Object.getOwnPropertyDescriptor(V,H):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(X,V,H,K);else for(var xe=X.length-1;xe>=0;xe--)(W=X[xe])&&(de=(oe<3?W(de):oe>3?W(V,H,de):W(V,H))||de);return oe>3&&de&&Object.defineProperty(V,H,de),de},b=this&&this.__param||function(X,V){return function(H,K){V(H,K,X)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const d=u(2584),w=u(7116),x=u(2015),j=u(844),v=u(482),o=u(8437),p=u(8460),f=u(643),_=u(511),E=u(3734),T=u(2585),S=u(1480),k=u(6242),D=u(6351),L=u(5941),U={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function P(X,V){if(X>24)return V.setWinLines||!1;switch(X){case 1:return!!V.restoreWin;case 2:return!!V.minimizeWin;case 3:return!!V.setWinPosition;case 4:return!!V.setWinSizePixels;case 5:return!!V.raiseWin;case 6:return!!V.lowerWin;case 7:return!!V.refreshWin;case 8:return!!V.setWinSizeChars;case 9:return!!V.maximizeWin;case 10:return!!V.fullscreenWin;case 11:return!!V.getWinState;case 13:return!!V.getWinPosition;case 14:return!!V.getWinSizePixels;case 15:return!!V.getScreenSizePixels;case 16:return!!V.getCellSizePixels;case 18:return!!V.getWinSizeChars;case 19:return!!V.getScreenSizeChars;case 20:return!!V.getIconTitle;case 21:return!!V.getWinTitle;case 22:return!!V.pushTitle;case 23:return!!V.popTitle;case 24:return!!V.setWinLines}return!1}var I;(function(X){X[X.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",X[X.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(I||(a.WindowsOptionsReportType=I={}));let G=0;class ie extends j.Disposable{getAttrData(){return this._curAttrData}constructor(V,H,K,W,oe,de,xe,Se,se=new x.EscapeSequenceParser){super(),this._bufferService=V,this._charsetService=H,this._coreService=K,this._logService=W,this._optionsService=oe,this._oscLinkService=de,this._coreMouseService=xe,this._unicodeService=Se,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.Utf8ToUtf32,this._workCell=new _.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new p.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new p.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new p.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new p.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new p.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new p.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new p.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new p.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new p.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new p.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new p.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new p.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new p.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(Y=>this._activeBuffer=Y.activeBuffer)),this._parser.setCsiHandlerFallback((Y,pe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(Y),params:pe.toArray()})}),this._parser.setEscHandlerFallback(Y=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(Y)})}),this._parser.setExecuteHandlerFallback(Y=>{this._logService.debug("Unknown EXECUTE code: ",{code:Y})}),this._parser.setOscHandlerFallback((Y,pe,he)=>{this._logService.debug("Unknown OSC code: ",{identifier:Y,action:pe,data:he})}),this._parser.setDcsHandlerFallback((Y,pe,he)=>{pe==="HOOK"&&(he=he.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(Y),action:pe,payload:he})}),this._parser.setPrintHandler((Y,pe,he)=>this.print(Y,pe,he)),this._parser.registerCsiHandler({final:"@"},Y=>this.insertChars(Y)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},Y=>this.scrollLeft(Y)),this._parser.registerCsiHandler({final:"A"},Y=>this.cursorUp(Y)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},Y=>this.scrollRight(Y)),this._parser.registerCsiHandler({final:"B"},Y=>this.cursorDown(Y)),this._parser.registerCsiHandler({final:"C"},Y=>this.cursorForward(Y)),this._parser.registerCsiHandler({final:"D"},Y=>this.cursorBackward(Y)),this._parser.registerCsiHandler({final:"E"},Y=>this.cursorNextLine(Y)),this._parser.registerCsiHandler({final:"F"},Y=>this.cursorPrecedingLine(Y)),this._parser.registerCsiHandler({final:"G"},Y=>this.cursorCharAbsolute(Y)),this._parser.registerCsiHandler({final:"H"},Y=>this.cursorPosition(Y)),this._parser.registerCsiHandler({final:"I"},Y=>this.cursorForwardTab(Y)),this._parser.registerCsiHandler({final:"J"},Y=>this.eraseInDisplay(Y,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},Y=>this.eraseInDisplay(Y,!0)),this._parser.registerCsiHandler({final:"K"},Y=>this.eraseInLine(Y,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},Y=>this.eraseInLine(Y,!0)),this._parser.registerCsiHandler({final:"L"},Y=>this.insertLines(Y)),this._parser.registerCsiHandler({final:"M"},Y=>this.deleteLines(Y)),this._parser.registerCsiHandler({final:"P"},Y=>this.deleteChars(Y)),this._parser.registerCsiHandler({final:"S"},Y=>this.scrollUp(Y)),this._parser.registerCsiHandler({final:"T"},Y=>this.scrollDown(Y)),this._parser.registerCsiHandler({final:"X"},Y=>this.eraseChars(Y)),this._parser.registerCsiHandler({final:"Z"},Y=>this.cursorBackwardTab(Y)),this._parser.registerCsiHandler({final:"`"},Y=>this.charPosAbsolute(Y)),this._parser.registerCsiHandler({final:"a"},Y=>this.hPositionRelative(Y)),this._parser.registerCsiHandler({final:"b"},Y=>this.repeatPrecedingCharacter(Y)),this._parser.registerCsiHandler({final:"c"},Y=>this.sendDeviceAttributesPrimary(Y)),this._parser.registerCsiHandler({prefix:">",final:"c"},Y=>this.sendDeviceAttributesSecondary(Y)),this._parser.registerCsiHandler({final:"d"},Y=>this.linePosAbsolute(Y)),this._parser.registerCsiHandler({final:"e"},Y=>this.vPositionRelative(Y)),this._parser.registerCsiHandler({final:"f"},Y=>this.hVPosition(Y)),this._parser.registerCsiHandler({final:"g"},Y=>this.tabClear(Y)),this._parser.registerCsiHandler({final:"h"},Y=>this.setMode(Y)),this._parser.registerCsiHandler({prefix:"?",final:"h"},Y=>this.setModePrivate(Y)),this._parser.registerCsiHandler({final:"l"},Y=>this.resetMode(Y)),this._parser.registerCsiHandler({prefix:"?",final:"l"},Y=>this.resetModePrivate(Y)),this._parser.registerCsiHandler({final:"m"},Y=>this.charAttributes(Y)),this._parser.registerCsiHandler({final:"n"},Y=>this.deviceStatus(Y)),this._parser.registerCsiHandler({prefix:"?",final:"n"},Y=>this.deviceStatusPrivate(Y)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},Y=>this.softReset(Y)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},Y=>this.setCursorStyle(Y)),this._parser.registerCsiHandler({final:"r"},Y=>this.setScrollRegion(Y)),this._parser.registerCsiHandler({final:"s"},Y=>this.saveCursor(Y)),this._parser.registerCsiHandler({final:"t"},Y=>this.windowOptions(Y)),this._parser.registerCsiHandler({final:"u"},Y=>this.restoreCursor(Y)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},Y=>this.insertColumns(Y)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},Y=>this.deleteColumns(Y)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},Y=>this.selectProtected(Y)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},Y=>this.requestMode(Y,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},Y=>this.requestMode(Y,!1)),this._parser.setExecuteHandler(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new k.OscHandler(Y=>(this.setTitle(Y),this.setIconName(Y),!0))),this._parser.registerOscHandler(1,new k.OscHandler(Y=>this.setIconName(Y))),this._parser.registerOscHandler(2,new k.OscHandler(Y=>this.setTitle(Y))),this._parser.registerOscHandler(4,new k.OscHandler(Y=>this.setOrReportIndexedColor(Y))),this._parser.registerOscHandler(8,new k.OscHandler(Y=>this.setHyperlink(Y))),this._parser.registerOscHandler(10,new k.OscHandler(Y=>this.setOrReportFgColor(Y))),this._parser.registerOscHandler(11,new k.OscHandler(Y=>this.setOrReportBgColor(Y))),this._parser.registerOscHandler(12,new k.OscHandler(Y=>this.setOrReportCursorColor(Y))),this._parser.registerOscHandler(104,new k.OscHandler(Y=>this.restoreIndexedColor(Y))),this._parser.registerOscHandler(110,new k.OscHandler(Y=>this.restoreFgColor(Y))),this._parser.registerOscHandler(111,new k.OscHandler(Y=>this.restoreBgColor(Y))),this._parser.registerOscHandler(112,new k.OscHandler(Y=>this.restoreCursorColor(Y))),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 Y in w.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:Y},()=>this.selectCharset("("+Y)),this._parser.registerEscHandler({intermediates:")",final:Y},()=>this.selectCharset(")"+Y)),this._parser.registerEscHandler({intermediates:"*",final:Y},()=>this.selectCharset("*"+Y)),this._parser.registerEscHandler({intermediates:"+",final:Y},()=>this.selectCharset("+"+Y)),this._parser.registerEscHandler({intermediates:"-",final:Y},()=>this.selectCharset("-"+Y)),this._parser.registerEscHandler({intermediates:".",final:Y},()=>this.selectCharset("."+Y)),this._parser.registerEscHandler({intermediates:"/",final:Y},()=>this.selectCharset("/"+Y));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(Y=>(this._logService.error("Parsing error: ",Y),Y)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler((Y,pe)=>this.requestStatusString(Y,pe)))}_preserveStack(V,H,K,W){this._parseStack.paused=!0,this._parseStack.cursorStartX=V,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=K,this._parseStack.position=W}_logSlowResolvingAsync(V){this._logService.logLevel<=T.LogLevelEnum.WARN&&Promise.race([V,new Promise((H,K)=>setTimeout(()=>K("#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(V,H){let K,W=this._activeBuffer.x,oe=this._activeBuffer.y,de=0;const xe=this._parseStack.paused;if(xe){if(K=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(K),K;W=this._parseStack.cursorStartX,oe=this._parseStack.cursorStartY,this._parseStack.paused=!1,V.length>F&&(de=this._parseStack.position+F)}if(this._logService.logLevel<=T.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof V=="string"?` "${V}"`:` "${Array.prototype.map.call(V,Y=>String.fromCharCode(Y)).join("")}"`),typeof V=="string"?V.split("").map(Y=>Y.charCodeAt(0)):V),this._parseBuffer.length<V.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(V.length,F))),xe||this._dirtyRowTracker.clearRange(),V.length>F)for(let Y=de;Y<V.length;Y+=F){const pe=Y+F<V.length?Y+F:V.length,he=typeof V=="string"?this._stringDecoder.decode(V.substring(Y,pe),this._parseBuffer):this._utf8Decoder.decode(V.subarray(Y,pe),this._parseBuffer);if(K=this._parser.parse(this._parseBuffer,he))return this._preserveStack(W,oe,he,Y),this._logSlowResolvingAsync(K),K}else if(!xe){const Y=typeof V=="string"?this._stringDecoder.decode(V,this._parseBuffer):this._utf8Decoder.decode(V,this._parseBuffer);if(K=this._parser.parse(this._parseBuffer,Y))return this._preserveStack(W,oe,Y,0),this._logSlowResolvingAsync(K),K}this._activeBuffer.x===W&&this._activeBuffer.y===oe||this._onCursorMove.fire();const Se=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),se=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);se<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(se,this._bufferService.rows-1),Math.min(Se,this._bufferService.rows-1))}print(V,H,K){let W,oe;const de=this._charsetService.charset,xe=this._optionsService.rawOptions.screenReaderMode,Se=this._bufferService.cols,se=this._coreService.decPrivateModes.wraparound,Y=this._coreService.modes.insertMode,pe=this._curAttrData;let he=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&K-H>0&&he.getWidth(this._activeBuffer.x-1)===2&&he.setCellFromCodepoint(this._activeBuffer.x-1,0,1,pe);let He=this._parser.precedingJoinState;for(let Oe=H;Oe<K;++Oe){if(W=V[Oe],W<127&&de){const tt=de[String.fromCharCode(W)];tt&&(W=tt.charCodeAt(0))}const et=this._unicodeService.charProperties(W,He);oe=S.UnicodeService.extractWidth(et);const ve=S.UnicodeService.extractShouldJoin(et),Ke=ve?S.UnicodeService.extractWidth(He):0;if(He=et,xe&&this._onA11yChar.fire((0,v.stringFromCodePoint)(W)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+oe-Ke>Se){if(se){const tt=he;let Xe=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),he=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ke>0&&he instanceof o.BufferLine&&he.copyCellsFrom(tt,Xe,0,Ke,!1);Xe<Se;)tt.setCellFromCodepoint(Xe++,0,1,pe)}else if(this._activeBuffer.x=Se-1,oe===2)continue}if(ve&&this._activeBuffer.x){const tt=he.getWidth(this._activeBuffer.x-1)?1:2;he.addCodepointToCell(this._activeBuffer.x-tt,W,oe);for(let Xe=oe-Ke;--Xe>=0;)he.setCellFromCodepoint(this._activeBuffer.x++,0,0,pe)}else if(Y&&(he.insertCells(this._activeBuffer.x,oe-Ke,this._activeBuffer.getNullCell(pe)),he.getWidth(Se-1)===2&&he.setCellFromCodepoint(Se-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,pe)),he.setCellFromCodepoint(this._activeBuffer.x++,W,oe,pe),oe>0)for(;--oe;)he.setCellFromCodepoint(this._activeBuffer.x++,0,0,pe)}this._parser.precedingJoinState=He,this._activeBuffer.x<Se&&K-H>0&&he.getWidth(this._activeBuffer.x)===0&&!he.hasContent(this._activeBuffer.x)&&he.setCellFromCodepoint(this._activeBuffer.x,0,1,pe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(V,H){return V.final!=="t"||V.prefix||V.intermediates?this._parser.registerCsiHandler(V,H):this._parser.registerCsiHandler(V,K=>!P(K.params[0],this._optionsService.rawOptions.windowOptions)||H(K))}registerDcsHandler(V,H){return this._parser.registerDcsHandler(V,new D.DcsHandler(H))}registerEscHandler(V,H){return this._parser.registerEscHandler(V,H)}registerOscHandler(V,H){return this._parser.registerOscHandler(V,new k.OscHandler(H))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var V;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&&((V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&V.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const V=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-V),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(V=this._bufferService.cols-1){this._activeBuffer.x=Math.min(V,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(V,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=V,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=V,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(V,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+V,this._activeBuffer.y+H)}cursorUp(V){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,V.params[0]||1)):this._moveCursor(0,-(V.params[0]||1)),!0}cursorDown(V){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,V.params[0]||1)):this._moveCursor(0,V.params[0]||1),!0}cursorForward(V){return this._moveCursor(V.params[0]||1,0),!0}cursorBackward(V){return this._moveCursor(-(V.params[0]||1),0),!0}cursorNextLine(V){return this.cursorDown(V),this._activeBuffer.x=0,!0}cursorPrecedingLine(V){return this.cursorUp(V),this._activeBuffer.x=0,!0}cursorCharAbsolute(V){return this._setCursor((V.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(V){return this._setCursor(V.length>=2?(V.params[1]||1)-1:0,(V.params[0]||1)-1),!0}charPosAbsolute(V){return this._setCursor((V.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(V){return this._moveCursor(V.params[0]||1,0),!0}linePosAbsolute(V){return this._setCursor(this._activeBuffer.x,(V.params[0]||1)-1),!0}vPositionRelative(V){return this._moveCursor(0,V.params[0]||1),!0}hVPosition(V){return this.cursorPosition(V),!0}tabClear(V){const H=V.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(V){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=V.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(V){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=V.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(V){const H=V.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(V,H,K,W=!1,oe=!1){const de=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);de.replaceCells(H,K,this._activeBuffer.getNullCell(this._eraseAttrData()),oe),W&&(de.isWrapped=!1)}_resetBufferLine(V,H=!1){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);K&&(K.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+V),K.isWrapped=!1)}eraseInDisplay(V,H=!1){let K;switch(this._restrictCursor(this._bufferService.cols),V.params[0]){case 0:for(K=this._activeBuffer.y,this._dirtyRowTracker.markDirty(K),this._eraseInBufferLine(K++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);K<this._bufferService.rows;K++)this._resetBufferLine(K,H);this._dirtyRowTracker.markDirty(K);break;case 1:for(K=this._activeBuffer.y,this._dirtyRowTracker.markDirty(K),this._eraseInBufferLine(K,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(K+1).isWrapped=!1);K--;)this._resetBufferLine(K,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(K=this._bufferService.rows,this._dirtyRowTracker.markDirty(K-1);K--;)this._resetBufferLine(K,H);this._dirtyRowTracker.markDirty(0);break;case 3:const W=this._activeBuffer.lines.length-this._bufferService.rows;W>0&&(this._activeBuffer.lines.trimStart(W),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-W,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-W,0),this._onScroll.fire(0))}return!0}eraseInLine(V,H=!1){switch(this._restrictCursor(this._bufferService.cols),V.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(V){this._restrictCursor();let H=V.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const K=this._activeBuffer.ybase+this._activeBuffer.y,W=this._bufferService.rows-1-this._activeBuffer.scrollBottom,oe=this._bufferService.rows-1+this._activeBuffer.ybase-W+1;for(;H--;)this._activeBuffer.lines.splice(oe-1,1),this._activeBuffer.lines.splice(K,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(V){this._restrictCursor();let H=V.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const K=this._activeBuffer.ybase+this._activeBuffer.y;let W;for(W=this._bufferService.rows-1-this._activeBuffer.scrollBottom,W=this._bufferService.rows-1+this._activeBuffer.ybase-W;H--;)this._activeBuffer.lines.splice(K,1),this._activeBuffer.lines.splice(W,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(V){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,V.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(V){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,V.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(V){let H=V.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(V){let H=V.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(o.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(V){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=V.params[0]||1;for(let K=this._activeBuffer.scrollTop;K<=this._activeBuffer.scrollBottom;++K){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+K);W.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),W.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(V){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=V.params[0]||1;for(let K=this._activeBuffer.scrollTop;K<=this._activeBuffer.scrollBottom;++K){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+K);W.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),W.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(V){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=V.params[0]||1;for(let K=this._activeBuffer.scrollTop;K<=this._activeBuffer.scrollBottom;++K){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+K);W.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),W.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(V){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=V.params[0]||1;for(let K=this._activeBuffer.scrollTop;K<=this._activeBuffer.scrollBottom;++K){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+K);W.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),W.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(V){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(V.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(V){const H=this._parser.precedingJoinState;if(!H)return!0;const K=V.params[0]||1,W=S.UnicodeService.extractWidth(H),oe=this._activeBuffer.x-W,de=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(oe),xe=new Uint32Array(de.length*K);let Se=0;for(let Y=0;Y<de.length;){const pe=de.codePointAt(Y)||0;xe[Se++]=pe,Y+=pe>65535?2:1}let se=Se;for(let Y=1;Y<K;++Y)xe.copyWithin(se,0,Se),se+=Se;return this.print(xe,0,se),!0}sendDeviceAttributesPrimary(V){return V.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(V){return V.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(V.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(V){return(this._optionsService.rawOptions.termName+"").indexOf(V)===0}setMode(V){for(let H=0;H<V.length;H++)switch(V.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(V){for(let H=0;H<V.length;H++)switch(V.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,w.DEFAULT_CHARSET),this._charsetService.setgCharset(1,w.DEFAULT_CHARSET),this._charsetService.setgCharset(2,w.DEFAULT_CHARSET),this._charsetService.setgCharset(3,w.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(V){for(let H=0;H<V.length;H++)switch(V.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(V){for(let H=0;H<V.length;H++)switch(V.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(),V.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(V,H){const K=this._coreService.decPrivateModes,{activeProtocol:W,activeEncoding:oe}=this._coreMouseService,de=this._coreService,{buffers:xe,cols:Se}=this._bufferService,{active:se,alt:Y}=xe,pe=this._optionsService.rawOptions,he=ve=>ve?1:2,He=V.params[0];return Oe=He,et=H?He===2?4:He===4?he(de.modes.insertMode):He===12?3:He===20?he(pe.convertEol):0:He===1?he(K.applicationCursorKeys):He===3?pe.windowOptions.setWinLines?Se===80?2:Se===132?1:0:0:He===6?he(K.origin):He===7?he(K.wraparound):He===8?3:He===9?he(W==="X10"):He===12?he(pe.cursorBlink):He===25?he(!de.isCursorHidden):He===45?he(K.reverseWraparound):He===66?he(K.applicationKeypad):He===67?4:He===1e3?he(W==="VT200"):He===1002?he(W==="DRAG"):He===1003?he(W==="ANY"):He===1004?he(K.sendFocus):He===1005?4:He===1006?he(oe==="SGR"):He===1015?4:He===1016?he(oe==="SGR_PIXELS"):He===1048?1:He===47||He===1047||He===1049?he(se===Y):He===2004?he(K.bracketedPasteMode):0,de.triggerDataEvent(`${d.C0.ESC}[${H?"":"?"}${Oe};${et}$y`),!0;var Oe,et}_updateAttrColor(V,H,K,W,oe){return H===2?(V|=50331648,V&=-16777216,V|=E.AttributeData.fromColorRGB([K,W,oe])):H===5&&(V&=-50331904,V|=33554432|255&K),V}_extractColor(V,H,K){const W=[0,0,-1,0,0,0];let oe=0,de=0;do{if(W[de+oe]=V.params[H+de],V.hasSubParams(H+de)){const xe=V.getSubParams(H+de);let Se=0;do W[1]===5&&(oe=1),W[de+Se+1+oe]=xe[Se];while(++Se<xe.length&&Se+de+1+oe<W.length);break}if(W[1]===5&&de+oe>=2||W[1]===2&&de+oe>=5)break;W[1]&&(oe=1)}while(++de+H<V.length&&de+oe<W.length);for(let xe=2;xe<W.length;++xe)W[xe]===-1&&(W[xe]=0);switch(W[0]){case 38:K.fg=this._updateAttrColor(K.fg,W[1],W[3],W[4],W[5]);break;case 48:K.bg=this._updateAttrColor(K.bg,W[1],W[3],W[4],W[5]);break;case 58:K.extended=K.extended.clone(),K.extended.underlineColor=this._updateAttrColor(K.extended.underlineColor,W[1],W[3],W[4],W[5])}return de}_processUnderline(V,H){H.extended=H.extended.clone(),(!~V||V>5)&&(V=1),H.extended.underlineStyle=V,H.fg|=268435456,V===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(V){V.fg=o.DEFAULT_ATTR_DATA.fg,V.bg=o.DEFAULT_ATTR_DATA.bg,V.extended=V.extended.clone(),V.extended.underlineStyle=0,V.extended.underlineColor&=-67108864,V.updateExtended()}charAttributes(V){if(V.length===1&&V.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=V.length;let K;const W=this._curAttrData;for(let oe=0;oe<H;oe++)K=V.params[oe],K>=30&&K<=37?(W.fg&=-50331904,W.fg|=16777216|K-30):K>=40&&K<=47?(W.bg&=-50331904,W.bg|=16777216|K-40):K>=90&&K<=97?(W.fg&=-50331904,W.fg|=16777224|K-90):K>=100&&K<=107?(W.bg&=-50331904,W.bg|=16777224|K-100):K===0?this._processSGR0(W):K===1?W.fg|=134217728:K===3?W.bg|=67108864:K===4?(W.fg|=268435456,this._processUnderline(V.hasSubParams(oe)?V.getSubParams(oe)[0]:1,W)):K===5?W.fg|=536870912:K===7?W.fg|=67108864:K===8?W.fg|=1073741824:K===9?W.fg|=2147483648:K===2?W.bg|=134217728:K===21?this._processUnderline(2,W):K===22?(W.fg&=-134217729,W.bg&=-134217729):K===23?W.bg&=-67108865:K===24?(W.fg&=-268435457,this._processUnderline(0,W)):K===25?W.fg&=-536870913:K===27?W.fg&=-67108865:K===28?W.fg&=-1073741825:K===29?W.fg&=2147483647:K===39?(W.fg&=-67108864,W.fg|=16777215&o.DEFAULT_ATTR_DATA.fg):K===49?(W.bg&=-67108864,W.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):K===38||K===48||K===58?oe+=this._extractColor(V,oe,W):K===53?W.bg|=1073741824:K===55?W.bg&=-1073741825:K===59?(W.extended=W.extended.clone(),W.extended.underlineColor=-1,W.updateExtended()):K===100?(W.fg&=-67108864,W.fg|=16777215&o.DEFAULT_ATTR_DATA.fg,W.bg&=-67108864,W.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",K);return!0}deviceStatus(V){switch(V.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,K=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${H};${K}R`)}return!0}deviceStatusPrivate(V){if(V.params[0]===6){const H=this._activeBuffer.y+1,K=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${H};${K}R`)}return!0}softReset(V){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=o.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(V){const H=V.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 K=H%2==1;return this._optionsService.options.cursorBlink=K,!0}setScrollRegion(V){const H=V.params[0]||1;let K;return(V.length<2||(K=V.params[1])>this._bufferService.rows||K===0)&&(K=this._bufferService.rows),K>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=K-1,this._setCursor(0,0)),!0}windowOptions(V){if(!P(V.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=V.length>1?V.params[1]:0;switch(V.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(`${d.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(V){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(V){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(V){return this._windowTitle=V,this._onTitleChange.fire(V),!0}setIconName(V){return this._iconName=V,!0}setOrReportIndexedColor(V){const H=[],K=V.split(";");for(;K.length>1;){const W=K.shift(),oe=K.shift();if(/^\d+$/.exec(W)){const de=parseInt(W);if(J(de))if(oe==="?")H.push({type:0,index:de});else{const xe=(0,L.parseColor)(oe);xe&&H.push({type:1,index:de,color:xe})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(V){const H=V.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(V,H){this._getCurrentLinkId()&&this._finishHyperlink();const K=V.split(":");let W;const oe=K.findIndex(de=>de.startsWith("id="));return oe!==-1&&(W=K[oe].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:W,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(V,H){const K=V.split(";");for(let W=0;W<K.length&&!(H>=this._specialColors.length);++W,++H)if(K[W]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const oe=(0,L.parseColor)(K[W]);oe&&this._onColor.fire([{type:1,index:this._specialColors[H],color:oe}])}return!0}setOrReportFgColor(V){return this._setOrReportSpecialColor(V,0)}setOrReportBgColor(V){return this._setOrReportSpecialColor(V,1)}setOrReportCursorColor(V){return this._setOrReportSpecialColor(V,2)}restoreIndexedColor(V){if(!V)return this._onColor.fire([{type:2}]),!0;const H=[],K=V.split(";");for(let W=0;W<K.length;++W)if(/^\d+$/.exec(K[W])){const oe=parseInt(K[W]);J(oe)&&H.push({type:2,index:oe})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(V){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(V){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(V){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,w.DEFAULT_CHARSET),!0}selectCharset(V){return V.length!==2?(this.selectDefaultCharset(),!0):(V[0]==="/"||this._charsetService.setgCharset(U[V[0]],w.CHARSETS[V[1]]||w.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 V=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,V,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=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(V){return this._charsetService.setgLevel(V),!0}screenAlignmentPattern(){const V=new _.CellData;V.content=4194373,V.fg=this._curAttrData.fg,V.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const K=this._activeBuffer.ybase+this._activeBuffer.y+H,W=this._activeBuffer.lines.get(K);W&&(W.fill(V),W.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(V,H){const K=this._bufferService.buffer,W=this._optionsService.rawOptions;return(oe=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${oe}${d.C0.ESC}\\`),!0))(V==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:V==='"p'?'P1$r61;1"p':V==="r"?`P1$r${K.scrollTop+1};${K.scrollBottom+1}r`:V==="m"?"P1$r0m":V===" q"?`P1$r${{block:2,underline:4,bar:6}[W.cursorStyle]-(W.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(V,H){this._dirtyRowTracker.markRangeDirty(V,H)}}a.InputHandler=ie;let q=class{constructor(X){this._bufferService=X,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(X){X<this.start?this.start=X:X>this.end&&(this.end=X)}markRangeDirty(X,V){X>V&&(G=X,X=V,V=G),X<this.start&&(this.start=X),V>this.end&&(this.end=V)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(X){return 0<=X&&X<256}q=m([b(0,T.IBufferService)],q)},844:(y,a)=>{function u(m){for(const b of m)b.dispose();m.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const m of this._disposables)m.dispose();this._disposables.length=0}register(m){return this._disposables.push(m),m}unregister(m){const b=this._disposables.indexOf(m);b!==-1&&this._disposables.splice(b,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(m){var b;this._isDisposed||m===this._value||((b=this._value)==null||b.dispose(),this._value=m)}clear(){this.value=void 0}dispose(){var m;this._isDisposed=!0,(m=this._value)==null||m.dispose(),this._value=void 0}},a.toDisposable=function(m){return{dispose:m}},a.disposeArray=u,a.getDisposeArrayDisposable=function(m){return{dispose:()=>u(m)}}},1505:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(b,d,w){this._data[b]||(this._data[b]={}),this._data[b][d]=w}get(b,d){return this._data[b]?this._data[b][d]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(m,b,d,w,x){this._data.get(m,b)||this._data.set(m,b,new u),this._data.get(m,b).set(d,w,x)}get(m,b,d,w){var x;return(x=this._data.get(m,b))==null?void 0:x.get(d,w)}clear(){this._data.clear()}}},6114:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const u=a.isNode?"node":navigator.userAgent,m=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const b=u.match(/Version\/(\d+)/);return b===null||b.length<2?0:parseInt(b[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(m),a.isIpad=m==="iPad",a.isIphone=m==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(m),a.isLinux=m.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},6106:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(m){this._getKey=m,this._array=[]}clear(){this._array.length=0}insert(m){this._array.length!==0?(u=this._search(this._getKey(m)),this._array.splice(u,0,m)):this._array.push(m)}delete(m){if(this._array.length===0)return!1;const b=this._getKey(m);if(b===void 0||(u=this._search(b),u===-1)||this._getKey(this._array[u])!==b)return!1;do if(this._array[u]===m)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===b);return!1}*getKeyIterator(m){if(this._array.length!==0&&(u=this._search(m),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===m))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===m)}forEachByKey(m,b){if(this._array.length!==0&&(u=this._search(m),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===m))do b(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===m)}values(){return[...this._array].values()}_search(m){let b=0,d=this._array.length-1;for(;d>=b;){let w=b+d>>1;const x=this._getKey(this._array[w]);if(x>m)d=w-1;else{if(!(x<m)){for(;w>0&&this._getKey(this._array[w-1])===m;)w--;return w}b=w+1}}return b}}},7226:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const m=u(6114);class b{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 j=0,v=0,o=x.timeRemaining(),p=0;for(;this._i<this._tasks.length;){if(j=Date.now(),this._tasks[this._i]()||this._i++,j=Math.max(1,Date.now()-j),v=Math.max(j,v),p=x.timeRemaining(),1.5*v>p)return o-j<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-j))}ms`),void this._start();o=p}this.clear()}}class d extends b{_requestCallback(x){return setTimeout(()=>x(this._createDeadline(16)))}_cancelCallback(x){clearTimeout(x)}_createDeadline(x){const j=Date.now()+x;return{timeRemaining:()=>Math.max(0,j-Date.now())}}}a.PriorityTaskQueue=d,a.IdleTaskQueue=!m.isNode&&"requestIdleCallback"in window?class extends b{_requestCallback(w){return requestIdleCallback(w)}_cancelCallback(w){cancelIdleCallback(w)}}:d,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(w){this._queue.clear(),this._queue.enqueue(w)}flush(){this._queue.flush()}}},9282:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const m=u(643);a.updateWindowsModeWrappedState=function(b){const d=b.buffer.lines.get(b.buffer.ybase+b.buffer.y-1),w=d==null?void 0:d.get(b.cols-1),x=b.buffer.lines.get(b.buffer.ybase+b.buffer.y);x&&w&&(x.isWrapped=w[m.CHAR_DATA_CODE_INDEX]!==m.NULL_CELL_CODE&&w[m.CHAR_DATA_CODE_INDEX]!==m.WHITESPACE_CELL_CODE)}},3734:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new m}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class m{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,w=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=w}clone(){return new m(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=m},9092:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const m=u(6349),b=u(7226),d=u(3734),w=u(8437),x=u(4634),j=u(511),v=u(643),o=u(4863),p=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(f,_,E){this._hasScrollback=f,this._optionsService=_,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=w.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=j.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=j.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new b.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new m.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(f){return f?(this._nullCell.fg=f.fg,this._nullCell.bg=f.bg,this._nullCell.extended=f.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new d.ExtendedAttrs),this._nullCell}getWhitespaceCell(f){return f?(this._whitespaceCell.fg=f.fg,this._whitespaceCell.bg=f.bg,this._whitespaceCell.extended=f.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new d.ExtendedAttrs),this._whitespaceCell}getBlankLine(f,_){return new w.BufferLine(this._bufferService.cols,this.getNullCell(f),_)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const f=this.ybase+this.y-this.ydisp;return f>=0&&f<this._rows}_getCorrectBufferLength(f){if(!this._hasScrollback)return f;const _=f+this._optionsService.rawOptions.scrollback;return _>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:_}fillViewportRows(f){if(this.lines.length===0){f===void 0&&(f=w.DEFAULT_ATTR_DATA);let _=this._rows;for(;_--;)this.lines.push(this.getBlankLine(f))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new m.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(f,_){const E=this.getNullCell(w.DEFAULT_ATTR_DATA);let T=0;const S=this._getCorrectBufferLength(_);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<f)for(let D=0;D<this.lines.length;D++)T+=+this.lines.get(D).resize(f,E);let k=0;if(this._rows<_)for(let D=this._rows;D<_;D++)this.lines.length<_+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new w.BufferLine(f,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+k+1?(this.ybase--,k++,this.ydisp>0&&this.ydisp--):this.lines.push(new w.BufferLine(f,E)));else for(let D=this._rows;D>_;D--)this.lines.length>_+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const D=this.lines.length-S;D>0&&(this.lines.trimStart(D),this.ybase=Math.max(this.ybase-D,0),this.ydisp=Math.max(this.ydisp-D,0),this.savedY=Math.max(this.savedY-D,0)),this.lines.maxLength=S}this.x=Math.min(this.x,f-1),this.y=Math.min(this.y,_-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,f-1),this.scrollTop=0}if(this.scrollBottom=_-1,this._isReflowEnabled&&(this._reflow(f,_),this._cols>f))for(let k=0;k<this.lines.length;k++)T+=+this.lines.get(k).resize(f,E);this._cols=f,this._rows=_,this._memoryCleanupQueue.clear(),T>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let f=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,f=!1);let _=0;for(;this._memoryCleanupPosition<this.lines.length;)if(_+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),_>100)return!0;return f}get _isReflowEnabled(){const f=this._optionsService.rawOptions.windowsPty;return f&&f.buildNumber?this._hasScrollback&&f.backend==="conpty"&&f.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(f,_){this._cols!==f&&(f>this._cols?this._reflowLarger(f,_):this._reflowSmaller(f,_))}_reflowLarger(f,_){const E=(0,x.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(w.DEFAULT_ATTR_DATA));if(E.length>0){const T=(0,x.reflowLargerCreateNewLayout)(this.lines,E);(0,x.reflowLargerApplyNewLayout)(this.lines,T.layout),this._reflowLargerAdjustViewport(f,_,T.countRemoved)}}_reflowLargerAdjustViewport(f,_,E){const T=this.getNullCell(w.DEFAULT_ATTR_DATA);let S=E;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<_&&this.lines.push(new w.BufferLine(f,T))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(f,_){const E=this.getNullCell(w.DEFAULT_ATTR_DATA),T=[];let S=0;for(let k=this.lines.length-1;k>=0;k--){let D=this.lines.get(k);if(!D||!D.isWrapped&&D.getTrimmedLength()<=f)continue;const L=[D];for(;D.isWrapped&&k>0;)D=this.lines.get(--k),L.unshift(D);const U=this.ybase+this.y;if(U>=k&&U<k+L.length)continue;const F=L[L.length-1].getTrimmedLength(),P=(0,x.reflowSmallerGetNewLineLengths)(L,this._cols,f),I=P.length-L.length;let G;G=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 ie=[];for(let K=0;K<I;K++){const W=this.getBlankLine(w.DEFAULT_ATTR_DATA,!0);ie.push(W)}ie.length>0&&(T.push({start:k+L.length+S,newLines:ie}),S+=ie.length),L.push(...ie);let q=P.length-1,J=P[q];J===0&&(q--,J=P[q]);let X=L.length-I-1,V=F;for(;X>=0;){const K=Math.min(V,J);if(L[q]===void 0)break;if(L[q].copyCellsFrom(L[X],V-K,J-K,K,!0),J-=K,J===0&&(q--,J=P[q]),V-=K,V===0){X--;const W=Math.max(X,0);V=(0,x.getWrappedLineTrimmedLength)(L,W,this._cols)}}for(let K=0;K<L.length;K++)P[K]<f&&L[K].setCell(P[K],E);let H=I-G;for(;H-- >0;)this.ybase===0?this.y<_-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-_&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+I,this.ybase+_-1)}if(T.length>0){const k=[],D=[];for(let q=0;q<this.lines.length;q++)D.push(this.lines.get(q));const L=this.lines.length;let U=L-1,F=0,P=T[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let I=0;for(let q=Math.min(this.lines.maxLength-1,L+S-1);q>=0;q--)if(P&&P.start>U+I){for(let J=P.newLines.length-1;J>=0;J--)this.lines.set(q--,P.newLines[J]);q++,k.push({index:U+1,amount:P.newLines.length}),I+=P.newLines.length,P=T[++F]}else this.lines.set(q,D[U--]);let G=0;for(let q=k.length-1;q>=0;q--)k[q].index+=G,this.lines.onInsertEmitter.fire(k[q]),G+=k[q].amount;const ie=Math.max(0,L+S-this.lines.maxLength);ie>0&&this.lines.onTrimEmitter.fire(ie)}}translateBufferLineToString(f,_,E=0,T){const S=this.lines.get(f);return S?S.translateToString(_,E,T):""}getWrappedRangeForLine(f){let _=f,E=f;for(;_>0&&this.lines.get(_).isWrapped;)_--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:_,last:E}}setupTabStops(f){for(f!=null?this.tabs[f]||(f=this.prevStop(f)):(this.tabs={},f=0);f<this._cols;f+=this._optionsService.rawOptions.tabStopWidth)this.tabs[f]=!0}prevStop(f){for(f==null&&(f=this.x);!this.tabs[--f]&&f>0;);return f>=this._cols?this._cols-1:f<0?0:f}nextStop(f){for(f==null&&(f=this.x);!this.tabs[++f]&&f<this._cols;);return f>=this._cols?this._cols-1:f<0?0:f}clearMarkers(f){this._isClearing=!0;for(let _=0;_<this.markers.length;_++)this.markers[_].line===f&&(this.markers[_].dispose(),this.markers.splice(_--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].dispose(),this.markers.splice(f--,1);this._isClearing=!1}addMarker(f){const _=new o.Marker(f);return this.markers.push(_),_.register(this.lines.onTrim(E=>{_.line-=E,_.line<0&&_.dispose()})),_.register(this.lines.onInsert(E=>{_.line>=E.index&&(_.line+=E.amount)})),_.register(this.lines.onDelete(E=>{_.line>=E.index&&_.line<E.index+E.amount&&_.dispose(),_.line>E.index&&(_.line-=E.amount)})),_.register(_.onDispose(()=>this._removeMarker(_))),_}_removeMarker(f){this._isClearing||this.markers.splice(this.markers.indexOf(f),1)}}},8437:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const m=u(3734),b=u(511),d=u(643),w=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new m.AttributeData);let x=0;class j{constructor(o,p,f=!1){this.isWrapped=f,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);const _=p||b.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let E=0;E<o;++E)this.setCell(E,_);this.length=o}get(o){const p=this._data[3*o+0],f=2097151&p;return[this._data[3*o+1],2097152&p?this._combined[o]:f?(0,w.stringFromCodePoint)(f):"",p>>22,2097152&p?this._combined[o].charCodeAt(this._combined[o].length-1):f]}set(o,p){this._data[3*o+1]=p[d.CHAR_DATA_ATTR_INDEX],p[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=p[1],this._data[3*o+0]=2097152|o|p[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=p[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[d.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(o){return this._data[3*o+0]>>22}hasWidth(o){return 12582912&this._data[3*o+0]}getFg(o){return this._data[3*o+1]}getBg(o){return this._data[3*o+2]}hasContent(o){return 4194303&this._data[3*o+0]}getCodePoint(o){const p=this._data[3*o+0];return 2097152&p?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&p}isCombined(o){return 2097152&this._data[3*o+0]}getString(o){const p=this._data[3*o+0];return 2097152&p?this._combined[o]:2097151&p?(0,w.stringFromCodePoint)(2097151&p):""}isProtected(o){return 536870912&this._data[3*o+2]}loadCell(o,p){return x=3*o,p.content=this._data[x+0],p.fg=this._data[x+1],p.bg=this._data[x+2],2097152&p.content&&(p.combinedData=this._combined[o]),268435456&p.bg&&(p.extended=this._extendedAttrs[o]),p}setCell(o,p){2097152&p.content&&(this._combined[o]=p.combinedData),268435456&p.bg&&(this._extendedAttrs[o]=p.extended),this._data[3*o+0]=p.content,this._data[3*o+1]=p.fg,this._data[3*o+2]=p.bg}setCellFromCodepoint(o,p,f,_){268435456&_.bg&&(this._extendedAttrs[o]=_.extended),this._data[3*o+0]=p|f<<22,this._data[3*o+1]=_.fg,this._data[3*o+2]=_.bg}addCodepointToCell(o,p,f){let _=this._data[3*o+0];2097152&_?this._combined[o]+=(0,w.stringFromCodePoint)(p):2097151&_?(this._combined[o]=(0,w.stringFromCodePoint)(2097151&_)+(0,w.stringFromCodePoint)(p),_&=-2097152,_|=2097152):_=p|4194304,f&&(_&=-12582913,_|=f<<22),this._data[3*o+0]=_}insertCells(o,p,f){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,f),p<this.length-o){const _=new b.CellData;for(let E=this.length-o-p-1;E>=0;--E)this.setCell(o+p+E,this.loadCell(o+E,_));for(let E=0;E<p;++E)this.setCell(o+E,f)}else for(let _=o;_<this.length;++_)this.setCell(_,f);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,f)}deleteCells(o,p,f){if(o%=this.length,p<this.length-o){const _=new b.CellData;for(let E=0;E<this.length-o-p;++E)this.setCell(o+E,this.loadCell(o+p+E,_));for(let E=this.length-p;E<this.length;++E)this.setCell(E,f)}else for(let _=o;_<this.length;++_)this.setCell(_,f);o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,f),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodepoint(o,0,1,f)}replaceCells(o,p,f,_=!1){if(_)for(o&&this.getWidth(o-1)===2&&!this.isProtected(o-1)&&this.setCellFromCodepoint(o-1,0,1,f),p<this.length&&this.getWidth(p-1)===2&&!this.isProtected(p)&&this.setCellFromCodepoint(p,0,1,f);o<p&&o<this.length;)this.isProtected(o)||this.setCell(o,f),o++;else for(o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,f),p<this.length&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p,0,1,f);o<p&&o<this.length;)this.setCell(o++,f)}resize(o,p){if(o===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const f=3*o;if(o>this.length){if(this._data.buffer.byteLength>=4*f)this._data=new Uint32Array(this._data.buffer,0,f);else{const _=new Uint32Array(f);_.set(this._data),this._data=_}for(let _=this.length;_<o;++_)this.setCell(_,p)}else{this._data=this._data.subarray(0,f);const _=Object.keys(this._combined);for(let T=0;T<_.length;T++){const S=parseInt(_[T],10);S>=o&&delete this._combined[S]}const E=Object.keys(this._extendedAttrs);for(let T=0;T<E.length;T++){const S=parseInt(E[T],10);S>=o&&delete this._extendedAttrs[S]}}return this.length=o,4*f*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const o=new Uint32Array(this._data.length);return o.set(this._data),this._data=o,1}return 0}fill(o,p=!1){if(p)for(let f=0;f<this.length;++f)this.isProtected(f)||this.setCell(f,o);else{this._combined={},this._extendedAttrs={};for(let f=0;f<this.length;++f)this.setCell(f,o)}}copyFrom(o){this.length!==o.length?this._data=new Uint32Array(o._data):this._data.set(o._data),this.length=o.length,this._combined={};for(const p in o._combined)this._combined[p]=o._combined[p];this._extendedAttrs={};for(const p in o._extendedAttrs)this._extendedAttrs[p]=o._extendedAttrs[p];this.isWrapped=o.isWrapped}clone(){const o=new j(0);o._data=new Uint32Array(this._data),o.length=this.length;for(const p in this._combined)o._combined[p]=this._combined[p];for(const p in this._extendedAttrs)o._extendedAttrs[p]=this._extendedAttrs[p];return o.isWrapped=this.isWrapped,o}getTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0])return o+(this._data[3*o+0]>>22);return 0}getNoBgTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0]||50331648&this._data[3*o+2])return o+(this._data[3*o+0]>>22);return 0}copyCellsFrom(o,p,f,_,E){const T=o._data;if(E)for(let k=_-1;k>=0;k--){for(let D=0;D<3;D++)this._data[3*(f+k)+D]=T[3*(p+k)+D];268435456&T[3*(p+k)+2]&&(this._extendedAttrs[f+k]=o._extendedAttrs[p+k])}else for(let k=0;k<_;k++){for(let D=0;D<3;D++)this._data[3*(f+k)+D]=T[3*(p+k)+D];268435456&T[3*(p+k)+2]&&(this._extendedAttrs[f+k]=o._extendedAttrs[p+k])}const S=Object.keys(o._combined);for(let k=0;k<S.length;k++){const D=parseInt(S[k],10);D>=p&&(this._combined[D-p+f]=o._combined[D])}}translateToString(o,p,f,_){p=p??0,f=f??this.length,o&&(f=Math.min(f,this.getTrimmedLength())),_&&(_.length=0);let E="";for(;p<f;){const T=this._data[3*p+0],S=2097151&T,k=2097152&T?this._combined[p]:S?(0,w.stringFromCodePoint)(S):d.WHITESPACE_CELL_CHAR;if(E+=k,_)for(let D=0;D<k.length;++D)_.push(p);p+=T>>22||1}return _&&_.push(p),E}}a.BufferLine=j},4841:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,m){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 m*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(y,a)=>{function u(m,b,d){if(b===m.length-1)return m[b].getTrimmedLength();const w=!m[b].hasContent(d-1)&&m[b].getWidth(d-1)===1,x=m[b+1].getWidth(0)===2;return w&&x?d-1:d}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(m,b,d,w,x){const j=[];for(let v=0;v<m.length-1;v++){let o=v,p=m.get(++o);if(!p.isWrapped)continue;const f=[m.get(v)];for(;o<m.length&&p.isWrapped;)f.push(p),p=m.get(++o);if(w>=v&&w<o){v+=f.length-1;continue}let _=0,E=u(f,_,b),T=1,S=0;for(;T<f.length;){const D=u(f,T,b),L=D-S,U=d-E,F=Math.min(L,U);f[_].copyCellsFrom(f[T],S,E,F,!1),E+=F,E===d&&(_++,E=0),S+=F,S===D&&(T++,S=0),E===0&&_!==0&&f[_-1].getWidth(d-1)===2&&(f[_].copyCellsFrom(f[_-1],d-1,E++,1,!1),f[_-1].setCell(d-1,x))}f[_].replaceCells(E,d,x);let k=0;for(let D=f.length-1;D>0&&(D>_||f[D].getTrimmedLength()===0);D--)k++;k>0&&(j.push(v+f.length-k),j.push(k)),v+=f.length-1}return j},a.reflowLargerCreateNewLayout=function(m,b){const d=[];let w=0,x=b[w],j=0;for(let v=0;v<m.length;v++)if(x===v){const o=b[++w];m.onDeleteEmitter.fire({index:v-j,amount:o}),v+=o-1,j+=o,x=b[++w]}else d.push(v);return{layout:d,countRemoved:j}},a.reflowLargerApplyNewLayout=function(m,b){const d=[];for(let w=0;w<b.length;w++)d.push(m.get(b[w]));for(let w=0;w<d.length;w++)m.set(w,d[w]);m.length=b.length},a.reflowSmallerGetNewLineLengths=function(m,b,d){const w=[],x=m.map((p,f)=>u(m,f,b)).reduce((p,f)=>p+f);let j=0,v=0,o=0;for(;o<x;){if(x-o<d){w.push(x-o);break}j+=d;const p=u(m,v,b);j>p&&(j-=p,v++);const f=m[v].getWidth(j-1)===2;f&&j--;const _=f?d-1:d;w.push(_),o+=_}return w},a.getWrappedLineTrimmedLength=u},5295:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const m=u(8460),b=u(844),d=u(9092);class w extends b.Disposable{constructor(j,v){super(),this._optionsService=j,this._bufferService=v,this._onBufferActivate=this.register(new m.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 d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.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(j){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(j),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(j,v){this._normal.resize(j,v),this._alt.resize(j,v),this.setupTabStops(j)}setupTabStops(j){this._normal.setupTabStops(j),this._alt.setupTabStops(j)}}a.BufferSet=w},511:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const m=u(482),b=u(643),d=u(3734);class w extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(j){const v=new w;return v.setFromCharData(j),v}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,m.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(j){this.fg=j[b.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(j[b.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(j[b.CHAR_DATA_CHAR_INDEX].length===2){const o=j[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const p=j[b.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=p&&p<=57343?this.content=1024*(o-55296)+p-56320+65536|j[b.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=j[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|j[b.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=j[b.CHAR_DATA_CHAR_INDEX],this.content=2097152|j[b.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=w},643:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const m=u(8460),b=u(844);class d{get id(){return this._id}constructor(x){this.line=x,this.isDisposed=!1,this._disposables=[],this._id=d._nextId++,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,b.disposeArray)(this._disposables),this._disposables.length=0)}register(x){return this._disposables.push(x),x}}a.Marker=d,d._nextId=1},7116:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(y,a)=>{var u,m,b;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
221
+ `,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(u||(a.C0=u={})),function(d){d.PAD="€",d.HOP="",d.BPH="‚",d.NBH="ƒ",d.IND="„",d.NEL="…",d.SSA="†",d.ESA="‡",d.HTS="ˆ",d.HTJ="‰",d.VTS="Š",d.PLD="‹",d.PLU="Œ",d.RI="",d.SS2="Ž",d.SS3="",d.DCS="",d.PU1="‘",d.PU2="’",d.STS="“",d.CCH="”",d.MW="•",d.SPA="–",d.EPA="—",d.SOS="˜",d.SGCI="™",d.SCI="š",d.CSI="›",d.ST="œ",d.OSC="",d.PM="ž",d.APC="Ÿ"}(m||(a.C1=m={})),function(d){d.ST=`${u.ESC}\\`}(b||(a.C1_ESCAPED=b={}))},7399:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const m=u(2584),b={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(d,w,x,j){const v={type:0,cancel:!1,key:void 0},o=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?v.key=w?m.C0.ESC+"OA":m.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?v.key=w?m.C0.ESC+"OD":m.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?v.key=w?m.C0.ESC+"OC":m.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(v.key=w?m.C0.ESC+"OB":m.C0.ESC+"[B");break;case 8:v.key=d.ctrlKey?"\b":m.C0.DEL,d.altKey&&(v.key=m.C0.ESC+v.key);break;case 9:if(d.shiftKey){v.key=m.C0.ESC+"[Z";break}v.key=m.C0.HT,v.cancel=!0;break;case 13:v.key=d.altKey?m.C0.ESC+m.C0.CR:m.C0.CR,v.cancel=!0;break;case 27:v.key=m.C0.ESC,d.altKey&&(v.key=m.C0.ESC+m.C0.ESC),v.cancel=!0;break;case 37:if(d.metaKey)break;o?(v.key=m.C0.ESC+"[1;"+(o+1)+"D",v.key===m.C0.ESC+"[1;3D"&&(v.key=m.C0.ESC+(x?"b":"[1;5D"))):v.key=w?m.C0.ESC+"OD":m.C0.ESC+"[D";break;case 39:if(d.metaKey)break;o?(v.key=m.C0.ESC+"[1;"+(o+1)+"C",v.key===m.C0.ESC+"[1;3C"&&(v.key=m.C0.ESC+(x?"f":"[1;5C"))):v.key=w?m.C0.ESC+"OC":m.C0.ESC+"[C";break;case 38:if(d.metaKey)break;o?(v.key=m.C0.ESC+"[1;"+(o+1)+"A",x||v.key!==m.C0.ESC+"[1;3A"||(v.key=m.C0.ESC+"[1;5A")):v.key=w?m.C0.ESC+"OA":m.C0.ESC+"[A";break;case 40:if(d.metaKey)break;o?(v.key=m.C0.ESC+"[1;"+(o+1)+"B",x||v.key!==m.C0.ESC+"[1;3B"||(v.key=m.C0.ESC+"[1;5B")):v.key=w?m.C0.ESC+"OB":m.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(v.key=m.C0.ESC+"[2~");break;case 46:v.key=o?m.C0.ESC+"[3;"+(o+1)+"~":m.C0.ESC+"[3~";break;case 36:v.key=o?m.C0.ESC+"[1;"+(o+1)+"H":w?m.C0.ESC+"OH":m.C0.ESC+"[H";break;case 35:v.key=o?m.C0.ESC+"[1;"+(o+1)+"F":w?m.C0.ESC+"OF":m.C0.ESC+"[F";break;case 33:d.shiftKey?v.type=2:d.ctrlKey?v.key=m.C0.ESC+"[5;"+(o+1)+"~":v.key=m.C0.ESC+"[5~";break;case 34:d.shiftKey?v.type=3:d.ctrlKey?v.key=m.C0.ESC+"[6;"+(o+1)+"~":v.key=m.C0.ESC+"[6~";break;case 112:v.key=o?m.C0.ESC+"[1;"+(o+1)+"P":m.C0.ESC+"OP";break;case 113:v.key=o?m.C0.ESC+"[1;"+(o+1)+"Q":m.C0.ESC+"OQ";break;case 114:v.key=o?m.C0.ESC+"[1;"+(o+1)+"R":m.C0.ESC+"OR";break;case 115:v.key=o?m.C0.ESC+"[1;"+(o+1)+"S":m.C0.ESC+"OS";break;case 116:v.key=o?m.C0.ESC+"[15;"+(o+1)+"~":m.C0.ESC+"[15~";break;case 117:v.key=o?m.C0.ESC+"[17;"+(o+1)+"~":m.C0.ESC+"[17~";break;case 118:v.key=o?m.C0.ESC+"[18;"+(o+1)+"~":m.C0.ESC+"[18~";break;case 119:v.key=o?m.C0.ESC+"[19;"+(o+1)+"~":m.C0.ESC+"[19~";break;case 120:v.key=o?m.C0.ESC+"[20;"+(o+1)+"~":m.C0.ESC+"[20~";break;case 121:v.key=o?m.C0.ESC+"[21;"+(o+1)+"~":m.C0.ESC+"[21~";break;case 122:v.key=o?m.C0.ESC+"[23;"+(o+1)+"~":m.C0.ESC+"[23~";break;case 123:v.key=o?m.C0.ESC+"[24;"+(o+1)+"~":m.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(x&&!j||!d.altKey||d.metaKey)!x||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?v.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(v.key=m.C0.US),d.key==="@"&&(v.key=m.C0.NUL)):d.keyCode===65&&(v.type=1);else{const p=b[d.keyCode],f=p==null?void 0:p[d.shiftKey?1:0];if(f)v.key=m.C0.ESC+f;else if(d.keyCode>=65&&d.keyCode<=90){const _=d.ctrlKey?d.keyCode-64:d.keyCode+32;let E=String.fromCharCode(_);d.shiftKey&&(E=E.toUpperCase()),v.key=m.C0.ESC+E}else if(d.keyCode===32)v.key=m.C0.ESC+(d.ctrlKey?m.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let _=d.code.slice(3,4);d.shiftKey||(_=_.toLowerCase()),v.key=m.C0.ESC+_,v.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?v.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?v.key=m.C0.NUL:d.keyCode>=51&&d.keyCode<=55?v.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?v.key=m.C0.DEL:d.keyCode===219?v.key=m.C0.ESC:d.keyCode===220?v.key=m.C0.FS:d.keyCode===221&&(v.key=m.C0.GS)}return v}},482:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,m=0,b=u.length){let d="";for(let w=m;w<b;++w){let x=u[w];x>65535?(x-=65536,d+=String.fromCharCode(55296+(x>>10))+String.fromCharCode(x%1024+56320)):d+=String.fromCharCode(x)}return d},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,m){const b=u.length;if(!b)return 0;let d=0,w=0;if(this._interim){const x=u.charCodeAt(w++);56320<=x&&x<=57343?m[d++]=1024*(this._interim-55296)+x-56320+65536:(m[d++]=this._interim,m[d++]=x),this._interim=0}for(let x=w;x<b;++x){const j=u.charCodeAt(x);if(55296<=j&&j<=56319){if(++x>=b)return this._interim=j,d;const v=u.charCodeAt(x);56320<=v&&v<=57343?m[d++]=1024*(j-55296)+v-56320+65536:(m[d++]=j,m[d++]=v)}else j!==65279&&(m[d++]=j)}return d}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,m){const b=u.length;if(!b)return 0;let d,w,x,j,v=0,o=0,p=0;if(this.interim[0]){let E=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;let S,k=0;for(;(S=63&this.interim[++k])&&k<4;)T<<=6,T|=S;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=D-k;for(;p<L;){if(p>=b)return 0;if(S=u[p++],(192&S)!=128){p--,E=!0;break}this.interim[k++]=S,T<<=6,T|=63&S}E||(D===2?T<128?p--:m[v++]=T:D===3?T<2048||T>=55296&&T<=57343||T===65279||(m[v++]=T):T<65536||T>1114111||(m[v++]=T)),this.interim.fill(0)}const f=b-4;let _=p;for(;_<b;){for(;!(!(_<f)||128&(d=u[_])||128&(w=u[_+1])||128&(x=u[_+2])||128&(j=u[_+3]));)m[v++]=d,m[v++]=w,m[v++]=x,m[v++]=j,_+=4;if(d=u[_++],d<128)m[v++]=d;else if((224&d)==192){if(_>=b)return this.interim[0]=d,v;if(w=u[_++],(192&w)!=128){_--;continue}if(o=(31&d)<<6|63&w,o<128){_--;continue}m[v++]=o}else if((240&d)==224){if(_>=b)return this.interim[0]=d,v;if(w=u[_++],(192&w)!=128){_--;continue}if(_>=b)return this.interim[0]=d,this.interim[1]=w,v;if(x=u[_++],(192&x)!=128){_--;continue}if(o=(15&d)<<12|(63&w)<<6|63&x,o<2048||o>=55296&&o<=57343||o===65279)continue;m[v++]=o}else if((248&d)==240){if(_>=b)return this.interim[0]=d,v;if(w=u[_++],(192&w)!=128){_--;continue}if(_>=b)return this.interim[0]=d,this.interim[1]=w,v;if(x=u[_++],(192&x)!=128){_--;continue}if(_>=b)return this.interim[0]=d,this.interim[1]=w,this.interim[2]=x,v;if(j=u[_++],(192&j)!=128){_--;continue}if(o=(7&d)<<18|(63&w)<<12|(63&x)<<6|63&j,o<65536||o>1114111)continue;m[v++]=o}}return v}}},225:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const m=u(1480),b=[[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]],d=[[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 w;a.UnicodeV6=class{constructor(){if(this.version="6",!w){w=new Uint8Array(65536),w.fill(1),w[0]=0,w.fill(0,1,32),w.fill(0,127,160),w.fill(2,4352,4448),w[9001]=2,w[9002]=2,w.fill(2,11904,42192),w[12351]=1,w.fill(2,44032,55204),w.fill(2,63744,64256),w.fill(2,65040,65050),w.fill(2,65072,65136),w.fill(2,65280,65377),w.fill(2,65504,65511);for(let x=0;x<b.length;++x)w.fill(0,b[x][0],b[x][1]+1)}}wcwidth(x){return x<32?0:x<127?1:x<65536?w[x]:function(j,v){let o,p=0,f=v.length-1;if(j<v[0][0]||j>v[f][1])return!1;for(;f>=p;)if(o=p+f>>1,j>v[o][1])p=o+1;else{if(!(j<v[o][0]))return!0;f=o-1}return!1}(x,d)?0:x>=131072&&x<=196605||x>=196608&&x<=262141?2:1}charProperties(x,j){let v=this.wcwidth(x),o=v===0&&j!==0;if(o){const p=m.UnicodeService.extractWidth(j);p===0?o=!1:p>v&&(v=p)}return m.UnicodeService.createPropertyValue(0,v,o)}}},5981:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const m=u(8460),b=u(844);class d extends b.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 m.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(x,j){if(j!==void 0&&this._syncCalls>j)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 v;for(this._isSyncWriting=!0;v=this._writeBuffer.shift();){this._action(v);const o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(x,j){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(j),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(j)}_innerWrite(x=0,j=!0){const v=x||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const o=this._writeBuffer[this._bufferOffset],p=this._action(o,j);if(p){const _=E=>Date.now()-v>=12?setTimeout(()=>this._innerWrite(0,E)):this._innerWrite(v,E);return void p.catch(E=>(queueMicrotask(()=>{throw E}),Promise.resolve(!1))).then(_)}const f=this._callbacks[this._bufferOffset];if(f&&f(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-v>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=d},5941:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.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})$/,m=/^[\da-f]+$/;function b(d,w){const x=d.toString(16),j=x.length<2?"0"+x:x;switch(w){case 4:return x[0];case 8:return j;case 12:return(j+j).slice(0,3);default:return j+j}}a.parseColor=function(d){if(!d)return;let w=d.toLowerCase();if(w.indexOf("rgb:")===0){w=w.slice(4);const x=u.exec(w);if(x){const j=x[1]?15:x[4]?255:x[7]?4095:65535;return[Math.round(parseInt(x[1]||x[4]||x[7]||x[10],16)/j*255),Math.round(parseInt(x[2]||x[5]||x[8]||x[11],16)/j*255),Math.round(parseInt(x[3]||x[6]||x[9]||x[12],16)/j*255)]}}else if(w.indexOf("#")===0&&(w=w.slice(1),m.exec(w)&&[3,6,9,12].includes(w.length))){const x=w.length/3,j=[0,0,0];for(let v=0;v<3;++v){const o=parseInt(w.slice(x*v,x*v+x),16);j[v]=x===1?o<<4:x===2?o:x===3?o>>4:o>>8}return j}},a.toRgbString=function(d,w=16){const[x,j,v]=d;return`rgb:${b(x,w)}/${b(j,w)}/${b(v,w)}`}},5770:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const m=u(482),b=u(8742),d=u(5770),w=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=w,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=w}registerHandler(j,v){this._handlers[j]===void 0&&(this._handlers[j]=[]);const o=this._handlers[j];return o.push(v),{dispose:()=>{const p=o.indexOf(v);p!==-1&&o.splice(p,1)}}}clearHandler(j){this._handlers[j]&&delete this._handlers[j]}setHandlerFallback(j){this._handlerFb=j}reset(){if(this._active.length)for(let j=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;j>=0;--j)this._active[j].unhook(!1);this._stack.paused=!1,this._active=w,this._ident=0}hook(j,v){if(this.reset(),this._ident=j,this._active=this._handlers[j]||w,this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].hook(v);else this._handlerFb(this._ident,"HOOK",v)}put(j,v,o){if(this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].put(j,v,o);else this._handlerFb(this._ident,"PUT",(0,m.utf32ToString)(j,v,o))}unhook(j,v=!0){if(this._active.length){let o=!1,p=this._active.length-1,f=!1;if(this._stack.paused&&(p=this._stack.loopPosition-1,o=v,f=this._stack.fallThrough,this._stack.paused=!1),!f&&o===!1){for(;p>=0&&(o=this._active[p].unhook(j),o!==!0);p--)if(o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!1,o;p--}for(;p>=0;p--)if(o=this._active[p].unhook(!1),o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!0,o}else this._handlerFb(this._ident,"UNHOOK",j);this._active=w,this._ident=0}};const x=new b.Params;x.addParam(0),a.DcsHandler=class{constructor(j){this._handler=j,this._data="",this._params=x,this._hitLimit=!1}hook(j){this._params=j.length>1||j.params[0]?j.clone():x,this._data="",this._hitLimit=!1}put(j,v,o){this._hitLimit||(this._data+=(0,m.utf32ToString)(j,v,o),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(j){let v=!1;if(this._hitLimit)v=!1;else if(j&&(v=this._handler(this._data,this._params),v instanceof Promise))return v.then(o=>(this._params=x,this._data="",this._hitLimit=!1,o));return this._params=x,this._data="",this._hitLimit=!1,v}}},2015:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const m=u(844),b=u(8742),d=u(6242),w=u(6351);class x{constructor(p){this.table=new Uint8Array(p)}setDefault(p,f){this.table.fill(p<<4|f)}add(p,f,_,E){this.table[f<<8|p]=_<<4|E}addMany(p,f,_,E){for(let T=0;T<p.length;T++)this.table[f<<8|p[T]]=_<<4|E}}a.TransitionTable=x;const j=160;a.VT500_TRANSITION_TABLE=function(){const o=new x(4095),p=Array.apply(null,Array(256)).map((k,D)=>D),f=(k,D)=>p.slice(k,D),_=f(32,127),E=f(0,24);E.push(25),E.push.apply(E,f(28,32));const T=f(0,14);let S;for(S in o.setDefault(1,0),o.addMany(_,0,2,0),T)o.addMany([24,26,153,154],S,3,0),o.addMany(f(128,144),S,3,0),o.addMany(f(144,152),S,3,0),o.add(156,S,0,0),o.add(27,S,11,1),o.add(157,S,4,8),o.addMany([152,158,159],S,0,7),o.add(155,S,11,3),o.add(144,S,11,9);return o.addMany(E,0,3,0),o.addMany(E,1,3,1),o.add(127,1,0,1),o.addMany(E,8,0,8),o.addMany(E,3,3,3),o.add(127,3,0,3),o.addMany(E,4,3,4),o.add(127,4,0,4),o.addMany(E,6,3,6),o.addMany(E,5,3,5),o.add(127,5,0,5),o.addMany(E,2,3,2),o.add(127,2,0,2),o.add(93,1,4,8),o.addMany(_,8,5,8),o.add(127,8,5,8),o.addMany([156,27,24,26,7],8,6,0),o.addMany(f(28,32),8,0,8),o.addMany([88,94,95],1,0,7),o.addMany(_,7,0,7),o.addMany(E,7,0,7),o.add(156,7,0,0),o.add(127,7,0,7),o.add(91,1,11,3),o.addMany(f(64,127),3,7,0),o.addMany(f(48,60),3,8,4),o.addMany([60,61,62,63],3,9,4),o.addMany(f(48,60),4,8,4),o.addMany(f(64,127),4,7,0),o.addMany([60,61,62,63],4,0,6),o.addMany(f(32,64),6,0,6),o.add(127,6,0,6),o.addMany(f(64,127),6,0,0),o.addMany(f(32,48),3,9,5),o.addMany(f(32,48),5,9,5),o.addMany(f(48,64),5,0,6),o.addMany(f(64,127),5,7,0),o.addMany(f(32,48),4,9,5),o.addMany(f(32,48),1,9,2),o.addMany(f(32,48),2,9,2),o.addMany(f(48,127),2,10,0),o.addMany(f(48,80),1,10,0),o.addMany(f(81,88),1,10,0),o.addMany([89,90,92],1,10,0),o.addMany(f(96,127),1,10,0),o.add(80,1,11,9),o.addMany(E,9,0,9),o.add(127,9,0,9),o.addMany(f(28,32),9,0,9),o.addMany(f(32,48),9,9,12),o.addMany(f(48,60),9,8,10),o.addMany([60,61,62,63],9,9,10),o.addMany(E,11,0,11),o.addMany(f(32,128),11,0,11),o.addMany(f(28,32),11,0,11),o.addMany(E,10,0,10),o.add(127,10,0,10),o.addMany(f(28,32),10,0,10),o.addMany(f(48,60),10,8,10),o.addMany([60,61,62,63],10,0,11),o.addMany(f(32,48),10,9,12),o.addMany(E,12,0,12),o.add(127,12,0,12),o.addMany(f(28,32),12,0,12),o.addMany(f(32,48),12,9,12),o.addMany(f(48,64),12,0,11),o.addMany(f(64,127),12,12,13),o.addMany(f(64,127),10,12,13),o.addMany(f(64,127),9,12,13),o.addMany(E,13,13,13),o.addMany(_,13,13,13),o.add(127,13,0,13),o.addMany([27,156,24,26],13,14,0),o.add(j,0,2,0),o.add(j,8,5,8),o.add(j,6,0,6),o.add(j,11,0,11),o.add(j,13,13,13),o}();class v extends m.Disposable{constructor(p=a.VT500_TRANSITION_TABLE){super(),this._transitions=p,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new b.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(f,_,E)=>{},this._executeHandlerFb=f=>{},this._csiHandlerFb=(f,_)=>{},this._escHandlerFb=f=>{},this._errorHandlerFb=f=>f,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,m.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new d.OscParser),this._dcsParser=this.register(new w.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(p,f=[64,126]){let _=0;if(p.prefix){if(p.prefix.length>1)throw new Error("only one byte as prefix supported");if(_=p.prefix.charCodeAt(0),_&&60>_||_>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(p.intermediates){if(p.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let T=0;T<p.intermediates.length;++T){const S=p.intermediates.charCodeAt(T);if(32>S||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");_<<=8,_|=S}}if(p.final.length!==1)throw new Error("final must be a single byte");const E=p.final.charCodeAt(0);if(f[0]>E||E>f[1])throw new Error(`final must be in range ${f[0]} .. ${f[1]}`);return _<<=8,_|=E,_}identToString(p){const f=[];for(;p;)f.push(String.fromCharCode(255&p)),p>>=8;return f.reverse().join("")}setPrintHandler(p){this._printHandler=p}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(p,f){const _=this._identifier(p,[48,126]);this._escHandlers[_]===void 0&&(this._escHandlers[_]=[]);const E=this._escHandlers[_];return E.push(f),{dispose:()=>{const T=E.indexOf(f);T!==-1&&E.splice(T,1)}}}clearEscHandler(p){this._escHandlers[this._identifier(p,[48,126])]&&delete this._escHandlers[this._identifier(p,[48,126])]}setEscHandlerFallback(p){this._escHandlerFb=p}setExecuteHandler(p,f){this._executeHandlers[p.charCodeAt(0)]=f}clearExecuteHandler(p){this._executeHandlers[p.charCodeAt(0)]&&delete this._executeHandlers[p.charCodeAt(0)]}setExecuteHandlerFallback(p){this._executeHandlerFb=p}registerCsiHandler(p,f){const _=this._identifier(p);this._csiHandlers[_]===void 0&&(this._csiHandlers[_]=[]);const E=this._csiHandlers[_];return E.push(f),{dispose:()=>{const T=E.indexOf(f);T!==-1&&E.splice(T,1)}}}clearCsiHandler(p){this._csiHandlers[this._identifier(p)]&&delete this._csiHandlers[this._identifier(p)]}setCsiHandlerFallback(p){this._csiHandlerFb=p}registerDcsHandler(p,f){return this._dcsParser.registerHandler(this._identifier(p),f)}clearDcsHandler(p){this._dcsParser.clearHandler(this._identifier(p))}setDcsHandlerFallback(p){this._dcsParser.setHandlerFallback(p)}registerOscHandler(p,f){return this._oscParser.registerHandler(p,f)}clearOscHandler(p){this._oscParser.clearHandler(p)}setOscHandlerFallback(p){this._oscParser.setHandlerFallback(p)}setErrorHandler(p){this._errorHandler=p}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(p,f,_,E,T){this._parseStack.state=p,this._parseStack.handlers=f,this._parseStack.handlerPos=_,this._parseStack.transition=E,this._parseStack.chunkPos=T}parse(p,f,_){let E,T=0,S=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(_===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const D=this._parseStack.handlers;let L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(_===!1&&L>-1){for(;L>=0&&(E=D[L](this._params),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 4:if(_===!1&&L>-1){for(;L>=0&&(E=D[L](),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 6:if(T=p[this._parseStack.chunkPos],E=this._dcsParser.unhook(T!==24&&T!==26,_),E)return E;T===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(T=p[this._parseStack.chunkPos],E=this._oscParser.end(T!==24&&T!==26,_),E)return E;T===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,k=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let D=k;D<f;++D){switch(T=p[D],S=this._transitions.table[this.currentState<<8|(T<160?T:j)],S>>4){case 2:for(let I=D+1;;++I){if(I>=f||(T=p[I])<32||T>126&&T<j){this._printHandler(p,D,I),D=I-1;break}if(++I>=f||(T=p[I])<32||T>126&&T<j){this._printHandler(p,D,I),D=I-1;break}if(++I>=f||(T=p[I])<32||T>126&&T<j){this._printHandler(p,D,I),D=I-1;break}if(++I>=f||(T=p[I])<32||T>126&&T<j){this._printHandler(p,D,I),D=I-1;break}}break;case 3:this._executeHandlers[T]?this._executeHandlers[T]():this._executeHandlerFb(T),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:D,code:T,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const L=this._csiHandlers[this._collect<<8|T];let U=L?L.length-1:-1;for(;U>=0&&(E=L[U](this._params),E!==!0);U--)if(E instanceof Promise)return this._preserveStack(3,L,U,S,D),E;U<0&&this._csiHandlerFb(this._collect<<8|T,this._params),this.precedingJoinState=0;break;case 8:do switch(T){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(T-48)}while(++D<f&&(T=p[D])>47&&T<60);D--;break;case 9:this._collect<<=8,this._collect|=T;break;case 10:const F=this._escHandlers[this._collect<<8|T];let P=F?F.length-1:-1;for(;P>=0&&(E=F[P](),E!==!0);P--)if(E instanceof Promise)return this._preserveStack(4,F,P,S,D),E;P<0&&this._escHandlerFb(this._collect<<8|T),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|T,this._params);break;case 13:for(let I=D+1;;++I)if(I>=f||(T=p[I])===24||T===26||T===27||T>127&&T<j){this._dcsParser.put(p,D,I),D=I-1;break}break;case 14:if(E=this._dcsParser.unhook(T!==24&&T!==26),E)return this._preserveStack(6,[],0,S,D),E;T===27&&(S|=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=D+1;;I++)if(I>=f||(T=p[I])<32||T>127&&T<j){this._oscParser.put(p,D,I),D=I-1;break}break;case 6:if(E=this._oscParser.end(T!==24&&T!==26),E)return this._preserveStack(5,[],0,S,D),E;T===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&S}}}a.EscapeSequenceParser=v},6242:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const m=u(5770),b=u(482),d=[];a.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(w,x){this._handlers[w]===void 0&&(this._handlers[w]=[]);const j=this._handlers[w];return j.push(x),{dispose:()=>{const v=j.indexOf(x);v!==-1&&j.splice(v,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].start();else this._handlerFb(this._id,"START")}_put(w,x,j){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(w,x,j);else this._handlerFb(this._id,"PUT",(0,b.utf32ToString)(w,x,j))}start(){this.reset(),this._state=1}put(w,x,j){if(this._state!==3){if(this._state===1)for(;x<j;){const v=w[x++];if(v===59){this._state=2,this._start();break}if(v<48||57<v)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+v-48}this._state===2&&j-x>0&&this._put(w,x,j)}}end(w,x=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let j=!1,v=this._active.length-1,o=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,j=x,o=this._stack.fallThrough,this._stack.paused=!1),!o&&j===!1){for(;v>=0&&(j=this._active[v].end(w),j!==!0);v--)if(j instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,j;v--}for(;v>=0;v--)if(j=this._active[v].end(!1),j instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,j}else this._handlerFb(this._id,"END",w);this._active=d,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(w){this._handler=w,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(w,x,j){this._hitLimit||(this._data+=(0,b.utf32ToString)(w,x,j),this._data.length>m.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(w){let x=!1;if(this._hitLimit)x=!1;else if(w&&(x=this._handler(this._data),x instanceof Promise))return x.then(j=>(this._data="",this._hitLimit=!1,j));return this._data="",this._hitLimit=!1,x}}},8742:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class m{static fromArray(d){const w=new m;if(!d.length)return w;for(let x=Array.isArray(d[0])?1:0;x<d.length;++x){const j=d[x];if(Array.isArray(j))for(let v=0;v<j.length;++v)w.addSubParam(j[v]);else w.addParam(j)}return w}constructor(d=32,w=32){if(this.maxLength=d,this.maxSubParamsLength=w,w>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(w),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new m(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let w=0;w<this.length;++w){d.push(this.params[w]);const x=this._subParamsIdx[w]>>8,j=255&this._subParamsIdx[w];j-x>0&&d.push(Array.prototype.slice.call(this._subParams,x,j))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>u?u:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>u?u:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const w=this._subParamsIdx[d]>>8,x=255&this._subParamsIdx[d];return x-w>0?this._subParams.subarray(w,x):null}getSubParamsAll(){const d={};for(let w=0;w<this.length;++w){const x=this._subParamsIdx[w]>>8,j=255&this._subParamsIdx[w];j-x>0&&(d[w]=this._subParams.slice(x,j))}return d}addDigit(d){let w;if(this._rejectDigits||!(w=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const x=this._digitIsSub?this._subParams:this.params,j=x[w-1];x[w-1]=~j?Math.min(10*j+d,u):d}}a.Params=m},5741:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,m){const b={instance:m,dispose:m.dispose,isDisposed:!1};this._addons.push(b),m.dispose=()=>this._wrappedAddonDispose(b),m.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let m=-1;for(let b=0;b<this._addons.length;b++)if(this._addons[b]===u){m=b;break}if(m===-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(m,1)}}},8771:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const m=u(3785),b=u(511);a.BufferApiView=class{constructor(d,w){this._buffer=d,this.type=w}init(d){return this._buffer=d,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(d){const w=this._buffer.lines.get(d);if(w)return new m.BufferLineApiView(w)}getNullCell(){return new b.CellData}}},3785:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const m=u(511);a.BufferLineApiView=class{constructor(b){this._line=b}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(b,d){if(!(b<0||b>=this._line.length))return d?(this._line.loadCell(b,d),d):this._line.loadCell(b,new m.CellData)}translateToString(b,d,w){return this._line.translateToString(b,d,w)}}},8285:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const m=u(8771),b=u(8460),d=u(844);class w extends d.Disposable{constructor(j){super(),this._core=j,this._onBufferChange=this.register(new b.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new m.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new m.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=w},7975:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,m){return this._core.registerCsiHandler(u,b=>m(b.toArray()))}addCsiHandler(u,m){return this.registerCsiHandler(u,m)}registerDcsHandler(u,m){return this._core.registerDcsHandler(u,(b,d)=>m(b,d.toArray()))}addDcsHandler(u,m){return this.registerDcsHandler(u,m)}registerEscHandler(u,m){return this._core.registerEscHandler(u,m)}addEscHandler(u,m){return this.registerEscHandler(u,m)}registerOscHandler(u,m){return this._core.registerOscHandler(u,m)}addOscHandler(u,m){return this.registerOscHandler(u,m)}}},7090:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.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(y,a,u){var m=this&&this.__decorate||function(o,p,f,_){var E,T=arguments.length,S=T<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,f):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(o,p,f,_);else for(var k=o.length-1;k>=0;k--)(E=o[k])&&(S=(T<3?E(S):T>3?E(p,f,S):E(p,f))||S);return T>3&&S&&Object.defineProperty(p,f,S),S},b=this&&this.__param||function(o,p){return function(f,_){p(f,_,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const d=u(8460),w=u(844),x=u(5295),j=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let v=a.BufferService=class extends w.Disposable{get buffer(){return this.buffers.active}constructor(o){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(o.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(o.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new x.BufferSet(o,this))}resize(o,p){this.cols=o,this.rows=p,this.buffers.resize(o,p),this._onResize.fire({cols:o,rows:p})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(o,p=!1){const f=this.buffer;let _;_=this._cachedBlankLine,_&&_.length===this.cols&&_.getFg(0)===o.fg&&_.getBg(0)===o.bg||(_=f.getBlankLine(o,p),this._cachedBlankLine=_),_.isWrapped=p;const E=f.ybase+f.scrollTop,T=f.ybase+f.scrollBottom;if(f.scrollTop===0){const S=f.lines.isFull;T===f.lines.length-1?S?f.lines.recycle().copyFrom(_):f.lines.push(_.clone()):f.lines.splice(T+1,0,_.clone()),S?this.isUserScrolling&&(f.ydisp=Math.max(f.ydisp-1,0)):(f.ybase++,this.isUserScrolling||f.ydisp++)}else{const S=T-E+1;f.lines.shiftElements(E+1,S-1,-1),f.lines.set(T,_.clone())}this.isUserScrolling||(f.ydisp=f.ybase),this._onScroll.fire(f.ydisp)}scrollLines(o,p,f){const _=this.buffer;if(o<0){if(_.ydisp===0)return;this.isUserScrolling=!0}else o+_.ydisp>=_.ybase&&(this.isUserScrolling=!1);const E=_.ydisp;_.ydisp=Math.max(Math.min(_.ydisp+o,_.ybase),0),E!==_.ydisp&&(p||this._onScroll.fire(_.ydisp))}};a.BufferService=v=m([b(0,j.IOptionsService)],v)},7994:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,m){this._charsets[u]=m,this.glevel===u&&(this.charset=m)}}},1753:function(y,a,u){var m=this&&this.__decorate||function(_,E,T,S){var k,D=arguments.length,L=D<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,T):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,E,T,S);else for(var U=_.length-1;U>=0;U--)(k=_[U])&&(L=(D<3?k(L):D>3?k(E,T,L):k(E,T))||L);return D>3&&L&&Object.defineProperty(E,T,L),L},b=this&&this.__param||function(_,E){return function(T,S){E(T,S,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const d=u(2585),w=u(8460),x=u(844),j={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:_=>_.button!==4&&_.action===1&&(_.ctrl=!1,_.alt=!1,_.shift=!1,!0)},VT200:{events:19,restrict:_=>_.action!==32},DRAG:{events:23,restrict:_=>_.action!==32||_.button!==3},ANY:{events:31,restrict:_=>!0}};function v(_,E){let T=(_.ctrl?16:0)|(_.shift?4:0)|(_.alt?8:0);return _.button===4?(T|=64,T|=_.action):(T|=3&_.button,4&_.button&&(T|=64),8&_.button&&(T|=128),_.action===32?T|=32:_.action!==0||E||(T|=3)),T}const o=String.fromCharCode,p={DEFAULT:_=>{const E=[v(_,!1)+32,_.col+32,_.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${o(E[0])}${o(E[1])}${o(E[2])}`},SGR:_=>{const E=_.action===0&&_.button!==4?"m":"M";return`\x1B[<${v(_,!0)};${_.col};${_.row}${E}`},SGR_PIXELS:_=>{const E=_.action===0&&_.button!==4?"m":"M";return`\x1B[<${v(_,!0)};${_.x};${_.y}${E}`}};let f=a.CoreMouseService=class extends x.Disposable{constructor(_,E){super(),this._bufferService=_,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new w.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const T of Object.keys(j))this.addProtocol(T,j[T]);for(const T of Object.keys(p))this.addEncoding(T,p[T]);this.reset()}addProtocol(_,E){this._protocols[_]=E}addEncoding(_,E){this._encodings[_]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(_){if(!this._protocols[_])throw new Error(`unknown protocol "${_}"`);this._activeProtocol=_,this._onProtocolChange.fire(this._protocols[_].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(_){if(!this._encodings[_])throw new Error(`unknown encoding "${_}"`);this._activeEncoding=_}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(_){if(_.col<0||_.col>=this._bufferService.cols||_.row<0||_.row>=this._bufferService.rows||_.button===4&&_.action===32||_.button===3&&_.action!==32||_.button!==4&&(_.action===2||_.action===3)||(_.col++,_.row++,_.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,_,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(_))return!1;const E=this._encodings[this._activeEncoding](_);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=_,!0}explainEvents(_){return{down:!!(1&_),up:!!(2&_),drag:!!(4&_),move:!!(8&_),wheel:!!(16&_)}}_equalEvents(_,E,T){if(T){if(_.x!==E.x||_.y!==E.y)return!1}else if(_.col!==E.col||_.row!==E.row)return!1;return _.button===E.button&&_.action===E.action&&_.ctrl===E.ctrl&&_.alt===E.alt&&_.shift===E.shift}};a.CoreMouseService=f=m([b(0,d.IBufferService),b(1,d.ICoreService)],f)},6975:function(y,a,u){var m=this&&this.__decorate||function(f,_,E,T){var S,k=arguments.length,D=k<3?_:T===null?T=Object.getOwnPropertyDescriptor(_,E):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,_,E,T);else for(var L=f.length-1;L>=0;L--)(S=f[L])&&(D=(k<3?S(D):k>3?S(_,E,D):S(_,E))||D);return k>3&&D&&Object.defineProperty(_,E,D),D},b=this&&this.__param||function(f,_){return function(E,T){_(E,T,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const d=u(1439),w=u(8460),x=u(844),j=u(2585),v=Object.freeze({insertMode:!1}),o=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let p=a.CoreService=class extends x.Disposable{constructor(f,_,E){super(),this._bufferService=f,this._logService=_,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new w.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new w.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new w.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new w.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(v),this.decPrivateModes=(0,d.clone)(o)}reset(){this.modes=(0,d.clone)(v),this.decPrivateModes=(0,d.clone)(o)}triggerDataEvent(f,_=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;_&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),_&&this._onUserInput.fire(),this._logService.debug(`sending data "${f}"`,()=>f.split("").map(T=>T.charCodeAt(0))),this._onData.fire(f)}triggerBinaryEvent(f){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${f}"`,()=>f.split("").map(_=>_.charCodeAt(0))),this._onBinary.fire(f))}};a.CoreService=p=m([b(0,j.IBufferService),b(1,j.ILogService),b(2,j.IOptionsService)],p)},9074:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const m=u(8055),b=u(8460),d=u(844),w=u(6106);let x=0,j=0;class v extends d.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new w.SortedList(f=>f==null?void 0:f.marker.line),this._onDecorationRegistered=this.register(new b.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new b.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>this.reset()))}registerDecoration(f){if(f.marker.isDisposed)return;const _=new o(f);if(_){const E=_.marker.onDispose(()=>_.dispose());_.onDispose(()=>{_&&(this._decorations.delete(_)&&this._onDecorationRemoved.fire(_),E.dispose())}),this._decorations.insert(_),this._onDecorationRegistered.fire(_)}return _}reset(){for(const f of this._decorations.values())f.dispose();this._decorations.clear()}*getDecorationsAtCell(f,_,E){let T=0,S=0;for(const k of this._decorations.getKeyIterator(_))T=k.options.x??0,S=T+(k.options.width??1),f>=T&&f<S&&(!E||(k.options.layer??"bottom")===E)&&(yield k)}forEachDecorationAtCell(f,_,E,T){this._decorations.forEachByKey(_,S=>{x=S.options.x??0,j=x+(S.options.width??1),f>=x&&f<j&&(!E||(S.options.layer??"bottom")===E)&&T(S)})}}a.DecorationService=v;class o extends d.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=m.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=m.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(f){super(),this.options=f,this.onRenderEmitter=this.register(new b.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new b.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=f.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const m=u(2585),b=u(8343);class d{constructor(...x){this._entries=new Map;for(const[j,v]of x)this.set(j,v)}set(x,j){const v=this._entries.get(x);return this._entries.set(x,j),v}forEach(x){for(const[j,v]of this._entries.entries())x(j,v)}has(x){return this._entries.has(x)}get(x){return this._entries.get(x)}}a.ServiceCollection=d,a.InstantiationService=class{constructor(){this._services=new d,this._services.set(m.IInstantiationService,this)}setService(w,x){this._services.set(w,x)}getService(w){return this._services.get(w)}createInstance(w,...x){const j=(0,b.getServiceDependencies)(w).sort((p,f)=>p.index-f.index),v=[];for(const p of j){const f=this._services.get(p.id);if(!f)throw new Error(`[createInstance] ${w.name} depends on UNKNOWN service ${p.id}.`);v.push(f)}const o=j.length>0?j[0].index:x.length;if(x.length!==o)throw new Error(`[createInstance] First service dependency of ${w.name} at position ${o+1} conflicts with ${x.length} static arguments`);return new w(...x,...v)}}},7866:function(y,a,u){var m=this&&this.__decorate||function(o,p,f,_){var E,T=arguments.length,S=T<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,f):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(o,p,f,_);else for(var k=o.length-1;k>=0;k--)(E=o[k])&&(S=(T<3?E(S):T>3?E(p,f,S):E(p,f))||S);return T>3&&S&&Object.defineProperty(p,f,S),S},b=this&&this.__param||function(o,p){return function(f,_){p(f,_,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const d=u(844),w=u(2585),x={trace:w.LogLevelEnum.TRACE,debug:w.LogLevelEnum.DEBUG,info:w.LogLevelEnum.INFO,warn:w.LogLevelEnum.WARN,error:w.LogLevelEnum.ERROR,off:w.LogLevelEnum.OFF};let j,v=a.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=w.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),j=this}_updateLogLevel(){this._logLevel=x[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let p=0;p<o.length;p++)typeof o[p]=="function"&&(o[p]=o[p]())}_log(o,p,f){this._evalLazyOptionalParams(f),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+p,...f)}trace(o,...p){var f;this._logLevel<=w.LogLevelEnum.TRACE&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.trace.bind(this._optionsService.options.logger))??console.log,o,p)}debug(o,...p){var f;this._logLevel<=w.LogLevelEnum.DEBUG&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.debug.bind(this._optionsService.options.logger))??console.log,o,p)}info(o,...p){var f;this._logLevel<=w.LogLevelEnum.INFO&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.info.bind(this._optionsService.options.logger))??console.info,o,p)}warn(o,...p){var f;this._logLevel<=w.LogLevelEnum.WARN&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.warn.bind(this._optionsService.options.logger))??console.warn,o,p)}error(o,...p){var f;this._logLevel<=w.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,o,p)}};a.LogService=v=m([b(0,w.IOptionsService)],v),a.setTraceLogger=function(o){j=o},a.traceCall=function(o,p,f){if(typeof f.value!="function")throw new Error("not supported");const _=f.value;f.value=function(...E){if(j.logLevel!==w.LogLevelEnum.TRACE)return _.apply(this,E);j.trace(`GlyphRenderer#${_.name}(${E.map(S=>JSON.stringify(S)).join(", ")})`);const T=_.apply(this,E);return j.trace(`GlyphRenderer#${_.name} return`,T),T}}},7302:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const m=u(8460),b=u(844),d=u(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:d.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const w=["normal","bold","100","200","300","400","500","600","700","800","900"];class x extends b.Disposable{constructor(v){super(),this._onOptionChange=this.register(new m.EventEmitter),this.onOptionChange=this._onOptionChange.event;const o={...a.DEFAULT_OPTIONS};for(const p in v)if(p in o)try{const f=v[p];o[p]=this._sanitizeAndValidateOption(p,f)}catch(f){console.error(f)}this.rawOptions=o,this.options={...o},this._setupOptions(),this.register((0,b.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(v,o){return this.onOptionChange(p=>{p===v&&o(this.rawOptions[v])})}onMultipleOptionChange(v,o){return this.onOptionChange(p=>{v.indexOf(p)!==-1&&o()})}_setupOptions(){const v=p=>{if(!(p in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${p}"`);return this.rawOptions[p]},o=(p,f)=>{if(!(p in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${p}"`);f=this._sanitizeAndValidateOption(p,f),this.rawOptions[p]!==f&&(this.rawOptions[p]=f,this._onOptionChange.fire(p))};for(const p in this.rawOptions){const f={get:v.bind(this,p),set:o.bind(this,p)};Object.defineProperty(this.options,p,f)}}_sanitizeAndValidateOption(v,o){switch(v){case"cursorStyle":if(o||(o=a.DEFAULT_OPTIONS[v]),!function(p){return p==="block"||p==="underline"||p==="bar"}(o))throw new Error(`"${o}" is not a valid value for ${v}`);break;case"wordSeparator":o||(o=a.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof o=="number"&&1<=o&&o<=1e3)break;o=w.includes(o)?o:a.DEFAULT_OPTIONS[v];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(`${v} cannot be less than 1, value: ${o}`);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(`${v} cannot be less than 0, value: ${o}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(`${v} cannot be less than or equal to 0, value: ${o}`);break;case"rows":case"cols":if(!o&&o!==0)throw new Error(`${v} must be numeric, value: ${o}`);break;case"windowsPty":o=o??{}}return o}}a.OptionsService=x},2660:function(y,a,u){var m=this&&this.__decorate||function(x,j,v,o){var p,f=arguments.length,_=f<3?j:o===null?o=Object.getOwnPropertyDescriptor(j,v):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(x,j,v,o);else for(var E=x.length-1;E>=0;E--)(p=x[E])&&(_=(f<3?p(_):f>3?p(j,v,_):p(j,v))||_);return f>3&&_&&Object.defineProperty(j,v,_),_},b=this&&this.__param||function(x,j){return function(v,o){j(v,o,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const d=u(2585);let w=a.OscLinkService=class{constructor(x){this._bufferService=x,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(x){const j=this._bufferService.buffer;if(x.id===void 0){const E=j.addMarker(j.ybase+j.y),T={data:x,id:this._nextId++,lines:[E]};return E.onDispose(()=>this._removeMarkerFromLink(T,E)),this._dataByLinkId.set(T.id,T),T.id}const v=x,o=this._getEntryIdKey(v),p=this._entriesWithId.get(o);if(p)return this.addLineToLink(p.id,j.ybase+j.y),p.id;const f=j.addMarker(j.ybase+j.y),_={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(_,f)),this._entriesWithId.set(_.key,_),this._dataByLinkId.set(_.id,_),_.id}addLineToLink(x,j){const v=this._dataByLinkId.get(x);if(v&&v.lines.every(o=>o.line!==j)){const o=this._bufferService.buffer.addMarker(j);v.lines.push(o),o.onDispose(()=>this._removeMarkerFromLink(v,o))}}getLinkData(x){var j;return(j=this._dataByLinkId.get(x))==null?void 0:j.data}_getEntryIdKey(x){return`${x.id};;${x.uri}`}_removeMarkerFromLink(x,j){const v=x.lines.indexOf(j);v!==-1&&(x.lines.splice(v,1),x.lines.length===0&&(x.data.id!==void 0&&this._entriesWithId.delete(x.key),this._dataByLinkId.delete(x.id)))}};a.OscLinkService=w=m([b(0,d.IBufferService)],w)},8343:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",m="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(b){return b[m]||[]},a.createDecorator=function(b){if(a.serviceRegistry.has(b))return a.serviceRegistry.get(b);const d=function(w,x,j){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,o,p){o[u]===o?o[m].push({id:v,index:p}):(o[m]=[{id:v,index:p}],o[u]=o)})(d,w,j)};return d.toString=()=>b,a.serviceRegistry.set(b,d),d}},2585:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const m=u(8343);var b;a.IBufferService=(0,m.createDecorator)("BufferService"),a.ICoreMouseService=(0,m.createDecorator)("CoreMouseService"),a.ICoreService=(0,m.createDecorator)("CoreService"),a.ICharsetService=(0,m.createDecorator)("CharsetService"),a.IInstantiationService=(0,m.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(b||(a.LogLevelEnum=b={})),a.ILogService=(0,m.createDecorator)("LogService"),a.IOptionsService=(0,m.createDecorator)("OptionsService"),a.IOscLinkService=(0,m.createDecorator)("OscLinkService"),a.IUnicodeService=(0,m.createDecorator)("UnicodeService"),a.IDecorationService=(0,m.createDecorator)("DecorationService")},1480:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const m=u(8460),b=u(225);class d{static extractShouldJoin(x){return(1&x)!=0}static extractWidth(x){return x>>1&3}static extractCharKind(x){return x>>3}static createPropertyValue(x,j,v=!1){return(16777215&x)<<3|(3&j)<<1|(v?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new m.EventEmitter,this.onChange=this._onChange.event;const x=new b.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 j=0,v=0;const o=x.length;for(let p=0;p<o;++p){let f=x.charCodeAt(p);if(55296<=f&&f<=56319){if(++p>=o)return j+this.wcwidth(f);const T=x.charCodeAt(p);56320<=T&&T<=57343?f=1024*(f-55296)+T-56320+65536:j+=this.wcwidth(T)}const _=this.charProperties(f,v);let E=d.extractWidth(_);d.extractShouldJoin(_)&&(E-=d.extractWidth(v)),j+=E,v=_}return j}charProperties(x,j){return this._activeProvider.charProperties(x,j)}}a.UnicodeService=d}},g={};function N(y){var a=g[y];if(a!==void 0)return a.exports;var u=g[y]={exports:{}};return l[y].call(u.exports,u,u.exports,N),u.exports}var R={};return(()=>{var y=R;Object.defineProperty(y,"__esModule",{value:!0}),y.Terminal=void 0;const a=N(9042),u=N(3236),m=N(844),b=N(5741),d=N(8285),w=N(7975),x=N(7090),j=["cols","rows"];class v extends m.Disposable{constructor(p){super(),this._core=this.register(new u.Terminal(p)),this._addonManager=this.register(new b.AddonManager),this._publicOptions={...this._core.options};const f=E=>this._core.options[E],_=(E,T)=>{this._checkReadonlyOptions(E),this._core.options[E]=T};for(const E in this._core.options){const T={get:f.bind(this,E),set:_.bind(this,E)};Object.defineProperty(this._publicOptions,E,T)}}_checkReadonlyOptions(p){if(j.includes(p))throw new Error(`Option "${p}" 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 w.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 d.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const p=this._core.coreService.decPrivateModes;let f="none";switch(this._core.coreMouseService.activeProtocol){case"X10":f="x10";break;case"VT200":f="vt200";break;case"DRAG":f="drag";break;case"ANY":f="any"}return{applicationCursorKeysMode:p.applicationCursorKeys,applicationKeypadMode:p.applicationKeypad,bracketedPasteMode:p.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:f,originMode:p.origin,reverseWraparoundMode:p.reverseWraparound,sendFocusMode:p.sendFocus,wraparoundMode:p.wraparound}}get options(){return this._publicOptions}set options(p){for(const f in p)this._publicOptions[f]=p[f]}blur(){this._core.blur()}focus(){this._core.focus()}input(p,f=!0){this._core.input(p,f)}resize(p,f){this._verifyIntegers(p,f),this._core.resize(p,f)}open(p){this._core.open(p)}attachCustomKeyEventHandler(p){this._core.attachCustomKeyEventHandler(p)}attachCustomWheelEventHandler(p){this._core.attachCustomWheelEventHandler(p)}registerLinkProvider(p){return this._core.registerLinkProvider(p)}registerCharacterJoiner(p){return this._checkProposedApi(),this._core.registerCharacterJoiner(p)}deregisterCharacterJoiner(p){this._checkProposedApi(),this._core.deregisterCharacterJoiner(p)}registerMarker(p=0){return this._verifyIntegers(p),this._core.registerMarker(p)}registerDecoration(p){return this._checkProposedApi(),this._verifyPositiveIntegers(p.x??0,p.width??0,p.height??0),this._core.registerDecoration(p)}hasSelection(){return this._core.hasSelection()}select(p,f,_){this._verifyIntegers(p,f,_),this._core.select(p,f,_)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(p,f){this._verifyIntegers(p,f),this._core.selectLines(p,f)}dispose(){super.dispose()}scrollLines(p){this._verifyIntegers(p),this._core.scrollLines(p)}scrollPages(p){this._verifyIntegers(p),this._core.scrollPages(p)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(p){this._verifyIntegers(p),this._core.scrollToLine(p)}clear(){this._core.clear()}write(p,f){this._core.write(p,f)}writeln(p,f){this._core.write(p),this._core.write(`\r
222
+ `,f)}paste(p){this._core.paste(p)}refresh(p,f){this._verifyIntegers(p,f),this._core.refresh(p,f)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(p){this._addonManager.loadAddon(this,p)}static get strings(){return a}_verifyIntegers(...p){for(const f of p)if(f===1/0||isNaN(f)||f%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...p){for(const f of p)if(f&&(f===1/0||isNaN(f)||f%1!=0||f<0))throw new Error("This API only accepts positive integers")}}y.Terminal=v})(),R})())})(aE);var lE=aE.exports,cE={exports:{}};(function(i,r){(function(l,g){i.exports=g()})(SM,()=>(()=>{var l={930:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const m=u(485);a.ColorContrastCache=class{constructor(){this._color=new m.TwoKeyMap,this._css=new m.TwoKeyMap}setCss(b,d,w){this._css.set(b,d,w)}getCss(b,d){return this._css.get(b,d)}setColor(b,d,w){this._color.set(b,d,w)}getColor(b,d){return this._color.get(b,d)}clear(){this._color.clear(),this._css.clear()}}},997:function(y,a,u){var m=this&&this.__decorate||function(k,D,L,U){var F,P=arguments.length,I=P<3?D:U===null?U=Object.getOwnPropertyDescriptor(D,L):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(k,D,L,U);else for(var G=k.length-1;G>=0;G--)(F=k[G])&&(I=(P<3?F(I):P>3?F(D,L,I):F(D,L))||I);return P>3&&I&&Object.defineProperty(D,L,I),I},b=this&&this.__param||function(k,D){return function(L,U){D(L,U,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const d=u(930),w=u(160),x=u(345),j=u(859),v=u(97),o=w.css.toColor("#ffffff"),p=w.css.toColor("#000000"),f=w.css.toColor("#ffffff"),_=w.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const k=[w.css.toColor("#2e3436"),w.css.toColor("#cc0000"),w.css.toColor("#4e9a06"),w.css.toColor("#c4a000"),w.css.toColor("#3465a4"),w.css.toColor("#75507b"),w.css.toColor("#06989a"),w.css.toColor("#d3d7cf"),w.css.toColor("#555753"),w.css.toColor("#ef2929"),w.css.toColor("#8ae234"),w.css.toColor("#fce94f"),w.css.toColor("#729fcf"),w.css.toColor("#ad7fa8"),w.css.toColor("#34e2e2"),w.css.toColor("#eeeeec")],D=[0,95,135,175,215,255];for(let L=0;L<216;L++){const U=D[L/36%6|0],F=D[L/6%6|0],P=D[L%6];k.push({css:w.channels.toCss(U,F,P),rgba:w.channels.toRgba(U,F,P)})}for(let L=0;L<24;L++){const U=8+10*L;k.push({css:w.channels.toCss(U,U,U),rgba:w.channels.toRgba(U,U,U)})}return k})());let T=a.ThemeService=class extends j.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new x.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:o,background:p,cursor:f,cursorAccent:_,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:w.color.blend(p,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:w.color.blend(p,E),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(k={}){const D=this._colors;if(D.foreground=S(k.foreground,o),D.background=S(k.background,p),D.cursor=S(k.cursor,f),D.cursorAccent=S(k.cursorAccent,_),D.selectionBackgroundTransparent=S(k.selectionBackground,E),D.selectionBackgroundOpaque=w.color.blend(D.background,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundTransparent=S(k.selectionInactiveBackground,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundOpaque=w.color.blend(D.background,D.selectionInactiveBackgroundTransparent),D.selectionForeground=k.selectionForeground?S(k.selectionForeground,w.NULL_COLOR):void 0,D.selectionForeground===w.NULL_COLOR&&(D.selectionForeground=void 0),w.color.isOpaque(D.selectionBackgroundTransparent)&&(D.selectionBackgroundTransparent=w.color.opacity(D.selectionBackgroundTransparent,.3)),w.color.isOpaque(D.selectionInactiveBackgroundTransparent)&&(D.selectionInactiveBackgroundTransparent=w.color.opacity(D.selectionInactiveBackgroundTransparent,.3)),D.ansi=a.DEFAULT_ANSI_COLORS.slice(),D.ansi[0]=S(k.black,a.DEFAULT_ANSI_COLORS[0]),D.ansi[1]=S(k.red,a.DEFAULT_ANSI_COLORS[1]),D.ansi[2]=S(k.green,a.DEFAULT_ANSI_COLORS[2]),D.ansi[3]=S(k.yellow,a.DEFAULT_ANSI_COLORS[3]),D.ansi[4]=S(k.blue,a.DEFAULT_ANSI_COLORS[4]),D.ansi[5]=S(k.magenta,a.DEFAULT_ANSI_COLORS[5]),D.ansi[6]=S(k.cyan,a.DEFAULT_ANSI_COLORS[6]),D.ansi[7]=S(k.white,a.DEFAULT_ANSI_COLORS[7]),D.ansi[8]=S(k.brightBlack,a.DEFAULT_ANSI_COLORS[8]),D.ansi[9]=S(k.brightRed,a.DEFAULT_ANSI_COLORS[9]),D.ansi[10]=S(k.brightGreen,a.DEFAULT_ANSI_COLORS[10]),D.ansi[11]=S(k.brightYellow,a.DEFAULT_ANSI_COLORS[11]),D.ansi[12]=S(k.brightBlue,a.DEFAULT_ANSI_COLORS[12]),D.ansi[13]=S(k.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),D.ansi[14]=S(k.brightCyan,a.DEFAULT_ANSI_COLORS[14]),D.ansi[15]=S(k.brightWhite,a.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const L=Math.min(D.ansi.length-16,k.extendedAnsi.length);for(let U=0;U<L;U++)D.ansi[U+16]=S(k.extendedAnsi[U],a.DEFAULT_ANSI_COLORS[U+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(k){this._restoreColor(k),this._onChangeColors.fire(this.colors)}_restoreColor(k){if(k!==void 0)switch(k){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[k]=this._restoreColors.ansi[k]}else for(let D=0;D<this._restoreColors.ansi.length;++D)this._colors.ansi[D]=this._restoreColors.ansi[D]}modifyColors(k){k(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 S(k,D){if(k!==void 0)try{return w.css.toColor(k)}catch{}return D}a.ThemeService=T=m([b(0,v.IOptionsService)],T)},160:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,m=0,b=0,d=0;var w,x,j,v,o;function p(_){const E=_.toString(16);return E.length<2?"0"+E:E}function f(_,E){return _<E?(E+.05)/(_+.05):(_+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(_){_.toCss=function(E,T,S,k){return k!==void 0?`#${p(E)}${p(T)}${p(S)}${p(k)}`:`#${p(E)}${p(T)}${p(S)}`},_.toRgba=function(E,T,S,k=255){return(E<<24|T<<16|S<<8|k)>>>0},_.toColor=function(E,T,S,k){return{css:_.toCss(E,T,S,k),rgba:_.toRgba(E,T,S,k)}}}(w||(a.channels=w={})),function(_){function E(T,S){return d=Math.round(255*S),[u,m,b]=o.toChannels(T.rgba),{css:w.toCss(u,m,b,d),rgba:w.toRgba(u,m,b,d)}}_.blend=function(T,S){if(d=(255&S.rgba)/255,d===1)return{css:S.css,rgba:S.rgba};const k=S.rgba>>24&255,D=S.rgba>>16&255,L=S.rgba>>8&255,U=T.rgba>>24&255,F=T.rgba>>16&255,P=T.rgba>>8&255;return u=U+Math.round((k-U)*d),m=F+Math.round((D-F)*d),b=P+Math.round((L-P)*d),{css:w.toCss(u,m,b),rgba:w.toRgba(u,m,b)}},_.isOpaque=function(T){return(255&T.rgba)==255},_.ensureContrastRatio=function(T,S,k){const D=o.ensureContrastRatio(T.rgba,S.rgba,k);if(D)return w.toColor(D>>24&255,D>>16&255,D>>8&255)},_.opaque=function(T){const S=(255|T.rgba)>>>0;return[u,m,b]=o.toChannels(S),{css:w.toCss(u,m,b),rgba:S}},_.opacity=E,_.multiplyOpacity=function(T,S){return d=255&T.rgba,E(T,d*S/255)},_.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(x||(a.color=x={})),function(_){let E,T;try{const S=document.createElement("canvas");S.width=1,S.height=1;const k=S.getContext("2d",{willReadFrequently:!0});k&&(E=k,E.globalCompositeOperation="copy",T=E.createLinearGradient(0,0,1,1))}catch{}_.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),m=parseInt(S.slice(2,3).repeat(2),16),b=parseInt(S.slice(3,4).repeat(2),16),w.toColor(u,m,b);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),m=parseInt(S.slice(2,3).repeat(2),16),b=parseInt(S.slice(3,4).repeat(2),16),d=parseInt(S.slice(4,5).repeat(2),16),w.toColor(u,m,b,d);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const k=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return u=parseInt(k[1]),m=parseInt(k[2]),b=parseInt(k[3]),d=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),w.toColor(u,m,b,d);if(!E||!T)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=T,E.fillStyle=S,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,m,b,d]=E.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:w.toRgba(u,m,b,d),css:S}}}(j||(a.css=j={})),function(_){function E(T,S,k){const D=T/255,L=S/255,U=k/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(U<=.03928?U/12.92:Math.pow((U+.055)/1.055,2.4))}_.relativeLuminance=function(T){return E(T>>16&255,T>>8&255,255&T)},_.relativeLuminance2=E}(v||(a.rgb=v={})),function(_){function E(S,k,D){const L=S>>24&255,U=S>>16&255,F=S>>8&255;let P=k>>24&255,I=k>>16&255,G=k>>8&255,ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));for(;ie<D&&(P>0||I>0||G>0);)P-=Math.max(0,Math.ceil(.1*P)),I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));return(P<<24|I<<16|G<<8|255)>>>0}function T(S,k,D){const L=S>>24&255,U=S>>16&255,F=S>>8&255;let P=k>>24&255,I=k>>16&255,G=k>>8&255,ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));for(;ie<D&&(P<255||I<255||G<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),I=Math.min(255,I+Math.ceil(.1*(255-I))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));return(P<<24|I<<16|G<<8|255)>>>0}_.blend=function(S,k){if(d=(255&k)/255,d===1)return k;const D=k>>24&255,L=k>>16&255,U=k>>8&255,F=S>>24&255,P=S>>16&255,I=S>>8&255;return u=F+Math.round((D-F)*d),m=P+Math.round((L-P)*d),b=I+Math.round((U-I)*d),w.toRgba(u,m,b)},_.ensureContrastRatio=function(S,k,D){const L=v.relativeLuminance(S>>8),U=v.relativeLuminance(k>>8);if(f(L,U)<D){if(U<L){const I=E(S,k,D),G=f(L,v.relativeLuminance(I>>8));if(G<D){const ie=T(S,k,D);return G>f(L,v.relativeLuminance(ie>>8))?I:ie}return I}const F=T(S,k,D),P=f(L,v.relativeLuminance(F>>8));if(P<D){const I=E(S,k,D);return P>f(L,v.relativeLuminance(I>>8))?F:I}return F}},_.reduceLuminance=E,_.increaseLuminance=T,_.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}}(o||(a.rgba=o={})),a.toPaddedHex=p,a.contrastRatio=f},345:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let m=0;m<this._listeners.length;m++)if(this._listeners[m]===u)return void this._listeners.splice(m,1)}}})),this._event}fire(u,m){const b=[];for(let d=0;d<this._listeners.length;d++)b.push(this._listeners[d]);for(let d=0;d<b.length;d++)b[d].call(void 0,u,m)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,m){return u(b=>m.fire(b))},a.runAndSubscribe=function(u,m){return m(void 0),u(b=>m(b))}},859:(y,a)=>{function u(m){for(const b of m)b.dispose();m.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const m of this._disposables)m.dispose();this._disposables.length=0}register(m){return this._disposables.push(m),m}unregister(m){const b=this._disposables.indexOf(m);b!==-1&&this._disposables.splice(b,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(m){var b;this._isDisposed||m===this._value||((b=this._value)==null||b.dispose(),this._value=m)}clear(){this.value=void 0}dispose(){var m;this._isDisposed=!0,(m=this._value)==null||m.dispose(),this._value=void 0}},a.toDisposable=function(m){return{dispose:m}},a.disposeArray=u,a.getDisposeArrayDisposable=function(m){return{dispose:()=>u(m)}}},485:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(b,d,w){this._data[b]||(this._data[b]={}),this._data[b][d]=w}get(b,d){return this._data[b]?this._data[b][d]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(m,b,d,w,x){this._data.get(m,b)||this._data.set(m,b,new u),this._data.get(m,b).set(d,w,x)}get(m,b,d,w){var x;return(x=this._data.get(m,b))==null?void 0:x.get(d,w)}clear(){this._data.clear()}}},726:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",m="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(b){return b[m]||[]},a.createDecorator=function(b){if(a.serviceRegistry.has(b))return a.serviceRegistry.get(b);const d=function(w,x,j){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,o,p){o[u]===o?o[m].push({id:v,index:p}):(o[m]=[{id:v,index:p}],o[u]=o)})(d,w,j)};return d.toString=()=>b,a.serviceRegistry.set(b,d),d}},97:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const m=u(726);var b;a.IBufferService=(0,m.createDecorator)("BufferService"),a.ICoreMouseService=(0,m.createDecorator)("CoreMouseService"),a.ICoreService=(0,m.createDecorator)("CoreService"),a.ICharsetService=(0,m.createDecorator)("CharsetService"),a.IInstantiationService=(0,m.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(b||(a.LogLevelEnum=b={})),a.ILogService=(0,m.createDecorator)("LogService"),a.IOptionsService=(0,m.createDecorator)("OptionsService"),a.IOscLinkService=(0,m.createDecorator)("OscLinkService"),a.IUnicodeService=(0,m.createDecorator)("UnicodeService"),a.IDecorationService=(0,m.createDecorator)("DecorationService")}},g={};function N(y){var a=g[y];if(a!==void 0)return a.exports;var u=g[y]={exports:{}};return l[y].call(u.exports,u,u.exports,N),u.exports}var R={};return(()=>{var y=R;Object.defineProperty(y,"__esModule",{value:!0}),y.HTMLSerializeHandler=y.SerializeAddon=void 0;const a=N(997);function u(v,o,p){return Math.max(o,Math.min(v,p))}class m{constructor(o){this._buffer=o}serialize(o,p){const f=this._buffer.getNullCell(),_=this._buffer.getNullCell();let E=f;const T=o.start.y,S=o.end.y,k=o.start.x,D=o.end.x;this._beforeSerialize(S-T,T,S);for(let L=T;L<=S;L++){const U=this._buffer.getLine(L);if(U){const F=L===o.start.y?k:0,P=L===o.end.y?D:U.length;for(let I=F;I<P;I++){const G=U.getCell(I,E===f?_:f);G?(this._nextCell(G,E,L,I),E=G):console.warn(`Can't get cell at row=${L}, col=${I}`)}}this._rowEnd(L,L===S)}return this._afterSerialize(),this._serializeString(p)}_nextCell(o,p,f,_){}_rowEnd(o,p){}_beforeSerialize(o,p,f){}_afterSerialize(){}_serializeString(o){return""}}function b(v,o){return v.getFgColorMode()===o.getFgColorMode()&&v.getFgColor()===o.getFgColor()}function d(v,o){return v.getBgColorMode()===o.getBgColorMode()&&v.getBgColor()===o.getBgColor()}function w(v,o){return v.isInverse()===o.isInverse()&&v.isBold()===o.isBold()&&v.isUnderline()===o.isUnderline()&&v.isOverline()===o.isOverline()&&v.isBlink()===o.isBlink()&&v.isInvisible()===o.isInvisible()&&v.isItalic()===o.isItalic()&&v.isDim()===o.isDim()&&v.isStrikethrough()===o.isStrikethrough()}class x extends m{constructor(o,p){super(o),this._terminal=p,this._rowIndex=0,this._allRows=new Array,this._allRowSeparators=new Array,this._currentRow="",this._nullCellCount=0,this._cursorStyle=this._buffer.getNullCell(),this._cursorStyleRow=0,this._cursorStyleCol=0,this._backgroundCell=this._buffer.getNullCell(),this._firstRow=0,this._lastCursorRow=0,this._lastCursorCol=0,this._lastContentCursorRow=0,this._lastContentCursorCol=0,this._thisRowLastChar=this._buffer.getNullCell(),this._thisRowLastSecondChar=this._buffer.getNullCell(),this._nextRowFirstChar=this._buffer.getNullCell()}_beforeSerialize(o,p,f){this._allRows=new Array(o),this._lastContentCursorRow=p,this._lastCursorRow=p,this._firstRow=p}_rowEnd(o,p){var _;this._nullCellCount>0&&!d(this._cursorStyle,this._backgroundCell)&&(this._currentRow+=`\x1B[${this._nullCellCount}X`);let f="";if(!p){o-this._firstRow>=this._terminal.rows&&((_=this._buffer.getLine(this._cursorStyleRow))==null||_.getCell(this._cursorStyleCol,this._backgroundCell));const E=this._buffer.getLine(o),T=this._buffer.getLine(o+1);if(T.isWrapped){f="";const S=E.getCell(E.length-1,this._thisRowLastChar),k=E.getCell(E.length-2,this._thisRowLastSecondChar),D=T.getCell(0,this._nextRowFirstChar),L=D.getWidth()>1;let U=!1;(D.getChars()&&L?this._nullCellCount<=1:this._nullCellCount<=0)&&((S.getChars()||S.getWidth()===0)&&d(S,D)&&(U=!0),L&&(k.getChars()||k.getWidth()===0)&&d(S,D)&&d(k,D)&&(U=!0)),U||(f="-".repeat(this._nullCellCount+1),f+="\x1B[1D\x1B[1X",this._nullCellCount>0&&(f+="\x1B[A",f+=`\x1B[${E.length-this._nullCellCount}C`,f+=`\x1B[${this._nullCellCount}X`,f+=`\x1B[${E.length-this._nullCellCount}D`,f+="\x1B[B"),this._lastContentCursorRow=o+1,this._lastContentCursorCol=0,this._lastCursorRow=o+1,this._lastCursorCol=0)}else f=`\r
223
+ `,this._lastCursorRow=o+1,this._lastCursorCol=0}this._allRows[this._rowIndex]=this._currentRow,this._allRowSeparators[this._rowIndex++]=f,this._currentRow="",this._nullCellCount=0}_diffStyle(o,p){const f=[],_=!b(o,p),E=!d(o,p),T=!w(o,p);if(_||E||T)if(o.isAttributeDefault())p.isAttributeDefault()||f.push(0);else{if(_){const S=o.getFgColor();o.isFgRGB()?f.push(38,2,S>>>16&255,S>>>8&255,255&S):o.isFgPalette()?S>=16?f.push(38,5,S):f.push(8&S?90+(7&S):30+(7&S)):f.push(39)}if(E){const S=o.getBgColor();o.isBgRGB()?f.push(48,2,S>>>16&255,S>>>8&255,255&S):o.isBgPalette()?S>=16?f.push(48,5,S):f.push(8&S?100+(7&S):40+(7&S)):f.push(49)}T&&(o.isInverse()!==p.isInverse()&&f.push(o.isInverse()?7:27),o.isBold()!==p.isBold()&&f.push(o.isBold()?1:22),o.isUnderline()!==p.isUnderline()&&f.push(o.isUnderline()?4:24),o.isOverline()!==p.isOverline()&&f.push(o.isOverline()?53:55),o.isBlink()!==p.isBlink()&&f.push(o.isBlink()?5:25),o.isInvisible()!==p.isInvisible()&&f.push(o.isInvisible()?8:28),o.isItalic()!==p.isItalic()&&f.push(o.isItalic()?3:23),o.isDim()!==p.isDim()&&f.push(o.isDim()?2:22),o.isStrikethrough()!==p.isStrikethrough()&&f.push(o.isStrikethrough()?9:29))}return f}_nextCell(o,p,f,_){if(o.getWidth()===0)return;const E=o.getChars()==="",T=this._diffStyle(o,this._cursorStyle);if(E?!d(this._cursorStyle,o):T.length>0){this._nullCellCount>0&&(d(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._lastContentCursorRow=this._lastCursorRow=f,this._lastContentCursorCol=this._lastCursorCol=_,this._currentRow+=`\x1B[${T.join(";")}m`;const S=this._buffer.getLine(f);S!==void 0&&(S.getCell(_,this._cursorStyle),this._cursorStyleRow=f,this._cursorStyleCol=_)}E?this._nullCellCount+=o.getWidth():(this._nullCellCount>0&&(d(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._currentRow+=o.getChars(),this._lastContentCursorRow=this._lastCursorRow=f,this._lastContentCursorCol=this._lastCursorCol=_+o.getWidth())}_serializeString(o){let p=this._allRows.length;this._buffer.length-this._firstRow<=this._terminal.rows&&(p=this._lastContentCursorRow+1-this._firstRow,this._lastCursorCol=this._lastContentCursorCol,this._lastCursorRow=this._lastContentCursorRow);let f="";for(let S=0;S<p;S++)f+=this._allRows[S],S+1<p&&(f+=this._allRowSeparators[S]);if(!o){const S=this._buffer.baseY+this._buffer.cursorY,k=this._buffer.cursorX,D=L=>{L>0?f+=`\x1B[${L}C`:L<0&&(f+=`\x1B[${-L}D`)};(S!==this._lastCursorRow||k!==this._lastCursorCol)&&((_=S-this._lastCursorRow)>0?f+=`\x1B[${_}B`:_<0&&(f+=`\x1B[${-_}A`),D(k-this._lastCursorCol))}var _;const E=this._terminal._core._inputHandler._curAttrData,T=this._diffStyle(E,this._cursorStyle);return T.length>0&&(f+=`\x1B[${T.join(";")}m`),f}}y.SerializeAddon=class{activate(v){this._terminal=v}_serializeBufferByScrollback(v,o,p){const f=o.length,_=p===void 0?f:u(p+v.rows,0,f);return this._serializeBufferByRange(v,o,{start:f-_,end:f-1},!1)}_serializeBufferByRange(v,o,p,f){return new x(o,v).serialize({start:{x:0,y:typeof p.start=="number"?p.start:p.start.line},end:{x:v.cols,y:typeof p.end=="number"?p.end:p.end.line}},f)}_serializeBufferAsHTML(v,o){var E;const p=v.buffer.active,f=new j(p,v,o);if(!o.onlySelection){const T=p.length,S=o.scrollback,k=S===void 0?T:u(S+v.rows,0,T);return f.serialize({start:{x:0,y:T-k},end:{x:v.cols,y:T-1}})}const _=(E=this._terminal)==null?void 0:E.getSelectionPosition();return _!==void 0?f.serialize({start:{x:_.start.x,y:_.start.y},end:{x:_.end.x,y:_.end.y}}):""}_serializeModes(v){let o="";const p=v.modes;if(p.applicationCursorKeysMode&&(o+="\x1B[?1h"),p.applicationKeypadMode&&(o+="\x1B[?66h"),p.bracketedPasteMode&&(o+="\x1B[?2004h"),p.insertMode&&(o+="\x1B[4h"),p.originMode&&(o+="\x1B[?6h"),p.reverseWraparoundMode&&(o+="\x1B[?45h"),p.sendFocusMode&&(o+="\x1B[?1004h"),p.wraparoundMode===!1&&(o+="\x1B[?7l"),p.mouseTrackingMode!=="none")switch(p.mouseTrackingMode){case"x10":o+="\x1B[?9h";break;case"vt200":o+="\x1B[?1000h";break;case"drag":o+="\x1B[?1002h";break;case"any":o+="\x1B[?1003h"}return o}serialize(v){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");let o=v!=null&&v.range?this._serializeBufferByRange(this._terminal,this._terminal.buffer.normal,v.range,!0):this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.normal,v==null?void 0:v.scrollback);return v!=null&&v.excludeAltBuffer||this._terminal.buffer.active.type!=="alternate"||(o+=`\x1B[?1049h\x1B[H${this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.alternate,void 0)}`),v!=null&&v.excludeModes||(o+=this._serializeModes(this._terminal)),o}serializeAsHTML(v){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");return this._serializeBufferAsHTML(this._terminal,v||{})}dispose(){}};class j extends m{constructor(o,p,f){super(o),this._terminal=p,this._options=f,this._currentRow="",this._htmlContent="",p._core._themeService?this._ansiColors=p._core._themeService.colors.ansi:this._ansiColors=a.DEFAULT_ANSI_COLORS}_padStart(o,p,f){return p>>=0,f=f??" ",o.length>p?o:((p-=o.length)>f.length&&(f+=f.repeat(p/f.length)),f.slice(0,p)+o)}_beforeSerialize(o,p,f){var S,k;this._htmlContent+="<html><body><!--StartFragment--><pre>";let _="#000000",E="#ffffff";this._options.includeGlobalBackground&&(_=((S=this._terminal.options.theme)==null?void 0:S.foreground)??"#ffffff",E=((k=this._terminal.options.theme)==null?void 0:k.background)??"#000000");const T=[];T.push("color: "+_+";"),T.push("background-color: "+E+";"),T.push("font-family: "+this._terminal.options.fontFamily+";"),T.push("font-size: "+this._terminal.options.fontSize+"px;"),this._htmlContent+="<div style='"+T.join(" ")+"'>"}_afterSerialize(){this._htmlContent+="</div>",this._htmlContent+="</pre><!--EndFragment--></body></html>"}_rowEnd(o,p){this._htmlContent+="<div><span>"+this._currentRow+"</span></div>",this._currentRow=""}_getHexColor(o,p){const f=p?o.getFgColor():o.getBgColor();return(p?o.isFgRGB():o.isBgRGB())?"#"+[f>>16&255,f>>8&255,255&f].map(_=>this._padStart(_.toString(16),2,"0")).join(""):(p?o.isFgPalette():o.isBgPalette())?this._ansiColors[f].css:void 0}_diffStyle(o,p){const f=[],_=!b(o,p),E=!d(o,p),T=!w(o,p);if(_||E||T){const S=this._getHexColor(o,!0);S&&f.push("color: "+S+";");const k=this._getHexColor(o,!1);return k&&f.push("background-color: "+k+";"),o.isInverse()&&f.push("color: #000000; background-color: #BFBFBF;"),o.isBold()&&f.push("font-weight: bold;"),o.isUnderline()&&o.isOverline()?f.push("text-decoration: overline underline;"):o.isUnderline()?f.push("text-decoration: underline;"):o.isOverline()&&f.push("text-decoration: overline;"),o.isBlink()&&f.push("text-decoration: blink;"),o.isInvisible()&&f.push("visibility: hidden;"),o.isItalic()&&f.push("font-style: italic;"),o.isDim()&&f.push("opacity: 0.5;"),o.isStrikethrough()&&f.push("text-decoration: line-through;"),f}}_nextCell(o,p,f,_){if(o.getWidth()===0)return;const E=o.getChars()==="",T=this._diffStyle(o,p);T&&(this._currentRow+=T.length===0?"</span><span>":"</span><span style='"+T.join(" ")+"'>"),this._currentRow+=E?" ":o.getChars()}_serializeString(){return this._htmlContent}}y.HTMLSerializeHandler=j})(),R})())})(cE);var hO=cE.exports;const mO=100,nb=(i,r)=>new Promise(l=>i.write(r,l));function fO(i,r){let l=r.tail;for(const N of i)l+=N<128?String.fromCharCode(N):" ";let g=r.visible;for(const N of l.matchAll(/\x1b\[\?25([hl])/g))g=N[1]==="h";return{visible:g,tail:l.slice(-8)}}function pO(i,r){let l=r.tail;for(const N of i)l+=N<128?String.fromCharCode(N):" ";let g=r.active;for(const N of l.matchAll(/\x1b\[\?(9|1000|1002|1003)([hl])/g))g=N[2]==="h";return{active:g,tail:l.slice(-12)}}function vO({scrollback:i,renderScrollback:r=mO,TerminalCtor:l=lE.Terminal,SerializeAddonCtor:g=hO.SerializeAddon}={}){let N=null,R=null,y=!1,a=!1,u=!1,m=0,b=0,d={visible:!1,tail:""},w={active:!1,tail:""};const x=()=>{if(y)throw new Error("terminal stream mirror disposed")};return{async seed(j){x();const v=new l({allowProposedApi:!0,scrollback:i,convertEol:!1}),o=new g;v.loadAddon(o),(v.cols!==j.width||v.rows!==j.height)&&v.resize(j.width,j.height);const p=H2(j.ansi,j.height),f=j.alt?"\x1B[?1049h":"\x1B[?1049l";try{await nb(v,`${f}\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H${p}`),x()}catch(E){throw v.dispose(),E}const _=N;N=v,R=o,_==null||_.dispose(),u=!1,d={visible:!1,tail:""},w={active:!!j.mouseAware,tail:""},m=p?p.split(`\r
224
+ `).length:0,a=!0,b+=1},async data(j){x(),d=fO(j,d),w=pO(j,w),await nb(N,j),x(),b+=1},async ready(j){x(),d.visible=!!(j!=null&&j.vis),await nb(N,QC(j,N.rows,m)),x(),u=!0,b+=1},snapshot(){var f;if(x(),!a||!u)return null;const j=N.buffer.active,v=j.type==="alternate"?j.length:Math.min(j.length,N.rows+r),o=j.type==="alternate"?0:j.length-v,p=(f=N.modes)==null?void 0:f.mouseTrackingMode;return{revision:b,ansi:R.serialize({excludeModes:!0,scrollback:r}),cursorVisible:d.visible,alt:j.type==="alternate",mouseAware:w.active||!!p&&p!=="none",boundaryLine:j.type==="alternate"?null:Math.max(0,N.buffer.normal.baseY-o),bufferRows:v,paneRows:N.rows,paneCols:N.cols}},get revision(){return b},dispose(){y||(y=!0,N==null||N.dispose())}}}function gO(i,r,l=24){return Math.abs(r)<=Math.abs(i)?null:r<=-l?"show":r>=l?"hide":null}function _O(i,r){if(!i)return!1;const l=i.scrollHeight-i.clientHeight;return l<=1?!1:r<0?i.scrollTop<l-1:r>0?i.scrollTop>1:!1}function bO(i,r=44,l=.5){return i*r*l/(r+l*Math.abs(i))}function uE(i){if(!i)return!1;const r=i.tagName;return!(r!=="INPUT"&&r!=="TEXTAREA"||i.closest&&i.closest(".xterm"))}function dE({hint:i}){return c.jsxDEV("div",{className:"lens-boot","aria-live":"polite",children:[c.jsxDEV("div",{className:"lens-boot-dots","aria-hidden":"true",children:[c.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:7,columnNumber:9},this),c.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:8,columnNumber:9},this),c.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:9,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:6,columnNumber:7},this),i&&c.jsxDEV("div",{className:"lens-boot-hint",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:11,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:5,columnNumber:5},this)}const yO=200;function wO({ready:i,connectionInfo:r,configuredTransport:l,transportFallback:g,transportOpen:N,transportNow:R,onTransportToggle:y,connected:a,inputFailure:u,dbgVisible:m,dbg:b,scrollInfo:d,selInfo:w,onResume:x,altScreen:j,onPageScroll:v,onFitScreen:o,locateOn:p,onToggleLocate:f,selUI:_,onCopy:E,selActionsRef:T,termRef:S}){const k=r!=null&&r.recoveryAt?Math.max(0,Math.ceil((r.recoveryAt-R)/1e3)):null,D=l==="snapshot"?O("terminal.transport_detail_manual"):(r==null?void 0:r.mode)==="live"?O("terminal.transport_detail_live"):O(g==="unavailable"?"terminal.transport_detail_unavailable":"terminal.transport_detail_fallback");return c.jsxDEV(c.Fragment,{children:[!i&&c.jsxDEV(dE,{hint:O("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:45,columnNumber:18},this),i&&a&&!d&&!w&&r&&c.jsxDEV("div",{className:`terminal-connection is-${r.quality}`,children:c.jsxDEV("button",{type:"button",className:`terminal-connection__tag terminal-connection__summary is-${r.mode}`,"aria-expanded":N,"aria-haspopup":"dialog",onClick:y,children:[c.jsxDEV("span",{className:`terminal-connection__mode is-${r.mode}`,children:O(`terminal.transport_${r.mode}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:53,columnNumber:13},this),c.jsxDEV("span",{className:"terminal-connection__separator","aria-hidden":"true",children:"·"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:56,columnNumber:13},this),c.jsxDEV("span",{className:"terminal-connection__latency",children:r.rttMs==null?"-- ms":`${r.rttMs} ms`},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:57,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:48,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:47,columnNumber:9},this),N&&r&&c.jsxDEV("div",{className:"terminal-transport-popover",role:"dialog","aria-label":O("terminal.transport_detail_title"),children:[c.jsxDEV("div",{className:"terminal-transport-popover__title",children:O("terminal.transport_detail_title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:66,columnNumber:11},this),c.jsxDEV("div",{className:"terminal-transport-popover__row",children:[c.jsxDEV("span",{children:O("terminal.transport_detail_configured")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:68,columnNumber:13},this),c.jsxDEV("b",{className:`terminal-transport-popover__value is-${l}`,children:O(`settings.terminal_transport_${l}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:69,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:67,columnNumber:11},this),c.jsxDEV("div",{className:"terminal-transport-popover__row",children:[c.jsxDEV("span",{children:O("terminal.transport_detail_current")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:74,columnNumber:13},this),c.jsxDEV("b",{className:`terminal-transport-popover__value is-${r.mode}`,children:O(`settings.terminal_transport_${r.mode}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:75,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:73,columnNumber:11},this),c.jsxDEV("div",{className:"terminal-transport-popover__row",children:[c.jsxDEV("span",{children:O("terminal.transport_detail_connection")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:80,columnNumber:13},this),c.jsxDEV("b",{className:`terminal-transport-popover__connection is-${r.quality}`,children:[O(`terminal.connection_${r.quality}`)," · ",r.rttMs==null?"-- ms":`${r.rttMs} ms`]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:81,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:79,columnNumber:11},this),c.jsxDEV("p",{children:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:87,columnNumber:11},this),l==="live"&&r.mode==="snapshot"&&c.jsxDEV("p",{className:"terminal-transport-popover__recovery",children:k==null?O("terminal.transport_detail_waiting"):O("terminal.transport_detail_retry",{seconds:k})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:89,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:64,columnNumber:9},this),!a&&c.jsxDEV("div",{className:"term-banner term-banner--err",children:["⚠ ",O(u==="pane-missing"?"terminal.paneMissing":"terminal.disconnected")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:98,columnNumber:9},this),m&&c.jsxDEV("div",{className:"dbg",children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:102,columnNumber:22},this),a&&d&&!w&&c.jsxDEV("div",{className:"term-banner term-banner--hist",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:103,columnNumber:47},this),w&&c.jsxDEV("div",{className:"term-banner term-banner--sel",children:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:104,columnNumber:19},this),d&&c.jsxDEV("button",{className:"new-output",onClick:x,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:105,columnNumber:22},this),j&&c.jsxDEV("div",{className:"term-pager",role:"group","aria-label":"翻页",onPointerDown:L=>{uE(document.activeElement)&&L.cancelable&&L.preventDefault()},children:[c.jsxDEV("div",{className:"term-pager-grp",children:[c.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"上翻页",onClick:()=>v("up"),children:c.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:c.jsxDEV("path",{d:"M6 14.5l6-6 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:118,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:117,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:116,columnNumber:13},this),c.jsxDEV("span",{className:"term-pager-div","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:121,columnNumber:13},this),c.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"下翻页",onClick:()=>v("down"),children:c.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:c.jsxDEV("path",{d:"M6 9.5l6 6 6-6",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:124,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:123,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:122,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:115,columnNumber:11},this),c.jsxDEV("div",{className:"term-pager-grp",children:[c.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"适配高度",title:"适配高度",onClick:o,children:c.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[c.jsxDEV("path",{d:"M5 4.5h14M5 19.5h14",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:131,columnNumber:17},this),c.jsxDEV("path",{d:"M12 8.5v7M9.8 10.8L12 8.5l2.2 2.3M9.8 13.2L12 15.5l2.2-2.3",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:132,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:130,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:129,columnNumber:13},this),c.jsxDEV("span",{className:"term-pager-div","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:135,columnNumber:13},this),c.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"定位光标行",title:"定位光标行","aria-pressed":p,onClick:f,children:c.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[c.jsxDEV("path",{d:"M5 7h14M5 17h14",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",opacity:"0.7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:138,columnNumber:17},this),c.jsxDEV("rect",{x:"4",y:"10.5",width:"16",height:"3",rx:"1.5",fill:"currentColor"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:139,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:137,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:136,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:128,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:107,columnNumber:9},this),_&&(()=>{const L=Math.min(_.start.x,_.end.x),U=Math.min(_.start.y,_.end.y),F=Math.max(_.start.y,_.end.y),P=Math.max(8,Math.min(L,(_.wrapW??0)-yO-8)),I=U-44,G=F+(_.start.ch||0)+8,ie=I<4?G:I;return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"sel-handle sel-handle--start",style:{left:_.start.x,top:_.start.y,"--h":`${_.start.ch}px`},"data-end":"start"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:155,columnNumber:13},this),c.jsxDEV("div",{className:"sel-handle sel-handle--end",style:{left:_.end.x,top:_.end.y,"--h":`${_.end.ch}px`},"data-end":"end"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:158,columnNumber:13},this),c.jsxDEV("div",{className:"sel-callout",style:{left:P,top:ie},children:[c.jsxDEV("button",{type:"button",onClick:E,children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:162,columnNumber:15},this),c.jsxDEV("button",{type:"button",onClick:()=>{const q=T.current,J=S.current;q&&J&&q.selectRange(nO(q.currentRange(),J.cols))},children:"整行"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:163,columnNumber:15},this),c.jsxDEV("button",{type:"button",onClick:()=>{const q=T.current,J=S.current;if(!q||!J)return;const X=J.buffer.active;q.selectRange(iO(q.currentRange(),J.cols,q.paraLineText,0,X.length-1))},children:"整段"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:168,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:161,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:154,columnNumber:11},this)})()]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:44,columnNumber:5},this)}var hE={exports:{}};(function(i,r){(function(l,g){i.exports=g()})(self,()=>(()=>{var l={965:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const m=u(374),b=u(509),d=u(855),w=u(859),x=u(381),j=11,v=j*Float32Array.BYTES_PER_ELEMENT;let o,p=0,f=0,_=0;class E extends w.Disposable{constructor(S,k,D,L){super(),this._terminal=S,this._gl=k,this._dimensions=D,this._optionsService=L,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const U=this._gl;b.TextureAtlas.maxAtlasPages===void 0&&(b.TextureAtlas.maxAtlasPages=Math.min(32,(0,m.throwIfFalsy)(U.getParameter(U.MAX_TEXTURE_IMAGE_UNITS))),b.TextureAtlas.maxTextureSize=(0,m.throwIfFalsy)(U.getParameter(U.MAX_TEXTURE_SIZE))),this._program=(0,m.throwIfFalsy)((0,x.createProgram)(U,`#version 300 es
225
+ layout (location = 0) in vec2 a_unitquad;
226
+ layout (location = 1) in vec2 a_cellpos;
227
+ layout (location = 2) in vec2 a_offset;
228
+ layout (location = 3) in vec2 a_size;
229
+ layout (location = 4) in float a_texpage;
230
+ layout (location = 5) in vec2 a_texcoord;
231
+ layout (location = 6) in vec2 a_texsize;
232
+
233
+ uniform mat4 u_projection;
234
+ uniform vec2 u_resolution;
235
+
236
+ out vec2 v_texcoord;
237
+ flat out int v_texpage;
238
+
239
+ void main() {
240
+ vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
241
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
242
+ v_texpage = int(a_texpage);
243
+ v_texcoord = a_texcoord + a_unitquad * a_texsize;
244
+ }`,function(q){let J="";for(let X=1;X<q;X++)J+=` else if (v_texpage == ${X}) { outColor = texture(u_texture[${X}], v_texcoord); }`;return`#version 300 es
245
+ precision lowp float;
246
+
247
+ in vec2 v_texcoord;
248
+ flat in int v_texpage;
249
+
250
+ uniform sampler2D u_texture[${q}];
251
+
252
+ out vec4 outColor;
253
+
254
+ void main() {
255
+ if (v_texpage == 0) {
256
+ outColor = texture(u_texture[0], v_texcoord);
257
+ } ${J}
258
+ }`}(b.TextureAtlas.maxAtlasPages))),this.register((0,w.toDisposable)(()=>U.deleteProgram(this._program))),this._projectionLocation=(0,m.throwIfFalsy)(U.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,m.throwIfFalsy)(U.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,m.throwIfFalsy)(U.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=U.createVertexArray(),U.bindVertexArray(this._vertexArrayObject);const F=new Float32Array([0,0,1,0,0,1,1,1]),P=U.createBuffer();this.register((0,w.toDisposable)(()=>U.deleteBuffer(P))),U.bindBuffer(U.ARRAY_BUFFER,P),U.bufferData(U.ARRAY_BUFFER,F,U.STATIC_DRAW),U.enableVertexAttribArray(0),U.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const I=new Uint8Array([0,1,2,3]),G=U.createBuffer();this.register((0,w.toDisposable)(()=>U.deleteBuffer(G))),U.bindBuffer(U.ELEMENT_ARRAY_BUFFER,G),U.bufferData(U.ELEMENT_ARRAY_BUFFER,I,U.STATIC_DRAW),this._attributesBuffer=(0,m.throwIfFalsy)(U.createBuffer()),this.register((0,w.toDisposable)(()=>U.deleteBuffer(this._attributesBuffer))),U.bindBuffer(U.ARRAY_BUFFER,this._attributesBuffer),U.enableVertexAttribArray(2),U.vertexAttribPointer(2,2,U.FLOAT,!1,v,0),U.vertexAttribDivisor(2,1),U.enableVertexAttribArray(3),U.vertexAttribPointer(3,2,U.FLOAT,!1,v,2*Float32Array.BYTES_PER_ELEMENT),U.vertexAttribDivisor(3,1),U.enableVertexAttribArray(4),U.vertexAttribPointer(4,1,U.FLOAT,!1,v,4*Float32Array.BYTES_PER_ELEMENT),U.vertexAttribDivisor(4,1),U.enableVertexAttribArray(5),U.vertexAttribPointer(5,2,U.FLOAT,!1,v,5*Float32Array.BYTES_PER_ELEMENT),U.vertexAttribDivisor(5,1),U.enableVertexAttribArray(6),U.vertexAttribPointer(6,2,U.FLOAT,!1,v,7*Float32Array.BYTES_PER_ELEMENT),U.vertexAttribDivisor(6,1),U.enableVertexAttribArray(1),U.vertexAttribPointer(1,2,U.FLOAT,!1,v,9*Float32Array.BYTES_PER_ELEMENT),U.vertexAttribDivisor(1,1),U.useProgram(this._program);const ie=new Int32Array(b.TextureAtlas.maxAtlasPages);for(let q=0;q<b.TextureAtlas.maxAtlasPages;q++)ie[q]=q;U.uniform1iv(this._textureLocation,ie),U.uniformMatrix4fv(this._projectionLocation,!1,x.PROJECTION_MATRIX),this._atlasTextures=[];for(let q=0;q<b.TextureAtlas.maxAtlasPages;q++){const J=new x.GLTexture((0,m.throwIfFalsy)(U.createTexture()));this.register((0,w.toDisposable)(()=>U.deleteTexture(J.texture))),U.activeTexture(U.TEXTURE0+q),U.bindTexture(U.TEXTURE_2D,J.texture),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_WRAP_S,U.CLAMP_TO_EDGE),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_WRAP_T,U.CLAMP_TO_EDGE),U.texImage2D(U.TEXTURE_2D,0,U.RGBA,1,1,0,U.RGBA,U.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[q]=J}U.enable(U.BLEND),U.blendFunc(U.SRC_ALPHA,U.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(S,k,D,L,U,F,P,I,G){this._updateCell(this._vertices.attributes,S,k,D,L,U,F,P,I,G)}_updateCell(S,k,D,L,U,F,P,I,G,ie){p=(D*this._terminal.cols+k)*j,L!==d.NULL_CELL_CODE&&L!==void 0?this._atlas&&(o=I&&I.length>1?this._atlas.getRasterizedGlyphCombinedChar(I,U,F,P,!1):this._atlas.getRasterizedGlyph(L,U,F,P,!1),f=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),U!==ie&&o.offset.x>f?(_=o.offset.x-f,S[p]=-(o.offset.x-_)+this._dimensions.device.char.left,S[p+1]=-o.offset.y+this._dimensions.device.char.top,S[p+2]=(o.size.x-_)/this._dimensions.device.canvas.width,S[p+3]=o.size.y/this._dimensions.device.canvas.height,S[p+4]=o.texturePage,S[p+5]=o.texturePositionClipSpace.x+_/this._atlas.pages[o.texturePage].canvas.width,S[p+6]=o.texturePositionClipSpace.y,S[p+7]=o.sizeClipSpace.x-_/this._atlas.pages[o.texturePage].canvas.width,S[p+8]=o.sizeClipSpace.y):(S[p]=-o.offset.x+this._dimensions.device.char.left,S[p+1]=-o.offset.y+this._dimensions.device.char.top,S[p+2]=o.size.x/this._dimensions.device.canvas.width,S[p+3]=o.size.y/this._dimensions.device.canvas.height,S[p+4]=o.texturePage,S[p+5]=o.texturePositionClipSpace.x,S[p+6]=o.texturePositionClipSpace.y,S[p+7]=o.sizeClipSpace.x,S[p+8]=o.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,m.allowRescaling)(L,G,o.size.x,this._dimensions.device.cell.width)&&(S[p+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):S.fill(0,p,p+j-1-2)}clear(){const S=this._terminal,k=S.cols*S.rows*j;this._vertices.count!==k?this._vertices.attributes=new Float32Array(k):this._vertices.attributes.fill(0);let D=0;for(;D<this._vertices.attributesBuffers.length;D++)this._vertices.count!==k?this._vertices.attributesBuffers[D]=new Float32Array(k):this._vertices.attributesBuffers[D].fill(0);this._vertices.count=k,D=0;for(let L=0;L<S.rows;L++)for(let U=0;U<S.cols;U++)this._vertices.attributes[D+9]=U/S.cols,this._vertices.attributes[D+10]=L/S.rows,D+=j}handleResize(){const S=this._gl;S.useProgram(this._program),S.viewport(0,0,S.canvas.width,S.canvas.height),S.uniform2f(this._resolutionLocation,S.canvas.width,S.canvas.height),this.clear()}render(S){if(!this._atlas)return;const k=this._gl;k.useProgram(this._program),k.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const D=this._vertices.attributesBuffers[this._activeBuffer];let L=0;for(let U=0;U<S.lineLengths.length;U++){const F=U*this._terminal.cols*j,P=this._vertices.attributes.subarray(F,F+S.lineLengths[U]*j);D.set(P,L),L+=P.length}k.bindBuffer(k.ARRAY_BUFFER,this._attributesBuffer),k.bufferData(k.ARRAY_BUFFER,D.subarray(0,L),k.STREAM_DRAW);for(let U=0;U<this._atlas.pages.length;U++)this._atlas.pages[U].version!==this._atlasTextures[U].version&&this._bindAtlasPageTexture(k,this._atlas,U);k.drawElementsInstanced(k.TRIANGLE_STRIP,4,k.UNSIGNED_BYTE,0,L/j)}setAtlas(S){this._atlas=S;for(const k of this._atlasTextures)k.version=-1}_bindAtlasPageTexture(S,k,D){S.activeTexture(S.TEXTURE0+D),S.bindTexture(S.TEXTURE_2D,this._atlasTextures[D].texture),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,k.pages[D].canvas),S.generateMipmap(S.TEXTURE_2D),this._atlasTextures[D].version=k.pages[D].version}setDimensions(S){this._dimensions=S}}a.GlyphRenderer=E},742:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RectangleRenderer=void 0;const m=u(374),b=u(859),d=u(310),w=u(381),x=8*Float32Array.BYTES_PER_ELEMENT;class j{constructor(){this.attributes=new Float32Array(160),this.count=0}}let v=0,o=0,p=0,f=0,_=0,E=0,T=0;class S extends b.Disposable{constructor(D,L,U,F){super(),this._terminal=D,this._gl=L,this._dimensions=U,this._themeService=F,this._vertices=new j,this._verticesCursor=new j;const P=this._gl;this._program=(0,m.throwIfFalsy)((0,w.createProgram)(P,`#version 300 es
259
+ layout (location = 0) in vec2 a_position;
260
+ layout (location = 1) in vec2 a_size;
261
+ layout (location = 2) in vec4 a_color;
262
+ layout (location = 3) in vec2 a_unitquad;
263
+
264
+ uniform mat4 u_projection;
265
+
266
+ out vec4 v_color;
267
+
268
+ void main() {
269
+ vec2 zeroToOne = a_position + (a_unitquad * a_size);
270
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
271
+ v_color = a_color;
272
+ }`,`#version 300 es
273
+ precision lowp float;
274
+
275
+ in vec4 v_color;
276
+
277
+ out vec4 outColor;
278
+
279
+ void main() {
280
+ outColor = v_color;
281
+ }`)),this.register((0,b.toDisposable)(()=>P.deleteProgram(this._program))),this._projectionLocation=(0,m.throwIfFalsy)(P.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=P.createVertexArray(),P.bindVertexArray(this._vertexArrayObject);const I=new Float32Array([0,0,1,0,0,1,1,1]),G=P.createBuffer();this.register((0,b.toDisposable)(()=>P.deleteBuffer(G))),P.bindBuffer(P.ARRAY_BUFFER,G),P.bufferData(P.ARRAY_BUFFER,I,P.STATIC_DRAW),P.enableVertexAttribArray(3),P.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const ie=new Uint8Array([0,1,2,3]),q=P.createBuffer();this.register((0,b.toDisposable)(()=>P.deleteBuffer(q))),P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,q),P.bufferData(P.ELEMENT_ARRAY_BUFFER,ie,P.STATIC_DRAW),this._attributesBuffer=(0,m.throwIfFalsy)(P.createBuffer()),this.register((0,b.toDisposable)(()=>P.deleteBuffer(this._attributesBuffer))),P.bindBuffer(P.ARRAY_BUFFER,this._attributesBuffer),P.enableVertexAttribArray(0),P.vertexAttribPointer(0,2,P.FLOAT,!1,x,0),P.vertexAttribDivisor(0,1),P.enableVertexAttribArray(1),P.vertexAttribPointer(1,2,P.FLOAT,!1,x,2*Float32Array.BYTES_PER_ELEMENT),P.vertexAttribDivisor(1,1),P.enableVertexAttribArray(2),P.vertexAttribPointer(2,4,P.FLOAT,!1,x,4*Float32Array.BYTES_PER_ELEMENT),P.vertexAttribDivisor(2,1),this._updateCachedColors(F.colors),this.register(this._themeService.onChangeColors(J=>{this._updateCachedColors(J),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(D){const L=this._gl;L.useProgram(this._program),L.bindVertexArray(this._vertexArrayObject),L.uniformMatrix4fv(this._projectionLocation,!1,w.PROJECTION_MATRIX),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.bufferData(L.ARRAY_BUFFER,D.attributes,L.DYNAMIC_DRAW),L.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,L.UNSIGNED_BYTE,0,D.count)}handleResize(){this._updateViewportRectangle()}setDimensions(D){this._dimensions=D}_updateCachedColors(D){this._bgFloat=this._colorToFloat32Array(D.background),this._cursorFloat=this._colorToFloat32Array(D.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(D){const L=this._terminal,U=this._vertices;let F,P,I,G,ie,q,J,X,V,H,K,W=1;for(F=0;F<L.rows;F++){for(I=-1,G=0,ie=0,q=!1,P=0;P<L.cols;P++)J=(F*L.cols+P)*d.RENDER_MODEL_INDICIES_PER_CELL,X=D.cells[J+d.RENDER_MODEL_BG_OFFSET],V=D.cells[J+d.RENDER_MODEL_FG_OFFSET],H=!!(67108864&V),(X!==G||V!==ie&&(q||H))&&((G!==0||q&&ie!==0)&&(K=8*W++,this._updateRectangle(U,K,ie,G,I,P,F)),I=P,G=X,ie=V,q=H);(G!==0||q&&ie!==0)&&(K=8*W++,this._updateRectangle(U,K,ie,G,I,L.cols,F))}U.count=W}updateCursor(D){const L=this._verticesCursor,U=D.cursor;if(!U||U.style==="block")return void(L.count=0);let F,P=0;U.style!=="bar"&&U.style!=="outline"||(F=8*P++,this._addRectangleFloat(L.attributes,F,U.x*this._dimensions.device.cell.width,U.y*this._dimensions.device.cell.height,U.style==="bar"?U.dpr*U.cursorWidth:U.dpr,this._dimensions.device.cell.height,this._cursorFloat)),U.style!=="underline"&&U.style!=="outline"||(F=8*P++,this._addRectangleFloat(L.attributes,F,U.x*this._dimensions.device.cell.width,(U.y+1)*this._dimensions.device.cell.height-U.dpr,U.width*this._dimensions.device.cell.width,U.dpr,this._cursorFloat)),U.style==="outline"&&(F=8*P++,this._addRectangleFloat(L.attributes,F,U.x*this._dimensions.device.cell.width,U.y*this._dimensions.device.cell.height,U.width*this._dimensions.device.cell.width,U.dpr,this._cursorFloat),F=8*P++,this._addRectangleFloat(L.attributes,F,(U.x+U.width)*this._dimensions.device.cell.width-U.dpr,U.y*this._dimensions.device.cell.height,U.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.count=P}_updateRectangle(D,L,U,F,P,I,G){if(67108864&U)switch(50331648&U){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&U].rgba;break;case 50331648:v=(16777215&U)<<8;break;default:v=this._themeService.colors.foreground.rgba}else switch(50331648&F){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&F].rgba;break;case 50331648:v=(16777215&F)<<8;break;default:v=this._themeService.colors.background.rgba}D.attributes.length<L+4&&(D.attributes=(0,w.expandFloat32Array)(D.attributes,this._terminal.rows*this._terminal.cols*8)),o=P*this._dimensions.device.cell.width,p=G*this._dimensions.device.cell.height,f=(v>>24&255)/255,_=(v>>16&255)/255,E=(v>>8&255)/255,T=1,this._addRectangle(D.attributes,L,o,p,(I-P)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,f,_,E,T)}_addRectangle(D,L,U,F,P,I,G,ie,q,J){D[L]=U/this._dimensions.device.canvas.width,D[L+1]=F/this._dimensions.device.canvas.height,D[L+2]=P/this._dimensions.device.canvas.width,D[L+3]=I/this._dimensions.device.canvas.height,D[L+4]=G,D[L+5]=ie,D[L+6]=q,D[L+7]=J}_addRectangleFloat(D,L,U,F,P,I,G){D[L]=U/this._dimensions.device.canvas.width,D[L+1]=F/this._dimensions.device.canvas.height,D[L+2]=P/this._dimensions.device.canvas.width,D[L+3]=I/this._dimensions.device.canvas.height,D[L+4]=G[0],D[L+5]=G[1],D[L+6]=G[2],D[L+7]=G[3]}_colorToFloat32Array(D){return new Float32Array([(D.rgba>>24&255)/255,(D.rgba>>16&255)/255,(D.rgba>>8&255)/255,(255&D.rgba)/255])}}a.RectangleRenderer=S},310:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const m=u(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,m.createSelectionRenderModel)()}resize(b,d){const w=b*d*a.RENDER_MODEL_INDICIES_PER_CELL;w!==this.cells.length&&(this.cells=new Uint32Array(w),this.lineLengths=new Uint32Array(d))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const m=u(820),b=u(274),d=u(627),w=u(457),x=u(56),j=u(374),v=u(345),o=u(859),p=u(147),f=u(782),_=u(855),E=u(965),T=u(742),S=u(310),k=u(733);class D extends o.Disposable{constructor(P,I,G,ie,q,J,X,V,H){super(),this._terminal=P,this._characterJoinerService=I,this._charSizeService=G,this._coreBrowserService=ie,this._coreService=q,this._decorationService=J,this._optionsService=X,this._themeService=V,this._cursorBlinkStateManager=new o.MutableDisposable,this._charAtlasDisposable=this.register(new o.MutableDisposable),this._observerDisposable=this.register(new o.MutableDisposable),this._model=new S.RenderModel,this._workCell=new f.CellData,this._workCell2=new f.CellData,this._rectangleRenderer=this.register(new o.MutableDisposable),this._glyphRenderer=this.register(new o.MutableDisposable),this._onChangeTextureAtlas=this.register(new v.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new v.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new v.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new v.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new v.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new b.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new k.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,X,this._themeService)],this.dimensions=(0,j.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(X.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const K={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",K),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,m.addDisposableDomListener)(this._canvas,"webglcontextlost",W=>{console.log("webglcontextlost event received"),W.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(W)},3e3)})),this.register((0,m.addDisposableDomListener)(this._canvas,"webglcontextrestored",W=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,d.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,x.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(W,oe)=>this._setCanvasDevicePixelDimensions(W,oe)),this.register(this._coreBrowserService.onWindowChange(W=>{this._observerDisposable.value=(0,x.observeDevicePixelDimensions)(this._canvas,W,(oe,de)=>this._setCanvasDevicePixelDimensions(oe,de))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,o.toDisposable)(()=>{var W;for(const oe of this._renderLayers)oe.dispose();(W=this._canvas.parentElement)==null||W.removeChild(this._canvas),(0,d.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var P;return(P=this._charAtlas)==null?void 0:P.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(P,I){var G,ie,q,J;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const X of this._renderLayers)X.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`,(G=this._rectangleRenderer.value)==null||G.setDimensions(this.dimensions),(ie=this._rectangleRenderer.value)==null||ie.handleResize(),(q=this._glyphRenderer.value)==null||q.setDimensions(this.dimensions),(J=this._glyphRenderer.value)==null||J.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var P;for(const I of this._renderLayers)I.handleBlur(this._terminal);(P=this._cursorBlinkStateManager.value)==null||P.pause(),this._requestRedrawViewport()}handleFocus(){var P;for(const I of this._renderLayers)I.handleFocus(this._terminal);(P=this._cursorBlinkStateManager.value)==null||P.resume(),this._requestRedrawViewport()}handleSelectionChanged(P,I,G){for(const ie of this._renderLayers)ie.handleSelectionChanged(this._terminal,P,I,G);this._model.selection.update(this._core,P,I,G),this._requestRedrawViewport()}handleCursorMove(){var P;for(const I of this._renderLayers)I.handleCursorMove(this._terminal);(P=this._cursorBlinkStateManager.value)==null||P.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new T.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new E.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var I;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const P=(0,d.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==P&&(this._onChangeTextureAtlas.fire(P.pages[0].canvas),this._charAtlasDisposable.value=(0,o.getDisposeArrayDisposable)([(0,v.forwardEvent)(P.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,v.forwardEvent)(P.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=P,this._charAtlas.warmUp(),(I=this._glyphRenderer.value)==null||I.setAtlas(this._charAtlas)}_clearModel(P){var I;this._model.clear(),P&&((I=this._glyphRenderer.value)==null||I.clear())}clearTextureAtlas(){var P;(P=this._charAtlas)==null||P.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var P;this._clearModel(!0);for(const I of this._renderLayers)I.reset(this._terminal);(P=this._cursorBlinkStateManager.value)==null||P.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(P){return-1}deregisterCharacterJoiner(P){return!1}renderRows(P,I){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const G of this._renderLayers)G.handleGridChanged(this._terminal,P,I);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(P,I),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new w.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(P,I){const G=this._core;let ie,q,J,X,V,H,K,W,oe,de,xe,Se,se,Y,pe=this._workCell;P=U(P,G.rows-1,0),I=U(I,G.rows-1,0);const he=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,He=he-G.buffer.ydisp,Oe=Math.min(this._terminal.buffer.active.cursorX,G.cols-1);let et=-1;const ve=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Ke=!1;for(q=P;q<=I;q++)for(J=q+G.buffer.ydisp,X=G.buffer.lines.get(J),this._model.lineLengths[q]=0,V=this._characterJoinerService.getJoinedCharacters(J),se=0;se<G.cols;se++)if(ie=this._cellColorResolver.result.bg,X.loadCell(se,pe),se===0&&(ie=this._cellColorResolver.result.bg),H=!1,K=se,V.length>0&&se===V[0][0]&&(H=!0,W=V.shift(),pe=new L(pe,X.translateToString(!0,W[0],W[1]),W[1]-W[0]),K=W[1]-1),oe=pe.getChars(),de=pe.getCode(),Se=(q*G.cols+se)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(pe,se,J,this.dimensions.device.cell.width),ve&&J===he&&(se===Oe&&(this._model.cursor={x:Oe,y:He,width:pe.getWidth(),style:this._coreBrowserService.isFocused?G.options.cursorStyle||"block":G.options.cursorInactiveStyle,cursorWidth:G.options.cursorWidth,dpr:this._devicePixelRatio},et=Oe+pe.getWidth()-1),se>=Oe&&se<=et&&(this._coreBrowserService.isFocused&&(G.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&G.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)),de!==_.NULL_CELL_CODE&&(this._model.lineLengths[q]=se+1),(this._model.cells[Se]!==de||this._model.cells[Se+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[Se+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[Se+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Ke=!0,oe.length>1&&(de|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[Se]=de,this._model.cells[Se+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[Se+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[Se+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,xe=pe.getWidth(),this._glyphRenderer.value.updateCell(se,q,de,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,oe,xe,ie),H))for(pe=this._workCell,se++;se<K;se++)Y=(q*G.cols+se)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(se,q,_.NULL_CELL_CODE,0,0,0,_.NULL_CELL_CHAR,0,0),this._model.cells[Y]=_.NULL_CELL_CODE,this._model.cells[Y+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[Y+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[Y+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Ke&&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(P,I){this._canvas.width===P&&this._canvas.height===I||(this._canvas.width=P,this._canvas.height=I,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const P=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:P,end:P})}}a.WebglRenderer=D;class L extends p.AttributeData{constructor(P,I,G){super(),this.content=0,this.combinedData="",this.fg=P.fg,this.bg=P.bg,this.combinedData=I,this._width=G}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(P){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function U(F,P,I=0){return Math.max(Math.min(F,P),I)}a.JoinedCellData=L},381:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const m=u(374);function b(d,w,x){const j=(0,m.throwIfFalsy)(d.createShader(w));if(d.shaderSource(j,x),d.compileShader(j),d.getShaderParameter(j,d.COMPILE_STATUS))return j;console.error(d.getShaderInfoLog(j)),d.deleteShader(j)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(d,w,x){const j=(0,m.throwIfFalsy)(d.createProgram());if(d.attachShader(j,(0,m.throwIfFalsy)(b(d,d.VERTEX_SHADER,w))),d.attachShader(j,(0,m.throwIfFalsy)(b(d,d.FRAGMENT_SHADER,x))),d.linkProgram(j),d.getProgramParameter(j,d.LINK_STATUS))return j;console.error(d.getProgramInfoLog(j)),d.deleteProgram(j)},a.createShader=b,a.expandFloat32Array=function(d,w){const x=Math.min(2*d.length,w),j=new Float32Array(x);for(let v=0;v<d.length;v++)j[v]=d[v];return j},a.GLTexture=class{constructor(d){this.texture=d,this.version=-1}}},592:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const m=u(627),b=u(237),d=u(374),w=u(859);class x extends w.Disposable{constructor(v,o,p,f,_,E,T,S){super(),this._container=o,this._alpha=_,this._coreBrowserService=E,this._optionsService=T,this._themeService=S,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-${p}-layer`),this._canvas.style.zIndex=f.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(k=>{this._refreshCharAtlas(v,k),this.reset(v)})),this.register((0,w.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,d.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(v){}handleFocus(v){}handleCursorMove(v){}handleGridChanged(v,o,p){}handleSelectionChanged(v,o,p,f=!1){}_setTransparency(v,o){if(o===this._alpha)return;const p=this._canvas;this._alpha=o,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,p),this._refreshCharAtlas(v,this._themeService.colors),this.handleGridChanged(v,0,v.rows-1)}_refreshCharAtlas(v,o){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,m.acquireTextureAtlas)(v,this._optionsService.rawOptions,o,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(v,o){this._deviceCellWidth=o.device.cell.width,this._deviceCellHeight=o.device.cell.height,this._deviceCharWidth=o.device.char.width,this._deviceCharHeight=o.device.char.height,this._deviceCharLeft=o.device.char.left,this._deviceCharTop=o.device.char.top,this._canvas.width=o.device.canvas.width,this._canvas.height=o.device.canvas.height,this._canvas.style.width=`${o.css.canvas.width}px`,this._canvas.style.height=`${o.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(v,this._themeService.colors)}_fillBottomLineAtCells(v,o,p=1){this._ctx.fillRect(v*this._deviceCellWidth,(o+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,p*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(v,o,p,f){this._alpha?this._ctx.clearRect(v*this._deviceCellWidth,o*this._deviceCellHeight,p*this._deviceCellWidth,f*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(v*this._deviceCellWidth,o*this._deviceCellHeight,p*this._deviceCellWidth,f*this._deviceCellHeight))}_fillCharTrueColor(v,o,p,f){this._ctx.font=this._getFont(v,!1,!1),this._ctx.textBaseline=b.TEXT_BASELINE,this._clipCell(p,f,o.getWidth()),this._ctx.fillText(o.getChars(),p*this._deviceCellWidth+this._deviceCharLeft,f*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(v,o,p){this._ctx.beginPath(),this._ctx.rect(v*this._deviceCellWidth,o*this._deviceCellHeight,p*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(v,o,p){return`${p?"italic":""} ${o?v.options.fontWeightBold:v.options.fontWeight} ${v.options.fontSize*this._coreBrowserService.dpr}px ${v.options.fontFamily}`}}a.BaseRenderLayer=x},733:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const m=u(197),b=u(237),d=u(592);class w extends d.BaseRenderLayer{constructor(j,v,o,p,f,_,E){super(o,j,"link",v,!0,f,_,E),this.register(p.onShowLinkUnderline(T=>this._handleShowLinkUnderline(T))),this.register(p.onHideLinkUnderline(T=>this._handleHideLinkUnderline(T)))}resize(j,v){super.resize(j,v),this._state=void 0}reset(j){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const j=this._state.y2-this._state.y1-1;j>0&&this._clearCells(0,this._state.y1+1,this._state.cols,j),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(j){if(j.fg===b.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:j.fg!==void 0&&(0,m.is256Color)(j.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[j.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,j.y1===j.y2)this._fillBottomLineAtCells(j.x1,j.y1,j.x2-j.x1);else{this._fillBottomLineAtCells(j.x1,j.y1,j.cols-j.x1);for(let v=j.y1+1;v<j.y2;v++)this._fillBottomLineAtCells(0,v,j.cols);this._fillBottomLineAtCells(0,j.y2,j.x2)}this._state=j}_handleHideLinkUnderline(j){this._clearCurrentLink()}}a.LinkRenderLayer=w},820:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,m,b,d){u.addEventListener(m,b,d);let w=!1;return{dispose:()=>{w||(w=!0,u.removeEventListener(m,b,d))}}}},274:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const m=u(855),b=u(160),d=u(374);let w,x=0,j=0,v=!1,o=!1,p=!1,f=0;a.CellColorResolver=class{constructor(_,E,T,S,k,D){this._terminal=_,this._optionService=E,this._selectionRenderModel=T,this._decorationService=S,this._coreBrowserService=k,this._themeService=D,this.result={fg:0,bg:0,ext:0}}resolve(_,E,T,S){if(this.result.bg=_.bg,this.result.fg=_.fg,this.result.ext=268435456&_.bg?_.extended.ext:0,j=0,x=0,o=!1,v=!1,p=!1,w=this._themeService.colors,f=0,_.getCode()!==m.NULL_CELL_CODE&&_.extended.underlineStyle===4){const k=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));f=E*S%(2*Math.round(k))}if(this._decorationService.forEachDecorationAtCell(E,T,"bottom",k=>{k.backgroundColorRGB&&(j=k.backgroundColorRGB.rgba>>8&16777215,o=!0),k.foregroundColorRGB&&(x=k.foregroundColorRGB.rgba>>8&16777215,v=!0)}),p=this._selectionRenderModel.isCellSelected(this._terminal,E,T),p){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:j=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:j=(16777215&this.result.fg)<<8|255;break;default:j=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:j=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:j=(16777215&this.result.bg)<<8|255}j=b.rgba.blend(j,4294967040&(this._coreBrowserService.isFocused?w.selectionBackgroundOpaque:w.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else j=(this._coreBrowserService.isFocused?w.selectionBackgroundOpaque:w.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(o=!0,w.selectionForeground&&(x=w.selectionForeground.rgba>>8&16777215,v=!0),(0,d.treatGlyphAsBackgroundColor)(_.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))x=(this._coreBrowserService.isFocused?w.selectionBackgroundOpaque:w.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:x=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:x=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:x=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:x=(16777215&this.result.fg)<<8|255;break;default:x=this._themeService.colors.foreground.rgba}x=b.rgba.blend(x,4294967040&(this._coreBrowserService.isFocused?w.selectionBackgroundOpaque:w.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}v=!0}}this._decorationService.forEachDecorationAtCell(E,T,"top",k=>{k.backgroundColorRGB&&(j=k.backgroundColorRGB.rgba>>8&16777215,o=!0),k.foregroundColorRGB&&(x=k.foregroundColorRGB.rgba>>8&16777215,v=!0)}),o&&(j=p?-16777216&_.bg&-134217729|j|50331648:-16777216&_.bg|j|50331648),v&&(x=-16777216&_.fg&-67108865|x|50331648),67108864&this.result.fg&&(o&&!v&&(x=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&w.background.rgba>>8|50331648,v=!0),!o&&v&&(j=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&w.foreground.rgba>>8|50331648,o=!0)),w=void 0,this.result.bg=o?j:this.result.bg,this.result.fg=v?x:this.result.fg,this.result.ext&=536870911,this.result.ext|=f<<29&3758096384}}},627:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const m=u(509),b=u(197),d=[];a.acquireTextureAtlas=function(w,x,j,v,o,p,f,_){const E=(0,b.generateConfig)(v,o,p,f,x,j,_);for(let k=0;k<d.length;k++){const D=d[k],L=D.ownedBy.indexOf(w);if(L>=0){if((0,b.configEquals)(D.config,E))return D.atlas;D.ownedBy.length===1?(D.atlas.dispose(),d.splice(k,1)):D.ownedBy.splice(L,1);break}}for(let k=0;k<d.length;k++){const D=d[k];if((0,b.configEquals)(D.config,E))return D.ownedBy.push(w),D.atlas}const T=w._core,S={atlas:new m.TextureAtlas(document,E,T.unicodeService),config:E,ownedBy:[w]};return d.push(S),S.atlas},a.removeTerminalFromCache=function(w){for(let x=0;x<d.length;x++){const j=d[x].ownedBy.indexOf(w);if(j!==-1){d[x].ownedBy.length===1?(d[x].atlas.dispose(),d.splice(x,1)):d[x].ownedBy.splice(j,1);break}}}},197:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const m=u(160);a.generateConfig=function(b,d,w,x,j,v,o){const p={foreground:v.foreground,background:v.background,cursor:m.NULL_COLOR,cursorAccent:m.NULL_COLOR,selectionForeground:m.NULL_COLOR,selectionBackgroundTransparent:m.NULL_COLOR,selectionBackgroundOpaque:m.NULL_COLOR,selectionInactiveBackgroundTransparent:m.NULL_COLOR,selectionInactiveBackgroundOpaque:m.NULL_COLOR,ansi:v.ansi.slice(),contrastCache:v.contrastCache,halfContrastCache:v.halfContrastCache};return{customGlyphs:j.customGlyphs,devicePixelRatio:o,letterSpacing:j.letterSpacing,lineHeight:j.lineHeight,deviceCellWidth:b,deviceCellHeight:d,deviceCharWidth:w,deviceCharHeight:x,fontFamily:j.fontFamily,fontSize:j.fontSize,fontWeight:j.fontWeight,fontWeightBold:j.fontWeightBold,allowTransparency:j.allowTransparency,drawBoldTextInBrightColors:j.drawBoldTextInBrightColors,minimumContrastRatio:j.minimumContrastRatio,colors:p}},a.configEquals=function(b,d){for(let w=0;w<b.colors.ansi.length;w++)if(b.colors.ansi[w].rgba!==d.colors.ansi[w].rgba)return!1;return b.devicePixelRatio===d.devicePixelRatio&&b.customGlyphs===d.customGlyphs&&b.lineHeight===d.lineHeight&&b.letterSpacing===d.letterSpacing&&b.fontFamily===d.fontFamily&&b.fontSize===d.fontSize&&b.fontWeight===d.fontWeight&&b.fontWeightBold===d.fontWeightBold&&b.allowTransparency===d.allowTransparency&&b.deviceCharWidth===d.deviceCharWidth&&b.deviceCharHeight===d.deviceCharHeight&&b.drawBoldTextInBrightColors===d.drawBoldTextInBrightColors&&b.minimumContrastRatio===d.minimumContrastRatio&&b.colors.foreground.rgba===d.colors.foreground.rgba&&b.colors.background.rgba===d.colors.background.rgba},a.is256Color=function(b){return(50331648&b)==16777216||(50331648&b)==33554432}},237:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const m=u(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=m.isFirefox||m.isLegacyEdge?"bottom":"ideographic"},457:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(u,m){this._renderCallback=u,this._coreBrowserService=m,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const m=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,m>0)return void this._restartInterval(m)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const m=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(m)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},u)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const m=u(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const b={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(v,o)=>`M0,${.5-o} L1,${.5-o} M0,${.5+o} L1,${.5+o}`},"║":{1:(v,o)=>`M${.5-v},0 L${.5-v},1 M${.5+v},0 L${.5+v},1`},"╒":{1:(v,o)=>`M.5,1 L.5,${.5-o} L1,${.5-o} M.5,${.5+o} L1,${.5+o}`},"╓":{1:(v,o)=>`M${.5-v},1 L${.5-v},.5 L1,.5 M${.5+v},.5 L${.5+v},1`},"╔":{1:(v,o)=>`M1,${.5-o} L${.5-v},${.5-o} L${.5-v},1 M1,${.5+o} L${.5+v},${.5+o} L${.5+v},1`},"╕":{1:(v,o)=>`M0,${.5-o} L.5,${.5-o} L.5,1 M0,${.5+o} L.5,${.5+o}`},"╖":{1:(v,o)=>`M${.5+v},1 L${.5+v},.5 L0,.5 M${.5-v},.5 L${.5-v},1`},"╗":{1:(v,o)=>`M0,${.5+o} L${.5-v},${.5+o} L${.5-v},1 M0,${.5-o} L${.5+v},${.5-o} L${.5+v},1`},"╘":{1:(v,o)=>`M.5,0 L.5,${.5+o} L1,${.5+o} M.5,${.5-o} L1,${.5-o}`},"╙":{1:(v,o)=>`M1,.5 L${.5-v},.5 L${.5-v},0 M${.5+v},.5 L${.5+v},0`},"╚":{1:(v,o)=>`M1,${.5-o} L${.5+v},${.5-o} L${.5+v},0 M1,${.5+o} L${.5-v},${.5+o} L${.5-v},0`},"╛":{1:(v,o)=>`M0,${.5+o} L.5,${.5+o} L.5,0 M0,${.5-o} L.5,${.5-o}`},"╜":{1:(v,o)=>`M0,.5 L${.5+v},.5 L${.5+v},0 M${.5-v},.5 L${.5-v},0`},"╝":{1:(v,o)=>`M0,${.5-o} L${.5-v},${.5-o} L${.5-v},0 M0,${.5+o} L${.5+v},${.5+o} L${.5+v},0`},"╞":{1:(v,o)=>`M.5,0 L.5,1 M.5,${.5-o} L1,${.5-o} M.5,${.5+o} L1,${.5+o}`},"╟":{1:(v,o)=>`M${.5-v},0 L${.5-v},1 M${.5+v},0 L${.5+v},1 M${.5+v},.5 L1,.5`},"╠":{1:(v,o)=>`M${.5-v},0 L${.5-v},1 M1,${.5+o} L${.5+v},${.5+o} L${.5+v},1 M1,${.5-o} L${.5+v},${.5-o} L${.5+v},0`},"╡":{1:(v,o)=>`M.5,0 L.5,1 M0,${.5-o} L.5,${.5-o} M0,${.5+o} L.5,${.5+o}`},"╢":{1:(v,o)=>`M0,.5 L${.5-v},.5 M${.5-v},0 L${.5-v},1 M${.5+v},0 L${.5+v},1`},"╣":{1:(v,o)=>`M${.5+v},0 L${.5+v},1 M0,${.5+o} L${.5-v},${.5+o} L${.5-v},1 M0,${.5-o} L${.5-v},${.5-o} L${.5-v},0`},"╤":{1:(v,o)=>`M0,${.5-o} L1,${.5-o} M0,${.5+o} L1,${.5+o} M.5,${.5+o} L.5,1`},"╥":{1:(v,o)=>`M0,.5 L1,.5 M${.5-v},.5 L${.5-v},1 M${.5+v},.5 L${.5+v},1`},"╦":{1:(v,o)=>`M0,${.5-o} L1,${.5-o} M0,${.5+o} L${.5-v},${.5+o} L${.5-v},1 M1,${.5+o} L${.5+v},${.5+o} L${.5+v},1`},"╧":{1:(v,o)=>`M.5,0 L.5,${.5-o} M0,${.5-o} L1,${.5-o} M0,${.5+o} L1,${.5+o}`},"╨":{1:(v,o)=>`M0,.5 L1,.5 M${.5-v},.5 L${.5-v},0 M${.5+v},.5 L${.5+v},0`},"╩":{1:(v,o)=>`M0,${.5+o} L1,${.5+o} M0,${.5-o} L${.5-v},${.5-o} L${.5-v},0 M1,${.5-o} L${.5+v},${.5-o} L${.5+v},0`},"╪":{1:(v,o)=>`M.5,0 L.5,1 M0,${.5-o} L1,${.5-o} M0,${.5+o} L1,${.5+o}`},"╫":{1:(v,o)=>`M0,.5 L1,.5 M${.5-v},0 L${.5-v},1 M${.5+v},0 L${.5+v},1`},"╬":{1:(v,o)=>`M0,${.5+o} L${.5-v},${.5+o} L${.5-v},1 M1,${.5+o} L${.5+v},${.5+o} L${.5+v},1 M0,${.5-o} L${.5-v},${.5-o} L${.5-v},0 M1,${.5-o} L${.5+v},${.5-o} L${.5+v},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:(v,o)=>`M.5,1 L.5,${.5+o/.15*.5} C.5,${.5+o/.15*.5},.5,.5,1,.5`},"╮":{1:(v,o)=>`M.5,1 L.5,${.5+o/.15*.5} C.5,${.5+o/.15*.5},.5,.5,0,.5`},"╯":{1:(v,o)=>`M.5,0 L.5,${.5-o/.15*.5} C.5,${.5-o/.15*.5},.5,.5,0,.5`},"╰":{1:(v,o)=>`M.5,0 L.5,${.5-o/.15*.5} C.5,${.5-o/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(v,o,p,f,_,E,T,S){const k=a.blockElementDefinitions[o];if(k)return function(F,P,I,G,ie,q){for(let J=0;J<P.length;J++){const X=P[J],V=ie/8,H=q/8;F.fillRect(I+X.x*V,G+X.y*H,X.w*V,X.h*H)}}(v,k,p,f,_,E),!0;const D=b[o];if(D)return function(F,P,I,G,ie,q){let J=d.get(P);J||(J=new Map,d.set(P,J));const X=F.fillStyle;if(typeof X!="string")throw new Error(`Unexpected fillStyle type "${X}"`);let V=J.get(X);if(!V){const H=P[0].length,K=P.length,W=F.canvas.ownerDocument.createElement("canvas");W.width=H,W.height=K;const oe=(0,m.throwIfFalsy)(W.getContext("2d")),de=new ImageData(H,K);let xe,Se,se,Y;if(X.startsWith("#"))xe=parseInt(X.slice(1,3),16),Se=parseInt(X.slice(3,5),16),se=parseInt(X.slice(5,7),16),Y=X.length>7&&parseInt(X.slice(7,9),16)||1;else{if(!X.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${X}" when drawing pattern glyph`);[xe,Se,se,Y]=X.substring(5,X.length-1).split(",").map(pe=>parseFloat(pe))}for(let pe=0;pe<K;pe++)for(let he=0;he<H;he++)de.data[4*(pe*H+he)]=xe,de.data[4*(pe*H+he)+1]=Se,de.data[4*(pe*H+he)+2]=se,de.data[4*(pe*H+he)+3]=P[pe][he]*(255*Y);oe.putImageData(de,0,0),V=(0,m.throwIfFalsy)(F.createPattern(W,null)),J.set(X,V)}F.fillStyle=V,F.fillRect(I,G,ie,q)}(v,D,p,f,_,E),!0;const L=a.boxDrawingDefinitions[o];if(L)return function(F,P,I,G,ie,q,J){F.strokeStyle=F.fillStyle;for(const[X,V]of Object.entries(P)){let H;F.beginPath(),F.lineWidth=J*Number.parseInt(X),H=typeof V=="function"?V(.15,.15/q*ie):V;for(const K of H.split(" ")){const W=K[0],oe=x[W];if(!oe){console.error(`Could not find drawing instructions for "${W}"`);continue}const de=K.substring(1).split(",");de[0]&&de[1]&&oe(F,j(de,ie,q,I,G,!0,J))}F.stroke(),F.closePath()}}(v,L,p,f,_,E,S),!0;const U=a.powerlineDefinitions[o];return!!U&&(function(F,P,I,G,ie,q,J,X){const V=new Path2D;V.rect(I,G,ie,q),F.clip(V),F.beginPath();const H=J/12;F.lineWidth=X*H;for(const K of P.d.split(" ")){const W=K[0],oe=x[W];if(!oe){console.error(`Could not find drawing instructions for "${W}"`);continue}const de=K.substring(1).split(",");de[0]&&de[1]&&oe(F,j(de,ie,q,I,G,!1,X,(P.leftPadding??0)*(H/2),(P.rightPadding??0)*(H/2)))}P.type===1?(F.strokeStyle=F.fillStyle,F.stroke()):F.fill(),F.closePath()}(v,U,p,f,_,E,T,S),!0)};const d=new Map;function w(v,o,p=0){return Math.max(Math.min(v,o),p)}const x={C:(v,o)=>v.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]),L:(v,o)=>v.lineTo(o[0],o[1]),M:(v,o)=>v.moveTo(o[0],o[1])};function j(v,o,p,f,_,E,T,S=0,k=0){const D=v.map(L=>parseFloat(L)||parseInt(L));if(D.length<2)throw new Error("Too few arguments for instruction");for(let L=0;L<D.length;L+=2)D[L]*=o-S*T-k*T,E&&D[L]!==0&&(D[L]=w(Math.round(D[L]+.5)-.5,o,0)),D[L]+=f+S*T;for(let L=1;L<D.length;L+=2)D[L]*=p,E&&D[L]!==0&&(D[L]=w(Math.round(D[L]+.5)-.5,p,0)),D[L]+=_;return D}},56:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const m=u(859);a.observeDevicePixelDimensions=function(b,d,w){let x=new d.ResizeObserver(j=>{const v=j.find(f=>f.target===b);if(!v)return;if(!("devicePixelContentBoxSize"in v))return x==null||x.disconnect(),void(x=void 0);const o=v.devicePixelContentBoxSize[0].inlineSize,p=v.devicePixelContentBoxSize[0].blockSize;o>0&&p>0&&w(o,p)});try{x.observe(b,{box:["device-pixel-content-box"]})}catch{x.disconnect(),x=void 0}return(0,m.toDisposable)(()=>x==null?void 0:x.disconnect())}},374:(y,a)=>{function u(b){return 57508<=b&&b<=57558}function m(b){return b>=128512&&b<=128591||b>=127744&&b<=128511||b>=128640&&b<=128767||b>=9728&&b<=9983||b>=9984&&b<=10175||b>=65024&&b<=65039||b>=129280&&b<=129535||b>=127462&&b<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(b){if(!b)throw new Error("value must not be falsy");return b},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(b){return 57520<=b&&b<=57527},a.isEmoji=m,a.allowRescaling=function(b,d,w,x){return d===1&&w>Math.ceil(1.5*x)&&b!==void 0&&b>255&&!m(b)&&!u(b)&&!function(j){return 57344<=j&&j<=63743}(b)},a.treatGlyphAsBackgroundColor=function(b){return u(b)||function(d){return 9472<=d&&d<=9631}(b)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(b,d,w=0){return(b-(2*Math.round(d)-w))%(2*Math.round(d))}},296:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.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(b,d,w,x=!1){if(this.selectionStart=d,this.selectionEnd=w,!d||!w||d[0]===w[0]&&d[1]===w[1])return void this.clear();const j=b.buffers.active.ydisp,v=d[1]-j,o=w[1]-j,p=Math.max(v,0),f=Math.min(o,b.rows-1);p>=b.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=x,this.viewportStartRow=v,this.viewportEndRow=o,this.viewportCappedStartRow=p,this.viewportCappedEndRow=f,this.startCol=d[0],this.endCol=w[0])}isCellSelected(b,d,w){return!!this.hasSelection&&(w-=b.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&w>=this.viewportCappedStartRow&&d<this.endCol&&w<=this.viewportCappedEndRow:d<this.startCol&&w>=this.viewportCappedStartRow&&d>=this.endCol&&w<=this.viewportCappedEndRow:w>this.viewportStartRow&&w<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&w===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&w===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&w===this.viewportStartRow&&d>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},509:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const m=u(237),b=u(860),d=u(374),w=u(160),x=u(345),j=u(485),v=u(385),o=u(147),p=u(855),f={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let _;class E{get pages(){return this._pages}constructor(L,U,F){this._document=L,this._config=U,this._unicodeService=F,this._didWarmUp=!1,this._cacheMap=new j.FourKeyMap,this._cacheMapCombined=new j.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new o.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new x.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new x.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=k(L,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,d.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const L of this.pages)L.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const L=new v.IdleTaskQueue;for(let U=33;U<126;U++)L.enqueue(()=>{if(!this._cacheMap.get(U,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT)){const F=this._drawToCache(U,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT);this._cacheMap.set(U,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT,F)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const L of this._pages)L.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(E.maxAtlasPages&&this._pages.length>=Math.max(4,E.maxAtlasPages)){const U=this._pages.filter(J=>2*J.canvas.width<=(E.maxTextureSize||4096)).sort((J,X)=>X.canvas.width!==J.canvas.width?X.canvas.width-J.canvas.width:X.percentageUsed-J.percentageUsed);let F=-1,P=0;for(let J=0;J<U.length;J++)if(U[J].canvas.width!==P)F=J,P=U[J].canvas.width;else if(J-F==3)break;const I=U.slice(F,F+4),G=I.map(J=>J.glyphs[0].texturePage).sort((J,X)=>J>X?1:-1),ie=this.pages.length-I.length,q=this._mergePages(I,ie);q.version++;for(let J=G.length-1;J>=0;J--)this._deletePage(G[J]);this.pages.push(q),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(q.canvas)}const L=new T(this._document,this._textureSize);return this._pages.push(L),this._activePages.push(L),this._onAddTextureAtlasCanvas.fire(L.canvas),L}_mergePages(L,U){const F=2*L[0].canvas.width,P=new T(this._document,F,L);for(const[I,G]of L.entries()){const ie=I*G.canvas.width%F,q=Math.floor(I/2)*G.canvas.height;P.ctx.drawImage(G.canvas,ie,q);for(const X of G.glyphs)X.texturePage=U,X.sizeClipSpace.x=X.size.x/F,X.sizeClipSpace.y=X.size.y/F,X.texturePosition.x+=ie,X.texturePosition.y+=q,X.texturePositionClipSpace.x=X.texturePosition.x/F,X.texturePositionClipSpace.y=X.texturePosition.y/F;this._onRemoveTextureAtlasCanvas.fire(G.canvas);const J=this._activePages.indexOf(G);J!==-1&&this._activePages.splice(J,1)}return P}_deletePage(L){this._pages.splice(L,1);for(let U=L;U<this._pages.length;U++){const F=this._pages[U];for(const P of F.glyphs)P.texturePage--;F.version++}}getRasterizedGlyphCombinedChar(L,U,F,P,I){return this._getFromCacheMap(this._cacheMapCombined,L,U,F,P,I)}getRasterizedGlyph(L,U,F,P,I){return this._getFromCacheMap(this._cacheMap,L,U,F,P,I)}_getFromCacheMap(L,U,F,P,I,G=!1){return _=L.get(U,F,P,I),_||(_=this._drawToCache(U,F,P,I,G),L.set(U,F,P,I,_)),_}_getColorFromAnsiIndex(L){if(L>=this._config.colors.ansi.length)throw new Error("No color found for idx "+L);return this._config.colors.ansi[L]}_getBackgroundColor(L,U,F,P){if(this._config.allowTransparency)return w.NULL_COLOR;let I;switch(L){case 16777216:case 33554432:I=this._getColorFromAnsiIndex(U);break;case 50331648:const G=o.AttributeData.toColorRGB(U);I=w.channels.toColor(G[0],G[1],G[2]);break;default:I=F?w.color.opaque(this._config.colors.foreground):this._config.colors.background}return I}_getForegroundColor(L,U,F,P,I,G,ie,q,J,X){const V=this._getMinimumContrastColor(L,U,F,P,I,G,ie,J,q,X);if(V)return V;let H;switch(I){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&J&&G<8&&(G+=8),H=this._getColorFromAnsiIndex(G);break;case 50331648:const K=o.AttributeData.toColorRGB(G);H=w.channels.toColor(K[0],K[1],K[2]);break;default:H=ie?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=w.color.opaque(H)),q&&(H=w.color.multiplyOpacity(H,m.DIM_OPACITY)),H}_resolveBackgroundRgba(L,U,F){switch(L){case 16777216:case 33554432:return this._getColorFromAnsiIndex(U).rgba;case 50331648:return U<<8;default:return F?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(L,U,F,P){switch(L){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&P&&U<8&&(U+=8),this._getColorFromAnsiIndex(U).rgba;case 50331648:return U<<8;default:return F?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(L,U,F,P,I,G,ie,q,J,X){if(this._config.minimumContrastRatio===1||X)return;const V=this._getContrastCache(J),H=V.getColor(L,P);if(H!==void 0)return H||void 0;const K=this._resolveBackgroundRgba(U,F,ie),W=this._resolveForegroundRgba(I,G,ie,q),oe=w.rgba.ensureContrastRatio(K,W,this._config.minimumContrastRatio/(J?2:1));if(!oe)return void V.setColor(L,P,null);const de=w.channels.toColor(oe>>24&255,oe>>16&255,oe>>8&255);return V.setColor(L,P,de),de}_getContrastCache(L){return L?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(L,U,F,P,I=!1){const G=typeof L=="number"?String.fromCharCode(L):L,ie=Math.min(this._config.deviceCellWidth*Math.max(G.length,2)+4,this._textureSize);this._tmpCanvas.width<ie&&(this._tmpCanvas.width=ie);const q=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<q&&(this._tmpCanvas.height=q),this._tmpCtx.save(),this._workAttributeData.fg=F,this._workAttributeData.bg=U,this._workAttributeData.extended.ext=P,this._workAttributeData.isInvisible())return f;const J=!!this._workAttributeData.isBold(),X=!!this._workAttributeData.isInverse(),V=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),K=!!this._workAttributeData.isUnderline(),W=!!this._workAttributeData.isStrikethrough(),oe=!!this._workAttributeData.isOverline();let de=this._workAttributeData.getFgColor(),xe=this._workAttributeData.getFgColorMode(),Se=this._workAttributeData.getBgColor(),se=this._workAttributeData.getBgColorMode();if(X){const Me=de;de=Se,Se=Me;const $e=xe;xe=se,se=$e}const Y=this._getBackgroundColor(se,Se,X,V);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=Y.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const pe=J?this._config.fontWeightBold:this._config.fontWeight,he=H?"italic":"";this._tmpCtx.font=`${he} ${pe} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=m.TEXT_BASELINE;const He=G.length===1&&(0,d.isPowerlineGlyph)(G.charCodeAt(0)),Oe=G.length===1&&(0,d.isRestrictedPowerlineGlyph)(G.charCodeAt(0)),et=this._getForegroundColor(U,se,Se,F,xe,de,X,V,J,(0,d.treatGlyphAsBackgroundColor)(G.charCodeAt(0)));this._tmpCtx.fillStyle=et.css;const ve=Oe?0:4;let Ke=!1;this._config.customGlyphs!==!1&&(Ke=(0,b.tryDrawCustomChar)(this._tmpCtx,G,ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let tt,Xe=!He;if(tt=typeof L=="number"?this._unicodeService.wcwidth(L):this._unicodeService.getStringCellWidth(L),K){this._tmpCtx.save();const Me=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),$e=Me%2==1?.5:0;if(this._tmpCtx.lineWidth=Me,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Xe=!1,this._tmpCtx.strokeStyle=`rgb(${o.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Xe=!1;let _e=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&_e<8&&(_e+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(_e).css}this._tmpCtx.beginPath();const at=ve,ct=Math.ceil(ve+this._config.deviceCharHeight)-$e-(I?2*Me:0),Te=ct+Me,we=ct+2*Me;let Je=this._workAttributeData.getUnderlineVariantOffset();for(let _e=0;_e<tt;_e++){this._tmpCtx.save();const Z=at+_e*this._config.deviceCellWidth,Pe=at+(_e+1)*this._config.deviceCellWidth,xt=Z+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Z,ct),this._tmpCtx.lineTo(Pe,ct),this._tmpCtx.moveTo(Z,we),this._tmpCtx.lineTo(Pe,we);break;case 3:const Ot=Me<=1?we:Math.ceil(ve+this._config.deviceCharHeight-Me/2)-$e,At=Me<=1?ct:Math.ceil(ve+this._config.deviceCharHeight+Me/2)-$e,Vt=new Path2D;Vt.rect(Z,ct,this._config.deviceCellWidth,we-ct),this._tmpCtx.clip(Vt),this._tmpCtx.moveTo(Z-this._config.deviceCellWidth/2,Te),this._tmpCtx.bezierCurveTo(Z-this._config.deviceCellWidth/2,At,Z,At,Z,Te),this._tmpCtx.bezierCurveTo(Z,Ot,xt,Ot,xt,Te),this._tmpCtx.bezierCurveTo(xt,At,Pe,At,Pe,Te),this._tmpCtx.bezierCurveTo(Pe,Ot,Pe+this._config.deviceCellWidth/2,Ot,Pe+this._config.deviceCellWidth/2,Te);break;case 4:const cn=Je===0?0:Je>=Me?2*Me-Je:Me-Je;Je>=Me||cn===0?(this._tmpCtx.setLineDash([Math.round(Me),Math.round(Me)]),this._tmpCtx.moveTo(Z+cn,ct),this._tmpCtx.lineTo(Pe,ct)):(this._tmpCtx.setLineDash([Math.round(Me),Math.round(Me)]),this._tmpCtx.moveTo(Z,ct),this._tmpCtx.lineTo(Z+cn,ct),this._tmpCtx.moveTo(Z+cn+Me,ct),this._tmpCtx.lineTo(Pe,ct)),Je=(0,d.computeNextVariantOffset)(Pe-Z,Me,Je);break;case 5:const _n=.6,Kt=.3,Ft=Pe-Z,Tn=Math.floor(_n*Ft),an=Math.floor(Kt*Ft),Un=Ft-Tn-an;this._tmpCtx.setLineDash([Tn,an,Un]),this._tmpCtx.moveTo(Z,ct),this._tmpCtx.lineTo(Pe,ct);break;default:this._tmpCtx.moveTo(Z,ct),this._tmpCtx.lineTo(Pe,ct)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Ke&&this._config.fontSize>=12&&!this._config.allowTransparency&&G!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const _e=this._tmpCtx.measureText(G);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in _e&&_e.actualBoundingBoxDescent>0){this._tmpCtx.save();const Z=new Path2D;Z.rect(at,ct-Math.ceil(Me/2),this._config.deviceCellWidth*tt,we-ct+Math.ceil(Me/2)),this._tmpCtx.clip(Z),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=Y.css,this._tmpCtx.strokeText(G,ve,ve+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(oe){const Me=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),$e=Me%2==1?.5:0;this._tmpCtx.lineWidth=Me,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+$e),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*tt,ve+$e),this._tmpCtx.stroke()}if(Ke||this._tmpCtx.fillText(G,ve,ve+this._config.deviceCharHeight),G==="_"&&!this._config.allowTransparency){let Me=S(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),Y,et,Xe);if(Me)for(let $e=1;$e<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=Y.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(G,ve,ve+this._config.deviceCharHeight-$e),Me=S(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),Y,et,Xe),Me);$e++);}if(W){const Me=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),$e=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=Me,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+Math.floor(this._config.deviceCharHeight/2)-$e),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*tt,ve+Math.floor(this._config.deviceCharHeight/2)-$e),this._tmpCtx.stroke()}this._tmpCtx.restore();const Bt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Tt;if(Tt=this._config.allowTransparency?function(Me){for(let $e=0;$e<Me.data.length;$e+=4)if(Me.data[$e+3]>0)return!1;return!0}(Bt):S(Bt,Y,et,Xe),Tt)return f;const le=this._findGlyphBoundingBox(Bt,this._workBoundingBox,ie,Oe,Ke,ve);let Re,ze;for(;;){if(this._activePages.length===0){const Me=this._createNewPage();Re=Me,ze=Me.currentRow,ze.height=le.size.y;break}Re=this._activePages[this._activePages.length-1],ze=Re.currentRow;for(const Me of this._activePages)le.size.y<=Me.currentRow.height&&(Re=Me,ze=Me.currentRow);for(let Me=this._activePages.length-1;Me>=0;Me--)for(const $e of this._activePages[Me].fixedRows)$e.height<=ze.height&&le.size.y<=$e.height&&(Re=this._activePages[Me],ze=$e);if(ze.y+le.size.y>=Re.canvas.height||ze.height>le.size.y+2){let Me=!1;if(Re.currentRow.y+Re.currentRow.height+le.size.y>=Re.canvas.height){let $e;for(const at of this._activePages)if(at.currentRow.y+at.currentRow.height+le.size.y<at.canvas.height){$e=at;break}if($e)Re=$e;else if(E.maxAtlasPages&&this._pages.length>=E.maxAtlasPages&&ze.y+le.size.y<=Re.canvas.height&&ze.height>=le.size.y&&ze.x+le.size.x<=Re.canvas.width)Me=!0;else{const at=this._createNewPage();Re=at,ze=at.currentRow,ze.height=le.size.y,Me=!0}}Me||(Re.currentRow.height>0&&Re.fixedRows.push(Re.currentRow),ze={x:0,y:Re.currentRow.y+Re.currentRow.height,height:le.size.y},Re.fixedRows.push(ze),Re.currentRow={x:0,y:ze.y+ze.height,height:0})}if(ze.x+le.size.x<=Re.canvas.width)break;ze===Re.currentRow?(ze.x=0,ze.y+=ze.height,ze.height=0):Re.fixedRows.splice(Re.fixedRows.indexOf(ze),1)}return le.texturePage=this._pages.indexOf(Re),le.texturePosition.x=ze.x,le.texturePosition.y=ze.y,le.texturePositionClipSpace.x=ze.x/Re.canvas.width,le.texturePositionClipSpace.y=ze.y/Re.canvas.height,le.sizeClipSpace.x/=Re.canvas.width,le.sizeClipSpace.y/=Re.canvas.height,ze.height=Math.max(ze.height,le.size.y),ze.x+=le.size.x,Re.ctx.putImageData(Bt,le.texturePosition.x-this._workBoundingBox.left,le.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,le.size.x,le.size.y),Re.addGlyph(le),Re.version++,le}_findGlyphBoundingBox(L,U,F,P,I,G){U.top=0;const ie=P?this._config.deviceCellHeight:this._tmpCanvas.height,q=P?this._config.deviceCellWidth:F;let J=!1;for(let X=0;X<ie;X++){for(let V=0;V<q;V++){const H=X*this._tmpCanvas.width*4+4*V+3;if(L.data[H]!==0){U.top=X,J=!0;break}}if(J)break}U.left=0,J=!1;for(let X=0;X<G+q;X++){for(let V=0;V<ie;V++){const H=V*this._tmpCanvas.width*4+4*X+3;if(L.data[H]!==0){U.left=X,J=!0;break}}if(J)break}U.right=q,J=!1;for(let X=G+q-1;X>=G;X--){for(let V=0;V<ie;V++){const H=V*this._tmpCanvas.width*4+4*X+3;if(L.data[H]!==0){U.right=X,J=!0;break}}if(J)break}U.bottom=ie,J=!1;for(let X=ie-1;X>=0;X--){for(let V=0;V<q;V++){const H=X*this._tmpCanvas.width*4+4*V+3;if(L.data[H]!==0){U.bottom=X,J=!0;break}}if(J)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:U.right-U.left+1,y:U.bottom-U.top+1},sizeClipSpace:{x:U.right-U.left+1,y:U.bottom-U.top+1},offset:{x:-U.left+G+(P||I?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-U.top+G+(P||I?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=E;class T{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(L){this._glyphs.push(L),this._usedPixels+=L.size.x*L.size.y}constructor(L,U,F){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],F)for(const P of F)this._glyphs.push(...P.glyphs),this._usedPixels+=P._usedPixels;this.canvas=k(L,U,U),this.ctx=(0,d.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function S(D,L,U,F){const P=L.rgba>>>24,I=L.rgba>>>16&255,G=L.rgba>>>8&255,ie=U.rgba>>>24,q=U.rgba>>>16&255,J=U.rgba>>>8&255,X=Math.floor((Math.abs(P-ie)+Math.abs(I-q)+Math.abs(G-J))/12);let V=!0;for(let H=0;H<D.data.length;H+=4)D.data[H]===P&&D.data[H+1]===I&&D.data[H+2]===G||F&&Math.abs(D.data[H]-P)+Math.abs(D.data[H+1]-I)+Math.abs(D.data[H+2]-G)<X?D.data[H+3]=0:V=!1;return V}function k(D,L,U){const F=D.createElement("canvas");return F.width=L,F.height=U,F}},160:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,m=0,b=0,d=0;var w,x,j,v,o;function p(_){const E=_.toString(16);return E.length<2?"0"+E:E}function f(_,E){return _<E?(E+.05)/(_+.05):(_+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(_){_.toCss=function(E,T,S,k){return k!==void 0?`#${p(E)}${p(T)}${p(S)}${p(k)}`:`#${p(E)}${p(T)}${p(S)}`},_.toRgba=function(E,T,S,k=255){return(E<<24|T<<16|S<<8|k)>>>0},_.toColor=function(E,T,S,k){return{css:_.toCss(E,T,S,k),rgba:_.toRgba(E,T,S,k)}}}(w||(a.channels=w={})),function(_){function E(T,S){return d=Math.round(255*S),[u,m,b]=o.toChannels(T.rgba),{css:w.toCss(u,m,b,d),rgba:w.toRgba(u,m,b,d)}}_.blend=function(T,S){if(d=(255&S.rgba)/255,d===1)return{css:S.css,rgba:S.rgba};const k=S.rgba>>24&255,D=S.rgba>>16&255,L=S.rgba>>8&255,U=T.rgba>>24&255,F=T.rgba>>16&255,P=T.rgba>>8&255;return u=U+Math.round((k-U)*d),m=F+Math.round((D-F)*d),b=P+Math.round((L-P)*d),{css:w.toCss(u,m,b),rgba:w.toRgba(u,m,b)}},_.isOpaque=function(T){return(255&T.rgba)==255},_.ensureContrastRatio=function(T,S,k){const D=o.ensureContrastRatio(T.rgba,S.rgba,k);if(D)return w.toColor(D>>24&255,D>>16&255,D>>8&255)},_.opaque=function(T){const S=(255|T.rgba)>>>0;return[u,m,b]=o.toChannels(S),{css:w.toCss(u,m,b),rgba:S}},_.opacity=E,_.multiplyOpacity=function(T,S){return d=255&T.rgba,E(T,d*S/255)},_.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(x||(a.color=x={})),function(_){let E,T;try{const S=document.createElement("canvas");S.width=1,S.height=1;const k=S.getContext("2d",{willReadFrequently:!0});k&&(E=k,E.globalCompositeOperation="copy",T=E.createLinearGradient(0,0,1,1))}catch{}_.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),m=parseInt(S.slice(2,3).repeat(2),16),b=parseInt(S.slice(3,4).repeat(2),16),w.toColor(u,m,b);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),m=parseInt(S.slice(2,3).repeat(2),16),b=parseInt(S.slice(3,4).repeat(2),16),d=parseInt(S.slice(4,5).repeat(2),16),w.toColor(u,m,b,d);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const k=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return u=parseInt(k[1]),m=parseInt(k[2]),b=parseInt(k[3]),d=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),w.toColor(u,m,b,d);if(!E||!T)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=T,E.fillStyle=S,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,m,b,d]=E.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:w.toRgba(u,m,b,d),css:S}}}(j||(a.css=j={})),function(_){function E(T,S,k){const D=T/255,L=S/255,U=k/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(U<=.03928?U/12.92:Math.pow((U+.055)/1.055,2.4))}_.relativeLuminance=function(T){return E(T>>16&255,T>>8&255,255&T)},_.relativeLuminance2=E}(v||(a.rgb=v={})),function(_){function E(S,k,D){const L=S>>24&255,U=S>>16&255,F=S>>8&255;let P=k>>24&255,I=k>>16&255,G=k>>8&255,ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));for(;ie<D&&(P>0||I>0||G>0);)P-=Math.max(0,Math.ceil(.1*P)),I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));return(P<<24|I<<16|G<<8|255)>>>0}function T(S,k,D){const L=S>>24&255,U=S>>16&255,F=S>>8&255;let P=k>>24&255,I=k>>16&255,G=k>>8&255,ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));for(;ie<D&&(P<255||I<255||G<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),I=Math.min(255,I+Math.ceil(.1*(255-I))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ie=f(v.relativeLuminance2(P,I,G),v.relativeLuminance2(L,U,F));return(P<<24|I<<16|G<<8|255)>>>0}_.blend=function(S,k){if(d=(255&k)/255,d===1)return k;const D=k>>24&255,L=k>>16&255,U=k>>8&255,F=S>>24&255,P=S>>16&255,I=S>>8&255;return u=F+Math.round((D-F)*d),m=P+Math.round((L-P)*d),b=I+Math.round((U-I)*d),w.toRgba(u,m,b)},_.ensureContrastRatio=function(S,k,D){const L=v.relativeLuminance(S>>8),U=v.relativeLuminance(k>>8);if(f(L,U)<D){if(U<L){const I=E(S,k,D),G=f(L,v.relativeLuminance(I>>8));if(G<D){const ie=T(S,k,D);return G>f(L,v.relativeLuminance(ie>>8))?I:ie}return I}const F=T(S,k,D),P=f(L,v.relativeLuminance(F>>8));if(P<D){const I=E(S,k,D);return P>f(L,v.relativeLuminance(I>>8))?F:I}return F}},_.reduceLuminance=E,_.increaseLuminance=T,_.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}}(o||(a.rgba=o={})),a.toPaddedHex=p,a.contrastRatio=f},345:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let m=0;m<this._listeners.length;m++)if(this._listeners[m]===u)return void this._listeners.splice(m,1)}}})),this._event}fire(u,m){const b=[];for(let d=0;d<this._listeners.length;d++)b.push(this._listeners[d]);for(let d=0;d<b.length;d++)b[d].call(void 0,u,m)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,m){return u(b=>m.fire(b))},a.runAndSubscribe=function(u,m){return m(void 0),u(b=>m(b))}},859:(y,a)=>{function u(m){for(const b of m)b.dispose();m.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const m of this._disposables)m.dispose();this._disposables.length=0}register(m){return this._disposables.push(m),m}unregister(m){const b=this._disposables.indexOf(m);b!==-1&&this._disposables.splice(b,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(m){var b;this._isDisposed||m===this._value||((b=this._value)==null||b.dispose(),this._value=m)}clear(){this.value=void 0}dispose(){var m;this._isDisposed=!0,(m=this._value)==null||m.dispose(),this._value=void 0}},a.toDisposable=function(m){return{dispose:m}},a.disposeArray=u,a.getDisposeArrayDisposable=function(m){return{dispose:()=>u(m)}}},485:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(b,d,w){this._data[b]||(this._data[b]={}),this._data[b][d]=w}get(b,d){return this._data[b]?this._data[b][d]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(m,b,d,w,x){this._data.get(m,b)||this._data.set(m,b,new u),this._data.get(m,b).set(d,w,x)}get(m,b,d,w){var x;return(x=this._data.get(m,b))==null?void 0:x.get(d,w)}clear(){this._data.clear()}}},399:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const u=a.isNode?"node":navigator.userAgent,m=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const b=u.match(/Version\/(\d+)/);return b===null||b.length<2?0:parseInt(b[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(m),a.isIpad=m==="iPad",a.isIphone=m==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(m),a.isLinux=m.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},385:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const m=u(399);class b{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 j=0,v=0,o=x.timeRemaining(),p=0;for(;this._i<this._tasks.length;){if(j=Date.now(),this._tasks[this._i]()||this._i++,j=Math.max(1,Date.now()-j),v=Math.max(j,v),p=x.timeRemaining(),1.5*v>p)return o-j<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-j))}ms`),void this._start();o=p}this.clear()}}class d extends b{_requestCallback(x){return setTimeout(()=>x(this._createDeadline(16)))}_cancelCallback(x){clearTimeout(x)}_createDeadline(x){const j=Date.now()+x;return{timeRemaining:()=>Math.max(0,j-Date.now())}}}a.PriorityTaskQueue=d,a.IdleTaskQueue=!m.isNode&&"requestIdleCallback"in window?class extends b{_requestCallback(w){return requestIdleCallback(w)}_cancelCallback(w){cancelIdleCallback(w)}}:d,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(w){this._queue.clear(),this._queue.enqueue(w)}flush(){this._queue.flush()}}},147:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new m}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class m{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,w=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=w}clone(){return new m(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=m},782:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const m=u(133),b=u(855),d=u(147);class w extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(j){const v=new w;return v.setFromCharData(j),v}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,m.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(j){this.fg=j[b.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(j[b.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(j[b.CHAR_DATA_CHAR_INDEX].length===2){const o=j[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const p=j[b.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=p&&p<=57343?this.content=1024*(o-55296)+p-56320+65536|j[b.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=j[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|j[b.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=j[b.CHAR_DATA_CHAR_INDEX],this.content=2097152|j[b.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=w},855:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,m=0,b=u.length){let d="";for(let w=m;w<b;++w){let x=u[w];x>65535?(x-=65536,d+=String.fromCharCode(55296+(x>>10))+String.fromCharCode(x%1024+56320)):d+=String.fromCharCode(x)}return d},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,m){const b=u.length;if(!b)return 0;let d=0,w=0;if(this._interim){const x=u.charCodeAt(w++);56320<=x&&x<=57343?m[d++]=1024*(this._interim-55296)+x-56320+65536:(m[d++]=this._interim,m[d++]=x),this._interim=0}for(let x=w;x<b;++x){const j=u.charCodeAt(x);if(55296<=j&&j<=56319){if(++x>=b)return this._interim=j,d;const v=u.charCodeAt(x);56320<=v&&v<=57343?m[d++]=1024*(j-55296)+v-56320+65536:(m[d++]=j,m[d++]=v)}else j!==65279&&(m[d++]=j)}return d}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,m){const b=u.length;if(!b)return 0;let d,w,x,j,v=0,o=0,p=0;if(this.interim[0]){let E=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;let S,k=0;for(;(S=63&this.interim[++k])&&k<4;)T<<=6,T|=S;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=D-k;for(;p<L;){if(p>=b)return 0;if(S=u[p++],(192&S)!=128){p--,E=!0;break}this.interim[k++]=S,T<<=6,T|=63&S}E||(D===2?T<128?p--:m[v++]=T:D===3?T<2048||T>=55296&&T<=57343||T===65279||(m[v++]=T):T<65536||T>1114111||(m[v++]=T)),this.interim.fill(0)}const f=b-4;let _=p;for(;_<b;){for(;!(!(_<f)||128&(d=u[_])||128&(w=u[_+1])||128&(x=u[_+2])||128&(j=u[_+3]));)m[v++]=d,m[v++]=w,m[v++]=x,m[v++]=j,_+=4;if(d=u[_++],d<128)m[v++]=d;else if((224&d)==192){if(_>=b)return this.interim[0]=d,v;if(w=u[_++],(192&w)!=128){_--;continue}if(o=(31&d)<<6|63&w,o<128){_--;continue}m[v++]=o}else if((240&d)==224){if(_>=b)return this.interim[0]=d,v;if(w=u[_++],(192&w)!=128){_--;continue}if(_>=b)return this.interim[0]=d,this.interim[1]=w,v;if(x=u[_++],(192&x)!=128){_--;continue}if(o=(15&d)<<12|(63&w)<<6|63&x,o<2048||o>=55296&&o<=57343||o===65279)continue;m[v++]=o}else if((248&d)==240){if(_>=b)return this.interim[0]=d,v;if(w=u[_++],(192&w)!=128){_--;continue}if(_>=b)return this.interim[0]=d,this.interim[1]=w,v;if(x=u[_++],(192&x)!=128){_--;continue}if(_>=b)return this.interim[0]=d,this.interim[1]=w,this.interim[2]=x,v;if(j=u[_++],(192&j)!=128){_--;continue}if(o=(7&d)<<18|(63&w)<<12|(63&x)<<6|63&j,o<65536||o>1114111)continue;m[v++]=o}}return v}}},776:function(y,a,u){var m=this&&this.__decorate||function(o,p,f,_){var E,T=arguments.length,S=T<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,f):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(o,p,f,_);else for(var k=o.length-1;k>=0;k--)(E=o[k])&&(S=(T<3?E(S):T>3?E(p,f,S):E(p,f))||S);return T>3&&S&&Object.defineProperty(p,f,S),S},b=this&&this.__param||function(o,p){return function(f,_){p(f,_,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const d=u(859),w=u(97),x={trace:w.LogLevelEnum.TRACE,debug:w.LogLevelEnum.DEBUG,info:w.LogLevelEnum.INFO,warn:w.LogLevelEnum.WARN,error:w.LogLevelEnum.ERROR,off:w.LogLevelEnum.OFF};let j,v=a.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=w.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),j=this}_updateLogLevel(){this._logLevel=x[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let p=0;p<o.length;p++)typeof o[p]=="function"&&(o[p]=o[p]())}_log(o,p,f){this._evalLazyOptionalParams(f),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+p,...f)}trace(o,...p){var f;this._logLevel<=w.LogLevelEnum.TRACE&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.trace.bind(this._optionsService.options.logger))??console.log,o,p)}debug(o,...p){var f;this._logLevel<=w.LogLevelEnum.DEBUG&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.debug.bind(this._optionsService.options.logger))??console.log,o,p)}info(o,...p){var f;this._logLevel<=w.LogLevelEnum.INFO&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.info.bind(this._optionsService.options.logger))??console.info,o,p)}warn(o,...p){var f;this._logLevel<=w.LogLevelEnum.WARN&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.warn.bind(this._optionsService.options.logger))??console.warn,o,p)}error(o,...p){var f;this._logLevel<=w.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,o,p)}};a.LogService=v=m([b(0,w.IOptionsService)],v),a.setTraceLogger=function(o){j=o},a.traceCall=function(o,p,f){if(typeof f.value!="function")throw new Error("not supported");const _=f.value;f.value=function(...E){if(j.logLevel!==w.LogLevelEnum.TRACE)return _.apply(this,E);j.trace(`GlyphRenderer#${_.name}(${E.map(S=>JSON.stringify(S)).join(", ")})`);const T=_.apply(this,E);return j.trace(`GlyphRenderer#${_.name} return`,T),T}}},726:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",m="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(b){return b[m]||[]},a.createDecorator=function(b){if(a.serviceRegistry.has(b))return a.serviceRegistry.get(b);const d=function(w,x,j){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,o,p){o[u]===o?o[m].push({id:v,index:p}):(o[m]=[{id:v,index:p}],o[u]=o)})(d,w,j)};return d.toString=()=>b,a.serviceRegistry.set(b,d),d}},97:(y,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const m=u(726);var b;a.IBufferService=(0,m.createDecorator)("BufferService"),a.ICoreMouseService=(0,m.createDecorator)("CoreMouseService"),a.ICoreService=(0,m.createDecorator)("CoreService"),a.ICharsetService=(0,m.createDecorator)("CharsetService"),a.IInstantiationService=(0,m.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(b||(a.LogLevelEnum=b={})),a.ILogService=(0,m.createDecorator)("LogService"),a.IOptionsService=(0,m.createDecorator)("OptionsService"),a.IOscLinkService=(0,m.createDecorator)("OscLinkService"),a.IUnicodeService=(0,m.createDecorator)("UnicodeService"),a.IDecorationService=(0,m.createDecorator)("DecorationService")}},g={};function N(y){var a=g[y];if(a!==void 0)return a.exports;var u=g[y]={exports:{}};return l[y].call(u.exports,u,u.exports,N),u.exports}var R={};return(()=>{var y=R;Object.defineProperty(y,"__esModule",{value:!0}),y.WebglAddon=void 0;const a=N(345),u=N(859),m=N(399),b=N(666),d=N(776);class w extends u.Disposable{constructor(j){if(m.isSafari&&(0,m.getSafariVersion)()<16){const v={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",v))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=j,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(j){const v=j._core;if(!j.element)return void this.register(v.onWillOpen(()=>this.activate(j)));this._terminal=j;const o=v.coreService,p=v.optionsService,f=v,_=f._renderService,E=f._characterJoinerService,T=f._charSizeService,S=f._coreBrowserService,k=f._decorationService,D=f._logService,L=f._themeService;(0,d.setTraceLogger)(D),this._renderer=this.register(new b.WebglRenderer(j,E,T,S,o,k,p,L,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),_.setRenderer(this._renderer),this.register((0,u.toDisposable)(()=>{const U=this._terminal._core._renderService;U.setRenderer(this._terminal._core._createRenderer()),U.handleResize(j.cols,j.rows)}))}get textureAtlas(){var j;return(j=this._renderer)==null?void 0:j.textureAtlas}clearTextureAtlas(){var j;(j=this._renderer)==null||j.clearTextureAtlas()}}y.WebglAddon=w})(),R})())})(hE);var xO=hE.exports;const NO=[{family:"JetBrainsMono Nerd Font",url:"/fonts/JetBrainsMonoNerdFontMono-Regular.woff2",probe:void 0},{family:"TW Unifont",url:"/fonts/TWUnifont.woff2",probe:"⏵",unicodeRange:"U+2190-21FF, U+2300-23FF, U+2400-243F, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+2800-28FF"}],SO=4,CO=1500,EO=i=>{for(const r of document.fonts)if(r.family.replace(/["']/g,"")===i)return r;return null},jO=async({family:i,url:r,probe:l,unicodeRange:g},N)=>{var R;for(let y=0;y<SO;y++){try{await document.fonts.load(`${N}px "${i}"`,l)}catch{}if(((R=EO(i))==null?void 0:R.status)==="loaded")return!0;try{const a=new FontFace(i,`url(${r}) format('woff2')`,g?{unicodeRange:g}:{});return await a.load(),document.fonts.add(a),!0}catch{}await new Promise(a=>setTimeout(a,CO*2**y))}return!1};let ib=null;function DO(i=14){var r;return ib||(ib=typeof document<"u"&&((r=document.fonts)!=null&&r.load)?Promise.all(NO.map(l=>jO(l,i))):Promise.resolve([!1,!1])),ib}const kO=["input","textarea","select",'[role="textbox"]','[contenteditable]:not([contenteditable="false"])'].join(",");function cy(i){return i.key==="F5"||i.key==="F12"}function RO(i){return i.key==="Enter"&&i.shiftKey&&!i.ctrlKey&&!i.altKey&&!i.metaKey&&!i.isComposing}function TO(i){if(i.defaultPrevented||i.isComposing||cy(i))return!1;const r=i.target;return r instanceof Element?r.closest(".xterm-helper-textarea")?!1:!r.closest(kO):!0}const LO="ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, 'Cascadia Mono', 'Roboto Mono', 'Noto Sans Mono', 'DejaVu Sans Mono', 'Courier New', 'JetBrainsMono Nerd Font', 'TW Unifont', monospace",AO={selectionBackground:"rgba(10,132,255,0.9)",selectionForeground:"#ffffff"};function MO(i,r){const l=r==null?void 0:r.querySelector(".xterm-helper-textarea");l&&(l.readOnly=!0,l.tabIndex=-1,l.setAttribute("inputmode","none"),l.setAttribute("aria-hidden","true"));const g=document.activeElement;i.focus(),i.blur(),g&&g!==document.body&&typeof g.focus=="function"&&g.focus()}function UO(i,r,l,g){const N=r==null?void 0:r.querySelector(".xterm-helper-textarea");if(!l){MO(i,r);return}N&&(N.readOnly=!1,N.tabIndex=0,N.removeAttribute("inputmode"),N.removeAttribute("aria-hidden")),g&&i.focus()}function OO(){var r;const i=((r=navigator.userAgentData)==null?void 0:r.platform)||navigator.platform||"";return/mac|iphone|ipad|ipod/i.test(i)}function PO(i,r="keydown"){var N,R,y,a;const l=((N=i.view)==null?void 0:N.KeyboardEvent)||((a=(y=(R=i.target)==null?void 0:R.ownerDocument)==null?void 0:y.defaultView)==null?void 0:a.KeyboardEvent)||window.KeyboardEvent,g=new l(r,{key:i.key,code:i.code,location:i.location,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,altKey:i.altKey,metaKey:i.metaKey,repeat:i.repeat,bubbles:!0,cancelable:!0,composed:!0});for(const u of["keyCode","which","charCode"])if(i[u]!=null)try{Object.defineProperty(g,u,{value:i[u]})}catch{}return g}function VO(i,r,l){if(!r||cy(l))return!1;i.focus();const g=PO(l);return r.dispatchEvent(g)?!l.ctrlKey&&!l.metaKey&&l.key&&Array.from(l.key).length===1?(i.input(l.key,!0),!0):!1:!0}function IO({host:i,desktop:r,autoFocusInput:l,fontSize:g,scrollback:N,pane:R,onInputData:y,onInputFocusChange:a,onRequestDraft:u,onDesktopSelection:m,getDocLinkHandler:b}){var S;const d=new lE.Terminal({disableStdin:!r,allowProposedApi:!0,scrollback:N,convertEol:!1,fontSize:g,fontFamily:LO,theme:AO,cursorInactiveStyle:"block",linkHandler:{activate:(k,D)=>{const L=eE(D)[0],U=b==null?void 0:b();if(L&&U){U({kind:"url",protocol:L.protocol,port:L.port,urlPath:L.path,raw:L.raw,path:L.raw},(k==null?void 0:k.clientX)??0,(k==null?void 0:k.clientY)??0);return}try{window.open(D,"_blank","noopener,noreferrer")}catch{}}}});d.open(i),d.attachCustomKeyEventHandler(k=>{var I,G,ie,q,J,X,V;if(cy(k)||r&&((I=k.key)==null?void 0:I.toLowerCase())==="v"&&!k.altKey&&(OO()?k.metaKey&&!k.ctrlKey:k.ctrlKey&&!k.metaKey))return!1;const U=r&&((G=k.key)==null?void 0:G.toLowerCase())==="c"&&((ie=d.hasSelection)==null?void 0:ie.call(d)),F=U&&k.metaKey&&!k.ctrlKey&&!k.altKey,P=U&&k.ctrlKey&&k.shiftKey&&!k.metaKey&&!k.altKey;if(F||P){if(P){(q=k.preventDefault)==null||q.call(k);const H=d.getSelection(),K=()=>{try{document.execCommand("copy")}catch{}};try{const W=(X=(J=navigator.clipboard)==null?void 0:J.writeText)==null?void 0:X.call(J,H);W?Promise.resolve(W).catch(K):K()}catch{K()}}return!1}return r&&k.key==="Enter"&&k.shiftKey&&!k.ctrlKey&&!k.altKey&&!k.metaKey&&!k.isComposing?((V=k.preventDefault)==null||V.call(k),u==null||u(),!1):!(k.metaKey&&["w","t","l","r"].includes(k.key.toLowerCase()))});const w=r?d.onData(k=>y==null?void 0:y(R,k)):null,x=r?(S=d.onBinary)==null?void 0:S.call(d,k=>{const D=Uint8Array.from(k,L=>L.charCodeAt(0)&255);y==null||y(R,D)}):null,j=r?d.onSelectionChange(()=>m==null?void 0:m(d.hasSelection())):null,v=r?i.querySelector(".xterm-helper-textarea"):null,o=()=>a==null?void 0:a(!0),p=()=>a==null?void 0:a(!1);v==null||v.addEventListener("focus",o),v==null||v.addEventListener("blur",p),UO(d,i,r,l);const f=d.registerLinkProvider({provideLinks(k,D){const L=b==null?void 0:b();if(!L){D(void 0);return}const U=X2(d,k).map(F=>({range:F.range,text:F.raw??F.path,decorations:{pointerCursor:!0,underline:!1},activate:P=>L(F,(P==null?void 0:P.clientX)??0,(P==null?void 0:P.clientY)??0)}));D(U.length?U:void 0)}});let _=!1,E=null;const T=()=>{try{const k=new xO.WebglAddon;k.onContextLoss(()=>k.dispose()),d.loadAddon(k),E=k}catch{E=null}};return T(),DO(g).then(()=>{if(!(_||!E)){try{E.dispose()}catch{}T(),d.refresh(0,d.rows-1)}}),{term:d,forwardPageKey:k=>VO(d,v,k),dispose(){_=!0,w==null||w.dispose(),x==null||x.dispose(),j==null||j.dispose(),v==null||v.removeEventListener("focus",o),v==null||v.removeEventListener("blur",p),f.dispose();try{E==null||E.dispose()}catch{}d.dispose()}}}function BO({term:i,host:r,screenHost:l=r,desktop:g,activeRef:N,actionsRef:R,setUI:y,setInfo:a}){const u=()=>i.buffer.active,m=r.parentElement,b=l.querySelector(".xterm-viewport");let d=null,w=null,x=null,j=null,v=null,o=0,p=0;const f=(X,V)=>{const H=l.querySelector(".xterm-screen");if(!H||!i.cols||!i.rows)return null;const K=H.getBoundingClientRect(),W=K.width/i.cols,oe=K.height/i.rows;return!W||!oe?null:{col:Math.max(0,Math.min(i.cols-1,Math.floor((X-K.left)/W))),row:u().viewportY+Math.max(0,Math.min(i.rows-1,Math.floor((V-K.top)/oe)))}},_=()=>{var K;const X=(K=i.getSelectionPosition)==null?void 0:K.call(i);if(!X)return null;let V=X.end.x-1,H=X.end.y;return V<0&&(H-=1,V=i.cols-1),{start:{col:X.start.x,row:X.start.y},end:{col:V,row:H}}},E=()=>{const X=_(),V=l.querySelector(".xterm-screen");if(!X||!V){y(null),a("");return}const H=V.getBoundingClientRect(),K=m.getBoundingClientRect(),W=H.width/i.cols,oe=H.height/i.rows,de=u().viewportY,xe={x:H.left-K.left,y:H.top-K.top},Se=eS(X.start.col,X.start.row,de,W,oe),se=eS(X.end.col+1,X.end.row,de,W,oe);y({start:{x:Se.x+xe.x,y:Se.y+xe.y,ch:oe},end:{x:se.x+xe.x,y:se.y+xe.y,ch:oe},wrapW:K.width});const Y=i.getSelection();if(!Y){a("");return}const{lines:pe,chars:he}=tO(Y);a(`复制模式 · ${pe} 行 · ${he} 字`)},T=X=>{var V;return((V=u().getLine(X))==null?void 0:V.translateToString(!0))??""},S=X=>{if(!X)return;const V=X.end.row*i.cols+X.end.col-(X.start.row*i.cols+X.start.col)+1;i.select(X.start.col,X.start.row,V),E()};R.current={currentRange:_,paraLineText:T,selectRange:S};const k=(X,V)=>{var de,xe;const H=f(X,V);if(!H)return;const K=((de=u().getLine(H.row))==null?void 0:de.translateToString(!1))??"";let W=H.col,oe=H.col;if(/\S/.test(K[H.col]||"")){for(;W>0&&/\S/.test(K[W-1]);)W-=1;for(;oe<i.cols-1&&/\S/.test(K[oe+1]);)oe+=1}d={col:W,row:H.row},N.current=!0,y(null),i.select(W,H.row,oe-W+1),E(),(xe=navigator.vibrate)==null||xe.call(navigator,12)},D=(X,V)=>{var H,K;return((K=(H=u().getLine(Math.floor(X/V)))==null?void 0:H.getCell(X%V))==null?void 0:K.getWidth())??1},L=(X,V)=>X>0&&D(X,V)===0?X-1:X,U=(X,V)=>D(X,V)===2?X+1:X,F=(X,V)=>{const H=f(X,V);if(!H||!d)return;const K=d.row*i.cols+d.col,W=H.row*i.cols+H.col,oe=L(Math.min(K,W),i.cols),de=U(Math.max(K,W),i.cols);i.select(oe%i.cols,Math.floor(oe/i.cols),de-oe+1),E()},P=()=>{d=null,N.current=!1,y(null),a(""),i.clearSelection()},I=(X,V)=>{const H=f(X,V);if(!H||x==null)return;const K=H.row*i.cols+H.col,W=w==="start"?K:K+1;let oe=Math.min(x,W),de=Math.max(x,W);de<=oe&&(de=oe+1),oe=L(oe,i.cols),de=U(de-1,i.cols)+1,i.select(oe%i.cols,Math.floor(oe/i.cols),de-oe),E()},G=X=>{var K,W,oe;const V=(W=(K=X.target).closest)==null?void 0:W.call(K,".sel-handle");if(!V)return;w=V.dataset.end;const H=_();if(H){const de=H.start.row*i.cols+H.start.col,xe=H.end.row*i.cols+H.end.col;x=w==="start"?xe+1:de}else x=null;X.preventDefault(),X.stopPropagation(),(oe=m.setPointerCapture)==null||oe.call(m,X.pointerId)},ie=X=>{if(!w||x==null||!b)return;I(X.clientX,X.clientY);const V=28;v={x:X.clientX,y:X.clientY};const H=b.getBoundingClientRect();let K=0;if(X.clientY<H.top+V?(o=-1,K=H.top+V-X.clientY):X.clientY>H.bottom-V?(o=1,K=X.clientY-(H.bottom-V)):o=0,p=Math.min(14,2+K*.28),o!==0&&j==null){const W=()=>{if(!w||o===0){j=null;return}const oe=b.scrollTop;if(b.scrollTop=oe+o*p,I(v.x,v.y),b.scrollTop===oe){j=null;return}j=requestAnimationFrame(W)};j=requestAnimationFrame(W)}else o===0&&j!=null&&(cancelAnimationFrame(j),j=null);X.preventDefault()},q=X=>{var V;w&&(w=null,x=null,o=0,j!=null&&(cancelAnimationFrame(j),j=null),(V=m.releasePointerCapture)==null||V.call(m,X.pointerId))},J=()=>{!g&&N.current&&E()};return m.addEventListener("pointerdown",G,{capture:!0}),m.addEventListener("pointermove",ie,{capture:!0}),m.addEventListener("pointerup",q,{capture:!0}),m.addEventListener("pointercancel",q,{capture:!0}),b==null||b.addEventListener("scroll",J,{passive:!0}),{start:k,extend:F,clear:P,refresh:E,dispose(){j!=null&&cancelAnimationFrame(j),m.removeEventListener("pointerdown",G,{capture:!0}),m.removeEventListener("pointermove",ie,{capture:!0}),m.removeEventListener("pointerup",q,{capture:!0}),m.removeEventListener("pointercancel",q,{capture:!0}),b==null||b.removeEventListener("scroll",J),R.current=null}}}function tS(i,r){let l=0,g=i;for(;Math.abs(g)>=r;)g>0?(l+=1,g-=r):(l-=1,g+=r);return{notches:l,rem:g}}const FO=i=>i>0?"up":"down",HO=.95,zO=.015,$O=.1,WO=50;function GO(i,r,l=HO,g=zO){const N=i*r,R=i*l**(r/16);return{delta:N,v:R,done:Math.abs(R)<g}}function YO(i,r,l=$O,g=WO){return r<=g&&Math.abs(i)>=l}const of=22,qO=12;function KO({term:i,host:r,desktop:l,pane:g,fontRef:N,selection:R,selectionActiveRef:y,stopFlingRef:a,getStreamExact:u,getAltScreen:m,getMouseAware:b,onActivity:d,onUserScroll:w,showScrollPosition:x,maybePullMore:j,enterStreamHistory:v,scheduleFit:o,wake:p,onTap:f,onKeepKeyboard:_}){const E=()=>i.buffer.active;let T=0,S=0,k=0,D=0,L=!1,U=0,F=0,P=!1,I=!1,G=null,ie=0,q=0,J=0,X=0,V=0,H=!1,K=!1,W=null,oe=0,de=0,xe=0,Se=!1,se=!1,Y=null;const pe=()=>r.querySelector(".terminal__live .xterm-viewport")||r.querySelector(".xterm-viewport"),he=()=>{G&&(clearTimeout(G),G=null)},He=le=>Math.hypot(le[0].clientX-le[1].clientX,le[0].clientY-le[1].clientY),Oe=()=>{W!=null&&(cancelAnimationFrame(W),W=null)};a.current=Oe;const et=(le,Re,ze)=>{if(!le)return;let Me=ze,$e=null;const at=ct=>{if($e==null){$e=ct,W=requestAnimationFrame(at);return}const Te=GO(Me,ct-$e);$e=ct,Me=Te.v;const we=le[Re];le[Re]=we+Te.delta;const Je=Math.abs(Te.delta)>=1&&le[Re]===we;if(Re==="scrollTop"&&(x(),j()),Te.done||Je||W==null){W=null;return}W=requestAnimationFrame(at)};W=requestAnimationFrame(at)},ve=async()=>{if(Se||xe===0)return;Se=!0;const le=FO(xe),Re=Math.min(Math.abs(xe),40);xe=0;try{b()?await zU(g,le,Re):await Od(g,Array(Re).fill(le==="up"?"Up":"Down")),p()}catch{}finally{Se=!1,xe!==0&&ve()}},Ke=le=>{if(d(),he(),Oe(),H=le.touches.length>0,K=!1,I=y.current,P=!1,le.touches.length===2){L=!0,D=-1,U=He(le.touches),F=i.options.fontSize||14;return}if(L=!1,le.touches.length!==1){D=-1;return}const Re=r.querySelector(".terminal__live");u()&&!m()&&Re&&le.touches[0].clientY<Re.getBoundingClientRect().top&&(v==null||v(0)),T=le.touches[0].clientX,S=le.touches[0].clientY,k=r.scrollLeft,D=0,ie=T,q=S,J=le.timeStamp,X=0,V=0,de=S,oe=0,G=setTimeout(()=>{G=null,P=!0,D=-1,R.start(T,S)},500)},tt=le=>{if(L&&le.touches.length===2){if(U>0){const ct=Math.max(8,Math.min(40,Math.round(F*(He(le.touches)/U))));ct!==(i.options.fontSize||14)&&(i.options.fontSize=ct,N.current=ct)}le.preventDefault(),le.stopPropagation();return}if(P&&le.touches.length===1){R.extend(le.touches[0].clientX,le.touches[0].clientY),le.preventDefault(),le.stopPropagation();return}if(le.touches.length!==1)return;const Re=le.touches[0].clientX-T,ze=le.touches[0].clientY-S;if((Math.abs(Re)>6||Math.abs(ze)>6)&&he(),D===0){if(Math.abs(Re)<6&&Math.abs(ze)<6)return;D=Math.abs(Re)>Math.abs(ze)?1:-1}if(D===1){r.scrollLeft=k-Re;const ct=le.touches[0].clientX,Te=le.timeStamp-J;Te>0&&(X=(ie-ct)/Te),ie=ct,J=le.timeStamp,le.preventDefault(),le.stopPropagation();return}if(K){le.preventDefault(),le.stopPropagation();return}if(x(),j(),K){V=0,le.preventDefault(),le.stopPropagation();return}const Me=le.touches[0].clientY,$e=Me-de;if(de=Me,u()){le.preventDefault(),le.stopPropagation();const ct=r.scrollTop;if(r.scrollTop-=$e,r.scrollTop!==ct){w();return}if(!m()){$e>0&&(v==null||v($e));return}}if(m()){le.preventDefault(),le.stopPropagation();const ct=pe(),Te=$e>0?-1:1;if(ct&&rE(E().viewportY,E().baseY,Te)==="internal"){ct.scrollTop-=$e,w();return}const we=tS(oe+$e,qO);oe=we.rem,we.notches&&(xe+=we.notches,ve());return}const at=le.timeStamp-J;at>0&&(V=(q-Me)/at),q=Me,J=le.timeStamp},Xe=le=>{he();const Re=le.touches.length===0;if(Re&&(H=!1),P&&le.touches.length===0){P=!1;const ze=i.getSelection();ze&&ze.trim()?R.refresh():R.clear(),K=!1;return}if(L&&le.touches.length<2){L=!1,_d(i.options.fontSize||14),o(),Re&&(K=!1);return}Re&&!K&&YO(D===1?X:V,le.timeStamp-J)&&(D===1?et(r,"scrollLeft",X):D===-1&&et(u()?r:pe(),"scrollTop",V)),le.touches.length===0&&!P&&!L&&D===0&&(I?R.clear():f()),Re&&(K=!1)},Bt=le=>{if(Math.abs(le.deltaX)>Math.abs(le.deltaY)&&r.scrollWidth>r.clientWidth){const Re=le.deltaMode===1?le.deltaX*of:le.deltaMode===2?le.deltaX*r.clientWidth:le.deltaX;r.scrollLeft+=Re,le.preventDefault(),le.stopPropagation();return}if(le.deltaY){if(u()){const Re=r.scrollTop;if(r.scrollTop+=le.deltaY,r.scrollTop!==Re){le.preventDefault(),le.stopPropagation(),w();return}if(!m()&&le.deltaY<0&&(v!=null&&v(-le.deltaY))){le.preventDefault(),le.stopPropagation();return}if(!m()){le.preventDefault(),le.stopPropagation();return}}if(m()){le.preventDefault(),le.stopPropagation();const Re=le.deltaMode===1?le.deltaY*of:le.deltaMode===2?le.deltaY*i.rows*of:le.deltaY,ze=tS(oe-Re,of);oe=ze.rem,ze.notches&&(xe+=ze.notches,ve());return}if(se){le.preventDefault(),le.stopPropagation();return}x(),j()}},Tt=le=>{if(l){const ze=r.querySelector(".terminal__live");u()&&!m()&&ze&&le.clientY<ze.getBoundingClientRect().top&&(v==null||v(0)),f();return}(uE(document.activeElement)||(_==null?void 0:_()))&&le.cancelable&&le.preventDefault()};return r.addEventListener("pointerdown",Tt,{capture:!0}),r.addEventListener("wheel",Bt,{capture:!0,passive:!1}),r.addEventListener("touchstart",Ke,{capture:!0,passive:!0}),r.addEventListener("touchmove",tt,{capture:!0,passive:!1}),r.addEventListener("touchend",Xe,{capture:!0,passive:!0}),{freezeHistoryGesture(){H&&D===-1&&(K=!0,V=0),Oe()},settleHistoryAnchor(le){se=!0,Y!=null&&cancelAnimationFrame(Y),i.scrollToLine(le),Y=requestAnimationFrame(()=>{i.scrollToLine(le),Y=requestAnimationFrame(()=>{Y=null,se=!1})})},dispose(){he(),Oe(),Y!=null&&cancelAnimationFrame(Y),r.removeEventListener("pointerdown",Tt,{capture:!0}),r.removeEventListener("wheel",Bt,{capture:!0}),r.removeEventListener("touchstart",Ke,{capture:!0}),r.removeEventListener("touchmove",tt,{capture:!0}),r.removeEventListener("touchend",Xe,{capture:!0})}}}const XO=15e3,JO=3e4,nS={connecting:-1,good:0,degraded:1,poor:2};function ZO({ok:i,rttMs:r}){return i?Number.isFinite(r)?r>1e3?"poor":r>=300?"degraded":"good":"connecting":"poor"}function QO({mode:i,onChange:r,now:l=()=>Date.now()}){let g=!1,N=null,R=0,y={mode:i,quality:"connecting",stableQuality:"connecting",rttMs:null,recoveryAt:null};const a=()=>{g||r==null||r({...y})},u=(m,b=!1)=>{if(m==="connecting"){y.stableQuality==="connecting"&&a();return}if(m===y.stableQuality){N=null,R=0,y={...y,recoveryAt:null},a();return}if(y.stableQuality==="connecting"&&m==="poor"&&!b){N="poor",R=l(),y={...y,stableQuality:"degraded",recoveryAt:null},a();return}if(y.stableQuality==="connecting"||b){N=null,R=0,y={...y,stableQuality:m,recoveryAt:null},a();return}const d=nS[m]>nS[y.stableQuality]?XO:JO;if(N!==m){N=m,R=l(),y={...y,recoveryAt:m==="good"?R+d:null},a();return}l()-R>=d&&(N=null,R=0,y={...y,stableQuality:m,recoveryAt:null}),a()};return a(),{sample({ok:m,rttMs:b}){if(g)return;const d=ZO({ok:m,rttMs:b});y={...y,quality:d,rttMs:Number.isFinite(b)?Math.max(0,Math.round(b)):null},u(d)},status(m){g||(m==="reconnecting"||m==="error"?u("degraded",!0):m==="connecting"&&y.rttMs==null&&(y={...y,quality:"connecting"},a()))},setMode(m,{fallback:b=!1}={}){g||y.mode===m||(y={...y,mode:m},b&&(y={...y,stableQuality:"degraded",recoveryAt:null}),a())},getSnapshot(){return{...y}},peek(){return{...y}},destroy(){g=!0}}}const e4=20,rb=100,md=5e3,t4=15,iS=1e4,n4=A.forwardRef(function({pane:r,stream:l=!1,snapshotIntervalMs:g=1e3,inset:N=0,desktop:R=!1,autoFocusInput:y=!0,onAuthFail:a,onDocLinkTap:u,onTap:m,onKeepKeyboard:b,onRequestDraft:d,onInputFocusChange:w,onInputData:x},j){const v=A.useRef(null),o=A.useRef(null),p=A.useRef(null),f=A.useRef(0),_=A.useRef(!1),E=A.useRef(!1),T=A.useRef(""),S=A.useRef(m);S.current=m;const k=A.useRef(b);k.current=b;const D=A.useRef(d);D.current=d;const L=A.useRef(a);L.current=a;const U=A.useRef(w);U.current=w;const F=A.useRef(x);F.current=x;const P=A.useRef(g);P.current=g;const I=A.useRef([]),G=A.useRef(null),ie=A.useRef(null),q=A.useRef(!1),J=A.useRef(null),X=A.useRef(u);X.current=u;const V=A.useRef(SC()),H=A.useRef(null),K=A.useRef(oU()),W=A.useRef(null),[oe,de]=A.useState(!1),[xe,Se]=A.useState(!0),[se,Y]=A.useState(l?"connecting":"off"),[pe,he]=A.useState({mode:l?"live":"snapshot",quality:"connecting",stableQuality:"connecting",rttMs:null,recoveryAt:null}),[He,Oe]=A.useState(null),[et,ve]=A.useState(!1),[Ke,tt]=A.useState(()=>Date.now()),[Xe,Bt]=A.useState(null),Tt=A.useRef(!1),[le,Re]=A.useState(""),[ze,Me]=A.useState(null),$e=A.useRef(!1),at=A.useRef(!1),[ct,Te]=A.useState(!1),[we,Je]=A.useState(!1),{dbg:_e,dbgVisible:Z,flash:Pe}=rO(o),[xt,Ot]=A.useState(""),[At,Vt]=A.useState(!1),[cn,_n]=A.useState(!1),[Kt,Ft]=A.useState(null),Tn=Kt!=null,an=A.useRef(null),Un=A.useRef(null),Ht=A.useRef(!1),Qn=A.useRef(!1),En=A.useRef(!1),yi=A.useRef(0),Zt=A.useRef(null),oi=A.useRef(null),ci=A.useRef(!1),rn=A.useRef(null);A.useImperativeHandle(j,()=>({getSize:()=>{const ge=o.current;return ge?{cols:ge.cols,rows:ge.rows}:null},flash:Pe,getFontSize:()=>{const ge=o.current;return ge?{size:ge.options.fontSize,auto:K.current==null}:null},setFontSize:ge=>{var Le;const qe=o.current;if(!qe)return null;const it=Math.max(8,Math.min(40,Math.round(ge)));return qe.options.fontSize=it,K.current=it,_d(it),(Le=an.current)==null||Le.call(an),it},autoFont:()=>{var qe;const ge=o.current;ge&&(ge.options.fontSize=14,K.current=null,lU(),(qe=an.current)==null||qe.call(an))},wake:()=>{var ge;return(ge=Zt.current)==null?void 0:ge.call(Zt)},inputFailed:ge=>{Bt((ge==null?void 0:ge.serverError)==="pane not found"?"pane-missing":"disconnected"),Se(!1)},focusInput:()=>{var ge;return(ge=o.current)==null?void 0:ge.focus()},blurInput:()=>{var ge;return(ge=o.current)==null?void 0:ge.blur()},forwardPageKey:ge=>{var qe;return((qe=p.current)==null?void 0:qe.call(p,ge))??!1},setDocHighlight:ge=>{var qe;V.current=!!ge,(qe=H.current)==null||qe.call(H)}}),[]),A.useEffect(()=>{var qe,it;const ge=f.current;f.current=N,N>0&&ge===0&&(E.current=!0),N===0&&ge>0?(En.current=!0,(qe=Un.current??an.current)==null||qe()):(it=an.current)==null||it.call(an),N===0&&(E.current=!1)},[N]),A.useEffect(()=>{var ge;(ge=an.current)==null||ge.call(an)},[cn,Tn]),A.useEffect(()=>{var pa;let ge=!1,qe=!1;const it=document.createElement("div");it.className="terminal__live",v.current.replaceChildren(it);const{term:Le,forwardPageKey:vt,dispose:Ln}=IO({host:it,desktop:R,autoFocusInput:y,fontSize:K.current??14,scrollback:md+100,pane:r,onInputData:(Ee,ut)=>{var Rt;return(Rt=F.current)==null?void 0:Rt.call(F,Ee,ut)},onInputFocusChange:Ee=>{var ut;ge||(ut=U.current)==null||ut.call(U,Ee)},onRequestDraft:()=>{var Ee;return(Ee=D.current)==null?void 0:Ee.call(D)},onDesktopSelection:Ee=>{var ut;ge||(Ee?(qe=!0,Tt.current=!0,Me(null),Re("")):qe&&(qe=!1,Tt.current=!1,(ut=Zt.current)==null||ut.call(Zt)))},getDocLinkHandler:()=>X.current});o.current=Le,p.current=vt;let Qt=null,Xt=!1,yn=!1,Et=null,Jt=l,wn=null,wi=null,xi=!1,Pt=null,Hn=null,On=!1,ht=null,re=!1,Ae=!1,lt=()=>{},kt=!1,jt=!1,zt=!1,An=!1,ei=()=>{};const zn=QO({mode:l?"live":"snapshot",onChange:Ee=>{he(Ee),Jt&&Ee.stableQuality==="poor"?on():!Jt&&Ee.mode==="snapshot"&&Ee.stableQuality==="good"&&ei()}});$e.current=!1,at.current=!1,Te(!1),Tt.current=!1,Me(null),Re(""),Ft(null);const Ci=()=>Math.min(md,Math.max(24,Le.rows+e4));let $t=Ci(),Ui=0,pi=()=>{},Gi=Ee=>Le.scrollToLine(Ee),Yi=null,rr="",sr=null,ar=0,fr=!1,Ri=!1,Bi=null,Dr=null,Vr=null,dn=null,is=Date.now();de(!1),Y(l?"connecting":"off"),Oe(null),ve(!1),Vt(!1);let pr=!1;const te=()=>{ge||pr||(pr=!0,requestAnimationFrame(()=>{ge||Vt(!0)}))};let Ne=G2;const Ve=Ee=>{Ne=Ee,Ee.connected&&Bt(null),Se(Ee.connected)},wt=()=>Le.buffer.active,qn=()=>{Bi&&(Bi.deco.dispose(),Bi.marker.dispose(),Bi=null)},Oi=()=>{if(qn(),$e.current||!Number.isFinite(Dr)||Dr<1)return;const Ee=wt(),ut=Ee.baseY+Ee.cursorY,Rt=Le.registerMarker(Dr-ut);if(!Rt)return;const fn=Le.registerDecoration({marker:Rt,x:0,width:Le.cols});if(!fn){Rt.dispose();return}fn.onRender(Wn=>Wn.classList.add("terminal-history-boundary")),Bi={marker:Rt,deco:fn}},Pn=()=>{var St;const Ee=(St=v.current)==null?void 0:St.querySelector(".xterm-viewport"),ut=wt(),Rt=(Ee==null?void 0:Ee.clientHeight)||0,fn=ut.baseY||0;if(!Rt||fn<=0){Ft(Zn=>Zn==null?Zn:null);return}const Wn=Math.max(ut.length||0,fn+Le.rows),Si=Math.min(Rt,Math.max(18,Math.round(Rt*Le.rows/Wn))),Pi=Math.round((Rt-Si)*Math.max(0,Math.min(fn,ut.viewportY))/fn);Ft(Zn=>(Zn==null?void 0:Zn.top)===Pi&&(Zn==null?void 0:Zn.height)===Si?Zn:{top:Pi,height:Si})},Yt=(Ee="")=>{const ut=wt(),Rt=!$n();Ot(jt&&Rt&&!$e.current?`历史模式 · 距底 ${ut.baseY-ut.viewportY}/${ut.baseY} 行${Xt?" · 拉取中":""}${Ee}`:"")},hi=()=>wt().viewportY>=wt().baseY,$n=()=>wt().baseY-wt().viewportY<=t4,xn=()=>{var Ee;return Z2(wt().viewportY,(Ee=it.querySelector(".xterm-viewport"))==null?void 0:Ee.scrollTop)},hn=()=>{!Jt||kt||(kt=!0,fr=!1,Et==null||Et.pause(),Y("paused"))},Ni=()=>{var fn;if(!jt||Xt||Date.now()<Ui||$t>=md||!xn()||Jt&&!kt)return;hn(),pi(),(fn=W.current)==null||fn.call(W);const Ee=$t,ut=Math.min(Math.floor($t/rb)*rb+rb,md),Rt=Wt(ut,!0,!0);Yt(),Rt.then(Wn=>{Wn&&!ge&&$t===Ee?$t=ut:!Wn&&!ge&&(Ui=Date.now()+500)})};let Kn=0;const vi=()=>{G.current&&(G.current.deco.dispose(),G.current.marker.dispose(),G.current=null)},Fi=()=>{const Ee=Le.buffer.active;if(Jt&&fr)return{cur:{row:Math.max(0,Le.rows-1-Ee.cursorY),col:Ee.cursorX,vis:Ri},line:Ee.baseY+Ee.cursorY,liveOwned:!0};const ut=sr;return{cur:ut,line:ut?ar-1-(ut.row|0):null,liveOwned:!1}},Ei=()=>{if(ge)return;const{cur:Ee,line:ut,liveOwned:Rt}=Fi(),fn=Le.buffer.active;if(!(Ee&&(Ee.vis||ci.current)&&$e.current&&fn.viewportY<fn.baseY)){vi(),Rt||Le.write(QC(Ee,Le.rows,ar,ci.current)),Hi();return}Rt||Le.write("\x1B[?25l"),vi();const Si=Le.registerMarker(ut-(fn.baseY+fn.cursorY));if(!Si){Hi();return}const Pi=Le.registerDecoration({marker:Si,x:Math.max(0,Ee.col|0),width:1});if(!Pi){Si.dispose(),Hi();return}Pi.onRender(St=>{St.classList.add("cursor-deco")}),G.current={deco:Pi,marker:Si},Hi()},Xr=()=>{ie.current&&(ie.current.deco.dispose(),ie.current.marker.dispose(),ie.current=null)},Hi=()=>{Xr();const{cur:Ee,line:ut}=Fi();if(ge||!q.current||!$e.current||!Ee)return;const Rt=Le.buffer.active,fn=Le.registerMarker(ut-(Rt.baseY+Rt.cursorY));if(!fn)return;const Wn=Le.registerDecoration({marker:fn,x:0,width:Le.cols});if(!Wn){fn.dispose();return}Wn.onRender(Si=>{Si.classList.add("locate-deco")}),ie.current={deco:Wn,marker:fn}};J.current=Hi;const gs=()=>{if(ge||!Vr||Vr.alt)return Promise.resolve();const{seed:Ee,contentRows:ut}=Vr,Rt=ut<Le.rows?Q1(ut,Le.rows):0;if(ut+Rt===ar)return Promise.resolve();const fn=Rt?`
282
+ `.repeat(Rt)+Ee:Ee;return ar=fn.split(`
283
+ `).length,new Promise(Wn=>Le.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+fn,()=>{if(!ge){Le.scrollToBottom();try{$(Le)}catch{}}Wn()}))},Vn=()=>Jt?(On&&lt(),Promise.resolve()):gs(),vr=(Ee=0)=>{if(ge||!v.current||!Le.rows)return;const ut=v.current.parentElement,Rt=ut==null?void 0:ut.getBoundingClientRect();if(ut&&Rt){const Di=Math.ceil(Math.max(0,-Rt.top))+1;ut.style.setProperty("--terminal-overlay-top",`${Di}px`)}const Wn=(it.querySelector(".xterm")||v.current).getBoundingClientRect(),Si=Math.min(Wn.bottom,window.innerHeight-(f.current||0)),Pi=Math.max(Wn.top,0),St=Math.max(0,Si-Pi),Zn=it.querySelector(".xterm-screen"),Ir=Zn==null?void 0:Zn.getBoundingClientRect(),Jr=(Ir==null?void 0:Ir.height)||0,lr=v.current.scrollWidth>v.current.clientWidth+1||!!Ir&&Ir.width>v.current.clientWidth+1;if(_n(Di=>Di===lr?Di:lr),Pn(),!St||!Jr)return;ut==null||ut.style.setProperty("--vis-h",`${St}px`),f.current===0&&(yi.current=St);const Rr=Jr/Le.rows;if(Ht.current&&Kn){Ht.current=!1;const Di=Le.options.fontSize||14,Sn=Math.max(8,Math.min(40,Math.round(Di*(yi.current||St)/(Kn*Rr))));if(Qn.current=!0,K.current=Sn,_d(Sn),Sn!==Di){Le.options.fontSize=Sn,requestAnimationFrame(()=>vr(Ee));return}}if(Qn.current&&Kn){const Di=Math.floor((yi.current||St)/Rr),Sn=Le.options.fontSize||14;if(Di<Kn&&Sn>8){K.current=Sn-1,_d(Sn-1),Le.options.fontSize=Sn-1,requestAnimationFrame(()=>vr(Ee));return}Qn.current=!1,K.current=Sn,_d(Sn)}if(f.current===0&&K.current==null&&Kn&&Ee<4){const Di=Kn*Rr;if(Di>St+4){const Sn=Le.options.fontSize||14,ai=Math.max(6,Math.round(Sn*(St/Di)));if(ai<Sn){Le.options.fontSize=ai,requestAnimationFrame(()=>vr(Ee+1));return}}}const rs=J2(St,Rr);if(rs!==Le.rows){Le.write(`\x1B[?25l\x1B[${Le.rows};1H`,()=>{if(!ge){if(Le.resize(Le.cols,rs),Pn(),$e.current){const Di=Z1(sr,ar),Sn=()=>{const ai=Di==null?null:tb({cursorLine:Di,viewportY:wt().viewportY,visibleRows:Le.rows,baseY:wt().baseY,armed:!0});ai!=null&&Le.scrollToLine(ai)};f.current>0?(Le.scrollToTop(),Sn()):En.current?(En.current=!1,Sn()):Le.scrollToTop()}else kt||Le.scrollToBottom();Ee<4?requestAnimationFrame(()=>vr(Ee+1)):Vn().then(()=>{ge||(Ei(),Jt||te())})}});return}Vn().then(()=>{ge||(Ei(),Jt||te())})},Lt=()=>requestAnimationFrame(()=>vr(0));an.current=Lt;let Ti=null;Un.current=()=>{Lt(),requestAnimationFrame(()=>requestAnimationFrame(Lt)),Ti&&clearTimeout(Ti),Ti=setTimeout(Lt,350)};const kr=()=>Lt();window.addEventListener("resize",kr),window.addEventListener("orientationchange",kr);let ma=((pa=v.current)==null?void 0:pa.clientHeight)||0;const _s=typeof ResizeObserver<"u"?new ResizeObserver(()=>{var Rt;const Ee=((Rt=v.current)==null?void 0:Rt.clientHeight)||0;if(!Ee)return;const ut=Ee>ma;ma=Ee,ut&&Lt()}):null;_s&&v.current&&_s.observe(v.current);const Gs=BO({term:Le,host:v.current,screenHost:it,desktop:R,activeRef:Tt,actionsRef:rn,setUI:Me,setInfo:Re}),Ys=KO({term:Le,host:v.current,desktop:R,pane:r,fontRef:K,selection:Gs,selectionActiveRef:Tt,stopFlingRef:W,getStreamExact:()=>!1,getAltScreen:()=>$e.current,getMouseAware:()=>at.current,onActivity:()=>{is=Date.now()},onUserScroll:()=>{_.current=!0},showScrollPosition:Yt,maybePullMore:Ni,scheduleFit:Lt,wake:()=>{var Ee;return(Ee=Zt.current)==null?void 0:Ee.call(Zt)},onTap:()=>{var Ee;return(Ee=S.current)==null?void 0:Ee.call(S)},onKeepKeyboard:()=>{var Ee;return((Ee=k.current)==null?void 0:Ee.call(k))??!1}});pi=Ys.freezeHistoryGesture,Gi=Ys.settleHistoryAnchor;const $=Ee=>{for(const{deco:fn,marker:Wn}of I.current)fn.dispose(),Wn.dispose();if(I.current=[],!X.current||!V.current)return;const ut=Ee.buffer.active,Rt=ut.baseY+ut.cursorY;for(const{y:fn,x:Wn,width:Si}of K2(Ee)){const Pi=Ee.registerMarker(fn-Rt);if(!Pi)continue;const St=Ee.registerDecoration({marker:Pi,x:Wn,width:Si});if(!St){Pi.dispose();continue}St.onRender(Zn=>{Zn.classList.add("doc-deco")}),I.current.push({deco:St,marker:Pi})}};H.current=()=>{!ge&&jt&&$(Le)};const ce=Ee=>{const ut=$e.current,Rt=!!Ee.alt;return $e.current=Rt,at.current=!!Ee.mouseAware,Te(fn=>fn===Rt?fn:Rt),ut!==Rt&&Lt(),ut&&!Rt},Ce=()=>{if(!Jt||f.current<=0||!$e.current)return;const Ee=wt(),ut=tb({cursorLine:Ee.baseY+Ee.cursorY,viewportY:Ee.viewportY,visibleRows:Le.rows,baseY:Ee.baseY,armed:E.current});ut!=null&&Le.scrollToLine(ut)},Ue=()=>{if(ht=null,ge||!Jt||!On||kt||!Hn||Tt.current)return;if(re){Ae=!0;return}const Ee=Hn.snapshot();if(!Ee)return;re=!0,Ae=!1;const ut=!jt,Rt=!ut&&!hi(),fn=Rt?wt().length-wt().viewportY:0;Ee.paneCols&&Ee.paneCols!==Le.cols&&Le.resize(Ee.paneCols,Le.rows);const Wn=Ee.alt?0:Math.max(0,Le.rows-Ee.bufferRows),Si=Wn?`\r
284
+ `.repeat(Wn):"",St=Ee.cursorVisible||ci.current?"\x1B[?25h":"\x1B[?25l";Le.write(`\x1B[?1049l\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H${Si}${Ee.ansi}${St}`,()=>{if(ge||!Jt){re=!1;return}const Zn=ce(Ee);Kn=Ee.paneRows,ar=Ee.bufferRows+Wn,sr=null,Ri=Ee.cursorVisible,fr=!0,Dr=Number.isFinite(Ee.boundaryLine)&&Ee.boundaryLine>0?Ee.boundaryLine+Wn:null,Ee.cursorVisible&&(ci.current=!1),Rt?Le.scrollToLine(Math.max(0,wt().length-fn)):Ee.alt&&ut?Le.scrollToTop():Le.scrollToBottom(),jt=!0,de(!1),Ve(pc(Ne,"ok"));try{$(Le)}catch{}Oi(),Ei(),Ce(),te(),re=!1,Zn&&(Et==null||Et.resync()),(Ae||Hn.revision>Ee.revision)&&lt()})};lt=()=>{ge||kt||ht!=null||(ht=requestAnimationFrame(Ue))};const ot=async Ee=>{if(ge||!Hn)return;const ut=zt&&!Jt;wn&&(clearTimeout(wn),wn=null),On=!1,fr=!1,Ri=!1,kt=!1,dn=null,$t=Math.max(Ci(),Number(Ee.historyLines)||0),ut||(Kn=Ee.height,$e.current=!!Ee.alt,at.current=!!Ee.mouseAware,Te(Rt=>Rt===!!Ee.alt?Rt:!!Ee.alt)),await Hn.seed(Ee),!ge&&(ut||(Yi=Ee.ansi,rr="",sr=null,de(!1),Lt()))},Mt=async Ee=>{ge||!Hn||(await Hn.data(Ee),!ge&&On&&!kt&&lt())},Nt=async({cur:Ee})=>{if(ge||!Hn)return;const ut=zt&&!Jt;ut||(Ri=!!(Ee!=null&&Ee.vis),rr=Ee?`${Ee.row},${Ee.col},${Ee.vis?1:0}`:""),await Hn.ready(Ee),!ge&&(On=!0,ut||(Lt(),setTimeout(()=>{!ge&&On&&!pr&&lt()},400)))},Wt=async(Ee,ut,Rt=!1)=>{var Pi;if(Xt||ge)return!1;Xt=!0;const fn=Jt,Wn=Date.now();let Si=ut?wt().length-wt().viewportY:0;try{const St=await IU(r,Ee,dn);if(ge||!fn&&Jt||(zn.sample({ok:!0,rttMs:Date.now()-Wn}),Ve(pc(Ne,"ok")),Tt.current))return!1;if(St.unchanged)return de(ut),!0;ut&&Rt&&(Si=wt().length-wt().viewportY),dn=St.hash,$e.current=!!St.alt,at.current=!!St.mouseAware,Te(ai=>ai===!!St.alt?ai:!!St.alt),is=Date.now();let Zn=!1;St.width&&St.width!==Le.cols&&(Le.resize(St.width,Le.rows),Zn=!0);const Ir=Kn;St.height&&(Kn=St.height);const Jr=!jt,lr=St.cur?`${St.cur.row},${St.cur.col},${St.cur.vis?1:0}`:"";if(!Zn&&!Jr&&St.ansi===Yi&&lr===rr)return de(ut),!0;const Rr=ZC(St.ansi),rs=Rr?Rr.split(`
285
+ `).length:0;Vr={seed:Rr,contentRows:rs,alt:St.alt};const Di=!St.alt&&rs<Le.rows?Q1(rs,Le.rows):0,Sn=Di?`
286
+ `.repeat(Di)+Rr:Rr;if(ar=Sn?Sn.split(`
287
+ `).length:0,await new Promise(ai=>Le.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Sn,ai)),ge)return!1;if(kt&&Number.isFinite(St.historyLines)&&(Dr=St.historyLines,Oi()),Yi=St.ansi,rr=lr,sr=St.cur,St.cur&&St.cur.vis&&(ci.current=!1),ut){const ai=Math.max(0,wt().length-Si);Rt?Gi(ai):Le.scrollToLine(ai)}else $e.current&&Jr?Le.scrollToTop():Le.scrollToBottom();if($e.current&&f.current>0){lr!==T.current&&(Jr||(E.current=!0),T.current=lr);const ai=Z1(St.cur,ar);if(ai!=null){const gi=tb({cursorLine:ai,viewportY:wt().viewportY,visibleRows:Le.rows,baseY:wt().baseY,armed:E.current});gi!=null&&Le.scrollToLine(gi)}}Pn(),jt=!0;try{$(Le)}catch{}return de(ut),Ei(),(Zn||Jr||Kn!==Ir)&&Lt(),Jr&&setTimeout(te,400),!0}catch(St){return zn.sample({ok:!1,rttMs:Date.now()-Wn}),St instanceof ir?(Pi=L.current)==null||Pi.call(L):ge||Ve(pc(Ne,"fail")),!1}finally{Xt=!1,!ge&&jt&&Yt(),yn&&!ge&&(yn=!1,In())}},mn=async()=>{if(!(Xt||ge)&&!Tt.current){if(jt&&!$n()&&!$e.current){de(!0);return}$t=Ci(),await Wt($t,!hi())}};let bn=0;async function Jn(Ee){if(!ge&&Ee===bn&&await mn(),ge||document.hidden||Ee!==bn)return;const ut=Ne.failCount>0?z2(Ne.failCount):W2(Date.now()-is,P.current);Qt=setTimeout(()=>Jn(Ee),ut)}const In=()=>{bn+=1,Qt&&(clearTimeout(Qt),Qt=null),Jn(bn)},on=async(Ee="network")=>{var Rt;if(ge||!Jt)return;Jt=!1,zt=!1,kt=!1,On=!1,Ae=!1,ht!=null&&(cancelAnimationFrame(ht),ht=null);const ut=(Rt=Et==null?void 0:Et.suspend)==null?void 0:Rt.call(Et);Y("off"),Oe(Ee),zn.setMode("snapshot",{fallback:!0}),Ve(pc(Ne,"reset"));try{await ut}catch{}ge||(Lt(),In())},si=Ee=>{if(!ge){if(Y(Ee),zn.status(Ee),Ee==="live"){if(An=!0,wn&&(clearTimeout(wn),wn=null),zt&&!Jt){if(document.hidden||Tt.current||jt&&!$n()){zt=!1,On=!1,Et==null||Et.suspend(),Y("off");return}zt=!1,Jt=!0,kt=!1,bn+=1,Qt&&(clearTimeout(Qt),Qt=null),zn.setMode("live"),Oe(null),Ve(pc(Ne,"reset")),Lt(),lt()}return}if(!(Ee!=="reconnecting"&&Ee!=="error")){if(zt&&!Jt){zt=!1,Et==null||Et.suspend(),Y("off");return}Jt&&!wn&&(wn=setTimeout(()=>on(An?"network":"unavailable"),1200))}}},mi=async()=>{if(Hn||(Hn=vO({scrollback:md+100})),Et){Et.resync();return}Et=dO({pane:r,onSeed:ot,onData:Mt,onReady:Nt,onStatus:si,onProbe:Ee=>zn.sample(Ee),onAuthFail:()=>{var Ee;return(Ee=L.current)==null?void 0:Ee.call(L)}})};ei=()=>{const Ee=zn.peek();ge||Jt||zt||!l||document.hidden||Ee.mode!=="snapshot"||Ee.stableQuality!=="good"||Tt.current||jt&&!$n()||(zt=!0,mi().catch(()=>{ge||(zt=!1,zn.status("error"),Y("off"))}))},Jt?mi().catch(()=>on("unavailable")):In();const ji=()=>{!Jt||ge||(kt=!1,On=!1,fr=!1,Dr=null,qn(),de(!1),Ot(""),Y("connecting"),Et==null||Et.resync())};oi.current=ji;const ks=()=>{if(is=Date.now(),ci.current=!0,Ei(),Jt){kt?ji():lt();return}if(Xt){yn=!0;return}In()};Zt.current=ks;const or=()=>{if(Jt){if(document.hidden)Pt=Date.now(),xi=!1,Et==null||Et.pause(),wi&&clearTimeout(wi),wi=setTimeout(()=>{wi=null,!ge&&document.hidden&&Jt&&(xi=!0,Et==null||Et.suspend())},iS);else{const Ee=Pt===null?0:Date.now()-Pt;Pt=null,wi&&(clearTimeout(wi),wi=null),Ee>=iS&&!xi&&(Et==null||Et.suspend()),xi=!1,kt||ji()}return}document.hidden?(bn+=1,Qt&&(clearTimeout(Qt),Qt=null)):(Ve(pc(Ne,"reset")),$t=Ci(),is=Date.now(),In())};document.addEventListener("visibilitychange",or);const Rs=()=>{if(!ge&&(Pn(),!re)){if(hi()){de(!1),Ot(""),kt?ji():ei();return}if(Jt&&kt&&$n()){ji();return}Jt&&!$n()&&!$e.current&&hn(),de(Jt?kt:!$n()),Yt(),Ni()}},fa=Le.onScroll(Rs),bs=it.querySelector(".xterm-viewport");return bs==null||bs.addEventListener("scroll",Rs),()=>{ge=!0,an.current=null,Un.current=null,Zt.current=null,oi.current=null,H.current=null,Ys.dispose(),W.current=null,Gs.dispose(),Qt&&clearTimeout(Qt),Ti&&clearTimeout(Ti),wn&&clearTimeout(wn),wi&&clearTimeout(wi),Et==null||Et.close(),Hn==null||Hn.dispose(),Hn=null,document.removeEventListener("visibilitychange",or),window.removeEventListener("resize",kr),window.removeEventListener("orientationchange",kr),_s==null||_s.disconnect(),fa.dispose(),bs==null||bs.removeEventListener("scroll",Rs),ht!=null&&cancelAnimationFrame(ht),zn.destroy();for(const{deco:Ee,marker:ut}of I.current)Ee.dispose(),ut.dispose();I.current=[],vi(),Xr(),qn(),J.current=null,Ln(),o.current=null,p.current=null}},[r,R,l]);const un=()=>{var qe,it,Le,vt,Ln;(qe=W.current)==null||qe.call(W);const ge=(it=v.current)==null?void 0:it.querySelector(".terminal__live .xterm-viewport");ge&&(ge.scrollTop=ge.scrollHeight),(Le=o.current)==null||Le.scrollToBottom(),de(!1),Ot(""),(vt=oi.current)==null||vt.call(oi),(Ln=Zt.current)==null||Ln.call(Zt)},di=async ge=>{var vt;const qe=o.current,it=qe==null?void 0:qe.buffer.active,Le=ge==="up"?-1:1;if(qe&&it&&rE(it.viewportY,it.baseY,Le)==="internal"){qe.scrollLines(Le*Math.max(1,qe.rows-1)),_.current=!0;return}try{await Od(r,[ge==="up"?"PageUp":"PageDown"]),(vt=Zt.current)==null||vt.call(Zt)}catch{}},nt=()=>{var qe;const ge=!we;Je(ge),q.current=ge,(qe=J.current)==null||qe.call(J)},ae=()=>{var ge;Ht.current=!0,(ge=an.current)==null||ge.call(an)},Fe=()=>{var ge;(ge=o.current)==null||ge.clearSelection(),Tt.current=!1,Me(null),Re("")};Mn(!!ze,Fe),Mn(et,()=>ve(!1)),A.useEffect(()=>{if(!et)return;tt(Date.now());const ge=setInterval(()=>tt(Date.now()),1e3);return()=>clearInterval(ge)},[et]);const st=async()=>{const ge=o.current,qe=sE((ge==null?void 0:ge.getSelection())??"");if(qe){let it=!1;if(navigator.clipboard&&window.isSecureContext)try{await navigator.clipboard.writeText(qe),it=!0}catch{}if(!it){const Le=document.createElement("textarea");Le.value=qe,Le.style.cssText="position:fixed;top:0;left:0;opacity:0",document.body.appendChild(Le),Le.focus(),Le.select();try{document.execCommand("copy")}catch{}document.body.removeChild(Le)}}Fe()};return c.jsxDEV("div",{className:"terminal-wrap",children:[c.jsxDEV("div",{ref:v,className:`terminal${At?"":" terminal--loading"}${R?" desktop-input":""}${cn?" terminal--x-overflow":""}${Tn?" terminal--y-overflow":""}${pe.mode==="live"?" terminal--stream":""}`,onClick:()=>ve(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1431,columnNumber:7},this),Kt&&c.jsxDEV("div",{className:`terminal-y-scrollbar${cn?" has-x":""}`,"aria-hidden":"true",children:c.jsxDEV("span",{style:{top:`${Kt.top}px`,height:`${Kt.height}px`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1438,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1437,columnNumber:9},this),c.jsxDEV(wO,{ready:At,connectionInfo:pe,configuredTransport:l?"live":"snapshot",transportFallback:He,transportOpen:et,transportNow:Ke,onTransportToggle:()=>{tt(Date.now()),ve(ge=>!ge)},connected:xe,inputFailure:Xe,dbgVisible:Z,dbg:_e,scrollInfo:xt,selInfo:le,onResume:un,altScreen:ct,onPageScroll:di,onFitScreen:ae,locateOn:we,onToggleLocate:nt,selUI:ze,onCopy:st,selActionsRef:rn,termRef:o},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1441,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1430,columnNumber:5},this)}),i4=[["esc","tab","tilde","slash","up","at","del"],["ctrl","shift","alt","left","down","right","enter"]],Td=["ctrl","shift","alt"],Db={kbd:"⌨",esc:"Esc",up:"▲",tab:"Tab",ctrl:"Ctrl",shift:"Shift",del:"⌫",left:"◀",down:"▼",right:"▶",alt:"Alt",slash:"/",tilde:"~",at:"@",enter:"Enter"},r4=new Set(["up","down","left","right","del"]),rS={esc:"Escape",tab:"Tab",del:"BSpace",enter:"Enter",up:"Up",down:"Down",left:"Left",right:"Right"},sS={slash:"/",tilde:"~",at:"@"};function s4(i){return i in rS?{kind:"key",name:rS[i]}:i in sS?{kind:"text",ch:sS[i]}:null}const kb="off",uy="armed",Rb="locked",Ba=i=>i===uy||i===Rb,a4=i=>Td.some(r=>Ba(i[r]));function Tb(i){const r={};for(const l of Td)r[l]=i[l]===uy?kb:i[l]??kb;return r}function mE(i,r){if(!i||!a4(r))return i;const l=Ba(r.ctrl),g=Ba(r.shift),N=Ba(r.alt);if(g&&i.kind==="key"){if(i.name==="Tab")return{kind:"key",name:"BTab"};if(["Up","Down","Left","Right"].includes(i.name))return{kind:"key",name:`S-${i.name}`}}return(l||N)&&i.kind==="text"&&/^[a-z0-9]$/i.test(i.ch)?{kind:"key",name:`${l?"C":"M"}-${i.ch.toLowerCase()}`}:i}const o4={up:"Up",down:"Down",left:"Left",right:"Right",enter:"Enter",ret:"Enter",return:"Enter",cr:"Enter",esc:"Escape",escape:"Escape",tab:"Tab",space:"Space",del:"BSpace",bs:"BSpace",bspace:"BSpace",backspace:"BSpace",home:"Home",end:"End",pgup:"PageUp",pageup:"PageUp",pgdn:"PageDown",pagedown:"PageDown"},l4={Escape:"Esc",BSpace:"⌫",Space:"Space",PageUp:"PgUp",PageDown:"PgDn"};function c4(i,r){const l=!!i.ctrl,g=!!i.shift,N=!!i.alt,R=(r||"").trim();if(!R)return null;const y=[];l&&y.push("Ctrl"),g&&y.push("Shift"),N&&y.push("Alt");const a=m=>[...y,m].join("+"),u=o4[R.toLowerCase()];return u?{name:u==="Tab"&&g&&!l&&!N?"BTab":(l?"C-":"")+(N?"M-":"")+(g?"S-":"")+u,label:a(l4[u]||u)}:R.length!==1||!l&&!N&&!g?null:l||N?{name:(l?"C-":"")+(N?"M-":"")+R.toLowerCase(),label:a(R.toUpperCase())}:{name:R.toUpperCase(),label:a(R.toUpperCase())}}function u4(i,{delay:r=400,interval:l=120}={}){let g=null,N=null;const R=()=>{g&&clearTimeout(g),N&&clearInterval(N),g=null,N=null};return{start:()=>{R(),i(),g=setTimeout(()=>{N=setInterval(i,l)},r)},stop:R}}const aS={up:"Up",down:"Down",left:"Left",right:"Right",tilde:"Tilde",slash:"Slash",at:"At",del:"Backspace"},fE=i=>{i.cancelable&&i.preventDefault()},d4=500;function h4({onKey:i,onText:r,mods:l,setMods:g,keyHeldRef:N}){const R=A.useRef(l);R.current=l;const y=u=>{const m=s4(u);if(!m)return;const b=Td.some(w=>Ba(R.current[w])),d=b?mE(m,R.current):m;d.kind==="key"?i(d.name):r(d.ch),b&&g(Tb)},a=u=>Td.includes(u)?c.jsxDEV(f4,{id:u,state:l[u],setMods:g},u,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:43,columnNumber:40},this):c.jsxDEV(p4,{id:u,dispatch:y,keyHeldRef:N},u,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:44,columnNumber:12},this);return c.jsxDEV("div",{className:"keybar-grid",children:i4.flat().map(a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:49,columnNumber:10},this)}const m4=300;function f4({id:i,state:r,setMods:l}){const g=A.useRef(-1/0),N=y=>{const a=y.timeStamp||0;if(a-g.current<m4){g.current=-1/0,l(u=>({...u,[i]:Rb}));return}g.current=a,l(u=>({...u,[i]:Ba(u[i])?kb:uy}))},R=r===Rb?" locked":Ba(r)?" armed":"";return c.jsxDEV("button",{type:"button",className:`keybar-key keybar-mod${R}`,"data-key":i,"data-state":r,"aria-pressed":Ba(r),"aria-label":Db[i],onPointerDown:fE,onClick:N,children:Db[i]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:75,columnNumber:5},this)}function p4({id:i,dispatch:r,keyHeldRef:l}){const g=A.useRef(null),N=A.useRef(r);N.current=r;const R=A.useRef(null),y=x=>{l&&(l.current=x)},a=Db[i];if(!r4.has(i))return c.jsxDEV("button",{type:"button",className:"keybar-key","data-key":i,"aria-label":aS[i]||a,onPointerDown:fE,onClick:()=>r(i),children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:94,columnNumber:12},this);const u=()=>{const x=R.current;x!=null&&x.guard&&(clearTimeout(x.guard),x.guard=null)},m=x=>{x.cancelable&&x.preventDefault(),g.current||(g.current=u4(()=>N.current(i)));const j={x:x.clientX,y:x.clientY,held:!1,moved:!1,guard:null};j.guard=setTimeout(()=>{j.held=!0,j.guard=null,g.current.start()},d4),R.current=j,y(!0)},b=x=>{const j=R.current;!j||j.held||(Math.abs(x.clientX-j.x)>8||Math.abs(x.clientY-j.y)>8)&&(j.moved=!0,u(),y(!1))},d=()=>{const x=R.current;y(!1),x&&(u(),x.held?g.current.stop():x.moved||N.current(i),R.current=null)},w=()=>{var x;y(!1),u(),(x=R.current)!=null&&x.held&&g.current.stop(),R.current=null};return c.jsxDEV("button",{type:"button",className:"keybar-key","data-key":i,"aria-label":aS[i]||a,onPointerDown:m,onPointerMove:b,onPointerUp:d,onPointerCancel:w,onPointerLeave:w,children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:130,columnNumber:5},this)}const pE=i=>`hm_favs7_${i}`,v4=i=>`hm_favs6_${i}`,vE="command",Lb=i=>i?`command@${i}`:vE,g4={command:[],agent:[]},oS={ESC:{kind:"key",text:"Escape",label:"Esc"},Esc:{kind:"key",text:"Escape",label:"Esc"},Tab:{kind:"key",text:"Tab",label:"Tab"},"⌫":{kind:"key",text:"BSpace",label:"⌫"}};function _4(i,r){return r.map(l=>l.kind!=="key"&&oS[l.text]?{...oS[l.text]}:l.kind==="key"?{kind:"key",text:l.text,label:l.label||l.text}:{kind:l.kind,text:l.text,enter:i==="agent"?!0:!!l.enter})}function nr(i){try{const r=localStorage.getItem(pE(i));if(r)return JSON.parse(r);const l=localStorage.getItem(v4(i));if(l){const g=_4(i,JSON.parse(l));return bo(i,g),g}}catch{}return(g4[i]||[]).map(r=>({...r}))}function bo(i,r){try{localStorage.setItem(pE(i),JSON.stringify(r))}catch{}return r}function dy(i){return i.kind==="key"?{kind:"key",text:i.text,label:i.label}:{kind:i.kind,text:i.text,enter:!!i.enter}}function gE(i,r){const l=nr(i),g=gn(r);return l.some(R=>gn(R)===g)?{ok:!1,reason:"conflict",items:l}:{ok:!0,items:bo(i,[...l,dy(r)])}}function b4(i,r){return gE(i,r).items}function y4(i,r){return bo(i,nr(i).filter(l=>l.text!==r))}function w4(i,r){return bo(i,nr(i).filter(l=>gn(l)!==r))}function _E(i,r,l){const g=nr(i),N=g.findIndex(a=>gn(a)===r);if(N<0)return{ok:!1,reason:"missing",items:g};const R=gn(l);if(g.some((a,u)=>u!==N&&gn(a)===R))return{ok:!1,reason:"conflict",items:g};const y=g.slice();return y[N]=dy(l),{ok:!0,items:bo(i,y)}}function x4(i,r,l,g){if(i===l)return _E(i,r,g);const N=nr(i),R=nr(l);if(!N.some(m=>gn(m)===r))return{ok:!1,reason:"missing",source:N,target:R};const y=gn(g);if(R.some(m=>gn(m)===y))return{ok:!1,reason:"conflict",source:N,target:R};const a=bo(i,N.filter(m=>gn(m)!==r)),u=bo(l,[...R,dy(g)]);return{ok:!0,source:a,target:u}}function N4(i,r,l){const g=nr(i),N=g.findIndex(a=>gn(a)===r),R=g.findIndex(a=>gn(a)===l);if(N<0||R<0||N===R)return g;const y=g.slice();return[y[N],y[R]]=[y[R],y[N]],bo(i,y)}const S4=i=>{var r;try{(r=navigator.clipboard)==null||r.writeText(i)}catch{}};function C4({open:i,mode:r,recent:l=[],onSend:g,onFill:N,onClose:R,onDelete:y,historyOnly:a=!1}){const[u,m]=A.useState(()=>nr(r)),b=A.useRef(null),[d,w]=A.useState(r);if(d!==r&&(w(r),m(nr(r))),!i)return null;const x=a?[]:u.filter(p=>p.kind==="reply"),j=a?[]:u.filter(p=>p.kind==="cmd"),v=()=>{var _;const p=(((_=b.current)==null?void 0:_.value)||"").trim();if(!p)return;const f=r==="agent"&&!p.startsWith("/")?"reply":"cmd";m(b4(r,{kind:f,text:p})),b.current&&(b.current.value="")},o=p=>m(y4(r,p));return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"cmd-backdrop",onClick:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:35,columnNumber:7},this),c.jsxDEV("div",{className:`cmd-panel${a?" history":""}`,role:"dialog","aria-label":O("fav.title"),children:[c.jsxDEV("div",{className:"cmd-head",children:[c.jsxDEV("span",{className:"cmd-title",children:O(a?"dock.history":"fav.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:38,columnNumber:11},this),c.jsxDEV("button",{className:"cmd-close",onClick:R,"aria-label":O("common.close"),children:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:39,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:37,columnNumber:9},this),c.jsxDEV("div",{className:"cmd-list",children:[a&&c.jsxDEV("div",{className:"cmd-hint",children:O("history.scope")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:42,columnNumber:27},this),x.length>0&&c.jsxDEV("div",{className:"fav-chips",children:x.map(p=>c.jsxDEV("span",{className:"fav-chip",onClick:()=>g(p.text),onContextMenu:f=>{f.preventDefault(),o(p.text)},children:p.text},p.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:46,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:44,columnNumber:13},this),j.map(p=>c.jsxDEV("div",{className:"cmd-row",children:[c.jsxDEV("span",{className:"cmd-text",onClick:()=>g(p.text),onDoubleClick:()=>N(p.text),children:p.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:53,columnNumber:15},this),c.jsxDEV("button",{className:"cmd-del",onClick:()=>o(p.text),"aria-label":O("common.delete"),children:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:54,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:54,columnNumber:15},this)]},p.text,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:52,columnNumber:13},this)),l.map(p=>c.jsxDEV("div",{className:"cmd-row",children:[c.jsxDEV("span",{className:"cmd-text",onClick:()=>g(p),onDoubleClick:()=>N(p),children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:59,columnNumber:15},this),c.jsxDEV("button",{className:"cmd-copy",onClick:()=>S4(p),"aria-label":O("common.copy"),children:c.jsxDEV(UC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:60,columnNumber:104},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:60,columnNumber:15},this),y&&c.jsxDEV("button",{className:"cmd-del",onClick:()=>y(p),"aria-label":O("common.delete"),children:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:62,columnNumber:107},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:62,columnNumber:17},this)]},`r:${p}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:58,columnNumber:13},this)),a&&l.length===0&&c.jsxDEV("div",{className:"cmd-empty",children:O("history.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:66,columnNumber:50},this),!a&&c.jsxDEV("div",{className:"fav-add",children:[c.jsxDEV("input",{ref:b,className:"fav-add-input",placeholder:O("fav.addPlaceholder"),onKeyDown:p=>{p.key==="Enter"&&v()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:69,columnNumber:15},this),c.jsxDEV("button",{className:"fav-add-btn",onClick:v,children:O("fav.add")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:71,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:68,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:41,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:36,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:34,columnNumber:5},this)}const bE=i=>`hm_shortcut_layout1_${i}`,lS=()=>({hidden:[],order:[]}),Ld=i=>[...new Set(Array.isArray(i)?i.filter(r=>typeof r=="string"&&r):[])],ml=i=>({hidden:Ld(i==null?void 0:i.hidden),order:Ld(i==null?void 0:i.order)});function il(i){try{const r=localStorage.getItem(bE(i));return r?ml(JSON.parse(r)):lS()}catch{return lS()}}function E4(i,r){const l=ml(r);try{localStorage.setItem(bE(i),JSON.stringify(l))}catch{}return l}function Cc(i,r){const l=ml(r),g=new Set(l.hidden),N=new Map((Array.isArray(i)?i:[]).map(y=>[gn(y),y])),R=[];for(const y of l.order)g.has(y)||!N.has(y)||(R.push(N.get(y)),N.delete(y));for(const[y,a]of N)g.has(y)||R.push(a);return R}function j4(i,r,l,g){const N=ml(i),R=Cc(r,i).map(gn),y=R.indexOf(l),a=y+(g<0?-1:1);if(y<0||a<0||a>=R.length)return N;[R[y],R[a]]=[R[a],R[y]];const u=new Set(N.hidden),m=new Set(R);let b=0;const d=[];for(const w of N.order)u.has(w)?d.push(w):m.has(w)&&d.push(R[b++]);return d.push(...R.slice(b)),{...N,order:Ld(d)}}function D4(i,r,l){const g=ml(i),N=Cc(r,g).map(gn);return{hidden:Ld([...g.hidden,l]),order:N}}function bd(i,r){const l=ml(i);return{...l,hidden:l.hidden.filter(g=>g!==r)}}function cS(i,r){const l=ml(i);return{hidden:l.hidden.filter(g=>g!==r),order:l.order.filter(g=>g!==r)}}function k4(i,r,l){const g=bd(i,l);return{hidden:g.hidden.filter(N=>N!==r),order:Ld(g.order.map(N=>N===r?l:N))}}const kf=[{key:"none",mods:{}},{key:"ctrl",label:"Ctrl",mods:{ctrl:!0}},{key:"shift",label:"Shift",mods:{shift:!0}},{key:"alt",label:"Alt",mods:{alt:!0}},{key:"ctrl-shift",label:"Ctrl+Shift",mods:{ctrl:!0,shift:!0}},{key:"ctrl-alt",label:"Ctrl+Alt",mods:{ctrl:!0,alt:!0}}],R4=i=>kf.find(r=>r.key===i)||kf[0],T4=[["Up","↑ Up"],["Down","↓ Down"],["Left","← Left"],["Right","→ Right"],["Tab","⇥ Tab"],["Enter","⏎ Enter"],["Escape","⎋ Esc"],["Space","␣ Space"],["BSpace","⌫ Backspace"],["Home","Home"],["End","End"],["PageUp","PgUp"],["PageDown","PgDn"]],L4=[...T4.map(([i,r])=>({value:i,label:r})),..."abcdefghijklmnopqrstuvwxyz".split("").map(i=>({value:i,label:i.toUpperCase()})),..."0123456789".split("").map(i=>({value:i,label:i}))];function A4(i){let r=i.text||"";if(r==="BTab")return{sticky:"shift",base:"Tab"};let l=!1,g=!1,N=!1;r.startsWith("C-")&&(l=!0,r=r.slice(2)),r.startsWith("M-")&&(g=!0,r=r.slice(2)),r.startsWith("S-")&&(N=!0,r=r.slice(2)),!l&&!g&&!N&&r.length===1&&r>="A"&&r<="Z"&&(N=!0);const R=kf.find(y=>!!y.mods.ctrl===l&&!!y.mods.shift===N&&!!y.mods.alt===g);return{sticky:R?R.key:"none",base:r.length===1?r.toLowerCase():r}}function uS({value:i,options:r,onChange:l,placeholder:g}){const[N,R]=A.useState(!1),y=r.find(a=>a.value===i);return Mn(N,()=>R(!1)),c.jsxDEV("div",{className:"cmd-dd",children:[c.jsxDEV("button",{type:"button",className:`cmd-dd-btn${N?" open":""}`,onClick:()=>R(a=>!a),"aria-haspopup":"listbox","aria-expanded":N,children:[c.jsxDEV("span",{className:y?void 0:"cmd-dd-ph",children:y?y.label:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:72,columnNumber:9},this),c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:72,columnNumber:95},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:70,columnNumber:7},this),N&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"cmd-dd-scrim",onClick:()=>R(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:76,columnNumber:11},this),c.jsxDEV("div",{className:"cmd-dd-menu",role:"listbox",children:r.map(a=>c.jsxDEV("button",{type:"button",role:"option","aria-selected":a.value===i,className:`cmd-dd-opt${a.value===i?" on":""}`,onClick:()=>{l(a.value),R(!1)},children:[c.jsxDEV("span",{children:a.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:82,columnNumber:17},this),a.value===i&&c.jsxDEV(sy,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:83,columnNumber:39},this)]},a.value,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:79,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:77,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:75,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:69,columnNumber:5},this)}function M4({title:i,accent:r,items:l,showTitle:g=!0,onMove:N,onDel:R,onEdit:y}){return c.jsxDEV("div",{className:`cmd-esection ${r}`,children:[g&&c.jsxDEV("div",{className:`cmd-section ${r}`,children:c.jsxDEV("span",{className:"cmd-section-name",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:98,columnNumber:62},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:98,columnNumber:21},this),l.length===0&&c.jsxDEV("div",{className:"cmd-empty",children:O("cmd.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:99,columnNumber:30},this),l.map((a,u)=>c.jsxDEV("div",{className:"cmd-row",children:[a.source==="config"?c.jsxDEV("span",{className:"cmd-text cmd-fav-text",children:[a.kind==="key"&&a.label||a.text,a.kind!=="key"&&a.enter&&c.jsxDEV("span",{className:"cmd-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:105,columnNumber:47},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:103,columnNumber:15},this):c.jsxDEV("button",{type:"button",className:"cmd-text cmd-fav-text",onClick:()=>y(a),children:[a.kind==="key"&&a.label||a.text,a.kind!=="key"&&a.enter&&c.jsxDEV("span",{className:"cmd-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:109,columnNumber:47},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:107,columnNumber:15},this),c.jsxDEV("button",{className:"cmd-move up",disabled:u===0,onClick:()=>N(a,-1),"aria-label":O("cmd.moveUp"),children:c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:112,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:111,columnNumber:11},this),c.jsxDEV("button",{className:"cmd-move",disabled:u===l.length-1,onClick:()=>N(a,1),"aria-label":O("cmd.moveDown"),children:c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:114,columnNumber:44},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:113,columnNumber:11},this),c.jsxDEV("button",{className:"cmd-del",onClick:()=>R(a),"aria-label":O(a.source==="config"?"cmd.removeDevice":"common.delete"),children:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:116,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:115,columnNumber:11},this)]},gn(a),!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:101,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:97,columnNumber:5},this)}function U4({scopes:i,cfg:r,edit:l,inset:g,onAdd:N,onUpdate:R,onClose:y}){const a=l&&l.fav.kind==="key"?A4(l.fav):null,[u,m]=A.useState(l&&l.fav.kind==="key"?"key":"msg"),[b,d]=A.useState(l?l.scope:i[0].key),[w,x]=A.useState(l?a?a.base:l.fav.text:""),[j,v]=A.useState(l&&l.fav.kind!=="key"?!!l.fav.enter:!!r.defaultEnter),[o,p]=A.useState(a?a.sticky:"none"),[f,_]=A.useState(null),E=U=>{U!==u&&(m(U),x(""),_(null))},T=kf.map(U=>({value:U.key,label:U.label??O("cmd.stickyNone")})),S=u==="key"?c4(R4(o).mods,w):null,k=i.some(U=>U.key===b)?b:i[0].key,D=u==="key"?!!S:!!w.trim(),L=()=>{if(!D)return;const U=u==="key"?{kind:"key",text:S.name,label:S.label}:{kind:r.msgKind(w.trim()),text:w.trim(),enter:j},F=l?R(l.scope,l.fav,k,U):N(k,U);if(!(F!=null&&F.ok)){_(O("cmd.itemConflict"));return}_(null)};return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"cmd-backdrop cmd-add-backdrop",onClick:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:160,columnNumber:7},this),c.jsxDEV("div",{className:"cmd-addcard",role:"dialog","aria-label":O(l?"cmd.editItem":"cmd.addTitle"),style:{transform:`translate(-50%, calc(-50% + ${g/2}px))`},children:[c.jsxDEV("div",{className:"cmd-addcard-head",children:[c.jsxDEV("span",{className:"cmd-title",children:O(l?"cmd.editItem":"cmd.addTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:164,columnNumber:11},this),c.jsxDEV("button",{className:"cmd-close",onClick:y,"aria-label":O("common.close"),children:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:165,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:165,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:163,columnNumber:9},this),c.jsxDEV("div",{className:"cmd-modetabs",role:"tablist",children:[c.jsxDEV("button",{type:"button",role:"tab","aria-selected":u==="msg",className:`cmd-modetab${u==="msg"?" on":""}`,onClick:()=>E("msg"),children:r.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:171,columnNumber:11},this),c.jsxDEV("button",{type:"button",role:"tab","aria-selected":u==="key",className:`cmd-modetab${u==="key"?" on":""}`,onClick:()=>E("key"),children:O("cmd.tabKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:173,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:170,columnNumber:9},this),i.length>1&&c.jsxDEV("div",{className:"cmd-field",children:[c.jsxDEV("label",{className:"cmd-field-label",children:O("cmd.addTo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:180,columnNumber:13},this),c.jsxDEV("div",{className:"cmd-seg",role:"group",children:i.map(U=>c.jsxDEV("button",{type:"button","aria-pressed":k===U.key,className:`cmd-seg-btn${U.accent==="win"?" win":""}${k===U.key?" on":""}`,onClick:()=>{d(U.key),_(null)},children:U.title},U.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:183,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:181,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:179,columnNumber:11},this),u==="key"?c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"cmd-field",children:[c.jsxDEV("label",{className:"cmd-field-label",children:O("cmd.sticky")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:195,columnNumber:15},this),c.jsxDEV(uS,{value:o,options:T,onChange:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:196,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:194,columnNumber:13},this),c.jsxDEV("div",{className:"cmd-field",children:[c.jsxDEV("label",{className:"cmd-field-label",children:O("cmd.baseKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:199,columnNumber:15},this),c.jsxDEV(uS,{value:w,options:L4,onChange:x,placeholder:O("cmd.pickKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:200,columnNumber:15},this),S&&c.jsxDEV("span",{className:"cmd-chord-preview",children:S.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:201,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:198,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:192,columnNumber:11},this):c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"cmd-field",children:[c.jsxDEV("label",{className:"cmd-field-label",children:r.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:207,columnNumber:15},this),c.jsxDEV("input",{className:"cmd-add-input",value:w,placeholder:r.placeholder,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:U=>{x(U.target.value),_(null)},onKeyDown:U=>{U.key==="Enter"&&L()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:208,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:206,columnNumber:13},this),r.hasEnter&&c.jsxDEV("label",{className:"cmd-toggle-row",children:[c.jsxDEV("span",{children:O("cmd.withEnter")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:216,columnNumber:17},this),c.jsxDEV("span",{className:"cmd-switch",children:[c.jsxDEV("input",{type:"checkbox",checked:j,onChange:U=>v(U.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:218,columnNumber:19},this),c.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:219,columnNumber:19},this),c.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:220,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:217,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:215,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:205,columnNumber:11},this),f&&c.jsxDEV("div",{className:"cmd-add-error",role:"status",children:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:227,columnNumber:19},this),c.jsxDEV("button",{type:"button",className:"cmd-submit",disabled:!D,onClick:L,children:O(l?"common.save":"fav.add")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:229,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:161,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:159,columnNumber:5},this)}function O4(i,r){if(i==="chat")return{title:O("chat.editTitle"),scopes:[{key:"agent",title:O("chat.favs"),accent:"global"}],card:{msgLabel:O("chat.tabMsg"),placeholder:O("chat.addPlaceholder"),hasEnter:!0,defaultEnter:!0,msgKind:g=>g.startsWith("/")?"cmd":"reply"}};const l=r?Lb(r):null;return{title:O("cmd.editTitle"),scopes:[{key:vE,title:O("cmd.global"),accent:"global"},...l?[{key:l,title:O("cmd.window"),accent:"win"}]:[]],card:{msgLabel:O("cmd.tabCmd"),placeholder:O("cmd.addPlaceholder"),hasEnter:!0,defaultEnter:!1,msgKind:()=>"cmd"}}}function Ab({windowId:i,inset:r=0,variant:l="command",presets:g=[],onChange:N,onClose:R}){const{title:y,scopes:a,card:u}=O4(l,i),[m,b]=A.useState(()=>Object.fromEntries(a.map(q=>[q.key,nr(q.key)]))),[d,w]=A.useState(null),x=l==="chat"?"chat":"command",j=a[0].key,[v,o]=A.useState(()=>il(x)),[p,f]=A.useState(null),[_,E]=A.useState(0),T=Cc(sl(g,m[j]||[],x),v),S=new Set(T.map(gn)),k=(q,J=null,X=null)=>T.some(V=>gn(V)===q&&!(J===j&&V.source==="local"&&gn(V)===gn(X))),D=()=>b(Object.fromEntries(a.map(q=>[q.key,nr(q.key)]))),L=q=>{const J=E4(x,q);return o(J),N==null||N(),J};A.useEffect(()=>{if(!p)return;const q=setTimeout(()=>f(null),4e3);return()=>clearTimeout(q)},[p]),A.useEffect(()=>{if(!_)return;const q=setTimeout(()=>E(0),2e3);return()=>clearTimeout(q)},[_]),Mn(!!d,()=>w(null));const U=()=>{D(),f(null),w(null),E(q=>q+1)},F=(q,J,X,V)=>{if(q===j)L(j4(v,T,gn(J),X));else{const H=V.findIndex(W=>gn(W)===gn(J)),K=V[H+(X<0?-1:1)];if(!K)return;N4(q,gn(J),gn(K)),D(),N==null||N()}},P=(q,J)=>{E(0);const X=gn(J);if(J.source==="config"){L(D4(v,T,X)),f({identity:X});return}w4(q,X),q===j?L(cS(v,X)):N==null||N(),D()},I=()=>{p&&(L(bd(v,p.identity)),f(null))},G=(q,J)=>{const X=gn(J);if(k(X))return{ok:!1,reason:"conflict"};const V=sl(g,[],x).some(W=>gn(W)===X),H=(m[q]||[]).some(W=>gn(W)===X);if(q===j&&v.hidden.includes(X)&&(V||H))return L(bd(v,X)),U(),{ok:!0};const K=gE(q,J);return K.ok?(q===j?L(bd(v,gn(J))):N==null||N(),U(),{ok:!0}):K},ie=(q,J,X,V)=>{const H=gn(J),K=gn(V);if(k(K,q,J))return{ok:!1,reason:"conflict"};const W=q===X?_E(q,H,V):x4(q,H,X,V);return W.ok&&(q===j&&X===j?L(k4(v,H,K)):q===j?L(cS(v,H)):X===j?L(bd(v,K)):N==null||N(),D(),w(null)),W};return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"cmd-backdrop",onClick:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:391,columnNumber:7},this),c.jsxDEV("div",{className:"cmd-panel cmd-editor",role:"dialog","aria-label":y,children:[c.jsxDEV("div",{className:"cmd-head",children:[c.jsxDEV("span",{className:"cmd-title",children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:394,columnNumber:11},this),c.jsxDEV("button",{className:"cmd-add-open",onClick:()=>{E(0),w({edit:null})},"aria-label":O("cmd.addTitle"),children:c.jsxDEV(ry,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:395,columnNumber:139},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:395,columnNumber:11},this),c.jsxDEV("button",{className:"cmd-close",onClick:R,"aria-label":O("common.close"),children:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:396,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:396,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:393,columnNumber:9},this),c.jsxDEV("div",{className:"cmd-list",children:a.map(q=>{const J=q.key===j?T:sl([],m[q.key]||[],"command").filter(X=>!S.has(gn(X)));return c.jsxDEV(M4,{title:q.title,accent:q.accent,items:J,showTitle:a.length>1,onMove:(X,V)=>F(q.key,X,V,J),onDel:X=>P(q.key,X),onEdit:X=>{E(0),w({edit:{fav:X,scope:q.key}})}},q.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:404,columnNumber:20},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:398,columnNumber:9},this),p&&c.jsxDEV("div",{className:"cmd-undo-toast",role:"status",children:[c.jsxDEV("span",{children:O("cmd.removedDevice")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:412,columnNumber:11},this),c.jsxDEV("button",{type:"button",className:"cmd-undo",onClick:I,children:O("common.undo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:413,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:411,columnNumber:18},this),!!_&&c.jsxDEV("div",{className:"cmd-undo-toast cmd-added-toast",role:"status",children:O("cmd.added")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:415,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:392,columnNumber:7},this),d&&c.jsxDEV(U4,{scopes:a,cfg:u,edit:d.edit,inset:r,onAdd:G,onUpdate:ie,onClose:()=>w(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:419,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:390,columnNumber:5},this)}function hy({active:i,disabled:r,onToggle:l}){const g=A.useRef({x:0,y:0,moved:!1}),N=a=>{g.current={x:a.clientX,y:a.clientY,moved:!1}},R=a=>{const u=g.current;!u.moved&&Math.hypot(a.clientX-u.x,a.clientY-u.y)>10&&(u.moved=!0)},y=()=>{g.current.moved||l()};return c.jsxDEV("button",{type:"button",className:`input-mic${i?" on":""}`,"aria-label":O(i?"mic.stop":"mic.start"),"aria-pressed":i,disabled:r,onPointerDown:N,onPointerMove:R,onPointerUp:y,children:c.jsxDEV(R3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/MicButton.jsx",lineNumber:29,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/MicButton.jsx",lineNumber:19,columnNumber:5},this)}const yE=["jpg","jpeg","png","gif","webp","svg","bmp","heic","heif","avif","ico","tiff","mp4","m4v","mov","webm","mkv","avi","wmv","flv","3gp","ogv","mpeg","mpg","txt","md","markdown","rst","log","csv","tsv","json","yaml","yml","toml","ini","conf","xml","html","htm","css","js","mjs","cjs","ts","tsx","jsx","py","rb","go","rs","java","c","h","cpp","sh","pdf","doc","docx","xls","xlsx","ppt","pptx","odt","ods","odp","rtf"],my=yE.map(i=>`.${i}`).join(","),P4=new Set(yE);function V4(i){const r=/\.([A-Za-z0-9]+)$/.exec(i||"");return r?P4.has(r[1].toLowerCase()):!1}function wE(i){const l=(Array.isArray(i)?i:i&&typeof i.length=="number"?Array.from(i):[i]).filter(Boolean),g=[],N=[];for(const R of l)(V4(R.name)?g:N).push(R);return{allowed:g,rejected:N.map(R=>R.name)}}const xE={active:!1,phase:null,pct:0,label:""};let Ad=xE,Cd=null;const Mb=new Set,fy=()=>{for(const i of[...Mb])i()};function NE(i,r=""){Cd=i,Ad={active:!0,phase:"sending",pct:0,label:r},fy()}function Rf(i){Ad={...Ad,...i},fy()}function Ub(){Cd=null,Ad=xE,fy()}function dS(){Cd==null||Cd.abort()}const I4=i=>(Mb.add(i),()=>Mb.delete(i)),B4=()=>Ad;function F4(){return A.useSyncExternalStore(I4,B4)}function SE({cwd:i,onAuthFail:r,onPaths:l}){const[g,N]=A.useState(null),R=A.useRef(null);return A.useEffect(()=>()=>clearTimeout(R.current),[]),{upload:g,uploadFiles:async a=>{const{allowed:u,rejected:m}=wE(a);if(!u.length){m.length&&(clearTimeout(R.current),N({label:O("dock.upload.rejected",{names:m.join("、")}),error:!0}),R.current=setTimeout(()=>N(null),3500));return}clearTimeout(R.current),N(null);const b=u.length,d=[],w=[],x=new AbortController;NE(x,O("dock.upload.progress",{name:u[0].name,tag:b>1?`(1/${b})`:""}));try{for(let j=0;j<b&&!x.signal.aborted;j++){const v=u[j],o=b>1?`(${j+1}/${b})`:"";Rf({label:O("dock.upload.progress",{name:v.name,tag:o}),phase:"sending",pct:0});try{const p=await TC(i||"",v,(f,_)=>Rf({pct:f,phase:_}),!0,{signal:x.signal});p!=null&&p.path&&d.push(p.path)}catch(p){if(p instanceof Sf)break;if(p instanceof ir){r==null||r(),Ub(),N(null);return}w.push({name:v.name,reason:(p==null?void 0:p.message)||O("api.uploadFailed")})}}}finally{Ub()}if(d.length&&l(d),w.length||m.length){const j=w.map(v=>`${v.name}:${v.reason}`);m.length&&j.push(O("dock.upload.rejected",{names:m.join("、")})),N({label:j.join(";"),error:!0}),R.current=setTimeout(()=>N(null),5e3)}else N(null)}}}function H4(i,r){const l=r/16e3,g=Math.floor(i.length/l),N=new Int16Array(g);for(let R=0;R<g;R++){let y=i[Math.floor(R*l)];y>1?y=1:y<-1&&(y=-1),N[R]=y<0?y*32768:y*32767}return new Uint8Array(N.buffer)}function z4(i=1280){let r=new Uint8Array(0);return{push(l){const g=new Uint8Array(r.length+l.length);g.set(r),g.set(l,r.length);const N=[];let R=0;for(;g.length-R>=i;)N.push(g.slice(R,R+i)),R+=i;return r=g.slice(R),N},flush(){if(r.length===0)return null;const l=r;return r=new Uint8Array(0),l}}}function hS(i){let r="";for(let l=0;l<i.length;l++)r+=String.fromCharCode(i[l]);return btoa(r)}const $4="data:text/javascript;base64,Ly8gd2ViL3NyYy92b2ljZS9wY20td29ya2xldC5qcwovLyBNaW5pbWFsIEF1ZGlvV29ya2xldDogZm9yd2FyZCBlYWNoIHJlbmRlciBxdWFudHVtJ3MgbW9ubyBzYW1wbGVzIHRvIHRoZSBtYWluIHRocmVhZCwgd2hpY2ggZG9lcyB0aGUKLy8gKHVuaXQtdGVzdGVkKSBkb3duc2FtcGxlL2ZyYW1lL2VuY29kZS4gS2VwdCB0cml2aWFsIG9uIHB1cnBvc2Ug4oCUIHdvcmtsZXQgY29kZSBjYW4ndCBiZSB1bml0LXRlc3RlZC4KY2xhc3MgUGNtRm9yd2FyZGVyIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBwcm9jZXNzKGlucHV0cykgewogICAgY29uc3QgY2ggPSBpbnB1dHNbMF0gJiYgaW5wdXRzWzBdWzBdOwogICAgaWYgKGNoICYmIGNoLmxlbmd0aCkgdGhpcy5wb3J0LnBvc3RNZXNzYWdlKGNoLnNsaWNlKDApKTsgLy8gY29weTogdGhlIGJ1ZmZlciBpcyByZXVzZWQgYWZ0ZXIgcHJvY2VzcygpCiAgICByZXR1cm4gdHJ1ZTsKICB9Cn0KcmVnaXN0ZXJQcm9jZXNzb3IoJ3BjbS1mb3J3YXJkZXInLCBQY21Gb3J3YXJkZXIpOwo=";function W4({getUserMedia:i=l=>navigator.mediaDevices.getUserMedia(l),AudioCtor:r=window.AudioContext||window.webkitAudioContext}={}){let l=null,g=null,N=null,R=null;const y=z4(1280);async function a(m){g=await i({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}}),l=new r,await l.resume(),await l.audioWorklet.addModule($4),R=l.createMediaStreamSource(g),N=new AudioWorkletNode(l,"pcm-forwarder"),N.port.onmessage=b=>{const d=H4(b.data,l.sampleRate);for(const w of y.push(d))m(hS(w))},R.connect(N),N.connect(l.destination)}async function u(){try{N&&(N.port.onmessage=null)}catch{}try{R&&R.disconnect(),N&&N.disconnect()}catch{}try{g&&g.getTracks().forEach(b=>b.stop())}catch{}try{l&&await l.close()}catch{}const m=y.flush();return l=g=N=R=null,m?hS(m):null}return{start:a,stop:u}}const G4={language:"zh_cn",domain:"iat",accent:"mandarin",vad_eos:1e4,dwa:"wpgs",ptt:1,nunum:1},py="audio/L16;rate=16000";function Y4(i,r){return{common:{app_id:i},business:{...G4},data:{status:0,format:py,encoding:"raw",audio:r}}}function q4(i){return{data:{status:1,format:py,encoding:"raw",audio:i}}}function K4(){return{data:{status:2,format:py,encoding:"raw",audio:""}}}function mS(){return{sentences:new Map}}function X4(i,r){var R;const l=(R=r==null?void 0:r.data)==null?void 0:R.result;if(!l||!Array.isArray(l.ws))return i;const g=l.ws.map(y=>(y.cw||[]).map(a=>a.w).join("")).join(""),N=new Map(i.sentences);if(l.pgs==="rpl"&&Array.isArray(l.rg))for(let y=l.rg[0];y<=l.rg[1];y++)N.delete(y);return N.set(l.sn,g),{sentences:N}}function fS(i){return[...i.sentences.keys()].sort((r,l)=>r-l).map(r=>i.sentences.get(r)).join("")}const J4=55e3,Z4=4e3;function vy({onText:i,deps:r={}}){const l=r.signAsr||n3,g=r.WebSocketCtor||window.WebSocket,N=r.makeRecorder||(()=>W4()),[R,y]=A.useState("idle"),[a,u]=A.useState(""),m=A.useRef("idle"),b=A.useCallback(L=>{m.current=L,y(L)},[]),d=A.useRef(null),w=A.useRef(null),x=A.useRef(mS()),j=A.useRef(""),v=A.useRef(!1),o=A.useRef(null),p=A.useRef(null),f=A.useRef(null),_=A.useRef(i);_.current=i;const E=A.useCallback(()=>{clearTimeout(o.current),clearTimeout(p.current);try{d.current&&d.current.close()}catch{}d.current=null,w.current=null,v.current=!1},[]),T=A.useCallback(()=>{var L;m.current!=="idle"&&((L=_.current)==null||L.call(_,fS(x.current)),u(""),b("idle"),E())},[E,b]),S=A.useCallback(L=>{const U=d.current;!U||U.readyState!==1||(U.send(JSON.stringify(v.current?q4(L):Y4(j.current,L))),v.current=!0)},[]),k=A.useCallback(async()=>{if(m.current==="recording"){b("finalizing"),clearTimeout(o.current);try{const L=w.current?await w.current.stop():null;L&&S(L);const U=d.current;U&&U.readyState===1?(U.send(JSON.stringify(K4())),p.current=setTimeout(()=>T(),Z4)):T()}catch{b("error"),E()}}},[S,E,b,T]);f.current=k;const D=A.useCallback(async()=>{if(!(m.current!=="idle"&&m.current!=="error")){b("requesting"),u(""),x.current=mS(),v.current=!1;try{const{url:L,appId:U}=await l();j.current=U;const F=new g(L);d.current=F,F.onmessage=I=>{var ie;const G=JSON.parse(I.data);x.current=X4(x.current,G),u(fS(x.current)),((ie=G==null?void 0:G.data)==null?void 0:ie.status)===2&&T()},F.onerror=()=>{b("error"),E()},F.onclose=()=>{(m.current==="recording"||m.current==="finalizing")&&T()};const P=N();w.current=P,await P.start(S),b("recording"),o.current=setTimeout(()=>{var I;(I=f.current)==null||I.call(f)},J4)}catch{b("error"),E()}}},[l,g,N,S,E,b,T]);return A.useEffect(()=>E,[E]),{state:R,partial:a,start:D,stop:k}}function Wf(i){A.useEffect(()=>{if(!i||!("wakeLock"in navigator))return;let r=null,l=!1;const g=async()=>{try{const R=await navigator.wakeLock.request("screen");if(l){try{R.release()}catch{}return}r=R}catch{}},N=()=>{document.visibilityState==="visible"&&!l&&g()};return g(),document.addEventListener("visibilitychange",N),()=>{l=!0,document.removeEventListener("visibilitychange",N);try{r&&r.release()}catch{}r=null}},[i])}function Q4(i=window.innerHeight){const r=window.visualViewport;return r?Math.max(i,window.innerHeight)-r.height>120:!1}function eP(){const[i,r]=A.useState(0),l=A.useRef(null);return A.useEffect(()=>{const g=window.visualViewport;if(!g)return;l.current={width:g.width,fullHeight:Math.max(window.innerHeight,g.height)};const N=()=>{const R=l.current;Math.abs(g.width-R.width)>40?(R.width=g.width,R.fullHeight=Math.max(window.innerHeight,g.height)):R.fullHeight=Math.max(R.fullHeight,window.innerHeight,g.height);const y=R.fullHeight-g.height;r(y>120?Math.round(y):0)};return N(),g.addEventListener("resize",N),g.addEventListener("scroll",N),()=>{g.removeEventListener("resize",N),g.removeEventListener("scroll",N),l.current=null}},[]),i}const pS=i=>{i.cancelable&&i.preventDefault()},tP=i=>{var r,l;(l=(r=i.target).closest)!=null&&l.call(r,"input, textarea, [contenteditable]")||i.cancelable&&i.preventDefault()},vS=80,nP=i=>i.startsWith("/")?"cmd":"reply",iP=450;function sb({className:i,onTap:r,onHold:l,children:g,...N}){const R=A.useRef({timer:null,long:!1,moved:!1,x:0,y:0}),y=b=>{b.cancelable&&b.preventDefault();const d=R.current;d.long=!1,d.moved=!1,d.x=b.clientX,d.y=b.clientY,l&&(d.timer=setTimeout(()=>{var w;d.long=!0,(w=navigator.vibrate)==null||w.call(navigator,12),l()},iP))},a=b=>{const d=R.current;d.moved||(Math.abs(b.clientX-d.x)>8||Math.abs(b.clientY-d.y)>8)&&(d.moved=!0,clearTimeout(d.timer))},u=()=>{const b=R.current;if(clearTimeout(b.timer),b.timer=null,b.moved){b.moved=!1;return}if(b.long){b.long=!1;return}r()},m=()=>{const b=R.current;clearTimeout(b.timer),b.timer=null,b.long=!1,b.moved=!1};return c.jsxDEV("button",{type:"button",className:i,...N,onPointerDown:y,onPointerMove:a,onPointerUp:u,onPointerCancel:m,onPointerLeave:m,children:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:84,columnNumber:5},this)}function rP({pane:i,onAuthFail:r,onKey:l,onText:g,cwd:N=null,agent:R=null,windowId:y=null,recent:a=[],onSent:u,onRemoveRecent:m,inset:b=0,shortcuts:d=null,micAvailable:w=!1,desktopUnified:x=!1,terminalFocused:j=!1,onReturnToTerminal:v,onLeaveTerminal:o},p){const[f,_]=A.useState(()=>_C()),[E,T]=A.useState(!1),S=A.useRef(!1);A.useEffect(()=>{bC(f)},[f]);const[k,D]=A.useState(!1),[L,U]=A.useState(!1),[F,P]=A.useState(!1),I=d||zf,[G,ie]=A.useState(()=>nr("agent")),[q,J]=A.useState(()=>il("chat")),[X,V]=A.useState(!1),H=()=>{ie(nr("agent")),J(il("chat"))};A.useEffect(()=>{!F&&!X&&H()},[F,X]);const[K,W]=A.useState(()=>nr("command")),[oe,de]=A.useState(()=>y?nr(Lb(y)):[]),[xe,Se]=A.useState(()=>il("command")),[se,Y]=A.useState(!1),pe=()=>{W(nr("command")),de(y?nr(Lb(y)):[]),Se(il("command"))};A.useEffect(()=>{se||pe()},[se,y]);const he=Cc(sl(I.chat,G,"chat"),q),He=Cc(sl(I.command,K,"command"),xe),Oe=new Set(He.map(gn)),et=sl([],oe,"command").filter(te=>!Oe.has(gn(te))),[ve,Ke]=A.useState({}),tt=x?"agent":ve[i]||(R?"agent":"command"),Xe=window.visualViewport,Bt=A.useRef({width:(Xe==null?void 0:Xe.width)??window.innerWidth,fullHeight:Math.max(window.innerHeight,(Xe==null?void 0:Xe.height)??0)}),Tt=()=>{const te=window.visualViewport;if(!te)return!1;const Ne=Bt.current;return Math.abs(te.width-Ne.width)>40?(Ne.width=te.width,Ne.fullHeight=Math.max(window.innerHeight,te.height)):Ne.fullHeight=Math.max(Ne.fullHeight,window.innerHeight,te.height),Q4(Ne.fullHeight)},le=te=>{var Ve;const Ne=Tt()||document.activeElement===Qn.current||document.activeElement===Ht.current;Ke(wt=>({...wt,[i]:te})),Ne&&((Ve=te==="command"?Qn.current:Ht.current)==null||Ve.focus({preventScroll:!0}))},[Re,ze]=A.useState({ctrl:"off",shift:"off",alt:"off"}),[Me,$e]=A.useState(!1),at=A.useRef(null),ct=A.useRef(null),Te=A.useRef(null),we=tt==="command"?0:1,Je=A.useRef(we);Je.current=we;const _e=A.useRef(le);_e.current=le;const Z=A.useRef(!1),Pe=A.useRef(!1),xt=()=>{var te;return((te=at.current)==null?void 0:te.clientWidth)||0},Ot=te=>{const Ne=ct.current;Ne&&(Ne.style.transition="none",Ne.style.transform=`translate3d(${te}px, 0, 0)`)},At=()=>{const te=ct.current;!te||!te.style.transform||(te.style.transition="",te.style.transform="")},Vt=A.useRef(null),cn=50,_n=12,Kt=38,Ft=te=>{const Ne=Vt.current;Ne&&(Ne.classList.add("dragging"),Ne.style.setProperty("--drag",`${bO(te)}px`),Ne.style.setProperty("--morph",`${Math.min(1,Math.max(0,(Math.abs(te)-_n)/Kt))}`),Ne.classList.toggle("armed",Math.abs(te)>=cn))},Tn=()=>{const te=Vt.current;te&&(te.classList.remove("dragging","armed"),te.style.removeProperty("--drag"),te.style.removeProperty("--morph"))};A.useLayoutEffect(()=>{Z.current||At()});const an=()=>{const te=at.current;if(!te)return;const Ne=te.querySelector(tt==="command"?".dock-page.command":".dock-page.chat");Ne&&(te.style.height=`${Ne.offsetHeight}px`)};A.useLayoutEffect(()=>{tt==="agent"&&Xt(Ht.current),an()});const Un=A.useRef(an);Un.current=an,A.useEffect(()=>{const te=at.current;if(!te||typeof ResizeObserver>"u")return;const Ne=new ResizeObserver(()=>{Z.current||Un.current()});return te.querySelectorAll(".dock-page").forEach(Ve=>Ne.observe(Ve)),()=>Ne.disconnect()},[]),A.useEffect(()=>{if(tt!=="agent")return;const te=requestAnimationFrame(()=>{Xt(Ht.current),an()});return()=>cancelAnimationFrame(te)},[tt]),A.useEffect(()=>{var Ne;if(tt==="agent")return;document.activeElement===Ht.current&&((Ne=Ht.current)==null||Ne.blur());const te=at.current;te&&(te.scrollLeft=0,te.scrollTop=0)},[tt]),A.useEffect(()=>{if(x)return;const te=Te.current,Ne=at.current;if(!te||!Ne)return;let Ve=null;const wt=Yt=>{var hn,Ni,Kn,vi;At(),te.classList.remove("dock-swiping");const hi=((Ni=(hn=Yt.target)==null?void 0:hn.closest)==null?void 0:Ni.call(hn,".quick-scroll"))||null,$n=((vi=(Kn=Yt.target)==null?void 0:Kn.closest)==null?void 0:vi.call(Kn,".input-text"))||null,xn=Tt()||document.activeElement===Qn.current||document.activeElement===Ht.current;Ve=Yt.touches.length===1?{x:Yt.touches[0].clientX,y:Yt.touches[0].clientY,dx:0,dy:0,decided:!1,horiz:!1,vert:!1,strip:hi,cmp:$n,kbUp:xn}:null},qn=Yt=>{if(!Ve||Yt.touches.length!==1||Pe.current&&!Ve.horiz)return;const hi=Yt.touches[0].clientX-Ve.x,$n=Yt.touches[0].clientY-Ve.y;if(!Ve.decided){if(Math.abs(hi)<16&&Math.abs($n)<16)return;if(Ve.decided=!0,Ve.horiz=Math.abs(hi)>Math.abs($n)*1.4,!Ve.kbUp&&(document.activeElement===Qn.current||document.activeElement===Ht.current)&&document.activeElement.blur(),Ve.horiz&&!Ve.kbUp&&te.classList.add("dock-swiping"),Ve.horiz&&Ve.strip){const Ni=Ve.strip,Kn=Je.current,vi=Ni.scrollLeft<=0,Fi=Ni.scrollLeft>=Ni.scrollWidth-Ni.clientWidth-1,Ei=hi>0&&vi&&Kn===1,Xr=hi<0&&Fi&&Kn===0;Ei||Xr||(Ve.horiz=!1)}!Ve.horiz&&Math.abs($n)>Math.abs(hi)*1.4&&!_O(Ve.cmp,$n)&&(Ve.vert=!0)}if(Ve.vert){Ve.dx=hi,Ve.dy=$n,Ft($n),Yt.cancelable&&Yt.preventDefault();return}if(!Ve.horiz)return;Yt.preventDefault(),Z.current=!0,Ve.dx=hi;const xn=xt()||1;let hn=hi;Je.current===0?hn=Math.min(0,Math.max(-xn,hn)):hn=Math.max(0,Math.min(xn,hn)),Ot(-Je.current*xn+hn)},Oi=()=>{var hn,Ni,Kn,vi;if(Z.current=!1,te.classList.remove("dock-swiping"),Ve&&Ve.vert){const Fi=gO(Ve.dx,Ve.dy,cn),Ei=Je.current;Ve=null,At(),Tn(),Fi==="show"?(hn=Ae(Ei))==null||hn.focus({preventScroll:!0}):Fi==="hide"&&((Ni=Ae(Ei))==null||Ni.blur());return}if(!Ve||!Ve.horiz){Ve=null,At();return}const Yt=Je.current,hi=Ve.dx,$n=Ve.kbUp;Ve=null;let xn=Yt;Yt===0&&hi<-vS?xn=1:Yt===1&&hi>vS&&(xn=0),$n||((Kn=Qn.current)==null||Kn.blur(),(vi=Ht.current)==null||vi.blur()),At(),xn!==Yt&&_e.current(xn===1?"agent":"command")},Pn=()=>{(Ne.scrollLeft||Ne.scrollTop)&&(Ne.scrollLeft=0,Ne.scrollTop=0)};return Ne.addEventListener("scroll",Pn,{passive:!0}),te.addEventListener("touchstart",wt,{passive:!0}),te.addEventListener("touchmove",qn,{passive:!1}),te.addEventListener("touchend",Oi,{passive:!0}),te.addEventListener("touchcancel",Oi,{passive:!0}),()=>{Ne.removeEventListener("scroll",Pn),te.removeEventListener("touchstart",wt),te.removeEventListener("touchmove",qn),te.removeEventListener("touchend",Oi),te.removeEventListener("touchcancel",Oi)}},[x]);const Ht=A.useRef(null),Qn=A.useRef(null),En=A.useRef(null),yi=A.useRef(null),Zt=A.useRef(!1),oi=A.useRef(null),ci=()=>{var te;x&&(yi.current=j?"terminal":document.activeElement===Ht.current?"composer":null,o==null||o(),document.activeElement===Ht.current&&((te=Ht.current)==null||te.blur()))},rn=te=>{ci(),te(!0)},un=(te,Ne=!0)=>{te(!1);const Ve=yi.current;yi.current=null,x&&Ne&&Ve&&queueMicrotask(()=>{var wt;Ve==="terminal"?v==null||v():(wt=Ht.current)==null||wt.focus({preventScroll:!0})})},di=(te=!1)=>{const Ne=oi.current;Ne&&(Zt.current=!1,te&&(oi.current=null),!(!x||!Ne.owner||Ne.focusRestored)&&(Ne.focusRestored=!0,queueMicrotask(()=>{var Ve;Ne.owner==="terminal"?v==null||v():(Ve=Ht.current)==null||Ve.focus({preventScroll:!0})})))};A.useEffect(()=>{if(!x)return;const te=En.current;let Ne=!1,Ve=null;const wt=()=>di(!0),qn=()=>{Zt.current&&(Ne=!0)},Oi=()=>{!Zt.current||!Ne||(clearTimeout(Ve),Ve=setTimeout(di,0))};return te==null||te.addEventListener("cancel",wt),window.addEventListener("blur",qn),window.addEventListener("focus",Oi),()=>{clearTimeout(Ve),te==null||te.removeEventListener("cancel",wt),window.removeEventListener("blur",qn),window.removeEventListener("focus",Oi)}},[x,v]),Mn(F,()=>un(P)),Mn(se||X,()=>{un(se?Y:V)});const nt=A.useRef(!1);A.useEffect(()=>{const te=window.visualViewport;if(!te)return;const Ne=()=>{if(Tt()){nt.current=!0;return}if(!nt.current)return;nt.current=!1;const Ve=document.activeElement;(Ve===Qn.current||Ve===Ht.current)&&Ve.blur(),$e(!1)};return Ne(),te.addEventListener("resize",Ne),()=>te.removeEventListener("resize",Ne)},[]);const ae=A.useRef({head:"",tail:""}),Fe=A.useRef(null),st=A.useRef(!1),qe=vy({onText:te=>{if(st.current){st.current=!1;return}const{head:Ne,tail:Ve}=ae.current;_(Ne+te+Ve),Fe.current=Ne.length+te.length}}),it=qe.state==="recording"||qe.state==="finalizing";Wf(it),A.useEffect(()=>{if(qe.state!=="recording"&&qe.state!=="finalizing"||st.current)return;const{head:te,tail:Ne}=ae.current;_(te+qe.partial+Ne),Fe.current=te.length+qe.partial.length},[qe.partial,qe.state]),A.useLayoutEffect(()=>{const te=Ht.current;if(!te)return;let Ne=!1;if(Fe.current!=null){const Ve=Fe.current;if(Fe.current=null,document.activeElement===te)try{te.setSelectionRange(Ve,Ve)}catch{}Ne=Ve>=f.length}Xt(te),Ne&&(te.scrollTop=te.scrollHeight)},[f]);const Le=()=>{if(it){qe.stop();return}const te=Ht.current,Ne=te?te.selectionStart:f.length;ae.current={head:f.slice(0,Ne),tail:f.slice(Ne)},qe.start()},vt=40,Ln=A.useRef(null),Qt=(te,Ne)=>{const Ve=Ln.current;if(!Ve)return null;Ve.style.width=`${Ne}px`,Ve.textContent=te;const wt=document.createElement("span");return Ve.appendChild(wt),{h:Ve.offsetHeight,endX:wt.offsetLeft}},Xt=te=>{if(!te)return;te.style.height="auto";const Ne=w?76:38,Ve=w?86:48,wt=te.parentElement.clientWidth-11,qn=te.value?Qt(te.value,wt-Ne):null,Oi=qn?qn.h>vt:!1;D(Oi);const Pn=Oi?Qt(te.value,wt):null;U(!!Pn&&wt-Pn.endX<Ve),te.style.height=`${te.scrollHeight+2}px`},yn=()=>{it&&(st.current=!0,qe.stop())},Et=async te=>{if(!i||!te&&!f||S.current)return;const Ne=f;S.current=!0,T(!0),yn();try{await Nc(i,Ne,te),u==null||u(Ne),_(""),requestAnimationFrame(()=>{var Ve;Xt(Ht.current),te&&x&&((Ve=Ht.current)==null||Ve.focus({preventScroll:!0}))})}catch(Ve){Ve instanceof ir&&(r==null||r())}finally{S.current=!1,T(!1)}},Jt=()=>Et(!0),wn=A.useRef(!1),wi=te=>{const Ne=te.value;if(te.value="",!Ne)return;const Ve=Td.some(wt=>Ba(Re[wt]));if(Ve&&Ne.length===1){const wt=mE({kind:"text",ch:Ne},Re);if(wt.kind==="key"){l(wt.name),ze(Tb);return}}g(Ne),Ve&&ze(Tb)},xi=te=>{var Ne;(Ne=te.nativeEvent)!=null&&Ne.isComposing||wn.current||wi(te.target)},Pt=()=>{tt==="command"&&(wn.current=!0)},Hn=te=>{tt==="command"&&(wn.current=!1,wi(te.target))},On=te=>{var Ne;if(!(tt!=="command"||(Ne=te.nativeEvent)!=null&&Ne.isComposing)){if(te.key==="Enter"&&!te.shiftKey){te.preventDefault(),l("Enter");return}te.key==="Backspace"&&(te.preventDefault(),l("BSpace"))}},ht=te=>{var Ne,Ve;if(!(!x||(Ne=te.nativeEvent)!=null&&Ne.isComposing)){if(te.key==="Escape"){te.preventDefault(),(Ve=Ht.current)==null||Ve.blur(),v==null||v();return}te.key==="Enter"&&!te.shiftKey&&(te.preventDefault(),Jt())}},re=()=>{const te=Qn.current;te&&(document.activeElement===te?te.blur():te.focus({preventScroll:!0}))},Ae=te=>te===0?Qn.current:Ht.current,lt=te=>{yi.current=null,_(te),P(!1),requestAnimationFrame(()=>{var Ne;(Ne=Ht.current)==null||Ne.focus(),Xt(Ht.current)})},kt=async te=>{if(i)try{await Nc(i,te,!0),u==null||u(te)}catch(Ne){Ne instanceof ir&&(r==null||r())}},jt=te=>lt(te),zt=te=>{if(te.kind==="key"){l(te.text);return}if(te.enter){kt(te.text);return}g(te.text)},An=te=>te.kind==="key"&&te.label||te.text,ei=te=>te.kind==="key"||!te.enter?void 0:()=>g(te.text);A.useImperativeHandle(p,()=>({fill:lt,keepKeyboardForGesture:()=>{const te=document.activeElement;if(!(Tt()||te===Qn.current||te===Ht.current))return!1;const Ve=Ae(Je.current);return Ve==null||Ve.focus({preventScroll:!0}),!!Ve},hideKeyboard:()=>{const te=document.activeElement;(te===Qn.current||te===Ht.current)&&te.blur()},composerFocused:()=>document.activeElement===Ht.current,focusComposer:()=>{var te;return(te=Ht.current)==null?void 0:te.focus({preventScroll:!0})}}),[]);const zn=(te,{focusComposer:Ne=!0}={})=>{if(!te.length)return;let Ve;if(te.length===1)Ve=te[0];else{const wt=te[0].slice(0,te[0].lastIndexOf("/")+1);Ve=te.every(qn=>qn.startsWith(wt))?`${wt}{${te.map(qn=>qn.slice(wt.length)).join(",")}}`:te.join(" ")}_(wt=>wt&&!/\s$/.test(wt)?`${wt} ${Ve}`:wt+Ve),requestAnimationFrame(()=>{var wt;Ne&&((wt=Ht.current)==null||wt.focus()),Xt(Ht.current)})},{upload:Ci,uploadFiles:$t}=SE({cwd:N,onAuthFail:r,onPaths:te=>{var Ne;return zn(te,{focusComposer:!x||((Ne=oi.current)==null?void 0:Ne.owner)==="composer"})}}),Ui=()=>Et(!1),pi=A.useRef(null),Gi=A.useRef(!1),Yi=A.useRef({x:0,y:0,moved:!1}),rr=te=>{te.cancelable&&te.preventDefault(),Gi.current=!1,Yi.current={x:te.clientX,y:te.clientY,moved:!1},!(!f||S.current)&&(pi.current=setTimeout(()=>{var Ne;Gi.current=!0,(Ne=navigator.vibrate)==null||Ne.call(navigator,12),Ui()},450))},sr=te=>{const Ne=Yi.current;Ne.moved||Math.hypot(te.clientX-Ne.x,te.clientY-Ne.y)<=10||(Ne.moved=!0,clearTimeout(pi.current),pi.current=null)},ar=()=>{if(clearTimeout(pi.current),pi.current=null,Gi.current){Gi.current=!1;return}Yi.current.moved||Jt()},fr=()=>{clearTimeout(pi.current),pi.current=null,Gi.current=!1},Ri=A.useRef(null),Bi=A.useRef({x:0,y:0,moved:!1}),Dr=te=>{if(!k)return null;for(const[Ne,Ve]of[["send",".input-send"],["mic",".input-mic"]]){const wt=te.currentTarget.querySelector(Ve);if(!wt)continue;const qn=wt.getBoundingClientRect();if(te.clientX>=qn.left&&te.clientX<=qn.right&&te.clientY>=qn.top&&te.clientY<=qn.bottom)return Ne}return null},Vr=te=>{const Ne=Dr(te);Ne&&(te.stopPropagation(),te.cancelable&&te.preventDefault(),Ri.current=Ne,Ne==="send"?rr(te):Bi.current={x:te.clientX,y:te.clientY,moved:!1})},dn=te=>{const Ne=Ri.current;if(!Ne)return;if(Ne==="send"){sr(te);return}const Ve=Bi.current;!Ve.moved&&Math.hypot(te.clientX-Ve.x,te.clientY-Ve.y)>10&&(Ve.moved=!0)},is=()=>{const te=Ri.current;if(Ri.current=null,!!te){if(te==="send"){ar();return}!Bi.current.moved&&qe.state!=="requesting"&&Le()}},pr=()=>{const te=Ri.current;Ri.current=null,te==="send"&&fr()};return c.jsxDEV("div",{className:`bottom-dock${x?" desktop-unified":""}`,children:[c.jsxDEV("div",{className:"dock-left",ref:Te,onPointerDown:tP,children:[!x&&c.jsxDEV("button",{type:"button",className:"dock-handle",ref:Vt,"aria-label":O("dock.mode.toggle"),onClick:()=>le(tt==="command"?"agent":"command"),children:[c.jsxDEV("span",{className:"dock-mode-label",children:O(tt==="command"?"dock.mode.command":"dock.mode.chat")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:944,columnNumber:13},this),c.jsxDEV("span",{className:"dock-dots",children:[c.jsxDEV("i",{className:`dock-dot${tt==="command"?" on":""}`,"data-page":"command","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:946,columnNumber:15},this),c.jsxDEV("i",{className:`dock-dot${tt==="agent"?" on":""}`,"data-page":"agent","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:947,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:945,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:942,columnNumber:11},this),c.jsxDEV("div",{className:"dock-pager",ref:at,children:c.jsxDEV("div",{className:`dock-track${we===1?" at-chat":""}`,ref:ct,children:[!x&&c.jsxDEV("div",{className:`dock-page command${tt==="command"?" on":""}`,children:[c.jsxDEV("input",{ref:Qn,className:"cmd-capture",type:"text",onInput:xi,onKeyDown:On,onCompositionStart:Pt,onCompositionEnd:Hn,onFocus:()=>$e(!0),onBlur:()=>$e(!1),enterKeyHint:"send","aria-label":O("dock.command.placeholder"),autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:957,columnNumber:15},this),c.jsxDEV("div",{className:"quick-bar",children:[c.jsxDEV("div",{className:"quick-fixed",children:c.jsxDEV("button",{type:"button",className:"quick-fix quick-fix-kbd","aria-pressed":Me,"aria-label":O(Me?"dock.kbdHide":"dock.kbdShow"),onPointerDown:pS,onClick:re,children:[c.jsxDEV(U3,{down:Me},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:981,columnNumber:21},this),c.jsxDEV("span",{children:O(Me?"dock.kbdHide":"dock.kbdShow")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:981,columnNumber:55},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:978,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:977,columnNumber:17},this),c.jsxDEV("div",{className:"quick-scroll",children:[He.map((te,Ne)=>c.jsxDEV(sb,{className:"quick-cmd quick-cmd-plain",onTap:()=>zt(te),onHold:ei(te),children:[An(te),te.kind!=="key"&&te.enter&&c.jsxDEV("span",{className:"qc-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:990,columnNumber:68},this)]},`g:${gn(te)}:${Ne}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:988,columnNumber:21},this)),et.map((te,Ne)=>c.jsxDEV(sb,{className:"quick-cmd quick-cmd-win",onTap:()=>zt(te),onHold:ei(te),children:[An(te),te.kind!=="key"&&te.enter&&c.jsxDEV("span",{className:"qc-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:995,columnNumber:68},this)]},`w:${gn(te)}:${Ne}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:993,columnNumber:21},this)),c.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":O("cmd.editTitle"),onPointerDown:pS,onClick:()=>rn(Y),children:c.jsxDEV(Cf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:998,columnNumber:91},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:997,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:983,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:976,columnNumber:15},this),c.jsxDEV(h4,{onKey:l,onText:g,mods:Re,setMods:ze,keyHeldRef:Pe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1001,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:953,columnNumber:33},this),c.jsxDEV("div",{className:`dock-page chat${tt==="agent"?" on":""}`,children:[Ci&&c.jsxDEV("div",{className:"dock-upload error",children:c.jsxDEV("span",{className:"dock-upload-label",children:Ci.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1008,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1007,columnNumber:17},this),c.jsxDEV("div",{className:"quick-bar",children:[c.jsxDEV("div",{className:"quick-fixed",children:c.jsxDEV("button",{type:"button",className:"quick-fix","aria-label":O("dock.attach"),disabled:!!Ci&&!Ci.error,onClick:()=>{var te;ci(),Zt.current=x,oi.current=x?{owner:yi.current,focusRestored:!1,phase:"open"}:null,yi.current=null,(te=En.current)==null||te.click()},children:[c.jsxDEV(MC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1026,columnNumber:21},this),c.jsxDEV("span",{children:O("dock.attach")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1026,columnNumber:35},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1015,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1014,columnNumber:17},this),c.jsxDEV("div",{className:"quick-scroll",children:[he.map((te,Ne)=>c.jsxDEV(sb,{className:`quick-cmd qc-${te.kind==="key"?"esc":nP(te.text)}`,onTap:()=>zt(te),onHold:ei(te),children:An(te)},`${gn(te)}:${Ne}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1034,columnNumber:21},this)),c.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":O("chat.editTitle"),onClick:()=>rn(V),children:c.jsxDEV(Cf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1040,columnNumber:66},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1039,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1028,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1013,columnNumber:15},this),c.jsxDEV("input",{ref:En,className:"browse-file-input",type:"file",multiple:!0,accept:my,onChange:async te=>{const Ne=oi.current,Ve=Array.from(te.target.files||[]);te.target.value="",Zt.current=!1,yi.current=null,(Ne==null?void 0:Ne.phase)==="open"&&(Ne.phase="uploading",Ne.focusRestored&&(o==null||o(),document.activeElement===Ht.current&&Ht.current.blur(),Ne.focusRestored=!1)),await $t(Ve),oi.current===Ne&&di(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1044,columnNumber:15},this),c.jsxDEV("div",{className:`input-wrap${it?" recording":""}${k?" multi":""}${L?" crowd":""}`,onPointerDownCapture:Vr,onPointerMoveCapture:dn,onPointerUpCapture:is,onPointerCancelCapture:pr,children:[c.jsxDEV("textarea",{ref:Ht,className:"input-text",rows:1,value:f,onPointerDown:te=>{it&&(yn(),te.currentTarget.focus())},"aria-readonly":E,onBeforeInput:te=>{S.current&&te.preventDefault()},onChange:te=>{if(S.current){te.target.value=f;return}_(te.target.value),Xt(te.target)},onKeyDown:ht,onFocus:()=>$e(!0),onBlur:()=>$e(!1),placeholder:O(x?Me?"dock.input.exitDraft":"dock.input.enterDraft":"dock.input.placeholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1074,columnNumber:17},this),c.jsxDEV("div",{ref:Ln,className:"input-mirror","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1111,columnNumber:17},this),!f&&c.jsxDEV("button",{type:"button",className:"input-history","aria-label":O("dock.history"),title:O("dock.history"),onClick:()=>F?un(P):rn(P),children:c.jsxDEV(AC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1117,columnNumber:53},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1114,columnNumber:19},this),w&&c.jsxDEV(hy,{active:it,disabled:qe.state==="requesting",onToggle:Le},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1119,columnNumber:34},this),c.jsxDEV("button",{type:"button",className:`input-send${f?"":" is-empty"}`,"aria-label":O("dock.send"),title:O("dock.send.hint"),disabled:E,onPointerDown:rr,onPointerMove:sr,onPointerUp:ar,onPointerCancel:fr,onPointerLeave:fr,children:c.jsxDEV(iy,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1124,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1121,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1071,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1003,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:952,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:951,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:935,columnNumber:7},this),c.jsxDEV(C4,{open:F,mode:tt,recent:a,historyOnly:!0,onDelete:m,onSend:te=>{un(P),kt(te)},onFill:te=>{P(!1),jt(te)},onClose:()=>un(P)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1131,columnNumber:7},this),se&&c.jsxDEV(Ab,{windowId:y,inset:b,presets:I.command,onChange:pe,onClose:()=>un(Y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1138,columnNumber:23},this),X&&c.jsxDEV(Ab,{variant:"chat",inset:b,presets:I.chat,onChange:H,onClose:()=>un(V)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1142,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:934,columnNumber:5},this)}const sP=A.forwardRef(rP),aP=new Set(["clear","compact","cost","status","usage","context","help","init","exit","quit","vim","terminal-setup","release-notes"]);function Ob(i){const r=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof i=="string"?i:"");return!r||r[2].trim()?!1:!aP.has(r[1].toLowerCase())}function oP(i){const r=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof i=="string"?i:"");if(!r||Ob(i))return null;const l={name:"/"+r[1]},g=r[2].trim();return g&&(l.args=g),l}const lP=15e3;function cP(i){const[r,l]=A.useState({model:null,usedPercent:null}),g=A.useRef(i);return g.current=i,A.useEffect(()=>{if(!i){l({model:null,usedPercent:null});return}let N=!0,R=null;const y=async()=>{try{const a=await BU(i);N&&g.current===i&&a&&l({model:a.model??null,usedPercent:typeof a.usedPercent=="number"?a.usedPercent:null})}catch{}N&&(R=setTimeout(y,lP))};return y(),()=>{N=!1,R&&clearTimeout(R)}},[i]),r}const uP=i=>{var r,l;(l=(r=i.target).closest)!=null&&l.call(r,"input, textarea, [contenteditable]")||i.cancelable&&i.preventDefault()},dP=i=>i.startsWith("/")?"cmd":"reply";function hP({pane:i,kind:r,cwd:l=null,onKey:g=()=>{},onAuthFail:N,onSent:R,onInteractiveSlash:y,shortcuts:a=null,micAvailable:u=!1,desktop:m=!1}){const[b,d]=A.useState(()=>_C()),[w,x]=A.useState(!1),j=A.useRef(!1);A.useEffect(()=>{bC(b)},[b]);const v=A.useRef(null),o=A.useRef(null),p=A.useRef({x:0,y:0,moved:!1});A.useEffect(()=>{var ve;m&&((ve=v.current)==null||ve.focus({preventScroll:!0}))},[m,i]);const f=a||zf,[_,E]=A.useState(()=>nr("agent")),[T,S]=A.useState(()=>il("chat")),[k,D]=A.useState(!1),L=()=>{E(nr("agent")),S(il("chat"))};A.useEffect(()=>{k||L()},[k]),Mn(k,()=>D(!1));const U=Cc(sl(f.chat,_,"chat"),T),F=r==="working",P=cP(i),I=P.model?P.model.replace(/\s*\(.*\)\s*$/,"").trim():null,G=P.usedPercent,ie=typeof G=="number",q=ie&&G>=80,J=ve=>{ve&&(ve.style.height="auto",ve.style.height=`${ve.scrollHeight+2}px`)};A.useLayoutEffect(()=>{J(v.current)},[b]);const X=A.useRef({head:"",tail:""}),V=A.useRef(!1),K=vy({onText:ve=>{if(V.current){V.current=!1;return}const{head:Ke,tail:tt}=X.current;d(Ke+ve+tt)}}),W=K.state==="recording"||K.state==="finalizing";Wf(W),A.useEffect(()=>{if(K.state!=="recording"&&K.state!=="finalizing"||V.current)return;const{head:ve,tail:Ke}=X.current;d(ve+K.partial+Ke)},[K.partial,K.state]);const oe=()=>{if(W){K.stop();return}const ve=v.current,Ke=ve?ve.selectionStart:b.length;X.current={head:b.slice(0,Ke),tail:b.slice(Ke)},K.start()},de=()=>{W&&(V.current=!0,K.stop())},xe=async()=>{if(!i||!b.trim()||j.current)return;const ve=b;j.current=!0,x(!0),de();try{await Nc(i,ve,!0),R==null||R(ve),Ob(ve)&&(y==null||y(ve.trim())),d(""),requestAnimationFrame(()=>J(v.current))}catch(Ke){Ke instanceof ir&&(N==null||N())}finally{j.current=!1,x(!1)}},Se=()=>g("Escape"),se=ve=>{var Ke;if(!(!m||(Ke=ve.nativeEvent)!=null&&Ke.isComposing)){if(ve.key==="Escape"&&F){ve.preventDefault(),Se();return}ve.key==="Enter"&&!ve.shiftKey&&(ve.preventDefault(),!F&&b.trim()&&xe())}},Y=ve=>{p.current={x:ve.clientX,y:ve.clientY,moved:!1}},pe=ve=>{const Ke=p.current;!Ke.moved&&Math.hypot(ve.clientX-Ke.x,ve.clientY-Ke.y)>10&&(Ke.moved=!0)},he=ve=>{var tt,Xe,Bt;const Ke=p.current;Ke.moved||Math.hypot(ve.clientX-Ke.x,ve.clientY-Ke.y)>10||(Xe=(tt=ve.target).closest)!=null&&Xe.call(tt,"button, a, input, textarea, [contenteditable]")||(Bt=v.current)==null||Bt.focus()},He=async ve=>{if(ve.kind==="key"){g(ve.text);return}if(i)try{if(await Nc(i,ve.text,!!ve.enter),!ve.enter)return;R==null||R(ve.text),Ob(ve.text)&&(y==null||y(ve.text.trim()))}catch(Ke){Ke instanceof ir&&(N==null||N())}},Oe=ve=>{if(!ve.length)return;let Ke;if(ve.length===1)Ke=ve[0];else{const tt=ve[0].slice(0,ve[0].lastIndexOf("/")+1);Ke=ve.every(Xe=>Xe.startsWith(tt))?`${tt}{${ve.map(Xe=>Xe.slice(tt.length)).join(",")}}`:ve.join(" ")}d(tt=>tt&&!/\s$/.test(tt)?`${tt} ${Ke}`:tt+Ke),requestAnimationFrame(()=>{var tt;(tt=v.current)==null||tt.focus(),J(v.current)})},{uploadFiles:et}=SE({cwd:l,onAuthFail:N,onPaths:Oe});return c.jsxDEV("div",{className:"chat-composer",onPointerDown:uP,children:[c.jsxDEV("div",{className:"cc-quick quick-scroll",children:[U.map((ve,Ke)=>c.jsxDEV("button",{type:"button",className:`quick-cmd qc-${ve.kind==="key"?"esc":dP(ve.text)}`,onClick:()=>He(ve),children:ve.kind==="key"&&ve.label||ve.text},`${gn(ve)}:${Ke}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:215,columnNumber:11},this)),c.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":O("chat.editTitle"),onClick:()=>D(!0),children:c.jsxDEV(Cf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:221,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:220,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:213,columnNumber:7},this),c.jsxDEV("input",{ref:o,className:"browse-file-input",type:"file",multiple:!0,accept:my,onChange:ve=>{const Ke=Array.from(ve.target.files||[]);ve.target.value="",et(Ke)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:224,columnNumber:7},this),c.jsxDEV("div",{className:`cc-card${W?" recording":""}`,onPointerDown:Y,onPointerMove:pe,onPointerUp:he,children:[c.jsxDEV("textarea",{ref:v,className:"cc-text",rows:1,value:b,"aria-readonly":w,onBeforeInput:ve=>{j.current&&ve.preventDefault()},onChange:ve=>{if(j.current){ve.target.value=b;return}d(ve.target.value),J(ve.target)},onKeyDown:se,placeholder:O("chat.composer.placeholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:232,columnNumber:9},this),c.jsxDEV("div",{className:"cc-actions",children:[c.jsxDEV("button",{type:"button",className:"cc-attach","aria-label":O("dock.attach"),onClick:()=>{var ve;return(ve=o.current)==null?void 0:ve.click()},children:c.jsxDEV(ry,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:257,columnNumber:56},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:256,columnNumber:11},this),c.jsxDEV("div",{className:"cc-actions-right",children:[ie&&c.jsxDEV("div",{className:`cc-ctx${q?" warn":""}`,"aria-hidden":"true",children:[I&&c.jsxDEV("span",{className:"cc-ctx-model",children:I},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:264,columnNumber:30},this),c.jsxDEV("span",{className:"cc-ctx-pct",children:[Math.round(G),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:265,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:263,columnNumber:15},this),u&&c.jsxDEV(hy,{active:W,disabled:K.state==="requesting",onToggle:oe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:268,columnNumber:30},this),F?c.jsxDEV("button",{type:"button",className:"cc-send cc-stop","aria-label":O("chat.stop"),onClick:Se,children:c.jsxDEV(OC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:271,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:270,columnNumber:15},this):c.jsxDEV("button",{type:"button",className:"cc-send","aria-label":O("dock.send"),disabled:w||!b.trim(),onClick:xe,children:c.jsxDEV(iy,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:275,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:273,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:258,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:255,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:230,columnNumber:7},this),k&&c.jsxDEV(Ab,{variant:"chat",presets:f.chat,onChange:L,onClose:()=>D(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:280,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:211,columnNumber:5},this)}function gy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let fl=gy();function CE(i){fl=i}const EE=/[&<>"']/,mP=new RegExp(EE.source,"g"),jE=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,fP=new RegExp(jE.source,"g"),pP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gS=i=>pP[i];function vs(i,r){if(r){if(EE.test(i))return i.replace(mP,gS)}else if(jE.test(i))return i.replace(fP,gS);return i}const vP=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function gP(i){return i.replace(vP,(r,l)=>(l=l.toLowerCase(),l==="colon"?":":l.charAt(0)==="#"?l.charAt(1)==="x"?String.fromCharCode(parseInt(l.substring(2),16)):String.fromCharCode(+l.substring(1)):""))}const _P=/(^|[^\[])\^/g;function li(i,r){let l=typeof i=="string"?i:i.source;r=r||"";const g={replace:(N,R)=>{let y=typeof R=="string"?R:R.source;return y=y.replace(_P,"$1"),l=l.replace(N,y),g},getRegex:()=>new RegExp(l,r)};return g}function _S(i){try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}const Ed={exec:()=>null};function bS(i,r){const l=i.replace(/\|/g,(R,y,a)=>{let u=!1,m=y;for(;--m>=0&&a[m]==="\\";)u=!u;return u?"|":" |"}),g=l.split(/ \|/);let N=0;if(g[0].trim()||g.shift(),g.length>0&&!g[g.length-1].trim()&&g.pop(),r)if(g.length>r)g.splice(r);else for(;g.length<r;)g.push("");for(;N<g.length;N++)g[N]=g[N].trim().replace(/\\\|/g,"|");return g}function lf(i,r,l){const g=i.length;if(g===0)return"";let N=0;for(;N<g&&i.charAt(g-N-1)===r;)N++;return i.slice(0,g-N)}function bP(i,r){if(i.indexOf(r[1])===-1)return-1;let l=0;for(let g=0;g<i.length;g++)if(i[g]==="\\")g++;else if(i[g]===r[0])l++;else if(i[g]===r[1]&&(l--,l<0))return g;return-1}function yS(i,r,l,g){const N=r.href,R=r.title?vs(r.title):null,y=i[1].replace(/\\([\[\]])/g,"$1");if(i[0].charAt(0)!=="!"){g.state.inLink=!0;const a={type:"link",raw:l,href:N,title:R,text:y,tokens:g.inlineTokens(y)};return g.state.inLink=!1,a}return{type:"image",raw:l,href:N,title:R,text:vs(y)}}function yP(i,r){const l=i.match(/^(\s+)(?:```)/);if(l===null)return r;const g=l[1];return r.split(`
288
+ `).map(N=>{const R=N.match(/^\s+/);if(R===null)return N;const[y]=R;return y.length>=g.length?N.slice(g.length):N}).join(`
289
+ `)}class Tf{constructor(r){bi(this,"options");bi(this,"rules");bi(this,"lexer");this.options=r||fl}space(r){const l=this.rules.block.newline.exec(r);if(l&&l[0].length>0)return{type:"space",raw:l[0]}}code(r){const l=this.rules.block.code.exec(r);if(l){const g=l[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:l[0],codeBlockStyle:"indented",text:this.options.pedantic?g:lf(g,`
290
+ `)}}}fences(r){const l=this.rules.block.fences.exec(r);if(l){const g=l[0],N=yP(g,l[3]||"");return{type:"code",raw:g,lang:l[2]?l[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):l[2],text:N}}}heading(r){const l=this.rules.block.heading.exec(r);if(l){let g=l[2].trim();if(/#$/.test(g)){const N=lf(g,"#");(this.options.pedantic||!N||/ $/.test(N))&&(g=N.trim())}return{type:"heading",raw:l[0],depth:l[1].length,text:g,tokens:this.lexer.inline(g)}}}hr(r){const l=this.rules.block.hr.exec(r);if(l)return{type:"hr",raw:l[0]}}blockquote(r){const l=this.rules.block.blockquote.exec(r);if(l){let g=l[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
291
+ $1`);g=lf(g.replace(/^ *>[ \t]?/gm,""),`
292
+ `);const N=this.lexer.state.top;this.lexer.state.top=!0;const R=this.lexer.blockTokens(g);return this.lexer.state.top=N,{type:"blockquote",raw:l[0],tokens:R,text:g}}}list(r){let l=this.rules.block.list.exec(r);if(l){let g=l[1].trim();const N=g.length>1,R={type:"list",raw:"",ordered:N,start:N?+g.slice(0,-1):"",loose:!1,items:[]};g=N?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=N?g:"[*+-]");const y=new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);let a="",u="",m=!1;for(;r;){let b=!1;if(!(l=y.exec(r))||this.rules.block.hr.test(r))break;a=l[0],r=r.substring(a.length);let d=l[2].split(`
293
+ `,1)[0].replace(/^\t+/,p=>" ".repeat(3*p.length)),w=r.split(`
294
+ `,1)[0],x=0;this.options.pedantic?(x=2,u=d.trimStart()):(x=l[2].search(/[^ ]/),x=x>4?1:x,u=d.slice(x),x+=l[1].length);let j=!1;if(!d&&/^ *$/.test(w)&&(a+=w+`
295
+ `,r=r.substring(w.length+1),b=!0),!b){const p=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),_=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,x-1)}}#`);for(;r;){const T=r.split(`
296
+ `,1)[0];if(w=T,this.options.pedantic&&(w=w.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),_.test(w)||E.test(w)||p.test(w)||f.test(r))break;if(w.search(/[^ ]/)>=x||!w.trim())u+=`
297
+ `+w.slice(x);else{if(j||d.search(/[^ ]/)>=4||_.test(d)||E.test(d)||f.test(d))break;u+=`
298
+ `+w}!j&&!w.trim()&&(j=!0),a+=T+`
299
+ `,r=r.substring(T.length+1),d=w.slice(x)}}R.loose||(m?R.loose=!0:/\n *\n *$/.test(a)&&(m=!0));let v=null,o;this.options.gfm&&(v=/^\[[ xX]\] /.exec(u),v&&(o=v[0]!=="[ ] ",u=u.replace(/^\[[ xX]\] +/,""))),R.items.push({type:"list_item",raw:a,task:!!v,checked:o,loose:!1,text:u,tokens:[]}),R.raw+=a}R.items[R.items.length-1].raw=a.trimEnd(),R.items[R.items.length-1].text=u.trimEnd(),R.raw=R.raw.trimEnd();for(let b=0;b<R.items.length;b++)if(this.lexer.state.top=!1,R.items[b].tokens=this.lexer.blockTokens(R.items[b].text,[]),!R.loose){const d=R.items[b].tokens.filter(x=>x.type==="space"),w=d.length>0&&d.some(x=>/\n.*\n/.test(x.raw));R.loose=w}if(R.loose)for(let b=0;b<R.items.length;b++)R.items[b].loose=!0;return R}}html(r){const l=this.rules.block.html.exec(r);if(l)return{type:"html",block:!0,raw:l[0],pre:l[1]==="pre"||l[1]==="script"||l[1]==="style",text:l[0]}}def(r){const l=this.rules.block.def.exec(r);if(l){const g=l[1].toLowerCase().replace(/\s+/g," "),N=l[2]?l[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",R=l[3]?l[3].substring(1,l[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):l[3];return{type:"def",tag:g,raw:l[0],href:N,title:R}}}table(r){const l=this.rules.block.table.exec(r);if(!l||!/[:|]/.test(l[2]))return;const g=bS(l[1]),N=l[2].replace(/^\||\| *$/g,"").split("|"),R=l[3]&&l[3].trim()?l[3].replace(/\n[ \t]*$/,"").split(`
300
+ `):[],y={type:"table",raw:l[0],header:[],align:[],rows:[]};if(g.length===N.length){for(const a of N)/^ *-+: *$/.test(a)?y.align.push("right"):/^ *:-+: *$/.test(a)?y.align.push("center"):/^ *:-+ *$/.test(a)?y.align.push("left"):y.align.push(null);for(const a of g)y.header.push({text:a,tokens:this.lexer.inline(a)});for(const a of R)y.rows.push(bS(a,y.header.length).map(u=>({text:u,tokens:this.lexer.inline(u)})));return y}}lheading(r){const l=this.rules.block.lheading.exec(r);if(l)return{type:"heading",raw:l[0],depth:l[2].charAt(0)==="="?1:2,text:l[1],tokens:this.lexer.inline(l[1])}}paragraph(r){const l=this.rules.block.paragraph.exec(r);if(l){const g=l[1].charAt(l[1].length-1)===`
301
+ `?l[1].slice(0,-1):l[1];return{type:"paragraph",raw:l[0],text:g,tokens:this.lexer.inline(g)}}}text(r){const l=this.rules.block.text.exec(r);if(l)return{type:"text",raw:l[0],text:l[0],tokens:this.lexer.inline(l[0])}}escape(r){const l=this.rules.inline.escape.exec(r);if(l)return{type:"escape",raw:l[0],text:vs(l[1])}}tag(r){const l=this.rules.inline.tag.exec(r);if(l)return!this.lexer.state.inLink&&/^<a /i.test(l[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(l[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(l[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(l[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:l[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:l[0]}}link(r){const l=this.rules.inline.link.exec(r);if(l){const g=l[2].trim();if(!this.options.pedantic&&/^</.test(g)){if(!/>$/.test(g))return;const y=lf(g.slice(0,-1),"\\");if((g.length-y.length)%2===0)return}else{const y=bP(l[2],"()");if(y>-1){const u=(l[0].indexOf("!")===0?5:4)+l[1].length+y;l[2]=l[2].substring(0,y),l[0]=l[0].substring(0,u).trim(),l[3]=""}}let N=l[2],R="";if(this.options.pedantic){const y=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(N);y&&(N=y[1],R=y[3])}else R=l[3]?l[3].slice(1,-1):"";return N=N.trim(),/^</.test(N)&&(this.options.pedantic&&!/>$/.test(g)?N=N.slice(1):N=N.slice(1,-1)),yS(l,{href:N&&N.replace(this.rules.inline.anyPunctuation,"$1"),title:R&&R.replace(this.rules.inline.anyPunctuation,"$1")},l[0],this.lexer)}}reflink(r,l){let g;if((g=this.rules.inline.reflink.exec(r))||(g=this.rules.inline.nolink.exec(r))){const N=(g[2]||g[1]).replace(/\s+/g," "),R=l[N.toLowerCase()];if(!R){const y=g[0].charAt(0);return{type:"text",raw:y,text:y}}return yS(g,R,g[0],this.lexer)}}emStrong(r,l,g=""){let N=this.rules.inline.emStrongLDelim.exec(r);if(!N||N[3]&&g.match(/[\p{L}\p{N}]/u))return;if(!(N[1]||N[2]||"")||!g||this.rules.inline.punctuation.exec(g)){const y=[...N[0]].length-1;let a,u,m=y,b=0;const d=N[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,l=l.slice(-1*r.length+y);(N=d.exec(l))!=null;){if(a=N[1]||N[2]||N[3]||N[4]||N[5]||N[6],!a)continue;if(u=[...a].length,N[3]||N[4]){m+=u;continue}else if((N[5]||N[6])&&y%3&&!((y+u)%3)){b+=u;continue}if(m-=u,m>0)continue;u=Math.min(u,u+m+b);const w=[...N[0]][0].length,x=r.slice(0,y+N.index+w+u);if(Math.min(y,u)%2){const v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}const j=x.slice(2,-2);return{type:"strong",raw:x,text:j,tokens:this.lexer.inlineTokens(j)}}}}codespan(r){const l=this.rules.inline.code.exec(r);if(l){let g=l[2].replace(/\n/g," ");const N=/[^ ]/.test(g),R=/^ /.test(g)&&/ $/.test(g);return N&&R&&(g=g.substring(1,g.length-1)),g=vs(g,!0),{type:"codespan",raw:l[0],text:g}}}br(r){const l=this.rules.inline.br.exec(r);if(l)return{type:"br",raw:l[0]}}del(r){const l=this.rules.inline.del.exec(r);if(l)return{type:"del",raw:l[0],text:l[2],tokens:this.lexer.inlineTokens(l[2])}}autolink(r){const l=this.rules.inline.autolink.exec(r);if(l){let g,N;return l[2]==="@"?(g=vs(l[1]),N="mailto:"+g):(g=vs(l[1]),N=g),{type:"link",raw:l[0],text:g,href:N,tokens:[{type:"text",raw:g,text:g}]}}}url(r){var g;let l;if(l=this.rules.inline.url.exec(r)){let N,R;if(l[2]==="@")N=vs(l[0]),R="mailto:"+N;else{let y;do y=l[0],l[0]=((g=this.rules.inline._backpedal.exec(l[0]))==null?void 0:g[0])??"";while(y!==l[0]);N=vs(l[0]),l[1]==="www."?R="http://"+l[0]:R=l[0]}return{type:"link",raw:l[0],text:N,href:R,tokens:[{type:"text",raw:N,text:N}]}}}inlineText(r){const l=this.rules.inline.text.exec(r);if(l){let g;return this.lexer.state.inRawBlock?g=l[0]:g=vs(l[0]),{type:"text",raw:l[0],text:g}}}}const wP=/^(?: *(?:\n|$))+/,xP=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,NP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,SP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,DE=/(?:[*+-]|\d{1,9}[.)])/,kE=li(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,DE).replace(/blockCode/g,/ {4}/).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/).getRegex(),_y=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,CP=/^[^\n]+/,by=/(?!\s*\])(?:\\.|[^\[\]\\])+/,EP=li(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",by).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jP=li(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,DE).getRegex(),Gf="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",yy=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,DP=li("^ {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",yy).replace("tag",Gf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),RE=li(_y).replace("hr",Vd).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",Gf).getRegex(),kP=li(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",RE).getRegex(),wy={blockquote:kP,code:xP,def:EP,fences:NP,heading:SP,hr:Vd,html:DP,lheading:kE,list:jP,newline:wP,paragraph:RE,table:Ed,text:CP},wS=li("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",Gf).getRegex(),RP={...wy,table:wS,paragraph:li(_y).replace("hr",Vd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wS).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",Gf).getRegex()},TP={...wy,html:li(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yy).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:Ed,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:li(_y).replace("hr",Vd).replace("heading",` *#{1,6} *[^
302
+ ]`).replace("lheading",kE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},TE=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,LP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,LE=/^( {2,}|\\)\n(?!\s*$)/,AP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Id="\\p{P}\\p{S}",MP=li(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Id).getRegex(),UP=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,OP=li(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Id).getRegex(),PP=li("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Id).getRegex(),VP=li("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Id).getRegex(),IP=li(/\\([punct])/,"gu").replace(/punct/g,Id).getRegex(),BP=li(/^<(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(),FP=li(yy).replace("(?:-->|$)","-->").getRegex(),HP=li("^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",FP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Lf=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,zP=li(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Lf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),AE=li(/^!?\[(label)\]\[(ref)\]/).replace("label",Lf).replace("ref",by).getRegex(),ME=li(/^!?\[(ref)\](?:\[\])?/).replace("ref",by).getRegex(),$P=li("reflink|nolink(?!\\()","g").replace("reflink",AE).replace("nolink",ME).getRegex(),xy={_backpedal:Ed,anyPunctuation:IP,autolink:BP,blockSkip:UP,br:LE,code:LP,del:Ed,emStrongLDelim:OP,emStrongRDelimAst:PP,emStrongRDelimUnd:VP,escape:TE,link:zP,nolink:ME,punctuation:MP,reflink:AE,reflinkSearch:$P,tag:HP,text:AP,url:Ed},WP={...xy,link:li(/^!?\[(label)\]\((.*?)\)/).replace("label",Lf).getRegex(),reflink:li(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Lf).getRegex()},Pb={...xy,escape:li(TE).replace("])","~|])").getRegex(),url:li(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},GP={...Pb,br:li(LE).replace("{2,}","*").getRegex(),text:li(Pb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},cf={normal:wy,gfm:RP,pedantic:TP},fd={normal:xy,gfm:Pb,breaks:GP,pedantic:WP};class ua{constructor(r){bi(this,"tokens");bi(this,"options");bi(this,"state");bi(this,"tokenizer");bi(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=r||fl,this.options.tokenizer=this.options.tokenizer||new Tf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const l={block:cf.normal,inline:fd.normal};this.options.pedantic?(l.block=cf.pedantic,l.inline=fd.pedantic):this.options.gfm&&(l.block=cf.gfm,this.options.breaks?l.inline=fd.breaks:l.inline=fd.gfm),this.tokenizer.rules=l}static get rules(){return{block:cf,inline:fd}}static lex(r,l){return new ua(l).lex(r)}static lexInline(r,l){return new ua(l).inlineTokens(r)}lex(r){r=r.replace(/\r\n|\r/g,`
303
+ `),this.blockTokens(r,this.tokens);for(let l=0;l<this.inlineQueue.length;l++){const g=this.inlineQueue[l];this.inlineTokens(g.src,g.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(r,l=[]){this.options.pedantic?r=r.replace(/\t/g," ").replace(/^ +$/gm,""):r=r.replace(/^( *)(\t+)/gm,(a,u,m)=>u+" ".repeat(m.length));let g,N,R,y;for(;r;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(g=a.call({lexer:this},r,l))?(r=r.substring(g.raw.length),l.push(g),!0):!1))){if(g=this.tokenizer.space(r)){r=r.substring(g.raw.length),g.raw.length===1&&l.length>0?l[l.length-1].raw+=`
304
+ `:l.push(g);continue}if(g=this.tokenizer.code(r)){r=r.substring(g.raw.length),N=l[l.length-1],N&&(N.type==="paragraph"||N.type==="text")?(N.raw+=`
305
+ `+g.raw,N.text+=`
306
+ `+g.text,this.inlineQueue[this.inlineQueue.length-1].src=N.text):l.push(g);continue}if(g=this.tokenizer.fences(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.heading(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.hr(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.blockquote(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.list(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.html(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.def(r)){r=r.substring(g.raw.length),N=l[l.length-1],N&&(N.type==="paragraph"||N.type==="text")?(N.raw+=`
307
+ `+g.raw,N.text+=`
308
+ `+g.raw,this.inlineQueue[this.inlineQueue.length-1].src=N.text):this.tokens.links[g.tag]||(this.tokens.links[g.tag]={href:g.href,title:g.title});continue}if(g=this.tokenizer.table(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.lheading(r)){r=r.substring(g.raw.length),l.push(g);continue}if(R=r,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const u=r.slice(1);let m;this.options.extensions.startBlock.forEach(b=>{m=b.call({lexer:this},u),typeof m=="number"&&m>=0&&(a=Math.min(a,m))}),a<1/0&&a>=0&&(R=r.substring(0,a+1))}if(this.state.top&&(g=this.tokenizer.paragraph(R))){N=l[l.length-1],y&&N.type==="paragraph"?(N.raw+=`
309
+ `+g.raw,N.text+=`
310
+ `+g.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=N.text):l.push(g),y=R.length!==r.length,r=r.substring(g.raw.length);continue}if(g=this.tokenizer.text(r)){r=r.substring(g.raw.length),N=l[l.length-1],N&&N.type==="text"?(N.raw+=`
311
+ `+g.raw,N.text+=`
312
+ `+g.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=N.text):l.push(g);continue}if(r){const a="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,l}inline(r,l=[]){return this.inlineQueue.push({src:r,tokens:l}),l}inlineTokens(r,l=[]){let g,N,R,y=r,a,u,m;if(this.tokens.links){const b=Object.keys(this.tokens.links);if(b.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(y))!=null;)b.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(y=y.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(y))!=null;)y=y.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(y))!=null;)y=y.slice(0,a.index)+"++"+y.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;r;)if(u||(m=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(b=>(g=b.call({lexer:this},r,l))?(r=r.substring(g.raw.length),l.push(g),!0):!1))){if(g=this.tokenizer.escape(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.tag(r)){r=r.substring(g.raw.length),N=l[l.length-1],N&&g.type==="text"&&N.type==="text"?(N.raw+=g.raw,N.text+=g.text):l.push(g);continue}if(g=this.tokenizer.link(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.reflink(r,this.tokens.links)){r=r.substring(g.raw.length),N=l[l.length-1],N&&g.type==="text"&&N.type==="text"?(N.raw+=g.raw,N.text+=g.text):l.push(g);continue}if(g=this.tokenizer.emStrong(r,y,m)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.codespan(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.br(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.del(r)){r=r.substring(g.raw.length),l.push(g);continue}if(g=this.tokenizer.autolink(r)){r=r.substring(g.raw.length),l.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(r))){r=r.substring(g.raw.length),l.push(g);continue}if(R=r,this.options.extensions&&this.options.extensions.startInline){let b=1/0;const d=r.slice(1);let w;this.options.extensions.startInline.forEach(x=>{w=x.call({lexer:this},d),typeof w=="number"&&w>=0&&(b=Math.min(b,w))}),b<1/0&&b>=0&&(R=r.substring(0,b+1))}if(g=this.tokenizer.inlineText(R)){r=r.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(m=g.raw.slice(-1)),u=!0,N=l[l.length-1],N&&N.type==="text"?(N.raw+=g.raw,N.text+=g.text):l.push(g);continue}if(r){const b="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return l}}class Af{constructor(r){bi(this,"options");this.options=r||fl}code(r,l,g){var R;const N=(R=(l||"").match(/^\S*/))==null?void 0:R[0];return r=r.replace(/\n$/,"")+`
313
+ `,N?'<pre><code class="language-'+vs(N)+'">'+(g?r:vs(r,!0))+`</code></pre>
314
+ `:"<pre><code>"+(g?r:vs(r,!0))+`</code></pre>
315
+ `}blockquote(r){return`<blockquote>
316
+ ${r}</blockquote>
317
+ `}html(r,l){return r}heading(r,l,g){return`<h${l}>${r}</h${l}>
318
+ `}hr(){return`<hr>
319
+ `}list(r,l,g){const N=l?"ol":"ul",R=l&&g!==1?' start="'+g+'"':"";return"<"+N+R+`>
320
+ `+r+"</"+N+`>
321
+ `}listitem(r,l,g){return`<li>${r}</li>
322
+ `}checkbox(r){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(r){return`<p>${r}</p>
323
+ `}table(r,l){return l&&(l=`<tbody>${l}</tbody>`),`<table>
324
+ <thead>
325
+ `+r+`</thead>
326
+ `+l+`</table>
327
+ `}tablerow(r){return`<tr>
328
+ ${r}</tr>
329
+ `}tablecell(r,l){const g=l.header?"th":"td";return(l.align?`<${g} align="${l.align}">`:`<${g}>`)+r+`</${g}>
330
+ `}strong(r){return`<strong>${r}</strong>`}em(r){return`<em>${r}</em>`}codespan(r){return`<code>${r}</code>`}br(){return"<br>"}del(r){return`<del>${r}</del>`}link(r,l,g){const N=_S(r);if(N===null)return g;r=N;let R='<a href="'+r+'"';return l&&(R+=' title="'+l+'"'),R+=">"+g+"</a>",R}image(r,l,g){const N=_S(r);if(N===null)return g;r=N;let R=`<img src="${r}" alt="${g}"`;return l&&(R+=` title="${l}"`),R+=">",R}text(r){return r}}class Ny{strong(r){return r}em(r){return r}codespan(r){return r}del(r){return r}html(r){return r}text(r){return r}link(r,l,g){return""+g}image(r,l,g){return""+g}br(){return""}}class da{constructor(r){bi(this,"options");bi(this,"renderer");bi(this,"textRenderer");this.options=r||fl,this.options.renderer=this.options.renderer||new Af,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ny}static parse(r,l){return new da(l).parse(r)}static parseInline(r,l){return new da(l).parseInline(r)}parse(r,l=!0){let g="";for(let N=0;N<r.length;N++){const R=r[N];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[R.type]){const y=R,a=this.options.extensions.renderers[y.type].call({parser:this},y);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(y.type)){g+=a||"";continue}}switch(R.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{const y=R;g+=this.renderer.heading(this.parseInline(y.tokens),y.depth,gP(this.parseInline(y.tokens,this.textRenderer)));continue}case"code":{const y=R;g+=this.renderer.code(y.text,y.lang,!!y.escaped);continue}case"table":{const y=R;let a="",u="";for(let b=0;b<y.header.length;b++)u+=this.renderer.tablecell(this.parseInline(y.header[b].tokens),{header:!0,align:y.align[b]});a+=this.renderer.tablerow(u);let m="";for(let b=0;b<y.rows.length;b++){const d=y.rows[b];u="";for(let w=0;w<d.length;w++)u+=this.renderer.tablecell(this.parseInline(d[w].tokens),{header:!1,align:y.align[w]});m+=this.renderer.tablerow(u)}g+=this.renderer.table(a,m);continue}case"blockquote":{const y=R,a=this.parse(y.tokens);g+=this.renderer.blockquote(a);continue}case"list":{const y=R,a=y.ordered,u=y.start,m=y.loose;let b="";for(let d=0;d<y.items.length;d++){const w=y.items[d],x=w.checked,j=w.task;let v="";if(w.task){const o=this.renderer.checkbox(!!x);m?w.tokens.length>0&&w.tokens[0].type==="paragraph"?(w.tokens[0].text=o+" "+w.tokens[0].text,w.tokens[0].tokens&&w.tokens[0].tokens.length>0&&w.tokens[0].tokens[0].type==="text"&&(w.tokens[0].tokens[0].text=o+" "+w.tokens[0].tokens[0].text)):w.tokens.unshift({type:"text",text:o+" "}):v+=o+" "}v+=this.parse(w.tokens,m),b+=this.renderer.listitem(v,j,!!x)}g+=this.renderer.list(b,a,u);continue}case"html":{const y=R;g+=this.renderer.html(y.text,y.block);continue}case"paragraph":{const y=R;g+=this.renderer.paragraph(this.parseInline(y.tokens));continue}case"text":{let y=R,a=y.tokens?this.parseInline(y.tokens):y.text;for(;N+1<r.length&&r[N+1].type==="text";)y=r[++N],a+=`
331
+ `+(y.tokens?this.parseInline(y.tokens):y.text);g+=l?this.renderer.paragraph(a):a;continue}default:{const y='Token with "'+R.type+'" type was not found.';if(this.options.silent)return console.error(y),"";throw new Error(y)}}}return g}parseInline(r,l){l=l||this.renderer;let g="";for(let N=0;N<r.length;N++){const R=r[N];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[R.type]){const y=this.options.extensions.renderers[R.type].call({parser:this},R);if(y!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(R.type)){g+=y||"";continue}}switch(R.type){case"escape":{const y=R;g+=l.text(y.text);break}case"html":{const y=R;g+=l.html(y.text);break}case"link":{const y=R;g+=l.link(y.href,y.title,this.parseInline(y.tokens,l));break}case"image":{const y=R;g+=l.image(y.href,y.title,y.text);break}case"strong":{const y=R;g+=l.strong(this.parseInline(y.tokens,l));break}case"em":{const y=R;g+=l.em(this.parseInline(y.tokens,l));break}case"codespan":{const y=R;g+=l.codespan(y.text);break}case"br":{g+=l.br();break}case"del":{const y=R;g+=l.del(this.parseInline(y.tokens,l));break}case"text":{const y=R;g+=l.text(y.text);break}default:{const y='Token with "'+R.type+'" type was not found.';if(this.options.silent)return console.error(y),"";throw new Error(y)}}}return g}}class jd{constructor(r){bi(this,"options");this.options=r||fl}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}}bi(jd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var dl,Vb,UE;class YP{constructor(...r){u1(this,dl);bi(this,"defaults",gy());bi(this,"options",this.setOptions);bi(this,"parse",tf(this,dl,Vb).call(this,ua.lex,da.parse));bi(this,"parseInline",tf(this,dl,Vb).call(this,ua.lexInline,da.parseInline));bi(this,"Parser",da);bi(this,"Renderer",Af);bi(this,"TextRenderer",Ny);bi(this,"Lexer",ua);bi(this,"Tokenizer",Tf);bi(this,"Hooks",jd);this.use(...r)}walkTokens(r,l){var N,R;let g=[];for(const y of r)switch(g=g.concat(l.call(this,y)),y.type){case"table":{const a=y;for(const u of a.header)g=g.concat(this.walkTokens(u.tokens,l));for(const u of a.rows)for(const m of u)g=g.concat(this.walkTokens(m.tokens,l));break}case"list":{const a=y;g=g.concat(this.walkTokens(a.items,l));break}default:{const a=y;(R=(N=this.defaults.extensions)==null?void 0:N.childTokens)!=null&&R[a.type]?this.defaults.extensions.childTokens[a.type].forEach(u=>{const m=a[u].flat(1/0);g=g.concat(this.walkTokens(m,l))}):a.tokens&&(g=g.concat(this.walkTokens(a.tokens,l)))}}return g}use(...r){const l=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(g=>{const N={...g};if(N.async=this.defaults.async||N.async||!1,g.extensions&&(g.extensions.forEach(R=>{if(!R.name)throw new Error("extension name required");if("renderer"in R){const y=l.renderers[R.name];y?l.renderers[R.name]=function(...a){let u=R.renderer.apply(this,a);return u===!1&&(u=y.apply(this,a)),u}:l.renderers[R.name]=R.renderer}if("tokenizer"in R){if(!R.level||R.level!=="block"&&R.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const y=l[R.level];y?y.unshift(R.tokenizer):l[R.level]=[R.tokenizer],R.start&&(R.level==="block"?l.startBlock?l.startBlock.push(R.start):l.startBlock=[R.start]:R.level==="inline"&&(l.startInline?l.startInline.push(R.start):l.startInline=[R.start]))}"childTokens"in R&&R.childTokens&&(l.childTokens[R.name]=R.childTokens)}),N.extensions=l),g.renderer){const R=this.defaults.renderer||new Af(this.defaults);for(const y in g.renderer){if(!(y in R))throw new Error(`renderer '${y}' does not exist`);if(y==="options")continue;const a=y,u=g.renderer[a],m=R[a];R[a]=(...b)=>{let d=u.apply(R,b);return d===!1&&(d=m.apply(R,b)),d||""}}N.renderer=R}if(g.tokenizer){const R=this.defaults.tokenizer||new Tf(this.defaults);for(const y in g.tokenizer){if(!(y in R))throw new Error(`tokenizer '${y}' does not exist`);if(["options","rules","lexer"].includes(y))continue;const a=y,u=g.tokenizer[a],m=R[a];R[a]=(...b)=>{let d=u.apply(R,b);return d===!1&&(d=m.apply(R,b)),d}}N.tokenizer=R}if(g.hooks){const R=this.defaults.hooks||new jd;for(const y in g.hooks){if(!(y in R))throw new Error(`hook '${y}' does not exist`);if(y==="options")continue;const a=y,u=g.hooks[a],m=R[a];jd.passThroughHooks.has(y)?R[a]=b=>{if(this.defaults.async)return Promise.resolve(u.call(R,b)).then(w=>m.call(R,w));const d=u.call(R,b);return m.call(R,d)}:R[a]=(...b)=>{let d=u.apply(R,b);return d===!1&&(d=m.apply(R,b)),d}}N.hooks=R}if(g.walkTokens){const R=this.defaults.walkTokens,y=g.walkTokens;N.walkTokens=function(a){let u=[];return u.push(y.call(this,a)),R&&(u=u.concat(R.call(this,a))),u}}this.defaults={...this.defaults,...N}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,l){return ua.lex(r,l??this.defaults)}parser(r,l){return da.parse(r,l??this.defaults)}}dl=new WeakSet,Vb=function(r,l){return(g,N)=>{const R={...N},y={...this.defaults,...R};this.defaults.async===!0&&R.async===!1&&(y.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),y.async=!0);const a=tf(this,dl,UE).call(this,!!y.silent,!!y.async);if(typeof g>"u"||g===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof g!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(g)+", string expected"));if(y.hooks&&(y.hooks.options=y),y.async)return Promise.resolve(y.hooks?y.hooks.preprocess(g):g).then(u=>r(u,y)).then(u=>y.hooks?y.hooks.processAllTokens(u):u).then(u=>y.walkTokens?Promise.all(this.walkTokens(u,y.walkTokens)).then(()=>u):u).then(u=>l(u,y)).then(u=>y.hooks?y.hooks.postprocess(u):u).catch(a);try{y.hooks&&(g=y.hooks.preprocess(g));let u=r(g,y);y.hooks&&(u=y.hooks.processAllTokens(u)),y.walkTokens&&this.walkTokens(u,y.walkTokens);let m=l(u,y);return y.hooks&&(m=y.hooks.postprocess(m)),m}catch(u){return a(u)}}},UE=function(r,l){return g=>{if(g.message+=`
332
+ Please report this to https://github.com/markedjs/marked.`,r){const N="<p>An error occurred:</p><pre>"+vs(g.message+"",!0)+"</pre>";return l?Promise.resolve(N):N}if(l)return Promise.reject(g);throw g}};const ul=new YP;function ri(i,r){return ul.parse(i,r)}ri.options=ri.setOptions=function(i){return ul.setOptions(i),ri.defaults=ul.defaults,CE(ri.defaults),ri};ri.getDefaults=gy;ri.defaults=fl;ri.use=function(...i){return ul.use(...i),ri.defaults=ul.defaults,CE(ri.defaults),ri};ri.walkTokens=function(i,r){return ul.walkTokens(i,r)};ri.parseInline=ul.parseInline;ri.Parser=da;ri.parser=da.parse;ri.Renderer=Af;ri.TextRenderer=Ny;ri.Lexer=ua;ri.lexer=ua.lex;ri.Tokenizer=Tf;ri.Hooks=jd;ri.parse=ri;ri.options;ri.setOptions;ri.use;ri.walkTokens;ri.parseInline;da.parse;ua.lex;/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function xS(i,r){(r==null||r>i.length)&&(r=i.length);for(var l=0,g=Array(r);l<r;l++)g[l]=i[l];return g}function qP(i){if(Array.isArray(i))return i}function KP(i,r){var l=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(l!=null){var g,N,R,y,a=[],u=!0,m=!1;try{if(R=(l=l.call(i)).next,r!==0)for(;!(u=(g=R.call(l)).done)&&(a.push(g.value),a.length!==r);u=!0);}catch(b){m=!0,N=b}finally{try{if(!u&&l.return!=null&&(y=l.return(),Object(y)!==y))return}finally{if(m)throw N}}return a}}function XP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
333
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JP(i,r){return qP(i)||KP(i,r)||ZP(i,r)||XP()}function ZP(i,r){if(i){if(typeof i=="string")return xS(i,r);var l={}.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?xS(i,r):void 0}}const OE=Object.entries,NS=Object.setPrototypeOf,QP=Object.isFrozen,eV=Object.getPrototypeOf,tV=Object.getOwnPropertyDescriptor;let Kr=Object.freeze,Ds=Object.seal,yc=Object.create,PE=typeof Reflect<"u"&&Reflect,Ib=PE.apply,Bb=PE.construct;Kr||(Kr=function(r){return r});Ds||(Ds=function(r){return r});Ib||(Ib=function(r,l){for(var g=arguments.length,N=new Array(g>2?g-2:0),R=2;R<g;R++)N[R-2]=arguments[R];return r.apply(l,N)});Bb||(Bb=function(r){for(var l=arguments.length,g=new Array(l>1?l-1:0),N=1;N<l;N++)g[N-1]=arguments[N];return new r(...g)});const Zo=Wi(Array.prototype.forEach),nV=Wi(Array.prototype.lastIndexOf),SS=Wi(Array.prototype.pop),vc=Wi(Array.prototype.push),iV=Wi(Array.prototype.splice),Yr=Array.isArray,yd=Wi(String.prototype.toLowerCase),ab=Wi(String.prototype.toString),CS=Wi(String.prototype.match),gc=Wi(String.prototype.replace),ES=Wi(String.prototype.indexOf),rV=Wi(String.prototype.trim),sV=Wi(Number.prototype.toString),aV=Wi(Boolean.prototype.toString),jS=typeof BigInt>"u"?null:Wi(BigInt.prototype.toString),DS=typeof Symbol>"u"?null:Wi(Symbol.prototype.toString),Mi=Wi(Object.prototype.hasOwnProperty),pd=Wi(Object.prototype.toString),jr=Wi(RegExp.prototype.test),_c=oV(TypeError);function Wi(i){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var l=arguments.length,g=new Array(l>1?l-1:0),N=1;N<l;N++)g[N-1]=arguments[N];return Ib(i,r,g)}}function oV(i){return function(){for(var r=arguments.length,l=new Array(r),g=0;g<r;g++)l[g]=arguments[g];return Bb(i,l)}}function vn(i,r){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yd;if(NS&&NS(i,null),!Yr(r))return i;let g=r.length;for(;g--;){let N=r[g];if(typeof N=="string"){const R=l(N);R!==N&&(QP(r)||(r[g]=R),N=R)}i[N]=!0}return i}function lV(i){for(let r=0;r<i.length;r++)Mi(i,r)||(i[r]=null);return i}function Pr(i){const r=yc(null);for(const g of OE(i)){var l=JP(g,2);const N=l[0],R=l[1];Mi(i,N)&&(Yr(R)?r[N]=lV(R):R&&typeof R=="object"&&R.constructor===Object?r[N]=Pr(R):r[N]=R)}return r}function cV(i){switch(typeof i){case"string":return i;case"number":return sV(i);case"boolean":return aV(i);case"bigint":return jS?jS(i):"0";case"symbol":return DS?DS(i):"Symbol()";case"undefined":return pd(i);case"function":case"object":{if(i===null)return pd(i);const r=i,l=ca(r,"toString");if(typeof l=="function"){const g=l(r);return typeof g=="string"?g:pd(g)}return pd(i)}default:return pd(i)}}function ca(i,r){for(;i!==null;){const g=tV(i,r);if(g){if(g.get)return Wi(g.get);if(typeof g.value=="function")return Wi(g.value)}i=eV(i)}function l(){return null}return l}function uV(i){try{return jr(i,""),!0}catch{return!1}}const kS=Kr(["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"]),ob=Kr(["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"]),lb=Kr(["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"]),dV=Kr(["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"]),cb=Kr(["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"]),hV=Kr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),RS=Kr(["#text"]),TS=Kr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),ub=Kr(["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"]),LS=Kr(["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"]),uf=Kr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mV=Ds(/{{[\w\W]*|^[\w\W]*}}/g),fV=Ds(/<%[\w\W]*|^[\w\W]*%>/g),pV=Ds(/\${[\w\W]*/g),vV=Ds(/^data-[\-\w.\u00B7-\uFFFF]+$/),gV=Ds(/^aria-[\-\w]+$/),AS=Ds(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_V=Ds(/^(?:\w+script|data):/i),bV=Ds(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yV=Ds(/^html$/i),wV=Ds(/^[a-z][.\w]*(-[.\w]+)+$/i),la={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},xV=function(){return typeof window>"u"?null:window},NV=function(r,l){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let g=null;const N="data-tt-policy-suffix";l&&l.hasAttribute(N)&&(g=l.getAttribute(N));const R="dompurify"+(g?"#"+g:"");try{return r.createPolicy(R,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+R+" could not be created."),null}},MS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function VE(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xV();const r=ht=>VE(ht);if(r.version="3.4.8",r.removed=[],!i||!i.document||i.document.nodeType!==la.document||!i.Element)return r.isSupported=!1,r;let l=i.document;const g=l,N=g.currentScript;i.DocumentFragment;const R=i.HTMLTemplateElement,y=i.Node,a=i.Element,u=i.NodeFilter,m=i.NamedNodeMap;m===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const b=i.DOMParser,d=i.trustedTypes,w=a.prototype,x=ca(w,"cloneNode"),j=ca(w,"remove"),v=ca(w,"nextSibling"),o=ca(w,"childNodes"),p=ca(w,"parentNode"),f=ca(w,"shadowRoot"),_=ca(w,"attributes"),E=y&&y.prototype?ca(y.prototype,"nodeType"):null,T=y&&y.prototype?ca(y.prototype,"nodeName"):null;if(typeof R=="function"){const ht=l.createElement("template");ht.content&&ht.content.ownerDocument&&(l=ht.content.ownerDocument)}let S,k="",D=0;const L=function(re){if(D>0)throw _c('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');D++;try{return S.createHTML(re)}finally{D--}},U=l,F=U.implementation,P=U.createNodeIterator,I=U.createDocumentFragment,G=U.getElementsByTagName,ie=g.importNode;let q=MS();r.isSupported=typeof OE=="function"&&typeof p=="function"&&F&&F.createHTMLDocument!==void 0;const J=mV,X=fV,V=pV,H=vV,K=gV,W=_V,oe=bV,de=wV;let xe=AS,Se=null;const se=vn({},[...kS,...ob,...lb,...cb,...RS]);let Y=null;const pe=vn({},[...TS,...ub,...LS,...uf]);let he=Object.seal(yc(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}})),He=null,Oe=null;const et=Object.seal(yc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ve=!0,Ke=!0,tt=!1,Xe=!0,Bt=!1,Tt=!0,le=!1,Re=!1,ze=!1,Me=!1,$e=!1,at=!1,ct=!0,Te=!1;const we="user-content-";let Je=!0,_e=!1,Z={},Pe=null;const xt=vn({},["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 Ot=null;const At=vn({},["audio","video","img","source","image","track"]);let Vt=null;const cn=vn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_n="http://www.w3.org/1998/Math/MathML",Kt="http://www.w3.org/2000/svg",Ft="http://www.w3.org/1999/xhtml";let Tn=Ft,an=!1,Un=null;const Ht=vn({},[_n,Kt,Ft],ab);let Qn=vn({},["mi","mo","mn","ms","mtext"]),En=vn({},["annotation-xml"]);const yi=vn({},["title","style","font","a","script"]);let Zt=null;const oi=["application/xhtml+xml","text/html"],ci="text/html";let rn=null,un=null;const di=l.createElement("form"),nt=function(re){return re instanceof RegExp||re instanceof Function},ae=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(un&&un===re)return;(!re||typeof re!="object")&&(re={}),re=Pr(re),Zt=oi.indexOf(re.PARSER_MEDIA_TYPE)===-1?ci:re.PARSER_MEDIA_TYPE,rn=Zt==="application/xhtml+xml"?ab:yd,Se=Mi(re,"ALLOWED_TAGS")&&Yr(re.ALLOWED_TAGS)?vn({},re.ALLOWED_TAGS,rn):se,Y=Mi(re,"ALLOWED_ATTR")&&Yr(re.ALLOWED_ATTR)?vn({},re.ALLOWED_ATTR,rn):pe,Un=Mi(re,"ALLOWED_NAMESPACES")&&Yr(re.ALLOWED_NAMESPACES)?vn({},re.ALLOWED_NAMESPACES,ab):Ht,Vt=Mi(re,"ADD_URI_SAFE_ATTR")&&Yr(re.ADD_URI_SAFE_ATTR)?vn(Pr(cn),re.ADD_URI_SAFE_ATTR,rn):cn,Ot=Mi(re,"ADD_DATA_URI_TAGS")&&Yr(re.ADD_DATA_URI_TAGS)?vn(Pr(At),re.ADD_DATA_URI_TAGS,rn):At,Pe=Mi(re,"FORBID_CONTENTS")&&Yr(re.FORBID_CONTENTS)?vn({},re.FORBID_CONTENTS,rn):xt,He=Mi(re,"FORBID_TAGS")&&Yr(re.FORBID_TAGS)?vn({},re.FORBID_TAGS,rn):Pr({}),Oe=Mi(re,"FORBID_ATTR")&&Yr(re.FORBID_ATTR)?vn({},re.FORBID_ATTR,rn):Pr({}),Z=Mi(re,"USE_PROFILES")?re.USE_PROFILES&&typeof re.USE_PROFILES=="object"?Pr(re.USE_PROFILES):re.USE_PROFILES:!1,ve=re.ALLOW_ARIA_ATTR!==!1,Ke=re.ALLOW_DATA_ATTR!==!1,tt=re.ALLOW_UNKNOWN_PROTOCOLS||!1,Xe=re.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Bt=re.SAFE_FOR_TEMPLATES||!1,Tt=re.SAFE_FOR_XML!==!1,le=re.WHOLE_DOCUMENT||!1,Me=re.RETURN_DOM||!1,$e=re.RETURN_DOM_FRAGMENT||!1,at=re.RETURN_TRUSTED_TYPE||!1,ze=re.FORCE_BODY||!1,ct=re.SANITIZE_DOM!==!1,Te=re.SANITIZE_NAMED_PROPS||!1,Je=re.KEEP_CONTENT!==!1,_e=re.IN_PLACE||!1,xe=uV(re.ALLOWED_URI_REGEXP)?re.ALLOWED_URI_REGEXP:AS,Tn=typeof re.NAMESPACE=="string"?re.NAMESPACE:Ft,Qn=Mi(re,"MATHML_TEXT_INTEGRATION_POINTS")&&re.MATHML_TEXT_INTEGRATION_POINTS&&typeof re.MATHML_TEXT_INTEGRATION_POINTS=="object"?Pr(re.MATHML_TEXT_INTEGRATION_POINTS):vn({},["mi","mo","mn","ms","mtext"]),En=Mi(re,"HTML_INTEGRATION_POINTS")&&re.HTML_INTEGRATION_POINTS&&typeof re.HTML_INTEGRATION_POINTS=="object"?Pr(re.HTML_INTEGRATION_POINTS):vn({},["annotation-xml"]);const Ae=Mi(re,"CUSTOM_ELEMENT_HANDLING")&&re.CUSTOM_ELEMENT_HANDLING&&typeof re.CUSTOM_ELEMENT_HANDLING=="object"?Pr(re.CUSTOM_ELEMENT_HANDLING):yc(null);if(he=yc(null),Mi(Ae,"tagNameCheck")&&nt(Ae.tagNameCheck)&&(he.tagNameCheck=Ae.tagNameCheck),Mi(Ae,"attributeNameCheck")&&nt(Ae.attributeNameCheck)&&(he.attributeNameCheck=Ae.attributeNameCheck),Mi(Ae,"allowCustomizedBuiltInElements")&&typeof Ae.allowCustomizedBuiltInElements=="boolean"&&(he.allowCustomizedBuiltInElements=Ae.allowCustomizedBuiltInElements),Bt&&(Ke=!1),$e&&(Me=!0),Z&&(Se=vn({},RS),Y=yc(null),Z.html===!0&&(vn(Se,kS),vn(Y,TS)),Z.svg===!0&&(vn(Se,ob),vn(Y,ub),vn(Y,uf)),Z.svgFilters===!0&&(vn(Se,lb),vn(Y,ub),vn(Y,uf)),Z.mathMl===!0&&(vn(Se,cb),vn(Y,LS),vn(Y,uf))),et.tagCheck=null,et.attributeCheck=null,Mi(re,"ADD_TAGS")&&(typeof re.ADD_TAGS=="function"?et.tagCheck=re.ADD_TAGS:Yr(re.ADD_TAGS)&&(Se===se&&(Se=Pr(Se)),vn(Se,re.ADD_TAGS,rn))),Mi(re,"ADD_ATTR")&&(typeof re.ADD_ATTR=="function"?et.attributeCheck=re.ADD_ATTR:Yr(re.ADD_ATTR)&&(Y===pe&&(Y=Pr(Y)),vn(Y,re.ADD_ATTR,rn))),Mi(re,"ADD_URI_SAFE_ATTR")&&Yr(re.ADD_URI_SAFE_ATTR)&&vn(Vt,re.ADD_URI_SAFE_ATTR,rn),Mi(re,"FORBID_CONTENTS")&&Yr(re.FORBID_CONTENTS)&&(Pe===xt&&(Pe=Pr(Pe)),vn(Pe,re.FORBID_CONTENTS,rn)),Mi(re,"ADD_FORBID_CONTENTS")&&Yr(re.ADD_FORBID_CONTENTS)&&(Pe===xt&&(Pe=Pr(Pe)),vn(Pe,re.ADD_FORBID_CONTENTS,rn)),Je&&(Se["#text"]=!0),le&&vn(Se,["html","head","body"]),Se.table&&(vn(Se,["tbody"]),delete He.tbody),re.TRUSTED_TYPES_POLICY){if(typeof re.TRUSTED_TYPES_POLICY.createHTML!="function")throw _c('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof re.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _c('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const lt=S;S=re.TRUSTED_TYPES_POLICY;try{k=L("")}catch(kt){throw S=lt,kt}}else S===void 0&&re.TRUSTED_TYPES_POLICY!==null&&(S=NV(d,N)),S&&typeof k=="string"&&(k=L(""));(q.uponSanitizeElement.length>0||q.uponSanitizeAttribute.length>0)&&Se===se&&(Se=Pr(Se)),q.uponSanitizeAttribute.length>0&&Y===pe&&(Y=Pr(Y)),Kr&&Kr(re),un=re},Fe=vn({},[...ob,...lb,...dV]),st=vn({},[...cb,...hV]),ge=function(re){let Ae=p(re);(!Ae||!Ae.tagName)&&(Ae={namespaceURI:Tn,tagName:"template"});const lt=yd(re.tagName),kt=yd(Ae.tagName);return Un[re.namespaceURI]?re.namespaceURI===Kt?Ae.namespaceURI===Ft?lt==="svg":Ae.namespaceURI===_n?lt==="svg"&&(kt==="annotation-xml"||Qn[kt]):!!Fe[lt]:re.namespaceURI===_n?Ae.namespaceURI===Ft?lt==="math":Ae.namespaceURI===Kt?lt==="math"&&En[kt]:!!st[lt]:re.namespaceURI===Ft?Ae.namespaceURI===Kt&&!En[kt]||Ae.namespaceURI===_n&&!Qn[kt]?!1:!st[lt]&&(yi[lt]||!Fe[lt]):!!(Zt==="application/xhtml+xml"&&Un[re.namespaceURI]):!1},qe=function(re){vc(r.removed,{element:re});try{p(re).removeChild(re)}catch{j(re)}},it=function(re,Ae){try{vc(r.removed,{attribute:Ae.getAttributeNode(re),from:Ae})}catch{vc(r.removed,{attribute:null,from:Ae})}if(Ae.removeAttribute(re),re==="is")if(Me||$e)try{qe(Ae)}catch{}else try{Ae.setAttribute(re,"")}catch{}},Le=function(re){let Ae=null,lt=null;if(ze)re="<remove></remove>"+re;else{const zt=CS(re,/^[\r\n\t ]+/);lt=zt&&zt[0]}Zt==="application/xhtml+xml"&&Tn===Ft&&(re='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+re+"</body></html>");const kt=S?L(re):re;if(Tn===Ft)try{Ae=new b().parseFromString(kt,Zt)}catch{}if(!Ae||!Ae.documentElement){Ae=F.createDocument(Tn,"template",null);try{Ae.documentElement.innerHTML=an?k:kt}catch{}}const jt=Ae.body||Ae.documentElement;return re&&lt&&jt.insertBefore(l.createTextNode(lt),jt.childNodes[0]||null),Tn===Ft?G.call(Ae,le?"html":"body")[0]:le?Ae.documentElement:jt},vt=function(re){return P.call(re.ownerDocument||re,re,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ln=function(re){var Ae,lt;re.normalize();const kt=P.call(re.ownerDocument||re,re,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let jt=kt.nextNode();for(;jt;){let An=jt.data;Zo([J,X,V],ei=>{An=gc(An,ei," ")}),jt.data=An,jt=kt.nextNode()}const zt=(Ae=(lt=re.querySelectorAll)===null||lt===void 0?void 0:lt.call(re,"template"))!==null&&Ae!==void 0?Ae:[];Zo(Array.from(zt),An=>{Xt(An.content)&&Ln(An.content)})},Qt=function(re){const Ae=T?T(re):null;return typeof Ae!="string"||rn(Ae)!=="form"?!1:typeof re.nodeName!="string"||typeof re.textContent!="string"||typeof re.removeChild!="function"||re.attributes!==_(re)||typeof re.removeAttribute!="function"||typeof re.setAttribute!="function"||typeof re.namespaceURI!="string"||typeof re.insertBefore!="function"||typeof re.hasChildNodes!="function"||re.nodeType!==E(re)||re.childNodes!==o(re)},Xt=function(re){if(!E||typeof re!="object"||re===null)return!1;try{return E(re)===la.documentFragment}catch{return!1}},yn=function(re){if(!E||typeof re!="object"||re===null)return!1;try{return typeof E(re)=="number"}catch{return!1}};function Et(ht,re,Ae){Zo(ht,lt=>{lt.call(r,re,Ae,un)})}const Jt=function(re){let Ae=null;if(Et(q.beforeSanitizeElements,re,null),Qt(re))return qe(re),!0;const lt=rn(T?T(re):re.nodeName);if(Et(q.uponSanitizeElement,re,{tagName:lt,allowedTags:Se}),Tt&&re.hasChildNodes()&&!yn(re.firstElementChild)&&jr(/<[/\w!]/g,re.innerHTML)&&jr(/<[/\w!]/g,re.textContent)||Tt&&re.namespaceURI===Ft&&lt==="style"&&yn(re.firstElementChild)||re.nodeType===la.progressingInstruction||Tt&&re.nodeType===la.comment&&jr(/<[/\w]/g,re.data))return qe(re),!0;if(He[lt]||!(et.tagCheck instanceof Function&&et.tagCheck(lt))&&!Se[lt]){if(!He[lt]&&xi(lt)&&(he.tagNameCheck instanceof RegExp&&jr(he.tagNameCheck,lt)||he.tagNameCheck instanceof Function&&he.tagNameCheck(lt)))return!1;if(Je&&!Pe[lt]){const jt=p(re),zt=o(re);if(zt&&jt){const An=zt.length;for(let ei=An-1;ei>=0;--ei){const zn=x(zt[ei],!0);jt.insertBefore(zn,v(re))}}}return qe(re),!0}return(E?E(re):re.nodeType)===la.element&&!ge(re)||(lt==="noscript"||lt==="noembed"||lt==="noframes")&&jr(/<\/no(script|embed|frames)/i,re.innerHTML)?(qe(re),!0):(Bt&&re.nodeType===la.text&&(Ae=re.textContent,Zo([J,X,V],jt=>{Ae=gc(Ae,jt," ")}),re.textContent!==Ae&&(vc(r.removed,{element:re.cloneNode()}),re.textContent=Ae)),Et(q.afterSanitizeElements,re,null),!1)},wn=function(re,Ae,lt){if(Oe[Ae]||ct&&(Ae==="id"||Ae==="name")&&(lt in l||lt in di))return!1;const kt=Y[Ae]||et.attributeCheck instanceof Function&&et.attributeCheck(Ae,re);if(!(Ke&&!Oe[Ae]&&jr(H,Ae))){if(!(ve&&jr(K,Ae))){if(!kt||Oe[Ae]){if(!(xi(re)&&(he.tagNameCheck instanceof RegExp&&jr(he.tagNameCheck,re)||he.tagNameCheck instanceof Function&&he.tagNameCheck(re))&&(he.attributeNameCheck instanceof RegExp&&jr(he.attributeNameCheck,Ae)||he.attributeNameCheck instanceof Function&&he.attributeNameCheck(Ae,re))||Ae==="is"&&he.allowCustomizedBuiltInElements&&(he.tagNameCheck instanceof RegExp&&jr(he.tagNameCheck,lt)||he.tagNameCheck instanceof Function&&he.tagNameCheck(lt))))return!1}else if(!Vt[Ae]){if(!jr(xe,gc(lt,oe,""))){if(!((Ae==="src"||Ae==="xlink:href"||Ae==="href")&&re!=="script"&&ES(lt,"data:")===0&&Ot[re])){if(!(tt&&!jr(W,gc(lt,oe,"")))){if(lt)return!1}}}}}}return!0},wi=vn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),xi=function(re){return!wi[yd(re)]&&jr(de,re)},Pt=function(re){Et(q.beforeSanitizeAttributes,re,null);const Ae=re.attributes;if(!Ae||Qt(re))return;const lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let kt=Ae.length;for(;kt--;){const jt=Ae[kt],zt=jt.name,An=jt.namespaceURI,ei=jt.value,zn=rn(zt),Ci=ei;let $t=zt==="value"?Ci:rV(Ci);if(lt.attrName=zn,lt.attrValue=$t,lt.keepAttr=!0,lt.forceKeepAttr=void 0,Et(q.uponSanitizeAttribute,re,lt),$t=lt.attrValue,Te&&(zn==="id"||zn==="name")&&ES($t,we)!==0&&(it(zt,re),$t=we+$t),Tt&&jr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,$t)){it(zt,re);continue}if(zn==="attributename"&&CS($t,"href")){it(zt,re);continue}if(lt.forceKeepAttr)continue;if(!lt.keepAttr){it(zt,re);continue}if(!Xe&&jr(/\/>/i,$t)){it(zt,re);continue}Bt&&Zo([J,X,V],pi=>{$t=gc($t,pi," ")});const Ui=rn(re.nodeName);if(!wn(Ui,zn,$t)){it(zt,re);continue}if(S&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!An)switch(d.getAttributeType(Ui,zn)){case"TrustedHTML":{$t=L($t);break}case"TrustedScriptURL":{$t=S.createScriptURL($t);break}}if($t!==Ci)try{An?re.setAttributeNS(An,zt,$t):re.setAttribute(zt,$t),Qt(re)?qe(re):SS(r.removed)}catch{it(zt,re)}}Et(q.afterSanitizeAttributes,re,null)},Hn=function(re){let Ae=null;const lt=vt(re);for(Et(q.beforeSanitizeShadowDOM,re,null);Ae=lt.nextNode();)if(Et(q.uponSanitizeShadowNode,Ae,null),Jt(Ae),Pt(Ae),Xt(Ae.content)&&Hn(Ae.content),(E?E(Ae):Ae.nodeType)===la.element){const jt=f?f(Ae):Ae.shadowRoot;Xt(jt)&&(On(jt),Hn(jt))}Et(q.afterSanitizeShadowDOM,re,null)},On=function(re){const Ae=E?E(re):re.nodeType;if(Ae===la.element){const jt=f?f(re):re.shadowRoot;Xt(jt)&&(On(jt),Hn(jt))}const lt=o?o(re):re.childNodes;if(!lt)return;const kt=[];Zo(lt,jt=>{vc(kt,jt)});for(const jt of kt)On(jt);if(Ae===la.element){const jt=T?T(re):null;if(typeof jt=="string"&&rn(jt)==="template"){const zt=re.content;Xt(zt)&&On(zt)}}};return r.sanitize=function(ht){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ae=null,lt=null,kt=null,jt=null;if(an=!ht,an&&(ht="<!-->"),typeof ht!="string"&&!yn(ht)&&(ht=cV(ht),typeof ht!="string"))throw _c("dirty is not a string, aborting");if(!r.isSupported)return ht;if(Re||ae(re),r.removed=[],typeof ht=="string"&&(_e=!1),_e){const ei=T?T(ht):ht.nodeName;if(typeof ei=="string"){const zn=rn(ei);if(!Se[zn]||He[zn])throw _c("root node is forbidden and cannot be sanitized in-place")}if(Qt(ht))throw _c("root node is clobbered and cannot be sanitized in-place");On(ht)}else if(yn(ht))Ae=Le("<!---->"),lt=Ae.ownerDocument.importNode(ht,!0),lt.nodeType===la.element&&lt.nodeName==="BODY"||lt.nodeName==="HTML"?Ae=lt:Ae.appendChild(lt),On(lt);else{if(!Me&&!Bt&&!le&&ht.indexOf("<")===-1)return S&&at?L(ht):ht;if(Ae=Le(ht),!Ae)return Me?null:at?k:""}Ae&&ze&&qe(Ae.firstChild);const zt=vt(_e?ht:Ae);for(;kt=zt.nextNode();)Jt(kt),Pt(kt),Xt(kt.content)&&Hn(kt.content);if(_e)return Bt&&Ln(ht),ht;if(Me){if(Bt&&Ln(Ae),$e)for(jt=I.call(Ae.ownerDocument);Ae.firstChild;)jt.appendChild(Ae.firstChild);else jt=Ae;return(Y.shadowroot||Y.shadowrootmode)&&(jt=ie.call(g,jt,!0)),jt}let An=le?Ae.outerHTML:Ae.innerHTML;return le&&Se["!doctype"]&&Ae.ownerDocument&&Ae.ownerDocument.doctype&&Ae.ownerDocument.doctype.name&&jr(yV,Ae.ownerDocument.doctype.name)&&(An="<!DOCTYPE "+Ae.ownerDocument.doctype.name+`>
334
+ `+An),Bt&&Zo([J,X,V],ei=>{An=gc(An,ei," ")}),S&&at?L(An):An},r.setConfig=function(){let ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(ht),Re=!0},r.clearConfig=function(){un=null,Re=!1},r.isValidAttribute=function(ht,re,Ae){un||ae({});const lt=rn(ht),kt=rn(re);return wn(lt,kt,Ae)},r.addHook=function(ht,re){typeof re=="function"&&vc(q[ht],re)},r.removeHook=function(ht,re){if(re!==void 0){const Ae=nV(q[ht],re);return Ae===-1?void 0:iV(q[ht],Ae,1)[0]}return SS(q[ht])},r.removeHooks=function(ht){q[ht]=[]},r.removeAllHooks=function(){q=MS()},r}var IE=VE();const nl=500,US=20;function OS(i,r){const l=new Map(i.map(N=>[N.k,N]));for(const N of r)l.set(N.k,N);const g=Array.from(l.values()).sort((N,R)=>N.k-R.k);return g.length>nl?g.slice(-nl):g}function SV(i,r){const[l,g]=A.useState([]),[N,R]=A.useState(!1),[y,a]=A.useState(!1),[u,m]=A.useState(null),[b,d]=A.useState(!1),w=A.useRef(""),x=A.useRef(null),j=A.useRef(!1),v=A.useRef(!1),o=A.useRef(null),p=A.useRef([]);A.useEffect(()=>{w.current="",x.current=null,j.current=!1,v.current=!1,o.current=null,p.current=[],g([]),R(!1),a(!1),m(null),d(!1)},[i]);const f=A.useCallback(()=>E1(i,{since:w.current,limit:US}),[i]),_=A.useCallback(T=>{if(!T)return;d(!0),w.current=T.hash||"";const S=Array.isArray(T.messages)?T.messages:[];T.session&&o.current&&T.session!==o.current?(p.current=S.slice(-nl),g(p.current),x.current=T.firstSeq??null,R(!!T.hasMore),j.current=!0):(p.current=OS(p.current,S),g(p.current),!j.current&&!v.current&&(j.current=!0,x.current=T.firstSeq??null,R(!!T.hasMore)),p.current.length>=nl&&R(!1)),T.session&&(o.current=T.session,m(T.session))},[]);ff({fetch:f,apply:_,intervalMs:1500,enabled:!!i,deps:[i]});const E=A.useCallback(async()=>{if(!(v.current||!N||x.current==null)){if(p.current.length>=nl){R(!1);return}v.current=!0,a(!0);try{const T=Math.min(US,nl-p.current.length),S=await E1(i,{before:x.current,limit:T});if(!S)return;const k=Array.isArray(S.messages)?S.messages:[];p.current=OS(p.current,k),g(p.current),x.current=S.firstSeq??x.current,R(!!S.hasMore&&p.current.length<nl)}finally{v.current=!1,a(!1)}}},[i,N]);return{messages:l,hasMoreOlder:N,loadOlder:E,loadingOlder:y,session:u,loaded:b}}const CV=1200,EV=450;function jV(i,r){const[l,g]=A.useState(null),N=A.useRef(!0),R=A.useCallback(async()=>{if(!i||!r){g(null);return}try{const a=await FU(i);N.current&&g(a)}catch{}},[i,r]),y=A.useCallback(()=>{setTimeout(()=>{R()},EV)},[R]);return A.useEffect(()=>{if(N.current=!0,!r)return g(null),()=>{N.current=!1};R();const a=setInterval(R,CV);return()=>{N.current=!1,clearInterval(a)}},[i,r,R]),{prompt:l,refetch:y}}function DV(){return{prompt:"需要你确认",options:[{label:"允许",keys:["Enter"]},{label:"拒绝",keys:["Escape"]}]}}function kV({pane:i,prompt:r,onAuthFail:l,onAct:g}){var o;const N=r.cursor??((o=r.options[0])==null?void 0:o.n)??null,[R,y]=A.useState(N),[a,u]=A.useState(null),m=`${r.title}|${r.options.map(p=>`${p.n}:${p.label}`).join(",")}`,b=a===m;A.useEffect(()=>{var p;y(r.cursor??((p=r.options[0])==null?void 0:p.n)??null)},[m]),A.useEffect(()=>{if(!b)return;const p=setTimeout(()=>u(null),2e3);return()=>clearTimeout(p)},[b]);const d=async p=>{try{await p(),g==null||g()}catch(f){f instanceof ir&&(l==null||l())}},w=p=>d(()=>Nc(i,String(p),!1)),x=()=>d(()=>Od(i,["Escape"])),j=(p=x)=>{if(!b){u(m);return}u(null),p()},v=b?"再点一次取消":"取消";if(r.submit){const p=(r.options.find(_=>/submit/i.test(_.label))||r.options[0]).n,f=r.options.find(_=>/cancel/i.test(_.label));return c.jsxDEV("div",{className:"chat-gate",children:[c.jsxDEV("div",{className:"chat-gate-prompt",children:"复核并提交你的回答?"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:52,columnNumber:9},this),c.jsxDEV("div",{className:"chat-gate-actions",children:[c.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>j(()=>f?w(f.n):x()),children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:54,columnNumber:11},this),c.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",onClick:()=>{u(null),w(p)},children:"提交"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:55,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:53,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:51,columnNumber:7},this)}return c.jsxDEV("div",{className:"chat-gate",children:[r.leadIn&&c.jsxDEV("div",{className:"chat-gate-leadin",children:r.leadIn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:63,columnNumber:25},this),r.multi&&c.jsxDEV("div",{className:"chat-gate-step",children:["第 ",r.step,"/",r.total," 题"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:64,columnNumber:24},this),c.jsxDEV("div",{className:"chat-gate-prompt",children:r.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:65,columnNumber:7},this),c.jsxDEV("div",{className:"chat-gate-options",role:"radiogroup",children:r.options.map(p=>c.jsxDEV("button",{type:"button",role:"radio","aria-checked":R===p.n,className:`chat-gate-opt${R===p.n?" on":""}`,onClick:()=>{u(null),y(p.n)},children:[c.jsxDEV("span",{className:"chat-gate-opt-label",children:p.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:70,columnNumber:13},this),p.description&&c.jsxDEV("span",{className:"chat-gate-opt-desc",children:p.description},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:71,columnNumber:31},this)]},p.n,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:68,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:66,columnNumber:7},this),c.jsxDEV("div",{className:"chat-gate-actions",children:[c.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>j(),children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:76,columnNumber:9},this),c.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",disabled:R==null,onClick:()=>{u(null),w(R)},children:"确认"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:77,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:75,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:62,columnNumber:5},this)}function RV(i){const r=i.name||"工具",l=i.input||{};return r==="Bash"?`运行 ${l.command||""}`.trim():r==="Edit"||r==="MultiEdit"||r==="Write"?`${r==="Write"?"写入":"编辑"} ${l.file_path||""}`.trim():r==="Read"?`读取 ${l.file_path||l.notebook_path||""}`.trim():r==="NotebookEdit"?`编辑 ${l.notebook_path||""}`.trim():r==="Grep"?`搜索 ${l.pattern||""}`.trim():r==="Glob"?`查找文件 ${l.pattern||""}`.trim():r==="WebSearch"?`联网搜索 ${l.query||""}`.trim():r==="WebFetch"?`读取网页 ${l.url||""}`.trim():r==="TodoWrite"?"更新待办":r==="Skill"?`激活技能 ${l.command||l.skill||""}`.trim():r==="Task"||r==="Agent"?`调用 Agent${l.subagent_type?`(${l.subagent_type})`:""}: ${l.description||""}`.trim():`调用工具 ${r}`}function BE(i){return i==="Bash"?c.jsxDEV(M3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:47,columnNumber:31},this):i==="Edit"||i==="MultiEdit"||i==="Write"||i==="NotebookEdit"?c.jsxDEV(VC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:48,columnNumber:102},this):i==="Read"?c.jsxDEV(LC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:49,columnNumber:31},this):i==="Grep"||i==="Glob"?c.jsxDEV(P3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:50,columnNumber:50},this):i==="WebSearch"||i==="WebFetch"?c.jsxDEV(V3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:51,columnNumber:59},this):i==="TodoWrite"?c.jsxDEV(I3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:52,columnNumber:36},this):i==="Skill"?c.jsxDEV(B3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:53,columnNumber:32},this):i==="Task"||i==="Agent"?c.jsxDEV(F3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:54,columnNumber:51},this):c.jsxDEV(H3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:55,columnNumber:10},this)}function Fb(){return c.jsxDEV("span",{className:"chat-typing-dots",children:[c.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:62,columnNumber:7},this),c.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:63,columnNumber:7},this),c.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:64,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:61,columnNumber:5},this)}function FE({diff:i}){return!i||!i.added&&!i.removed?null:c.jsxDEV("span",{className:"chat-tool-stat","aria-label":`增 ${i.added} 行,删 ${i.removed} 行`,children:[i.added>0&&c.jsxDEV("span",{className:"cts-add",children:["+",i.added]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:75,columnNumber:26},this),i.removed>0&&c.jsxDEV("span",{className:"cts-del",children:["−",i.removed]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:76,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:74,columnNumber:5},this)}function TV({tool:i}){return i.diff&&i.diff.hunks&&i.diff.hunks.length?c.jsxDEV("div",{className:"chat-diff",children:i.diff.hunks.map((r,l)=>c.jsxDEV("div",{className:"chat-diff-hunk",children:r.lines.map((g,N)=>{const R=g[0]==="+"?"add":g[0]==="-"?"del":"ctx";return c.jsxDEV("div",{className:"chat-diff-line cd-"+R,children:g||" "},N,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:91,columnNumber:22},this)})},l,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:88,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:86,columnNumber:7},this):i.result!=null?c.jsxDEV("pre",{className:"chat-tool-body",children:i.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:98,columnNumber:35},this):null}function LV({tool:i}){if(i.isError)return c.jsxDEV("span",{className:"chat-tool-status err","aria-label":"失败",children:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:106,columnNumber:83},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:106,columnNumber:28},this);const r=i.diff&&(i.diff.added||i.diff.removed);return i.result!=null&&!r?c.jsxDEV("span",{className:"chat-tool-status ok","aria-label":"成功",children:c.jsxDEV(sy,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:108,columnNumber:105},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:108,columnNumber:51},this):null}function AV({tool:i,running:r,onOpen:l}){return c.jsxDEV("div",{className:"chat-tool"+(i.isError?" chat-tool-err":"")+(r?" chat-tool-running":""),children:c.jsxDEV("button",{type:"button",className:"chat-tool-head",onClick:l,children:[c.jsxDEV("span",{className:"chat-tool-ic",children:BE(i.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:118,columnNumber:9},this),c.jsxDEV("span",{className:"chat-tool-head-text",children:RV(i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:119,columnNumber:9},this),c.jsxDEV(FE,{diff:i.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:120,columnNumber:9},this),r?c.jsxDEV("span",{className:"chat-tool-head-running",children:c.jsxDEV(Fb,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:122,columnNumber:61},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:122,columnNumber:20},this):c.jsxDEV(LV,{tool:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:122,columnNumber:85},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:117,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:116,columnNumber:5},this)}function HE(i){return{Bash:"运行命令",Edit:"编辑文件",MultiEdit:"编辑文件",Write:"写入文件",Read:"读取文件",NotebookEdit:"编辑笔记本",Grep:"搜索",Glob:"查找文件",WebSearch:"联网搜索",WebFetch:"读取网页",TodoWrite:"更新待办",Skill:"激活技能",Task:"调用 Agent",Agent:"调用 Agent"}[i]||"调用工具"}function MV(i){const r=i.name,l=i.input||{};return r==="Bash"?l.command||"":r==="Read"||r==="Edit"||r==="MultiEdit"||r==="Write"?l.file_path||"":r==="NotebookEdit"?l.notebook_path||"":r==="Grep"||r==="Glob"?l.pattern||"":r==="WebSearch"?l.query||"":r==="WebFetch"?l.url||"":r==="Skill"?l.command||l.skill||"":r==="Task"||r==="Agent"?l.prompt||l.description||"":Object.keys(l).length?JSON.stringify(l,null,2):""}function UV(i){if(!i)return{dir:"",name:""};const r=i.lastIndexOf("/");return r>=0?{dir:i.slice(0,r+1),name:i.slice(r+1)}:{dir:"",name:i}}function OV({hunks:i}){return c.jsxDEV("div",{className:"dv",children:i.map((r,l)=>{let g=r.oldStart||0,N=r.newStart||0;return c.jsxDEV("div",{className:"dv-hunk",children:[l>0&&c.jsxDEV("div",{className:"dv-gap",children:c.jsxDEV("span",{children:"⋯"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:176,columnNumber:48},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:176,columnNumber:24},this),(r.lines||[]).map((R,y)=>{const a=typeof R=="string"?R[0]:" ",u=typeof R=="string"?R.slice(1):"";let m,b;return a==="+"?(m=N++,b="add"):a==="-"?(m=g++,b="del"):(m=N++,g++,b="ctx"),c.jsxDEV("div",{className:"dv-row dv-"+b,children:[c.jsxDEV("span",{className:"dv-ln",children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:187,columnNumber:19},this),c.jsxDEV("span",{className:"dv-sign",children:a==="+"?"+":a==="-"?"−":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:188,columnNumber:19},this),c.jsxDEV("span",{className:"dv-code",children:u||" "},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:189,columnNumber:19},this)]},y,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:186,columnNumber:17},this)})]},l,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:175,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:170,columnNumber:5},this)}function zE(i,r){return r?{txt:"执行中",cls:"run"}:i.isError?{txt:"失败",cls:"err"}:i.result!=null?{txt:"成功",cls:"ok"}:{txt:"未返回",cls:"idle"}}function PV({tool:i,running:r}){const{dir:l,name:g}=UV(i.input&&i.input.file_path||""),N=zE(i,r),R=i.diff&&i.diff.created,y=i.diff&&i.diff.hunks;return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"tool-sheet-head es-head",children:[c.jsxDEV("span",{className:"tool-sheet-ic",children:c.jsxDEV(VC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:219,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:219,columnNumber:9},this),c.jsxDEV("div",{className:"es-file",children:[c.jsxDEV("span",{className:"es-name",children:g||i.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:221,columnNumber:11},this),l&&c.jsxDEV("span",{className:"es-dir",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:222,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:220,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:218,columnNumber:7},this),c.jsxDEV("div",{className:"tool-sheet-body es-body",children:[c.jsxDEV("div",{className:"es-meta",children:[c.jsxDEV("span",{className:"tool-sheet-mode-val",children:HE(i.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:227,columnNumber:11},this),c.jsxDEV("span",{className:"tool-sheet-state "+N.cls,children:N.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:228,columnNumber:11},this),c.jsxDEV(FE,{diff:i.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:229,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:226,columnNumber:9},this),y&&y.length?c.jsxDEV("div",{className:"es-diff",children:c.jsxDEV(OV,{hunks:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:232,columnNumber:38},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:232,columnNumber:13},this):R?c.jsxDEV("div",{className:"es-note",children:["新建文件",i.diff.added?` · 新增 ${i.diff.added} 行`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:234,columnNumber:15},this):r?c.jsxDEV("div",{className:"tool-sheet-empty",children:"执行中…"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:236,columnNumber:17},this):c.jsxDEV("div",{className:"tool-sheet-empty",children:"没有可显示的改动"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:237,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:225,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:217,columnNumber:5},this)}function VV({tool:i,running:r,onClose:l}){if(!i)return null;const g=!!(i.diff&&(i.diff.hunks&&i.diff.hunks.length||i.diff.created)),N=MV(i),R=i.result!=null,y=zE(i,r);return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"tool-sheet-backdrop",onClick:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:254,columnNumber:7},this),c.jsxDEV("div",{className:"tool-sheet"+(g?" tool-sheet-edit":""),role:"dialog","aria-modal":"true",children:[c.jsxDEV("div",{className:"tool-sheet-grip"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:256,columnNumber:9},this),c.jsxDEV("button",{type:"button",className:"cmd-close tool-sheet-x","aria-label":"关闭",onClick:l,children:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:257,columnNumber:100},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:257,columnNumber:9},this),g?c.jsxDEV(PV,{tool:i,running:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:259,columnNumber:11},this):c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"tool-sheet-head",children:[c.jsxDEV("span",{className:"tool-sheet-ic",children:BE(i.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:263,columnNumber:15},this),c.jsxDEV("span",{className:"tool-sheet-title",children:i.name||"工具"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:264,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:262,columnNumber:13},this),c.jsxDEV("div",{className:"tool-sheet-body",children:[c.jsxDEV("section",{className:"tool-sheet-sec",children:[c.jsxDEV("div",{className:"tool-sheet-label",children:"执行模式"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:268,columnNumber:17},this),c.jsxDEV("div",{className:"tool-sheet-mode-row",children:[c.jsxDEV("span",{className:"tool-sheet-mode-val",children:HE(i.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:270,columnNumber:19},this),c.jsxDEV("span",{className:"tool-sheet-state "+y.cls,children:y.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:271,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:269,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:267,columnNumber:15},this),N&&c.jsxDEV("section",{className:"tool-sheet-sec",children:[c.jsxDEV("div",{className:"tool-sheet-label",children:"执行的命令"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:276,columnNumber:19},this),c.jsxDEV("pre",{className:"tool-sheet-cmd",children:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:277,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:275,columnNumber:17},this),c.jsxDEV("section",{className:"tool-sheet-sec tool-sheet-out",children:[c.jsxDEV("div",{className:"tool-sheet-label",children:c.jsxDEV("span",{children:"输出结果"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:281,columnNumber:51},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:281,columnNumber:17},this),R?c.jsxDEV(TV,{tool:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:283,columnNumber:21},this):c.jsxDEV("div",{className:"tool-sheet-empty",children:r?"执行中…":"无输出"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:284,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:280,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:266,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:261,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:255,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:253,columnNumber:5},this)}function IV({m:i,running:r,onOpenTool:l}){if(i.type==="tool")return c.jsxDEV(AV,{tool:i.tool,running:r,onOpen:()=>l(i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:295,columnNumber:33},this);if(i.type==="interrupt")return c.jsxDEV("div",{className:"chat-interrupt",children:O("chat.interrupted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:298,columnNumber:38},this);if(i.type==="compact")return c.jsxDEV("div",{className:"chat-compact-divider",children:O("chat.compacted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:300,columnNumber:36},this);if(i.type==="slash")return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"chat-slash-cmd",children:[i.name,i.args?" "+i.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:308,columnNumber:9},this),i.result&&c.jsxDEV("div",{className:"chat-slash-result",children:i.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:309,columnNumber:22},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:307,columnNumber:7},this);if(i.type==="thinking")return null;if(i.role!=="user"){const g=IE.sanitize(ri.parse(i.text||""));return c.jsxDEV("div",{className:"chat-bubble chat-them chat-md",dangerouslySetInnerHTML:{__html:g}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:320,columnNumber:12},this)}return c.jsxDEV("div",{className:"chat-bubble chat-me",children:i.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:322,columnNumber:10},this)}const BV=40,FV=80;function HV(i){const r=new Set;let l=-1;return i.forEach((g,N)=>{g.type==="text"&&g.role==="user"?(r.add(N),l>=0&&(r.add(l),l=-1)):g.type==="text"&&(l=N)}),l>=0&&r.add(l),r}function zV(i){if(!i)return null;const r=new Date(i);if(Number.isNaN(r.getTime()))return null;const l=`${String(r.getHours()).padStart(2,"0")}:${String(r.getMinutes()).padStart(2,"0")}`,g=new Date;return r.getFullYear()===g.getFullYear()&&r.getMonth()===g.getMonth()&&r.getDate()===g.getDate()?l:`${r.getMonth()+1}月${r.getDate()}日 ${l}`}function $V(i){var R,y,a,u;const r=(R=i.closest)==null?void 0:R.call(i,".chat-md pre");if(r)return{el:r,text:r.innerText};const l=(y=i.closest)==null?void 0:y.call(i,".chat-tool-body, .chat-diff");if(l)return{el:l,text:l.innerText};const g=(a=i.closest)==null?void 0:a.call(i,".chat-bubble");if(g)return{el:g,text:g.innerText};const N=(u=i.closest)==null?void 0:u.call(i,".chat-tool");return N?{el:N,text:N.innerText}:null}const PS=72;function WV({pane:i,kind:r,msg:l,onAuthFail:g,slashEcho:N,onSlashEchoDone:R}){const{messages:y,hasMoreOlder:a,loadOlder:u,loadingOlder:m,session:b,loaded:d}=SV(i),w=A.useMemo(()=>HV(y),[y]),x=r==="permission",{prompt:j,refetch:v}=jV(i,x),o=A.useRef(!1);A.useEffect(()=>{j&&(o.current=!0)},[j]),A.useEffect(()=>{x||(o.current=!1)},[x]);const p=!j&&x&&!o.current?DV():null,f=y.length?y[y.length-1]:null,_=(f==null?void 0:f.type)==="tool"&&f.tool.result===null&&r==="working",E=_,T=r==="compacting",S=r==="error",k=A.useRef(null);N&&!k.current&&(k.current={k:y.reduce((le,Re)=>Math.max(le,Re.k??-1),-1),session:b}),!N&&k.current&&(k.current=null);const D=!!(N&&k.current&&(k.current.session&&b&&k.current.session!==b||y.some(le=>le.type==="slash"&&le.name===N.name&&(le.k??-1)>k.current.k)));A.useEffect(()=>{D&&(R==null||R())},[D,R]);const L=!_&&!T&&!S&&((f==null?void 0:f.role)==="user"?r!=="permission":r==="working"),U=A.useRef(null),F=A.useRef(null),P=A.useRef(!0),I=A.useRef(null),G=A.useRef(!1),ie=A.useRef(null),[q,J]=A.useState(!0),[X,V]=A.useState(null),H=A.useRef(null),K=A.useRef({timer:null,x:0,y:0,fired:!1}),[W,oe]=A.useState(null),de=W!=null?y.find(le=>le.type==="tool"&&(le.k??le.i)===W):null;A.useEffect(()=>{W!=null&&!de&&oe(null)},[W,de]);const xe=de!=null,Se=A.useRef(0);Bf(xe,()=>{Se.current=0,oe(null)}),A.useEffect(()=>{if(xe)return window.history.pushState({chatToolSheet:!0},""),Se.current=1,()=>{Se.current>0&&(Ff(Se.current),Se.current=0)}},[xe]);const se=()=>{H.current&&(H.current.classList.remove("chat-copy-hl"),H.current=null)},Y=()=>{se(),V(null)};Mn(!!X,Y);const pe=()=>{const le=K.current;le.timer&&(clearTimeout(le.timer),le.timer=null)},he=(le,Re,ze)=>{var _e;K.current.timer=null;const Me=$V(ze),$e=F.current;if(!Me||!Me.text.trim()||!$e)return;K.current.fired=!0,(_e=navigator.vibrate)==null||_e.call(navigator,12),Me.el.classList.add("chat-copy-hl"),H.current=Me.el;const at=$e.getBoundingClientRect(),ct=Me.el.getBoundingClientRect(),Te=Math.max(8,Math.min(le-at.left-PS/2,at.width-PS-8)),we=ct.top-at.top-44,Je=we<4?Math.min(ct.bottom-at.top+8,at.height-52):we;V({top:Je,left:Te,text:Me.text})},He=le=>{if(Y(),K.current.fired=!1,le.pointerType==="mouse")return;const Re=K.current;Re.x=le.clientX,Re.y=le.clientY;const{target:ze}=le;pe(),Re.timer=setTimeout(()=>he(Re.x,Re.y,ze),480)},Oe=le=>{K.current.fired&&(K.current.fired=!1,le.stopPropagation(),le.preventDefault())},et=le=>{const Re=K.current;Re.timer&&Math.hypot(le.clientX-Re.x,le.clientY-Re.y)>10&&pe()},ve=async le=>{var Re;try{await navigator.clipboard.writeText(le),(Re=navigator.vibrate)==null||Re.call(navigator,8)}catch{}Y()};A.useEffect(()=>pe,[]),A.useEffect(()=>{Y(),oe(null)},[i]);const[Ke,tt]=A.useState(null),Xe=!!(j||p);A.useEffect(()=>{var Re;if(!Xe){tt(null);return}const le=()=>{const ze=F.current,Me=ze==null?void 0:ze.closest(".app");if(!ze||!Me)return;const $e=ze.getBoundingClientRect(),at=Me.getBoundingClientRect(),ct=at.bottom-$e.top;tt(ct>0?{top:$e.top-at.top,height:ct}:null)};return le(),window.addEventListener("resize",le),(Re=window.visualViewport)==null||Re.addEventListener("resize",le),()=>{var ze;window.removeEventListener("resize",le),(ze=window.visualViewport)==null||ze.removeEventListener("resize",le)}},[Xe]);const Bt=()=>{const le=U.current;if(!le)return;pe(),X&&Y();const Re=le.scrollHeight-le.scrollTop-le.clientHeight<BV;P.current=Re,J(Re),le.scrollTop<FV&&a&&!m&&(I.current=le.scrollHeight,G.current=!0,u())},Tt=()=>{const le=U.current;le&&(le.scrollTop=le.scrollHeight,P.current=!0,J(!0))};return A.useEffect(()=>{const le=U.current,Re=y.length?y[y.length-1]:null,ze=Re?Re.k??Re.i:null,Me=Re&&Re.role==="user"&&ie.current!=null&&ze!=null&&ze>ie.current;if(le){if(G.current){le.scrollTop+=le.scrollHeight-I.current,I.current=null,G.current=!1;return}if(ze!=null&&(ie.current=ie.current==null?ze:Math.max(ie.current,ze)),Me){le.scrollTop=le.scrollHeight,P.current=!0,J(!0);return}P.current&&(le.scrollTop=le.scrollHeight)}},[y,L]),A.useEffect(()=>{const le=U.current;if(!le)return;const Re=()=>{m||!a||y.length===0||le.clientHeight>0&&le.scrollHeight<=le.clientHeight&&(I.current=le.scrollHeight,G.current=!0,u())};if(Re(),typeof ResizeObserver>"u")return;const ze=new ResizeObserver(Re);return ze.observe(le),()=>ze.disconnect()},[y,a,m,u]),A.useEffect(()=>{const le=U.current;le&&(le.scrollTop=le.scrollHeight),P.current=!0,J(!0),ie.current=null},[i]),c.jsxDEV("div",{className:"chat-view",ref:F,children:[c.jsxDEV("div",{className:"chat-scroll",ref:U,onScroll:Bt,onPointerDown:He,onPointerMove:et,onPointerUp:pe,onPointerCancel:pe,onClickCapture:Oe,children:[y.length===0&&(d?c.jsxDEV("div",{className:"chat-new",children:O("boot.chat_empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:647,columnNumber:13},this):c.jsxDEV(dE,{hint:O("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:648,columnNumber:13},this)),y.map((le,Re)=>{if(le.type==="thinking")return null;const ze=w.has(Re)?zV(le.ts):null;return c.jsxDEV(A.Fragment,{children:[c.jsxDEV(IV,{m:le,running:E&&Re===y.length-1,onOpenTool:Me=>oe(Me.k??Me.i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:654,columnNumber:15},this),ze&&c.jsxDEV("div",{className:"chat-ts "+(le.role==="user"?"ts-me":"ts-them"),children:ze},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:656,columnNumber:25},this)]},(le.k??le.i)+":"+Re,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:653,columnNumber:13},this)}),N&&!D&&c.jsxDEV("div",{className:"chat-slash-cmd",children:[N.name,N.args?" "+N.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:661,columnNumber:11},this),T&&c.jsxDEV("div",{className:"chat-compacting","aria-live":"polite",children:[c.jsxDEV("span",{className:"chat-compacting-label",children:"正在压缩上下文"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:665,columnNumber:13},this),c.jsxDEV(Fb,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:666,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:664,columnNumber:11},this),S&&c.jsxDEV("div",{className:"chat-turn-error",role:"status",children:["本轮出错",l?`:${l}`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:670,columnNumber:11},this),L&&c.jsxDEV("div",{className:"chat-typing","aria-hidden":"true",children:c.jsxDEV(Fb,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:676,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:675,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:640,columnNumber:7},this),X&&c.jsxDEV("div",{className:"sel-callout chat-copy-callout",style:{top:X.top,left:X.left},onPointerDown:le=>le.preventDefault(),children:c.jsxDEV("button",{type:"button",onClick:()=>ve(X.text),children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:684,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:682,columnNumber:9},this),!q&&c.jsxDEV("button",{type:"button",className:"new-output","aria-label":"回到最新",onClick:Tt,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:689,columnNumber:9},this),de&&c.jsxDEV(VV,{tool:de.tool,running:E&&de===y[y.length-1],onClose:()=>oe(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:695,columnNumber:9},this),Xe&&c.jsxDEV("div",{className:"chat-gate-backdrop",style:Ke?{top:Ke.top+"px",height:Ke.height+"px",bottom:"auto"}:void 0},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:706,columnNumber:18},this),j&&c.jsxDEV(kV,{pane:i,prompt:j,onAuthFail:g,onAct:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:708,columnNumber:18},this),p&&c.jsxDEV("div",{className:"chat-gate",children:[c.jsxDEV("div",{className:"chat-gate-prompt",children:p.prompt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:711,columnNumber:11},this),c.jsxDEV("div",{className:"chat-gate-actions",children:p.options.map((le,Re)=>c.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>Od(i,le.keys),children:le.label},Re,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:714,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:712,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:710,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:639,columnNumber:5},this)}function GV({onSaved:i}){const[r,l]=A.useState(""),g=N=>{N.preventDefault();const R=r.trim();R&&(FM(R),i())};return c.jsxDEV("form",{className:"token-prompt",onSubmit:g,children:[c.jsxDEV("h2",{children:O("token.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:16,columnNumber:7},this),c.jsxDEV("input",{value:r,onChange:N=>l(N.target.value),placeholder:O("token.placeholder")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:17,columnNumber:7},this),c.jsxDEV("button",{type:"submit",children:O("common.save")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:18,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:15,columnNumber:5},this)}function Mf({open:i,title:r,subtitle:l="",actions:g=[],onClose:N}){const[R,y]=A.useState(null);if(A.useEffect(()=>{i||y(null)},[i]),!i)return null;const a=m=>{var b;if(!m.disabled){if(m.confirm&&R!==m.key){y(m.key);return}y(null),(b=m.onClick)==null||b.call(m)}},u=m=>c.jsxDEV("button",{className:`sheet-action ${m.danger?"danger":""} ${R===m.key?"armed":""}`,disabled:m.disabled,onClick:()=>a(m),children:[m.icon&&R!==m.key&&c.jsxDEV("span",{className:"sheet-action-icon","aria-hidden":"true",children:m.icon},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:30,columnNumber:37},this),m.confirm&&R===m.key?m.confirmLabel||O("actionsheet.confirmAgain"):m.label]},m.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:24,columnNumber:5},this);return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop",onClick:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:37,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":l?`${r},${l}`:r,"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-heading",children:[c.jsxDEV("span",{className:"settings-title",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:41,columnNumber:13},this),l&&c.jsxDEV("span",{className:"settings-subtitle",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:42,columnNumber:26},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:40,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:N,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:39,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section sheet-actions",children:[g.map((m,b)=>Array.isArray(m)?c.jsxDEV("div",{className:"sheet-row",children:m.map(u)},`row-${b}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:48,columnNumber:15},this):u(m)),c.jsxDEV("button",{className:"fontbtn sheet-cancel",onClick:N,children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:46,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:36,columnNumber:5},this)}const YV=/\.(?:md|markdown|html|htm|txt|log|sh)$/i,VS=300;function IS(i){const r=i.lastIndexOf("/");return r<0?{dir:"",frag:i}:{dir:i.slice(0,r+1),frag:i.slice(r+1)}}const qV=i=>i.replace(/\/+$/,"")||"/",db=(i,r)=>i===r?"":i.startsWith(`${r}/`)?i.slice(r.length+1):i,df=(i,r,l)=>{let g=null;for(const N of r||[])(i===N||i!=null&&i.startsWith(`${N}/`))&&(!g||N.length>g.length)&&(g=N);return g||l},KV=i=>i==null?"":i<1024?`${i} B`:i<1024*1024?`${Math.round(i/1024)} KB`:`${(i/1024/1024).toFixed(1)} MB`;function $E({path:i,onNavigate:r,onOpenDoc:l,onJumpToCwd:g,pendingFile:N,onPendingConsumed:R,pickMode:y=!1,allowMkdir:a=!y,onPick:u,refreshKey:m=0,overlayActive:b=!0}){const[d,w]=A.useState(""),[x,j]=A.useState(null),[v,o]=A.useState(!1),[p,f]=A.useState(""),[_,E]=A.useState(""),[T,S]=A.useState(""),[k,D]=A.useState(null),[L,U]=A.useState(!1),[F,P]=A.useState(!1),[I,G]=A.useState(""),[ie,q]=A.useState(null),J=A.useRef(null),X=A.useRef(!1),V=A.useRef(m),H=A.useRef(null),K=A.useRef(null),W=A.useRef(null),oe=async(Te,{sync:we=!1,notify:Je=!1,fallbackHome:_e=!1}={})=>{f("");try{const Z=await RC(Te??void 0);if(X.current=Z.path,j(Z),we){const Pe=db(Z.path,df(Z.path,Z.roots,Z.home));w(Pe?`${Pe}/`:"")}Je&&(r==null||r(Z.path),P(!1),G(""))}catch{if(_e&&Te!=null){oe(null,{sync:!0});return}f(O("filebrowser.openDirFailed"))}};A.useEffect(()=>{const Te=m!==V.current;V.current=m,!(i===X.current&&!Te)&&oe(i,{sync:!0,fallbackHome:y})},[i,m]),A.useEffect(()=>()=>{clearTimeout(H.current),clearTimeout(K.current)},[]),A.useEffect(()=>{if(!v)return;const Te=we=>{var Je;(Je=W.current)!=null&&Je.contains(we.target)||o(!1)};return document.addEventListener("pointerdown",Te,!0),()=>document.removeEventListener("pointerdown",Te,!0)},[v]),Mn(b&&v,()=>o(!1)),Mn(b&&!!k,()=>D(null)),Mn(b&&F,()=>{P(!1),G("")});const de=Te=>{E(Te),clearTimeout(K.current),K.current=setTimeout(()=>E(""),2500)},xe=Te=>{const we=x==null?void 0:x.home;if(!we){w(Te);return}const Je=(x==null?void 0:x.roots)||[we];let _e=Te;(_e==="~"||_e.startsWith("~/"))&&(_e=we+_e.slice(1));let Z=df(x==null?void 0:x.path,Je,we);_e.startsWith("/")&&(Z=df(_e,Je,we),_e=_e===Z?"":_e.startsWith(`${Z}/`)?_e.slice(Z.length+1):_e.replace(/^\/+/,"")),w(_e);const Pe=qV(`${Z}/${IS(_e).dir}`);Pe!==X.current&&(clearTimeout(H.current),H.current=setTimeout(()=>{Pe!==X.current&&oe(Pe,{notify:!0})},250))},Se=async Te=>{const we=tl(x.path,Te);try{await navigator.clipboard.writeText(we),de(O("filebrowser.copiedPath",{abs:we}))}catch{de(we)}},se=Te=>l(tl(x.path,Te)),Y=Te=>oe(tl(x.path,Te),{sync:!0,notify:!0}),pe=()=>(x==null?void 0:x.parent)&&oe(x.parent,{sync:!0,notify:!0}),he=async()=>{const Te=I.trim();if(!(!Te||!x)){f("");try{await t3(x.path,Te),await oe(x.path,{}),P(!1),G("")}catch{f(O("filebrowser.mkdirFailed"))}}},He=async Te=>{f(""),q({label:O("filebrowser.downloading",{name:Te}),pct:0});try{await p3(tl(x.path,Te),we=>q({label:O("filebrowser.downloading",{name:Te}),pct:we})),S(Te)}catch{f(O("filebrowser.downloadFailed"))}finally{q(null)}},Oe=()=>{const Te=k;D(null),Te&&He(Te)},et=x==null?void 0:x.home,ve=(x==null?void 0:x.roots)||(et?[et]:[]),Ke=df(x==null?void 0:x.path,ve,et),tt=Te=>Te===et?"~":/\/tmp$/.test(Te)?"tmp":Te.includes("/var/folders/")?"TMPDIR":Te.split("/").filter(Boolean).pop()||"/",Xe=Te=>{o(!1),Te!==Ke&&oe(Te,{sync:!0,notify:!0})},Bt=(Te,we)=>!Te||!we||Te===we?!1:(Te.startsWith(`${we}/`)?Te.slice(we.length+1):Te).split("/").some(_e=>_e.startsWith(".")),Tt=!!x&&x.path!==et&&!Bt(x.path,Ke),le=async Te=>{const{allowed:we,rejected:Je}=wE(Te);if(!we.length)return Je.length&&f(O("filebrowser.uploadRejected",{names:Je.join("、")})),Je;U(!0),f("");const _e=we.length,Z=[],Pe=new AbortController;NE(Pe,O("filebrowser.uploading",{name:we[0].name,tag:_e>1?`(1/${_e})`:""}));try{for(let xt=0;xt<_e&&!Pe.signal.aborted;xt++){const Ot=we[xt],At=_e>1?`(${xt+1}/${_e})`:"";Rf({label:O("filebrowser.uploading",{name:Ot.name,tag:At}),phase:"sending",pct:0});try{await TC(x.path,Ot,(Vt,cn)=>Rf({pct:Vt,phase:cn}),!1,{signal:Pe.signal})}catch(Vt){if(Vt instanceof Sf)break;Z.push({name:Ot.name,reason:(Vt==null?void 0:Vt.message)||O("filebrowser.uploadFailed")})}}}finally{Ub()}return await oe(x.path,{}),U(!1),Z.length?f(Z.map(xt=>`${xt.name}:${xt.reason}`).join(";")):Je.length&&f(O("filebrowser.uploadRejected",{names:Je.join("、")})),[...Z.map(xt=>xt.name),...Je]},Re=async()=>{N&&(await le(N)).length===0&&(R==null||R())},ze=Te=>{if(y||Te.key!=="Enter")return;const we=d.trim();we&&YV.test(we)&&(x!=null&&x.home)&&l(tl(x.home,we))},Me=IS(d).frag.toLowerCase(),$e=((x==null?void 0:x.entries)||[]).filter(Te=>(!y||Te.type==="dir")&&(!Me||Te.name.toLowerCase().includes(Me))),at=$e.length>VS?$e.slice(0,VS):$e,ct=$e.length-at.length;return c.jsxDEV("div",{className:"browse-view",children:[c.jsxDEV("div",{className:"browse-bar",children:[g&&c.jsxDEV("button",{className:"browse-cwd","aria-label":O("filebrowser.sessionDir"),title:O("filebrowser.jumpToSessionDir"),onClick:g,children:c.jsxDEV(S3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:278,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:277,columnNumber:11},this),c.jsxDEV("button",{className:"browse-up","aria-label":O("filebrowser.parentDir"),disabled:!(x!=null&&x.parent),onClick:pe,children:c.jsxDEV(iy,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:282,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:281,columnNumber:9},this),c.jsxDEV("div",{className:"browse-path",children:[ve.length>1?c.jsxDEV("div",{className:"dd browse-root-dd",ref:W,children:[c.jsxDEV("button",{type:"button",className:"browse-root","aria-haspopup":"listbox","aria-expanded":v,"aria-label":O("filebrowser.rootSelect"),onClick:()=>o(Te=>!Te),children:[c.jsxDEV("span",{children:[tt(Ke),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:293,columnNumber:17},this),c.jsxDEV("span",{className:`dd-caret${v?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:294,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:289,columnNumber:15},this),v&&c.jsxDEV("div",{className:"dd-menu",role:"listbox",children:ve.map(Te=>c.jsxDEV("button",{type:"button",role:"option","aria-selected":Te===Ke,title:Te,className:`dd-option${Te===Ke?" is-selected":""}`,onClick:()=>Xe(Te),children:[c.jsxDEV("span",{className:"dd-option-label",children:[tt(Te),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:303,columnNumber:23},this),Te===Ke&&c.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:304,columnNumber:41},this)]},Te,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:299,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:297,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:288,columnNumber:13},this):c.jsxDEV("span",{className:"browse-home","aria-hidden":"true",children:"~/"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:311,columnNumber:13},this),c.jsxDEV("input",{className:"browse-input",value:d,placeholder:O("filebrowser.pathPlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:Te=>xe(Te.target.value),onKeyDown:ze},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:313,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:284,columnNumber:9},this),a&&c.jsxDEV("button",{className:"browse-mkdir","aria-label":O("filebrowser.newFolder"),title:O("filebrowser.newFolder"),disabled:!x,onClick:()=>{P(Te=>!Te),G("")},children:c.jsxDEV(x3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:325,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:320,columnNumber:11},this),!y&&c.jsxDEV("button",{className:"browse-upload","aria-label":O("filebrowser.uploadFile"),title:O(Tt?"filebrowser.uploadToCurrentDir":"filebrowser.enterSubdirToUpload"),disabled:!Tt||L,onClick:()=>{var Te;return(Te=J.current)==null?void 0:Te.click()},children:c.jsxDEV(MC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:336,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:329,columnNumber:11},this),!y&&c.jsxDEV("input",{ref:J,className:"browse-file-input",type:"file",multiple:!0,accept:my,onChange:Te=>{le(Array.from(Te.target.files||[])),Te.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:342,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:275,columnNumber:7},this),F&&c.jsxDEV("div",{className:"browse-newfolder",children:[c.jsxDEV("input",{className:"browse-newfolder-input",autoFocus:!0,value:I,placeholder:O("filebrowser.folderNamePlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:Te=>G(Te.target.value),onKeyDown:Te=>{Te.key==="Enter"&&he()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:354,columnNumber:11},this),c.jsxDEV("button",{className:"browse-newfolder-ok",onClick:he,children:O("filebrowser.createBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:360,columnNumber:11},this),c.jsxDEV("button",{className:"browse-newfolder-x","aria-label":O("common.cancel"),onClick:()=>{P(!1),G("")},children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:361,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:353,columnNumber:9},this),!y&&N&&c.jsxDEV("div",{className:"browse-pending",children:[c.jsxDEV("span",{className:"browse-pending-text",children:[O("filebrowser.uploadPendingTo",{name:N.name}),!Tt&&c.jsxDEV("em",{className:"browse-pending-hint",children:O("filebrowser.enterSubdirFirst")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:368,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:366,columnNumber:11},this),c.jsxDEV("button",{className:"browse-pending-btn",disabled:!Tt||L,onClick:Re,children:O("filebrowser.upload")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:370,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:365,columnNumber:9},this),p&&c.jsxDEV("div",{className:"bind-error browse-err",children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:373,columnNumber:15},this),_&&c.jsxDEV("div",{className:"browse-notice",children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:374,columnNumber:18},this),!y&&T&&c.jsxDEV("div",{className:"browse-saved",children:[c.jsxDEV("span",{className:"browse-saved-text",children:O("filebrowser.savedToDownloads",{name:T})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:377,columnNumber:11},this),c.jsxDEV("button",{className:"browse-saved-close","aria-label":O("common.close"),onClick:()=>S(""),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:378,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:376,columnNumber:9},this),!y&&ie&&c.jsxDEV("div",{className:"browse-progress",children:[c.jsxDEV("span",{className:"browse-progress-label",children:[ie.label," ",Math.round(ie.pct*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:383,columnNumber:11},this),c.jsxDEV("span",{className:"browse-progress-track",children:c.jsxDEV("span",{className:"browse-progress-fill",style:{width:`${Math.round(ie.pct*100)}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:385,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:384,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:382,columnNumber:9},this),c.jsxDEV("div",{className:"browse-list",children:[at.length===0&&!p&&c.jsxDEV("div",{className:"browse-empty",children:O("filebrowser.noMatches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:390,columnNumber:42},this),at.map(Te=>c.jsxDEV("div",{className:"browse-entry-row",children:[c.jsxDEV("button",{className:"browse-entry",onClick:()=>Te.type==="dir"?Y(Te.name):Te.type==="doc"||Te.type==="image"?se(Te.name):de(O("filebrowser.previewUnsupported")),children:[c.jsxDEV("span",{className:"browse-entry-icon",children:Te.type==="dir"?c.jsxDEV(Dd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:401,columnNumber:71},this):Te.type==="image"?c.jsxDEV(N3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:401,columnNumber:109},this):c.jsxDEV(LC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:401,columnNumber:125},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:401,columnNumber:15},this),c.jsxDEV("span",{className:"browse-entry-name",children:Te.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:402,columnNumber:15},this),Te.type!=="dir"&&c.jsxDEV("span",{className:"browse-entry-size",children:KV(Te.size)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:403,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:393,columnNumber:13},this),Te.type!=="dir"&&c.jsxDEV("button",{className:"browse-copy","aria-label":O("filebrowser.copyAbsPath"),title:O("filebrowser.copyAbsPath"),onClick:()=>Se(Te.name),children:c.jsxDEV(UC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:407,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:406,columnNumber:15},this),Te.type!=="dir"&&c.jsxDEV("button",{className:"browse-dl","aria-label":O("filebrowser.download"),onClick:()=>D(Te.name),children:c.jsxDEV(j3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:412,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:411,columnNumber:15},this)]},Te.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:392,columnNumber:11},this)),ct>0&&c.jsxDEV("div",{className:"browse-overflow",children:O("filebrowser.tooMany",{shown:at.length,total:$e.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:418,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:389,columnNumber:7},this),y&&x&&c.jsxDEV("div",{className:"browse-pick-bar",children:c.jsxDEV("button",{className:"browse-pick-confirm",onClick:()=>u==null?void 0:u(x.path),children:O("filebrowser.pickThisDir",{path:db(x.path,x.home)?`~/${db(x.path,x.home)}`:"~"})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:423,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:422,columnNumber:9},this),c.jsxDEV(Mf,{open:!!k,title:k?O("filebrowser.downloadConfirm",{name:k}):"",actions:[{key:"dl",label:O("filebrowser.download"),onClick:Oe}],onClose:()=>D(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:428,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:274,columnNumber:5},this)}const XV=()=>{};function Bd({open:i,seedCwd:r=null,hint:l=null,pane:g=null,allowMkdir:N=!1,onPick:R,onClose:y,inset:a=0}){const[u,m]=A.useState(r),b=A.useRef(!1);i&&!b.current?(b.current=!0,u!==r&&m(r)):!i&&b.current&&(b.current=!1);const d=g?async()=>{try{const{cwd:w}=await al(g);w&&m(w)}catch{}}:null;return i?c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop dirpick-backdrop",onClick:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:31,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card dirpick-card",style:{transform:`translate(-50%, calc(-50% + ${a/2}px))`,"--kb-inset":`${a}px`},role:"dialog","aria-label":O("dirpicker.title"),"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-title",children:O("dirpicker.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:38,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:y,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:37,columnNumber:9},this),l&&c.jsxDEV("div",{className:"dirpick-hint",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:41,columnNumber:18},this),c.jsxDEV($E,{path:u,onNavigate:m,onOpenDoc:XV,onJumpToCwd:d,pickMode:!0,allowMkdir:N,onPick:R,overlayActive:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:42,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:32,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:30,columnNumber:5},this):null}function JV({open:i,pushKey:r,notifyOn:l,onClose:g}){const[N,R]=A.useState("");if(!i)return null;const y='handmux push "构建完成" "耗时 3m12s"',a=!!(l&&r),u=y,m=`${y} --session ${O("scriptPush.session_placeholder")}`,b=`${y} --device ${a?r:O("scriptPush.device_placeholder")}`,d=async(j,v)=>{try{await navigator.clipboard.writeText(j),R(v),setTimeout(()=>R(""),1500)}catch{}},w=j=>O(N===j?"scriptPush.copied":"common.copy"),x=(j,v,o,p)=>c.jsxDEV("div",{className:"push-script-block",children:[c.jsxDEV("div",{className:"push-script-label",children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:25,columnNumber:7},this),c.jsxDEV("pre",{className:"push-script-cmd",children:c.jsxDEV("code",{children:o},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:7},this),p&&c.jsxDEV("div",{className:"push-script-hint",children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:27,columnNumber:16},this),c.jsxDEV("button",{className:"fontbtn",onClick:()=>d(o,j),children:w(j)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:28,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:24,columnNumber:5},this);return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop push-script-backdrop",onClick:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:34,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card push-script-sheet",role:"dialog","aria-label":O("scriptPush.title"),"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-title",children:O("scriptPush.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:37,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:g,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:38,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:36,columnNumber:9},this),c.jsxDEV("p",{className:"push-script-intro",children:O("scriptPush.intro")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:41,columnNumber:9},this),x("all",O("scriptPush.scope_all"),u),x("session",O("scriptPush.scope_session"),m),x("device",O("scriptPush.scope_device"),b,O(a?"scriptPush.device_key_note":"scriptPush.device_need_enable")),c.jsxDEV("div",{className:"push-script-block",children:[c.jsxDEV("div",{className:"push-script-label",children:O("scriptPush.opts_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:49,columnNumber:11},this),c.jsxDEV("ul",{className:"push-script-fields",children:[c.jsxDEV("li",{children:O("scriptPush.opt_tag")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:51,columnNumber:13},this),c.jsxDEV("li",{children:O("scriptPush.opt_url")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:52,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:48,columnNumber:9},this),c.jsxDEV("div",{className:"push-script-note",children:O("scriptPush.reliability")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:56,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:35,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:33,columnNumber:5},this)}const WE="tw_terminal_transport",GE="tw_terminal_snapshot_interval",Sy=[800,1e3,1200,1500,2e3],YE=1e3;function ZV(i=localStorage){return i.getItem(WE)==="snapshot"?"snapshot":"live"}function QV(i,r=localStorage){const l=i==="snapshot"?"snapshot":"live";return r.setItem(WE,l),l}function eI(i=localStorage){const r=Number(i.getItem(GE));return Sy.includes(r)?r:YE}function tI(i,r=localStorage){const l=Number(i),g=Sy.includes(l)?l:YE;return r.setItem(GE,String(g)),g}function nI(i=window.location,r="live"){return new URLSearchParams(i.search).get("terminalStream")==="0"?!1:r!=="snapshot"}function iI({open:i,onClose:r,termRef:l,onColAdjust:g,onColRestore:N,onOpenChangelog:R,changelogUnread:y,onReloadApp:a=()=>window.location.reload(),chatTone:u="ink",onChatTone:m=()=>{},chatLensEnabled:b=!1,onChatLensEnabled:d=()=>{},keyboardMode:w="auto",onKeyboardMode:x=()=>{},terminalTransport:j="live",onTerminalTransport:v=()=>{},snapshotInterval:o=1e3,onSnapshotInterval:p=()=>{},hooksStatus:f=null,onEnableHooks:_=null,notifUnread:E=!1,onOpenInbox:T,updateInfo:S=null,windowId:k=null,workspaceProtection:D=null,activePreview:L=null,pane:U=null,lastPreviewDir:F=null,dynamicEnabled:P=!1,getColCount:I=null,onStartPreview:G,onStartDynamicPreview:ie,onOpenPreview:q,onRenew:J,onStop:X}){var rn,un,di;const[V,H]=A.useState(null),[K,W]=A.useState(SC()),[oe,de]=A.useState(null),xe=A.useRef(0),[Se,se]=A.useState(!1),[Y,pe]=A.useState(jf()),[he,He]=A.useState(!1),[Oe,et]=A.useState(""),ve=f==="absent"||f==="no-claude",[Ke,tt]=A.useState(!1),[Xe,Bt]=A.useState(!1),Tt=async()=>{tt(!0),Bt(!1);try{const nt=await(_==null?void 0:_());(!nt||nt.status!=="installed")&&Bt(!0)}catch{Bt(!0)}finally{tt(!1)}},[le,Re]=A.useState(!1),[ze,Me]=A.useState(null),[$e,at]=A.useState(!1),[ct,Te]=A.useState(null),[we,Je]=A.useState("off"),[_e,Z]=A.useState(""),[Pe,xt]=A.useState(!1),[Ot,At]=A.useState(""),[Vt,cn]=A.useState(!1),_n=BC(L==null?void 0:L.expiresAt,!!L&&i);A.useEffect(()=>{xt(!1),At("")},[L==null?void 0:L.name,i]);const Kt=async()=>{const nt=Number(_e);if(nt){At(""),cn(!0);try{await(ie==null?void 0:ie(nt))}catch(ae){At(KC(ae,{port:nt}))}finally{cn(!1)}}},Ft=async()=>{Me(jf()?await e2():null),Re(!0)},Tn=async()=>{let nt=F;if(!nt&&U)try{nt=(await al(U)).cwd||null}catch{}Te(nt),at(!0)};A.useEffect(()=>{var Fe,st;let nt=!0;const ae=++xe.current;if(i){H(((st=(Fe=l.current)==null?void 0:Fe.getFontSize)==null?void 0:st.call(Fe))??null);const ge=(I==null?void 0:I())??null;k&&U?(de(null),Ws(k).then(qe=>{var Le;const it=(Le=qe.find(vt=>vt.id===U))==null?void 0:Le.width;nt&&ae===xe.current&&de(Number.isFinite(it)?it:null)}).catch(()=>{nt&&ae===xe.current&&de(null)})):de(ge)}return()=>{nt=!1}},[i,l,I,k,U]),Mn(i&&Se,()=>se(!1)),Mn(i&&$e,()=>at(!1)),Mn(i&&le,()=>Re(!1));const an=async()=>{He(!0),et("");try{Y?(await Q3(),pe(!1),et(O("settings.notify_disabled"))):(await Z3(),pe(!0),et(O("settings.notify_enabled")))}catch(nt){et(nt.message||O("settings.notify_failed"))}finally{He(!1)}};if(!i)return null;const Un=nt=>{var st,ge,qe,it;const ae=(ge=(st=l.current)==null?void 0:st.getFontSize)==null?void 0:ge.call(st),Fe=(it=(qe=l.current)==null?void 0:qe.setFontSize)==null?void 0:it.call(qe,((ae==null?void 0:ae.size)??14)+nt);Fe!=null&&H({size:Fe,auto:!1})},Ht=()=>{var nt,ae;(ae=(nt=l.current)==null?void 0:nt.autoFont)==null||ae.call(nt),H({size:null,auto:!0})},Qn=nt=>{var ae,Fe;W(nt),gU(nt),(Fe=(ae=l.current)==null?void 0:ae.setDocHighlight)==null||Fe.call(ae,nt)},En=V!=null&&V.auto?O("settings.font_auto"):V!=null&&V.size?`${V.size}px`:"—",yi=oe!=null?`${oe} 列`:"—",Zt=nt=>{oe!=null&&(g==null||g(nt,oe),de((I==null?void 0:I())??null))},oi=()=>{xe.current+=1,N==null||N(),de(null)},ci=["live-corrupt","live-unavailable"].includes(D==null?void 0:D.errorCode)?D.errorCode:"unknown";return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop",onClick:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:147,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":O("settings.title"),"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-title",children:O("settings.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:150,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:r,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:151,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:149,columnNumber:9},this),c.jsxDEV("div",{className:"settings-body",children:[c.jsxDEV("div",{className:"settings-group",children:O("settings.group_global")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:155,columnNumber:9},this),(D==null?void 0:D.status)==="degraded"&&c.jsxDEV("div",{className:"settings-section settings-protection-warning",role:"status",children:[c.jsxDEV("div",{className:"settings-protection-title",children:O("workspace.protectionTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:159,columnNumber:13},this),c.jsxDEV("div",{className:"settings-hint",children:O(`workspace.protection.${ci}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:160,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:158,columnNumber:11},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.language")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:165,columnNumber:11},this),c.jsxDEV("div",{className:"lang-drop",children:[Se&&c.jsxDEV("div",{className:"lang-drop-backdrop",onClick:()=>se(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:167,columnNumber:26},this),c.jsxDEV("button",{className:"lang-trigger",onClick:()=>se(nt=>!nt),children:[c.jsxDEV("span",{children:(rn=m1.find(nt=>nt.code===go()))==null?void 0:rn.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:169,columnNumber:15},this),c.jsxDEV("span",{className:"lang-chevron",children:Se?"▴":"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:170,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:168,columnNumber:13},this),Se&&c.jsxDEV("div",{className:"lang-menu",children:m1.map(nt=>c.jsxDEV("button",{className:`lang-option${nt.code===go()?" active":""}`,onClick:()=>UM(nt.code),children:nt.label},nt.code,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:175,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:173,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:164,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.font_size")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:184,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns",children:[c.jsxDEV("button",{className:"fontbtn",onClick:()=>Un(-1),"aria-label":O("settings.font_decrease"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:186,columnNumber:13},this),c.jsxDEV("span",{className:"settings-value",children:En},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:187,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn",onClick:()=>Un(1),"aria-label":O("settings.font_increase"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:188,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn",onClick:Ht,title:O("settings.font_auto_title"),children:O("settings.font_auto")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:189,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:185,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:183,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.keyboard_mode")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:194,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns",role:"group","aria-label":O("settings.keyboard_mode"),children:["auto","mobile","desktop"].map(nt=>c.jsxDEV("button",{type:"button",className:"fontbtn","aria-pressed":w===nt,onClick:()=>x(nt),children:O(`settings.keyboard_mode_${nt}`)},nt,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:197,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:195,columnNumber:11},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.keyboard_mode_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:204,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:193,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.terminal_transport")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:208,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns",role:"group","aria-label":O("settings.terminal_transport"),children:["live","snapshot"].map(nt=>c.jsxDEV("button",{type:"button",className:"fontbtn","aria-pressed":j===nt,onClick:()=>v(nt),children:O(`settings.terminal_transport_${nt}`)},nt,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:211,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:209,columnNumber:11},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.terminal_transport_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:218,columnNumber:11},this),j==="snapshot"&&c.jsxDEV("div",{className:"settings-suboption",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.snapshot_interval")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:221,columnNumber:15},this),c.jsxDEV("div",{className:"settings-btns settings-btns--compact",role:"group","aria-label":O("settings.snapshot_interval"),children:Sy.map(nt=>c.jsxDEV("button",{type:"button",className:"fontbtn","aria-pressed":o===nt,onClick:()=>p(nt),children:[(nt/1e3).toFixed(nt%1e3?1:0),"s"]},nt,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:224,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:222,columnNumber:15},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.snapshot_interval_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:231,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:220,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:207,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("label",{className:"settings-toggle",children:[c.jsxDEV("span",{className:"settings-label",children:O("settings.chat_lens")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:242,columnNumber:13},this),c.jsxDEV("span",{className:"cmd-switch",children:[c.jsxDEV("input",{type:"checkbox",checked:b,disabled:ve&&!b,onChange:nt=>d(nt.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:244,columnNumber:15},this),c.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:247,columnNumber:15},this),c.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:248,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:243,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:241,columnNumber:11},this),ve?c.jsxDEV("div",{className:"settings-hint",children:[O(f==="no-claude"?"settings.chat_lens_no_claude":"settings.chat_lens_need_hooks"),f==="absent"&&c.jsxDEV("button",{type:"button",className:"fontbtn settings-hint-btn",disabled:Ke,onClick:Tt,children:O(Ke?"settings.chat_lens_installing":"settings.chat_lens_install_hooks")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:255,columnNumber:17},this),Xe&&c.jsxDEV("div",{className:"settings-hint settings-hint-err",children:O("settings.chat_lens_hooks_err")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:260,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:252,columnNumber:13},this):c.jsxDEV("div",{className:"settings-hint",children:O("settings.chat_lens_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:263,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:236,columnNumber:9},this),b&&c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.chat_tone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:270,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns",children:["dusk","ink","light"].map(nt=>c.jsxDEV("button",{className:"fontbtn","aria-pressed":u===nt,onClick:()=>m(nt),children:O(`settings.chat_tone_${nt}`)},nt,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:273,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:271,columnNumber:11},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.chat_tone_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:283,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:269,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("label",{className:"settings-toggle",children:[c.jsxDEV("span",{className:"settings-label",children:O("settings.path_highlight")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:289,columnNumber:13},this),c.jsxDEV("span",{className:"cmd-switch",children:[c.jsxDEV("input",{type:"checkbox",checked:K,onChange:nt=>Qn(nt.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:291,columnNumber:15},this),c.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:292,columnNumber:15},this),c.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:293,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:290,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:288,columnNumber:11},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.path_highlight_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:296,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:287,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.version")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:300,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns",children:[c.jsxDEV("span",{className:"settings-value",children:S!=null&&S.current?`v${S.current}`:"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:302,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn",onClick:R,children:[O("settings.view_changelog"),y&&c.jsxDEV("span",{className:"settings-dot","aria-label":O("settings.has_update")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:304,columnNumber:65},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:303,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn",onClick:a,children:O("settings.reload_app")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:306,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:301,columnNumber:11},this),(S==null?void 0:S.updateAvailable)&&c.jsxDEV("div",{className:"settings-update",children:[c.jsxDEV("div",{className:"settings-update-title",children:O("settings.update_available",{v:S.latest})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:315,columnNumber:15},this),((un=S.whatsNew)==null?void 0:un.length)>0&&c.jsxDEV("ul",{className:"settings-update-new",children:S.whatsNew.slice(0,1).map(nt=>c.jsxDEV("li",{children:[c.jsxDEV("span",{className:"settings-update-new-ver",children:["v",nt.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:320,columnNumber:23},this),(go().startsWith("zh")?nt.zh:nt.en)||nt.en]},nt.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:319,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:317,columnNumber:17},this),((di=S.whatsNew)==null?void 0:di.length)>1&&c.jsxDEV("details",{className:"settings-update-more",children:[c.jsxDEV("summary",{children:O("settings.update_more",{n:S.whatsNew.length-1})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:328,columnNumber:19},this),c.jsxDEV("ul",{className:"settings-update-new",children:S.whatsNew.slice(1).map(nt=>c.jsxDEV("li",{children:[c.jsxDEV("span",{className:"settings-update-new-ver",children:["v",nt.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:332,columnNumber:25},this),(go().startsWith("zh")?nt.zh:nt.en)||nt.en]},nt.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:331,columnNumber:23},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:329,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:327,columnNumber:17},this),c.jsxDEV("div",{className:"settings-update-how",children:[O("settings.update_how")," ",c.jsxDEV("code",{children:"handmux update"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:339,columnNumber:79},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:339,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:314,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:299,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.feedback")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:349,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns",children:[c.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://github.com/handmux/handmux/issues",target:"_blank",rel:"noreferrer",children:O("settings.feedback_issues")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:351,columnNumber:13},this),go().startsWith("zh")&&c.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://handmux.com/#community",target:"_blank",rel:"noreferrer",children:O("settings.feedback_group")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:353,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:350,columnNumber:11},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.feedback_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:356,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:348,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.push_notifications")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:360,columnNumber:11},this),Sc()?c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-btns",children:[c.jsxDEV("button",{className:"fontbtn",onClick:an,disabled:he,"aria-pressed":Y,children:O(Y?"settings.notify_on":"settings.notify_enable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:364,columnNumber:17},this),he&&c.jsxDEV("span",{className:"spinner",role:"status","aria-label":O("settings.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:367,columnNumber:32},this),!he&&Oe&&c.jsxDEV("span",{className:"settings-note",children:Oe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:368,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:363,columnNumber:15},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:370,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:362,columnNumber:13},this):c.jsxDEV("div",{className:"settings-value",style:{display:"block"},children:O("settings.push_unsupported")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:373,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:359,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.script_push")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:378,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns",children:[c.jsxDEV("button",{className:"fontbtn",onClick:Ft,disabled:!Sc(),children:O("settings.script_push_open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:380,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn push-inbox-entry",onClick:T,children:[O("pushInbox.title"),E&&c.jsxDEV("span",{className:"push-inbox-entry-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:383,columnNumber:31},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:381,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:379,columnNumber:11},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.script_push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:386,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:377,columnNumber:9},this),c.jsxDEV("div",{className:"settings-group",children:O("settings.group_session")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:389,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("settings.screen_cols")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:392,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns cols-btns",children:[c.jsxDEV("button",{className:"fontbtn col-step",disabled:oe==null,onClick:()=>Zt(-10),children:"−10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:394,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn col-step col-fine",disabled:oe==null,onClick:()=>Zt(-1),children:"−1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:395,columnNumber:13},this),c.jsxDEV("span",{className:"settings-value",children:yi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:396,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn col-step col-fine",disabled:oe==null,onClick:()=>Zt(1),children:"+1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:397,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn col-step",disabled:oe==null,onClick:()=>Zt(10),children:"+10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:398,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn",onClick:oi,children:["↺ ",O("settings.cols_restore")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:399,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:393,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:391,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O(P?"settings.preview_site":"settings.preview_static_site")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:404,columnNumber:11},this),L?c.jsxDEV("div",{className:"preview-active",children:[c.jsxDEV("div",{className:"preview-active-head",children:[c.jsxDEV("span",{className:"preview-running",children:[c.jsxDEV("span",{className:"live-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:408,columnNumber:51},this),L.kind==="dynamic"?O("settings.preview_running_dynamic"):O("settings.preview_running_static")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:408,columnNumber:17},this),c.jsxDEV("span",{className:"preview-remain-s",title:O("settings.preview_remain_title"),children:O("settings.preview_remain",{time:IC(_n)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:409,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:407,columnNumber:15},this),c.jsxDEV("div",{className:"settings-btns",children:[c.jsxDEV("button",{className:"fontbtn",onClick:()=>q==null?void 0:q(),children:O("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:412,columnNumber:17},this),c.jsxDEV("button",{className:"fontbtn",onClick:()=>J==null?void 0:J(),children:O("settings.preview_renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:413,columnNumber:17},this),Pe?c.jsxDEV(c.Fragment,{children:[c.jsxDEV("button",{className:"fontbtn preview-confirm-danger",onClick:()=>{xt(!1),X==null||X()},children:O("settings.preview_confirm_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:416,columnNumber:21},this),c.jsxDEV("button",{className:"fontbtn",onClick:()=>xt(!1),children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:417,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:415,columnNumber:19},this):c.jsxDEV("button",{className:"fontbtn",onClick:()=>xt(!0),children:O("settings.preview_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:420,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:411,columnNumber:15},this),c.jsxDEV("div",{className:"settings-hint",children:[O("settings.preview_name",{name:L.name}),L.kind==="dynamic"?O("settings.preview_port",{port:L.port}):L.dir?`(${L.dir})`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:423,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:406,columnNumber:13},this):c.jsxDEV("div",{className:"preview-start",children:[c.jsxDEV("div",{className:"preview-seg",role:"tablist","aria-label":O("settings.preview_type"),children:[c.jsxDEV("button",{role:"tab",className:we==="off"?"on":"","aria-selected":we==="off",onClick:()=>Je("off"),children:O("settings.preview_off")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:432,columnNumber:17},this),c.jsxDEV("button",{role:"tab",className:we==="static"?"on":"","aria-selected":we==="static",onClick:()=>Je("static"),children:O("settings.preview_static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:433,columnNumber:17},this),P&&c.jsxDEV("button",{role:"tab",className:we==="dynamic"?"on":"","aria-selected":we==="dynamic",onClick:()=>{At(""),Je("dynamic")},children:O("settings.preview_dynamic")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:435,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:431,columnNumber:15},this),we==="off"&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-hint",children:O(P?"settings.preview_off_hint_both":"settings.preview_off_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:440,columnNumber:19},this),!P&&c.jsxDEV("div",{className:"settings-hint preview-dynamic-disabled",children:O("settings.preview_dynamic_disabled")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:442,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:439,columnNumber:17},this),we==="static"&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-btns",children:c.jsxDEV("button",{className:"fontbtn",onClick:Tn,children:O("settings.preview_pick_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:449,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:448,columnNumber:19},this),c.jsxDEV("div",{className:"settings-hint",children:O("settings.preview_static_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:451,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:447,columnNumber:17},this),we==="dynamic"&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-btns",children:[c.jsxDEV("input",{className:"preview-port",type:"number",inputMode:"numeric",min:"1",max:"65535",placeholder:O("settings.preview_port_placeholder"),value:_e,onChange:nt=>{Z(nt.target.value),At("")},"aria-label":O("settings.preview_port_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:457,columnNumber:21},this),c.jsxDEV("button",{className:"fontbtn",disabled:!_e||Vt,onClick:Kt,children:O(Vt?"settings.preview_starting":"settings.preview_start")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:459,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:456,columnNumber:19},this),Ot?c.jsxDEV("div",{className:"settings-hint settings-err",children:Ot},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:462,columnNumber:23},this):c.jsxDEV("div",{className:"settings-hint",children:O("settings.preview_dynamic_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:463,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:455,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:430,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:403,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:154,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:148,columnNumber:7},this),c.jsxDEV(Bd,{open:$e,seedCwd:ct,pane:U,hint:O("settings.dir_picker_hint"),onPick:nt=>{at(!1),G==null||G(nt)},onClose:()=>at(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:471,columnNumber:7},this),c.jsxDEV(JV,{open:le,pushKey:ze,notifyOn:Y,onClose:()=>Re(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:479,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:146,columnNumber:5},this)}const rI=new Set(["succeeded","partial","failed","interrupted"]),sI=new Set(["restore-interrupted","checkpoint-not-found","storage-full","permission-denied","plan-failed","agent-unavailable","tmux-unavailable","restore-failed","operation-not-found"]),Hb=new Set(["cwd-fallback","layout-fallback","agent-warning","live-reconcile-failed","workspace-unavailable","restore-warning"]);function BS(i){return O(`workspace.error.${sI.has(i)?i:"restore-failed"}`)}function FS(i){return O(`workspace.warning.${Hb.has(i)?i:"restore-warning"}`)}function aI({open:i,plan:r,operation:l=null,submitting:g=!1,returnFocusRef:N=null,onRestore:R,onIgnore:y,onClose:a,onRebind:u}){var F,P,I,G,ie,q;const m=A.useRef(!1),b=A.useRef(null),d=A.useRef(null),w=A.useRef(null),x=g||(l==null?void 0:l.status)==="pending"||(l==null?void 0:l.status)==="running",j=l&&rI.has(l.status),v=l&&["succeeded","partial"].includes(l.status);if(A.useEffect(()=>{(!x||j)&&(m.current=!1)},[x,j,r==null?void 0:r.checkpointId]),A.useEffect(()=>{var J;if(i)return w.current=(N==null?void 0:N.current)||(document.activeElement instanceof HTMLElement?document.activeElement:null),(J=d.current)==null||J.focus(),()=>{var X;(X=w.current)!=null&&X.isConnected&&w.current.focus(),w.current=null}},[i,N]),!i||!r)return null;const o=(((F=r.planSummary)==null?void 0:F.create)||0)+(((P=r.planSummary)==null?void 0:P.renamed)||0),p=((I=r.planSummary)==null?void 0:I.alreadyPresent)||0,f=(r.sessions||[]).filter(J=>J.action==="create-renamed"),_=(l==null?void 0:l.progress)||{completed:0,total:o},E=((l==null?void 0:l.results)||[]).filter(J=>J.status==="restored").length,T=(l==null?void 0:l.summary)||{sessions:E,windows:0,panes:0},S=((l==null?void 0:l.results)||[]).filter(J=>J.status==="failed"),k=((l==null?void 0:l.warningCodes)||[]).filter(J=>Hb.has(J)),D=((l==null?void 0:l.results)||[]).flatMap(J=>(J.warningCodes||[]).filter(X=>Hb.has(X)).map(X=>({row:J,code:X}))),L=()=>{x||m.current||(m.current=!0,R==null||R())},U=J=>{var K,W,oe,de;if(J.key!=="Tab")return;const X=[...((K=b.current)==null?void 0:K.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))||[]];if(X.length===0){J.preventDefault(),(W=b.current)==null||W.focus();return}const V=X[0],H=X[X.length-1];J.shiftKey&&(document.activeElement===V||!((oe=b.current)!=null&&oe.contains(document.activeElement)))?(J.preventDefault(),H.focus()):!J.shiftKey&&(document.activeElement===H||!((de=b.current)!=null&&de.contains(document.activeElement)))&&(J.preventDefault(),V.focus())};return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop workspace-restore-backdrop",onClick:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:93,columnNumber:7},this),c.jsxDEV("div",{ref:b,className:"settings-card workspace-restore-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"workspace-restore-title",tabIndex:-1,onKeyDown:U,children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{id:"workspace-restore-title",className:"settings-title",children:O("workspace.restoreLast")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:97,columnNumber:11},this),c.jsxDEV("button",{ref:d,type:"button",className:"settings-close workspace-restore-close",onClick:a,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:98,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:96,columnNumber:9},this),c.jsxDEV("div",{className:"workspace-restore-body",children:[c.jsxDEV("div",{className:"workspace-restore-reason",children:O(XC(r))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:102,columnNumber:11},this),c.jsxDEV("div",{className:"workspace-restore-time",children:O("workspace.savedAt",{time:JC(r.capturedAt)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:103,columnNumber:11},this),c.jsxDEV("div",{className:"workspace-restore-summary",children:O("workspace.topologySummary",{sessions:((G=r.summary)==null?void 0:G.sessions)??0,windows:((ie=r.summary)==null?void 0:ie.windows)??0,panes:((q=r.summary)==null?void 0:q.panes)??0})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:106,columnNumber:11},this),c.jsxDEV("div",{className:"workspace-restore-plan",children:O("workspace.planSummary",{restore:o,already:p})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:113,columnNumber:11},this),c.jsxDEV("div",{className:"workspace-restore-note",children:O("workspace.renameRule")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:116,columnNumber:11},this),f.length>0&&c.jsxDEV("ul",{className:"workspace-restore-renames",children:f.map(J=>c.jsxDEV("li",{children:[J.sourceName," → ",J.targetName]},J.logicalId||J.sourceName,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:119,columnNumber:37},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:118,columnNumber:13},this),c.jsxDEV("div",{className:"workspace-restore-note",children:O("workspace.nonDestructive")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:122,columnNumber:11},this),(l==null?void 0:l.status)==="partial"&&c.jsxDEV("div",{className:"workspace-restore-progress partial",role:"status",children:O("workspace.progressDone",{completed:E,total:_.total||o})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:125,columnNumber:13},this),(l==null?void 0:l.status)==="succeeded"&&c.jsxDEV("div",{className:"workspace-restore-success",children:O("workspace.complete")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:129,columnNumber:49},this),v&&c.jsxDEV("div",{className:"workspace-restore-summary workspace-restore-completed-summary",children:O("workspace.completedSummary",T)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:131,columnNumber:13},this),v&&T.sessions>0&&c.jsxDEV("div",{className:"workspace-restore-note",children:O("workspace.rebindHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:136,columnNumber:13},this),(l==null?void 0:l.errorCode)&&S.length===0&&c.jsxDEV("div",{className:"workspace-restore-errors",role:"alert",children:BS(l.errorCode)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:139,columnNumber:13},this),S.length>0&&c.jsxDEV("ul",{className:"workspace-restore-errors",role:"alert",children:S.map((J,X)=>c.jsxDEV("li",{children:O("workspace.sessionFailure",{session:J.sourceName||O("workspace.unknownSession"),reason:BS(J.errorCode)})},J.logicalId||`${J.sourceName}-${X}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:144,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:142,columnNumber:13},this),(k.length>0||D.length>0)&&c.jsxDEV("ul",{className:"workspace-restore-warnings",role:"status",children:[k.map(J=>c.jsxDEV("li",{children:FS(J)},`operation-${J}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:155,columnNumber:42},this)),D.map(({row:J,code:X},V)=>c.jsxDEV("li",{children:O("workspace.sessionWarning",{session:J.sourceName||O("workspace.unknownSession"),reason:FS(X)})},`${J.logicalId||J.sourceName||V}-${X}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:157,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:154,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:101,columnNumber:9},this),c.jsxDEV("div",{className:"workspace-restore-actions",children:v?c.jsxDEV(c.Fragment,{children:[T.sessions>0&&c.jsxDEV("button",{type:"button",className:"workspace-restore-primary",onClick:u,children:O("workspace.rebind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:171,columnNumber:17},this),c.jsxDEV("button",{type:"button",className:"workspace-restore-ignore",onClick:a,children:O("common.done")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:175,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:169,columnNumber:13},this):c.jsxDEV(c.Fragment,{children:[c.jsxDEV("button",{type:"button",className:"workspace-restore-primary",disabled:x,onClick:L,children:x?O("workspace.progress",{completed:_.completed||0,total:_.total||o}):O("workspace.restore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:181,columnNumber:15},this),c.jsxDEV("button",{type:"button",className:"workspace-restore-ignore",disabled:x,onClick:y,children:O("workspace.ignore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:186,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:180,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:167,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:94,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:92,columnNumber:5},this)}function HS(i){return i===300?O("usage.win5h"):i===10080?O("usage.winWeekly"):i===43200?O("usage.winMonthly"):i>0?O("usage.winGeneric",{h:Math.round(i/60)}):""}function Uf(i,r){if(!i)return"";const l=i-Math.floor(r/1e3);if(l<=0)return O("usage.resetSoon");const g=Math.floor(l/86400),N=Math.floor(l%86400/3600),R=Math.floor(l%3600/60),y=g>0?`${g}d ${N}h`:N>0?`${N}h ${R}m`:`${R}m`;return O("usage.resetIn",{t:y})}function qE({at:i,now:r}){if(!i)return null;const l=Math.max(0,Math.floor((r-i)/1e3)),g=l<60?O("usage.updatedNow"):l<3600?O("usage.updatedMin",{n:Math.floor(l/60)}):l<86400?O("usage.updatedHr",{n:Math.floor(l/3600)}):O("usage.updatedDay",{n:Math.floor(l/86400)});return c.jsxDEV("div",{className:"usage-updated",children:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:38,columnNumber:10},this)}function wc(i,r,l){if(!i||!r)return null;const g=i-Math.floor(l/1e3);return Math.max(0,Math.min(100,(1-g/(r*60))*100))}function oI({pct:i,timePct:r}){const l=Math.max(0,Math.min(100,i??0)),g=l>=80?"hi":l>=50?"mid":"lo";return c.jsxDEV("div",{className:"usage-bar",children:[c.jsxDEV("div",{className:`usage-bar-fill lvl-${g}`,style:{width:`${l}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:54,columnNumber:7},this),r!=null&&c.jsxDEV("div",{className:"usage-bar-time",style:{left:`${r}%`},title:O("usage.timeMark")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:55,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:53,columnNumber:5},this)}function xc({label:i,pct:r,reset:l,sub:g,timePct:N}){return c.jsxDEV("div",{className:"usage-row",children:[c.jsxDEV("div",{className:"usage-row-head",children:[c.jsxDEV("span",{className:"usage-row-label",children:[i,g&&c.jsxDEV("span",{className:"usage-row-sub",children:[" · ",g]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:64,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:64,columnNumber:9},this),c.jsxDEV("span",{className:"usage-row-pct",children:[Math.round(r),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:65,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:63,columnNumber:7},this),c.jsxDEV(oI,{pct:r,timePct:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:67,columnNumber:7},this),l&&c.jsxDEV("div",{className:"usage-row-reset",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:68,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:62,columnNumber:5},this)}function lI({claude:i,now:r}){var l,g;return c.jsxDEV("section",{className:"usage-agent",children:[c.jsxDEV("div",{className:"usage-agent-head",children:[c.jsxDEV(ol,{agent:"claude"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:41},this),c.jsxDEV("span",{children:"Claude Code"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:69},this),c.jsxDEV(qE,{at:i==null?void 0:i.updatedAt,now:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:93},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:7},this),i?!((l=i.rateLimits)!=null&&l.fiveHour)&&!((g=i.rateLimits)!=null&&g.sevenDay)?c.jsxDEV("div",{className:"usage-empty",children:O("usage.claudePending")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:83,columnNumber:9},this):c.jsxDEV(c.Fragment,{children:[i.rateLimits.fiveHour&&c.jsxDEV(xc,{label:O("usage.win5h"),pct:i.rateLimits.fiveHour.usedPercent,reset:Uf(i.rateLimits.fiveHour.resetsAt,r),timePct:wc(i.rateLimits.fiveHour.resetsAt,300,r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:87,columnNumber:13},this),i.rateLimits.sevenDay&&c.jsxDEV(xc,{label:O("usage.winWeekly"),pct:i.rateLimits.sevenDay.usedPercent,reset:Uf(i.rateLimits.sevenDay.resetsAt,r),timePct:wc(i.rateLimits.sevenDay.resetsAt,10080,r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:92,columnNumber:13},this),i.rateLimits.sevenDayOpus&&c.jsxDEV(xc,{label:O("usage.winWeekly"),sub:"Opus",pct:i.rateLimits.sevenDayOpus.usedPercent,timePct:wc(i.rateLimits.sevenDayOpus.resetsAt,10080,r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:97,columnNumber:13},this),i.rateLimits.sevenDaySonnet&&c.jsxDEV(xc,{label:O("usage.winWeekly"),sub:"Sonnet",pct:i.rateLimits.sevenDaySonnet.usedPercent,timePct:wc(i.rateLimits.sevenDaySonnet.resetsAt,10080,r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:85,columnNumber:9},this):c.jsxDEV("div",{className:"usage-empty",children:[c.jsxDEV("div",{children:O("usage.claudeOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:79,columnNumber:11},this),c.jsxDEV("code",{className:"usage-code",children:"handmux hooks install"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:80,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:75,columnNumber:5},this)}function cI({codex:i,now:r}){const l=i==null?void 0:i.rateLimits;return c.jsxDEV("section",{className:"usage-agent",children:[c.jsxDEV("div",{className:"usage-agent-head",children:[c.jsxDEV(ol,{agent:"codex"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:41},this),c.jsxDEV("span",{children:"Codex CLI"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:68},this),c.jsxDEV(qE,{at:i==null?void 0:i.updatedAt,now:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:90},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:7},this),i?c.jsxDEV(c.Fragment,{children:[(l==null?void 0:l.primary)&&c.jsxDEV(xc,{label:HS(l.primary.windowMinutes)||O("usage.winPrimary"),pct:l.primary.usedPercent,reset:Uf(l.primary.resetsAt,r),timePct:wc(l.primary.resetsAt,l.primary.windowMinutes,r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:120,columnNumber:13},this),(l==null?void 0:l.secondary)&&c.jsxDEV(xc,{label:HS(l.secondary.windowMinutes)||O("usage.winSecondary"),pct:l.secondary.usedPercent,reset:Uf(l.secondary.resetsAt,r),timePct:wc(l.secondary.resetsAt,l.secondary.windowMinutes,r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:125,columnNumber:13},this),!(l!=null&&l.primary)&&!(l!=null&&l.secondary)&&c.jsxDEV("div",{className:"usage-empty",children:O("usage.codexNoQuota")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:129,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:118,columnNumber:9},this):c.jsxDEV("div",{className:"usage-empty",children:O("usage.codexOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:116,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:113,columnNumber:5},this)}function uI({open:i,onClose:r,onAuthFail:l}){const[g,N]=A.useState(null),[R,y]=A.useState(""),[a,u]=A.useState(!1),m=Date.now();return A.useEffect(()=>{if(!i)return;let b=!1;return u(!0),y(""),VU().then(d=>{b||(N(d),u(!1))}).catch(d=>{b||(d instanceof ir?l==null||l():y(O("usage.loadFailed")),u(!1))}),()=>{b=!0}},[i]),i?c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop",onClick:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:161,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card usage-card",role:"dialog","aria-label":O("usage.title"),"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-title",children:O("usage.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:164,columnNumber:11},this),c.jsxDEV("span",{className:"usage-head-note",children:O("usage.activityNote")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:165,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:r,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:163,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:a&&!g?c.jsxDEV("div",{className:"usage-empty",children:O("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:170,columnNumber:13},this):R?c.jsxDEV("div",{className:"bind-error",children:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:172,columnNumber:13},this):g?c.jsxDEV(c.Fragment,{children:[c.jsxDEV(cI,{codex:g.codex,now:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:175,columnNumber:15},this),c.jsxDEV(lI,{claude:g.claude,now:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:176,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:174,columnNumber:13},this):null},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:168,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:162,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:160,columnNumber:5},this):null}function dI({rows:i,top:r,open:l,onToggle:g,onClose:N,onSelectRow:R,onMarkAllRead:y,hooksStatus:a,onEnableHooks:u}){const m=[];for(const _ of i){const E=m[m.length-1];E&&E.session===_.session?E.items.push(_):m.push({session:_.session,items:[_]})}const b=Date.now(),d=i.some(_=>_.view==="done"),w=q3(i),[x,j]=A.useState(!1),[v,o]=A.useState(!1),p=m.length===0&&a==="absent",f=async()=>{j(!0),o(!1);try{const _=await(u==null?void 0:u());(!_||_.status!=="installed")&&o(!0)}catch{o(!0)}finally{j(!1)}};return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("button",{className:"topbar-icon inbox-btn",onClick:g,"aria-label":O("inbox.title"),title:O("inbox.title"),children:[c.jsxDEV(E3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:36,columnNumber:9},this),r&&c.jsxDEV("span",{className:`inbox-dot ${r}`,"aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:37,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:35,columnNumber:7},this),l&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"inbox-backdrop",onClick:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:41,columnNumber:11},this),c.jsxDEV("div",{className:"inbox-panel",role:"dialog","aria-label":O("inbox.title"),children:[c.jsxDEV("div",{className:"inbox-head",children:[c.jsxDEV("span",{children:O("inbox.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:44,columnNumber:15},this),c.jsxDEV("div",{className:"inbox-summary",children:[c.jsxDEV("span",{className:"inbox-chip working",children:[O("inbox.working")," ",w.working]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:47,columnNumber:17},this),c.jsxDEV("span",{className:"inbox-chip done",children:[O("inbox.done")," ",w.done]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:48,columnNumber:17},this),c.jsxDEV("span",{className:"inbox-chip needs",children:[O("inbox.needs")," ",w.needs]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:49,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:46,columnNumber:15},this),d&&c.jsxDEV("button",{className:"inbox-readall",onClick:y,children:O("inbox.clearDone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:51,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:43,columnNumber:13},this),m.length===0?p?c.jsxDEV("div",{className:"inbox-empty inbox-enable",children:[c.jsxDEV("div",{className:"inbox-enable-title",children:O("inbox.enableTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:56,columnNumber:19},this),c.jsxDEV("div",{className:"inbox-enable-hint",children:O("inbox.enableHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:57,columnNumber:19},this),c.jsxDEV("button",{className:"inbox-enable-btn",onClick:f,disabled:x,children:O(x?"inbox.enabling":"inbox.enableBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:58,columnNumber:19},this),v&&c.jsxDEV("div",{className:"inbox-enable-err",children:O("inbox.enableFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:61,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:55,columnNumber:17},this):c.jsxDEV("div",{className:"inbox-empty",children:O("inbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:64,columnNumber:17},this):m.map(_=>c.jsxDEV("div",{className:"inbox-group",children:[c.jsxDEV("div",{className:"inbox-group-title",children:_.session},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:68,columnNumber:17},this),_.items.map(E=>c.jsxDEV("button",{className:"inbox-row",onClick:()=>R(E),children:[c.jsxDEV("div",{className:"inbox-row-head",children:[c.jsxDEV("span",{className:`inbox-chip ${E.view}`,children:G3[E.view]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:72,columnNumber:23},this),c.jsxDEV(ol,{agent:E.agent},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:73,columnNumber:23},this),c.jsxDEV("span",{className:"inbox-loc",children:E.windowName||E.window},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:74,columnNumber:23},this),c.jsxDEV("span",{className:"inbox-time",children:$C(E.ts,b)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:75,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:71,columnNumber:21},this),E.msg&&c.jsxDEV("div",{className:"inbox-msg",children:E.msg},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:77,columnNumber:31},this)]},E.pane,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:70,columnNumber:19},this))]},_.session,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:67,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:42,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:40,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:34,columnNumber:5},this)}function hI({open:i,orphan:r,onConfirm:l,onClose:g,inset:N=0}){var _;const[R,y]=A.useState([]),[a,u]=A.useState("new"),[m,b]=A.useState(""),[d,w]=A.useState(!0),[x,j]=A.useState(!1),[v,o]=A.useState("");if(A.useEffect(()=>{i&&(u("new"),b((r==null?void 0:r.suggestedName)||""),w(pU()),j(!1),o(""),Qo().then(E=>y(Array.isArray(E)?E:[])).catch(()=>y([])))},[i,r]),!i||!r)return null;const p=a==="new"?m.trim()||r.suggestedName||"":((_=R.find(E=>E.id===a))==null?void 0:_.name)||"",f=async()=>{if(x)return;j(!0),o(""),vU(d);const E=a==="new"?{mode:"new"}:{mode:"window",session:a};try{await l({target:E,kill:d,name:a==="new"?m.trim():void 0})}catch{j(!1),o(O("inbox.orphans.failed"))}};return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop",onClick:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:44,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${N/2}px))`},role:"dialog","aria-label":O("inbox.orphans.takeover"),"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-title",children:O("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:51,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:g,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:52,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:50,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:r.cwdLabel||r.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:56,columnNumber:13},this),r.snippet&&c.jsxDEV("div",{className:"inbox-msg",children:r.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:57,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:55,columnNumber:11},this),c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:O("inbox.orphans.targetLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:60,columnNumber:13},this),c.jsxDEV("div",{className:"orphan-targets",children:[c.jsxDEV("button",{className:"fontbtn","aria-pressed":a==="new",onClick:()=>u("new"),children:O("inbox.orphans.targetNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:62,columnNumber:15},this),R.map(E=>c.jsxDEV("button",{className:"fontbtn","aria-pressed":a===E.id,onClick:()=>u(E.id),children:E.name},E.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:66,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:61,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:59,columnNumber:11},this),a==="new"&&c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:O("inbox.orphans.nameLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:74,columnNumber:15},this),c.jsxDEV("input",{className:"bind-input",value:m,placeholder:O("bind.invalidName"),onChange:E=>{b(E.target.value),o("")}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:75,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:73,columnNumber:13},this),c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:O("inbox.orphans.killTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:84,columnNumber:13},this),c.jsxDEV("div",{className:"orphan-targets orphan-kill",children:[c.jsxDEV("button",{className:"fontbtn","aria-pressed":d,onClick:()=>w(!0),children:[O("inbox.orphans.killEnd"),c.jsxDEV("span",{className:"orphan-reco",children:O("inbox.orphans.recommended")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:87,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:86,columnNumber:15},this),c.jsxDEV("button",{className:"fontbtn","aria-pressed":!d,onClick:()=>w(!1),children:O("inbox.orphans.killKeep")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:89,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:85,columnNumber:13},this),c.jsxDEV("div",{className:"orphan-help",children:O("inbox.orphans.killWhy")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:93,columnNumber:13},this),c.jsxDEV("div",{className:"orphan-help",children:[O("inbox.orphans.reopenPre")," ",c.jsxDEV("code",{className:"orphan-cmd",children:["handmux open ",p||O("inbox.orphans.namePlaceholder")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:96,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:94,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:83,columnNumber:11},this),v&&c.jsxDEV("div",{className:"bind-error",children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:99,columnNumber:21},this),c.jsxDEV("div",{className:"settings-btns bind-actions",children:[c.jsxDEV("button",{className:"fontbtn",onClick:g,children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:101,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:f,disabled:x,children:O(x?"inbox.orphans.working":"inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:102,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:100,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:54,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:45,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:43,columnNumber:5},this)}const zS="tw_a2hs_dismissed",Md=()=>typeof navigator<"u"&&navigator.userAgent||"",pf=()=>/iP(hone|ad|od)/.test(Md())||/Macintosh/.test(Md())&&typeof navigator<"u"&&navigator.maxTouchPoints>1,mI=()=>/Android/.test(Md()),fI=()=>pf()&&/Safari/.test(Md())&&!/(CriOS|FxiOS|EdgiOS|OPiOS|mercury|GSA)/.test(Md());function pI(){const[i,r]=A.useState(!1),[l,g]=A.useState(null);if(A.useEffect(()=>{if(GC()||!pf()&&!mI())return;try{if(localStorage.getItem(zS)==="1")return}catch{}const m=b=>{b.preventDefault(),g(b)};return window.addEventListener("beforeinstallprompt",m),r(!0),()=>window.removeEventListener("beforeinstallprompt",m)},[]),!i)return null;const N=()=>{try{localStorage.setItem(zS,"1")}catch{}r(!1)},R=async()=>{if(l){l.prompt();try{await l.userChoice}catch{}N()}};let y,a,u=null;return l?(y="install",a=O("a2hs.lead"),u=c.jsxDEV("button",{className:"a2hs-banner-cta",onClick:R,children:O("a2hs.install")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:54,columnNumber:11},this)):pf()&&!fI()?(y="ios-other",a=O("a2hs.iosOpenSafari")):pf()?(y="ios",a=O("a2hs.iosHint")):(y="android",a=O("a2hs.androidManual")),c.jsxDEV("div",{className:"a2hs-banner",role:"status","aria-label":O("a2hs.title"),"data-mode":y,children:[c.jsxDEV("span",{className:"a2hs-banner-icon","aria-hidden":"true",children:"⊕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:65,columnNumber:7},this),c.jsxDEV("div",{className:"a2hs-banner-txt",children:[c.jsxDEV("span",{className:"a2hs-banner-title",children:O("a2hs.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:67,columnNumber:9},this),c.jsxDEV("span",{className:"a2hs-banner-sub",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:66,columnNumber:7},this),u,c.jsxDEV("button",{className:"a2hs-banner-x",onClick:N,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:71,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:64,columnNumber:5},this)}const zb="tw_claude_hooks";function vI(){try{return localStorage.getItem(zb)||null}catch{return null}}function gI(i=null){const[r,l]=A.useState(vI);A.useEffect(()=>{if(!i)return;const N=i.claudeHooks||"installed";l(N);try{localStorage.setItem(zb,N)}catch{}},[i]);const g=A.useCallback(async()=>{const N=await o3();if(N!=null&&N.status){l(N.status);try{localStorage.setItem(zb,N.status)}catch{}}return N},[]);return{status:r,enable:g}}function _I({value:i,options:r,onChange:l,ariaLabel:g}){const[N,R]=A.useState(!1),y=A.useRef(null),a=r.find(u=>u.value===i)||r[0];return A.useEffect(()=>{if(!N)return;const u=m=>{var b;(b=y.current)!=null&&b.contains(m.target)||R(!1)};return document.addEventListener("pointerdown",u,!0),()=>document.removeEventListener("pointerdown",u,!0)},[N]),Mn(N,()=>R(!1)),c.jsxDEV("div",{className:"dd",ref:y,children:[c.jsxDEV("button",{type:"button",className:"field dd-trigger","aria-haspopup":"listbox","aria-expanded":N,"aria-label":g,onClick:()=>R(u=>!u),children:[c.jsxDEV("span",{className:"dd-value",children:a==null?void 0:a.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:32,columnNumber:9},this),c.jsxDEV("span",{className:`dd-caret${N?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:33,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:24,columnNumber:7},this),N&&c.jsxDEV("div",{className:"dd-menu",role:"listbox",children:r.map(u=>c.jsxDEV("button",{type:"button",role:"option","aria-selected":u.value===i,className:`dd-option${u.value===i?" is-selected":""}`,onClick:()=>{l==null||l(u.value),R(!1)},children:[c.jsxDEV("span",{className:"dd-option-label",children:u.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:46,columnNumber:15},this),u.value===i&&c.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:47,columnNumber:37},this)]},u.value||"__none__",!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:38,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:36,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:23,columnNumber:5},this)}const KE=[{value:"",label:O("startup.preset_shell")},{value:"claude",label:O("startup.preset_claude")},{value:"claude --continue",label:O("startup.preset_claude_continue")},{value:"codex",label:O("startup.preset_codex")}],vf="__custom__",bI=[...KE,{value:vf,label:O("startup.custom")}];function XE({value:i="",onChange:r}){const l=KE.some(m=>m.value===i),[g,N]=A.useState(l?i:vf),[R,y]=A.useState(l?"":i),a=m=>{N(m),r==null||r(m===vf?R:m)},u=m=>{const b=m.target.value;y(b),r==null||r(b)};return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-label",children:O("startup.label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:29,columnNumber:7},this),c.jsxDEV(_I,{value:g,options:bI,onChange:a,ariaLabel:O("startup.aria")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:30,columnNumber:7},this),g===vf&&c.jsxDEV("input",{className:"bind-input startup-custom",value:R,placeholder:O("startup.custom_placeholder"),onChange:u,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:32,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:28,columnNumber:5},this)}const yI=/^[A-Za-z0-9-]{1,16}$/;function wI({open:i,onClose:r,onBound:l,bound:g,onAuthFail:N,inset:R=0}){const[y,a]=A.useState([]),[u,m]=A.useState("new"),[b,d]=A.useState(null),[w,x]=A.useState(""),[j,v]=A.useState(""),[o,p]=A.useState(!1),[f,_]=A.useState(null),[E,T]=A.useState(yC()),[S,k]=A.useState(!1),D=A.useRef(null);if(A.useEffect(()=>{i&&(x(""),v(""),p(!1),_(null),k(!1),m("new"),d("new"),Qo().then(P=>{const I=Array.isArray(P)?P:[];a(I),I.some(G=>!g.includes(G.name))&&(m("existing"),d(null))}).catch(P=>{P instanceof ir?N==null||N():v(O("bind.checkFailed"))}))},[i]),A.useEffect(()=>{b==="new"&&setTimeout(()=>{var P;return(P=D.current)==null?void 0:P.focus()},0)},[b]),Mn(i&&S,()=>k(!1)),!i)return null;const L=y.filter(P=>!g.includes(P.name)),U=async()=>{if(o||!b)return;if(b!=="new"){l(b);return}const P=w.trim();if(P){if(g.includes(P)||y.some(I=>I.name===P)){v(O("bind.alreadyExists"));return}if(!yI.test(P)){v(O("bind.invalidName"));return}p(!0),v(""),wC(E);try{await qU(P,f||void 0,E||void 0),l(P)}catch(I){I instanceof ir?N==null||N():v(O("bind.createFailed")),p(!1)}}},F=O(b==="new"?o?"bind.creating":"bind.createAndOpen":o?"bind.checking":"bind.bind");return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop",onClick:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:81,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${R/2}px))`},role:"dialog","aria-label":O("bind.title"),"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-title",children:O("bind.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:91,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:r,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:92,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:90,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"opt",children:c.jsxDEV("div",{className:"bind-mode",role:"tablist","aria-label":O("bind.pickSession"),children:[c.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":u==="new",onClick:()=>{m("new"),d("new"),v("")},children:O("bind.modeNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:99,columnNumber:15},this),c.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":u==="existing",disabled:!L.length,onClick:()=>{m("existing"),d(null),v("")},children:O("bind.modeExisting")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:105,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:98,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:95,columnNumber:11},this),u==="existing"&&c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:O("bind.pickSession")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:115,columnNumber:15},this),c.jsxDEV("div",{className:"orphan-targets",children:L.map(P=>c.jsxDEV("button",{className:"fontbtn","aria-pressed":b===P.name,onClick:()=>{d(P.name),v("")},children:P.name},P.id||P.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:118,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:116,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:114,columnNumber:13},this),u==="new"&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:O("bind.sessionName")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:133,columnNumber:17},this),c.jsxDEV("input",{ref:D,className:"bind-input",value:w,placeholder:O("bind.invalidName"),onChange:P=>{x(P.target.value),v("")},onKeyDown:P=>{P.key==="Enter"&&U()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:134,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:132,columnNumber:15},this),c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:O("bind.startDir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:144,columnNumber:17},this),c.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>k(!0),children:[c.jsxDEV("span",{className:"cwd-path",children:f||O("bind.homeDirDefault")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:146,columnNumber:19},this),c.jsxDEV("span",{className:"cwd-action",children:O("bind.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:147,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:145,columnNumber:17},this),f&&c.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>_(null),children:O("bind.reset")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:149,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:143,columnNumber:15},this),c.jsxDEV("div",{className:"opt",children:c.jsxDEV(XE,{value:E,onChange:T},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:152,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:151,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:131,columnNumber:13},this),j&&c.jsxDEV("div",{className:"bind-error",children:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:156,columnNumber:21},this),c.jsxDEV("div",{className:"settings-hint",children:O("bind.desktopHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:159,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns bind-actions",children:[c.jsxDEV("button",{className:"fontbtn",onClick:r,children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:161,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:U,disabled:o||!b,children:F},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:162,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:160,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:94,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:85,columnNumber:7},this),c.jsxDEV(Bd,{open:S,seedCwd:f,allowMkdir:!0,onPick:P=>{_(P),k(!1)},onClose:()=>k(!1),inset:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:168,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:80,columnNumber:5},this)}const xI=/^[A-Za-z0-9-]{1,16}$/;function NI({open:i,onClose:r,onCreate:l,paneId:g,inset:N=0}){const[R,y]=A.useState(""),[a,u]=A.useState(""),[m,b]=A.useState(!1),[d,w]=A.useState(null),[x,j]=A.useState(""),[v,o]=A.useState(yC()),[p,f]=A.useState(!1),_=A.useRef(null);if(A.useEffect(()=>{i&&(y(""),u(""),b(!1),w(null),j(""),f(!1),setTimeout(()=>{var T;return(T=_.current)==null?void 0:T.focus()},0),g&&al(g).then(({cwd:T})=>j(T||"")).catch(()=>{}))},[i,g]),Mn(i&&p,()=>f(!1)),!i)return null;const E=async()=>{if(m)return;const T=R.trim();if(T&&!xI.test(T)){u(O("newwindow.name_rule"));return}b(!0),u(""),wC(v);try{await l(T,d||void 0,v||void 0)}catch{b(!1)}};return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop",onClick:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:51,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${N/2}px))`},role:"dialog","aria-label":O("newwindow.title"),"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-title",children:O("newwindow.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:58,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:r,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:59,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:57,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:O("newwindow.window_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:63,columnNumber:13},this),c.jsxDEV("input",{ref:_,className:"bind-input",value:R,placeholder:O("newwindow.name_placeholder"),onChange:T=>{y(T.target.value),u("")},onKeyDown:T=>{T.key==="Enter"&&E()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:64,columnNumber:13},this),a&&c.jsxDEV("div",{className:"bind-error",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:72,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:62,columnNumber:11},this),c.jsxDEV("div",{className:"opt",children:[c.jsxDEV("div",{className:"settings-label",children:O("newwindow.start_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:75,columnNumber:13},this),c.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>f(!0),children:[c.jsxDEV("span",{className:"cwd-path",children:d||(x?O("newwindow.session_dir_named",{dir:x}):O("newwindow.session_dir_default"))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:77,columnNumber:15},this),c.jsxDEV("span",{className:"cwd-action",children:O("newwindow.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:78,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:76,columnNumber:13},this),d&&c.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>w(null),children:O("newwindow.reset_to_session_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:80,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:74,columnNumber:11},this),c.jsxDEV("div",{className:"opt",children:c.jsxDEV(XE,{value:v,onChange:o},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:83,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:82,columnNumber:11},this),c.jsxDEV("div",{className:"settings-btns bind-actions",children:[c.jsxDEV("button",{className:"fontbtn",onClick:r,children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:86,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:E,disabled:m,children:O(m?"newwindow.creating":"common.create")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:87,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:85,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:61,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:52,columnNumber:7},this),c.jsxDEV(Bd,{open:p,seedCwd:d||x||null,pane:g,allowMkdir:!0,onPick:T=>{w(T),f(!1)},onClose:()=>f(!1),inset:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:93,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:50,columnNumber:5},this)}const SI=/^[A-Za-z0-9-]{1,16}$/;function CI({open:i,title:r,currentName:l="",onClose:g,onSubmit:N,inset:R=0}){const[y,a]=A.useState(l),[u,m]=A.useState(""),[b,d]=A.useState(!1),w=A.useRef(null);if(A.useEffect(()=>{i&&(a(l),m(""),d(!1),setTimeout(()=>{var j;return(j=w.current)==null?void 0:j.focus()},0))},[i,l]),!i)return null;const x=async()=>{if(b)return;const j=y.trim();if(!SI.test(j)){m(O("rename.name_rule"));return}d(!0),m("");try{await N(j)}catch(v){m((v==null?void 0:v.message)||O("rename.failed")),d(!1)}};return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"settings-backdrop",onClick:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:36,columnNumber:7},this),c.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${R/2}px))`},role:"dialog","aria-label":r,"aria-modal":"true",children:[c.jsxDEV("div",{className:"settings-head",children:[c.jsxDEV("span",{className:"settings-title",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:43,columnNumber:11},this),c.jsxDEV("button",{className:"settings-close",onClick:g,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:42,columnNumber:9},this),c.jsxDEV("div",{className:"settings-section",children:[c.jsxDEV("div",{className:"settings-label",children:O("rename.new_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:47,columnNumber:11},this),c.jsxDEV("input",{ref:w,className:"bind-input",value:y,placeholder:O("rename.name_rule"),onChange:j=>{a(j.target.value),m("")},onKeyDown:j=>{j.key==="Enter"&&x()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:48,columnNumber:11},this),u&&c.jsxDEV("div",{className:"bind-error",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:56,columnNumber:21},this),c.jsxDEV("div",{className:"settings-btns bind-actions",children:[c.jsxDEV("button",{className:"fontbtn",onClick:g,children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:58,columnNumber:13},this),c.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:x,disabled:b,children:O(b?"rename.saving":"common.save")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:59,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:46,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:37,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:35,columnNumber:5},this)}function EI({onOpenDoc:i,refreshKey:r=0}){const[l,g]=A.useState(()=>Nd()),N=y=>{wU(y),g(Nd())},R=A.useRef(!0);return A.useEffect(()=>{if(R.current){R.current=!1;return}g(Nd())},[r]),l.length===0?c.jsxDEV("div",{className:"home-view",children:c.jsxDEV("div",{className:"home-empty",children:[O("home.empty"),c.jsxDEV("span",{children:O("home.emptyHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:23,columnNumber:54},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:22,columnNumber:7},this):c.jsxDEV("div",{className:"home-view",children:l.map(y=>c.jsxDEV("div",{className:"home-recent-row",children:[c.jsxDEV("button",{className:"home-recent",onClick:()=>i(y.path),title:y.path,children:[c.jsxDEV("span",{className:"home-name",children:y.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:32,columnNumber:13},this),c.jsxDEV("span",{className:"home-path",children:y.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:33,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:31,columnNumber:11},this),c.jsxDEV("button",{className:"home-x","aria-label":O("home.remove"),onClick:()=>N(y.path),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:35,columnNumber:11},this)]},y.path,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:30,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:28,columnNumber:5},this)}const jI=/[^\n]*?(?:[。!?…]+|[.!?]+(?=\s|$)|\n+|$)/gu,DI=/[。!?…]$|[.!?]$/;function kI(i,r){for(let l=i.parentNode;l&&l!==r;l=l.parentNode){const g=l.nodeName;if(g==="PRE"||g==="SCRIPT"||g==="STYLE"||g==="CODE")return!0}return!1}function RI(i){if(!i)return[];if(i.querySelector("span.tts-sent"))return TI(i);const r=document.createTreeWalker(i,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.nodeValue&&a.nodeValue.trim()&&!kI(a,i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),l=[];for(;r.nextNode();)l.push(r.currentNode);const g=[],N=[];let R=0;for(const a of l){const u=a.ownerDocument.createDocumentFragment();for(const m of a.nodeValue.matchAll(jI)){const b=m[0];if(b==="")continue;const d=a.ownerDocument.createElement("span");d.className="tts-sent",d.textContent=b,u.appendChild(d),(N[R]||(N[R]=[])).push(d),g[R]=(g[R]||"")+b,DI.test(b)&&R++}a.parentNode.replaceChild(u,a)}const y=[];return g.forEach((a,u)=>{const m=(a||"").replace(/\s+/g," ").trim();if(!m)return;const b=y.length;y.push(m);for(const d of N[u]||[])d.dataset.tts=String(b)}),y}function TI(i){const r=[];return i.querySelectorAll("span.tts-sent[data-tts]").forEach(l=>{const g=Number(l.dataset.tts);r[g]=(r[g]||"")+l.textContent}),r.map(l=>(l||"").replace(/\s+/g," ").trim())}const JE="tw_doc_rate",gf=[1,1.25,1.5],$S=()=>{const i=Number(localStorage.getItem(JE));return gf.includes(i)?i:1};function LI(){const i=typeof window<"u"&&window.speechSynthesis||null,[r,l]=A.useState({playing:!1,paused:!1,idx:-1}),[g,N]=A.useState($S),R=A.useRef({sentences:[],idx:-1,playing:!1,rate:$S()});R.current.rate=g;const y=()=>((i==null?void 0:i.getVoices())||[]).find(x=>/^zh/i.test(x.lang))||null,a=x=>{const j=R.current;if(!i)return;if(x<0||x>=j.sentences.length){u();return}j.idx=x,l({playing:!0,paused:!1,idx:x});const v=new SpeechSynthesisUtterance(j.sentences[x]);v.rate=j.rate;const o=y();o?(v.voice=o,v.lang=o.lang):v.lang="zh-CN";const p=()=>{j.playing&&j.idx===x&&a(x+1)};v.onend=p,v.onerror=p,i.speak(v)},u=()=>{const x=R.current;x.playing=!1,x.idx=-1,i&&i.cancel(),l({playing:!1,paused:!1,idx:-1})},m=x=>{if(!i||!x||!x.length)return;i.cancel();const j=R.current;if(j.sentences=x,j.playing=!0,j.idx=-1,l({playing:!0,paused:!1,idx:-1}),i.getVoices().length){a(0);return}const v=()=>{i.removeEventListener("voiceschanged",v),j.playing&&j.idx===-1&&a(0)};i.addEventListener("voiceschanged",v),setTimeout(v,300)},b=()=>{i&&R.current.playing&&(i.pause(),l(x=>({...x,paused:!0})))},d=()=>{i&&R.current.playing&&(i.resume(),l(x=>({...x,paused:!1})))},w=()=>{const x=gf[(gf.indexOf(g)+1)%gf.length]||1;localStorage.setItem(JE,String(x)),R.current.rate=x,N(x);const j=R.current;i&&j.playing&&j.idx>=0&&(i.cancel(),a(j.idx))};return A.useEffect(()=>()=>{R.current.playing=!1,i&&i.cancel()},[i]),{supported:!!i,playing:r.playing,paused:r.paused,idx:r.idx,rate:g,play:m,pause:b,resume:d,stop:u,cycleRate:w}}const WS=6,AI=500,GS=10,MI=300,YS=(i,r)=>Math.hypot(i.x-r.x,i.y-r.y);function UI({url:i,name:r}){const[l,g]=A.useState({s:1,x:0,y:0}),[N,R]=A.useState(""),[y,a]=A.useState(!1),u=A.useRef(l);u.current=l;const m=A.useRef(null),b=A.useRef(null),d=A.useRef(null),w=A.useRef(new Map),x=A.useRef(null),j=A.useRef(null),v=A.useRef(null),o=A.useRef({moved:!1,lpFired:!1,pinched:!1}),p=A.useRef(0);if(Mn(y,()=>a(!1)),!i)return c.jsxDEV("div",{className:"doc-image-msg",children:O("imageviewer.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:41,columnNumber:20},this);const f=(P,I,G)=>{const ie=b.current,q=d.current;if(!ie||!q)return{x:I,y:G};const J=Math.max(0,(q.offsetWidth*P-ie.clientWidth)/2),X=Math.max(0,(q.offsetHeight*P-ie.clientHeight)/2);return{x:Math.min(J,Math.max(-J,I)),y:Math.min(X,Math.max(-X,G))}},_=(P,I,G)=>{if(P=Math.min(WS,Math.max(1,P)),P<=1){g({s:1,x:0,y:0});return}const ie=f(P,I,G);g({s:P,x:ie.x,y:ie.y})},E=P=>_(u.current.s*P,u.current.x,u.current.y),T=()=>{v.current&&(clearTimeout(v.current),v.current=null)},S=P=>{R(P),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>R(""),2500)},k=()=>{a(!1);const P=document.createElement("a");P.href=i,P.download=r||"image",document.body.appendChild(P),P.click(),P.remove(),S(O("imageviewer.saved"))},D=async()=>{var P;a(!1);try{const I=await(await fetch(i)).blob(),G=new File([I],r||"image",{type:If(r)||I.type||"application/octet-stream"});if((P=navigator.canShare)!=null&&P.call(navigator,{files:[G]})){await navigator.share({files:[G]});return}}catch{return}S(O("imageviewer.shareUnsupported"))},L=P=>{var G,ie;(ie=(G=P.currentTarget).setPointerCapture)==null||ie.call(G,P.pointerId),w.current.set(P.pointerId,{x:P.clientX,y:P.clientY});const I=w.current.size;if(I===2){T(),o.current.pinched=!0;const[q,J]=[...w.current.values()];x.current={dist:YS(q,J)||1,s:u.current.s}}else I===1&&(o.current.moved=!1,o.current.lpFired=!1,o.current.pinched=!1,j.current={x:P.clientX,y:P.clientY},T(),v.current=setTimeout(()=>{v.current=null,w.current.size===1&&!o.current.moved&&(o.current.lpFired=!0,a(!0))},AI))},U=P=>{if(w.current.has(P.pointerId)){if(w.current.set(P.pointerId,{x:P.clientX,y:P.clientY}),w.current.size>=2&&x.current){const[I,G]=[...w.current.values()];_(x.current.s*(YS(I,G)/x.current.dist),u.current.x,u.current.y);return}if(j.current){const I=P.clientX-j.current.x,G=P.clientY-j.current.y;(Math.abs(I)>GS||Math.abs(G)>GS)&&(o.current.moved=!0,T()),u.current.s>1&&(j.current={x:P.clientX,y:P.clientY},_(u.current.s,u.current.x+I,u.current.y+G))}}},F=P=>{if(T(),w.current.delete(P.pointerId),w.current.size===1){x.current=null;const[I]=[...w.current.values()];j.current={x:I.x,y:I.y}}else if(w.current.size===0){if(!o.current.moved&&!o.current.lpFired&&!o.current.pinched){const G=P.timeStamp||0;G-p.current<MI?(p.current=0,u.current.s>1?_(1,0,0):_(2,0,0)):p.current=G}x.current=null,j.current=null,o.current={moved:!1,lpFired:!1,pinched:!1}}};return c.jsxDEV("div",{ref:b,className:"doc-image-wrap",onPointerDown:L,onPointerMove:U,onPointerUp:F,onPointerCancel:F,onContextMenu:P=>P.preventDefault(),children:[c.jsxDEV("img",{ref:d,className:"doc-image",src:i,alt:r,draggable:!1,style:{transform:`translate(${l.x}px, ${l.y}px) scale(${l.s})`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:161,columnNumber:7},this),c.jsxDEV("div",{className:"doc-image-zoom",onPointerDown:P=>P.stopPropagation(),children:[c.jsxDEV("button",{onClick:()=>E(1/1.5),disabled:l.s<=1,"aria-label":O("imageviewer.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:170,columnNumber:9},this),c.jsxDEV("span",{className:"doc-image-zoom-val","aria-hidden":"true",children:[Math.round(l.s*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:171,columnNumber:9},this),c.jsxDEV("button",{onClick:()=>E(1.5),disabled:l.s>=WS,"aria-label":O("imageviewer.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:172,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:169,columnNumber:7},this),N&&c.jsxDEV("div",{className:"doc-image-note",role:"status",children:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:174,columnNumber:16},this),c.jsxDEV(Mf,{open:y,title:r||O("imageviewer.imageTitle"),actions:[{key:"save",label:O("imageviewer.saveImage"),onClick:k},{key:"share",label:O("imageviewer.shareImage"),onClick:D}],onClose:()=>a(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:175,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:152,columnNumber:5},this)}const hb=Ha.length-1;function OI({type:i,name:r,content:l}){const[g,N]=A.useState(()=>SU()),R=A.useRef(null),y=LI();Wf(y.playing&&!y.paused);const a=A.useMemo(()=>i==="markdown"?IE.sanitize(ri.parse(l||"")):"",[i,l]);if(A.useEffect(()=>{y.stop()},[a]),A.useEffect(()=>{var x;const d=R.current;if(!d||(d.querySelectorAll(".tts-active").forEach(j=>j.classList.remove("tts-active")),y.idx<0))return;const w=d.querySelectorAll(`.tts-sent[data-tts="${y.idx}"]`);w.forEach(j=>j.classList.add("tts-active")),(x=w[0])==null||x.scrollIntoView({block:"center",behavior:"smooth"})},[y.idx]),i==="image")return c.jsxDEV(UI,{url:l,name:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:50,columnNumber:12},this);if(i==="html")return c.jsxDEV("iframe",{className:"doc-iframe",sandbox:"allow-scripts",srcDoc:l||"",title:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:54,columnNumber:12},this);const u=d=>{const w=Math.min(hb,Math.max(0,g+d));N(w),CU(w)};if(i==="text")return c.jsxDEV("div",{className:"doc-md-wrap",children:[c.jsxDEV("div",{className:"doc-zoom",children:c.jsxDEV("div",{className:"doc-fonts",children:[c.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>u(-1),disabled:g<=0,"aria-label":O("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:65,columnNumber:13},this),c.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>u(1),disabled:g>=hb,"aria-label":O("doc.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:66,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:64,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:63,columnNumber:9},this),c.jsxDEV("pre",{className:"doc-text",style:{fontSize:`${Ha[g]}px`},children:l||""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:62,columnNumber:7},this);const m=()=>{if(y.playing){y.paused?y.resume():y.pause();return}const d=RI(R.current);d.length&&y.play(d)},b=y.playing&&!y.paused;return c.jsxDEV("div",{className:"doc-md-wrap",children:[c.jsxDEV("div",{className:"doc-zoom",children:[y.supported&&c.jsxDEV("div",{className:"doc-tts",children:[c.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:m,"aria-label":b?O("doc.pauseRead"):y.paused?O("doc.resumeRead"):O("doc.read"),children:b?c.jsxDEV(k3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:26},this):c.jsxDEV(D3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:86,columnNumber:13},this),c.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:y.stop,disabled:!y.playing,"aria-label":O("doc.stopRead"),children:c.jsxDEV(OC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:91,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:90,columnNumber:13},this),c.jsxDEV("button",{className:"doc-zoom-btn",onClick:y.cycleRate,"aria-label":O("doc.rate"),children:[y.rate,"×"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:93,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:85,columnNumber:11},this),c.jsxDEV("div",{className:"doc-fonts",children:[c.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>u(-1),disabled:g<=0,"aria-label":O("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:97,columnNumber:11},this),c.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>u(1),disabled:g>=hb,"aria-label":O("doc.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:98,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:96,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:83,columnNumber:7},this),c.jsxDEV("div",{ref:R,className:"doc-md",style:{fontSize:`${Ha[g]}px`},dangerouslySetInnerHTML:{__html:a}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:101,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:82,columnNumber:5},this)}function PI({open:i,pane:r,windowId:l,tabs:g,active:N,onActivate:R,onCloseTab:y,onMinimize:a,onOpenDoc:u,pendingShare:m,onPendingConsumed:b}){const d=g.find(q=>q.key===N)||g[0],[w,x]=A.useState("recent"),[j,v]=A.useState(null),[o,p]=A.useState(0),f=d.type==="home",_=A.useRef(null),E=A.useRef(j);E.current=j;const T=A.useRef(N);T.current=N;const S=A.useRef(l);S.current=l;const k=A.useRef(a);k.current=a;const D=A.useRef(R);D.current=R;const L=A.useRef(N),U=A.useRef(0),F=A.useRef([]),P=()=>{window.history.pushState({fileOverlay:!0},""),U.current+=1};Bf(i,()=>{var J,X;U.current=Math.max(0,U.current-1);const q=F.current.pop();if((q==null?void 0:q.type)==="doc"){(J=D.current)==null||J.call(D,"home");return}if((q==null?void 0:q.type)==="nav"){v(q.prev),q.prev&&w1(S.current,q.prev);return}(X=k.current)==null||X.call(k)});const I=q=>{i&&q!==E.current&&(F.current.push({type:"nav",prev:E.current}),P()),v(q),w1(l,q)},G=A.useRef(i);A.useEffect(()=>{const q=L.current;L.current=N;const J=G.current;G.current=i,i&&J&&q==="home"&&N!=="home"&&(F.current.push({type:"doc"}),P())},[N,i]),A.useEffect(()=>{if(i)return F.current=[],U.current=0,P(),()=>{U.current>0&&(Ff(U.current),U.current=0)}},[i]);const ie=async()=>{try{const{cwd:q}=await al(r);q&&v(q)}catch{}};return A.useEffect(()=>{m&&x("browse")},[m]),A.useEffect(()=>{i&&p(q=>q+1)},[i]),A.useEffect(()=>{if(!i){_.current=null;return}if(_.current===l)return;_.current=l,F.current=[],x("browse");let q=!1;return(async()=>{const J=nU(l);let X=null;if(J)try{await RC(J),X=J}catch{}if(!X&&r)try{const{cwd:V}=await al(r);X=V}catch{}!q&&X&&v(X)})(),()=>{q=!0}},[i,l,r]),hl.createPortal(c.jsxDEV("div",{className:`file-sheet ${i?"open":""}`,"aria-hidden":!i,children:[c.jsxDEV("div",{className:"file-tabs",children:[c.jsxDEV("div",{className:"file-tabs-scroll",children:g.map(q=>c.jsxDEV("div",{className:`file-tab ${q.key===N?"active":""}`,children:[c.jsxDEV("button",{className:"file-tab-label",onClick:()=>R(q.key),children:q.key==="home"?c.jsxDEV(c.Fragment,{children:[c.jsxDEV(Dd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:39},this),O("filemanager.files")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:37},this):q.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:144,columnNumber:15},this),q.key!=="home"&&c.jsxDEV("button",{className:"file-tab-x","aria-label":O("filemanager.closeTab"),onClick:()=>y(q.key),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:148,columnNumber:17},this)]},q.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:143,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:141,columnNumber:9},this),c.jsxDEV("button",{className:"file-min","aria-label":O("filemanager.minimize"),title:O("filemanager.minimize"),onClick:a,children:c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:153,columnNumber:134},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:153,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:140,columnNumber:7},this),c.jsxDEV("div",{className:"file-body",children:f?c.jsxDEV("div",{className:"home-pane",children:[c.jsxDEV("div",{className:"file-seg",role:"tablist",children:[c.jsxDEV("button",{className:`file-seg-btn ${w==="recent"?"on":""}`,role:"tab","aria-selected":w==="recent",onClick:()=>x("recent"),children:[c.jsxDEV(AC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:161,columnNumber:17},this),O("filemanager.recent")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:159,columnNumber:15},this),c.jsxDEV("button",{className:`file-seg-btn ${w==="browse"?"on":""}`,role:"tab","aria-selected":w==="browse",onClick:()=>x("browse"),children:[c.jsxDEV(Dd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:165,columnNumber:17},this),O("filemanager.directory")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:163,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:158,columnNumber:13},this),w==="recent"?c.jsxDEV(EI,{onOpenDoc:u,refreshKey:o},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:169,columnNumber:17},this):c.jsxDEV($E,{path:j,onNavigate:I,onOpenDoc:u,onJumpToCwd:r?ie:null,refreshKey:o,pendingFile:m,onPendingConsumed:b,overlayActive:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:170,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:157,columnNumber:11},this):c.jsxDEV(OI,{type:d.type,name:d.name,content:d.content},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:174,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:155,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:139,columnNumber:5},this),document.body)}function VI(i){if(!i)return[];const r=[];let l=null,g=null;for(const N of i.split(`
335
+ `)){if(N.startsWith("diff --git")){const y=N.match(/ b\/(.*)$/);l={path:y?y[1]:N.slice(11),hunks:[]},r.push(l),g=null;continue}if(!l)continue;if(N.startsWith("@@")){g={header:N,lines:[]},l.hunks.push(g);continue}if(!g)continue;const R=N[0];R==="+"?g.lines.push({type:"add",text:N.slice(1)}):R==="-"?g.lines.push({type:"del",text:N.slice(1)}):R===" "&&g.lines.push({type:"ctx",text:N.slice(1)})}return r}const II=i=>String(i||"").replace(/\/+$/,"").split("/").pop()||i;function Of(i,r){const l=(i&&i!==" "?i:r)||"?";return l==="?"?"?":l}function BI({open:i,pane:r,windowId:l,inset:g=0,onClose:N}){const R=A.useRef(!0);A.useEffect(()=>()=>{R.current=!1},[]);const[y,a]=A.useState([]),[u,m]=A.useState(null),[b,d]=A.useState([]),w=b.length?b[b.length-1]:null,[x,j]=A.useState(!1),[v,o]=A.useState(null),p=A.useRef(l);A.useEffect(()=>{p.current=l},[l]);const[f,_]=A.useState(null),[E,T]=A.useState(null),[S,k]=A.useState(null),[D,L]=A.useState(null),[U,F]=A.useState(20),[P,I]=A.useState(!1),[G,ie]=A.useState({changes:!0,commits:!0}),[q,J]=A.useState(!1),X=A.useRef(null),[V,H]=A.useState(null),[K,W]=A.useState(null),[oe,de]=A.useState(null),xe=A.useRef(b);xe.current=b;const Se=A.useRef(x);Se.current=x;const se=A.useRef(N);se.current=N;const Y=A.useRef(0),pe=()=>{window.history.pushState({gitOverlay:!0},""),Y.current+=1},he=we=>{pe(),d(Je=>[...Je,we])},He=()=>{pe(),j(!0)};Mn(i&&q,()=>J(!1)),Bf(i,()=>{var we;if(Y.current=Math.max(0,Y.current-1),Se.current){j(!1);return}if(xe.current.length){d(Je=>Je.slice(0,-1));return}(we=se.current)==null||we.call(se)}),A.useEffect(()=>{if(i)return pe(),()=>{Y.current>0&&(Ff(Y.current),Y.current=0)}},[i]),A.useEffect(()=>{if(!i)return;let we=!1;d([]),L(null),W(null),de(null);const Je=ny(l);return Je.length?(a(Je),m(_e=>_e&&Je.includes(_e)?_e:Je[0]),()=>{we=!0}):(a([]),m(null),(async()=>{try{if(!r)return;const{cwd:_e}=await al(r);if(!_e)return;const{repos:Z=[]}=await L1(_e);if(we||!Z.length)return;const Pe=C1(l,Z.map(xt=>xt.path));if(we)return;a(Pe),m(Pe[0]??null)}catch(_e){if(we)return;(_e==null?void 0:_e.message)==="outside home"?de(O("git.outsideRoots")):W(O("git.errReadRepo"))}})(),()=>{we=!0})},[i,r,l]),A.useEffect(()=>{if(!i||!r)return;let we=!1;return al(r).then(({cwd:Je})=>{!we&&Je&&o(Je)}).catch(()=>{}),()=>{we=!0}},[i,r]),A.useEffect(()=>{if(!i||!u){_(null),T(null);return}let we=!1;return _(null),T(null),k(null),L(null),F(20),W(null),de(null),(async()=>{try{const[Je,_e]=await Promise.all([u3(u),h3(u)]);if(we)return;_(Je.changes??[]),T(_e.branches??[])}catch{we||W(O("git.errLoad"))}})(),()=>{we=!0}},[i,u]),A.useEffect(()=>{if(!i||!u){k(null);return}let we=!1;return(async()=>{try{const{commits:Je=[]}=await d3(u,{ref:D||void 0,limit:U});we||k(Je)}catch{we||k([])}finally{we||I(!1)}})(),()=>{we=!0}},[i,u,D,U]);const Oe=!u||!w?"":w.kind==="diff"?`${u}|diff|${w.path}|${w.commit||""}|${w.staged?1:0}`:`${u}|commit|${w.hash}`;A.useEffect(()=>{if(!i||!u||!w){H(null);return}let we=!1;return W(null),H(null),(async()=>{try{let Je;if(w.kind==="diff"){const{diff:_e,truncated:Z}=await m3(u,{path:w.path,commit:w.commit,staged:w.staged});Je={files:VI(_e),truncated:Z}}else Je=await f3(u,w.hash);we||H({key:Oe,payload:Je})}catch{we||W(O("git.errLoad"))}})(),()=>{we=!0}},[i,Oe]);const et=A.useCallback(()=>{window.history.back()},[]),ve=we=>{m(we),d([]),L(null)},Ke=async we=>{window.history.back(),de(null);try{const{repos:Je=[]}=await L1(we);if(!R.current)return;if(!Je.length){de(O("git.noRepoInDir"));return}const _e=Je.map(Ot=>Ot.path),Z=p.current,Pe=Z?C1(Z,_e):_e;a(Ot=>{const At=[...Ot];for(const Vt of Pe)At.includes(Vt)||At.push(Vt);return At});const xt=_e.find(Ot=>!y.includes(Ot))||_e[0];ve(xt)}catch(Je){if(!R.current)return;(Je==null?void 0:Je.message)==="outside home"?de(O("git.outsideRoots")):W(O("git.errReadDir"))}},tt=we=>{const Je=MU(l,we);a(Je),u===we&&(m(Je[0]??null),d([]),L(null))},Xe=(E||[]).find(we=>we.current)||null,Bt=we=>{const Je=we===(Xe==null?void 0:Xe.name)?null:we;Je!==D&&(L(Je),k(null),F(20))},Tt=we=>ie(Je=>({...Je,[we]:!Je[we]})),le=S!=null&&S.length>=U,Re=we=>{if(!le||P)return;const Je=we.currentTarget;Je.scrollHeight-Je.scrollTop-Je.clientHeight<80&&(I(!0),F(_e=>_e+20))},ze=D||(Xe==null?void 0:Xe.name)||null,Me=!!D&&D!==(Xe==null?void 0:Xe.name),$e=D?(E||[]).find(we=>we.name===D):Xe,at=V&&V.key===Oe?V.payload:null,ct=!!w,Te=(w==null?void 0:w.kind)==="commit"?O("git.commitDetail"):(w==null?void 0:w.kind)==="diff"?w.path||O("git.diff"):"";return hl.createPortal(c.jsxDEV("div",{className:`file-sheet git-sheet ${i?"open":""}`,"aria-hidden":!i,style:{"--kb-inset":`${g}px`},children:[c.jsxDEV("div",{className:"file-tabs git-head",children:[ct?c.jsxDEV("div",{className:"git-drill-head",children:[c.jsxDEV("button",{className:"git-back","aria-label":O("common.back"),title:O("common.back"),onClick:et,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:291,columnNumber:13},this),c.jsxDEV("span",{className:"git-drill-title",children:[c.jsxDEV(PC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:47},this),c.jsxDEV("span",{className:"git-title-text",children:Te},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:290,columnNumber:11},this):c.jsxDEV("div",{className:"git-tabs-scroll",children:[c.jsxDEV("button",{className:"git-tab-add","aria-label":O("git.bindRepo"),title:O("git.bindRepo"),onClick:He,children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:296,columnNumber:13},this),y.map(we=>c.jsxDEV("div",{className:`git-tab ${we===u?"active":""}`,children:[c.jsxDEV("button",{className:"git-tab-label",onClick:()=>ve(we),children:II(we)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:299,columnNumber:17},this),c.jsxDEV("button",{className:"git-tab-x","aria-label":O("common.close"),title:O("common.close"),onClick:()=>tt(we),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},we,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:298,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:295,columnNumber:11},this),c.jsxDEV("button",{className:"file-min","aria-label":O("git.collapse"),title:O("git.collapse"),onClick:()=>N==null?void 0:N(),children:c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:123},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:288,columnNumber:7},this),!ct&&u&&c.jsxDEV("div",{className:"git-branch-bar",children:[c.jsxDEV("span",{className:"git-branch-bar-name",children:[c.jsxDEV("span",{className:"git-branch-glyph",children:"⎇"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:316,columnNumber:13},this)," ",ze||"—",!Me&&ze&&c.jsxDEV("span",{className:"git-branch-cur-tag",children:O("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),$e&&($e.ahead||$e.behind)?c.jsxDEV("span",{className:"git-branch-bar-track",children:[$e.ahead?c.jsxDEV("span",{className:"git-ahead",children:["↑",$e.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,$e.behind?c.jsxDEV("span",{className:"git-behind",children:["↓",$e.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:321,columnNumber:43},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:319,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:315,columnNumber:11},this),c.jsxDEV("div",{className:"git-branch-dd",children:[c.jsxDEV("button",{className:`git-branch-trigger ${Me?"other":""}`,onClick:()=>J(we=>!we),"aria-haspopup":"listbox","aria-expanded":q,title:O("git.switchViewedBranch"),children:[c.jsxDEV("span",{className:"git-branch-trigger-name",children:O("git.switchBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:328,columnNumber:15},this),c.jsxDEV("span",{className:"git-branch-caret",children:c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:50},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:326,columnNumber:13},this),q&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"git-dd-backdrop",onClick:()=>J(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:333,columnNumber:17},this),c.jsxDEV("div",{className:"git-dd-menu",role:"listbox",children:[(E||[]).length===0&&c.jsxDEV("div",{className:"git-empty",children:O("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(E||[]).map(we=>{const Je=D?we.name===D:we.current;return c.jsxDEV("button",{role:"option","aria-selected":Je,className:`git-dd-item ${we.current?"current":""} ${Je?"viewing":""}`,onClick:()=>{Bt(we.name),J(!1)},children:[c.jsxDEV("span",{className:"git-branch-dot",children:we.current?"●":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:342,columnNumber:25},this),c.jsxDEV("span",{className:"git-row-path",children:we.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),we.upstream&&c.jsxDEV("span",{className:"git-branch-up",children:[we.upstream,we.ahead?c.jsxDEV("span",{className:"git-ahead",children:[" ↑",we.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,we.behind?c.jsxDEV("span",{className:"git-behind",children:[" ↓",we.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:347,columnNumber:41},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:345,columnNumber:27},this)]},we.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:339,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:334,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:332,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:325,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:312,columnNumber:9},this),c.jsxDEV("div",{className:"git-body",children:[K&&c.jsxDEV("div",{className:"git-error",children:K},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),oe&&!K&&!ct&&c.jsxDEV("div",{className:"git-notice",children:oe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!u&&!K&&!oe&&c.jsxDEV("div",{className:"git-empty",children:O("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),ct&&u&&!K&&c.jsxDEV("div",{className:"git-scroll",children:at?w.kind==="diff"?c.jsxDEV($I,{data:at},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):c.jsxDEV(zI,{data:at,onOpenFile:we=>he({kind:"diff",path:we,commit:w.hash})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:371,columnNumber:17},this):c.jsxDEV("div",{className:"git-loading",children:O("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:369,columnNumber:23},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:368,columnNumber:11},this),!ct&&u&&!K&&c.jsxDEV(c.Fragment,{children:[c.jsxDEV(qS,{variant:"top",title:O("git.changes"),count:f==null?void 0:f.length,expanded:G.changes,onToggle:()=>Tt("changes"),children:f==null?c.jsxDEV("div",{className:"git-loading",children:O("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):c.jsxDEV(FI,{data:{changes:f},onOpenFile:(we,Je)=>he({kind:"diff",path:we,staged:Je})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:381,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:379,columnNumber:13},this),c.jsxDEV(qS,{variant:"mid",title:O("git.commits"),subtitle:Me?ze:null,expanded:G.commits,onToggle:()=>Tt("commits"),bodyRef:X,onScroll:Re,children:S==null?c.jsxDEV("div",{className:"git-loading",children:O("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:385,columnNumber:34},this):c.jsxDEV(c.Fragment,{children:[c.jsxDEV(HI,{data:{commits:S},onOpen:we=>he({kind:"commit",hash:we})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),le&&c.jsxDEV("div",{className:"git-more",children:O(P?"common.loading":"git.pullToLoadMore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:389,columnNumber:40},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:387,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:383,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:378,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:360,columnNumber:7},this),c.jsxDEV(Bd,{open:x,seedCwd:v,pane:r,inset:g,hint:O("git.pickerHint"),onPick:Ke,onClose:()=>window.history.back()},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:397,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:285,columnNumber:5},this),document.body)}function qS({variant:i,title:r,subtitle:l,count:g,expanded:N,onToggle:R,onScroll:y,bodyRef:a,children:u}){return c.jsxDEV("div",{className:`git-section git-section--${i} ${N?"open":""}`,children:[c.jsxDEV("button",{className:"git-section-head",onClick:R,"aria-expanded":N,children:[c.jsxDEV("span",{className:"git-section-caret",children:c.jsxDEV(za,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:9},this),c.jsxDEV("span",{className:"git-section-title",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:419,columnNumber:9},this),l&&c.jsxDEV("span",{className:"git-section-sub",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:420,columnNumber:22},this),g!=null&&c.jsxDEV("span",{className:"git-section-count",children:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:421,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:417,columnNumber:7},this),N&&c.jsxDEV("div",{className:"git-section-body",ref:a,onScroll:y,children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:423,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:416,columnNumber:5},this)}function FI({data:i,onOpenFile:r}){const l=(i==null?void 0:i.changes)??[];return l.length?c.jsxDEV("div",{className:"git-list",children:l.map((g,N)=>{const R=!!(g.x&&g.x!==" "&&g.x!=="?");return c.jsxDEV("button",{className:"git-row",onClick:()=>r(g.path,R),children:[c.jsxDEV("span",{className:`git-badge git-badge-${Of(g.x,g.y).toLowerCase().replace("?","q")}`,children:Of(g.x,g.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:437,columnNumber:13},this),c.jsxDEV("span",{className:"git-row-path",children:g.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${g.path}-${N}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:436,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:432,columnNumber:5},this):c.jsxDEV("div",{className:"git-empty",children:O("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function HI({data:i,onOpen:r}){const l=(i==null?void 0:i.commits)??[];return l.length?c.jsxDEV("div",{className:"git-list",children:l.map(g=>c.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>r(g.hash),children:[c.jsxDEV("span",{className:"git-hash",children:g.short},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:453,columnNumber:11},this),c.jsxDEV("span",{className:"git-commit-main",children:[c.jsxDEV("span",{className:"git-row-path",children:g.subject},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:455,columnNumber:13},this),c.jsxDEV("span",{className:"git-commit-meta",children:[g.author," · ",g.relDate]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:456,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:454,columnNumber:11},this)]},g.hash,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:452,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:450,columnNumber:5},this):c.jsxDEV("div",{className:"git-empty",children:O("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function zI({data:i,onOpenFile:r}){if(!i)return null;const l=i.files??[];return c.jsxDEV("div",{className:"git-commit-detail",children:[i.message&&c.jsxDEV("pre",{className:"git-commit-msg",children:i.message},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:469,columnNumber:24},this),c.jsxDEV("div",{className:"git-list",children:l.map((g,N)=>c.jsxDEV("button",{className:"git-row",onClick:()=>r(g.path),children:[c.jsxDEV("span",{className:`git-badge git-badge-${Of(g.x,g.y).toLowerCase().replace("?","q")}`,children:Of(g.x,g.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:473,columnNumber:13},this),c.jsxDEV("span",{className:"git-row-path",children:g.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${g.path}-${N}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:472,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:470,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:468,columnNumber:5},this)}const KS=Ha.length-1;function $I({data:i}){const[r,l]=A.useState(()=>jU()),g=R=>{const y=Math.min(KS,Math.max(0,r+R));l(y),DU(y)};if(!i)return null;const N=i.files??[];return N.length?c.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${Ha[r]}px`},children:[c.jsxDEV("div",{className:"git-diff-zoom",children:[c.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>g(-1),disabled:r<=0,"aria-label":O("git.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:493,columnNumber:9},this),c.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>g(1),disabled:r>=KS,"aria-label":O("git.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:494,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:492,columnNumber:7},this),i.truncated&&c.jsxDEV("div",{className:"git-diff-trunc",children:O("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),N.map((R,y)=>c.jsxDEV("div",{className:"git-diff-file",children:[N.length>1&&c.jsxDEV("div",{className:"git-diff-fname",children:R.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:499,columnNumber:32},this),c.jsxDEV("div",{className:"git-diff",children:R.hunks.map((a,u)=>c.jsxDEV("div",{className:"git-diff-hunk-block",children:[c.jsxDEV("div",{className:"git-diff-line git-diff-hunk",children:a.header},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:503,columnNumber:17},this),a.lines.map((m,b)=>c.jsxDEV("div",{className:`git-diff-line git-diff-${m.type}`,children:[m.type==="add"?"+":m.type==="del"?"-":" ",m.text]},b,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},u,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:502,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:500,columnNumber:11},this)]},`${R.path}-${y}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:498,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:491,columnNumber:5},this):c.jsxDEV("div",{className:"git-empty",children:O("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function WI(){const i=F4();if(ay(i.active,dS),!i.active)return null;const r=i.phase==="sending",l=Math.round((i.pct||0)*100);return hl.createPortal(c.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":O("upload.title"),children:c.jsxDEV("div",{className:"upload-card",children:[i.label&&c.jsxDEV("div",{className:"upload-card-label",children:i.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:20,columnNumber:23},this),r?c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"upload-bar",children:c.jsxDEV("div",{className:"upload-bar-fill",style:{width:`${l}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:23,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:23,columnNumber:13},this),c.jsxDEV("div",{className:"upload-card-sub",children:[l,"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:24,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:22,columnNumber:11},this):c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"upload-spinner","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:28,columnNumber:13},this),c.jsxDEV("div",{className:"upload-card-sub",children:O("upload.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:29,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:27,columnNumber:11},this),c.jsxDEV("button",{type:"button",className:"upload-cancel",onClick:dS,children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:32,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:19,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:18,columnNumber:5},this),document.body)}const hf=8,XS=12;function JS({path:i,x:r,y:l,onOpen:g,onClose:N,icon:R,name:y,openLabel:a,note:u,disabled:m=!1}){const b=y??(i.split("/").filter(Boolean).pop()||i),d=A.useRef(null),[w,x]=A.useState(null);return A.useLayoutEffect(()=>{const j=d.current;if(!j)return;const v=j.offsetWidth,o=j.offsetHeight,p=window.innerWidth,f=window.innerHeight,_=Math.min(Math.max(r-v/2,hf),p-v-hf);let E=l+XS;E+o>f-hf&&(E=Math.max(hf,l-XS-o)),x({left:_,top:E})},[r,l,i]),c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"doclink-backdrop",onClick:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:37,columnNumber:7},this),c.jsxDEV("div",{ref:d,className:"doclink-pop",style:w?{left:w.left,top:w.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":O("doclink.title"),children:[c.jsxDEV("div",{className:"doclink-name",children:[R??c.jsxDEV(Dd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:48},this),b]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:9},this),c.jsxDEV("div",{className:"doclink-path",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:45,columnNumber:9},this),u&&c.jsxDEV("div",{className:"doclink-note",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:46,columnNumber:18},this),c.jsxDEV("div",{className:"doclink-actions",children:[c.jsxDEV("button",{className:"doclink-cancel",onClick:N,children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:48,columnNumber:11},this),!m&&c.jsxDEV("button",{className:"doclink-open",onClick:()=>g(i),children:a??O("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:49,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:36,columnNumber:5},this)}const GI=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function YI(i){const r=(i??"").trim();return r?{id:GI(),text:r}:null}function qI(i,r,l){const g=[...i];if(r<0||r>=g.length||l<0||l>=g.length||r===l)return g;const[N]=g.splice(r,1);return g.splice(l,0,N),g}function KI({open:i,session:r,window:l,onClose:g,onSend:N,onCountChange:R,micAvailable:y=!1}){const[a,u]=A.useState([]),[m,b]=A.useState(""),[d,w]=A.useState(null),[x,j]=A.useState(null),v=A.useRef(null),o=A.useRef({head:"",tail:""}),p=A.useRef(null),f=A.useRef(!1),_=A.useRef({active:!1}),E=V=>{S1(r,l,V),u(V),R==null||R(V.length)},T=V=>{V&&(V.style.height="auto",V.style.height=`${V.scrollHeight+2}px`)};A.useEffect(()=>{if(!i)return;const V=DC(r,l);u(V),R==null||R(V.length),b(""),w(null)},[i,r,l]);const k=vy({onText:V=>{if(f.current){f.current=!1;return}const{head:H,tail:K}=o.current;b(H+V+K),p.current=H.length+V.length}}),D=k.state==="recording"||k.state==="finalizing";Wf(D),A.useEffect(()=>{if(k.state!=="recording"&&k.state!=="finalizing"||f.current)return;const{head:V,tail:H}=o.current;b(V+k.partial+H),p.current=V.length+k.partial.length},[k.partial,k.state]),A.useLayoutEffect(()=>{const V=v.current;if(!V||(T(V),p.current==null))return;const H=p.current;if(p.current=null,document.activeElement===V)try{V.setSelectionRange(H,H)}catch{}},[m]);const L=()=>{if(D){k.stop();return}const V=v.current,H=V?V.selectionStart:m.length;o.current={head:m.slice(0,H),tail:m.slice(H)},k.start()},U=()=>{D&&(f.current=!0,k.stop())},F=()=>{U();const V=m.trim();if(V){if(d)E(a.map(H=>H.id===d?{...H,text:V}:H));else{const H=YI(V);H&&E([...a,H])}b(""),w(null)}},P=V=>{w(V.id),b(V.text),requestAnimationFrame(()=>{var H;return(H=v.current)==null?void 0:H.focus()})},I=()=>{w(null),b("")},G=V=>{E(a.filter(H=>H.id!==V)),V===d&&I()},ie=(V,H)=>{var K,W;V.cancelable&&V.preventDefault(),(W=(K=V.currentTarget).setPointerCapture)==null||W.call(K,V.pointerId),_.current={active:!0,pointerId:V.pointerId,id:H},j(H)},q=V=>{var de;const H=_.current;if(!H.active||V.pointerId!==H.pointerId)return;const K=(de=V.currentTarget.closest(".idea-list"))==null?void 0:de.querySelectorAll("[data-idea]");if(!K||!K.length)return;const W=V.clientY;let oe=K.length-1;for(let xe=0;xe<K.length;xe++){const Se=K[xe].getBoundingClientRect();if(W<Se.top+Se.height/2){oe=xe;break}}u(xe=>{const Se=xe.findIndex(se=>se.id===H.id);return Se<0||Se===oe?xe:qI(xe,Se,oe)})},J=V=>{const H=_.current;!H.active||V.pointerId!==H.pointerId||(_.current={active:!1},j(null),u(K=>(S1(r,l,K),K)))};if(!i)return null;const X=d!=null;return c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"cmd-backdrop",onClick:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:147,columnNumber:7},this),c.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":O("idea.title"),children:[c.jsxDEV("div",{className:"cmd-head",children:[c.jsxDEV("span",{className:"cmd-title",children:[O("idea.title"),l?` · ${l}`:"",a.length>0&&c.jsxDEV("span",{className:"idea-head-count",children:a.length},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:100},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:11},this),c.jsxDEV("button",{className:"cmd-close",onClick:g,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:151,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:9},this),c.jsxDEV("div",{className:`idea-compose${D?" recording":""}`,children:[c.jsxDEV("textarea",{ref:v,className:"idea-input",rows:1,placeholder:O(X?"idea.editPlaceholder":"idea.addPlaceholder"),value:m,readOnly:D,onChange:V=>b(V.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:155,columnNumber:11},this),X&&c.jsxDEV("button",{className:"idea-cancel",onClick:I,children:O("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:164,columnNumber:23},this),y&&c.jsxDEV(hy,{active:D,disabled:k.state==="requesting",onToggle:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:165,columnNumber:28},this),c.jsxDEV("button",{className:"idea-act",onClick:F,disabled:!m.trim(),"aria-label":O(X?"common.save":"idea.add"),children:X?c.jsxDEV(sy,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:24},this):c.jsxDEV(ry,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:154,columnNumber:9},this),c.jsxDEV("div",{className:"idea-list",children:a.length===0?c.jsxDEV("div",{className:"cmd-empty",children:O("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:173,columnNumber:13},this):a.map(V=>c.jsxDEV("div",{"data-idea":V.id,className:`idea-row${V.id===x?" dragging":""}${V.id===d?" editing":""}`,children:[c.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":O("idea.dragSort"),onPointerDown:H=>ie(H,V.id),onPointerMove:q,onPointerUp:J,onPointerCancel:J,children:"≡"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:180,columnNumber:15},this),c.jsxDEV("span",{className:"idea-text",onClick:()=>P(V),children:V.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:189,columnNumber:15},this),c.jsxDEV("button",{className:"idea-send",onClick:()=>N==null?void 0:N(V.text),"aria-label":O("idea.fillInput"),children:O("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:190,columnNumber:15},this),c.jsxDEV("button",{className:"idea-del",onClick:()=>G(V.id),"aria-label":O("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this)]},V.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:171,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:148,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:146,columnNumber:5},this)}function XI({open:i,onClose:r}){return i?c.jsxDEV(c.Fragment,{children:[c.jsxDEV("div",{className:"cmd-backdrop",onClick:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:11,columnNumber:7},this),c.jsxDEV("div",{className:"changelog-panel",role:"dialog","aria-label":O("changelog.title"),children:[c.jsxDEV("div",{className:"cmd-head",children:[c.jsxDEV("span",{className:"cmd-title",children:O("changelog.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:14,columnNumber:11},this),c.jsxDEV("button",{className:"cmd-close",onClick:r,"aria-label":O("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:15,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:13,columnNumber:9},this),c.jsxDEV("div",{className:"changelog-list",children:bb.map(l=>{var R,y;const g=l.items[go()]||l.items.en||l.items.zh||[],N=l.version?`v${l.version}`:((R=l.label)==null?void 0:R[go()])||((y=l.label)==null?void 0:y.en);return c.jsxDEV("div",{className:"rel",children:[c.jsxDEV("div",{className:"rel-date",children:[N&&c.jsxDEV("span",{className:"rel-ver",children:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:27,columnNumber:29},this),c.jsxDEV("span",{className:"rel-day",children:l.date},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:28,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:26,columnNumber:17},this),c.jsxDEV("ul",{className:"rel-items",children:g.map((a,u)=>c.jsxDEV("li",{children:a},u,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:31,columnNumber:41},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:30,columnNumber:17},this)]},l.version||l.date,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:25,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:17,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:12,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:10,columnNumber:5},this):null}const ZE="tw_asr";function JI(){try{const i=localStorage.getItem(ZE);return i==null?null:i==="1"}catch{return null}}function ZI(i=null){const[r,l]=A.useState(JI);return A.useEffect(()=>{if(!i)return;const g=!!i.asr;l(g);try{localStorage.setItem(ZE,g?"1":"0")}catch{}},[i]),r}function QI(i){let r=!1,l=!1;for(let g=i;g&&g!==document.body&&g!==document.documentElement;g=g.parentElement){const N=getComputedStyle(g);if(!l&&(N.overflowY==="auto"||N.overflowY==="scroll")&&g.scrollHeight>g.clientHeight&&(l=!0),!r&&(N.overflowX==="auto"||N.overflowX==="scroll")&&g.scrollWidth>g.clientWidth&&(r=!0),r&&l)break}return{x:r,y:l}}function e6(){A.useEffect(()=>{let i="block",r=0,l=0;const g=R=>{const y=R.touches[0];if(r=y?y.clientX:0,l=y?y.clientY:0,!(R.target instanceof Element)){i="block";return}const{x:a,y:u}=QI(R.target);i=u?"free":a?"xonly":"block"},N=R=>{if(!(i==="free"||!R.cancelable)){if(i==="xonly"){const y=R.touches[0];if(y&&Math.abs(y.clientX-r)>=Math.abs(y.clientY-l))return}R.preventDefault()}};return document.addEventListener("touchstart",g,{passive:!0,capture:!0}),document.addEventListener("touchmove",N,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",g,{capture:!0}),document.removeEventListener("touchmove",N,{capture:!0})}},[])}function t6(i,r,l=2e3){const g=A.useRef(r);g.current=r,A.useEffect(()=>{if(!i)return;let N=!1,R=null,y=!1;const a=()=>{var d;(d=window.history.state)!=null&&d.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},u=()=>{var d;y||(d=window.history.state)!=null&&d.exitGuard||(window.history.pushState({exitGuard:!0},""),y=!0)},m=()=>{var d;R&&(clearTimeout(R),R=null),N&&(N=!1,(d=g.current)==null||d.call(g,!1))};a(),u();const b=()=>{var d,w,x;if((d=window.history.state)!=null&&d.exitGuard){y=!0,m();return}(w=window.history.state)!=null&&w.exitRoot&&(y=!1,!N&&(N=!0,(x=g.current)==null||x.call(g,!0),R=setTimeout(()=>{var j;N=!1,R=null,(j=g.current)==null||j.call(g,!1),u()},l)))};return window.addEventListener("popstate",b),()=>{var d,w;window.removeEventListener("popstate",b),R&&clearTimeout(R),N&&((d=g.current)==null||d.call(g,!1)),y&&((w=window.history.state)!=null&&w.exitGuard)&&window.history.back()}},[i,l])}function ZS(i){history.replaceState(history.state,"",`#${encodeURIComponent(i)}`)}const vd=i=>{try{return decodeURIComponent(i)}catch{return i}};function mb(){const i=location.hash.replace(/^#/,""),r=i.match(/^\/inbox(?:\/(.*))?$/);if(r)return{session:null,window:null,pane:null,inbox:!0,inboxId:r[1]?vd(r[1]):null};const l=i.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return l?{session:vd(l[1]),window:vd(l[2]),pane:vd(l[3]),inbox:!1,inboxId:null}:{session:vd(i)||null,window:null,pane:null,inbox:!1,inboxId:null}}const n6="tmw-share-v1",i6="/__share__/";function r6(i=typeof location<"u"?location.search:""){try{return new URLSearchParams(i).has("share")}catch{return!1}}function s6(){if(typeof location>"u"||typeof history>"u")return;const i=new URL(location.href);i.searchParams.delete("share"),history.replaceState(history.state,"",i.pathname+i.search+i.hash)}async function a6(){if(typeof caches>"u")return null;let i;try{i=await caches.open(n6)}catch{return null}const r=await i.keys();if(!r.length)return null;const l=r[r.length-1],g=await i.match(l);if(await i.delete(l),!g)return null;const N=await g.blob();let R="shared";try{R=decodeURIComponent(new URL(l.url).pathname.slice(i6.length))||"shared"}catch{}return new File([N],R,{type:N.type||g.headers.get("Content-Type")||""})}const QS="①②③④⑤⑥⑦⑧⑨",o6=i=>Number.isFinite(i==null?void 0:i.width)&&Number.isFinite(i==null?void 0:i.height)?`${i.width}×${i.height}`:"",QE=(i,r)=>{const l=o6(r);return l?`${i} · ${l}`:i};function l6(i){return i?QE(i.name||i.id||"",i):""}function c6(i,r){const l=(i||[]).findIndex(R=>R.id===r);if(l<0)return"";const g=i[l],N=l<QS.length?QS[l]:String(l+1);return QE(`${N} ${g.command||g.id}`,g)}const ej="tw_keyboard_mode",tj=new Set(["auto","mobile","desktop"]);function u6({ua:i="",platform:r="",maxTouchPoints:l=0,mobileHint:g=null,finePointer:N=!1,hover:R=!1}={}){const y=/Android|iPhone|iPad|iPod/i.test(i)||r==="MacIntel"&&l>1||g===!0,a=/Mac|Win|Linux/i.test(r)||/Macintosh|Windows NT|X11; Linux/i.test(i);return!y&&a&&N&&R}function d6(i=window){var l,g,N;const r=i.navigator;return u6({ua:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints,mobileHint:((l=r.userAgentData)==null?void 0:l.mobile)??null,finePointer:((g=i.matchMedia)==null?void 0:g.call(i,"(pointer: fine)").matches)===!0,hover:((N=i.matchMedia)==null?void 0:N.call(i,"(hover: hover)").matches)===!0})}function h6(i=window.localStorage){try{const r=i.getItem(ej);return tj.has(r)?r:"auto"}catch{return"auto"}}function m6(i,r=window.localStorage){if(tj.has(i))try{r.setItem(ej,i)}catch{}}function f6(i,r){return i==="desktop"?!0:i==="mobile"?!1:!!r}const p6=i=>[...i].map(r=>r.toString(16).padStart(2,"0")).join(""),mf=16384*2;function v6({send:i,onDelivered:r=()=>{},onError:l=()=>{},encoder:g=new TextEncoder}){let N=[],R=[],y=!1,a=!1,u=!1;const m=(w,...x)=>{try{w(...x)}catch{}},b=async()=>{if(!(a||u||R.length===0)){a=!0;try{for(;!u&&R.length;){const w=R.shift();try{await i(w.pane,w.hex)}catch(x){R=R.filter(j=>j.pane!==w.pane),N=N.filter(j=>j.pane!==w.pane),m(l,x,w.pane);continue}m(r,w.pane)}}finally{a=!1}}},d=()=>{y=!1;const w=N;N=[];for(const x of w){let j=x.hex;for(;j;){const v=R.at(-1);if((v==null?void 0:v.pane)===x.pane&&v.hex.length<mf){const o=mf-v.hex.length;v.hex+=j.slice(0,o),j=j.slice(o)}else R.push({pane:x.pane,hex:j.slice(0,mf)}),j=j.slice(mf)}}b()};return{enqueue(w,x){if(u||!w||!x)return;const j=typeof x=="string"?g.encode(x):x instanceof Uint8Array?x:new Uint8Array(x);N.push({pane:w,hex:p6(j)}),y||(y=!0,queueMicrotask(d))},drop(w){N=N.filter(x=>x.pane!==w),R=R.filter(x=>x.pane!==w)},dispose(){u=!0,N=[],R=[]}}}function g6({enabled:i,currentPane:r,terminalRef:l,onAuthFail:g,send:N=HU}){const R=A.useRef(null),y=A.useRef(r),a=A.useRef(g);return y.current=r,a.current=g,A.useEffect(()=>{if(!i)return;let u=!1;const m=v6({send:N,onDelivered:b=>{var d,w;!u&&b===y.current&&((w=(d=l.current)==null?void 0:d.wake)==null||w.call(d))},onError:(b,d)=>{var w,x,j;u||(b instanceof ir?(w=a.current)==null||w.call(a):d===y.current&&((j=(x=l.current)==null?void 0:x.inputFailed)==null||j.call(x,b)))}});return R.current=m,()=>{u=!0,R.current=null,m.dispose()}},[i,N,l]),A.useCallback((u,m)=>{var b;(b=R.current)==null||b.enqueue(u,m)},[])}const bc=(i,r)=>r&&i.some(l=>l.id===r)?r:i[0].id;function _6(){var Jd,Zd,Qd,eh,Oc,yl,$a,th,Wa,nh,ih,rh,wl,xl,ga,_a,Pc,sh,Vc,ah,Ic,Bc,Fc,Nl,oh,Hc;const i=A.useMemo(()=>d6(),[]),[r,l]=A.useState(h6),g=f6(r,i),[N,R]=A.useState(ZV),[y,a]=A.useState(eI),u=typeof window<"u"&&nI(window.location,N),[m,b]=A.useState(!Fa()),d=y2({enabled:!m}),w=(d==null?void 0:d.shortcuts)||zf,x=ZI(d),[j,v]=A.useState(!1),[o,p]=A.useState(!1),[f,_]=A.useState(cU),E=Q=>{uU(Q),_(Q)},[T,S]=A.useState(dU),k=Q=>{hU(Q),S(Q)},[D,L]=A.useState(!1),[U,F]=A.useState(!1),[P,I]=A.useState(!1),[G,ie]=A.useState(null),[q,J]=A.useState(null),[X,V]=A.useState(null),[H,K]=A.useState(null),[W,oe]=A.useState(!1),[de,xe]=A.useState(!1),[Se,se]=A.useState(!1),[Y,pe]=A.useState(null),[he,He]=A.useState(null),[Oe,et]=A.useState(null),[ve,Ke]=A.useState(null),[tt,Xe]=A.useState(null),[Bt,Tt]=A.useState(!1),[le,Re]=A.useState(null),[ze,Me]=A.useState(null),$e=p2(),[at,ct]=A.useState(ha),[Te,we]=A.useState(xf),[Je,_e]=A.useState([]),[Z,Pe]=A.useState(null),xt=A.useRef(0),[Ot,At]=A.useState(!0),[Vt,cn]=A.useState(null),[_n,Kt]=A.useState(!1),[Ft,Tn]=A.useState(null),[an,Un]=A.useState(!1),[Ht,Qn]=A.useState(null),[En,yi]=A.useState({}),[Zt,oi]=A.useState("terminal");A.useEffect(()=>{oi(localStorage.getItem("tw_lens_"+(Z==null?void 0:Z.paneId))||"terminal")},[Z==null?void 0:Z.paneId]);const[ci,rn]=A.useState([]),[un,di]=A.useState(null),[nt,ae]=A.useState(!1),{status:Fe,enable:st}=gI(d),[ge,qe]=A.useState(!1),[it,Le]=A.useState(0),[vt,Ln]=A.useState(!1),[Qt,Xt]=A.useState(kU),[yn,Et]=A.useState(null),[Jt,wn]=A.useState(TU),[wi,xi]=A.useState(g1),[Pt,Hn]=A.useState(ZM),[On,ht]=A.useState([]),[re,Ae]=A.useState(""),[lt,kt]=A.useState(0),[jt,zt]=A.useState(null),An=A.useRef(!1),ei=A.useRef(0),[zn,Ci]=A.useState(xd),[$t,Ui]=A.useState(!1),[pi,Gi]=A.useState(null),[Yi,rr]=A.useState(null),[sr,ar]=A.useState(QM),fr=()=>Ui(!0),Ri=A.useRef(0),Bi=A.useRef(null);Bi.current=pi;const Dr=()=>{window.history.pushState({overlay:!0},""),Ri.current+=1},Vr=Q=>{Dr(),Gi(Q),y1(Q),Ci(xd())},dn=()=>window.history.back(),is=()=>{Gi(null),Ui(!1)},pr=()=>{On.forEach(Q=>y1(Q.id)),Ci(xd())},te=async Q=>{if(An.current)return!1;An.current=!0,ei.current+=1,zt(Q),Ae("");try{return await i2(Q),ht(ue=>ue.filter(je=>je.id!==Q)),!0}catch(ue){return Lt(ue)||Ae(O("pushInbox.deleteFailed")),!1}finally{ei.current+=1,An.current=!1,zt(null)}},Ne=A.useRef(null),Ve=A.useRef(null),[wt,qn]=A.useState(!1),Oi=A.useRef(!1);Oi.current=wt;const Pn=A.useCallback(()=>{var Q,ue;return(ue=(Q=Ne.current)==null?void 0:Q.focusInput)==null?void 0:ue.call(Q)},[]),Yt=A.useCallback(()=>{var Q,ue,je,We;(ue=(Q=Ne.current)==null?void 0:Q.blurInput)==null||ue.call(Q),(We=(je=Ve.current)==null?void 0:je.focusComposer)==null||We.call(je)},[]),hi=A.useRef({owner:null,at:0}),$n=A.useCallback(()=>{var Q,ue;g&&(hi.current={owner:Oi.current?"terminal":(ue=(Q=Ve.current)==null?void 0:Q.composerFocused)!=null&&ue.call(Q)?"composer":null,at:Date.now()})},[g]),xn=A.useRef(null),hn=A.useRef(null),Ni=A.useRef(null);Ni.current=Vt;const Kn=A.useRef(null);Kn.current=Ft;const vi=A.useRef(!1),Fi=A.useRef(null),Ei=A.useRef(null),Xr=A.useRef(0),Hi=A.useRef(null),gs=A.useRef(null),Vn=A.useCallback(()=>b(!0),[]),vr=g6({enabled:g,currentPane:Z==null?void 0:Z.paneId,terminalRef:Ne,onAuthFail:Vn}),Lt=A.useCallback(Q=>w2(Q,Vn),[Vn]),Ti=A.useCallback(()=>{Xr.current+=1,Hi.current=null,vi.current=!1,Un(!1),Tn(null)},[]),kr=A.useCallback(()=>{var ue,je;const Q=(ue=Ni.current)==null?void 0:ue.checkpointId;Q&&v1(Q),!vi.current&&["succeeded","partial"].includes((je=Kn.current)==null?void 0:je.status)&&(Ti(),cn(null)),Kt(!1)},[Ti]),ma=A.useCallback(()=>{let Q=!1;const ue=()=>{Q||(Q=!0,window.removeEventListener("popstate",je),clearTimeout(We),F(!0))},je=()=>ue();window.addEventListener("popstate",je);const We=setTimeout(ue,300);kr()},[kr]),_s=A.useCallback(()=>{v(!1),Kt(!0)},[]),Gs=A.useCallback(()=>{var ue;const Q=(ue=Ni.current)==null?void 0:ue.checkpointId;Q&&(GM(Q),Ei.current=Q),Ti(),Kt(!1),cn(null)},[Ti]),{previewDomain:Ys,dynamicEnabled:$,previewSheetOpen:ce,setPreviewSheetOpen:Ce,activePreview:Ue,shownPreview:ot,tabs:Mt,activeName:Nt,openPreviewSheet:Wt,startPreview:mn,startDynamicPreview:bn,startUrlPreview:Jn,switchTab:In,closeTab:on,stopPreview:si,renewPreview:mi}=g2(Z),ji=!!(j||o||D||U||P||G||q||X||de||Se||he||le||ze||_n||un||nt||ge||vt||$t||W||ce&&ot),ks=A.useRef(!1),or=A.useRef(null),Rs=A.useCallback(Q=>{m6(Q),Q==="desktop"&&ji&&(or.current="terminal"),l(Q)},[ji]),fa=A.useCallback(Q=>{R(QV(Q))},[]),bs=A.useCallback(Q=>{a(tI(Q))},[]);A.useEffect(()=>{var ue,je,We,Ze,Ge,ft;const Q=ks.current;if(g&&ji){if(!Q){const bt=hi.current,Rn=Oi.current?"terminal":(je=(ue=Ve.current)==null?void 0:ue.composerFocused)!=null&&je.call(ue)?"composer":null;or.current=Rn||(Date.now()-bt.at<1e3?bt.owner:null),hi.current={owner:null,at:0}}(Ze=(We=Ne.current)==null?void 0:We.blurInput)==null||Ze.call(We),(ft=(Ge=Ve.current)==null?void 0:Ge.hideKeyboard)==null||ft.call(Ge)}else if(g&&Q&&or.current){const bt=or.current;or.current=null;const Rn=requestAnimationFrame(()=>{var pn,Vi;Zt==="terminal"&&(bt==="terminal"?Pn():(Vi=(pn=Ve.current)==null?void 0:pn.focusComposer)==null||Vi.call(pn))});return ks.current=ji,()=>cancelAnimationFrame(Rn)}ks.current=ji},[g,ji,Z==null?void 0:Z.paneId,Zt,Pn]),A.useEffect(()=>{if(!g||ji||Zt!=="terminal"||!(Z!=null&&Z.paneId))return;const Q=ue=>{var je,We;if(TO(ue)){if(RO(ue)){ue.preventDefault(),ue.stopPropagation(),Yt();return}(We=(je=Ne.current)==null?void 0:je.forwardPageKey)!=null&&We.call(je,ue)&&(ue.preventDefault(),ue.stopPropagation())}};return window.addEventListener("keydown",Q,!0),()=>window.removeEventListener("keydown",Q,!0)},[g,ji,Zt,Z==null?void 0:Z.paneId,Yt]);const pa=A.useCallback(async Q=>{try{await bn(Q)}catch(ue){if(!Lt(ue))throw ue}},[bn,Lt]);A.useEffect(()=>{m||r3().then(Et).catch(()=>{})},[m]);const Ee=A.useCallback(()=>{HM(),Ti(),p(!1),F(!1),v(!1),Pe(null),At(!0),b(!0)},[Ti]);e6();const ut=eP();Mn(ce&&!!ot,()=>Ce(!1)),Mn(j||_n,()=>{_n?kr():v(!1)}),Mn(nt,()=>ae(!1)),Mn(D,()=>L(!1)),Mn(U,()=>F(!1)),Mn(P,()=>I(!1)),Mn(ge,()=>qe(!1)),Mn(!!he,()=>He(null)),Mn(!!un,()=>di(null)),Mn(!!le||!!ze,()=>{ze?Mc():Re(null)}),Mn(o,()=>p(!1)),Mn(vt,()=>Ln(!1)),Mn(!!q||!!G,()=>{G?ie(null):J(null)}),Mn(!!X,()=>V(null)),Bf($t,()=>{if(Ri.current=Math.max(0,Ri.current-1),Bi.current){Gi(null);return}Ui(!1)}),A.useEffect(()=>{if($t)return Dr(),()=>{Ri.current>0&&(Ff(Ri.current),Ri.current=0)}},[$t]),A.useEffect(()=>{$t&&Yi&&(Vr(Yi),rr(null))},[$t,Yi]),A.useEffect(()=>{$t&&On.length&&On[0].ts>sr&&(eU(On[0].ts),ar(On[0].ts))},[$t,On,sr]),t6(!!Z,Tt);const Rt=A.useCallback(async Q=>{var je,We;const ue=Z==null?void 0:Z.paneId;if(ue)try{await Od(ue,[Q]),(We=(je=Ne.current)==null?void 0:je.wake)==null||We.call(je)}catch(Ze){Lt(Ze)}},[Z,Vn]),fn=A.useCallback(async Q=>{var je,We;const ue=Z==null?void 0:Z.paneId;if(ue)try{await Nc(ue,Q,!1),(We=(je=Ne.current)==null?void 0:je.wake)==null||We.call(je)}catch(Ze){Lt(Ze)}},[Z,Vn]),Wn=A.useCallback(()=>{var Q,ue;return xn.current??((ue=(Q=Ne.current)==null?void 0:Q.getSize())==null?void 0:ue.cols)},[]),Si=A.useCallback(async(Q,ue=null)=>{var Ge,ft,bt,Rn,pn;const je=(Ge=Z==null?void 0:Z.window)==null?void 0:Ge.id,We=Number.isFinite(ue)?ue:xn.current??((bt=(ft=Ne.current)==null?void 0:ft.getSize())==null?void 0:bt.cols);if(!je||!We)return;const Ze=Math.max(20,Math.min(500,We+Q));xn.current=Ze,(pn=(Rn=Ne.current)==null?void 0:Rn.flash)==null||pn.call(Rn);try{hn.current==null&&(hn.current=await GU(je).then(Vi=>Vi.layout||"").catch(()=>"")),Z.panes&&Z.panes.length>1?await WU(Z.paneId,Ze):await $U(je,Ze)}catch(Vi){Lt(Vi)}},[Z,Vn]),Pi=A.useCallback(async()=>{var je;const Q=(je=Z==null?void 0:Z.window)==null?void 0:je.id;if(!Q)return;const ue=hn.current;xn.current=null,hn.current=null;try{await YU(Q,ue)}catch(We){Lt(We)}},[Z,Vn]),St=A.useCallback(async(Q,ue=null,{isCancelled:je=()=>!1}={})=>{var Rn;const We=++xt.current;if(je())return!1;const Ze=await mc(Q.id);if(je()||We!==xt.current||!Ze.length)return!1;const Ge=(ue==null?void 0:ue.window)&&Ze.find(pn=>pn.id===ue.window)||Ze.find(pn=>pn.id===bc(Ze,aU(Q.id))),ft=await Ws(Ge.id);if(je()||We!==xt.current||!ft.length)return!1;const bt=ue!=null&&ue.pane&&ft.some(pn=>pn.id===ue.pane)?ue.pane:bc(ft,hd(Ge.id));return Pe({session:Q,windows:Ze,window:Ge,panes:ft,paneId:bt}),Jo({sessionId:Q.id,windowId:Ge.id,paneId:bt}),ZS(Q.name),xn.current=((Rn=ft.find(pn=>pn.id===bt))==null?void 0:Rn.width)??null,hn.current=null,!0},[]),Zn=A.useCallback(Q=>{Q&&(JM(Q),ct(ha()))},[]),Ir=A.useCallback((Q,ue)=>{var bt;if(vi.current)return;Q!=null&&Q.mapping&&Zn(Q.mapping);const je=(Q==null?void 0:Q.checkpointId)||null;if(je&&je===Ei.current&&["succeeded","partial"].includes((bt=Kn.current)==null?void 0:bt.status))return;const Ze=!!(je&&Ei.current&&Ei.current!==je);Ze&&Ti(),je&&(Ei.current=je);const Ge=WM(Q==null?void 0:Q.checkpointId),ft=x2(Q,{...Ge,liveSessionCount:ue});if(ft==="none"){Ti(),cn(null),Kt(!1);return}cn(Q),ft==="auto-dialog"?(v1(Q.checkpointId),v(!1),Kt(!0)):Ze&&Kt(!1)},[Zn,Ti]),Jr=A.useCallback(async()=>{var We,Ze;const Q=Ni.current;if(!Q||vi.current)return;const ue={generation:Xr.current+1,checkpointId:Q.checkpointId,operationId:null};Xr.current=ue.generation,Hi.current=ue,vi.current=!0,Un(!0);const je=()=>{var Ge;return Hi.current===ue&&Xr.current===ue.generation&&((Ge=Ni.current)==null?void 0:Ge.checkpointId)===ue.checkpointId};try{const Ge=await s3({checkpointId:Q.checkpointId});if(!je())return;if(!(Ge!=null&&Ge.operationId))throw new Error("restore operation id missing");ue.operationId=Ge.operationId,Tn({id:Ge.operationId,status:Ge.status||"pending",progress:{completed:0,total:(((We=Q.planSummary)==null?void 0:We.create)||0)+(((Ze=Q.planSummary)==null?void 0:Ze.renamed)||0)},results:[]})}catch(Ge){if(!je())return;vi.current=!1,Un(!1),Lt(Ge)||Tn({status:"failed",errorCode:"restore-failed",progress:{completed:0,total:0},results:[]})}},[Lt]),lr=Ft==null?void 0:Ft.id;A.useEffect(()=>{if(!lr||m)return;const Q=Hi.current;if(!Q||Q.operationId!==lr)return;let ue=!1,je=null;const We=()=>!ue&&Hi.current===Q&&Xr.current===Q.generation&&Q.operationId===lr,Ze=()=>{We()&&(je=setTimeout(ft,1e3))},Ge=async bt=>{if(!We())return!0;const Rn=Ni.current,pn=Rn==null?void 0:Rn.checkpointId;if(Tn(bt),Zn(bt.mapping),(bt.results||[]).filter(Br=>Br.status==="restored").length>0&&(ct(zM(bt.results)),fc()),vi.current=!1,Un(!1),!We())return!0;const[cr,as]=await Promise.allSettled([R1(),k1()]);if(!We())return!0;if(as.status==="fulfilled"?Qn(as.value):Lt(as.reason),cr.status==="fulfilled"&&Fi.current!==null){const Br=cr.value;bt.status==="succeeded"&&(Br==null?void 0:Br.checkpointId)===pn?Zn(Br.mapping):Ir(Br,Fi.current)}else cr.status==="rejected"&&Lt(cr.reason);return!0},ft=async()=>{if(We()){try{const bt=await a3(lr);if(!We())return;if(Tn(bt),["succeeded","partial","failed","interrupted"].includes(bt.status)){const Rn=await Ge(bt);if(!We())return;Rn||Ze();return}}catch(bt){if(!We()||Lt(bt))return;if(bt instanceof kC&&bt.status>=400&&bt.status<500){vi.current=!1,Un(!1),Tn({id:lr,status:"failed",errorCode:bt.status===404?"operation-not-found":"restore-failed",progress:{completed:0,total:0},results:[]});return}}Ze()}};return ft(),()=>{ue=!0,clearTimeout(je)}},[lr,m,Zn,Ir,Lt]);const Rr=A.useCallback(async Q=>{var Ze;const ue=++xt.current,We=hd(Q.id)||Q.activePaneId||null;Pe(Ge=>Ge&&{...Ge,window:Q,panes:[],paneId:We}),Jo({sessionId:Z.session.id,windowId:Q.id,paneId:We}),xn.current=Q.width??null,hn.current=null;try{const Ge=await Ws(Q.id);if(ue!==xt.current)return null;if(!Ge.length)return;const ft=bc(Ge,hd(Q.id));return Pe(bt=>bt&&bt.window.id===Q.id?{...bt,window:Q,panes:Ge,paneId:ft}:bt),Jo({sessionId:Z.session.id,windowId:Q.id,paneId:ft}),xn.current=((Ze=Ge.find(bt=>bt.id===ft))==null?void 0:Ze.width)??null,hn.current=null,ft}catch(Ge){return Lt(Ge),null}},[Z,Vn]),rs=A.useCallback(async(Q,ue,je)=>{var Ge,ft,bt,Rn;const We=(Ge=Z==null?void 0:Z.session)==null?void 0:Ge.id,Ze=Z==null?void 0:Z.paneId;if(!(!We||!Ze))try{const{id:pn}=await KU(We,Ze,Q||void 0,ue,je),Vi=await mc(We),cr=Vi.find(ba=>ba.id===pn)||Vi[Vi.length-1],as=await Ws(cr.id);if(!as.length)return;const Br=bc(as,hd(cr.id));Pe(ba=>ba&&{...ba,windows:Vi,window:cr,panes:as,paneId:Br}),Jo({sessionId:We,windowId:cr.id,paneId:Br}),xn.current=((ft=as.find(ba=>ba.id===Br))==null?void 0:ft.width)??null,hn.current=null,I(!1),(Rn=(bt=Ne.current)==null?void 0:bt.wake)==null||Rn.call(bt)}catch(pn){if(Lt(pn))return;throw pn}},[Z,Vn]),Di=A.useCallback(async Q=>{var We,Ze;const ue=G;if(!ue)return;const je=(We=Z==null?void 0:Z.session)==null?void 0:We.id;if(ue.kind==="session"){try{await XU(ue.id,Q)}catch(Ge){throw Lt(Ge)?Ge:Ge.status===409?new Error(ue("app.nameExists")):new Error(ue("app.renameFailed"))}ct($M(ue.name,Q)),fc(),ZS(Q),Pe(Ge=>Ge&&Ge.session.id===ue.id?{...Ge,session:{...Ge.session,name:Q}}:Ge)}else{try{await JU(ue.id,Q)}catch(ft){throw Lt(ft)?ft:new Error(ue("app.renameFailed"))}AU((Ze=Z==null?void 0:Z.session)==null?void 0:Ze.name,ue.name||ue.id,Q);const Ge=await mc(je);Pe(ft=>ft&&{...ft,windows:Ge,window:Ge.find(bt=>bt.id===ft.window.id)||ft.window})}ie(null)},[G,Z,Vn]),Sn=A.useCallback(async()=>{var Ge;const Q=q,ue=Z==null?void 0:Z.session;if(!Q||!ue)return;const je=ue.id,We=Z.windows.length<=1;try{await ZU(Q.id)}catch(ft){if(Lt(ft))return;window.alert(O("app.deleteFailed")),J(null);return}if(J(null),We){ct(p1(ue.name)),fc(),Pe(null);return}const Ze=await mc(je);if(Q.id===Z.window.id&&Ze.length){const ft=Ze.find(pn=>pn.active)||Ze[0],bt=await Ws(ft.id);if(!bt.length)return;const Rn=bc(bt,hd(ft.id));Pe(pn=>pn&&{...pn,windows:Ze,window:ft,panes:bt,paneId:Rn}),Jo({sessionId:je,windowId:ft.id,paneId:Rn}),xn.current=((Ge=bt.find(pn=>pn.id===Rn))==null?void 0:Ge.width)??null,hn.current=null}else Pe(ft=>ft&&{...ft,windows:Ze})},[q,Z,Vn]),ai=A.useCallback(async Q=>{var Ze;const ue=q,je=(Ze=Z==null?void 0:Z.session)==null?void 0:Ze.id;if(!ue||!je)return;const We=J_(Z.windows,ue.id,Q);if(We)try{await QU(ue.id,We.id);const Ge=await mc(je);Pe(ft=>ft&&{...ft,windows:Ge,window:Ge.find(bt=>bt.id===ft.window.id)||ft.window}),J(Ge.find(ft=>ft.id===ue.id)||null)}catch(Ge){if(Lt(Ge)){J(null);return}window.alert(O("app.moveFailed")),J(null)}},[q,Z,Vn]),gi=$f(()=>{Z!=null&&Z.session&&ie({kind:"session",id:Z.session.id,name:Z.session.name})}),ss=A.useCallback(async Q=>{try{const ue=(await Qo()).find(je=>je.name===Q);if(!ue){window.alert(O("app.sessionGone",{name:Q}));return}await St(ue)&&v(!1)}catch(ue){Lt(ue)}},[St,Vn]),Ec=A.useCallback(async Q=>{ae(!1),xi(_1(Q.pane,Q.ts));try{const ue=(await Qo()).find(je=>je.name===Q.session);if(!ue){window.alert(O("app.sessionGone",{name:Q.session}));return}v(!1),await St(ue,{window:Q.window,pane:Q.pane})}catch(ue){Lt(ue)}},[St,Vn]),pl=A.useCallback(async({target:Q,kill:ue,name:je})=>{const We=un,Ze=await c3({pid:We.pid,sessionId:We.sessionId,target:Q,kill:ue,name:je});Ze.name&&(ct(_b(Ze.name)),fc()),di(null),ae(!1);try{Ze.name&&(v(!1),await St({id:Ze.session,name:Ze.name},{window:Ze.window,pane:Ze.pane}))}catch(Ge){Lt(Ge)}try{rn(await T1())}catch{}},[un,St,Vn]),Yf=A.useCallback(()=>{const Q=F1(En);b1(Q),Hn(Q)},[En]),yo=A.useCallback(Q=>{ct(_b(Q)),fc(),F(!1),ss(Q)},[ss]),qf=A.useCallback(Q=>{ct(p1(Q)),fc(),Pe(ue=>ue&&ue.session.name===Q?null:ue)},[]),wo=A.useCallback(Q=>{Pe(ue=>ue&&(Jo({windowId:ue.window.id,paneId:Q}),{...ue,paneId:Q}))},[]),ys=A.useCallback((Q,ue)=>{Pe(je=>{if(!je)return je;const We=je.windows.map(Ze=>Ze.id===Q?{...Ze,panes:ue.length}:Ze);return je.window.id===Q?{...je,windows:We,panes:ue}:{...je,windows:We}})},[]),Kf=A.useCallback(async Q=>{var je;if(!Q)return;const ue=(je=Z==null?void 0:Z.session)==null?void 0:je.id;if(!ue){J(Q);return}try{const We=await mc(ue),Ze=We.find(Ge=>Ge.id===Q.id);if(!Ze)return;Pe(Ge=>!Ge||Ge.session.id!==ue?Ge:{...Ge,windows:We,window:We.find(ft=>ft.id===Ge.window.id)||Ge.window}),J(Ze)}catch(We){Lt(We)||J(Q)}},[(Jd=Z==null?void 0:Z.session)==null?void 0:Jd.id,Lt]),jc=A.useCallback(async(Q,ue=(je=>(je=Z==null?void 0:Z.window)==null?void 0:je.id)())=>{if(Q){if(!ue){V(Q);return}try{const We=await Ws(ue);if(!We.some(Ze=>Ze.id===Q))return;ys(ue,We),V(Q)}catch(We){Lt(We)||V(Q)}}},[(Zd=Z==null?void 0:Z.window)==null?void 0:Zd.id,ys,Lt]),Xf=A.useCallback(async(Q=(ue=>(ue=Z==null?void 0:Z.window)==null?void 0:ue.id)())=>{if(Q)try{ys(Q,await Ws(Q))}catch(je){Lt(je)}},[(Qd=Z==null?void 0:Z.window)==null?void 0:Qd.id,ys,Lt]),Dc=A.useCallback(async(Q,ue)=>{var We;const je=(We=Z==null?void 0:Z.window)==null?void 0:We.id;if(je){V(null),J(null);try{const{panes:Ze,selectPaneId:Ge}=await M1({paneId:Q,dir:ue,windowId:je,api:{splitPane:j1},getPanes:Ws});ys(je,Ze),wo(Ge),hn.current=null}catch(Ze){if(Lt(Ze))return;window.alert(O("pane.splitFailed"))}}},[Z,ys,wo,Vn]),Jf=A.useCallback(async()=>{var We;const Q=X,ue=(We=Z==null?void 0:Z.window)==null?void 0:We.id,je=Z==null?void 0:Z.paneId;if(!(!Q||!ue))try{const{panes:Ze,selectPaneId:Ge}=await b3({paneId:Q,windowId:ue,viewedPaneId:je,api:{closePane:e3},getPanes:Ws,pickId:bc});V(null),ys(ue,Ze),Ge&&wo(Ge),hn.current=null}catch(Ze){if(V(null),Lt(Ze))return;window.alert(O("pane.closeFailed"))}},[X,Z,ys,wo,Vn]),Fd=A.useCallback(async(Q,ue)=>{var We,Ze;const je=(We=Z==null?void 0:Z.session)==null?void 0:We.id;if(!(!Q||!je)){J(null);try{const Ge=await Ws(Q.id),ft=Ge.find(pn=>pn.active)||Ge[0];if(!ft)return;const{panes:bt,selectPaneId:Rn}=await M1({paneId:ft.id,dir:ue,windowId:Q.id,api:{splitPane:j1},getPanes:Ws});Pe(pn=>{if(!pn)return pn;const Vi=pn.windows.map(cr=>cr.id===Q.id?{...cr,panes:bt.length}:cr);return{...pn,windows:Vi,window:Q,panes:bt,paneId:Rn}}),Jo({sessionId:je,windowId:Q.id,paneId:Rn}),xn.current=((Ze=bt.find(pn=>pn.id===Rn))==null?void 0:Ze.width)??null,hn.current=null}catch(Ge){if(Lt(Ge))return;window.alert(O("pane.splitFailed"))}}},[Z,Vn]),Zf=A.useCallback(async Q=>{var je;if(!Q)return;let ue=Z==null?void 0:Z.paneId;Q.id!==((je=Z==null?void 0:Z.window)==null?void 0:je.id)?(J(null),ue=await Rr(Q)):await new Promise(We=>{const Ze=()=>{clearTimeout(Ge),window.removeEventListener("popstate",Ze),We()},Ge=setTimeout(Ze,80);window.addEventListener("popstate",Ze),J(null)}),ue&&(K(Q.id),await jc(ue,Q.id))},[Z,Rr,jc]),vl=(eh=Z==null?void 0:Z.session)==null?void 0:eh.name,qs=(Oc=Z==null?void 0:Z.window)==null?void 0:Oc.id;A.useEffect(()=>{_e(vl&&qs?Nf(vl,qs):[])},[vl,qs]);const xo=(yl=Z==null?void 0:Z.session)==null?void 0:yl.name,gl=(($a=Z==null?void 0:Z.window)==null?void 0:$a.name)||((th=Z==null?void 0:Z.window)==null?void 0:th.id);A.useEffect(()=>{Le(xo&&gl?DC(xo,gl).length:0)},[xo,gl]),A.useEffect(()=>{Z!=null&&Z.paneId&&t2(Z.paneId)},[Z==null?void 0:Z.paneId]),A.useEffect(()=>{var je;const Q=Z==null?void 0:Z.paneId;if(!Q)return;const ue=(je=En[Q])==null?void 0:je.ts;ue!=null&&g1()[Q]!==ue&&xi(_1(Q,ue))},[Z==null?void 0:Z.paneId,En]),A.useEffect(()=>{if(!r6())return;s6();let Q=!1;return(async()=>{const ue=await a6();Q||!ue||(pe(ue),$e.activate("home"),xe(!0))})(),()=>{Q=!0}},[]),A.useEffect(()=>{if(m||typeof navigator>"u"||!("serviceWorker"in navigator))return;const Q=async({session:We,window:Ze,pane:Ge})=>{if(We)try{const bt=(await Qo()).find(Rn=>Rn.name===We);bt&&(v(!1),await St(bt,{window:Ze,pane:Ge}))}catch(ft){Lt(ft)}},ue=We=>{const Ze=We.data;Ze&&(Ze.type==="navigate"?Q(Ze):Ze.type==="navigate-inbox"&&Ze.id&&(Ui(!0),rr(Ze.id)))},je=()=>{const We=mb();We.session&&(We.window||We.pane)&&Q(We)};return navigator.serviceWorker.addEventListener("message",ue),window.addEventListener("hashchange",je),()=>{navigator.serviceWorker.removeEventListener("message",ue),window.removeEventListener("hashchange",je)}},[m,St,Vn]),A.useEffect(()=>{if(m)return;const Q=mb();Q.inbox&&(Ui(!0),Q.inboxId&&rr(Q.inboxId),history.replaceState(history.state,"","#"))},[m]),A.useEffect(()=>{if(m)return;let Q=!0;const ue=async()=>{var Ze;const We=ei.current;try{const Ge=await n2();if(!Q||We!==ei.current)return;ht(Ge),Ci(tU(Ge.map(ft=>ft.id))),Ae("")}catch(Ge){if(Q&&!Lt(Ge)){const ft=(Ze=Ge==null?void 0:Ge.code)!=null&&Ze.startsWith("push.")?Ge.message:Ge!=null&&Ge.status?`HTTP ${Ge.status}`:"";Ae(ft?`${O("pushInbox.loadFailed")} (${ft})`:O("pushInbox.loadFailed"))}}};ue();const je=()=>{document.visibilityState==="visible"&&ue()};return document.addEventListener("visibilitychange",je),()=>{Q=!1,document.removeEventListener("visibilitychange",je)}},[m,$t,lt,Lt]);const kc=A.useCallback(Q=>{var Ze,Ge,ft,bt;(Ge=(Ze=Ne.current)==null?void 0:Ze.wake)==null||Ge.call(Ze);const ue=(ft=Z==null?void 0:Z.session)==null?void 0:ft.name,je=(bt=Z==null?void 0:Z.window)==null?void 0:bt.id;ue&&je&&_e(_U(ue,je,Q));const We=oP(Q);Ke(We&&(Z!=null&&Z.paneId)?{...We,paneId:Z.paneId}:null)},[Z]),Qf=A.useCallback(Q=>{we(xf().includes(Q)?fU(Q):mU(Q))},[]),ep=A.useCallback(Q=>{var We,Ze;const ue=(We=Z==null?void 0:Z.session)==null?void 0:We.name,je=(Ze=Z==null?void 0:Z.window)==null?void 0:Ze.id;ue&&je&&_e(bU(ue,je,Q))},[Z]),_l=((nh=(Wa=Z==null?void 0:Z.panes)==null?void 0:Wa.find(Q=>Q.id===Z.paneId))==null?void 0:nh.cwd)||null,Hd=T&&((ih=En[Z==null?void 0:Z.paneId])==null?void 0:ih.agent)==="claude",zd=Hd&&Zt==="chat",Rc=async Q=>{if(PU(Q)){const je=Q.split("/").pop()||Q;if($e.tabs.some(Ge=>Ge.key===Q)){$e.activate(Q),Tc(Q),xe(!0);return}const{url:We,mtimeMs:Ze}=await A1(Q);$e.openDoc(Q,{type:"image",name:je,content:We,mtime:Ze}),x1({path:Q,name:je,type:"image",ts:Date.now()}),xe(!0);return}const ue=await D1(Q);$e.openDoc(Q,{type:ue.type,name:ue.name,content:ue.content,mtime:ue.mtimeMs}),x1({path:Q,name:ue.name,type:ue.type,ts:Date.now()}),xe(!0)},tp=Q=>{const ue=$e.tabs.find(je=>je.key===Q);(ue==null?void 0:ue.type)==="image"&&ue.content&&URL.revokeObjectURL(ue.content),$e.closeTab(Q)},Tc=Q=>{const ue=$e.tabs.find(je=>je.key===Q);if(!(!ue||ue.type==="home")){if(ue.type==="image"){A1(Q,ue.mtime??null).then(je=>{if(je.notModified)return;const We=ue.content;$e.refreshDoc(Q,{content:je.url,mtime:je.mtimeMs}),We&&URL.revokeObjectURL(We)}).catch(()=>{});return}D1(Q,ue.mtime??null).then(je=>{je.notModified||$e.refreshDoc(Q,{type:je.type,name:je.name,content:je.content,mtime:je.mtimeMs})}).catch(()=>{})}},$d=Q=>{$e.activate(Q),Tc(Q)},np=()=>{xe(!0),Tc($e.active)},Lc=Q=>{const ue=/-> (\d+)/.exec((Q==null?void 0:Q.message)||""),je=ue?Number(ue[1]):0;return O(je===404?"app.docNotFound":je===413?"app.docTooLarge":je===400?"app.docUnsupported":"app.docOpenFailed")},Wd=async Q=>{if(YC(Q)){try{await Rc(Q)}catch(je){Xe(Lc(je))}return}const ue=N1(Z==null?void 0:Z.paneId)??_l;if(ue)try{await Rc(tl(ue,Q));return}catch{}He({rawPath:Q})},ip=async Q=>{try{await Rc(tl(Q,he.rawPath))}catch(ue){Xe(Lc(ue));return}Z!=null&&Z.paneId&&xU(Z.paneId,Q),setTimeout(()=>He(null),0)},rp=(Q,ue,je)=>{(Q==null?void 0:Q.kind)==="url"?Me({protocol:Q.protocol,port:Q.port,path:Q.urlPath,raw:Q.raw,x:ue,y:je}):Re({path:(Q==null?void 0:Q.path)??Q,x:ue,y:je})},sp=Q=>{Re(null),Wd(Q)},[Ac,Ts]=A.useState(null),bl=async()=>{const Q=ze;if(Q)try{await Jn({protocol:Q.protocol,port:Q.port,path:Q.path}),Me(null),Ts(null)}catch(ue){if(Lt(ue))return;Ts(KC(ue,{port:Q.port}))}},Mc=()=>{Me(null),Ts(null)};if(A.useEffect(()=>{if(!tt)return;const Q=setTimeout(()=>Xe(null),4e3);return()=>clearTimeout(Q)},[tt]),A.useEffect(()=>{if(!Oe)return;const Q=setTimeout(()=>et(null),3500);return()=>clearTimeout(Q)},[Oe]),ff({fetch:async()=>{const[Q,ue,je]=await Promise.allSettled([Qo(),R1(),k1()]);for(const We of[Q,ue,je])We.status==="rejected"&&Lt(We.reason);return{sessions:Q.status==="fulfilled"?Q.value:void 0,plan:ue.status==="fulfilled"?ue.value:void 0,protection:je.status==="fulfilled"?je.value:void 0}},apply:({sessions:Q,plan:ue,protection:je})=>{je!==void 0&&Qn(je),Array.isArray(Q)&&(Fi.current=Q.length),ue!=null&&ue.mapping&&Fi.current===null&&Zn(ue.mapping),ue!==void 0&&Fi.current!==null&&Ir(ue,Fi.current)},intervalMs:15e3,enabled:!m}),A.useEffect(()=>{if(m)return;const Q=ha();if(!Q.length){At(!1);return}let ue=!1;return(async()=>{try{const je=await Qo();if(ue||!je.length)return;const We=je.filter(bt=>Q.includes(bt.name));if(!We.length)return;const Ze=mb();let Ge=Ze.session?We.find(bt=>bt.name===Ze.session):null;const ft=Ge?{window:Ze.window,pane:Ze.pane}:null;if(!Ge){const bt=sU();bt&&(Ge=We.find(Rn=>Rn.id===bt))}Ge||(Ge=We[0]),ue||await St(Ge,ft)}catch(je){Lt(je)}finally{ue||At(!1)}})(),()=>{ue=!0}},[m,St]),ff({fetch:()=>l3(at),apply:Q=>yi(Q||{}),intervalMs:5e3,enabled:!m,deps:[at]}),A.useEffect(()=>{if(Pt!=null)return;const Q=F1(En);Q>0&&(b1(Q),Hn(Q))},[En,Pt]),ff({fetch:T1,apply:Q=>rn(Array.isArray(Q)?Q:[]),intervalMs:15e3,enabled:!m}),m)return c.jsxDEV(GV,{onSaved:()=>{b(!1),At(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1515,columnNumber:12},this);const va=Y3(En,wi,Pt??1/0),ap=K3(va),Gd={};for(const Q of Object.values(En))Q.window&&Q.agent&&(Gd[Q.window]=Q.agent);const Yd={};for(const[Q,ue]of Object.entries(En))ue.agent&&(Yd[Q]=ue.agent);const qd=!!rf&&Qt!==rf,op=!!(yn!=null&&yn.updateAvailable)&&yn.latest!==Jt,Kd=new Set(zn),lp=On.filter(Q=>!Kd.has(Q.id)).length,Uc=On.length>0&&On[0].ts>sr,gr=qd||op||Uc,Xd=()=>{p(!0),yn!=null&&yn.latest&&(LU(yn.latest),wn(yn.latest))},cp=()=>{Ln(!0),RU(rf),Xt(rf)};return c.jsxDEV("div",{className:"app","data-chat-tone":f,onPointerDownCapture:$n,style:ut?{transform:`translateY(-${ut}px)`}:void 0,children:[c.jsxDEV("header",{className:"topbar",children:[c.jsxDEV("button",{ref:gs,className:"hamburger",onClick:()=>v(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1559,columnNumber:9},this),c.jsxDEV("span",{className:"session-name",...gi,children:((rh=Z==null?void 0:Z.session)==null?void 0:rh.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1560,columnNumber:9},this),ot&&c.jsxDEV("button",{className:"topbar-icon preview-live",onClick:()=>Ce(!0),"aria-label":O("app.preview"),title:O("app.openPreview"),children:c.jsxDEV(Ef,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1565,columnNumber:72},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1564,columnNumber:11},this),c.jsxDEV("button",{className:"topbar-icon",onClick:()=>qe(!0),"aria-label":O("app.ideas"),title:O("app.ideas"),disabled:!Z,children:[c.jsxDEV(C3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1570,columnNumber:11},this),it>0&&c.jsxDEV("span",{className:"idea-badge",children:it},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1571,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1568,columnNumber:9},this),c.jsxDEV(dI,{rows:va,top:ap,open:nt,onToggle:()=>ae(Q=>!Q),onClose:()=>ae(!1),onSelectRow:Ec,onMarkAllRead:Yf,hooksStatus:Fe,onEnableHooks:st},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1573,columnNumber:9},this),c.jsxDEV("button",{className:"topbar-icon",onClick:()=>L(!0),"aria-label":O("usage.title"),title:O("usage.title"),children:c.jsxDEV(T3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1584,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1584,columnNumber:9},this),c.jsxDEV("button",{className:"topbar-icon",onClick:np,"aria-label":O("app.files"),title:O("app.files"),children:c.jsxDEV(Dd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1585,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1585,columnNumber:9},this),c.jsxDEV("button",{className:"topbar-icon",onClick:()=>se(!0),"aria-label":"Git",title:"Git",children:c.jsxDEV(PC,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1586,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1586,columnNumber:9},this),c.jsxDEV("button",{className:"topbar-icon",onClick:Xd,"aria-label":O("app.settings"),title:O("app.settings"),children:[c.jsxDEV(Cf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1588,columnNumber:11},this),gr&&c.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1589,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1587,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1558,columnNumber:7},this),c.jsxDEV(uI,{open:D,onClose:()=>L(!1),onAuthFail:Vn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1592,columnNumber:7},this),c.jsxDEV(iI,{open:o,onClose:()=>p(!1),workspaceProtection:Ht,chatTone:f,onChatTone:E,chatLensEnabled:T,onChatLensEnabled:k,keyboardMode:r,onKeyboardMode:Rs,terminalTransport:N,onTerminalTransport:fa,snapshotInterval:y,onSnapshotInterval:bs,hooksStatus:Fe,onEnableHooks:st,termRef:Ne,windowId:(wl=Z==null?void 0:Z.window)==null?void 0:wl.id,getColCount:Wn,onColAdjust:Si,onColRestore:Pi,onOpenChangelog:cp,changelogUnread:qd,notifUnread:Uc,onOpenInbox:fr,updateInfo:yn,activePreview:Ue,pane:Z==null?void 0:Z.paneId,lastPreviewDir:iU((xl=Z==null?void 0:Z.window)==null?void 0:xl.id),dynamicEnabled:$,onStartPreview:mn,onStartDynamicPreview:pa,onOpenPreview:Wt,onRenew:mi,onStop:si},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1597,columnNumber:7},this),c.jsxDEV(XI,{open:vt,onClose:()=>Ln(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1633,columnNumber:7},this),c.jsxDEV(a2,{open:$t,detailId:pi,items:On,readIds:zn,onOpenDetail:Vr,onCloseDetail:dn,onClose:is,onDelete:te,deletingId:jt,error:re,onRetry:()=>kt(Q=>Q+1),onMarkAllRead:pr,unreadCount:lp},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1634,columnNumber:7},this),c.jsxDEV(S2,{open:j,currentSessionName:(ga=Z==null?void 0:Z.session)==null?void 0:ga.name,bound:at,onSelectSession:ss,onUnbind:qf,onBind:()=>F(!0),onClose:()=>v(!1),onLogout:Ee,orphans:ci,onTakeoverRequest:di,recoveryPlan:Vt,recoveryOperation:Ft,onOpenRecovery:_s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1649,columnNumber:7},this),c.jsxDEV(aI,{open:_n,plan:Vt,operation:Ft,submitting:an,returnFocusRef:gs,onRestore:Jr,onIgnore:Gs,onClose:kr,onRebind:ma},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1664,columnNumber:7},this),c.jsxDEV(wI,{open:U,bound:at,onBound:yo,onClose:()=>F(!1),onAuthFail:Vn,inset:ut},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1675,columnNumber:7},this),c.jsxDEV(NI,{open:P,onClose:()=>I(!1),onCreate:rs,paneId:Z==null?void 0:Z.paneId,inset:ut},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1683,columnNumber:7},this),c.jsxDEV(CI,{open:!!G,title:(G==null?void 0:G.kind)==="session"?O("app.renameSession"):O("app.renameWindow"),currentName:(G==null?void 0:G.name)||"",onClose:()=>ie(null),onSubmit:Di,inset:ut},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1690,columnNumber:7},this),c.jsxDEV(hI,{open:!!un,orphan:un,onConfirm:pl,onClose:()=>di(null),inset:ut},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1698,columnNumber:7},this),c.jsxDEV(Mf,{open:!!q,title:O("app.manageWindow"),subtitle:l6(q),onClose:()=>J(null),actions:q?[...q.panes===1?[{key:"split-h",icon:c.jsxDEV(U1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1715,columnNumber:37},this),label:O("pane.splitH"),onClick:()=>Fd(q,"h")},{key:"split-v",icon:c.jsxDEV(O1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1716,columnNumber:37},this),label:O("pane.splitV"),onClick:()=>Fd(q,"v")}]:[],...q.panes>1?[{key:"manage-split",icon:c.jsxDEV(O3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1720,columnNumber:42},this),label:O("pane.manage"),onClick:()=>Zf(q)}]:[],...Z&&Z.windows.length>1?[[{key:"move-left",label:O("app.moveLeft"),disabled:!J_(Z.windows,q.id,"left"),onClick:()=>ai("left")},{key:"move-right",label:O("app.moveRight"),disabled:!J_(Z.windows,q.id,"right"),onClick:()=>ai("right")}]]:[],{key:"rename",label:O("common.rename"),onClick:()=>{ie({kind:"window",id:q.id,name:q.name||""}),J(null)}},{key:"delete",label:O("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:Z&&Z.windows.length<=1?O("app.deleteLastWindowConfirm"):O("app.deleteConfirm"),onClick:Sn}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1705,columnNumber:7},this),c.jsxDEV(Mf,{open:!!X,title:O("pane.manageTitle"),subtitle:c6(Z==null?void 0:Z.panes,X),onClose:()=>V(null),actions:X?[{key:"split-h",icon:c.jsxDEV(U1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1758,columnNumber:35},this),label:O("pane.splitH"),onClick:()=>Dc(X,"h")},{key:"split-v",icon:c.jsxDEV(O1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1759,columnNumber:35},this),label:O("pane.splitV"),onClick:()=>Dc(X,"v")},{key:"close",icon:c.jsxDEV(Va,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1761,columnNumber:33},this),label:O("pane.close"),danger:!0,confirm:!0,confirmLabel:O("pane.closeConfirm"),onClick:Jf}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1752,columnNumber:7},this),c.jsxDEV(PI,{open:de,pane:Z==null?void 0:Z.paneId,windowId:(_a=Z==null?void 0:Z.window)==null?void 0:_a.id,tabs:$e.tabs,active:$e.active,onActivate:$d,onCloseTab:tp,onMinimize:()=>xe(!1),onOpenDoc:Wd,pendingShare:Y,onPendingConsumed:()=>pe(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1766,columnNumber:7},this),c.jsxDEV(BI,{open:Se,pane:Z==null?void 0:Z.paneId,windowId:(Pc=Z==null?void 0:Z.window)==null?void 0:Pc.id,inset:ut,onClose:()=>se(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1779,columnNumber:7},this),c.jsxDEV(WI,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1782,columnNumber:7},this),c.jsxDEV(pI,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1784,columnNumber:7},this),c.jsxDEV($3,{open:ce&&!!ot,tabs:Mt,activeName:Nt,domain:Ys,onSwitchTab:In,onCloseTab:on,onRenew:mi,onStop:si,onMinimize:()=>Ce(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1786,columnNumber:7},this),tt&&c.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>Xe(null),children:tt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1798,columnNumber:9},this),Bt&&c.jsxDEV("div",{className:"exit-toast",role:"status",children:O("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1801,columnNumber:9},this),Oe&&c.jsxDEV("div",{className:"handoff-toast",role:"status",children:O("chat.slash.handedOff",{cmd:Oe})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1804,columnNumber:9},this),le&&c.jsxDEV(JS,{path:le.path,x:le.x,y:le.y,onOpen:sp,onClose:()=>Re(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1807,columnNumber:9},this),ze&&c.jsxDEV(JS,{icon:c.jsxDEV(Ef,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1817,columnNumber:17},this),name:O("localurl.title"),path:ze.raw,openLabel:O("localurl.open"),note:Ac??($?void 0:O("localurl.disabled")),disabled:!$,x:ze.x,y:ze.y,onOpen:bl,onClose:Mc},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1816,columnNumber:9},this),c.jsxDEV(KI,{open:ge,session:(sh=Z==null?void 0:Z.session)==null?void 0:sh.name,window:((Vc=Z==null?void 0:Z.window)==null?void 0:Vc.name)||((ah=Z==null?void 0:Z.window)==null?void 0:ah.id),micAvailable:x,onClose:()=>qe(!1),onSend:Q=>{var ue;(ue=Ve.current)==null||ue.fill(Q),qe(!1)},onCountChange:Le},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1829,columnNumber:7},this),c.jsxDEV(Bd,{open:!!he,seedCwd:N1(Z==null?void 0:Z.paneId)??_l??null,pane:(Z==null?void 0:Z.paneId)??null,hint:he?c.jsxDEV(c.Fragment,{children:[O("app.cannotLocate")," ",c.jsxDEV("code",{children:he.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1842,columnNumber:54},this),O("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1842,columnNumber:28},this):null,onPick:ip,onClose:()=>He(null),inset:ut},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1838,columnNumber:7},this),Z?c.jsxDEV(c.Fragment,{children:[c.jsxDEV(V2,{windows:Z.windows,windowAgents:Gd,paneAgents:Yd,currentAgent:(Ic=En[Z.paneId])==null?void 0:Ic.agent,currentWindowId:Z.window.id,panes:Z.panes,currentPaneId:Z.paneId,onSelectWindow:Rr,onSelectPane:wo,onNewWindow:()=>I(!0),onManageWindow:Kf,onManagePane:jc,onBeforePaneMapOpen:Xf,paneSheetOpen:!!X,openMapFor:H,onMapOpened:()=>K(null),onPaneMapOpenChange:oe,trackWindowId:q==null?void 0:q.id,lens:Zt,chatLensEnabled:Hd,onLensChange:Q=>{oi(Q),localStorage.setItem("tw_lens_"+Z.paneId,Q)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1849,columnNumber:11},this),Z.paneId&&(zd?c.jsxDEV(WV,{pane:Z.paneId,kind:(Bc=En[Z.paneId])==null?void 0:Bc.kind,msg:(Fc=En[Z.paneId])==null?void 0:Fc.msg,onAuthFail:Vn,slashEcho:ve&&ve.paneId===Z.paneId?ve:null,onSlashEchoDone:()=>Ke(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1874,columnNumber:15},this):c.jsxDEV(n4,{ref:Ne,pane:Z.paneId,stream:u,snapshotIntervalMs:y,desktop:g,autoFocusInput:!ji,inset:ut,onAuthFail:Vn,onDocLinkTap:rp,onInputFocusChange:qn,onInputData:vr,onRequestDraft:Yt,onKeepKeyboard:()=>{var Q,ue;return((ue=(Q=Ve.current)==null?void 0:Q.keepKeyboardForGesture)==null?void 0:ue.call(Q))??!1},onTap:()=>{var Q;g?Pn():(Q=Ve.current)==null||Q.hideKeyboard()}},Z.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1878,columnNumber:15},this)),zd?c.jsxDEV(hP,{pane:Z.paneId,desktop:g,kind:(Nl=En[Z.paneId])==null?void 0:Nl.kind,cwd:_l,onKey:Rt,onAuthFail:Vn,onSent:kc,shortcuts:w,micAvailable:x,onInteractiveSlash:Q=>{oi("terminal"),localStorage.setItem("tw_lens_"+Z.paneId,"terminal"),et(Q)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1902,columnNumber:13},this):c.jsxDEV(sP,{ref:Ve,pane:Z.paneId,onAuthFail:Vn,onKey:Rt,onText:fn,cwd:_l,agent:(oh=En[Z.paneId])==null?void 0:oh.agent,windowId:(Hc=Z.window)==null?void 0:Hc.id,recent:Je,favorites:Te,onSent:kc,onToggleFav:Qf,onRemoveRecent:ep,inset:ut,shortcuts:w,micAvailable:x,desktopUnified:g,terminalFocused:wt,onLeaveTerminal:()=>{var Q,ue;return(ue=(Q=Ne.current)==null?void 0:Q.blurInput)==null?void 0:ue.call(Q)},onReturnToTerminal:Pn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1915,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1848,columnNumber:9},this):Ot?c.jsxDEV("div",{className:"loading",children:O("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1940,columnNumber:9},this):at.length===0?c.jsxDEV("button",{className:"empty-cta",onClick:()=>F(!0),children:[O("app.noBoundSession"),c.jsxDEV("span",{children:O("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1943,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1942,columnNumber:9},this):c.jsxDEV("div",{className:"loading",children:O("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1946,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1556,columnNumber:5},this)}sC(document.getElementById("root")).render(c.jsxDEV(_6,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/main.jsx",lineNumber:6,columnNumber:52},void 0));if(typeof window<"u"&&window.__hideBootSplash){const i=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(l=>l.media==="print"),r=i.length?new Promise(l=>{let g=i.length;i.forEach(N=>N.addEventListener("load",()=>{--g||l()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>r.then(()=>window.__hideBootSplash())))}