agentus 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/server/src/acp/registry.ts +51 -2
- package/packages/server/src/acp/session-manager.ts +200 -39
- package/packages/server/src/index.ts +85 -10
- package/packages/server/src/notify/center.ts +12 -1
- package/packages/server/src/settings.ts +64 -1
- package/packages/server/src/store/store.ts +35 -3
- package/packages/shared/src/index.ts +11 -1
- package/packages/web/dist/assets/index-C5XlgEcj.js +283 -0
- package/packages/web/dist/index.html +1 -1
- package/packages/web/dist/assets/index-d9NzwPFu.js +0 -283
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
var tV=Object.defineProperty;var uk=e=>{throw TypeError(e)};var nV=(e,t,r)=>t in e?tV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qt=(e,t,r)=>nV(e,typeof t!="symbol"?t+"":t,r),x_=(e,t,r)=>t.has(e)||uk("Cannot "+r);var ie=(e,t,r)=>(x_(e,t,"read from private field"),r?r.call(e):t.get(e)),$t=(e,t,r)=>t.has(e)?uk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),We=(e,t,r,s)=>(x_(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r),K=(e,t,r)=>(x_(e,t,"access private method"),r);var pd=(e,t,r,s)=>({set _(a){We(e,t,a,r)},get _(){return ie(e,t,s)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}})();function jD(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var LD={exports:{}},oy={},BD={exports:{}},Hm={exports:{}};Hm.exports;(function(e,t){/**
|
|
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 r="18.3.1",s=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),j=Symbol.iterator,L="@@iterator";function P(E){if(E===null||typeof E!="object")return null;var F=j&&E[j]||E[L];return typeof F=="function"?F:null}var O={current:null},T={transition:null},B={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},U={current:null},ce={},re=null;function Z(E){re=E}ce.setExtraStackFrame=function(E){re=E},ce.getCurrentStack=null,ce.getStackAddendum=function(){var E="";re&&(E+=re);var F=ce.getCurrentStack;return F&&(E+=F()||""),E};var ve=!1,pe=!1,Q=!1,C=!1,J=!1,Y={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:T,ReactCurrentOwner:U};Y.ReactDebugCurrentFrame=ce,Y.ReactCurrentActQueue=B;function z(E){{for(var F=arguments.length,ae=new Array(F>1?F-1:0),he=1;he<F;he++)ae[he-1]=arguments[he];$("warn",E,ae)}}function X(E){{for(var F=arguments.length,ae=new Array(F>1?F-1:0),he=1;he<F;he++)ae[he-1]=arguments[he];$("error",E,ae)}}function $(E,F,ae){{var he=Y.ReactDebugCurrentFrame,Ve=he.getStackAddendum();Ve!==""&&(F+="%s",ae=ae.concat([Ve]));var St=ae.map(function(at){return String(at)});St.unshift("Warning: "+F),Function.prototype.apply.call(console[E],console,St)}}var xe={};function Me(E,F){{var ae=E.constructor,he=ae&&(ae.displayName||ae.name)||"ReactClass",Ve=he+"."+F;if(xe[Ve])return;X("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.",F,he),xe[Ve]=!0}}var Pe={isMounted:function(E){return!1},enqueueForceUpdate:function(E,F,ae){Me(E,"forceUpdate")},enqueueReplaceState:function(E,F,ae,he){Me(E,"replaceState")},enqueueSetState:function(E,F,ae,he){Me(E,"setState")}},ze=Object.assign,ge={};Object.freeze(ge);function ye(E,F,ae){this.props=E,this.context=F,this.refs=ge,this.updater=ae||Pe}ye.prototype.isReactComponent={},ye.prototype.setState=function(E,F){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,F,"setState")},ye.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};{var mt={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)."]},pt=function(E,F){Object.defineProperty(ye.prototype,E,{get:function(){z("%s(...) is deprecated in plain JavaScript React classes. %s",F[0],F[1])}})};for(var Ut in mt)mt.hasOwnProperty(Ut)&&pt(Ut,mt[Ut])}function Ht(){}Ht.prototype=ye.prototype;function Tt(E,F,ae){this.props=E,this.context=F,this.refs=ge,this.updater=ae||Pe}var Xt=Tt.prototype=new Ht;Xt.constructor=Tt,ze(Xt,ye.prototype),Xt.isPureReactComponent=!0;function Et(){var E={current:null};return Object.seal(E),E}var kt=Array.isArray;function $e(E){return kt(E)}function nt(E){{var F=typeof Symbol=="function"&&Symbol.toStringTag,ae=F&&E[Symbol.toStringTag]||E.constructor.name||"Object";return ae}}function yt(E){try{return vt(E),!1}catch{return!0}}function vt(E){return""+E}function un(E){if(yt(E))return X("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nt(E)),vt(E)}function Ye(E,F,ae){var he=E.displayName;if(he)return he;var Ve=F.displayName||F.name||"";return Ve!==""?ae+"("+Ve+")":ae}function ee(E){return E.displayName||"Context"}function je(E){if(E==null)return null;if(typeof E.tag=="number"&&X("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 l:return"Fragment";case a:return"Portal";case f:return"Profiler";case c:return"StrictMode";case y:return"Suspense";case x:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case m:var F=E;return ee(F)+".Consumer";case p:var ae=E;return ee(ae._context)+".Provider";case v:return Ye(E,E.render,"ForwardRef");case N:var he=E.displayName||null;return he!==null?he:je(E.type)||"Memo";case _:{var Ve=E,St=Ve._payload,at=Ve._init;try{return je(at(St))}catch{return null}}}return null}var ke=Object.prototype.hasOwnProperty,dt={key:!0,ref:!0,__self:!0,__source:!0},bt,sn,ft;ft={};function Se(E){if(ke.call(E,"ref")){var F=Object.getOwnPropertyDescriptor(E,"ref").get;if(F&&F.isReactWarning)return!1}return E.ref!==void 0}function Le(E){if(ke.call(E,"key")){var F=Object.getOwnPropertyDescriptor(E,"key").get;if(F&&F.isReactWarning)return!1}return E.key!==void 0}function it(E,F){var ae=function(){bt||(bt=!0,X("%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)",F))};ae.isReactWarning=!0,Object.defineProperty(E,"key",{get:ae,configurable:!0})}function Nt(E,F){var ae=function(){sn||(sn=!0,X("%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)",F))};ae.isReactWarning=!0,Object.defineProperty(E,"ref",{get:ae,configurable:!0})}function V(E){if(typeof E.ref=="string"&&U.current&&E.__self&&U.current.stateNode!==E.__self){var F=je(U.current.type);ft[F]||(X('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',F,E.ref),ft[F]=!0)}}var be=function(E,F,ae,he,Ve,St,at){var Pt={$$typeof:s,type:E,key:F,ref:ae,props:at,_owner:St};return Pt._store={},Object.defineProperty(Pt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Pt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:he}),Object.defineProperty(Pt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ve}),Object.freeze&&(Object.freeze(Pt.props),Object.freeze(Pt)),Pt};function De(E,F,ae){var he,Ve={},St=null,at=null,Pt=null,an=null;if(F!=null){Se(F)&&(at=F.ref,V(F)),Le(F)&&(un(F.key),St=""+F.key),Pt=F.__self===void 0?null:F.__self,an=F.__source===void 0?null:F.__source;for(he in F)ke.call(F,he)&&!dt.hasOwnProperty(he)&&(Ve[he]=F[he])}var xn=arguments.length-2;if(xn===1)Ve.children=ae;else if(xn>1){for(var Bn=Array(xn),Pn=0;Pn<xn;Pn++)Bn[Pn]=arguments[Pn+2];Object.freeze&&Object.freeze(Bn),Ve.children=Bn}if(E&&E.defaultProps){var Qt=E.defaultProps;for(he in Qt)Ve[he]===void 0&&(Ve[he]=Qt[he])}if(St||at){var qn=typeof E=="function"?E.displayName||E.name||"Unknown":E;St&&it(Ve,qn),at&&Nt(Ve,qn)}return be(E,St,at,Pt,an,U.current,Ve)}function gt(E,F){var ae=be(E.type,F,E.ref,E._self,E._source,E._owner,E.props);return ae}function Wt(E,F,ae){if(E==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+E+".");var he,Ve=ze({},E.props),St=E.key,at=E.ref,Pt=E._self,an=E._source,xn=E._owner;if(F!=null){Se(F)&&(at=F.ref,xn=U.current),Le(F)&&(un(F.key),St=""+F.key);var Bn;E.type&&E.type.defaultProps&&(Bn=E.type.defaultProps);for(he in F)ke.call(F,he)&&!dt.hasOwnProperty(he)&&(F[he]===void 0&&Bn!==void 0?Ve[he]=Bn[he]:Ve[he]=F[he])}var Pn=arguments.length-2;if(Pn===1)Ve.children=ae;else if(Pn>1){for(var Qt=Array(Pn),qn=0;qn<Pn;qn++)Qt[qn]=arguments[qn+2];Ve.children=Qt}return be(E.type,St,at,Pt,an,xn,Ve)}function le(E){return typeof E=="object"&&E!==null&&E.$$typeof===s}var G=".",Ee=":";function me(E){var F=/[=:]/g,ae={"=":"=0",":":"=2"},he=E.replace(F,function(Ve){return ae[Ve]});return"$"+he}var Fe=!1,ot=/\/+/g;function Kt(E){return E.replace(ot,"$&/")}function Cn(E,F){return typeof E=="object"&&E!==null&&E.key!=null?(un(E.key),me(""+E.key)):F.toString(36)}function rt(E,F,ae,he,Ve){var St=typeof E;(St==="undefined"||St==="boolean")&&(E=null);var at=!1;if(E===null)at=!0;else switch(St){case"string":case"number":at=!0;break;case"object":switch(E.$$typeof){case s:case a:at=!0}}if(at){var Pt=E,an=Ve(Pt),xn=he===""?G+Cn(Pt,0):he;if($e(an)){var Bn="";xn!=null&&(Bn=Kt(xn)+"/"),rt(an,F,Bn,"",function(Ng){return Ng})}else an!=null&&(le(an)&&(an.key&&(!Pt||Pt.key!==an.key)&&un(an.key),an=gt(an,ae+(an.key&&(!Pt||Pt.key!==an.key)?Kt(""+an.key)+"/":"")+xn)),F.push(an));return 1}var Pn,Qt,qn=0,hi=he===""?G:he+Ee;if($e(E))for(var il=0;il<E.length;il++)Pn=E[il],Qt=hi+Cn(Pn,il),qn+=rt(Pn,F,ae,Qt,Ve);else{var Pu=P(E);if(typeof Pu=="function"){var ka=E;Pu===ka.entries&&(Fe||z("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Fe=!0);for(var Vu=Pu.call(ka),Iu,yg=0;!(Iu=Vu.next()).done;)Pn=Iu.value,Qt=hi+Cn(Pn,yg++),qn+=rt(Pn,F,ae,Qt,Ve)}else if(St==="object"){var ff=String(E);throw new Error("Objects are not valid as a React child (found: "+(ff==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":ff)+"). If you meant to render a collection of children, use an array instead.")}}return qn}function jn(E,F,ae){if(E==null)return E;var he=[],Ve=0;return rt(E,he,"","",function(St){return F.call(ae,St,Ve++)}),he}function Rr(E){var F=0;return jn(E,function(){F++}),F}function Dt(E,F,ae){jn(E,function(){F.apply(this,arguments)},ae)}function Ln(E){return jn(E,function(F){return F})||[]}function Un(E){if(!le(E))throw new Error("React.Children.only expected to receive a single React element child.");return E}function Ai(E){var F={$$typeof:m,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};F.Provider={$$typeof:p,_context:F};var ae=!1,he=!1,Ve=!1;{var St={$$typeof:m,_context:F};Object.defineProperties(St,{Provider:{get:function(){return he||(he=!0,X("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),F.Provider},set:function(at){F.Provider=at}},_currentValue:{get:function(){return F._currentValue},set:function(at){F._currentValue=at}},_currentValue2:{get:function(){return F._currentValue2},set:function(at){F._currentValue2=at}},_threadCount:{get:function(){return F._threadCount},set:function(at){F._threadCount=at}},Consumer:{get:function(){return ae||(ae=!0,X("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),F.Consumer}},displayName:{get:function(){return F.displayName},set:function(at){Ve||(z("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",at),Ve=!0)}}}),F.Consumer=St}return F._currentRenderer=null,F._currentRenderer2=null,F}var Tn=-1,Hn=0,oi=1,Mn=2;function Ar(E){if(E._status===Tn){var F=E._result,ae=F();if(ae.then(function(St){if(E._status===Hn||E._status===Tn){var at=E;at._status=oi,at._result=St}},function(St){if(E._status===Hn||E._status===Tn){var at=E;at._status=Mn,at._result=St}}),E._status===Tn){var he=E;he._status=Hn,he._result=ae}}if(E._status===oi){var Ve=E._result;return Ve===void 0&&X(`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?`,Ve),"default"in Ve||X(`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'))`,Ve),Ve.default}else throw E._result}function I(E){var F={_status:Tn,_result:E},ae={$$typeof:_,_payload:F,_init:Ar};{var he,Ve;Object.defineProperties(ae,{defaultProps:{configurable:!0,get:function(){return he},set:function(St){X("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."),he=St,Object.defineProperty(ae,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Ve},set:function(St){X("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."),Ve=St,Object.defineProperty(ae,"propTypes",{enumerable:!0})}}})}return ae}function Ne(E){E!=null&&E.$$typeof===N?X("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof E!="function"?X("forwardRef requires a render function but was given %s.",E===null?"null":typeof E):E.length!==0&&E.length!==2&&X("forwardRef render functions accept exactly two parameters: props and ref. %s",E.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),E!=null&&(E.defaultProps!=null||E.propTypes!=null)&&X("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var F={$$typeof:v,render:E};{var ae;Object.defineProperty(F,"displayName",{enumerable:!1,configurable:!0,get:function(){return ae},set:function(he){ae=he,!E.name&&!E.displayName&&(E.displayName=he)}})}return F}var Be;Be=Symbol.for("react.module.reference");function lt(E){return!!(typeof E=="string"||typeof E=="function"||E===l||E===f||J||E===c||E===y||E===x||C||E===k||ve||pe||Q||typeof E=="object"&&E!==null&&(E.$$typeof===_||E.$$typeof===N||E.$$typeof===p||E.$$typeof===m||E.$$typeof===v||E.$$typeof===Be||E.getModuleId!==void 0))}function Lt(E,F){lt(E)||X("memo: The first argument must be a component. Instead received: %s",E===null?"null":typeof E);var ae={$$typeof:N,type:E,compare:F===void 0?null:F};{var he;Object.defineProperty(ae,"displayName",{enumerable:!1,configurable:!0,get:function(){return he},set:function(Ve){he=Ve,!E.name&&!E.displayName&&(E.displayName=Ve)}})}return ae}function ct(){var E=O.current;return E===null&&X(`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.`),E}function Ft(E){var F=ct();if(E._context!==void 0){var ae=E._context;ae.Consumer===E?X("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?"):ae.Provider===E&&X("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return F.useContext(E)}function Ue(E){var F=ct();return F.useState(E)}function xt(E,F,ae){var he=ct();return he.useReducer(E,F,ae)}function Zt(E){var F=ct();return F.useRef(E)}function pn(E,F){var ae=ct();return ae.useEffect(E,F)}function li(E,F){var ae=ct();return ae.useInsertionEffect(E,F)}function ci(E,F){var ae=ct();return ae.useLayoutEffect(E,F)}function ui(E,F){var ae=ct();return ae.useCallback(E,F)}function Rn(E,F){var ae=ct();return ae.useMemo(E,F)}function or(E,F,ae){var he=ct();return he.useImperativeHandle(E,F,ae)}function Wi(E,F){{var ae=ct();return ae.useDebugValue(E,F)}}function zt(){var E=ct();return E.useTransition()}function Ti(E){var F=ct();return F.useDeferredValue(E)}function qi(){var E=ct();return E.useId()}function mn(E,F,ae){var he=ct();return he.useSyncExternalStore(E,F,ae)}var Nn=0,Yt,wn,Mi,lr,ls,Zo,Qo;function Ss(){}Ss.__reactDisabledLog=!0;function Na(){{if(Nn===0){Yt=console.log,wn=console.info,Mi=console.warn,lr=console.error,ls=console.group,Zo=console.groupCollapsed,Qo=console.groupEnd;var E={configurable:!0,enumerable:!0,value:Ss,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}Nn++}}function vr(){{if(Nn--,Nn===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ze({},E,{value:Yt}),info:ze({},E,{value:wn}),warn:ze({},E,{value:Mi}),error:ze({},E,{value:lr}),group:ze({},E,{value:ls}),groupCollapsed:ze({},E,{value:Zo}),groupEnd:ze({},E,{value:Qo})})}Nn<0&&X("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Tr=Y.ReactCurrentDispatcher,Mr;function Ki(E,F,ae){{if(Mr===void 0)try{throw Error()}catch(Ve){var he=Ve.stack.trim().match(/\n( *(at )?)/);Mr=he&&he[1]||""}return`
|
|
22
|
+
`+Mr+E}}var wa=!1,Es;{var el=typeof WeakMap=="function"?WeakMap:Map;Es=new el}function tl(E,F){if(!E||wa)return"";{var ae=Es.get(E);if(ae!==void 0)return ae}var he;wa=!0;var Ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var St;St=Tr.current,Tr.current=null,Na();try{if(F){var at=function(){throw Error()};if(Object.defineProperty(at.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(at,[])}catch(hi){he=hi}Reflect.construct(E,[],at)}else{try{at.call()}catch(hi){he=hi}E.call(at.prototype)}}else{try{throw Error()}catch(hi){he=hi}E()}}catch(hi){if(hi&&he&&typeof hi.stack=="string"){for(var Pt=hi.stack.split(`
|
|
23
|
+
`),an=he.stack.split(`
|
|
24
|
+
`),xn=Pt.length-1,Bn=an.length-1;xn>=1&&Bn>=0&&Pt[xn]!==an[Bn];)Bn--;for(;xn>=1&&Bn>=0;xn--,Bn--)if(Pt[xn]!==an[Bn]){if(xn!==1||Bn!==1)do if(xn--,Bn--,Bn<0||Pt[xn]!==an[Bn]){var Pn=`
|
|
25
|
+
`+Pt[xn].replace(" at new "," at ");return E.displayName&&Pn.includes("<anonymous>")&&(Pn=Pn.replace("<anonymous>",E.displayName)),typeof E=="function"&&Es.set(E,Pn),Pn}while(xn>=1&&Bn>=0);break}}}finally{wa=!1,Tr.current=St,vr(),Error.prepareStackTrace=Ve}var Qt=E?E.displayName||E.name:"",qn=Qt?Ki(Qt):"";return typeof E=="function"&&Es.set(E,qn),qn}function cs(E,F,ae){return tl(E,!1)}function sc(E){var F=E.prototype;return!!(F&&F.isReactComponent)}function Hs(E,F,ae){if(E==null)return"";if(typeof E=="function")return tl(E,sc(E));if(typeof E=="string")return Ki(E);switch(E){case y:return Ki("Suspense");case x:return Ki("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case v:return cs(E.render);case N:return Hs(E.type,F,ae);case _:{var he=E,Ve=he._payload,St=he._init;try{return Hs(St(Ve),F,ae)}catch{}}}return""}var ac={},co=Y.ReactDebugCurrentFrame;function hn(E){if(E){var F=E._owner,ae=Hs(E.type,E._source,F?F.type:null);co.setExtraStackFrame(ae)}else co.setExtraStackFrame(null)}function ju(E,F,ae,he,Ve){{var St=Function.call.bind(ke);for(var at in E)if(St(E,at)){var Pt=void 0;try{if(typeof E[at]!="function"){var an=Error((he||"React class")+": "+ae+" type `"+at+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[at]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw an.name="Invariant Violation",an}Pt=E[at](F,at,he,ae,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(xn){Pt=xn}Pt&&!(Pt instanceof Error)&&(hn(Ve),X("%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).",he||"React class",ae,at,typeof Pt),hn(null)),Pt instanceof Error&&!(Pt.message in ac)&&(ac[Pt.message]=!0,hn(Ve),X("Failed %s type: %s",ae,Pt.message),hn(null))}}}function us(E){if(E){var F=E._owner,ae=Hs(E.type,E._source,F?F.type:null);Z(ae)}else Z(null)}var Rt;Rt=!1;function xa(){if(U.current){var E=je(U.current.type);if(E)return`
|
|
26
|
+
|
|
27
|
+
Check the render method of \``+E+"`."}return""}function Ce(E){if(E!==void 0){var F=E.fileName.replace(/^.*[\\\/]/,""),ae=E.lineNumber;return`
|
|
28
|
+
|
|
29
|
+
Check your code at `+F+":"+ae+"."}return""}function A(E){return E!=null?Ce(E.__source):""}var q={};function Re(E){var F=xa();if(!F){var ae=typeof E=="string"?E:E.displayName||E.name;ae&&(F=`
|
|
30
|
+
|
|
31
|
+
Check the top-level render call using <`+ae+">.")}return F}function Ae(E,F){if(!(!E._store||E._store.validated||E.key!=null)){E._store.validated=!0;var ae=Re(F);if(!q[ae]){q[ae]=!0;var he="";E&&E._owner&&E._owner!==U.current&&(he=" It was passed a child from "+je(E._owner.type)+"."),us(E),X('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ae,he),us(null)}}}function qe(E,F){if(typeof E=="object"){if($e(E))for(var ae=0;ae<E.length;ae++){var he=E[ae];le(he)&&Ae(he,F)}else if(le(E))E._store&&(E._store.validated=!0);else if(E){var Ve=P(E);if(typeof Ve=="function"&&Ve!==E.entries)for(var St=Ve.call(E),at;!(at=St.next()).done;)le(at.value)&&Ae(at.value,F)}}}function Gt(E){{var F=E.type;if(F==null||typeof F=="string")return;var ae;if(typeof F=="function")ae=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===v||F.$$typeof===N))ae=F.propTypes;else return;if(ae){var he=je(F);ju(ae,E.props,"prop",he,E)}else if(F.PropTypes!==void 0&&!Rt){Rt=!0;var Ve=je(F);X("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ve||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&X("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Bt(E){{for(var F=Object.keys(E.props),ae=0;ae<F.length;ae++){var he=F[ae];if(he!=="children"&&he!=="key"){us(E),X("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",he),us(null);break}}E.ref!==null&&(us(E),X("Invalid attribute `ref` supplied to `React.Fragment`."),us(null))}}function rn(E,F,ae){var he=lt(E);if(!he){var Ve="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(Ve+=" 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 St=A(F);St?Ve+=St:Ve+=xa();var at;E===null?at="null":$e(E)?at="array":E!==void 0&&E.$$typeof===s?(at="<"+(je(E.type)||"Unknown")+" />",Ve=" Did you accidentally export a JSX literal instead of a component?"):at=typeof E,X("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",at,Ve)}var Pt=De.apply(this,arguments);if(Pt==null)return Pt;if(he)for(var an=2;an<arguments.length;an++)qe(arguments[an],E);return E===l?Bt(Pt):Gt(Pt),Pt}var Wn=!1;function Yi(E){var F=rn.bind(null,E);return F.type=E,Wn||(Wn=!0,z("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(F,"type",{enumerable:!1,get:function(){return z("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:E}),E}}),F}function hs(E,F,ae){for(var he=Wt.apply(this,arguments),Ve=2;Ve<arguments.length;Ve++)qe(arguments[Ve],he.type);return Gt(he),he}function uo(E,F){var ae=T.transition;T.transition={};var he=T.transition;T.transition._updatedFibers=new Set;try{E()}finally{if(T.transition=ae,ae===null&&he._updatedFibers){var Ve=he._updatedFibers.size;Ve>10&&z("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."),he._updatedFibers.clear()}}}var ni=!1,Sa=null;function _g(E){if(Sa===null)try{var F=("require"+Math.random()).slice(0,7),ae=e&&e[F];Sa=ae.call(e,"timers").setImmediate}catch{Sa=function(Ve){ni===!1&&(ni=!0,typeof MessageChannel>"u"&&X("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 St=new MessageChannel;St.port1.onmessage=Ve,St.port2.postMessage(void 0)}}return Sa(E)}var ho=0,nl=!1;function Lu(E){{var F=ho;ho++,B.current===null&&(B.current=[]);var ae=B.isBatchingLegacy,he;try{if(B.isBatchingLegacy=!0,he=E(),!ae&&B.didScheduleLegacyUpdate){var Ve=B.current;Ve!==null&&(B.didScheduleLegacyUpdate=!1,cc(Ve))}}catch(Qt){throw Ea(F),Qt}finally{B.isBatchingLegacy=ae}if(he!==null&&typeof he=="object"&&typeof he.then=="function"){var St=he,at=!1,Pt={then:function(Qt,qn){at=!0,St.then(function(hi){Ea(F),ho===0?oc(hi,Qt,qn):Qt(hi)},function(hi){Ea(F),qn(hi)})}};return!nl&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){at||(nl=!0,X("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 () => ...);"))}),Pt}else{var an=he;if(Ea(F),ho===0){var xn=B.current;xn!==null&&(cc(xn),B.current=null);var Bn={then:function(Qt,qn){B.current===null?(B.current=[],oc(an,Qt,qn)):Qt(an)}};return Bn}else{var Pn={then:function(Qt,qn){Qt(an)}};return Pn}}}}function Ea(E){E!==ho-1&&X("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ho=E}function oc(E,F,ae){{var he=B.current;if(he!==null)try{cc(he),_g(function(){he.length===0?(B.current=null,F(E)):oc(E,F,ae)})}catch(Ve){ae(Ve)}else F(E)}}var lc=!1;function cc(E){if(!lc){lc=!0;var F=0;try{for(;F<E.length;F++){var ae=E[F];do ae=ae(!0);while(ae!==null)}E.length=0}catch(he){throw E=E.slice(F+1),he}finally{lc=!1}}}var uf=rn,hf=hs,Bu=Yi,df={map:jn,forEach:Dt,count:Rr,toArray:Ln,only:Un};t.Children=df,t.Component=ye,t.Fragment=l,t.Profiler=f,t.PureComponent=Tt,t.StrictMode=c,t.Suspense=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,t.act=Lu,t.cloneElement=hf,t.createContext=Ai,t.createElement=uf,t.createFactory=Bu,t.createRef=Et,t.forwardRef=Ne,t.isValidElement=le,t.lazy=I,t.memo=Lt,t.startTransition=uo,t.unstable_act=Lu,t.useCallback=ui,t.useContext=Ft,t.useDebugValue=Wi,t.useDeferredValue=Ti,t.useEffect=pn,t.useId=qi,t.useImperativeHandle=or,t.useInsertionEffect=li,t.useLayoutEffect=ci,t.useMemo=Rn,t.useReducer=xt,t.useRef=Zt,t.useState=Ue,t.useSyncExternalStore=mn,t.useTransition=zt,t.version=r,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(Hm,Hm.exports);var iV=Hm.exports;BD.exports=iV;var R=BD.exports;const rV=jD(R);/**
|
|
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 e=R,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),_=Symbol.iterator,k="@@iterator";function j(I){if(I===null||typeof I!="object")return null;var Ne=_&&I[_]||I[k];return typeof Ne=="function"?Ne:null}var L=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(I){{for(var Ne=arguments.length,Be=new Array(Ne>1?Ne-1:0),lt=1;lt<Ne;lt++)Be[lt-1]=arguments[lt];O("error",I,Be)}}function O(I,Ne,Be){{var lt=L.ReactDebugCurrentFrame,Lt=lt.getStackAddendum();Lt!==""&&(Ne+="%s",Be=Be.concat([Lt]));var ct=Be.map(function(Ft){return String(Ft)});ct.unshift("Warning: "+Ne),Function.prototype.apply.call(console[I],console,ct)}}var T=!1,B=!1,U=!1,ce=!1,re=!1,Z;Z=Symbol.for("react.module.reference");function ve(I){return!!(typeof I=="string"||typeof I=="function"||I===s||I===l||re||I===a||I===m||I===v||ce||I===N||T||B||U||typeof I=="object"&&I!==null&&(I.$$typeof===x||I.$$typeof===y||I.$$typeof===c||I.$$typeof===f||I.$$typeof===p||I.$$typeof===Z||I.getModuleId!==void 0))}function pe(I,Ne,Be){var lt=I.displayName;if(lt)return lt;var Lt=Ne.displayName||Ne.name||"";return Lt!==""?Be+"("+Lt+")":Be}function Q(I){return I.displayName||"Context"}function C(I){if(I==null)return null;if(typeof I.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof I=="function")return I.displayName||I.name||null;if(typeof I=="string")return I;switch(I){case s:return"Fragment";case r:return"Portal";case l:return"Profiler";case a:return"StrictMode";case m:return"Suspense";case v:return"SuspenseList"}if(typeof I=="object")switch(I.$$typeof){case f:var Ne=I;return Q(Ne)+".Consumer";case c:var Be=I;return Q(Be._context)+".Provider";case p:return pe(I,I.render,"ForwardRef");case y:var lt=I.displayName||null;return lt!==null?lt:C(I.type)||"Memo";case x:{var Lt=I,ct=Lt._payload,Ft=Lt._init;try{return C(Ft(ct))}catch{return null}}}return null}var J=Object.assign,Y=0,z,X,$,xe,Me,Pe,ze;function ge(){}ge.__reactDisabledLog=!0;function ye(){{if(Y===0){z=console.log,X=console.info,$=console.warn,xe=console.error,Me=console.group,Pe=console.groupCollapsed,ze=console.groupEnd;var I={configurable:!0,enumerable:!0,value:ge,writable:!0};Object.defineProperties(console,{info:I,log:I,warn:I,error:I,group:I,groupCollapsed:I,groupEnd:I})}Y++}}function mt(){{if(Y--,Y===0){var I={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},I,{value:z}),info:J({},I,{value:X}),warn:J({},I,{value:$}),error:J({},I,{value:xe}),group:J({},I,{value:Me}),groupCollapsed:J({},I,{value:Pe}),groupEnd:J({},I,{value:ze})})}Y<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var pt=L.ReactCurrentDispatcher,Ut;function Ht(I,Ne,Be){{if(Ut===void 0)try{throw Error()}catch(Lt){var lt=Lt.stack.trim().match(/\n( *(at )?)/);Ut=lt&<[1]||""}return`
|
|
40
|
+
`+Ut+I}}var Tt=!1,Xt;{var Et=typeof WeakMap=="function"?WeakMap:Map;Xt=new Et}function kt(I,Ne){if(!I||Tt)return"";{var Be=Xt.get(I);if(Be!==void 0)return Be}var lt;Tt=!0;var Lt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ct;ct=pt.current,pt.current=null,ye();try{if(Ne){var Ft=function(){throw Error()};if(Object.defineProperty(Ft.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ft,[])}catch(Rn){lt=Rn}Reflect.construct(I,[],Ft)}else{try{Ft.call()}catch(Rn){lt=Rn}I.call(Ft.prototype)}}else{try{throw Error()}catch(Rn){lt=Rn}I()}}catch(Rn){if(Rn&<&&typeof Rn.stack=="string"){for(var Ue=Rn.stack.split(`
|
|
41
|
+
`),xt=lt.stack.split(`
|
|
42
|
+
`),Zt=Ue.length-1,pn=xt.length-1;Zt>=1&&pn>=0&&Ue[Zt]!==xt[pn];)pn--;for(;Zt>=1&&pn>=0;Zt--,pn--)if(Ue[Zt]!==xt[pn]){if(Zt!==1||pn!==1)do if(Zt--,pn--,pn<0||Ue[Zt]!==xt[pn]){var li=`
|
|
43
|
+
`+Ue[Zt].replace(" at new "," at ");return I.displayName&&li.includes("<anonymous>")&&(li=li.replace("<anonymous>",I.displayName)),typeof I=="function"&&Xt.set(I,li),li}while(Zt>=1&&pn>=0);break}}}finally{Tt=!1,pt.current=ct,mt(),Error.prepareStackTrace=Lt}var ci=I?I.displayName||I.name:"",ui=ci?Ht(ci):"";return typeof I=="function"&&Xt.set(I,ui),ui}function $e(I,Ne,Be){return kt(I,!1)}function nt(I){var Ne=I.prototype;return!!(Ne&&Ne.isReactComponent)}function yt(I,Ne,Be){if(I==null)return"";if(typeof I=="function")return kt(I,nt(I));if(typeof I=="string")return Ht(I);switch(I){case m:return Ht("Suspense");case v:return Ht("SuspenseList")}if(typeof I=="object")switch(I.$$typeof){case p:return $e(I.render);case y:return yt(I.type,Ne,Be);case x:{var lt=I,Lt=lt._payload,ct=lt._init;try{return yt(ct(Lt),Ne,Be)}catch{}}}return""}var vt=Object.prototype.hasOwnProperty,un={},Ye=L.ReactDebugCurrentFrame;function ee(I){if(I){var Ne=I._owner,Be=yt(I.type,I._source,Ne?Ne.type:null);Ye.setExtraStackFrame(Be)}else Ye.setExtraStackFrame(null)}function je(I,Ne,Be,lt,Lt){{var ct=Function.call.bind(vt);for(var Ft in I)if(ct(I,Ft)){var Ue=void 0;try{if(typeof I[Ft]!="function"){var xt=Error((lt||"React class")+": "+Be+" type `"+Ft+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof I[Ft]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xt.name="Invariant Violation",xt}Ue=I[Ft](Ne,Ft,lt,Be,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Zt){Ue=Zt}Ue&&!(Ue instanceof Error)&&(ee(Lt),P("%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).",lt||"React class",Be,Ft,typeof Ue),ee(null)),Ue instanceof Error&&!(Ue.message in un)&&(un[Ue.message]=!0,ee(Lt),P("Failed %s type: %s",Be,Ue.message),ee(null))}}}var ke=Array.isArray;function dt(I){return ke(I)}function bt(I){{var Ne=typeof Symbol=="function"&&Symbol.toStringTag,Be=Ne&&I[Symbol.toStringTag]||I.constructor.name||"Object";return Be}}function sn(I){try{return ft(I),!1}catch{return!0}}function ft(I){return""+I}function Se(I){if(sn(I))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",bt(I)),ft(I)}var Le=L.ReactCurrentOwner,it={key:!0,ref:!0,__self:!0,__source:!0},Nt,V,be;be={};function De(I){if(vt.call(I,"ref")){var Ne=Object.getOwnPropertyDescriptor(I,"ref").get;if(Ne&&Ne.isReactWarning)return!1}return I.ref!==void 0}function gt(I){if(vt.call(I,"key")){var Ne=Object.getOwnPropertyDescriptor(I,"key").get;if(Ne&&Ne.isReactWarning)return!1}return I.key!==void 0}function Wt(I,Ne){if(typeof I.ref=="string"&&Le.current&&Ne&&Le.current.stateNode!==Ne){var Be=C(Le.current.type);be[Be]||(P('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',C(Le.current.type),I.ref),be[Be]=!0)}}function le(I,Ne){{var Be=function(){Nt||(Nt=!0,P("%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)",Ne))};Be.isReactWarning=!0,Object.defineProperty(I,"key",{get:Be,configurable:!0})}}function G(I,Ne){{var Be=function(){V||(V=!0,P("%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)",Ne))};Be.isReactWarning=!0,Object.defineProperty(I,"ref",{get:Be,configurable:!0})}}var Ee=function(I,Ne,Be,lt,Lt,ct,Ft){var Ue={$$typeof:t,type:I,key:Ne,ref:Be,props:Ft,_owner:ct};return Ue._store={},Object.defineProperty(Ue._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ue,"_self",{configurable:!1,enumerable:!1,writable:!1,value:lt}),Object.defineProperty(Ue,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Lt}),Object.freeze&&(Object.freeze(Ue.props),Object.freeze(Ue)),Ue};function me(I,Ne,Be,lt,Lt){{var ct,Ft={},Ue=null,xt=null;Be!==void 0&&(Se(Be),Ue=""+Be),gt(Ne)&&(Se(Ne.key),Ue=""+Ne.key),De(Ne)&&(xt=Ne.ref,Wt(Ne,Lt));for(ct in Ne)vt.call(Ne,ct)&&!it.hasOwnProperty(ct)&&(Ft[ct]=Ne[ct]);if(I&&I.defaultProps){var Zt=I.defaultProps;for(ct in Zt)Ft[ct]===void 0&&(Ft[ct]=Zt[ct])}if(Ue||xt){var pn=typeof I=="function"?I.displayName||I.name||"Unknown":I;Ue&&le(Ft,pn),xt&&G(Ft,pn)}return Ee(I,Ue,xt,Lt,lt,Le.current,Ft)}}var Fe=L.ReactCurrentOwner,ot=L.ReactDebugCurrentFrame;function Kt(I){if(I){var Ne=I._owner,Be=yt(I.type,I._source,Ne?Ne.type:null);ot.setExtraStackFrame(Be)}else ot.setExtraStackFrame(null)}var Cn;Cn=!1;function rt(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function jn(){{if(Fe.current){var I=C(Fe.current.type);if(I)return`
|
|
44
|
+
|
|
45
|
+
Check the render method of \``+I+"`."}return""}}function Rr(I){{if(I!==void 0){var Ne=I.fileName.replace(/^.*[\\\/]/,""),Be=I.lineNumber;return`
|
|
46
|
+
|
|
47
|
+
Check your code at `+Ne+":"+Be+"."}return""}}var Dt={};function Ln(I){{var Ne=jn();if(!Ne){var Be=typeof I=="string"?I:I.displayName||I.name;Be&&(Ne=`
|
|
48
|
+
|
|
49
|
+
Check the top-level render call using <`+Be+">.")}return Ne}}function Un(I,Ne){{if(!I._store||I._store.validated||I.key!=null)return;I._store.validated=!0;var Be=Ln(Ne);if(Dt[Be])return;Dt[Be]=!0;var lt="";I&&I._owner&&I._owner!==Fe.current&&(lt=" It was passed a child from "+C(I._owner.type)+"."),Kt(I),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Be,lt),Kt(null)}}function Ai(I,Ne){{if(typeof I!="object")return;if(dt(I))for(var Be=0;Be<I.length;Be++){var lt=I[Be];rt(lt)&&Un(lt,Ne)}else if(rt(I))I._store&&(I._store.validated=!0);else if(I){var Lt=j(I);if(typeof Lt=="function"&&Lt!==I.entries)for(var ct=Lt.call(I),Ft;!(Ft=ct.next()).done;)rt(Ft.value)&&Un(Ft.value,Ne)}}}function Tn(I){{var Ne=I.type;if(Ne==null||typeof Ne=="string")return;var Be;if(typeof Ne=="function")Be=Ne.propTypes;else if(typeof Ne=="object"&&(Ne.$$typeof===p||Ne.$$typeof===y))Be=Ne.propTypes;else return;if(Be){var lt=C(Ne);je(Be,I.props,"prop",lt,I)}else if(Ne.PropTypes!==void 0&&!Cn){Cn=!0;var Lt=C(Ne);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Lt||"Unknown")}typeof Ne.getDefaultProps=="function"&&!Ne.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Hn(I){{for(var Ne=Object.keys(I.props),Be=0;Be<Ne.length;Be++){var lt=Ne[Be];if(lt!=="children"&<!=="key"){Kt(I),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",lt),Kt(null);break}}I.ref!==null&&(Kt(I),P("Invalid attribute `ref` supplied to `React.Fragment`."),Kt(null))}}var oi={};function Mn(I,Ne,Be,lt,Lt,ct){{var Ft=ve(I);if(!Ft){var Ue="";(I===void 0||typeof I=="object"&&I!==null&&Object.keys(I).length===0)&&(Ue+=" 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 xt=Rr(Lt);xt?Ue+=xt:Ue+=jn();var Zt;I===null?Zt="null":dt(I)?Zt="array":I!==void 0&&I.$$typeof===t?(Zt="<"+(C(I.type)||"Unknown")+" />",Ue=" Did you accidentally export a JSX literal instead of a component?"):Zt=typeof I,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Zt,Ue)}var pn=me(I,Ne,Be,Lt,ct);if(pn==null)return pn;if(Ft){var li=Ne.children;if(li!==void 0)if(lt)if(dt(li)){for(var ci=0;ci<li.length;ci++)Ai(li[ci],I);Object.freeze&&Object.freeze(li)}else P("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 Ai(li,I)}if(vt.call(Ne,"key")){var ui=C(I),Rn=Object.keys(Ne).filter(function(zt){return zt!=="key"}),or=Rn.length>0?"{key: someKey, "+Rn.join(": ..., ")+": ...}":"{key: someKey}";if(!oi[ui+or]){var Wi=Rn.length>0?"{"+Rn.join(": ..., ")+": ...}":"{}";P(`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} />`,or,ui,Wi,ui),oi[ui+or]=!0}}return I===s?Hn(pn):Tn(pn),pn}}var Ar=Mn;oy.Fragment=s,oy.jsxDEV=Ar})();LD.exports=oy;var h=LD.exports,PD={exports:{}},es={},VD={exports:{}},ID={};(function(e){/**
|
|
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 t=!1,r=5;function s(V,be){var De=V.length;V.push(be),c(V,be,De)}function a(V){return V.length===0?null:V[0]}function l(V){if(V.length===0)return null;var be=V[0],De=V.pop();return De!==be&&(V[0]=De,f(V,De,0)),be}function c(V,be,De){for(var gt=De;gt>0;){var Wt=gt-1>>>1,le=V[Wt];if(p(le,be)>0)V[Wt]=be,V[gt]=le,gt=Wt;else return}}function f(V,be,De){for(var gt=De,Wt=V.length,le=Wt>>>1;gt<le;){var G=(gt+1)*2-1,Ee=V[G],me=G+1,Fe=V[me];if(p(Ee,be)<0)me<Wt&&p(Fe,Ee)<0?(V[gt]=Fe,V[me]=be,gt=me):(V[gt]=Ee,V[G]=be,gt=G);else if(me<Wt&&p(Fe,be)<0)V[gt]=Fe,V[me]=be,gt=me;else return}}function p(V,be){var De=V.sortIndex-be.sortIndex;return De!==0?De:V.id-be.id}var m=1,v=2,y=3,x=4,N=5;function _(V,be){}var k=typeof performance=="object"&&typeof performance.now=="function";if(k){var j=performance;e.unstable_now=function(){return j.now()}}else{var L=Date,P=L.now();e.unstable_now=function(){return L.now()-P}}var O=1073741823,T=-1,B=250,U=5e3,ce=1e4,re=O,Z=[],ve=[],pe=1,Q=null,C=y,J=!1,Y=!1,z=!1,X=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,xe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Me(V){for(var be=a(ve);be!==null;){if(be.callback===null)l(ve);else if(be.startTime<=V)l(ve),be.sortIndex=be.expirationTime,s(Z,be);else return;be=a(ve)}}function Pe(V){if(z=!1,Me(V),!Y)if(a(Z)!==null)Y=!0,ft(ze);else{var be=a(ve);be!==null&&Se(Pe,be.startTime-V)}}function ze(V,be){Y=!1,z&&(z=!1,Le()),J=!0;var De=C;try{var gt;if(!t)return ge(V,be)}finally{Q=null,C=De,J=!1}}function ge(V,be){var De=be;for(Me(De),Q=a(Z);Q!==null&&!(Q.expirationTime>De&&(!V||Ye()));){var gt=Q.callback;if(typeof gt=="function"){Q.callback=null,C=Q.priorityLevel;var Wt=Q.expirationTime<=De,le=gt(Wt);De=e.unstable_now(),typeof le=="function"?Q.callback=le:Q===a(Z)&&l(Z),Me(De)}else l(Z);Q=a(Z)}if(Q!==null)return!0;var G=a(ve);return G!==null&&Se(Pe,G.startTime-De),!1}function ye(V,be){switch(V){case m:case v:case y:case x:case N:break;default:V=y}var De=C;C=V;try{return be()}finally{C=De}}function mt(V){var be;switch(C){case m:case v:case y:be=y;break;default:be=C;break}var De=C;C=be;try{return V()}finally{C=De}}function pt(V){var be=C;return function(){var De=C;C=be;try{return V.apply(this,arguments)}finally{C=De}}}function Ut(V,be,De){var gt=e.unstable_now(),Wt;if(typeof De=="object"&&De!==null){var le=De.delay;typeof le=="number"&&le>0?Wt=gt+le:Wt=gt}else Wt=gt;var G;switch(V){case m:G=T;break;case v:G=B;break;case N:G=re;break;case x:G=ce;break;case y:default:G=U;break}var Ee=Wt+G,me={id:pe++,callback:be,priorityLevel:V,startTime:Wt,expirationTime:Ee,sortIndex:-1};return Wt>gt?(me.sortIndex=Wt,s(ve,me),a(Z)===null&&me===a(ve)&&(z?Le():z=!0,Se(Pe,Wt-gt))):(me.sortIndex=Ee,s(Z,me),!Y&&!J&&(Y=!0,ft(ze))),me}function Ht(){}function Tt(){!Y&&!J&&(Y=!0,ft(ze))}function Xt(){return a(Z)}function Et(V){V.callback=null}function kt(){return C}var $e=!1,nt=null,yt=-1,vt=r,un=-1;function Ye(){var V=e.unstable_now()-un;return!(V<vt)}function ee(){}function je(V){if(V<0||V>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}V>0?vt=Math.floor(1e3/V):vt=r}var ke=function(){if(nt!==null){var V=e.unstable_now();un=V;var be=!0,De=!0;try{De=nt(be,V)}finally{De?dt():($e=!1,nt=null)}}else $e=!1},dt;if(typeof xe=="function")dt=function(){xe(ke)};else if(typeof MessageChannel<"u"){var bt=new MessageChannel,sn=bt.port2;bt.port1.onmessage=ke,dt=function(){sn.postMessage(null)}}else dt=function(){X(ke,0)};function ft(V){nt=V,$e||($e=!0,dt())}function Se(V,be){yt=X(function(){V(e.unstable_now())},be)}function Le(){$(yt),yt=-1}var it=ee,Nt=null;e.unstable_IdlePriority=N,e.unstable_ImmediatePriority=m,e.unstable_LowPriority=x,e.unstable_NormalPriority=y,e.unstable_Profiling=Nt,e.unstable_UserBlockingPriority=v,e.unstable_cancelCallback=Et,e.unstable_continueExecution=Tt,e.unstable_forceFrameRate=je,e.unstable_getCurrentPriorityLevel=kt,e.unstable_getFirstCallbackNode=Xt,e.unstable_next=mt,e.unstable_pauseExecution=Ht,e.unstable_requestPaint=it,e.unstable_runWithPriority=ye,e.unstable_scheduleCallback=Ut,e.unstable_shouldYield=Ye,e.unstable_wrapCallback=pt,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(ID);VD.exports=ID;var sV=VD.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 e=R,t=sV,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s=!1;function a(n){s=n}function l(n){if(!s){for(var i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];f("warn",n,o)}}function c(n){if(!s){for(var i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];f("error",n,o)}}function f(n,i,o){{var u=r.ReactDebugCurrentFrame,d=u.getStackAddendum();d!==""&&(i+="%s",o=o.concat([d]));var g=o.map(function(b){return String(b)});g.unshift("Warning: "+i),Function.prototype.apply.call(console[n],console,g)}}var p=0,m=1,v=2,y=3,x=4,N=5,_=6,k=7,j=8,L=9,P=10,O=11,T=12,B=13,U=14,ce=15,re=16,Z=17,ve=18,pe=19,Q=21,C=22,J=23,Y=24,z=25,X=!0,$=!1,xe=!1,Me=!1,Pe=!1,ze=!0,ge=!0,ye=!0,mt=!0,pt=new Set,Ut={},Ht={};function Tt(n,i){Xt(n,i),Xt(n+"Capture",i)}function Xt(n,i){Ut[n]&&c("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",n),Ut[n]=i;{var o=n.toLowerCase();Ht[o]=n,n==="onDoubleClick"&&(Ht.ondblclick=n)}for(var u=0;u<i.length;u++)pt.add(i[u])}var Et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kt=Object.prototype.hasOwnProperty;function $e(n){{var i=typeof Symbol=="function"&&Symbol.toStringTag,o=i&&n[Symbol.toStringTag]||n.constructor.name||"Object";return o}}function nt(n){try{return yt(n),!1}catch{return!0}}function yt(n){return""+n}function vt(n,i){if(nt(n))return c("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",i,$e(n)),yt(n)}function un(n){if(nt(n))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",$e(n)),yt(n)}function Ye(n,i){if(nt(n))return c("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",i,$e(n)),yt(n)}function ee(n,i){if(nt(n))return c("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",i,$e(n)),yt(n)}function je(n){if(nt(n))return c("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",$e(n)),yt(n)}function ke(n){if(nt(n))return c("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.",$e(n)),yt(n)}var dt=0,bt=1,sn=2,ft=3,Se=4,Le=5,it=6,Nt=":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",V=Nt+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",be=new RegExp("^["+Nt+"]["+V+"]*$"),De={},gt={};function Wt(n){return kt.call(gt,n)?!0:kt.call(De,n)?!1:be.test(n)?(gt[n]=!0,!0):(De[n]=!0,c("Invalid attribute name: `%s`",n),!1)}function le(n,i,o){return i!==null?i.type===dt:o?!1:n.length>2&&(n[0]==="o"||n[0]==="O")&&(n[1]==="n"||n[1]==="N")}function G(n,i,o,u){if(o!==null&&o.type===dt)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":{if(u)return!1;if(o!==null)return!o.acceptsBooleans;var d=n.toLowerCase().slice(0,5);return d!=="data-"&&d!=="aria-"}default:return!1}}function Ee(n,i,o,u){if(i===null||typeof i>"u"||G(n,i,o,u))return!0;if(u)return!1;if(o!==null)switch(o.type){case ft:return!i;case Se:return i===!1;case Le:return isNaN(i);case it:return isNaN(i)||i<1}return!1}function me(n){return ot.hasOwnProperty(n)?ot[n]:null}function Fe(n,i,o,u,d,g,b){this.acceptsBooleans=i===sn||i===ft||i===Se,this.attributeName=u,this.attributeNamespace=d,this.mustUseProperty=o,this.propertyName=n,this.type=i,this.sanitizeURL=g,this.removeEmptyString=b}var ot={},Kt=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Kt.forEach(function(n){ot[n]=new Fe(n,dt,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var i=n[0],o=n[1];ot[i]=new Fe(i,bt,!1,o,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){ot[n]=new Fe(n,sn,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){ot[n]=new Fe(n,sn,!1,n,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(n){ot[n]=new Fe(n,ft,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){ot[n]=new Fe(n,ft,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){ot[n]=new Fe(n,Se,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){ot[n]=new Fe(n,it,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){ot[n]=new Fe(n,Le,!1,n.toLowerCase(),null,!1,!1)});var Cn=/[\-\:]([a-z])/g,rt=function(n){return n[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(n){var i=n.replace(Cn,rt);ot[i]=new Fe(i,bt,!1,n,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(n){var i=n.replace(Cn,rt);ot[i]=new Fe(i,bt,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var i=n.replace(Cn,rt);ot[i]=new Fe(i,bt,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){ot[n]=new Fe(n,bt,!1,n.toLowerCase(),null,!1,!1)});var jn="xlinkHref";ot[jn]=new Fe("xlinkHref",bt,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){ot[n]=new Fe(n,bt,!1,n.toLowerCase(),null,!0,!0)});var Rr=/^[\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,Dt=!1;function Ln(n){!Dt&&Rr.test(n)&&(Dt=!0,c("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(n)))}function Un(n,i,o,u){if(u.mustUseProperty){var d=u.propertyName;return n[d]}else{vt(o,i),u.sanitizeURL&&Ln(""+o);var g=u.attributeName,b=null;if(u.type===Se){if(n.hasAttribute(g)){var w=n.getAttribute(g);return w===""?!0:Ee(i,o,u,!1)?w:w===""+o?o:w}}else if(n.hasAttribute(g)){if(Ee(i,o,u,!1))return n.getAttribute(g);if(u.type===ft)return o;b=n.getAttribute(g)}return Ee(i,o,u,!1)?b===null?o:b:b===""+o?o:b}}function Ai(n,i,o,u){{if(!Wt(i))return;if(!n.hasAttribute(i))return o===void 0?void 0:null;var d=n.getAttribute(i);return vt(o,i),d===""+o?o:d}}function Tn(n,i,o,u){var d=me(i);if(!le(i,d,u)){if(Ee(i,o,d,u)&&(o=null),u||d===null){if(Wt(i)){var g=i;o===null?n.removeAttribute(g):(vt(o,i),n.setAttribute(g,""+o))}return}var b=d.mustUseProperty;if(b){var w=d.propertyName;if(o===null){var S=d.type;n[w]=S===ft?!1:""}else n[w]=o;return}var D=d.attributeName,M=d.attributeNamespace;if(o===null)n.removeAttribute(D);else{var W=d.type,H;W===ft||W===Se&&o===!0?H="":(vt(o,D),H=""+o,d.sanitizeURL&&Ln(H.toString())),M?n.setAttributeNS(M,D,H):n.setAttribute(D,H)}}}var Hn=Symbol.for("react.element"),oi=Symbol.for("react.portal"),Mn=Symbol.for("react.fragment"),Ar=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),Ne=Symbol.for("react.provider"),Be=Symbol.for("react.context"),lt=Symbol.for("react.forward_ref"),Lt=Symbol.for("react.suspense"),ct=Symbol.for("react.suspense_list"),Ft=Symbol.for("react.memo"),Ue=Symbol.for("react.lazy"),xt=Symbol.for("react.scope"),Zt=Symbol.for("react.debug_trace_mode"),pn=Symbol.for("react.offscreen"),li=Symbol.for("react.legacy_hidden"),ci=Symbol.for("react.cache"),ui=Symbol.for("react.tracing_marker"),Rn=Symbol.iterator,or="@@iterator";function Wi(n){if(n===null||typeof n!="object")return null;var i=Rn&&n[Rn]||n[or];return typeof i=="function"?i:null}var zt=Object.assign,Ti=0,qi,mn,Nn,Yt,wn,Mi,lr;function ls(){}ls.__reactDisabledLog=!0;function Zo(){{if(Ti===0){qi=console.log,mn=console.info,Nn=console.warn,Yt=console.error,wn=console.group,Mi=console.groupCollapsed,lr=console.groupEnd;var n={configurable:!0,enumerable:!0,value:ls,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}Ti++}}function Qo(){{if(Ti--,Ti===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:zt({},n,{value:qi}),info:zt({},n,{value:mn}),warn:zt({},n,{value:Nn}),error:zt({},n,{value:Yt}),group:zt({},n,{value:wn}),groupCollapsed:zt({},n,{value:Mi}),groupEnd:zt({},n,{value:lr})})}Ti<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ss=r.ReactCurrentDispatcher,Na;function vr(n,i,o){{if(Na===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);Na=u&&u[1]||""}return`
|
|
71
|
+
`+Na+n}}var Tr=!1,Mr;{var Ki=typeof WeakMap=="function"?WeakMap:Map;Mr=new Ki}function wa(n,i){if(!n||Tr)return"";{var o=Mr.get(n);if(o!==void 0)return o}var u;Tr=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=Ss.current,Ss.current=null,Zo();try{if(i){var b=function(){throw Error()};if(Object.defineProperty(b.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(b,[])}catch(oe){u=oe}Reflect.construct(n,[],b)}else{try{b.call()}catch(oe){u=oe}n.call(b.prototype)}}else{try{throw Error()}catch(oe){u=oe}n()}}catch(oe){if(oe&&u&&typeof oe.stack=="string"){for(var w=oe.stack.split(`
|
|
72
|
+
`),S=u.stack.split(`
|
|
73
|
+
`),D=w.length-1,M=S.length-1;D>=1&&M>=0&&w[D]!==S[M];)M--;for(;D>=1&&M>=0;D--,M--)if(w[D]!==S[M]){if(D!==1||M!==1)do if(D--,M--,M<0||w[D]!==S[M]){var W=`
|
|
74
|
+
`+w[D].replace(" at new "," at ");return n.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",n.displayName)),typeof n=="function"&&Mr.set(n,W),W}while(D>=1&&M>=0);break}}}finally{Tr=!1,Ss.current=g,Qo(),Error.prepareStackTrace=d}var H=n?n.displayName||n.name:"",se=H?vr(H):"";return typeof n=="function"&&Mr.set(n,se),se}function Es(n,i,o){return wa(n,!0)}function el(n,i,o){return wa(n,!1)}function tl(n){var i=n.prototype;return!!(i&&i.isReactComponent)}function cs(n,i,o){if(n==null)return"";if(typeof n=="function")return wa(n,tl(n));if(typeof n=="string")return vr(n);switch(n){case Lt:return vr("Suspense");case ct:return vr("SuspenseList")}if(typeof n=="object")switch(n.$$typeof){case lt:return el(n.render);case Ft:return cs(n.type,i,o);case Ue:{var u=n,d=u._payload,g=u._init;try{return cs(g(d),i,o)}catch{}}}return""}function sc(n){switch(n._debugOwner&&n._debugOwner.type,n._debugSource,n.tag){case N:return vr(n.type);case re:return vr("Lazy");case B:return vr("Suspense");case pe:return vr("SuspenseList");case p:case v:case ce:return el(n.type);case O:return el(n.type.render);case m:return Es(n.type);default:return""}}function Hs(n){try{var i="",o=n;do i+=sc(o),o=o.return;while(o);return i}catch(u){return`
|
|
75
|
+
Error generating stack: `+u.message+`
|
|
76
|
+
`+u.stack}}function ac(n,i,o){var u=n.displayName;if(u)return u;var d=i.displayName||i.name||"";return d!==""?o+"("+d+")":o}function co(n){return n.displayName||"Context"}function hn(n){if(n==null)return null;if(typeof n.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case Mn:return"Fragment";case oi:return"Portal";case I:return"Profiler";case Ar:return"StrictMode";case Lt:return"Suspense";case ct:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case Be:var i=n;return co(i)+".Consumer";case Ne:var o=n;return co(o._context)+".Provider";case lt:return ac(n,n.render,"ForwardRef");case Ft:var u=n.displayName||null;return u!==null?u:hn(n.type)||"Memo";case Ue:{var d=n,g=d._payload,b=d._init;try{return hn(b(g))}catch{return null}}}return null}function ju(n,i,o){var u=i.displayName||i.name||"";return n.displayName||(u!==""?o+"("+u+")":o)}function us(n){return n.displayName||"Context"}function Rt(n){var i=n.tag,o=n.type;switch(i){case Y:return"Cache";case L:var u=o;return us(u)+".Consumer";case P:var d=o;return us(d._context)+".Provider";case ve:return"DehydratedFragment";case O:return ju(o,o.render,"ForwardRef");case k:return"Fragment";case N:return o;case x:return"Portal";case y:return"Root";case _:return"Text";case re:return hn(o);case j:return o===Ar?"StrictMode":"Mode";case C:return"Offscreen";case T:return"Profiler";case Q:return"Scope";case B:return"Suspense";case pe:return"SuspenseList";case z:return"TracingMarker";case m:case p:case Z:case v:case U:case ce:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;break}return null}var xa=r.ReactDebugCurrentFrame,Ce=null,A=!1;function q(){{if(Ce===null)return null;var n=Ce._debugOwner;if(n!==null&&typeof n<"u")return Rt(n)}return null}function Re(){return Ce===null?"":Hs(Ce)}function Ae(){xa.getCurrentStack=null,Ce=null,A=!1}function qe(n){xa.getCurrentStack=n===null?null:Re,Ce=n,A=!1}function Gt(){return Ce}function Bt(n){A=n}function rn(n){return""+n}function Wn(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return ke(n),n;default:return""}}var Yi={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function hs(n,i){Yi[i.type]||i.onChange||i.onInput||i.readOnly||i.disabled||i.value==null||c("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`."),i.onChange||i.readOnly||i.disabled||i.checked==null||c("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 uo(n){var i=n.type,o=n.nodeName;return o&&o.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ni(n){return n._valueTracker}function Sa(n){n._valueTracker=null}function _g(n){var i="";return n&&(uo(n)?i=n.checked?"true":"false":i=n.value),i}function ho(n){var i=uo(n)?"checked":"value",o=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);ke(n[i]);var u=""+n[i];if(!(n.hasOwnProperty(i)||typeof o>"u"||typeof o.get!="function"||typeof o.set!="function")){var d=o.get,g=o.set;Object.defineProperty(n,i,{configurable:!0,get:function(){return d.call(this)},set:function(w){ke(w),u=""+w,g.call(this,w)}}),Object.defineProperty(n,i,{enumerable:o.enumerable});var b={getValue:function(){return u},setValue:function(w){ke(w),u=""+w},stopTracking:function(){Sa(n),delete n[i]}};return b}}function nl(n){ni(n)||(n._valueTracker=ho(n))}function Lu(n){if(!n)return!1;var i=ni(n);if(!i)return!0;var o=i.getValue(),u=_g(n);return u!==o?(i.setValue(u),!0):!1}function Ea(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var oc=!1,lc=!1,cc=!1,uf=!1;function hf(n){var i=n.type==="checkbox"||n.type==="radio";return i?n.checked!=null:n.value!=null}function Bu(n,i){var o=n,u=i.checked,d=zt({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??o._wrapperState.initialChecked});return d}function df(n,i){hs("input",i),i.checked!==void 0&&i.defaultChecked!==void 0&&!lc&&(c("%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",q()||"A component",i.type),lc=!0),i.value!==void 0&&i.defaultValue!==void 0&&!oc&&(c("%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",q()||"A component",i.type),oc=!0);var o=n,u=i.defaultValue==null?"":i.defaultValue;o._wrapperState={initialChecked:i.checked!=null?i.checked:i.defaultChecked,initialValue:Wn(i.value!=null?i.value:u),controlled:hf(i)}}function E(n,i){var o=n,u=i.checked;u!=null&&Tn(o,"checked",u,!1)}function F(n,i){var o=n;{var u=hf(i);!o._wrapperState.controlled&&u&&!uf&&(c("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"),uf=!0),o._wrapperState.controlled&&!u&&!cc&&(c("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"),cc=!0)}E(n,i);var d=Wn(i.value),g=i.type;if(d!=null)g==="number"?(d===0&&o.value===""||o.value!=d)&&(o.value=rn(d)):o.value!==rn(d)&&(o.value=rn(d));else if(g==="submit"||g==="reset"){o.removeAttribute("value");return}i.hasOwnProperty("value")?St(o,i.type,d):i.hasOwnProperty("defaultValue")&&St(o,i.type,Wn(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(o.defaultChecked=!!i.defaultChecked)}function ae(n,i,o){var u=n;if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var d=i.type,g=d==="submit"||d==="reset";if(g&&(i.value===void 0||i.value===null))return;var b=rn(u._wrapperState.initialValue);o||b!==u.value&&(u.value=b),u.defaultValue=b}var w=u.name;w!==""&&(u.name=""),u.defaultChecked=!u.defaultChecked,u.defaultChecked=!!u._wrapperState.initialChecked,w!==""&&(u.name=w)}function he(n,i){var o=n;F(o,i),Ve(o,i)}function Ve(n,i){var o=i.name;if(i.type==="radio"&&o!=null){for(var u=n;u.parentNode;)u=u.parentNode;vt(o,"name");for(var d=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),g=0;g<d.length;g++){var b=d[g];if(!(b===n||b.form!==n.form)){var w=Zf(b);if(!w)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Lu(b),F(b,w)}}}}function St(n,i,o){(i!=="number"||Ea(n.ownerDocument)!==n)&&(o==null?n.defaultValue=rn(n._wrapperState.initialValue):n.defaultValue!==rn(o)&&(n.defaultValue=rn(o)))}var at=!1,Pt=!1,an=!1;function xn(n,i){i.value==null&&(typeof i.children=="object"&&i.children!==null?e.Children.forEach(i.children,function(o){o!=null&&(typeof o=="string"||typeof o=="number"||Pt||(Pt=!0,c("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):i.dangerouslySetInnerHTML!=null&&(an||(an=!0,c("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),i.selected!=null&&!at&&(c("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),at=!0)}function Bn(n,i){i.value!=null&&n.setAttribute("value",rn(Wn(i.value)))}var Pn=Array.isArray;function Qt(n){return Pn(n)}var qn;qn=!1;function hi(){var n=q();return n?`
|
|
77
|
+
|
|
78
|
+
Check the render method of \``+n+"`.":""}var il=["value","defaultValue"];function Pu(n){{hs("select",n);for(var i=0;i<il.length;i++){var o=il[i];if(n[o]!=null){var u=Qt(n[o]);n.multiple&&!u?c("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",o,hi()):!n.multiple&&u&&c("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",o,hi())}}}}function ka(n,i,o,u){var d=n.options;if(i){for(var g=o,b={},w=0;w<g.length;w++)b["$"+g[w]]=!0;for(var S=0;S<d.length;S++){var D=b.hasOwnProperty("$"+d[S].value);d[S].selected!==D&&(d[S].selected=D),D&&u&&(d[S].defaultSelected=!0)}}else{for(var M=rn(Wn(o)),W=null,H=0;H<d.length;H++){if(d[H].value===M){d[H].selected=!0,u&&(d[H].defaultSelected=!0);return}W===null&&!d[H].disabled&&(W=d[H])}W!==null&&(W.selected=!0)}}function Vu(n,i){return zt({},i,{value:void 0})}function Iu(n,i){var o=n;Pu(i),o._wrapperState={wasMultiple:!!i.multiple},i.value!==void 0&&i.defaultValue!==void 0&&!qn&&(c("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"),qn=!0)}function yg(n,i){var o=n;o.multiple=!!i.multiple;var u=i.value;u!=null?ka(o,!!i.multiple,u,!1):i.defaultValue!=null&&ka(o,!!i.multiple,i.defaultValue,!0)}function ff(n,i){var o=n,u=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var d=i.value;d!=null?ka(o,!!i.multiple,d,!1):u!==!!i.multiple&&(i.defaultValue!=null?ka(o,!!i.multiple,i.defaultValue,!0):ka(o,!!i.multiple,i.multiple?[]:"",!1))}function Ng(n,i){var o=n,u=i.value;u!=null&&ka(o,!!i.multiple,u,!1)}var nw=!1;function wg(n,i){var o=n;if(i.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var u=zt({},i,{value:void 0,defaultValue:void 0,children:rn(o._wrapperState.initialValue)});return u}function iw(n,i){var o=n;hs("textarea",i),i.value!==void 0&&i.defaultValue!==void 0&&!nw&&(c("%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",q()||"A component"),nw=!0);var u=i.value;if(u==null){var d=i.children,g=i.defaultValue;if(d!=null){c("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(g!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Qt(d)){if(d.length>1)throw new Error("<textarea> can only have at most one child.");d=d[0]}g=d}}g==null&&(g=""),u=g}o._wrapperState={initialValue:Wn(u)}}function rw(n,i){var o=n,u=Wn(i.value),d=Wn(i.defaultValue);if(u!=null){var g=rn(u);g!==o.value&&(o.value=g),i.defaultValue==null&&o.defaultValue!==g&&(o.defaultValue=g)}d!=null&&(o.defaultValue=rn(d))}function sw(n,i){var o=n,u=o.textContent;u===o._wrapperState.initialValue&&u!==""&&u!==null&&(o.value=u)}function $A(n,i){rw(n,i)}var Ca="http://www.w3.org/1999/xhtml",UA="http://www.w3.org/1998/Math/MathML",xg="http://www.w3.org/2000/svg";function Sg(n){switch(n){case"svg":return xg;case"math":return UA;default:return Ca}}function Eg(n,i){return n==null||n===Ca?Sg(i):n===xg&&i==="foreignObject"?Ca:n}var HA=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,o,u,d){MSApp.execUnsafeLocalFunction(function(){return n(i,o,u,d)})}:n},pf,aw=HA(function(n,i){if(n.namespaceURI===xg&&!("innerHTML"in n)){pf=pf||document.createElement("div"),pf.innerHTML="<svg>"+i.valueOf().toString()+"</svg>";for(var o=pf.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild);return}n.innerHTML=i}),Or=1,Da=3,di=8,Ra=9,kg=11,mf=function(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===Da){o.nodeValue=i;return}}n.textContent=i},WA={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"]},Fu={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 qA(n,i){return n+i.charAt(0).toUpperCase()+i.substring(1)}var KA=["Webkit","ms","Moz","O"];Object.keys(Fu).forEach(function(n){KA.forEach(function(i){Fu[qA(i,n)]=Fu[n]})});function Cg(n,i,o){var u=i==null||typeof i=="boolean"||i==="";return u?"":!o&&typeof i=="number"&&i!==0&&!(Fu.hasOwnProperty(n)&&Fu[n])?i+"px":(ee(i,n),(""+i).trim())}var YA=/([A-Z])/g,GA=/^ms-/;function JA(n){return n.replace(YA,"-$1").toLowerCase().replace(GA,"-ms-")}var ow=function(){};{var XA=/^(?:webkit|moz|o)[A-Z]/,ZA=/^-ms-/,QA=/-(.)/g,lw=/;\s*$/,uc={},Dg={},cw=!1,uw=!1,eT=function(n){return n.replace(QA,function(i,o){return o.toUpperCase()})},tT=function(n){uc.hasOwnProperty(n)&&uc[n]||(uc[n]=!0,c("Unsupported style property %s. Did you mean %s?",n,eT(n.replace(ZA,"ms-"))))},nT=function(n){uc.hasOwnProperty(n)&&uc[n]||(uc[n]=!0,c("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1)))},iT=function(n,i){Dg.hasOwnProperty(i)&&Dg[i]||(Dg[i]=!0,c(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,i.replace(lw,"")))},rT=function(n,i){cw||(cw=!0,c("`NaN` is an invalid value for the `%s` css style property.",n))},sT=function(n,i){uw||(uw=!0,c("`Infinity` is an invalid value for the `%s` css style property.",n))};ow=function(n,i){n.indexOf("-")>-1?tT(n):XA.test(n)?nT(n):lw.test(i)&&iT(n,i),typeof i=="number"&&(isNaN(i)?rT(n,i):isFinite(i)||sT(n,i))}}var aT=ow;function oT(n){{var i="",o="";for(var u in n)if(n.hasOwnProperty(u)){var d=n[u];if(d!=null){var g=u.indexOf("--")===0;i+=o+(g?u:JA(u))+":",i+=Cg(u,d,g),o=";"}}return i||null}}function hw(n,i){var o=n.style;for(var u in i)if(i.hasOwnProperty(u)){var d=u.indexOf("--")===0;d||aT(u,i[u]);var g=Cg(u,i[u],d);u==="float"&&(u="cssFloat"),d?o.setProperty(u,g):o[u]=g}}function lT(n){return n==null||typeof n=="boolean"||n===""}function dw(n){var i={};for(var o in n)for(var u=WA[o]||[o],d=0;d<u.length;d++)i[u[d]]=o;return i}function cT(n,i){{if(!i)return;var o=dw(n),u=dw(i),d={};for(var g in o){var b=o[g],w=u[g];if(w&&b!==w){var S=b+","+w;if(d[S])continue;d[S]=!0,c("%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.",lT(n[b])?"Removing":"Updating",b,w)}}}}var uT={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},hT=zt({menuitem:!0},uT),dT="__html";function Rg(n,i){if(i){if(hT[n]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw new Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof i.dangerouslySetInnerHTML!="object"||!(dT in i.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(!i.suppressContentEditableWarning&&i.contentEditable&&i.children!=null&&c("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."),i.style!=null&&typeof i.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 rl(n,i){if(n.indexOf("-")===-1)return typeof i.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gf={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"},fw={"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},hc={},fT=new RegExp("^(aria)-["+V+"]*$"),pT=new RegExp("^(aria)[A-Z]["+V+"]*$");function mT(n,i){{if(kt.call(hc,i)&&hc[i])return!0;if(pT.test(i)){var o="aria-"+i.slice(4).toLowerCase(),u=fw.hasOwnProperty(o)?o:null;if(u==null)return c("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",i),hc[i]=!0,!0;if(i!==u)return c("Invalid ARIA attribute `%s`. Did you mean `%s`?",i,u),hc[i]=!0,!0}if(fT.test(i)){var d=i.toLowerCase(),g=fw.hasOwnProperty(d)?d:null;if(g==null)return hc[i]=!0,!1;if(i!==g)return c("Unknown ARIA attribute `%s`. Did you mean `%s`?",i,g),hc[i]=!0,!0}}return!0}function gT(n,i){{var o=[];for(var u in i){var d=mT(n,u);d||o.push(u)}var g=o.map(function(b){return"`"+b+"`"}).join(", ");o.length===1?c("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",g,n):o.length>1&&c("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",g,n)}}function vT(n,i){rl(n,i)||gT(n,i)}var pw=!1;function bT(n,i){{if(n!=="input"&&n!=="textarea"&&n!=="select")return;i!=null&&i.value===null&&!pw&&(pw=!0,n==="select"&&i.multiple?c("`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.",n):c("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",n))}}var mw=function(){};{var br={},gw=/^on./,_T=/^on[^A-Z]/,yT=new RegExp("^(aria)-["+V+"]*$"),NT=new RegExp("^(aria)[A-Z]["+V+"]*$");mw=function(n,i,o,u){if(kt.call(br,i)&&br[i])return!0;var d=i.toLowerCase();if(d==="onfocusin"||d==="onfocusout")return c("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."),br[i]=!0,!0;if(u!=null){var g=u.registrationNameDependencies,b=u.possibleRegistrationNames;if(g.hasOwnProperty(i))return!0;var w=b.hasOwnProperty(d)?b[d]:null;if(w!=null)return c("Invalid event handler property `%s`. Did you mean `%s`?",i,w),br[i]=!0,!0;if(gw.test(i))return c("Unknown event handler property `%s`. It will be ignored.",i),br[i]=!0,!0}else if(gw.test(i))return _T.test(i)&&c("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",i),br[i]=!0,!0;if(yT.test(i)||NT.test(i))return!0;if(d==="innerhtml")return c("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),br[i]=!0,!0;if(d==="aria")return c("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),br[i]=!0,!0;if(d==="is"&&o!==null&&o!==void 0&&typeof o!="string")return c("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof o),br[i]=!0,!0;if(typeof o=="number"&&isNaN(o))return c("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",i),br[i]=!0,!0;var S=me(i),D=S!==null&&S.type===dt;if(gf.hasOwnProperty(d)){var M=gf[d];if(M!==i)return c("Invalid DOM property `%s`. Did you mean `%s`?",i,M),br[i]=!0,!0}else if(!D&&i!==d)return c("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.",i,d),br[i]=!0,!0;return typeof o=="boolean"&&G(i,o,S,!1)?(o?c('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()}.',o,i,i,o,i):c('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.',o,i,i,o,i,i,i),br[i]=!0,!0):D?!0:G(i,o,S,!1)?(br[i]=!0,!1):((o==="false"||o==="true")&&S!==null&&S.type===ft&&(c("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",o,i,o==="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".',i,o),br[i]=!0),!0)}}var wT=function(n,i,o){{var u=[];for(var d in i){var g=mw(n,d,i[d],o);g||u.push(d)}var b=u.map(function(w){return"`"+w+"`"}).join(", ");u.length===1?c("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 ",b,n):u.length>1&&c("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 ",b,n)}};function xT(n,i,o){rl(n,i)||wT(n,i,o)}var vw=1,Ag=2,zu=4,ST=vw|Ag|zu,$u=null;function ET(n){$u!==null&&c("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),$u=n}function kT(){$u===null&&c("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),$u=null}function CT(n){return n===$u}function Tg(n){var i=n.target||n.srcElement||window;return i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===Da?i.parentNode:i}var Mg=null,dc=null,fc=null;function bw(n){var i=No(n);if(i){if(typeof Mg!="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 o=i.stateNode;if(o){var u=Zf(o);Mg(i.stateNode,i.type,u)}}}function DT(n){Mg=n}function _w(n){dc?fc?fc.push(n):fc=[n]:dc=n}function RT(){return dc!==null||fc!==null}function yw(){if(dc){var n=dc,i=fc;if(dc=null,fc=null,bw(n),i)for(var o=0;o<i.length;o++)bw(i[o])}}var Nw=function(n,i){return n(i)},ww=function(){},Og=!1;function AT(){var n=RT();n&&(ww(),yw())}function xw(n,i,o){if(Og)return n(i,o);Og=!0;try{return Nw(n,i,o)}finally{Og=!1,AT()}}function TT(n,i,o){Nw=n,ww=o}function MT(n){return n==="button"||n==="input"||n==="select"||n==="textarea"}function OT(n,i,o){switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(o.disabled&&MT(i));default:return!1}}function Uu(n,i){var o=n.stateNode;if(o===null)return null;var u=Zf(o);if(u===null)return null;var d=u[i];if(OT(i,n.type,u))return null;if(d&&typeof d!="function")throw new Error("Expected `"+i+"` listener to be a function, instead got a value of `"+typeof d+"` type.");return d}var jg=!1;if(Et)try{var Hu={};Object.defineProperty(Hu,"passive",{get:function(){jg=!0}}),window.addEventListener("test",Hu,Hu),window.removeEventListener("test",Hu,Hu)}catch{jg=!1}function Sw(n,i,o,u,d,g,b,w,S){var D=Array.prototype.slice.call(arguments,3);try{i.apply(o,D)}catch(M){this.onError(M)}}var Ew=Sw;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Lg=document.createElement("react");Ew=function(i,o,u,d,g,b,w,S,D){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 M=document.createEvent("Event"),W=!1,H=!0,se=window.event,oe=Object.getOwnPropertyDescriptor(window,"event");function de(){Lg.removeEventListener(fe,_t,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=se)}var Ge=Array.prototype.slice.call(arguments,3);function _t(){W=!0,de(),o.apply(u,Ge),H=!1}var ut,cn=!1,en=!1;function te(ne){if(ut=ne.error,cn=!0,ut===null&&ne.colno===0&&ne.lineno===0&&(en=!0),ne.defaultPrevented&&ut!=null&&typeof ut=="object")try{ut._suppressLogging=!0}catch{}}var fe="react-"+(i||"invokeguardedcallback");if(window.addEventListener("error",te),Lg.addEventListener(fe,_t,!1),M.initEvent(fe,!1,!1),Lg.dispatchEvent(M),oe&&Object.defineProperty(window,"event",oe),W&&H&&(cn?en&&(ut=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.")):ut=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(ut)),window.removeEventListener("error",te),!W)return de(),Sw.apply(this,arguments)}}var jT=Ew,pc=!1,vf=null,bf=!1,Bg=null,LT={onError:function(n){pc=!0,vf=n}};function Pg(n,i,o,u,d,g,b,w,S){pc=!1,vf=null,jT.apply(LT,arguments)}function BT(n,i,o,u,d,g,b,w,S){if(Pg.apply(this,arguments),pc){var D=Vg();bf||(bf=!0,Bg=D)}}function PT(){if(bf){var n=Bg;throw bf=!1,Bg=null,n}}function VT(){return pc}function Vg(){if(pc){var n=vf;return pc=!1,vf=null,n}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 mc(n){return n._reactInternals}function IT(n){return n._reactInternals!==void 0}function FT(n,i){n._reactInternals=i}var Ct=0,gc=1,fi=2,gn=4,sl=16,Wu=32,kw=64,vn=128,Aa=256,al=512,vc=1024,fo=2048,Ta=4096,ol=8192,Ig=16384,zT=32767,_f=32768,_r=65536,Fg=131072,Cw=1048576,zg=2097152,ll=4194304,$g=8388608,po=16777216,Ug=33554432,Hg=gn|vc|0,Wg=fi|gn|sl|Wu|al|Ta|ol,qu=gn|kw|al|ol,bc=fo|sl,Ma=ll|$g|zg,$T=r.ReactCurrentOwner;function cl(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{var u=i;do i=u,(i.flags&(fi|Ta))!==Ct&&(o=i.return),u=i.return;while(u)}return i.tag===y?o:null}function Dw(n){if(n.tag===B){var i=n.memoizedState;if(i===null){var o=n.alternate;o!==null&&(i=o.memoizedState)}if(i!==null)return i.dehydrated}return null}function Rw(n){return n.tag===y?n.stateNode.containerInfo:null}function UT(n){return cl(n)===n}function HT(n){{var i=$T.current;if(i!==null&&i.tag===m){var o=i,u=o.stateNode;u._warnedAboutRefsInRender||c("%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.",Rt(o)||"A component"),u._warnedAboutRefsInRender=!0}}var d=mc(n);return d?cl(d)===d:!1}function Aw(n){if(cl(n)!==n)throw new Error("Unable to find node on an unmounted component.")}function Tw(n){var i=n.alternate;if(!i){var o=cl(n);if(o===null)throw new Error("Unable to find node on an unmounted component.");return o!==n?null:n}for(var u=n,d=i;;){var g=u.return;if(g===null)break;var b=g.alternate;if(b===null){var w=g.return;if(w!==null){u=d=w;continue}break}if(g.child===b.child){for(var S=g.child;S;){if(S===u)return Aw(g),n;if(S===d)return Aw(g),i;S=S.sibling}throw new Error("Unable to find node on an unmounted component.")}if(u.return!==d.return)u=g,d=b;else{for(var D=!1,M=g.child;M;){if(M===u){D=!0,u=g,d=b;break}if(M===d){D=!0,d=g,u=b;break}M=M.sibling}if(!D){for(M=b.child;M;){if(M===u){D=!0,u=b,d=g;break}if(M===d){D=!0,d=b,u=g;break}M=M.sibling}if(!D)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(u.alternate!==d)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(u.tag!==y)throw new Error("Unable to find node on an unmounted component.");return u.stateNode.current===u?n:i}function Mw(n){var i=Tw(n);return i!==null?Ow(i):null}function Ow(n){if(n.tag===N||n.tag===_)return n;for(var i=n.child;i!==null;){var o=Ow(i);if(o!==null)return o;i=i.sibling}return null}function WT(n){var i=Tw(n);return i!==null?jw(i):null}function jw(n){if(n.tag===N||n.tag===_)return n;for(var i=n.child;i!==null;){if(i.tag!==x){var o=jw(i);if(o!==null)return o}i=i.sibling}return null}var Lw=t.unstable_scheduleCallback,qT=t.unstable_cancelCallback,KT=t.unstable_shouldYield,YT=t.unstable_requestPaint,Oi=t.unstable_now,GT=t.unstable_getCurrentPriorityLevel,yf=t.unstable_ImmediatePriority,qg=t.unstable_UserBlockingPriority,ul=t.unstable_NormalPriority,JT=t.unstable_LowPriority,Kg=t.unstable_IdlePriority,XT=t.unstable_yieldValue,ZT=t.unstable_setDisableYieldValue,_c=null,cr=null,Xe=null,Ws=!1,ks=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function QT(n){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var i=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(i.isDisabled)return!0;if(!i.supportsFiber)return c("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{ge&&(n=zt({},n,{getLaneLabelMap:sM,injectProfilingHooks:rM})),_c=i.inject(n),cr=i}catch(o){c("React instrumentation encountered an error: %s.",o)}return!!i.checkDCE}function eM(n,i){if(cr&&typeof cr.onScheduleFiberRoot=="function")try{cr.onScheduleFiberRoot(_c,n,i)}catch(o){Ws||(Ws=!0,c("React instrumentation encountered an error: %s",o))}}function tM(n,i){if(cr&&typeof cr.onCommitFiberRoot=="function")try{var o=(n.current.flags&vn)===vn;if(ye){var u;switch(i){case Wr:u=yf;break;case ja:u=qg;break;case La:u=ul;break;case Cf:u=Kg;break;default:u=ul;break}cr.onCommitFiberRoot(_c,n,u,o)}}catch(d){Ws||(Ws=!0,c("React instrumentation encountered an error: %s",d))}}function nM(n){if(cr&&typeof cr.onPostCommitFiberRoot=="function")try{cr.onPostCommitFiberRoot(_c,n)}catch(i){Ws||(Ws=!0,c("React instrumentation encountered an error: %s",i))}}function iM(n){if(cr&&typeof cr.onCommitFiberUnmount=="function")try{cr.onCommitFiberUnmount(_c,n)}catch(i){Ws||(Ws=!0,c("React instrumentation encountered an error: %s",i))}}function ji(n){if(typeof XT=="function"&&(ZT(n),a(n)),cr&&typeof cr.setStrictMode=="function")try{cr.setStrictMode(_c,n)}catch(i){Ws||(Ws=!0,c("React instrumentation encountered an error: %s",i))}}function rM(n){Xe=n}function sM(){{for(var n=new Map,i=1,o=0;o<Gg;o++){var u=EM(i);n.set(i,u),i*=2}return n}}function aM(n){Xe!==null&&typeof Xe.markCommitStarted=="function"&&Xe.markCommitStarted(n)}function Bw(){Xe!==null&&typeof Xe.markCommitStopped=="function"&&Xe.markCommitStopped()}function Ku(n){Xe!==null&&typeof Xe.markComponentRenderStarted=="function"&&Xe.markComponentRenderStarted(n)}function yc(){Xe!==null&&typeof Xe.markComponentRenderStopped=="function"&&Xe.markComponentRenderStopped()}function oM(n){Xe!==null&&typeof Xe.markComponentPassiveEffectMountStarted=="function"&&Xe.markComponentPassiveEffectMountStarted(n)}function lM(){Xe!==null&&typeof Xe.markComponentPassiveEffectMountStopped=="function"&&Xe.markComponentPassiveEffectMountStopped()}function cM(n){Xe!==null&&typeof Xe.markComponentPassiveEffectUnmountStarted=="function"&&Xe.markComponentPassiveEffectUnmountStarted(n)}function uM(){Xe!==null&&typeof Xe.markComponentPassiveEffectUnmountStopped=="function"&&Xe.markComponentPassiveEffectUnmountStopped()}function hM(n){Xe!==null&&typeof Xe.markComponentLayoutEffectMountStarted=="function"&&Xe.markComponentLayoutEffectMountStarted(n)}function dM(){Xe!==null&&typeof Xe.markComponentLayoutEffectMountStopped=="function"&&Xe.markComponentLayoutEffectMountStopped()}function Pw(n){Xe!==null&&typeof Xe.markComponentLayoutEffectUnmountStarted=="function"&&Xe.markComponentLayoutEffectUnmountStarted(n)}function Vw(){Xe!==null&&typeof Xe.markComponentLayoutEffectUnmountStopped=="function"&&Xe.markComponentLayoutEffectUnmountStopped()}function fM(n,i,o){Xe!==null&&typeof Xe.markComponentErrored=="function"&&Xe.markComponentErrored(n,i,o)}function pM(n,i,o){Xe!==null&&typeof Xe.markComponentSuspended=="function"&&Xe.markComponentSuspended(n,i,o)}function mM(n){Xe!==null&&typeof Xe.markLayoutEffectsStarted=="function"&&Xe.markLayoutEffectsStarted(n)}function gM(){Xe!==null&&typeof Xe.markLayoutEffectsStopped=="function"&&Xe.markLayoutEffectsStopped()}function vM(n){Xe!==null&&typeof Xe.markPassiveEffectsStarted=="function"&&Xe.markPassiveEffectsStarted(n)}function bM(){Xe!==null&&typeof Xe.markPassiveEffectsStopped=="function"&&Xe.markPassiveEffectsStopped()}function Iw(n){Xe!==null&&typeof Xe.markRenderStarted=="function"&&Xe.markRenderStarted(n)}function _M(){Xe!==null&&typeof Xe.markRenderYielded=="function"&&Xe.markRenderYielded()}function Fw(){Xe!==null&&typeof Xe.markRenderStopped=="function"&&Xe.markRenderStopped()}function yM(n){Xe!==null&&typeof Xe.markRenderScheduled=="function"&&Xe.markRenderScheduled(n)}function NM(n,i){Xe!==null&&typeof Xe.markForceUpdateScheduled=="function"&&Xe.markForceUpdateScheduled(n,i)}function Yg(n,i){Xe!==null&&typeof Xe.markStateUpdateScheduled=="function"&&Xe.markStateUpdateScheduled(n,i)}var wt=0,on=1,Sn=2,Zn=8,qs=16,zw=Math.clz32?Math.clz32:SM,wM=Math.log,xM=Math.LN2;function SM(n){var i=n>>>0;return i===0?32:31-(wM(i)/xM|0)|0}var Gg=31,Te=0,Li=0,Mt=1,Nc=2,Oa=4,hl=8,Ks=16,Yu=32,wc=4194240,Gu=64,Jg=128,Xg=256,Zg=512,Qg=1024,ev=2048,tv=4096,nv=8192,iv=16384,rv=32768,sv=65536,av=131072,ov=262144,lv=524288,cv=1048576,uv=2097152,Nf=130023424,xc=4194304,hv=8388608,dv=16777216,fv=33554432,pv=67108864,$w=xc,Ju=134217728,Uw=268435455,Xu=268435456,dl=536870912,Ur=1073741824;function EM(n){{if(n&Mt)return"Sync";if(n&Nc)return"InputContinuousHydration";if(n&Oa)return"InputContinuous";if(n&hl)return"DefaultHydration";if(n&Ks)return"Default";if(n&Yu)return"TransitionHydration";if(n&wc)return"Transition";if(n&Nf)return"Retry";if(n&Ju)return"SelectiveHydration";if(n&Xu)return"IdleHydration";if(n&dl)return"Idle";if(n&Ur)return"Offscreen"}}var Vn=-1,wf=Gu,xf=xc;function Zu(n){switch(fl(n)){case Mt:return Mt;case Nc:return Nc;case Oa:return Oa;case hl:return hl;case Ks:return Ks;case Yu:return Yu;case Gu:case Jg:case Xg:case Zg:case Qg:case ev:case tv:case nv:case iv:case rv:case sv:case av:case ov:case lv:case cv:case uv:return n&wc;case xc:case hv:case dv:case fv:case pv:return n&Nf;case Ju:return Ju;case Xu:return Xu;case dl:return dl;case Ur:return Ur;default:return c("Should have found matching lanes. This is a bug in React."),n}}function Sf(n,i){var o=n.pendingLanes;if(o===Te)return Te;var u=Te,d=n.suspendedLanes,g=n.pingedLanes,b=o&Uw;if(b!==Te){var w=b&~d;if(w!==Te)u=Zu(w);else{var S=b&g;S!==Te&&(u=Zu(S))}}else{var D=o&~d;D!==Te?u=Zu(D):g!==Te&&(u=Zu(g))}if(u===Te)return Te;if(i!==Te&&i!==u&&(i&d)===Te){var M=fl(u),W=fl(i);if(M>=W||M===Ks&&(W&wc)!==Te)return i}(u&Oa)!==Te&&(u|=o&Ks);var H=n.entangledLanes;if(H!==Te)for(var se=n.entanglements,oe=u&H;oe>0;){var de=pl(oe),Ge=1<<de;u|=se[de],oe&=~Ge}return u}function kM(n,i){for(var o=n.eventTimes,u=Vn;i>0;){var d=pl(i),g=1<<d,b=o[d];b>u&&(u=b),i&=~g}return u}function CM(n,i){switch(n){case Mt:case Nc:case Oa:return i+250;case hl:case Ks:case Yu:case Gu:case Jg:case Xg:case Zg:case Qg:case ev:case tv:case nv:case iv:case rv:case sv:case av:case ov:case lv:case cv:case uv:return i+5e3;case xc:case hv:case dv:case fv:case pv:return Vn;case Ju:case Xu:case dl:case Ur:return Vn;default:return c("Should have found matching lanes. This is a bug in React."),Vn}}function DM(n,i){for(var o=n.pendingLanes,u=n.suspendedLanes,d=n.pingedLanes,g=n.expirationTimes,b=o;b>0;){var w=pl(b),S=1<<w,D=g[w];D===Vn?((S&u)===Te||(S&d)!==Te)&&(g[w]=CM(S,i)):D<=i&&(n.expiredLanes|=S),b&=~S}}function RM(n){return Zu(n.pendingLanes)}function mv(n){var i=n.pendingLanes&~Ur;return i!==Te?i:i&Ur?Ur:Te}function AM(n){return(n&Mt)!==Te}function gv(n){return(n&Uw)!==Te}function Hw(n){return(n&Nf)===n}function TM(n){var i=Mt|Oa|Ks;return(n&i)===Te}function MM(n){return(n&wc)===n}function Ef(n,i){var o=Nc|Oa|hl|Ks;return(i&o)!==Te}function OM(n,i){return(i&n.expiredLanes)!==Te}function Ww(n){return(n&wc)!==Te}function qw(){var n=wf;return wf<<=1,(wf&wc)===Te&&(wf=Gu),n}function jM(){var n=xf;return xf<<=1,(xf&Nf)===Te&&(xf=xc),n}function fl(n){return n&-n}function Qu(n){return fl(n)}function pl(n){return 31-zw(n)}function vv(n){return pl(n)}function Hr(n,i){return(n&i)!==Te}function Sc(n,i){return(n&i)===i}function Jt(n,i){return n|i}function kf(n,i){return n&~i}function Kw(n,i){return n&i}function vH(n){return n}function LM(n,i){return n!==Li&&n<i?n:i}function bv(n){for(var i=[],o=0;o<Gg;o++)i.push(n);return i}function eh(n,i,o){n.pendingLanes|=i,i!==dl&&(n.suspendedLanes=Te,n.pingedLanes=Te);var u=n.eventTimes,d=vv(i);u[d]=o}function BM(n,i){n.suspendedLanes|=i,n.pingedLanes&=~i;for(var o=n.expirationTimes,u=i;u>0;){var d=pl(u),g=1<<d;o[d]=Vn,u&=~g}}function Yw(n,i,o){n.pingedLanes|=n.suspendedLanes&i}function PM(n,i){var o=n.pendingLanes&~i;n.pendingLanes=i,n.suspendedLanes=Te,n.pingedLanes=Te,n.expiredLanes&=i,n.mutableReadLanes&=i,n.entangledLanes&=i;for(var u=n.entanglements,d=n.eventTimes,g=n.expirationTimes,b=o;b>0;){var w=pl(b),S=1<<w;u[w]=Te,d[w]=Vn,g[w]=Vn,b&=~S}}function _v(n,i){for(var o=n.entangledLanes|=i,u=n.entanglements,d=o;d;){var g=pl(d),b=1<<g;b&i|u[g]&i&&(u[g]|=i),d&=~b}}function VM(n,i){var o=fl(i),u;switch(o){case Oa:u=Nc;break;case Ks:u=hl;break;case Gu:case Jg:case Xg:case Zg:case Qg:case ev:case tv:case nv:case iv:case rv:case sv:case av:case ov:case lv:case cv:case uv:case xc:case hv:case dv:case fv:case pv:u=Yu;break;case dl:u=Xu;break;default:u=Li;break}return(u&(n.suspendedLanes|i))!==Li?Li:u}function Gw(n,i,o){if(ks)for(var u=n.pendingUpdatersLaneMap;o>0;){var d=vv(o),g=1<<d,b=u[d];b.add(i),o&=~g}}function Jw(n,i){if(ks)for(var o=n.pendingUpdatersLaneMap,u=n.memoizedUpdaters;i>0;){var d=vv(i),g=1<<d,b=o[d];b.size>0&&(b.forEach(function(w){var S=w.alternate;(S===null||!u.has(S))&&u.add(w)}),b.clear()),i&=~g}}function Xw(n,i){return null}var Wr=Mt,ja=Oa,La=Ks,Cf=dl,th=Li;function Cs(){return th}function Bi(n){th=n}function IM(n,i){var o=th;try{return th=n,i()}finally{th=o}}function FM(n,i){return n!==0&&n<i?n:i}function zM(n,i){return n>i?n:i}function yv(n,i){return n!==0&&n<i}function Zw(n){var i=fl(n);return yv(Wr,i)?yv(ja,i)?gv(i)?La:Cf:ja:Wr}function Df(n){var i=n.current.memoizedState;return i.isDehydrated}var Qw;function $M(n){Qw=n}function UM(n){Qw(n)}var Nv;function HM(n){Nv=n}var ex;function WM(n){ex=n}var tx;function qM(n){tx=n}var nx;function KM(n){nx=n}var wv=!1,Rf=[],mo=null,go=null,vo=null,nh=new Map,ih=new Map,bo=[],YM=["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 GM(n){return YM.indexOf(n)>-1}function JM(n,i,o,u,d){return{blockedOn:n,domEventName:i,eventSystemFlags:o,nativeEvent:d,targetContainers:[u]}}function ix(n,i){switch(n){case"focusin":case"focusout":mo=null;break;case"dragenter":case"dragleave":go=null;break;case"mouseover":case"mouseout":vo=null;break;case"pointerover":case"pointerout":{var o=i.pointerId;nh.delete(o);break}case"gotpointercapture":case"lostpointercapture":{var u=i.pointerId;ih.delete(u);break}}}function rh(n,i,o,u,d,g){if(n===null||n.nativeEvent!==g){var b=JM(i,o,u,d,g);if(i!==null){var w=No(i);w!==null&&Nv(w)}return b}n.eventSystemFlags|=u;var S=n.targetContainers;return d!==null&&S.indexOf(d)===-1&&S.push(d),n}function XM(n,i,o,u,d){switch(i){case"focusin":{var g=d;return mo=rh(mo,n,i,o,u,g),!0}case"dragenter":{var b=d;return go=rh(go,n,i,o,u,b),!0}case"mouseover":{var w=d;return vo=rh(vo,n,i,o,u,w),!0}case"pointerover":{var S=d,D=S.pointerId;return nh.set(D,rh(nh.get(D)||null,n,i,o,u,S)),!0}case"gotpointercapture":{var M=d,W=M.pointerId;return ih.set(W,rh(ih.get(W)||null,n,i,o,u,M)),!0}}return!1}function rx(n){var i=vl(n.target);if(i!==null){var o=cl(i);if(o!==null){var u=o.tag;if(u===B){var d=Dw(o);if(d!==null){n.blockedOn=d,nx(n.priority,function(){ex(o)});return}}else if(u===y){var g=o.stateNode;if(Df(g)){n.blockedOn=Rw(o);return}}}}n.blockedOn=null}function ZM(n){for(var i=tx(),o={blockedOn:null,target:n,priority:i},u=0;u<bo.length&&yv(i,bo[u].priority);u++);bo.splice(u,0,o),u===0&&rx(o)}function Af(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;i.length>0;){var o=i[0],u=Ev(n.domEventName,n.eventSystemFlags,o,n.nativeEvent);if(u===null){var d=n.nativeEvent,g=new d.constructor(d.type,d);ET(g),d.target.dispatchEvent(g),kT()}else{var b=No(u);return b!==null&&Nv(b),n.blockedOn=u,!1}i.shift()}return!0}function sx(n,i,o){Af(n)&&o.delete(i)}function QM(){wv=!1,mo!==null&&Af(mo)&&(mo=null),go!==null&&Af(go)&&(go=null),vo!==null&&Af(vo)&&(vo=null),nh.forEach(sx),ih.forEach(sx)}function sh(n,i){n.blockedOn===i&&(n.blockedOn=null,wv||(wv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,QM)))}function ah(n){if(Rf.length>0){sh(Rf[0],n);for(var i=1;i<Rf.length;i++){var o=Rf[i];o.blockedOn===n&&(o.blockedOn=null)}}mo!==null&&sh(mo,n),go!==null&&sh(go,n),vo!==null&&sh(vo,n);var u=function(w){return sh(w,n)};nh.forEach(u),ih.forEach(u);for(var d=0;d<bo.length;d++){var g=bo[d];g.blockedOn===n&&(g.blockedOn=null)}for(;bo.length>0;){var b=bo[0];if(b.blockedOn!==null)break;rx(b),b.blockedOn===null&&bo.shift()}}var Ec=r.ReactCurrentBatchConfig,xv=!0;function ax(n){xv=!!n}function e5(){return xv}function t5(n,i,o){var u=ox(i),d;switch(u){case Wr:d=n5;break;case ja:d=i5;break;case La:default:d=Sv;break}return d.bind(null,i,o,n)}function n5(n,i,o,u){var d=Cs(),g=Ec.transition;Ec.transition=null;try{Bi(Wr),Sv(n,i,o,u)}finally{Bi(d),Ec.transition=g}}function i5(n,i,o,u){var d=Cs(),g=Ec.transition;Ec.transition=null;try{Bi(ja),Sv(n,i,o,u)}finally{Bi(d),Ec.transition=g}}function Sv(n,i,o,u){xv&&r5(n,i,o,u)}function r5(n,i,o,u){var d=Ev(n,i,o,u);if(d===null){Iv(n,i,u,Tf,o),ix(n,u);return}if(XM(d,n,i,o,u)){u.stopPropagation();return}if(ix(n,u),i&zu&&GM(n)){for(;d!==null;){var g=No(d);g!==null&&UM(g);var b=Ev(n,i,o,u);if(b===null&&Iv(n,i,u,Tf,o),b===d)break;d=b}d!==null&&u.stopPropagation();return}Iv(n,i,u,null,o)}var Tf=null;function Ev(n,i,o,u){Tf=null;var d=Tg(u),g=vl(d);if(g!==null){var b=cl(g);if(b===null)g=null;else{var w=b.tag;if(w===B){var S=Dw(b);if(S!==null)return S;g=null}else if(w===y){var D=b.stateNode;if(Df(D))return Rw(b);g=null}else b!==g&&(g=null)}}return Tf=g,null}function ox(n){switch(n){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 Wr;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 ja;case"message":{var i=GT();switch(i){case yf:return Wr;case qg:return ja;case ul:case JT:return La;case Kg:return Cf;default:return La}}default:return La}}function s5(n,i,o){return n.addEventListener(i,o,!1),o}function a5(n,i,o){return n.addEventListener(i,o,!0),o}function o5(n,i,o,u){return n.addEventListener(i,o,{capture:!0,passive:u}),o}function l5(n,i,o,u){return n.addEventListener(i,o,{passive:u}),o}var oh=null,kv=null,lh=null;function c5(n){return oh=n,kv=cx(),!0}function u5(){oh=null,kv=null,lh=null}function lx(){if(lh)return lh;var n,i=kv,o=i.length,u,d=cx(),g=d.length;for(n=0;n<o&&i[n]===d[n];n++);var b=o-n;for(u=1;u<=b&&i[o-u]===d[g-u];u++);var w=u>1?1-u:void 0;return lh=d.slice(n,w),lh}function cx(){return"value"in oh?oh.value:oh.textContent}function Mf(n){var i,o=n.keyCode;return"charCode"in n?(i=n.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),i>=32||i===13?i:0}function Of(){return!0}function ux(){return!1}function qr(n){function i(o,u,d,g,b){this._reactName=o,this._targetInst=d,this.type=u,this.nativeEvent=g,this.target=b,this.currentTarget=null;for(var w in n)if(n.hasOwnProperty(w)){var S=n[w];S?this[w]=S(g):this[w]=g[w]}var D=g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1;return D?this.isDefaultPrevented=Of:this.isDefaultPrevented=ux,this.isPropagationStopped=ux,this}return zt(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Of)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Of)},persist:function(){},isPersistent:Of}),i}var kc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cv=qr(kc),ch=zt({},kc,{view:0,detail:0}),h5=qr(ch),Dv,Rv,uh;function d5(n){n!==uh&&(uh&&n.type==="mousemove"?(Dv=n.screenX-uh.screenX,Rv=n.screenY-uh.screenY):(Dv=0,Rv=0),uh=n)}var jf=zt({},ch,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tv,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(d5(n),Dv)},movementY:function(n){return"movementY"in n?n.movementY:Rv}}),hx=qr(jf),f5=zt({},jf,{dataTransfer:0}),p5=qr(f5),m5=zt({},ch,{relatedTarget:0}),Av=qr(m5),g5=zt({},kc,{animationName:0,elapsedTime:0,pseudoElement:0}),v5=qr(g5),b5=zt({},kc,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),_5=qr(b5),y5=zt({},kc,{data:0}),dx=qr(y5),N5=dx,w5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},x5={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 S5(n){if(n.key){var i=w5[n.key]||n.key;if(i!=="Unidentified")return i}if(n.type==="keypress"){var o=Mf(n);return o===13?"Enter":String.fromCharCode(o)}return n.type==="keydown"||n.type==="keyup"?x5[n.keyCode]||"Unidentified":""}var E5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function k5(n){var i=this,o=i.nativeEvent;if(o.getModifierState)return o.getModifierState(n);var u=E5[n];return u?!!o[u]:!1}function Tv(n){return k5}var C5=zt({},ch,{key:S5,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tv,charCode:function(n){return n.type==="keypress"?Mf(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Mf(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),D5=qr(C5),R5=zt({},jf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fx=qr(R5),A5=zt({},ch,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tv}),T5=qr(A5),M5=zt({},kc,{propertyName:0,elapsedTime:0,pseudoElement:0}),O5=qr(M5),j5=zt({},jf,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),L5=qr(j5),B5=[9,13,27,32],px=229,Mv=Et&&"CompositionEvent"in window,hh=null;Et&&"documentMode"in document&&(hh=document.documentMode);var P5=Et&&"TextEvent"in window&&!hh,mx=Et&&(!Mv||hh&&hh>8&&hh<=11),gx=32,vx=String.fromCharCode(gx);function V5(){Tt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Tt("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),Tt("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),Tt("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var bx=!1;function I5(n){return(n.ctrlKey||n.altKey||n.metaKey)&&!(n.ctrlKey&&n.altKey)}function F5(n){switch(n){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function z5(n,i){return n==="keydown"&&i.keyCode===px}function _x(n,i){switch(n){case"keyup":return B5.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==px;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yx(n){var i=n.detail;return typeof i=="object"&&"data"in i?i.data:null}function Nx(n){return n.locale==="ko"}var Cc=!1;function $5(n,i,o,u,d){var g,b;if(Mv?g=F5(i):Cc?_x(i,u)&&(g="onCompositionEnd"):z5(i,u)&&(g="onCompositionStart"),!g)return null;mx&&!Nx(u)&&(!Cc&&g==="onCompositionStart"?Cc=c5(d):g==="onCompositionEnd"&&Cc&&(b=lx()));var w=If(o,g);if(w.length>0){var S=new dx(g,i,null,u,d);if(n.push({event:S,listeners:w}),b)S.data=b;else{var D=yx(u);D!==null&&(S.data=D)}}}function U5(n,i){switch(n){case"compositionend":return yx(i);case"keypress":var o=i.which;return o!==gx?null:(bx=!0,vx);case"textInput":var u=i.data;return u===vx&&bx?null:u;default:return null}}function H5(n,i){if(Cc){if(n==="compositionend"||!Mv&&_x(n,i)){var o=lx();return u5(),Cc=!1,o}return null}switch(n){case"paste":return null;case"keypress":if(!I5(i)){if(i.char&&i.char.length>1)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return mx&&!Nx(i)?null:i.data;default:return null}}function W5(n,i,o,u,d){var g;if(P5?g=U5(i,u):g=H5(i,u),!g)return null;var b=If(o,"onBeforeInput");if(b.length>0){var w=new N5("onBeforeInput","beforeinput",null,u,d);n.push({event:w,listeners:b}),w.data=g}}function q5(n,i,o,u,d,g,b){$5(n,i,o,u,d),W5(n,i,o,u,d)}var K5={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 wx(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!K5[n.type]:i==="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 Y5(n){if(!Et)return!1;var i="on"+n,o=i in document;if(!o){var u=document.createElement("div");u.setAttribute(i,"return;"),o=typeof u[i]=="function"}return o}function G5(){Tt("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function xx(n,i,o,u){_w(u);var d=If(i,"onChange");if(d.length>0){var g=new Cv("onChange","change",null,o,u);n.push({event:g,listeners:d})}}var dh=null,fh=null;function J5(n){var i=n.nodeName&&n.nodeName.toLowerCase();return i==="select"||i==="input"&&n.type==="file"}function X5(n){var i=[];xx(i,fh,n,Tg(n)),xw(Z5,i)}function Z5(n){zx(n,0)}function Lf(n){var i=Oc(n);if(Lu(i))return n}function Q5(n,i){if(n==="change")return i}var Sx=!1;Et&&(Sx=Y5("input")&&(!document.documentMode||document.documentMode>9));function eO(n,i){dh=n,fh=i,dh.attachEvent("onpropertychange",kx)}function Ex(){dh&&(dh.detachEvent("onpropertychange",kx),dh=null,fh=null)}function kx(n){n.propertyName==="value"&&Lf(fh)&&X5(n)}function tO(n,i,o){n==="focusin"?(Ex(),eO(i,o)):n==="focusout"&&Ex()}function nO(n,i){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Lf(fh)}function iO(n){var i=n.nodeName;return i&&i.toLowerCase()==="input"&&(n.type==="checkbox"||n.type==="radio")}function rO(n,i){if(n==="click")return Lf(i)}function sO(n,i){if(n==="input"||n==="change")return Lf(i)}function aO(n){var i=n._wrapperState;!i||!i.controlled||n.type!=="number"||St(n,"number",n.value)}function oO(n,i,o,u,d,g,b){var w=o?Oc(o):window,S,D;if(J5(w)?S=Q5:wx(w)?Sx?S=sO:(S=nO,D=tO):iO(w)&&(S=rO),S){var M=S(i,o);if(M){xx(n,M,u,d);return}}D&&D(i,w,o),i==="focusout"&&aO(w)}function lO(){Xt("onMouseEnter",["mouseout","mouseover"]),Xt("onMouseLeave",["mouseout","mouseover"]),Xt("onPointerEnter",["pointerout","pointerover"]),Xt("onPointerLeave",["pointerout","pointerover"])}function cO(n,i,o,u,d,g,b){var w=i==="mouseover"||i==="pointerover",S=i==="mouseout"||i==="pointerout";if(w&&!CT(u)){var D=u.relatedTarget||u.fromElement;if(D&&(vl(D)||Dh(D)))return}if(!(!S&&!w)){var M;if(d.window===d)M=d;else{var W=d.ownerDocument;W?M=W.defaultView||W.parentWindow:M=window}var H,se;if(S){var oe=u.relatedTarget||u.toElement;if(H=o,se=oe?vl(oe):null,se!==null){var de=cl(se);(se!==de||se.tag!==N&&se.tag!==_)&&(se=null)}}else H=null,se=o;if(H!==se){var Ge=hx,_t="onMouseLeave",ut="onMouseEnter",cn="mouse";(i==="pointerout"||i==="pointerover")&&(Ge=fx,_t="onPointerLeave",ut="onPointerEnter",cn="pointer");var en=H==null?M:Oc(H),te=se==null?M:Oc(se),fe=new Ge(_t,cn+"leave",H,u,d);fe.target=en,fe.relatedTarget=te;var ne=null,Oe=vl(d);if(Oe===o){var et=new Ge(ut,cn+"enter",se,u,d);et.target=te,et.relatedTarget=en,ne=et}OO(n,fe,ne,H,se)}}}function uO(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var Kr=typeof Object.is=="function"?Object.is:uO;function ph(n,i){if(Kr(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),u=Object.keys(i);if(o.length!==u.length)return!1;for(var d=0;d<o.length;d++){var g=o[d];if(!kt.call(i,g)||!Kr(n[g],i[g]))return!1}return!0}function Cx(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function hO(n){for(;n;){if(n.nextSibling)return n.nextSibling;n=n.parentNode}}function Dx(n,i){for(var o=Cx(n),u=0,d=0;o;){if(o.nodeType===Da){if(d=u+o.textContent.length,u<=i&&d>=i)return{node:o,offset:i-u};u=d}o=Cx(hO(o))}}function dO(n){var i=n.ownerDocument,o=i&&i.defaultView||window,u=o.getSelection&&o.getSelection();if(!u||u.rangeCount===0)return null;var d=u.anchorNode,g=u.anchorOffset,b=u.focusNode,w=u.focusOffset;try{d.nodeType,b.nodeType}catch{return null}return fO(n,d,g,b,w)}function fO(n,i,o,u,d){var g=0,b=-1,w=-1,S=0,D=0,M=n,W=null;e:for(;;){for(var H=null;M===i&&(o===0||M.nodeType===Da)&&(b=g+o),M===u&&(d===0||M.nodeType===Da)&&(w=g+d),M.nodeType===Da&&(g+=M.nodeValue.length),(H=M.firstChild)!==null;)W=M,M=H;for(;;){if(M===n)break e;if(W===i&&++S===o&&(b=g),W===u&&++D===d&&(w=g),(H=M.nextSibling)!==null)break;M=W,W=M.parentNode}M=H}return b===-1||w===-1?null:{start:b,end:w}}function pO(n,i){var o=n.ownerDocument||document,u=o&&o.defaultView||window;if(u.getSelection){var d=u.getSelection(),g=n.textContent.length,b=Math.min(i.start,g),w=i.end===void 0?b:Math.min(i.end,g);if(!d.extend&&b>w){var S=w;w=b,b=S}var D=Dx(n,b),M=Dx(n,w);if(D&&M){if(d.rangeCount===1&&d.anchorNode===D.node&&d.anchorOffset===D.offset&&d.focusNode===M.node&&d.focusOffset===M.offset)return;var W=o.createRange();W.setStart(D.node,D.offset),d.removeAllRanges(),b>w?(d.addRange(W),d.extend(M.node,M.offset)):(W.setEnd(M.node,M.offset),d.addRange(W))}}}function Rx(n){return n&&n.nodeType===Da}function Ax(n,i){return!n||!i?!1:n===i?!0:Rx(n)?!1:Rx(i)?Ax(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1}function mO(n){return n&&n.ownerDocument&&Ax(n.ownerDocument.documentElement,n)}function gO(n){try{return typeof n.contentWindow.location.href=="string"}catch{return!1}}function Tx(){for(var n=window,i=Ea();i instanceof n.HTMLIFrameElement;){if(gO(i))n=i.contentWindow;else return i;i=Ea(n.document)}return i}function Ov(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}function vO(){var n=Tx();return{focusedElem:n,selectionRange:Ov(n)?_O(n):null}}function bO(n){var i=Tx(),o=n.focusedElem,u=n.selectionRange;if(i!==o&&mO(o)){u!==null&&Ov(o)&&yO(o,u);for(var d=[],g=o;g=g.parentNode;)g.nodeType===Or&&d.push({element:g,left:g.scrollLeft,top:g.scrollTop});typeof o.focus=="function"&&o.focus();for(var b=0;b<d.length;b++){var w=d[b];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}}function _O(n){var i;return"selectionStart"in n?i={start:n.selectionStart,end:n.selectionEnd}:i=dO(n),i||{start:0,end:0}}function yO(n,i){var o=i.start,u=i.end;u===void 0&&(u=o),"selectionStart"in n?(n.selectionStart=o,n.selectionEnd=Math.min(u,n.value.length)):pO(n,i)}var NO=Et&&"documentMode"in document&&document.documentMode<=11;function wO(){Tt("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var Dc=null,jv=null,mh=null,Lv=!1;function xO(n){if("selectionStart"in n&&Ov(n))return{start:n.selectionStart,end:n.selectionEnd};var i=n.ownerDocument&&n.ownerDocument.defaultView||window,o=i.getSelection();return{anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}}function SO(n){return n.window===n?n.document:n.nodeType===Ra?n:n.ownerDocument}function Mx(n,i,o){var u=SO(o);if(!(Lv||Dc==null||Dc!==Ea(u))){var d=xO(Dc);if(!mh||!ph(mh,d)){mh=d;var g=If(jv,"onSelect");if(g.length>0){var b=new Cv("onSelect","select",null,i,o);n.push({event:b,listeners:g}),b.target=Dc}}}}function EO(n,i,o,u,d,g,b){var w=o?Oc(o):window;switch(i){case"focusin":(wx(w)||w.contentEditable==="true")&&(Dc=w,jv=o,mh=null);break;case"focusout":Dc=null,jv=null,mh=null;break;case"mousedown":Lv=!0;break;case"contextmenu":case"mouseup":case"dragend":Lv=!1,Mx(n,u,d);break;case"selectionchange":if(NO)break;case"keydown":case"keyup":Mx(n,u,d)}}function Bf(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var Rc={animationend:Bf("Animation","AnimationEnd"),animationiteration:Bf("Animation","AnimationIteration"),animationstart:Bf("Animation","AnimationStart"),transitionend:Bf("Transition","TransitionEnd")},Bv={},Ox={};Et&&(Ox=document.createElement("div").style,"AnimationEvent"in window||(delete Rc.animationend.animation,delete Rc.animationiteration.animation,delete Rc.animationstart.animation),"TransitionEvent"in window||delete Rc.transitionend.transition);function Pf(n){if(Bv[n])return Bv[n];if(!Rc[n])return n;var i=Rc[n];for(var o in i)if(i.hasOwnProperty(o)&&o in Ox)return Bv[n]=i[o];return n}var jx=Pf("animationend"),Lx=Pf("animationiteration"),Bx=Pf("animationstart"),Px=Pf("transitionend"),Vx=new Map,Ix=["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 _o(n,i){Vx.set(n,i),Tt(i,[n])}function kO(){for(var n=0;n<Ix.length;n++){var i=Ix[n],o=i.toLowerCase(),u=i[0].toUpperCase()+i.slice(1);_o(o,"on"+u)}_o(jx,"onAnimationEnd"),_o(Lx,"onAnimationIteration"),_o(Bx,"onAnimationStart"),_o("dblclick","onDoubleClick"),_o("focusin","onFocus"),_o("focusout","onBlur"),_o(Px,"onTransitionEnd")}function CO(n,i,o,u,d,g,b){var w=Vx.get(i);if(w!==void 0){var S=Cv,D=i;switch(i){case"keypress":if(Mf(u)===0)return;case"keydown":case"keyup":S=D5;break;case"focusin":D="focus",S=Av;break;case"focusout":D="blur",S=Av;break;case"beforeblur":case"afterblur":S=Av;break;case"click":if(u.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=hx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=p5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=T5;break;case jx:case Lx:case Bx:S=v5;break;case Px:S=O5;break;case"scroll":S=h5;break;case"wheel":S=L5;break;case"copy":case"cut":case"paste":S=_5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=fx;break}var M=(g&zu)!==0;{var W=!M&&i==="scroll",H=TO(o,w,u.type,M,W);if(H.length>0){var se=new S(w,D,null,u,d);n.push({event:se,listeners:H})}}}}kO(),lO(),G5(),wO(),V5();function DO(n,i,o,u,d,g,b){CO(n,i,o,u,d,g);var w=(g&ST)===0;w&&(cO(n,i,o,u,d),oO(n,i,o,u,d),EO(n,i,o,u,d),q5(n,i,o,u,d))}var gh=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Pv=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(gh));function Fx(n,i,o){var u=n.type||"unknown-event";n.currentTarget=o,BT(u,i,void 0,n),n.currentTarget=null}function RO(n,i,o){var u;if(o)for(var d=i.length-1;d>=0;d--){var g=i[d],b=g.instance,w=g.currentTarget,S=g.listener;if(b!==u&&n.isPropagationStopped())return;Fx(n,S,w),u=b}else for(var D=0;D<i.length;D++){var M=i[D],W=M.instance,H=M.currentTarget,se=M.listener;if(W!==u&&n.isPropagationStopped())return;Fx(n,se,H),u=W}}function zx(n,i){for(var o=(i&zu)!==0,u=0;u<n.length;u++){var d=n[u],g=d.event,b=d.listeners;RO(g,b,o)}PT()}function AO(n,i,o,u,d){var g=Tg(o),b=[];DO(b,n,u,o,g,i),zx(b,i)}function zn(n,i){Pv.has(n)||c('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',n);var o=!1,u=aj(i),d=jO(n);u.has(d)||($x(i,n,Ag,o),u.add(d))}function Vv(n,i,o){Pv.has(n)&&!i&&c('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',n);var u=0;i&&(u|=zu),$x(o,n,u,i)}var Vf="_reactListening"+Math.random().toString(36).slice(2);function vh(n){if(!n[Vf]){n[Vf]=!0,pt.forEach(function(o){o!=="selectionchange"&&(Pv.has(o)||Vv(o,!1,n),Vv(o,!0,n))});var i=n.nodeType===Ra?n:n.ownerDocument;i!==null&&(i[Vf]||(i[Vf]=!0,Vv("selectionchange",!1,i)))}}function $x(n,i,o,u,d){var g=t5(n,i,o),b=void 0;jg&&(i==="touchstart"||i==="touchmove"||i==="wheel")&&(b=!0),n=n,u?b!==void 0?o5(n,i,g,b):a5(n,i,g):b!==void 0?l5(n,i,g,b):s5(n,i,g)}function Ux(n,i){return n===i||n.nodeType===di&&n.parentNode===i}function Iv(n,i,o,u,d){var g=u;if(!(i&vw)&&!(i&Ag)){var b=d;if(u!==null){var w=u;e:for(;;){if(w===null)return;var S=w.tag;if(S===y||S===x){var D=w.stateNode.containerInfo;if(Ux(D,b))break;if(S===x)for(var M=w.return;M!==null;){var W=M.tag;if(W===y||W===x){var H=M.stateNode.containerInfo;if(Ux(H,b))return}M=M.return}for(;D!==null;){var se=vl(D);if(se===null)return;var oe=se.tag;if(oe===N||oe===_){w=g=se;continue e}D=D.parentNode}}w=w.return}}}xw(function(){return AO(n,i,o,g)})}function bh(n,i,o){return{instance:n,listener:i,currentTarget:o}}function TO(n,i,o,u,d,g){for(var b=i!==null?i+"Capture":null,w=u?b:i,S=[],D=n,M=null;D!==null;){var W=D,H=W.stateNode,se=W.tag;if(se===N&&H!==null&&(M=H,w!==null)){var oe=Uu(D,w);oe!=null&&S.push(bh(D,oe,M))}if(d)break;D=D.return}return S}function If(n,i){for(var o=i+"Capture",u=[],d=n;d!==null;){var g=d,b=g.stateNode,w=g.tag;if(w===N&&b!==null){var S=b,D=Uu(d,o);D!=null&&u.unshift(bh(d,D,S));var M=Uu(d,i);M!=null&&u.push(bh(d,M,S))}d=d.return}return u}function Ac(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==N);return n||null}function MO(n,i){for(var o=n,u=i,d=0,g=o;g;g=Ac(g))d++;for(var b=0,w=u;w;w=Ac(w))b++;for(;d-b>0;)o=Ac(o),d--;for(;b-d>0;)u=Ac(u),b--;for(var S=d;S--;){if(o===u||u!==null&&o===u.alternate)return o;o=Ac(o),u=Ac(u)}return null}function Hx(n,i,o,u,d){for(var g=i._reactName,b=[],w=o;w!==null&&w!==u;){var S=w,D=S.alternate,M=S.stateNode,W=S.tag;if(D!==null&&D===u)break;if(W===N&&M!==null){var H=M;if(d){var se=Uu(w,g);se!=null&&b.unshift(bh(w,se,H))}else if(!d){var oe=Uu(w,g);oe!=null&&b.push(bh(w,oe,H))}}w=w.return}b.length!==0&&n.push({event:i,listeners:b})}function OO(n,i,o,u,d){var g=u&&d?MO(u,d):null;u!==null&&Hx(n,i,u,g,!1),d!==null&&o!==null&&Hx(n,o,d,g,!0)}function jO(n,i){return n+"__bubble"}var jr=!1,_h="dangerouslySetInnerHTML",Ff="suppressContentEditableWarning",yo="suppressHydrationWarning",Wx="autoFocus",ml="children",gl="style",zf="__html",Fv,$f,yh,qx,Uf,Kx,Yx;Fv={dialog:!0,webview:!0},$f=function(n,i){vT(n,i),bT(n,i),xT(n,i,{registrationNameDependencies:Ut,possibleRegistrationNames:Ht})},Kx=Et&&!document.documentMode,yh=function(n,i,o){if(!jr){var u=Hf(o),d=Hf(i);d!==u&&(jr=!0,c("Prop `%s` did not match. Server: %s Client: %s",n,JSON.stringify(d),JSON.stringify(u)))}},qx=function(n){if(!jr){jr=!0;var i=[];n.forEach(function(o){i.push(o)}),c("Extra attributes from the server: %s",i)}},Uf=function(n,i){i===!1?c("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.",n,n,n):c("Expected `%s` listener to be a function, instead got a value of `%s` type.",n,typeof i)},Yx=function(n,i){var o=n.namespaceURI===Ca?n.ownerDocument.createElement(n.tagName):n.ownerDocument.createElementNS(n.namespaceURI,n.tagName);return o.innerHTML=i,o.innerHTML};var LO=/\r\n?/g,BO=/\u0000|\uFFFD/g;function Hf(n){je(n);var i=typeof n=="string"?n:""+n;return i.replace(LO,`
|
|
91
|
+
`).replace(BO,"")}function Wf(n,i,o,u){var d=Hf(i),g=Hf(n);if(g!==d&&(u&&(jr||(jr=!0,c('Text content did not match. Server: "%s" Client: "%s"',g,d))),o&&X))throw new Error("Text content does not match server-rendered HTML.")}function Gx(n){return n.nodeType===Ra?n:n.ownerDocument}function PO(){}function qf(n){n.onclick=PO}function VO(n,i,o,u,d){for(var g in u)if(u.hasOwnProperty(g)){var b=u[g];if(g===gl)b&&Object.freeze(b),hw(i,b);else if(g===_h){var w=b?b[zf]:void 0;w!=null&&aw(i,w)}else if(g===ml)if(typeof b=="string"){var S=n!=="textarea"||b!=="";S&&mf(i,b)}else typeof b=="number"&&mf(i,""+b);else g===Ff||g===yo||g===Wx||(Ut.hasOwnProperty(g)?b!=null&&(typeof b!="function"&&Uf(g,b),g==="onScroll"&&zn("scroll",i)):b!=null&&Tn(i,g,b,d))}}function IO(n,i,o,u){for(var d=0;d<i.length;d+=2){var g=i[d],b=i[d+1];g===gl?hw(n,b):g===_h?aw(n,b):g===ml?mf(n,b):Tn(n,g,b,u)}}function FO(n,i,o,u){var d,g=Gx(o),b,w=u;if(w===Ca&&(w=Sg(n)),w===Ca){if(d=rl(n,i),!d&&n!==n.toLowerCase()&&c("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",n),n==="script"){var S=g.createElement("div");S.innerHTML="<script><\/script>";var D=S.firstChild;b=S.removeChild(D)}else if(typeof i.is=="string")b=g.createElement(n,{is:i.is});else if(b=g.createElement(n),n==="select"){var M=b;i.multiple?M.multiple=!0:i.size&&(M.size=i.size)}}else b=g.createElementNS(w,n);return w===Ca&&!d&&Object.prototype.toString.call(b)==="[object HTMLUnknownElement]"&&!kt.call(Fv,n)&&(Fv[n]=!0,c("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",n)),b}function zO(n,i){return Gx(i).createTextNode(n)}function $O(n,i,o,u){var d=rl(i,o);$f(i,o);var g;switch(i){case"dialog":zn("cancel",n),zn("close",n),g=o;break;case"iframe":case"object":case"embed":zn("load",n),g=o;break;case"video":case"audio":for(var b=0;b<gh.length;b++)zn(gh[b],n);g=o;break;case"source":zn("error",n),g=o;break;case"img":case"image":case"link":zn("error",n),zn("load",n),g=o;break;case"details":zn("toggle",n),g=o;break;case"input":df(n,o),g=Bu(n,o),zn("invalid",n);break;case"option":xn(n,o),g=o;break;case"select":Iu(n,o),g=Vu(n,o),zn("invalid",n);break;case"textarea":iw(n,o),g=wg(n,o),zn("invalid",n);break;default:g=o}switch(Rg(i,g),VO(i,n,u,g,d),i){case"input":nl(n),ae(n,o,!1);break;case"textarea":nl(n),sw(n);break;case"option":Bn(n,o);break;case"select":yg(n,o);break;default:typeof g.onClick=="function"&&qf(n);break}}function UO(n,i,o,u,d){$f(i,u);var g=null,b,w;switch(i){case"input":b=Bu(n,o),w=Bu(n,u),g=[];break;case"select":b=Vu(n,o),w=Vu(n,u),g=[];break;case"textarea":b=wg(n,o),w=wg(n,u),g=[];break;default:b=o,w=u,typeof b.onClick!="function"&&typeof w.onClick=="function"&&qf(n);break}Rg(i,w);var S,D,M=null;for(S in b)if(!(w.hasOwnProperty(S)||!b.hasOwnProperty(S)||b[S]==null))if(S===gl){var W=b[S];for(D in W)W.hasOwnProperty(D)&&(M||(M={}),M[D]="")}else S===_h||S===ml||S===Ff||S===yo||S===Wx||(Ut.hasOwnProperty(S)?g||(g=[]):(g=g||[]).push(S,null));for(S in w){var H=w[S],se=b!=null?b[S]:void 0;if(!(!w.hasOwnProperty(S)||H===se||H==null&&se==null))if(S===gl)if(H&&Object.freeze(H),se){for(D in se)se.hasOwnProperty(D)&&(!H||!H.hasOwnProperty(D))&&(M||(M={}),M[D]="");for(D in H)H.hasOwnProperty(D)&&se[D]!==H[D]&&(M||(M={}),M[D]=H[D])}else M||(g||(g=[]),g.push(S,M)),M=H;else if(S===_h){var oe=H?H[zf]:void 0,de=se?se[zf]:void 0;oe!=null&&de!==oe&&(g=g||[]).push(S,oe)}else S===ml?(typeof H=="string"||typeof H=="number")&&(g=g||[]).push(S,""+H):S===Ff||S===yo||(Ut.hasOwnProperty(S)?(H!=null&&(typeof H!="function"&&Uf(S,H),S==="onScroll"&&zn("scroll",n)),!g&&se!==H&&(g=[])):(g=g||[]).push(S,H))}return M&&(cT(M,w[gl]),(g=g||[]).push(gl,M)),g}function HO(n,i,o,u,d){o==="input"&&d.type==="radio"&&d.name!=null&&E(n,d);var g=rl(o,u),b=rl(o,d);switch(IO(n,i,g,b),o){case"input":F(n,d);break;case"textarea":rw(n,d);break;case"select":ff(n,d);break}}function WO(n){{var i=n.toLowerCase();return gf.hasOwnProperty(i)&&gf[i]||null}}function qO(n,i,o,u,d,g,b){var w,S;switch(w=rl(i,o),$f(i,o),i){case"dialog":zn("cancel",n),zn("close",n);break;case"iframe":case"object":case"embed":zn("load",n);break;case"video":case"audio":for(var D=0;D<gh.length;D++)zn(gh[D],n);break;case"source":zn("error",n);break;case"img":case"image":case"link":zn("error",n),zn("load",n);break;case"details":zn("toggle",n);break;case"input":df(n,o),zn("invalid",n);break;case"option":xn(n,o);break;case"select":Iu(n,o),zn("invalid",n);break;case"textarea":iw(n,o),zn("invalid",n);break}Rg(i,o);{S=new Set;for(var M=n.attributes,W=0;W<M.length;W++){var H=M[W].name.toLowerCase();switch(H){case"value":break;case"checked":break;case"selected":break;default:S.add(M[W].name)}}}var se=null;for(var oe in o)if(o.hasOwnProperty(oe)){var de=o[oe];if(oe===ml)typeof de=="string"?n.textContent!==de&&(o[yo]!==!0&&Wf(n.textContent,de,g,b),se=[ml,de]):typeof de=="number"&&n.textContent!==""+de&&(o[yo]!==!0&&Wf(n.textContent,de,g,b),se=[ml,""+de]);else if(Ut.hasOwnProperty(oe))de!=null&&(typeof de!="function"&&Uf(oe,de),oe==="onScroll"&&zn("scroll",n));else if(b&&typeof w=="boolean"){var Ge=void 0,_t=me(oe);if(o[yo]!==!0){if(!(oe===Ff||oe===yo||oe==="value"||oe==="checked"||oe==="selected")){if(oe===_h){var ut=n.innerHTML,cn=de?de[zf]:void 0;if(cn!=null){var en=Yx(n,cn);en!==ut&&yh(oe,ut,en)}}else if(oe===gl){if(S.delete(oe),Kx){var te=oT(de);Ge=n.getAttribute("style"),te!==Ge&&yh(oe,Ge,te)}}else if(w&&!Pe)S.delete(oe.toLowerCase()),Ge=Ai(n,oe,de),de!==Ge&&yh(oe,Ge,de);else if(!le(oe,_t,w)&&!Ee(oe,de,_t,w)){var fe=!1;if(_t!==null)S.delete(_t.attributeName),Ge=Un(n,oe,de,_t);else{var ne=u;if(ne===Ca&&(ne=Sg(i)),ne===Ca)S.delete(oe.toLowerCase());else{var Oe=WO(oe);Oe!==null&&Oe!==oe&&(fe=!0,S.delete(Oe)),S.delete(oe)}Ge=Ai(n,oe,de)}var et=Pe;!et&&de!==Ge&&!fe&&yh(oe,Ge,de)}}}}}switch(b&&S.size>0&&o[yo]!==!0&&qx(S),i){case"input":nl(n),ae(n,o,!0);break;case"textarea":nl(n),sw(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&qf(n);break}return se}function KO(n,i,o){var u=n.nodeValue!==i;return u}function zv(n,i){{if(jr)return;jr=!0,c("Did not expect server HTML to contain a <%s> in <%s>.",i.nodeName.toLowerCase(),n.nodeName.toLowerCase())}}function $v(n,i){{if(jr)return;jr=!0,c('Did not expect server HTML to contain the text node "%s" in <%s>.',i.nodeValue,n.nodeName.toLowerCase())}}function Uv(n,i,o){{if(jr)return;jr=!0,c("Expected server HTML to contain a matching <%s> in <%s>.",i,n.nodeName.toLowerCase())}}function Hv(n,i){{if(i===""||jr)return;jr=!0,c('Expected server HTML to contain a matching text node for "%s" in <%s>.',i,n.nodeName.toLowerCase())}}function YO(n,i,o){switch(i){case"input":he(n,o);return;case"textarea":$A(n,o);return;case"select":Ng(n,o);return}}var Nh=function(){},wh=function(){};{var GO=["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"],Jx=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],JO=Jx.concat(["button"]),XO=["dd","dt","li","option","optgroup","p","rp","rt"],Xx={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};wh=function(n,i){var o=zt({},n||Xx),u={tag:i};return Jx.indexOf(i)!==-1&&(o.aTagInScope=null,o.buttonTagInScope=null,o.nobrTagInScope=null),JO.indexOf(i)!==-1&&(o.pTagInButtonScope=null),GO.indexOf(i)!==-1&&i!=="address"&&i!=="div"&&i!=="p"&&(o.listItemTagAutoclosing=null,o.dlItemTagAutoclosing=null),o.current=u,i==="form"&&(o.formTag=u),i==="a"&&(o.aTagInScope=u),i==="button"&&(o.buttonTagInScope=u),i==="nobr"&&(o.nobrTagInScope=u),i==="p"&&(o.pTagInButtonScope=u),i==="li"&&(o.listItemTagAutoclosing=u),(i==="dd"||i==="dt")&&(o.dlItemTagAutoclosing=u),o};var ZO=function(n,i){switch(i){case"select":return n==="option"||n==="optgroup"||n==="#text";case"optgroup":return n==="option"||n==="#text";case"option":return n==="#text";case"tr":return n==="th"||n==="td"||n==="style"||n==="script"||n==="template";case"tbody":case"thead":case"tfoot":return n==="tr"||n==="style"||n==="script"||n==="template";case"colgroup":return n==="col"||n==="template";case"table":return n==="caption"||n==="colgroup"||n==="tbody"||n==="tfoot"||n==="thead"||n==="style"||n==="script"||n==="template";case"head":return n==="base"||n==="basefont"||n==="bgsound"||n==="link"||n==="meta"||n==="title"||n==="noscript"||n==="noframes"||n==="style"||n==="script"||n==="template";case"html":return n==="head"||n==="body"||n==="frameset";case"frameset":return n==="frame";case"#document":return n==="html"}switch(n){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return i!=="h1"&&i!=="h2"&&i!=="h3"&&i!=="h4"&&i!=="h5"&&i!=="h6";case"rp":case"rt":return XO.indexOf(i)===-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 i==null}return!0},QO=function(n,i){switch(n){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 i.pTagInButtonScope;case"form":return i.formTag||i.pTagInButtonScope;case"li":return i.listItemTagAutoclosing;case"dd":case"dt":return i.dlItemTagAutoclosing;case"button":return i.buttonTagInScope;case"a":return i.aTagInScope;case"nobr":return i.nobrTagInScope}return null},Zx={};Nh=function(n,i,o){o=o||Xx;var u=o.current,d=u&&u.tag;i!=null&&(n!=null&&c("validateDOMNesting: when childText is passed, childTag should be null"),n="#text");var g=ZO(n,d)?null:u,b=g?null:QO(n,o),w=g||b;if(w){var S=w.tag,D=!!g+"|"+n+"|"+S;if(!Zx[D]){Zx[D]=!0;var M=n,W="";if(n==="#text"?/\S/.test(i)?M="Text nodes":(M="Whitespace text nodes",W=" Make sure you don't have any extra whitespace between tags on each line of your source code."):M="<"+n+">",g){var H="";S==="table"&&n==="tr"&&(H+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),c("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",M,S,W,H)}else c("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",M,S)}}}}var Kf="suppressHydrationWarning",Yf="$",Gf="/$",xh="$?",Sh="$!",e2="style",Wv=null,qv=null;function t2(n){var i,o,u=n.nodeType;switch(u){case Ra:case kg:{i=u===Ra?"#document":"#fragment";var d=n.documentElement;o=d?d.namespaceURI:Eg(null,"");break}default:{var g=u===di?n.parentNode:n,b=g.namespaceURI||null;i=g.tagName,o=Eg(b,i);break}}{var w=i.toLowerCase(),S=wh(null,w);return{namespace:o,ancestorInfo:S}}}function n2(n,i,o){{var u=n,d=Eg(u.namespace,i),g=wh(u.ancestorInfo,i);return{namespace:d,ancestorInfo:g}}}function bH(n){return n}function i2(n){Wv=e5(),qv=vO();var i=null;return ax(!1),i}function r2(n){bO(qv),ax(Wv),Wv=null,qv=null}function s2(n,i,o,u,d){var g;{var b=u;if(Nh(n,null,b.ancestorInfo),typeof i.children=="string"||typeof i.children=="number"){var w=""+i.children,S=wh(b.ancestorInfo,n);Nh(null,w,S)}g=b.namespace}var D=FO(n,i,o,g);return Ch(d,D),eb(D,i),D}function a2(n,i){n.appendChild(i)}function o2(n,i,o,u,d){switch($O(n,i,o,u),i){case"button":case"input":case"select":case"textarea":return!!o.autoFocus;case"img":return!0;default:return!1}}function l2(n,i,o,u,d,g){{var b=g;if(typeof u.children!=typeof o.children&&(typeof u.children=="string"||typeof u.children=="number")){var w=""+u.children,S=wh(b.ancestorInfo,i);Nh(null,w,S)}}return UO(n,i,o,u)}function Kv(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}function c2(n,i,o,u){{var d=o;Nh(null,n,d.ancestorInfo)}var g=zO(n,i);return Ch(u,g),g}function u2(){var n=window.event;return n===void 0?La:ox(n.type)}var Yv=typeof setTimeout=="function"?setTimeout:void 0,h2=typeof clearTimeout=="function"?clearTimeout:void 0,Gv=-1,Qx=typeof Promise=="function"?Promise:void 0,d2=typeof queueMicrotask=="function"?queueMicrotask:typeof Qx<"u"?function(n){return Qx.resolve(null).then(n).catch(f2)}:Yv;function f2(n){setTimeout(function(){throw n})}function p2(n,i,o,u){switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&n.focus();return;case"img":{o.src&&(n.src=o.src);return}}}function m2(n,i,o,u,d,g){HO(n,i,o,u,d),eb(n,d)}function eS(n){mf(n,"")}function g2(n,i,o){n.nodeValue=o}function v2(n,i){n.appendChild(i)}function b2(n,i){var o;n.nodeType===di?(o=n.parentNode,o.insertBefore(i,n)):(o=n,o.appendChild(i));var u=n._reactRootContainer;u==null&&o.onclick===null&&qf(o)}function _2(n,i,o){n.insertBefore(i,o)}function y2(n,i,o){n.nodeType===di?n.parentNode.insertBefore(i,o):n.insertBefore(i,o)}function N2(n,i){n.removeChild(i)}function w2(n,i){n.nodeType===di?n.parentNode.removeChild(i):n.removeChild(i)}function Jv(n,i){var o=i,u=0;do{var d=o.nextSibling;if(n.removeChild(o),d&&d.nodeType===di){var g=d.data;if(g===Gf)if(u===0){n.removeChild(d),ah(i);return}else u--;else(g===Yf||g===xh||g===Sh)&&u++}o=d}while(o);ah(i)}function x2(n,i){n.nodeType===di?Jv(n.parentNode,i):n.nodeType===Or&&Jv(n,i),ah(n)}function S2(n){n=n;var i=n.style;typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"}function E2(n){n.nodeValue=""}function k2(n,i){n=n;var o=i[e2],u=o!=null&&o.hasOwnProperty("display")?o.display:null;n.style.display=Cg("display",u)}function C2(n,i){n.nodeValue=i}function D2(n){n.nodeType===Or?n.textContent="":n.nodeType===Ra&&n.documentElement&&n.removeChild(n.documentElement)}function R2(n,i,o){return n.nodeType!==Or||i.toLowerCase()!==n.nodeName.toLowerCase()?null:n}function A2(n,i){return i===""||n.nodeType!==Da?null:n}function T2(n){return n.nodeType!==di?null:n}function tS(n){return n.data===xh}function Xv(n){return n.data===Sh}function M2(n){var i=n.nextSibling&&n.nextSibling.dataset,o,u,d;return i&&(o=i.dgst,u=i.msg,d=i.stck),{message:u,digest:o,stack:d}}function O2(n,i){n._reactRetry=i}function Jf(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===Or||i===Da)break;if(i===di){var o=n.data;if(o===Yf||o===Sh||o===xh)break;if(o===Gf)return null}}return n}function Eh(n){return Jf(n.nextSibling)}function j2(n){return Jf(n.firstChild)}function L2(n){return Jf(n.firstChild)}function B2(n){return Jf(n.nextSibling)}function P2(n,i,o,u,d,g,b){Ch(g,n),eb(n,o);var w;{var S=d;w=S.namespace}var D=(g.mode&on)!==wt;return qO(n,i,o,w,u,D,b)}function V2(n,i,o,u){return Ch(o,n),o.mode&on,KO(n,i)}function I2(n,i){Ch(i,n)}function F2(n){for(var i=n.nextSibling,o=0;i;){if(i.nodeType===di){var u=i.data;if(u===Gf){if(o===0)return Eh(i);o--}else(u===Yf||u===Sh||u===xh)&&o++}i=i.nextSibling}return null}function nS(n){for(var i=n.previousSibling,o=0;i;){if(i.nodeType===di){var u=i.data;if(u===Yf||u===Sh||u===xh){if(o===0)return i;o--}else u===Gf&&o++}i=i.previousSibling}return null}function z2(n){ah(n)}function $2(n){ah(n)}function U2(n){return n!=="head"&&n!=="body"}function H2(n,i,o,u){var d=!0;Wf(i.nodeValue,o,u,d)}function W2(n,i,o,u,d,g){if(i[Kf]!==!0){var b=!0;Wf(u.nodeValue,d,g,b)}}function q2(n,i){i.nodeType===Or?zv(n,i):i.nodeType===di||$v(n,i)}function K2(n,i){{var o=n.parentNode;o!==null&&(i.nodeType===Or?zv(o,i):i.nodeType===di||$v(o,i))}}function Y2(n,i,o,u,d){(d||i[Kf]!==!0)&&(u.nodeType===Or?zv(o,u):u.nodeType===di||$v(o,u))}function G2(n,i,o){Uv(n,i)}function J2(n,i){Hv(n,i)}function X2(n,i,o){{var u=n.parentNode;u!==null&&Uv(u,i)}}function Z2(n,i){{var o=n.parentNode;o!==null&&Hv(o,i)}}function Q2(n,i,o,u,d,g){(g||i[Kf]!==!0)&&Uv(o,u)}function ej(n,i,o,u,d){(d||i[Kf]!==!0)&&Hv(o,u)}function tj(n){c("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",n.nodeName.toLowerCase())}function nj(n){vh(n)}var Tc=Math.random().toString(36).slice(2),Mc="__reactFiber$"+Tc,Zv="__reactProps$"+Tc,kh="__reactContainer$"+Tc,Qv="__reactEvents$"+Tc,ij="__reactListeners$"+Tc,rj="__reactHandles$"+Tc;function sj(n){delete n[Mc],delete n[Zv],delete n[Qv],delete n[ij],delete n[rj]}function Ch(n,i){i[Mc]=n}function Xf(n,i){i[kh]=n}function iS(n){n[kh]=null}function Dh(n){return!!n[kh]}function vl(n){var i=n[Mc];if(i)return i;for(var o=n.parentNode;o;){if(i=o[kh]||o[Mc],i){var u=i.alternate;if(i.child!==null||u!==null&&u.child!==null)for(var d=nS(n);d!==null;){var g=d[Mc];if(g)return g;d=nS(d)}return i}n=o,o=n.parentNode}return null}function No(n){var i=n[Mc]||n[kh];return i&&(i.tag===N||i.tag===_||i.tag===B||i.tag===y)?i:null}function Oc(n){if(n.tag===N||n.tag===_)return n.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Zf(n){return n[Zv]||null}function eb(n,i){n[Zv]=i}function aj(n){var i=n[Qv];return i===void 0&&(i=n[Qv]=new Set),i}var rS={},sS=r.ReactDebugCurrentFrame;function Qf(n){if(n){var i=n._owner,o=cs(n.type,n._source,i?i.type:null);sS.setExtraStackFrame(o)}else sS.setExtraStackFrame(null)}function Ds(n,i,o,u,d){{var g=Function.call.bind(kt);for(var b in n)if(g(n,b)){var w=void 0;try{if(typeof n[b]!="function"){var S=Error((u||"React class")+": "+o+" type `"+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[b]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}w=n[b](i,b,u,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(D){w=D}w&&!(w instanceof Error)&&(Qf(d),c("%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).",u||"React class",o,b,typeof w),Qf(null)),w instanceof Error&&!(w.message in rS)&&(rS[w.message]=!0,Qf(d),c("Failed %s type: %s",o,w.message),Qf(null))}}}var tb=[],ep;ep=[];var Ba=-1;function wo(n){return{current:n}}function ur(n,i){if(Ba<0){c("Unexpected pop.");return}i!==ep[Ba]&&c("Unexpected Fiber popped."),n.current=tb[Ba],tb[Ba]=null,ep[Ba]=null,Ba--}function hr(n,i,o){Ba++,tb[Ba]=n.current,ep[Ba]=o,n.current=i}var nb;nb={};var Yr={};Object.freeze(Yr);var Pa=wo(Yr),Ys=wo(!1),ib=Yr;function jc(n,i,o){return o&&Gs(i)?ib:Pa.current}function aS(n,i,o){{var u=n.stateNode;u.__reactInternalMemoizedUnmaskedChildContext=i,u.__reactInternalMemoizedMaskedChildContext=o}}function Lc(n,i){{var o=n.type,u=o.contextTypes;if(!u)return Yr;var d=n.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===i)return d.__reactInternalMemoizedMaskedChildContext;var g={};for(var b in u)g[b]=i[b];{var w=Rt(n)||"Unknown";Ds(u,g,"context",w)}return d&&aS(n,i,g),g}}function tp(){return Ys.current}function Gs(n){{var i=n.childContextTypes;return i!=null}}function np(n){ur(Ys,n),ur(Pa,n)}function rb(n){ur(Ys,n),ur(Pa,n)}function oS(n,i,o){{if(Pa.current!==Yr)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");hr(Pa,i,n),hr(Ys,o,n)}}function lS(n,i,o){{var u=n.stateNode,d=i.childContextTypes;if(typeof u.getChildContext!="function"){{var g=Rt(n)||"Unknown";nb[g]||(nb[g]=!0,c("%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.",g,g))}return o}var b=u.getChildContext();for(var w in b)if(!(w in d))throw new Error((Rt(n)||"Unknown")+'.getChildContext(): key "'+w+'" is not defined in childContextTypes.');{var S=Rt(n)||"Unknown";Ds(d,b,"child context",S)}return zt({},o,b)}}function ip(n){{var i=n.stateNode,o=i&&i.__reactInternalMemoizedMergedChildContext||Yr;return ib=Pa.current,hr(Pa,o,n),hr(Ys,Ys.current,n),!0}}function cS(n,i,o){{var u=n.stateNode;if(!u)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(o){var d=lS(n,i,ib);u.__reactInternalMemoizedMergedChildContext=d,ur(Ys,n),ur(Pa,n),hr(Pa,d,n),hr(Ys,o,n)}else ur(Ys,n),hr(Ys,o,n)}}function oj(n){{if(!UT(n)||n.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 i=n;do{switch(i.tag){case y:return i.stateNode.context;case m:{var o=i.type;if(Gs(o))return i.stateNode.__reactInternalMemoizedMergedChildContext;break}}i=i.return}while(i!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var xo=0,rp=1,Va=null,sb=!1,ab=!1;function uS(n){Va===null?Va=[n]:Va.push(n)}function lj(n){sb=!0,uS(n)}function hS(){sb&&So()}function So(){if(!ab&&Va!==null){ab=!0;var n=0,i=Cs();try{var o=!0,u=Va;for(Bi(Wr);n<u.length;n++){var d=u[n];do d=d(o);while(d!==null)}Va=null,sb=!1}catch(g){throw Va!==null&&(Va=Va.slice(n+1)),Lw(yf,So),g}finally{Bi(i),ab=!1}}return null}var Bc=[],Pc=0,sp=null,ap=0,ds=[],fs=0,bl=null,Ia=1,Fa="";function cj(n){return yl(),(n.flags&Cw)!==Ct}function uj(n){return yl(),ap}function hj(){var n=Fa,i=Ia,o=i&~dj(i);return o.toString(32)+n}function _l(n,i){yl(),Bc[Pc++]=ap,Bc[Pc++]=sp,sp=n,ap=i}function dS(n,i,o){yl(),ds[fs++]=Ia,ds[fs++]=Fa,ds[fs++]=bl,bl=n;var u=Ia,d=Fa,g=op(u)-1,b=u&~(1<<g),w=o+1,S=op(i)+g;if(S>30){var D=g-g%5,M=(1<<D)-1,W=(b&M).toString(32),H=b>>D,se=g-D,oe=op(i)+se,de=w<<se,Ge=de|H,_t=W+d;Ia=1<<oe|Ge,Fa=_t}else{var ut=w<<g,cn=ut|b,en=d;Ia=1<<S|cn,Fa=en}}function ob(n){yl();var i=n.return;if(i!==null){var o=1,u=0;_l(n,o),dS(n,o,u)}}function op(n){return 32-zw(n)}function dj(n){return 1<<op(n)-1}function lb(n){for(;n===sp;)sp=Bc[--Pc],Bc[Pc]=null,ap=Bc[--Pc],Bc[Pc]=null;for(;n===bl;)bl=ds[--fs],ds[fs]=null,Fa=ds[--fs],ds[fs]=null,Ia=ds[--fs],ds[fs]=null}function fj(){return yl(),bl!==null?{id:Ia,overflow:Fa}:null}function pj(n,i){yl(),ds[fs++]=Ia,ds[fs++]=Fa,ds[fs++]=bl,Ia=i.id,Fa=i.overflow,bl=n}function yl(){Ji()||c("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Gi=null,ps=null,Rs=!1,Nl=!1,Eo=null;function mj(){Rs&&c("We should not be hydrating here. This is a bug in React. Please file a bug.")}function fS(){Nl=!0}function gj(){return Nl}function vj(n){var i=n.stateNode.containerInfo;return ps=L2(i),Gi=n,Rs=!0,Eo=null,Nl=!1,!0}function bj(n,i,o){return ps=B2(i),Gi=n,Rs=!0,Eo=null,Nl=!1,o!==null&&pj(n,o),!0}function pS(n,i){switch(n.tag){case y:{q2(n.stateNode.containerInfo,i);break}case N:{var o=(n.mode&on)!==wt;Y2(n.type,n.memoizedProps,n.stateNode,i,o);break}case B:{var u=n.memoizedState;u.dehydrated!==null&&K2(u.dehydrated,i);break}}}function mS(n,i){pS(n,i);var o=wP();o.stateNode=i,o.return=n;var u=n.deletions;u===null?(n.deletions=[o],n.flags|=sl):u.push(o)}function cb(n,i){{if(Nl)return;switch(n.tag){case y:{var o=n.stateNode.containerInfo;switch(i.tag){case N:var u=i.type;i.pendingProps,G2(o,u);break;case _:var d=i.pendingProps;J2(o,d);break}break}case N:{var g=n.type,b=n.memoizedProps,w=n.stateNode;switch(i.tag){case N:{var S=i.type,D=i.pendingProps,M=(n.mode&on)!==wt;Q2(g,b,w,S,D,M);break}case _:{var W=i.pendingProps,H=(n.mode&on)!==wt;ej(g,b,w,W,H);break}}break}case B:{var se=n.memoizedState,oe=se.dehydrated;if(oe!==null)switch(i.tag){case N:var de=i.type;i.pendingProps,X2(oe,de);break;case _:var Ge=i.pendingProps;Z2(oe,Ge);break}break}default:return}}}function gS(n,i){i.flags=i.flags&~Ta|fi,cb(n,i)}function vS(n,i){switch(n.tag){case N:{var o=n.type;n.pendingProps;var u=R2(i,o);return u!==null?(n.stateNode=u,Gi=n,ps=j2(u),!0):!1}case _:{var d=n.pendingProps,g=A2(i,d);return g!==null?(n.stateNode=g,Gi=n,ps=null,!0):!1}case B:{var b=T2(i);if(b!==null){var w={dehydrated:b,treeContext:fj(),retryLane:Ur};n.memoizedState=w;var S=xP(b);return S.return=n,n.child=S,Gi=n,ps=null,!0}return!1}default:return!1}}function ub(n){return(n.mode&on)!==wt&&(n.flags&vn)===Ct}function hb(n){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function db(n){if(Rs){var i=ps;if(!i){ub(n)&&(cb(Gi,n),hb()),gS(Gi,n),Rs=!1,Gi=n;return}var o=i;if(!vS(n,i)){ub(n)&&(cb(Gi,n),hb()),i=Eh(o);var u=Gi;if(!i||!vS(n,i)){gS(Gi,n),Rs=!1,Gi=n;return}mS(u,o)}}}function _j(n,i,o){var u=n.stateNode,d=!Nl,g=P2(u,n.type,n.memoizedProps,i,o,n,d);return n.updateQueue=g,g!==null}function yj(n){var i=n.stateNode,o=n.memoizedProps,u=V2(i,o,n);if(u){var d=Gi;if(d!==null)switch(d.tag){case y:{var g=d.stateNode.containerInfo,b=(d.mode&on)!==wt;H2(g,i,o,b);break}case N:{var w=d.type,S=d.memoizedProps,D=d.stateNode,M=(d.mode&on)!==wt;W2(w,S,D,i,o,M);break}}}return u}function Nj(n){var i=n.memoizedState,o=i!==null?i.dehydrated:null;if(!o)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");I2(o,n)}function wj(n){var i=n.memoizedState,o=i!==null?i.dehydrated:null;if(!o)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 F2(o)}function bS(n){for(var i=n.return;i!==null&&i.tag!==N&&i.tag!==y&&i.tag!==B;)i=i.return;Gi=i}function lp(n){if(n!==Gi)return!1;if(!Rs)return bS(n),Rs=!0,!1;if(n.tag!==y&&(n.tag!==N||U2(n.type)&&!Kv(n.type,n.memoizedProps))){var i=ps;if(i)if(ub(n))_S(n),hb();else for(;i;)mS(n,i),i=Eh(i)}return bS(n),n.tag===B?ps=wj(n):ps=Gi?Eh(n.stateNode):null,!0}function xj(){return Rs&&ps!==null}function _S(n){for(var i=ps;i;)pS(n,i),i=Eh(i)}function Vc(){Gi=null,ps=null,Rs=!1,Nl=!1}function yS(){Eo!==null&&(fE(Eo),Eo=null)}function Ji(){return Rs}function fb(n){Eo===null?Eo=[n]:Eo.push(n)}var Sj=r.ReactCurrentBatchConfig,Ej=null;function kj(){return Sj.transition}var As={recordUnsafeLifecycleWarnings:function(n,i){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(n,i){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var Cj=function(n){for(var i=null,o=n;o!==null;)o.mode&Zn&&(i=o),o=o.return;return i},wl=function(n){var i=[];return n.forEach(function(o){i.push(o)}),i.sort().join(", ")},Rh=[],Ah=[],Th=[],Mh=[],Oh=[],jh=[],xl=new Set;As.recordUnsafeLifecycleWarnings=function(n,i){xl.has(n.type)||(typeof i.componentWillMount=="function"&&i.componentWillMount.__suppressDeprecationWarning!==!0&&Rh.push(n),n.mode&Zn&&typeof i.UNSAFE_componentWillMount=="function"&&Ah.push(n),typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Th.push(n),n.mode&Zn&&typeof i.UNSAFE_componentWillReceiveProps=="function"&&Mh.push(n),typeof i.componentWillUpdate=="function"&&i.componentWillUpdate.__suppressDeprecationWarning!==!0&&Oh.push(n),n.mode&Zn&&typeof i.UNSAFE_componentWillUpdate=="function"&&jh.push(n))},As.flushPendingUnsafeLifecycleWarnings=function(){var n=new Set;Rh.length>0&&(Rh.forEach(function(H){n.add(Rt(H)||"Component"),xl.add(H.type)}),Rh=[]);var i=new Set;Ah.length>0&&(Ah.forEach(function(H){i.add(Rt(H)||"Component"),xl.add(H.type)}),Ah=[]);var o=new Set;Th.length>0&&(Th.forEach(function(H){o.add(Rt(H)||"Component"),xl.add(H.type)}),Th=[]);var u=new Set;Mh.length>0&&(Mh.forEach(function(H){u.add(Rt(H)||"Component"),xl.add(H.type)}),Mh=[]);var d=new Set;Oh.length>0&&(Oh.forEach(function(H){d.add(Rt(H)||"Component"),xl.add(H.type)}),Oh=[]);var g=new Set;if(jh.length>0&&(jh.forEach(function(H){g.add(Rt(H)||"Component"),xl.add(H.type)}),jh=[]),i.size>0){var b=wl(i);c(`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`,b)}if(u.size>0){var w=wl(u);c(`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`,w)}if(g.size>0){var S=wl(g);c(`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`,S)}if(n.size>0){var D=wl(n);l(`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`,D)}if(o.size>0){var M=wl(o);l(`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`,M)}if(d.size>0){var W=wl(d);l(`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`,W)}};var cp=new Map,NS=new Set;As.recordLegacyContextWarning=function(n,i){var o=Cj(n);if(o===null){c("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(!NS.has(n.type)){var u=cp.get(o);(n.type.contextTypes!=null||n.type.childContextTypes!=null||i!==null&&typeof i.getChildContext=="function")&&(u===void 0&&(u=[],cp.set(o,u)),u.push(n))}},As.flushLegacyContextWarning=function(){cp.forEach(function(n,i){if(n.length!==0){var o=n[0],u=new Set;n.forEach(function(g){u.add(Rt(g)||"Component"),NS.add(g.type)});var d=wl(u);try{qe(o),c(`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`,d)}finally{Ae()}}})},As.discardPendingWarnings=function(){Rh=[],Ah=[],Th=[],Mh=[],Oh=[],jh=[],cp=new Map}}var pb,mb,gb,vb,bb,wS=function(n,i){};pb=!1,mb=!1,gb={},vb={},bb={},wS=function(n,i){if(!(n===null||typeof n!="object")&&!(!n._store||n._store.validated||n.key!=null)){if(typeof n._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.");n._store.validated=!0;var o=Rt(i)||"Component";vb[o]||(vb[o]=!0,c('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function Dj(n){return n.prototype&&n.prototype.isReactComponent}function Lh(n,i,o){var u=o.ref;if(u!==null&&typeof u!="function"&&typeof u!="object"){if((n.mode&Zn||ze)&&!(o._owner&&o._self&&o._owner.stateNode!==o._self)&&!(o._owner&&o._owner.tag!==m)&&!(typeof o.type=="function"&&!Dj(o.type))&&o._owner){var d=Rt(n)||"Component";gb[d]||(c('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',d,u),gb[d]=!0)}if(o._owner){var g=o._owner,b;if(g){var w=g;if(w.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");b=w.stateNode}if(!b)throw new Error("Missing owner for string ref "+u+". This error is likely caused by a bug in React. Please file an issue.");var S=b;Ye(u,"ref");var D=""+u;if(i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===D)return i.ref;var M=function(W){var H=S.refs;W===null?delete H[D]:H[D]=W};return M._stringRef=D,M}else{if(typeof u!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!o._owner)throw new Error("Element ref was specified as a string ("+u+`) 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 u}function up(n,i){var o=Object.prototype.toString.call(i);throw new Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}function hp(n){{var i=Rt(n)||"Component";if(bb[i])return;bb[i]=!0,c("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 xS(n){var i=n._payload,o=n._init;return o(i)}function SS(n){function i(te,fe){if(n){var ne=te.deletions;ne===null?(te.deletions=[fe],te.flags|=sl):ne.push(fe)}}function o(te,fe){if(!n)return null;for(var ne=fe;ne!==null;)i(te,ne),ne=ne.sibling;return null}function u(te,fe){for(var ne=new Map,Oe=fe;Oe!==null;)Oe.key!==null?ne.set(Oe.key,Oe):ne.set(Oe.index,Oe),Oe=Oe.sibling;return ne}function d(te,fe){var ne=Ml(te,fe);return ne.index=0,ne.sibling=null,ne}function g(te,fe,ne){if(te.index=ne,!n)return te.flags|=Cw,fe;var Oe=te.alternate;if(Oe!==null){var et=Oe.index;return et<fe?(te.flags|=fi,fe):et}else return te.flags|=fi,fe}function b(te){return n&&te.alternate===null&&(te.flags|=fi),te}function w(te,fe,ne,Oe){if(fe===null||fe.tag!==_){var et=f_(ne,te.mode,Oe);return et.return=te,et}else{var Je=d(fe,ne);return Je.return=te,Je}}function S(te,fe,ne,Oe){var et=ne.type;if(et===Mn)return M(te,fe,ne.props.children,Oe,ne.key);if(fe!==null&&(fe.elementType===et||RE(fe,ne)||typeof et=="object"&&et!==null&&et.$$typeof===Ue&&xS(et)===fe.type)){var Je=d(fe,ne.props);return Je.ref=Lh(te,fe,ne),Je.return=te,Je._debugSource=ne._source,Je._debugOwner=ne._owner,Je}var At=d_(ne,te.mode,Oe);return At.ref=Lh(te,fe,ne),At.return=te,At}function D(te,fe,ne,Oe){if(fe===null||fe.tag!==x||fe.stateNode.containerInfo!==ne.containerInfo||fe.stateNode.implementation!==ne.implementation){var et=p_(ne,te.mode,Oe);return et.return=te,et}else{var Je=d(fe,ne.children||[]);return Je.return=te,Je}}function M(te,fe,ne,Oe,et){if(fe===null||fe.tag!==k){var Je=Bo(ne,te.mode,Oe,et);return Je.return=te,Je}else{var At=d(fe,ne);return At.return=te,At}}function W(te,fe,ne){if(typeof fe=="string"&&fe!==""||typeof fe=="number"){var Oe=f_(""+fe,te.mode,ne);return Oe.return=te,Oe}if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case Hn:{var et=d_(fe,te.mode,ne);return et.ref=Lh(te,null,fe),et.return=te,et}case oi:{var Je=p_(fe,te.mode,ne);return Je.return=te,Je}case Ue:{var At=fe._payload,Vt=fe._init;return W(te,Vt(At),ne)}}if(Qt(fe)||Wi(fe)){var kn=Bo(fe,te.mode,ne,null);return kn.return=te,kn}up(te,fe)}return typeof fe=="function"&&hp(te),null}function H(te,fe,ne,Oe){var et=fe!==null?fe.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number")return et!==null?null:w(te,fe,""+ne,Oe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case Hn:return ne.key===et?S(te,fe,ne,Oe):null;case oi:return ne.key===et?D(te,fe,ne,Oe):null;case Ue:{var Je=ne._payload,At=ne._init;return H(te,fe,At(Je),Oe)}}if(Qt(ne)||Wi(ne))return et!==null?null:M(te,fe,ne,Oe,null);up(te,ne)}return typeof ne=="function"&&hp(te),null}function se(te,fe,ne,Oe,et){if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number"){var Je=te.get(ne)||null;return w(fe,Je,""+Oe,et)}if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case Hn:{var At=te.get(Oe.key===null?ne:Oe.key)||null;return S(fe,At,Oe,et)}case oi:{var Vt=te.get(Oe.key===null?ne:Oe.key)||null;return D(fe,Vt,Oe,et)}case Ue:var kn=Oe._payload,dn=Oe._init;return se(te,fe,ne,dn(kn),et)}if(Qt(Oe)||Wi(Oe)){var ii=te.get(ne)||null;return M(fe,ii,Oe,et,null)}up(fe,Oe)}return typeof Oe=="function"&&hp(fe),null}function oe(te,fe,ne){{if(typeof te!="object"||te===null)return fe;switch(te.$$typeof){case Hn:case oi:wS(te,ne);var Oe=te.key;if(typeof Oe!="string")break;if(fe===null){fe=new Set,fe.add(Oe);break}if(!fe.has(Oe)){fe.add(Oe);break}c("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.",Oe);break;case Ue:var et=te._payload,Je=te._init;oe(Je(et),fe,ne);break}}return fe}function de(te,fe,ne,Oe){for(var et=null,Je=0;Je<ne.length;Je++){var At=ne[Je];et=oe(At,et,te)}for(var Vt=null,kn=null,dn=fe,ii=0,fn=0,Qn=null;dn!==null&&fn<ne.length;fn++){dn.index>fn?(Qn=dn,dn=null):Qn=dn.sibling;var fr=H(te,dn,ne[fn],Oe);if(fr===null){dn===null&&(dn=Qn);break}n&&dn&&fr.alternate===null&&i(te,dn),ii=g(fr,ii,fn),kn===null?Vt=fr:kn.sibling=fr,kn=fr,dn=Qn}if(fn===ne.length){if(o(te,dn),Ji()){var ir=fn;_l(te,ir)}return Vt}if(dn===null){for(;fn<ne.length;fn++){var Jr=W(te,ne[fn],Oe);Jr!==null&&(ii=g(Jr,ii,fn),kn===null?Vt=Jr:kn.sibling=Jr,kn=Jr)}if(Ji()){var xr=fn;_l(te,xr)}return Vt}for(var Sr=u(te,dn);fn<ne.length;fn++){var pr=se(Sr,te,fn,ne[fn],Oe);pr!==null&&(n&&pr.alternate!==null&&Sr.delete(pr.key===null?fn:pr.key),ii=g(pr,ii,fn),kn===null?Vt=pr:kn.sibling=pr,kn=pr)}if(n&&Sr.forEach(function(iu){return i(te,iu)}),Ji()){var Ka=fn;_l(te,Ka)}return Vt}function Ge(te,fe,ne,Oe){var et=Wi(ne);if(typeof et!="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"&&ne[Symbol.toStringTag]==="Generator"&&(mb||c("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."),mb=!0),ne.entries===et&&(pb||c("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),pb=!0);var Je=et.call(ne);if(Je)for(var At=null,Vt=Je.next();!Vt.done;Vt=Je.next()){var kn=Vt.value;At=oe(kn,At,te)}}var dn=et.call(ne);if(dn==null)throw new Error("An iterable object provided no iterator.");for(var ii=null,fn=null,Qn=fe,fr=0,ir=0,Jr=null,xr=dn.next();Qn!==null&&!xr.done;ir++,xr=dn.next()){Qn.index>ir?(Jr=Qn,Qn=null):Jr=Qn.sibling;var Sr=H(te,Qn,xr.value,Oe);if(Sr===null){Qn===null&&(Qn=Jr);break}n&&Qn&&Sr.alternate===null&&i(te,Qn),fr=g(Sr,fr,ir),fn===null?ii=Sr:fn.sibling=Sr,fn=Sr,Qn=Jr}if(xr.done){if(o(te,Qn),Ji()){var pr=ir;_l(te,pr)}return ii}if(Qn===null){for(;!xr.done;ir++,xr=dn.next()){var Ka=W(te,xr.value,Oe);Ka!==null&&(fr=g(Ka,fr,ir),fn===null?ii=Ka:fn.sibling=Ka,fn=Ka)}if(Ji()){var iu=ir;_l(te,iu)}return ii}for(var fd=u(te,Qn);!xr.done;ir++,xr=dn.next()){var ia=se(fd,te,ir,xr.value,Oe);ia!==null&&(n&&ia.alternate!==null&&fd.delete(ia.key===null?ir:ia.key),fr=g(ia,fr,ir),fn===null?ii=ia:fn.sibling=ia,fn=ia)}if(n&&fd.forEach(function(eV){return i(te,eV)}),Ji()){var QP=ir;_l(te,QP)}return ii}function _t(te,fe,ne,Oe){if(fe!==null&&fe.tag===_){o(te,fe.sibling);var et=d(fe,ne);return et.return=te,et}o(te,fe);var Je=f_(ne,te.mode,Oe);return Je.return=te,Je}function ut(te,fe,ne,Oe){for(var et=ne.key,Je=fe;Je!==null;){if(Je.key===et){var At=ne.type;if(At===Mn){if(Je.tag===k){o(te,Je.sibling);var Vt=d(Je,ne.props.children);return Vt.return=te,Vt._debugSource=ne._source,Vt._debugOwner=ne._owner,Vt}}else if(Je.elementType===At||RE(Je,ne)||typeof At=="object"&&At!==null&&At.$$typeof===Ue&&xS(At)===Je.type){o(te,Je.sibling);var kn=d(Je,ne.props);return kn.ref=Lh(te,Je,ne),kn.return=te,kn._debugSource=ne._source,kn._debugOwner=ne._owner,kn}o(te,Je);break}else i(te,Je);Je=Je.sibling}if(ne.type===Mn){var dn=Bo(ne.props.children,te.mode,Oe,ne.key);return dn.return=te,dn}else{var ii=d_(ne,te.mode,Oe);return ii.ref=Lh(te,fe,ne),ii.return=te,ii}}function cn(te,fe,ne,Oe){for(var et=ne.key,Je=fe;Je!==null;){if(Je.key===et)if(Je.tag===x&&Je.stateNode.containerInfo===ne.containerInfo&&Je.stateNode.implementation===ne.implementation){o(te,Je.sibling);var At=d(Je,ne.children||[]);return At.return=te,At}else{o(te,Je);break}else i(te,Je);Je=Je.sibling}var Vt=p_(ne,te.mode,Oe);return Vt.return=te,Vt}function en(te,fe,ne,Oe){var et=typeof ne=="object"&&ne!==null&&ne.type===Mn&&ne.key===null;if(et&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case Hn:return b(ut(te,fe,ne,Oe));case oi:return b(cn(te,fe,ne,Oe));case Ue:var Je=ne._payload,At=ne._init;return en(te,fe,At(Je),Oe)}if(Qt(ne))return de(te,fe,ne,Oe);if(Wi(ne))return Ge(te,fe,ne,Oe);up(te,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"?b(_t(te,fe,""+ne,Oe)):(typeof ne=="function"&&hp(te),o(te,fe))}return en}var Ic=SS(!0),ES=SS(!1);function Rj(n,i){if(n!==null&&i.child!==n.child)throw new Error("Resuming work not yet implemented.");if(i.child!==null){var o=i.child,u=Ml(o,o.pendingProps);for(i.child=u,u.return=i;o.sibling!==null;)o=o.sibling,u=u.sibling=Ml(o,o.pendingProps),u.return=i;u.sibling=null}}function Aj(n,i){for(var o=n.child;o!==null;)vP(o,i),o=o.sibling}var _b=wo(null),yb;yb={};var dp=null,Fc=null,Nb=null,fp=!1;function pp(){dp=null,Fc=null,Nb=null,fp=!1}function kS(){fp=!0}function CS(){fp=!1}function DS(n,i,o){hr(_b,i._currentValue,n),i._currentValue=o,i._currentRenderer!==void 0&&i._currentRenderer!==null&&i._currentRenderer!==yb&&c("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),i._currentRenderer=yb}function wb(n,i){var o=_b.current;ur(_b,i),n._currentValue=o}function xb(n,i,o){for(var u=n;u!==null;){var d=u.alternate;if(Sc(u.childLanes,i)?d!==null&&!Sc(d.childLanes,i)&&(d.childLanes=Jt(d.childLanes,i)):(u.childLanes=Jt(u.childLanes,i),d!==null&&(d.childLanes=Jt(d.childLanes,i))),u===o)break;u=u.return}u!==o&&c("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 Tj(n,i,o){Mj(n,i,o)}function Mj(n,i,o){var u=n.child;for(u!==null&&(u.return=n);u!==null;){var d=void 0,g=u.dependencies;if(g!==null){d=u.child;for(var b=g.firstContext;b!==null;){if(b.context===i){if(u.tag===m){var w=Qu(o),S=za(Vn,w);S.tag=gp;var D=u.updateQueue;if(D!==null){var M=D.shared,W=M.pending;W===null?S.next=S:(S.next=W.next,W.next=S),M.pending=S}}u.lanes=Jt(u.lanes,o);var H=u.alternate;H!==null&&(H.lanes=Jt(H.lanes,o)),xb(u.return,o,n),g.lanes=Jt(g.lanes,o);break}b=b.next}}else if(u.tag===P)d=u.type===n.type?null:u.child;else if(u.tag===ve){var se=u.return;if(se===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");se.lanes=Jt(se.lanes,o);var oe=se.alternate;oe!==null&&(oe.lanes=Jt(oe.lanes,o)),xb(se,o,n),d=u.sibling}else d=u.child;if(d!==null)d.return=u;else for(d=u;d!==null;){if(d===n){d=null;break}var de=d.sibling;if(de!==null){de.return=d.return,d=de;break}d=d.return}u=d}}function zc(n,i){dp=n,Fc=null,Nb=null;var o=n.dependencies;if(o!==null){var u=o.firstContext;u!==null&&(Hr(o.lanes,i)&&Jh(),o.firstContext=null)}}function pi(n){fp&&c("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 i=n._currentValue;if(Nb!==n){var o={context:n,memoizedValue:i,next:null};if(Fc===null){if(dp===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().");Fc=o,dp.dependencies={lanes:Te,firstContext:o}}else Fc=Fc.next=o}return i}var Sl=null;function Sb(n){Sl===null?Sl=[n]:Sl.push(n)}function Oj(){if(Sl!==null){for(var n=0;n<Sl.length;n++){var i=Sl[n],o=i.interleaved;if(o!==null){i.interleaved=null;var u=o.next,d=i.pending;if(d!==null){var g=d.next;d.next=u,o.next=g}i.pending=o}}Sl=null}}function RS(n,i,o,u){var d=i.interleaved;return d===null?(o.next=o,Sb(i)):(o.next=d.next,d.next=o),i.interleaved=o,mp(n,u)}function jj(n,i,o,u){var d=i.interleaved;d===null?(o.next=o,Sb(i)):(o.next=d.next,d.next=o),i.interleaved=o}function Lj(n,i,o,u){var d=i.interleaved;return d===null?(o.next=o,Sb(i)):(o.next=d.next,d.next=o),i.interleaved=o,mp(n,u)}function Lr(n,i){return mp(n,i)}var Bj=mp;function mp(n,i){n.lanes=Jt(n.lanes,i);var o=n.alternate;o!==null&&(o.lanes=Jt(o.lanes,i)),o===null&&(n.flags&(fi|Ta))!==Ct&&EE(n);for(var u=n,d=n.return;d!==null;)d.childLanes=Jt(d.childLanes,i),o=d.alternate,o!==null?o.childLanes=Jt(o.childLanes,i):(d.flags&(fi|Ta))!==Ct&&EE(n),u=d,d=d.return;if(u.tag===y){var g=u.stateNode;return g}else return null}var AS=0,TS=1,gp=2,Eb=3,vp=!1,kb,bp;kb=!1,bp=null;function Cb(n){var i={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:Te},effects:null};n.updateQueue=i}function MS(n,i){var o=i.updateQueue,u=n.updateQueue;if(o===u){var d={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects};i.updateQueue=d}}function za(n,i){var o={eventTime:n,lane:i,tag:AS,payload:null,callback:null,next:null};return o}function ko(n,i,o){var u=n.updateQueue;if(u===null)return null;var d=u.shared;if(bp===d&&!kb&&(c("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."),kb=!0),jB()){var g=d.pending;return g===null?i.next=i:(i.next=g.next,g.next=i),d.pending=i,Bj(n,o)}else return Lj(n,d,i,o)}function _p(n,i,o){var u=i.updateQueue;if(u!==null){var d=u.shared;if(Ww(o)){var g=d.lanes;g=Kw(g,n.pendingLanes);var b=Jt(g,o);d.lanes=b,_v(n,b)}}}function Db(n,i){var o=n.updateQueue,u=n.alternate;if(u!==null){var d=u.updateQueue;if(o===d){var g=null,b=null,w=o.firstBaseUpdate;if(w!==null){var S=w;do{var D={eventTime:S.eventTime,lane:S.lane,tag:S.tag,payload:S.payload,callback:S.callback,next:null};b===null?g=b=D:(b.next=D,b=D),S=S.next}while(S!==null);b===null?g=b=i:(b.next=i,b=i)}else g=b=i;o={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:b,shared:d.shared,effects:d.effects},n.updateQueue=o;return}}var M=o.lastBaseUpdate;M===null?o.firstBaseUpdate=i:M.next=i,o.lastBaseUpdate=i}function Pj(n,i,o,u,d,g){switch(o.tag){case TS:{var b=o.payload;if(typeof b=="function"){kS();var w=b.call(g,u,d);{if(n.mode&Zn){ji(!0);try{b.call(g,u,d)}finally{ji(!1)}}CS()}return w}return b}case Eb:n.flags=n.flags&~_r|vn;case AS:{var S=o.payload,D;if(typeof S=="function"){kS(),D=S.call(g,u,d);{if(n.mode&Zn){ji(!0);try{S.call(g,u,d)}finally{ji(!1)}}CS()}}else D=S;return D==null?u:zt({},u,D)}case gp:return vp=!0,u}return u}function yp(n,i,o,u){var d=n.updateQueue;vp=!1,bp=d.shared;var g=d.firstBaseUpdate,b=d.lastBaseUpdate,w=d.shared.pending;if(w!==null){d.shared.pending=null;var S=w,D=S.next;S.next=null,b===null?g=D:b.next=D,b=S;var M=n.alternate;if(M!==null){var W=M.updateQueue,H=W.lastBaseUpdate;H!==b&&(H===null?W.firstBaseUpdate=D:H.next=D,W.lastBaseUpdate=S)}}if(g!==null){var se=d.baseState,oe=Te,de=null,Ge=null,_t=null,ut=g;do{var cn=ut.lane,en=ut.eventTime;if(Sc(u,cn)){if(_t!==null){var fe={eventTime:en,lane:Li,tag:ut.tag,payload:ut.payload,callback:ut.callback,next:null};_t=_t.next=fe}se=Pj(n,d,ut,se,i,o);var ne=ut.callback;if(ne!==null&&ut.lane!==Li){n.flags|=kw;var Oe=d.effects;Oe===null?d.effects=[ut]:Oe.push(ut)}}else{var te={eventTime:en,lane:cn,tag:ut.tag,payload:ut.payload,callback:ut.callback,next:null};_t===null?(Ge=_t=te,de=se):_t=_t.next=te,oe=Jt(oe,cn)}if(ut=ut.next,ut===null){if(w=d.shared.pending,w===null)break;var et=w,Je=et.next;et.next=null,ut=Je,d.lastBaseUpdate=et,d.shared.pending=null}}while(!0);_t===null&&(de=se),d.baseState=de,d.firstBaseUpdate=Ge,d.lastBaseUpdate=_t;var At=d.shared.interleaved;if(At!==null){var Vt=At;do oe=Jt(oe,Vt.lane),Vt=Vt.next;while(Vt!==At)}else g===null&&(d.shared.lanes=Te);ld(oe),n.lanes=oe,n.memoizedState=se}bp=null}function Vj(n,i){if(typeof n!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+n));n.call(i)}function OS(){vp=!1}function Np(){return vp}function jS(n,i,o){var u=i.effects;if(i.effects=null,u!==null)for(var d=0;d<u.length;d++){var g=u[d],b=g.callback;b!==null&&(g.callback=null,Vj(b,o))}}var Bh={},Co=wo(Bh),Ph=wo(Bh),wp=wo(Bh);function xp(n){if(n===Bh)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return n}function LS(){var n=xp(wp.current);return n}function Rb(n,i){hr(wp,i,n),hr(Ph,n,n),hr(Co,Bh,n);var o=t2(i);ur(Co,n),hr(Co,o,n)}function $c(n){ur(Co,n),ur(Ph,n),ur(wp,n)}function Ab(){var n=xp(Co.current);return n}function BS(n){xp(wp.current);var i=xp(Co.current),o=n2(i,n.type);i!==o&&(hr(Ph,n,n),hr(Co,o,n))}function Tb(n){Ph.current===n&&(ur(Co,n),ur(Ph,n))}var Ij=0,PS=1,VS=1,Vh=2,Ts=wo(Ij);function Mb(n,i){return(n&i)!==0}function Uc(n){return n&PS}function Ob(n,i){return n&PS|i}function Fj(n,i){return n|i}function Do(n,i){hr(Ts,i,n)}function Hc(n){ur(Ts,n)}function zj(n,i){var o=n.memoizedState;return o!==null?o.dehydrated!==null:(n.memoizedProps,!0)}function Sp(n){for(var i=n;i!==null;){if(i.tag===B){var o=i.memoizedState;if(o!==null){var u=o.dehydrated;if(u===null||tS(u)||Xv(u))return i}}else if(i.tag===pe&&i.memoizedProps.revealOrder!==void 0){var d=(i.flags&vn)!==Ct;if(d)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)return null;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Br=0,bi=1,Js=2,_i=4,Xi=8,jb=[];function Lb(){for(var n=0;n<jb.length;n++){var i=jb[n];i._workInProgressVersionPrimary=null}jb.length=0}function $j(n,i){var o=i._getVersion,u=o(i._source);n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[i,u]:n.mutableSourceEagerHydrationData.push(i,u)}var Ze=r.ReactCurrentDispatcher,Ih=r.ReactCurrentBatchConfig,Bb,Wc;Bb=new Set;var El=Te,En=null,yi=null,Ni=null,Ep=!1,Fh=!1,zh=0,Uj=0,Hj=25,_e=null,ms=null,Ro=-1,Pb=!1;function yn(){{var n=_e;ms===null?ms=[n]:ms.push(n)}}function He(){{var n=_e;ms!==null&&(Ro++,ms[Ro]!==n&&Wj(n))}}function qc(n){n!=null&&!Qt(n)&&c("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",_e,typeof n)}function Wj(n){{var i=Rt(En);if(!Bb.has(i)&&(Bb.add(i),ms!==null)){for(var o="",u=30,d=0;d<=Ro;d++){for(var g=ms[d],b=d===Ro?n:g,w=d+1+". "+g;w.length<u;)w+=" ";w+=b+`
|
|
131
|
+
`,o+=w}c(`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
|
+
`,i,o)}}}function dr(){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 Vb(n,i){if(Pb)return!1;if(i===null)return c("%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.",_e),!1;n.length!==i.length&&c(`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`,_e,"["+i.join(", ")+"]","["+n.join(", ")+"]");for(var o=0;o<i.length&&o<n.length;o++)if(!Kr(n[o],i[o]))return!1;return!0}function Kc(n,i,o,u,d,g){El=g,En=i,ms=n!==null?n._debugHookTypes:null,Ro=-1,Pb=n!==null&&n.type!==i.type,i.memoizedState=null,i.updateQueue=null,i.lanes=Te,n!==null&&n.memoizedState!==null?Ze.current=a1:ms!==null?Ze.current=s1:Ze.current=r1;var b=o(u,d);if(Fh){var w=0;do{if(Fh=!1,zh=0,w>=Hj)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");w+=1,Pb=!1,yi=null,Ni=null,i.updateQueue=null,Ro=-1,Ze.current=o1,b=o(u,d)}while(Fh)}Ze.current=Vp,i._debugHookTypes=ms;var S=yi!==null&&yi.next!==null;if(El=Te,En=null,yi=null,Ni=null,_e=null,ms=null,Ro=-1,n!==null&&(n.flags&Ma)!==(i.flags&Ma)&&(n.mode&on)!==wt&&c("Internal React error: Expected static flag was missing. Please notify the React team."),Ep=!1,S)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return b}function Yc(){var n=zh!==0;return zh=0,n}function IS(n,i,o){i.updateQueue=n.updateQueue,(i.mode&qs)!==wt?i.flags&=-50333701:i.flags&=-2053,n.lanes=kf(n.lanes,o)}function FS(){if(Ze.current=Vp,Ep){for(var n=En.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Ep=!1}El=Te,En=null,yi=null,Ni=null,ms=null,Ro=-1,_e=null,QS=!1,Fh=!1,zh=0}function Xs(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ni===null?En.memoizedState=Ni=n:Ni=Ni.next=n,Ni}function gs(){var n;if(yi===null){var i=En.alternate;i!==null?n=i.memoizedState:n=null}else n=yi.next;var o;if(Ni===null?o=En.memoizedState:o=Ni.next,o!==null)Ni=o,o=Ni.next,yi=n;else{if(n===null)throw new Error("Rendered more hooks than during the previous render.");yi=n;var u={memoizedState:yi.memoizedState,baseState:yi.baseState,baseQueue:yi.baseQueue,queue:yi.queue,next:null};Ni===null?En.memoizedState=Ni=u:Ni=Ni.next=u}return Ni}function zS(){return{lastEffect:null,stores:null}}function Ib(n,i){return typeof i=="function"?i(n):i}function Fb(n,i,o){var u=Xs(),d;o!==void 0?d=o(i):d=i,u.memoizedState=u.baseState=d;var g={pending:null,interleaved:null,lanes:Te,dispatch:null,lastRenderedReducer:n,lastRenderedState:d};u.queue=g;var b=g.dispatch=Gj.bind(null,En,g);return[u.memoizedState,b]}function zb(n,i,o){var u=gs(),d=u.queue;if(d===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");d.lastRenderedReducer=n;var g=yi,b=g.baseQueue,w=d.pending;if(w!==null){if(b!==null){var S=b.next,D=w.next;b.next=D,w.next=S}g.baseQueue!==b&&c("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),g.baseQueue=b=w,d.pending=null}if(b!==null){var M=b.next,W=g.baseState,H=null,se=null,oe=null,de=M;do{var Ge=de.lane;if(Sc(El,Ge)){if(oe!==null){var ut={lane:Li,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null};oe=oe.next=ut}if(de.hasEagerState)W=de.eagerState;else{var cn=de.action;W=n(W,cn)}}else{var _t={lane:Ge,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null};oe===null?(se=oe=_t,H=W):oe=oe.next=_t,En.lanes=Jt(En.lanes,Ge),ld(Ge)}de=de.next}while(de!==null&&de!==M);oe===null?H=W:oe.next=se,Kr(W,u.memoizedState)||Jh(),u.memoizedState=W,u.baseState=H,u.baseQueue=oe,d.lastRenderedState=W}var en=d.interleaved;if(en!==null){var te=en;do{var fe=te.lane;En.lanes=Jt(En.lanes,fe),ld(fe),te=te.next}while(te!==en)}else b===null&&(d.lanes=Te);var ne=d.dispatch;return[u.memoizedState,ne]}function $b(n,i,o){var u=gs(),d=u.queue;if(d===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");d.lastRenderedReducer=n;var g=d.dispatch,b=d.pending,w=u.memoizedState;if(b!==null){d.pending=null;var S=b.next,D=S;do{var M=D.action;w=n(w,M),D=D.next}while(D!==S);Kr(w,u.memoizedState)||Jh(),u.memoizedState=w,u.baseQueue===null&&(u.baseState=w),d.lastRenderedState=w}return[w,g]}function _H(n,i,o){}function yH(n,i,o){}function Ub(n,i,o){var u=En,d=Xs(),g,b=Ji();if(b){if(o===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");g=o(),Wc||g!==o()&&(c("The result of getServerSnapshot should be cached to avoid an infinite loop"),Wc=!0)}else{if(g=i(),!Wc){var w=i();Kr(g,w)||(c("The result of getSnapshot should be cached to avoid an infinite loop"),Wc=!0)}var S=im();if(S===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ef(S,El)||$S(u,i,g)}d.memoizedState=g;var D={value:g,getSnapshot:i};return d.queue=D,Ap(HS.bind(null,u,D,n),[n]),u.flags|=fo,$h(bi|Xi,US.bind(null,u,D,g,i),void 0,null),g}function kp(n,i,o){var u=En,d=gs(),g=i();if(!Wc){var b=i();Kr(g,b)||(c("The result of getSnapshot should be cached to avoid an infinite loop"),Wc=!0)}var w=d.memoizedState,S=!Kr(w,g);S&&(d.memoizedState=g,Jh());var D=d.queue;if(Hh(HS.bind(null,u,D,n),[n]),D.getSnapshot!==i||S||Ni!==null&&Ni.memoizedState.tag&bi){u.flags|=fo,$h(bi|Xi,US.bind(null,u,D,g,i),void 0,null);var M=im();if(M===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ef(M,El)||$S(u,i,g)}return g}function $S(n,i,o){n.flags|=Ig;var u={getSnapshot:i,value:o},d=En.updateQueue;if(d===null)d=zS(),En.updateQueue=d,d.stores=[u];else{var g=d.stores;g===null?d.stores=[u]:g.push(u)}}function US(n,i,o,u){i.value=o,i.getSnapshot=u,WS(i)&&qS(n)}function HS(n,i,o){var u=function(){WS(i)&&qS(n)};return o(u)}function WS(n){var i=n.getSnapshot,o=n.value;try{var u=i();return!Kr(o,u)}catch{return!0}}function qS(n){var i=Lr(n,Mt);i!==null&&Ei(i,n,Mt,Vn)}function Cp(n){var i=Xs();typeof n=="function"&&(n=n()),i.memoizedState=i.baseState=n;var o={pending:null,interleaved:null,lanes:Te,dispatch:null,lastRenderedReducer:Ib,lastRenderedState:n};i.queue=o;var u=o.dispatch=Jj.bind(null,En,o);return[i.memoizedState,u]}function Hb(n){return zb(Ib)}function Wb(n){return $b(Ib)}function $h(n,i,o,u){var d={tag:n,create:i,destroy:o,deps:u,next:null},g=En.updateQueue;if(g===null)g=zS(),En.updateQueue=g,g.lastEffect=d.next=d;else{var b=g.lastEffect;if(b===null)g.lastEffect=d.next=d;else{var w=b.next;b.next=d,d.next=w,g.lastEffect=d}}return d}function qb(n){var i=Xs();{var o={current:n};return i.memoizedState=o,o}}function Dp(n){var i=gs();return i.memoizedState}function Uh(n,i,o,u){var d=Xs(),g=u===void 0?null:u;En.flags|=n,d.memoizedState=$h(bi|i,o,void 0,g)}function Rp(n,i,o,u){var d=gs(),g=u===void 0?null:u,b=void 0;if(yi!==null){var w=yi.memoizedState;if(b=w.destroy,g!==null){var S=w.deps;if(Vb(g,S)){d.memoizedState=$h(i,o,b,g);return}}}En.flags|=n,d.memoizedState=$h(bi|i,o,b,g)}function Ap(n,i){return(En.mode&qs)!==wt?Uh(Ug|fo|$g,Xi,n,i):Uh(fo|$g,Xi,n,i)}function Hh(n,i){return Rp(fo,Xi,n,i)}function Kb(n,i){return Uh(gn,Js,n,i)}function Tp(n,i){return Rp(gn,Js,n,i)}function Yb(n,i){var o=gn;return o|=ll,(En.mode&qs)!==wt&&(o|=po),Uh(o,_i,n,i)}function Mp(n,i){return Rp(gn,_i,n,i)}function KS(n,i){if(typeof i=="function"){var o=i,u=n();return o(u),function(){o(null)}}else if(i!=null){var d=i;d.hasOwnProperty("current")||c("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(d).join(", ")+"}");var g=n();return d.current=g,function(){d.current=null}}}function Gb(n,i,o){typeof i!="function"&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",i!==null?typeof i:"null");var u=o!=null?o.concat([n]):null,d=gn;return d|=ll,(En.mode&qs)!==wt&&(d|=po),Uh(d,_i,KS.bind(null,i,n),u)}function Op(n,i,o){typeof i!="function"&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",i!==null?typeof i:"null");var u=o!=null?o.concat([n]):null;return Rp(gn,_i,KS.bind(null,i,n),u)}function qj(n,i){}var jp=qj;function Jb(n,i){var o=Xs(),u=i===void 0?null:i;return o.memoizedState=[n,u],n}function Lp(n,i){var o=gs(),u=i===void 0?null:i,d=o.memoizedState;if(d!==null&&u!==null){var g=d[1];if(Vb(u,g))return d[0]}return o.memoizedState=[n,u],n}function Xb(n,i){var o=Xs(),u=i===void 0?null:i,d=n();return o.memoizedState=[d,u],d}function Bp(n,i){var o=gs(),u=i===void 0?null:i,d=o.memoizedState;if(d!==null&&u!==null){var g=d[1];if(Vb(u,g))return d[0]}var b=n();return o.memoizedState=[b,u],b}function Zb(n){var i=Xs();return i.memoizedState=n,n}function YS(n){var i=gs(),o=yi,u=o.memoizedState;return JS(i,u,n)}function GS(n){var i=gs();if(yi===null)return i.memoizedState=n,n;var o=yi.memoizedState;return JS(i,o,n)}function JS(n,i,o){var u=!TM(El);if(u){if(!Kr(o,i)){var d=qw();En.lanes=Jt(En.lanes,d),ld(d),n.baseState=!0}return i}else return n.baseState&&(n.baseState=!1,Jh()),n.memoizedState=o,o}function Kj(n,i,o){var u=Cs();Bi(FM(u,ja)),n(!0);var d=Ih.transition;Ih.transition={};var g=Ih.transition;Ih.transition._updatedFibers=new Set;try{n(!1),i()}finally{if(Bi(u),Ih.transition=d,d===null&&g._updatedFibers){var b=g._updatedFibers.size;b>10&&l("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."),g._updatedFibers.clear()}}}function Qb(){var n=Cp(!1),i=n[0],o=n[1],u=Kj.bind(null,o),d=Xs();return d.memoizedState=u,[i,u]}function XS(){var n=Hb(),i=n[0],o=gs(),u=o.memoizedState;return[i,u]}function ZS(){var n=Wb(),i=n[0],o=gs(),u=o.memoizedState;return[i,u]}var QS=!1;function Yj(){return QS}function e0(){var n=Xs(),i=im(),o=i.identifierPrefix,u;if(Ji()){var d=hj();u=":"+o+"R"+d;var g=zh++;g>0&&(u+="H"+g.toString(32)),u+=":"}else{var b=Uj++;u=":"+o+"r"+b.toString(32)+":"}return n.memoizedState=u,u}function Pp(){var n=gs(),i=n.memoizedState;return i}function Gj(n,i,o){typeof arguments[3]=="function"&&c("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 u=jo(n),d={lane:u,action:o,hasEagerState:!1,eagerState:null,next:null};if(e1(n))t1(i,d);else{var g=RS(n,i,d,u);if(g!==null){var b=wr();Ei(g,n,u,b),n1(g,i,u)}}i1(n,u)}function Jj(n,i,o){typeof arguments[3]=="function"&&c("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 u=jo(n),d={lane:u,action:o,hasEagerState:!1,eagerState:null,next:null};if(e1(n))t1(i,d);else{var g=n.alternate;if(n.lanes===Te&&(g===null||g.lanes===Te)){var b=i.lastRenderedReducer;if(b!==null){var w;w=Ze.current,Ze.current=Ms;try{var S=i.lastRenderedState,D=b(S,o);if(d.hasEagerState=!0,d.eagerState=D,Kr(D,S)){jj(n,i,d,u);return}}catch{}finally{Ze.current=w}}}var M=RS(n,i,d,u);if(M!==null){var W=wr();Ei(M,n,u,W),n1(M,i,u)}}i1(n,u)}function e1(n){var i=n.alternate;return n===En||i!==null&&i===En}function t1(n,i){Fh=Ep=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function n1(n,i,o){if(Ww(o)){var u=i.lanes;u=Kw(u,n.pendingLanes);var d=Jt(u,o);i.lanes=d,_v(n,d)}}function i1(n,i,o){Yg(n,i)}var Vp={readContext:pi,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useInsertionEffect:dr,useLayoutEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useMutableSource:dr,useSyncExternalStore:dr,useId:dr,unstable_isNewReconciler:$},r1=null,s1=null,a1=null,o1=null,Zs=null,Ms=null,Ip=null;{var t0=function(){c("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().")},Ot=function(){c("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")};r1={readContext:function(n){return pi(n)},useCallback:function(n,i){return _e="useCallback",yn(),qc(i),Jb(n,i)},useContext:function(n){return _e="useContext",yn(),pi(n)},useEffect:function(n,i){return _e="useEffect",yn(),qc(i),Ap(n,i)},useImperativeHandle:function(n,i,o){return _e="useImperativeHandle",yn(),qc(o),Gb(n,i,o)},useInsertionEffect:function(n,i){return _e="useInsertionEffect",yn(),qc(i),Kb(n,i)},useLayoutEffect:function(n,i){return _e="useLayoutEffect",yn(),qc(i),Yb(n,i)},useMemo:function(n,i){_e="useMemo",yn(),qc(i);var o=Ze.current;Ze.current=Zs;try{return Xb(n,i)}finally{Ze.current=o}},useReducer:function(n,i,o){_e="useReducer",yn();var u=Ze.current;Ze.current=Zs;try{return Fb(n,i,o)}finally{Ze.current=u}},useRef:function(n){return _e="useRef",yn(),qb(n)},useState:function(n){_e="useState",yn();var i=Ze.current;Ze.current=Zs;try{return Cp(n)}finally{Ze.current=i}},useDebugValue:function(n,i){return _e="useDebugValue",yn(),void 0},useDeferredValue:function(n){return _e="useDeferredValue",yn(),Zb(n)},useTransition:function(){return _e="useTransition",yn(),Qb()},useMutableSource:function(n,i,o){return _e="useMutableSource",yn(),void 0},useSyncExternalStore:function(n,i,o){return _e="useSyncExternalStore",yn(),Ub(n,i,o)},useId:function(){return _e="useId",yn(),e0()},unstable_isNewReconciler:$},s1={readContext:function(n){return pi(n)},useCallback:function(n,i){return _e="useCallback",He(),Jb(n,i)},useContext:function(n){return _e="useContext",He(),pi(n)},useEffect:function(n,i){return _e="useEffect",He(),Ap(n,i)},useImperativeHandle:function(n,i,o){return _e="useImperativeHandle",He(),Gb(n,i,o)},useInsertionEffect:function(n,i){return _e="useInsertionEffect",He(),Kb(n,i)},useLayoutEffect:function(n,i){return _e="useLayoutEffect",He(),Yb(n,i)},useMemo:function(n,i){_e="useMemo",He();var o=Ze.current;Ze.current=Zs;try{return Xb(n,i)}finally{Ze.current=o}},useReducer:function(n,i,o){_e="useReducer",He();var u=Ze.current;Ze.current=Zs;try{return Fb(n,i,o)}finally{Ze.current=u}},useRef:function(n){return _e="useRef",He(),qb(n)},useState:function(n){_e="useState",He();var i=Ze.current;Ze.current=Zs;try{return Cp(n)}finally{Ze.current=i}},useDebugValue:function(n,i){return _e="useDebugValue",He(),void 0},useDeferredValue:function(n){return _e="useDeferredValue",He(),Zb(n)},useTransition:function(){return _e="useTransition",He(),Qb()},useMutableSource:function(n,i,o){return _e="useMutableSource",He(),void 0},useSyncExternalStore:function(n,i,o){return _e="useSyncExternalStore",He(),Ub(n,i,o)},useId:function(){return _e="useId",He(),e0()},unstable_isNewReconciler:$},a1={readContext:function(n){return pi(n)},useCallback:function(n,i){return _e="useCallback",He(),Lp(n,i)},useContext:function(n){return _e="useContext",He(),pi(n)},useEffect:function(n,i){return _e="useEffect",He(),Hh(n,i)},useImperativeHandle:function(n,i,o){return _e="useImperativeHandle",He(),Op(n,i,o)},useInsertionEffect:function(n,i){return _e="useInsertionEffect",He(),Tp(n,i)},useLayoutEffect:function(n,i){return _e="useLayoutEffect",He(),Mp(n,i)},useMemo:function(n,i){_e="useMemo",He();var o=Ze.current;Ze.current=Ms;try{return Bp(n,i)}finally{Ze.current=o}},useReducer:function(n,i,o){_e="useReducer",He();var u=Ze.current;Ze.current=Ms;try{return zb(n,i,o)}finally{Ze.current=u}},useRef:function(n){return _e="useRef",He(),Dp()},useState:function(n){_e="useState",He();var i=Ze.current;Ze.current=Ms;try{return Hb(n)}finally{Ze.current=i}},useDebugValue:function(n,i){return _e="useDebugValue",He(),jp()},useDeferredValue:function(n){return _e="useDeferredValue",He(),YS(n)},useTransition:function(){return _e="useTransition",He(),XS()},useMutableSource:function(n,i,o){return _e="useMutableSource",He(),void 0},useSyncExternalStore:function(n,i,o){return _e="useSyncExternalStore",He(),kp(n,i)},useId:function(){return _e="useId",He(),Pp()},unstable_isNewReconciler:$},o1={readContext:function(n){return pi(n)},useCallback:function(n,i){return _e="useCallback",He(),Lp(n,i)},useContext:function(n){return _e="useContext",He(),pi(n)},useEffect:function(n,i){return _e="useEffect",He(),Hh(n,i)},useImperativeHandle:function(n,i,o){return _e="useImperativeHandle",He(),Op(n,i,o)},useInsertionEffect:function(n,i){return _e="useInsertionEffect",He(),Tp(n,i)},useLayoutEffect:function(n,i){return _e="useLayoutEffect",He(),Mp(n,i)},useMemo:function(n,i){_e="useMemo",He();var o=Ze.current;Ze.current=Ip;try{return Bp(n,i)}finally{Ze.current=o}},useReducer:function(n,i,o){_e="useReducer",He();var u=Ze.current;Ze.current=Ip;try{return $b(n,i,o)}finally{Ze.current=u}},useRef:function(n){return _e="useRef",He(),Dp()},useState:function(n){_e="useState",He();var i=Ze.current;Ze.current=Ip;try{return Wb(n)}finally{Ze.current=i}},useDebugValue:function(n,i){return _e="useDebugValue",He(),jp()},useDeferredValue:function(n){return _e="useDeferredValue",He(),GS(n)},useTransition:function(){return _e="useTransition",He(),ZS()},useMutableSource:function(n,i,o){return _e="useMutableSource",He(),void 0},useSyncExternalStore:function(n,i,o){return _e="useSyncExternalStore",He(),kp(n,i)},useId:function(){return _e="useId",He(),Pp()},unstable_isNewReconciler:$},Zs={readContext:function(n){return t0(),pi(n)},useCallback:function(n,i){return _e="useCallback",Ot(),yn(),Jb(n,i)},useContext:function(n){return _e="useContext",Ot(),yn(),pi(n)},useEffect:function(n,i){return _e="useEffect",Ot(),yn(),Ap(n,i)},useImperativeHandle:function(n,i,o){return _e="useImperativeHandle",Ot(),yn(),Gb(n,i,o)},useInsertionEffect:function(n,i){return _e="useInsertionEffect",Ot(),yn(),Kb(n,i)},useLayoutEffect:function(n,i){return _e="useLayoutEffect",Ot(),yn(),Yb(n,i)},useMemo:function(n,i){_e="useMemo",Ot(),yn();var o=Ze.current;Ze.current=Zs;try{return Xb(n,i)}finally{Ze.current=o}},useReducer:function(n,i,o){_e="useReducer",Ot(),yn();var u=Ze.current;Ze.current=Zs;try{return Fb(n,i,o)}finally{Ze.current=u}},useRef:function(n){return _e="useRef",Ot(),yn(),qb(n)},useState:function(n){_e="useState",Ot(),yn();var i=Ze.current;Ze.current=Zs;try{return Cp(n)}finally{Ze.current=i}},useDebugValue:function(n,i){return _e="useDebugValue",Ot(),yn(),void 0},useDeferredValue:function(n){return _e="useDeferredValue",Ot(),yn(),Zb(n)},useTransition:function(){return _e="useTransition",Ot(),yn(),Qb()},useMutableSource:function(n,i,o){return _e="useMutableSource",Ot(),yn(),void 0},useSyncExternalStore:function(n,i,o){return _e="useSyncExternalStore",Ot(),yn(),Ub(n,i,o)},useId:function(){return _e="useId",Ot(),yn(),e0()},unstable_isNewReconciler:$},Ms={readContext:function(n){return t0(),pi(n)},useCallback:function(n,i){return _e="useCallback",Ot(),He(),Lp(n,i)},useContext:function(n){return _e="useContext",Ot(),He(),pi(n)},useEffect:function(n,i){return _e="useEffect",Ot(),He(),Hh(n,i)},useImperativeHandle:function(n,i,o){return _e="useImperativeHandle",Ot(),He(),Op(n,i,o)},useInsertionEffect:function(n,i){return _e="useInsertionEffect",Ot(),He(),Tp(n,i)},useLayoutEffect:function(n,i){return _e="useLayoutEffect",Ot(),He(),Mp(n,i)},useMemo:function(n,i){_e="useMemo",Ot(),He();var o=Ze.current;Ze.current=Ms;try{return Bp(n,i)}finally{Ze.current=o}},useReducer:function(n,i,o){_e="useReducer",Ot(),He();var u=Ze.current;Ze.current=Ms;try{return zb(n,i,o)}finally{Ze.current=u}},useRef:function(n){return _e="useRef",Ot(),He(),Dp()},useState:function(n){_e="useState",Ot(),He();var i=Ze.current;Ze.current=Ms;try{return Hb(n)}finally{Ze.current=i}},useDebugValue:function(n,i){return _e="useDebugValue",Ot(),He(),jp()},useDeferredValue:function(n){return _e="useDeferredValue",Ot(),He(),YS(n)},useTransition:function(){return _e="useTransition",Ot(),He(),XS()},useMutableSource:function(n,i,o){return _e="useMutableSource",Ot(),He(),void 0},useSyncExternalStore:function(n,i,o){return _e="useSyncExternalStore",Ot(),He(),kp(n,i)},useId:function(){return _e="useId",Ot(),He(),Pp()},unstable_isNewReconciler:$},Ip={readContext:function(n){return t0(),pi(n)},useCallback:function(n,i){return _e="useCallback",Ot(),He(),Lp(n,i)},useContext:function(n){return _e="useContext",Ot(),He(),pi(n)},useEffect:function(n,i){return _e="useEffect",Ot(),He(),Hh(n,i)},useImperativeHandle:function(n,i,o){return _e="useImperativeHandle",Ot(),He(),Op(n,i,o)},useInsertionEffect:function(n,i){return _e="useInsertionEffect",Ot(),He(),Tp(n,i)},useLayoutEffect:function(n,i){return _e="useLayoutEffect",Ot(),He(),Mp(n,i)},useMemo:function(n,i){_e="useMemo",Ot(),He();var o=Ze.current;Ze.current=Ms;try{return Bp(n,i)}finally{Ze.current=o}},useReducer:function(n,i,o){_e="useReducer",Ot(),He();var u=Ze.current;Ze.current=Ms;try{return $b(n,i,o)}finally{Ze.current=u}},useRef:function(n){return _e="useRef",Ot(),He(),Dp()},useState:function(n){_e="useState",Ot(),He();var i=Ze.current;Ze.current=Ms;try{return Wb(n)}finally{Ze.current=i}},useDebugValue:function(n,i){return _e="useDebugValue",Ot(),He(),jp()},useDeferredValue:function(n){return _e="useDeferredValue",Ot(),He(),GS(n)},useTransition:function(){return _e="useTransition",Ot(),He(),ZS()},useMutableSource:function(n,i,o){return _e="useMutableSource",Ot(),He(),void 0},useSyncExternalStore:function(n,i,o){return _e="useSyncExternalStore",Ot(),He(),kp(n,i)},useId:function(){return _e="useId",Ot(),He(),Pp()},unstable_isNewReconciler:$}}var Ao=t.unstable_now,l1=0,Fp=-1,Wh=-1,zp=-1,n0=!1,$p=!1;function c1(){return n0}function Xj(){$p=!0}function Zj(){n0=!1,$p=!1}function Qj(){n0=$p,$p=!1}function u1(){return l1}function h1(){l1=Ao()}function i0(n){Wh=Ao(),n.actualStartTime<0&&(n.actualStartTime=Ao())}function d1(n){Wh=-1}function Up(n,i){if(Wh>=0){var o=Ao()-Wh;n.actualDuration+=o,i&&(n.selfBaseDuration=o),Wh=-1}}function Qs(n){if(Fp>=0){var i=Ao()-Fp;Fp=-1;for(var o=n.return;o!==null;){switch(o.tag){case y:var u=o.stateNode;u.effectDuration+=i;return;case T:var d=o.stateNode;d.effectDuration+=i;return}o=o.return}}}function r0(n){if(zp>=0){var i=Ao()-zp;zp=-1;for(var o=n.return;o!==null;){switch(o.tag){case y:var u=o.stateNode;u!==null&&(u.passiveEffectDuration+=i);return;case T:var d=o.stateNode;d!==null&&(d.passiveEffectDuration+=i);return}o=o.return}}}function ea(){Fp=Ao()}function s0(){zp=Ao()}function a0(n){for(var i=n.child;i;)n.actualDuration+=i.actualDuration,i=i.sibling}function Os(n,i){if(n&&n.defaultProps){var o=zt({},i),u=n.defaultProps;for(var d in u)o[d]===void 0&&(o[d]=u[d]);return o}return i}var o0={},l0,c0,u0,h0,d0,f1,Hp,f0,p0,m0,qh;{l0=new Set,c0=new Set,u0=new Set,h0=new Set,f0=new Set,d0=new Set,p0=new Set,m0=new Set,qh=new Set;var p1=new Set;Hp=function(n,i){if(!(n===null||typeof n=="function")){var o=i+"_"+n;p1.has(o)||(p1.add(o),c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",i,n))}},f1=function(n,i){if(i===void 0){var o=hn(n)||"Component";d0.has(o)||(d0.add(o),c("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",o))}},Object.defineProperty(o0,"_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(o0)}function g0(n,i,o,u){var d=n.memoizedState,g=o(u,d);{if(n.mode&Zn){ji(!0);try{g=o(u,d)}finally{ji(!1)}}f1(i,g)}var b=g==null?d:zt({},d,g);if(n.memoizedState=b,n.lanes===Te){var w=n.updateQueue;w.baseState=b}}var v0={isMounted:HT,enqueueSetState:function(n,i,o){var u=mc(n),d=wr(),g=jo(u),b=za(d,g);b.payload=i,o!=null&&(Hp(o,"setState"),b.callback=o);var w=ko(u,b,g);w!==null&&(Ei(w,u,g,d),_p(w,u,g)),Yg(u,g)},enqueueReplaceState:function(n,i,o){var u=mc(n),d=wr(),g=jo(u),b=za(d,g);b.tag=TS,b.payload=i,o!=null&&(Hp(o,"replaceState"),b.callback=o);var w=ko(u,b,g);w!==null&&(Ei(w,u,g,d),_p(w,u,g)),Yg(u,g)},enqueueForceUpdate:function(n,i){var o=mc(n),u=wr(),d=jo(o),g=za(u,d);g.tag=gp,i!=null&&(Hp(i,"forceUpdate"),g.callback=i);var b=ko(o,g,d);b!==null&&(Ei(b,o,d,u),_p(b,o,d)),NM(o,d)}};function m1(n,i,o,u,d,g,b){var w=n.stateNode;if(typeof w.shouldComponentUpdate=="function"){var S=w.shouldComponentUpdate(u,g,b);{if(n.mode&Zn){ji(!0);try{S=w.shouldComponentUpdate(u,g,b)}finally{ji(!1)}}S===void 0&&c("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",hn(i)||"Component")}return S}return i.prototype&&i.prototype.isPureReactComponent?!ph(o,u)||!ph(d,g):!0}function eL(n,i,o){var u=n.stateNode;{var d=hn(i)||"Component",g=u.render;g||(i.prototype&&typeof i.prototype.render=="function"?c("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",d):c("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",d)),u.getInitialState&&!u.getInitialState.isReactClassApproved&&!u.state&&c("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?",d),u.getDefaultProps&&!u.getDefaultProps.isReactClassApproved&&c("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.",d),u.propTypes&&c("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",d),u.contextType&&c("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",d),i.childContextTypes&&!qh.has(i)&&(n.mode&Zn)===wt&&(qh.add(i),c(`%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`,d)),i.contextTypes&&!qh.has(i)&&(n.mode&Zn)===wt&&(qh.add(i),c(`%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`,d)),u.contextTypes&&c("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",d),i.contextType&&i.contextTypes&&!p0.has(i)&&(p0.add(i),c("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",d)),typeof u.componentShouldUpdate=="function"&&c("%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.",d),i.prototype&&i.prototype.isPureReactComponent&&typeof u.shouldComponentUpdate<"u"&&c("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",hn(i)||"A pure component"),typeof u.componentDidUnmount=="function"&&c("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",d),typeof u.componentDidReceiveProps=="function"&&c("%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().",d),typeof u.componentWillRecieveProps=="function"&&c("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",d),typeof u.UNSAFE_componentWillRecieveProps=="function"&&c("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",d);var b=u.props!==o;u.props!==void 0&&b&&c("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",d,d),u.defaultProps&&c("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",d,d),typeof u.getSnapshotBeforeUpdate=="function"&&typeof u.componentDidUpdate!="function"&&!u0.has(i)&&(u0.add(i),c("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",hn(i))),typeof u.getDerivedStateFromProps=="function"&&c("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof u.getDerivedStateFromError=="function"&&c("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof i.getSnapshotBeforeUpdate=="function"&&c("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",d);var w=u.state;w&&(typeof w!="object"||Qt(w))&&c("%s.state: must be set to an object or null",d),typeof u.getChildContext=="function"&&typeof i.childContextTypes!="object"&&c("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",d)}}function g1(n,i){i.updater=v0,n.stateNode=i,FT(i,n),i._reactInternalInstance=o0}function v1(n,i,o){var u=!1,d=Yr,g=Yr,b=i.contextType;if("contextType"in i){var w=b===null||b!==void 0&&b.$$typeof===Be&&b._context===void 0;if(!w&&!m0.has(i)){m0.add(i);var S="";b===void 0?S=" 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 b!="object"?S=" However, it is set to a "+typeof b+".":b.$$typeof===Ne?S=" Did you accidentally pass the Context.Provider instead?":b._context!==void 0?S=" Did you accidentally pass the Context.Consumer instead?":S=" However, it is set to an object with keys {"+Object.keys(b).join(", ")+"}.",c("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",hn(i)||"Component",S)}}if(typeof b=="object"&&b!==null)g=pi(b);else{d=jc(n,i,!0);var D=i.contextTypes;u=D!=null,g=u?Lc(n,d):Yr}var M=new i(o,g);if(n.mode&Zn){ji(!0);try{M=new i(o,g)}finally{ji(!1)}}var W=n.memoizedState=M.state!==null&&M.state!==void 0?M.state:null;g1(n,M);{if(typeof i.getDerivedStateFromProps=="function"&&W===null){var H=hn(i)||"Component";c0.has(H)||(c0.add(H),c("`%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.",H,M.state===null?"null":"undefined",H))}if(typeof i.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"){var se=null,oe=null,de=null;if(typeof M.componentWillMount=="function"&&M.componentWillMount.__suppressDeprecationWarning!==!0?se="componentWillMount":typeof M.UNSAFE_componentWillMount=="function"&&(se="UNSAFE_componentWillMount"),typeof M.componentWillReceiveProps=="function"&&M.componentWillReceiveProps.__suppressDeprecationWarning!==!0?oe="componentWillReceiveProps":typeof M.UNSAFE_componentWillReceiveProps=="function"&&(oe="UNSAFE_componentWillReceiveProps"),typeof M.componentWillUpdate=="function"&&M.componentWillUpdate.__suppressDeprecationWarning!==!0?de="componentWillUpdate":typeof M.UNSAFE_componentWillUpdate=="function"&&(de="UNSAFE_componentWillUpdate"),se!==null||oe!==null||de!==null){var Ge=hn(i)||"Component",_t=typeof i.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";h0.has(Ge)||(h0.add(Ge),c(`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`,Ge,_t,se!==null?`
|
|
153
|
+
`+se:"",oe!==null?`
|
|
154
|
+
`+oe:"",de!==null?`
|
|
155
|
+
`+de:""))}}}return u&&aS(n,d,g),M}function tL(n,i){var o=i.state;typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&(c("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Rt(n)||"Component"),v0.enqueueReplaceState(i,i.state,null))}function b1(n,i,o,u){var d=i.state;if(typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,u),i.state!==d){{var g=Rt(n)||"Component";l0.has(g)||(l0.add(g),c("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",g))}v0.enqueueReplaceState(i,i.state,null)}}function b0(n,i,o,u){eL(n,i,o);var d=n.stateNode;d.props=o,d.state=n.memoizedState,d.refs={},Cb(n);var g=i.contextType;if(typeof g=="object"&&g!==null)d.context=pi(g);else{var b=jc(n,i,!0);d.context=Lc(n,b)}{if(d.state===o){var w=hn(i)||"Component";f0.has(w)||(f0.add(w),c("%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.",w))}n.mode&Zn&&As.recordLegacyContextWarning(n,d),As.recordUnsafeLifecycleWarnings(n,d)}d.state=n.memoizedState;var S=i.getDerivedStateFromProps;if(typeof S=="function"&&(g0(n,i,S,o),d.state=n.memoizedState),typeof i.getDerivedStateFromProps!="function"&&typeof d.getSnapshotBeforeUpdate!="function"&&(typeof d.UNSAFE_componentWillMount=="function"||typeof d.componentWillMount=="function")&&(tL(n,d),yp(n,o,d,u),d.state=n.memoizedState),typeof d.componentDidMount=="function"){var D=gn;D|=ll,(n.mode&qs)!==wt&&(D|=po),n.flags|=D}}function nL(n,i,o,u){var d=n.stateNode,g=n.memoizedProps;d.props=g;var b=d.context,w=i.contextType,S=Yr;if(typeof w=="object"&&w!==null)S=pi(w);else{var D=jc(n,i,!0);S=Lc(n,D)}var M=i.getDerivedStateFromProps,W=typeof M=="function"||typeof d.getSnapshotBeforeUpdate=="function";!W&&(typeof d.UNSAFE_componentWillReceiveProps=="function"||typeof d.componentWillReceiveProps=="function")&&(g!==o||b!==S)&&b1(n,d,o,S),OS();var H=n.memoizedState,se=d.state=H;if(yp(n,o,d,u),se=n.memoizedState,g===o&&H===se&&!tp()&&!Np()){if(typeof d.componentDidMount=="function"){var oe=gn;oe|=ll,(n.mode&qs)!==wt&&(oe|=po),n.flags|=oe}return!1}typeof M=="function"&&(g0(n,i,M,o),se=n.memoizedState);var de=Np()||m1(n,i,g,o,H,se,S);if(de){if(!W&&(typeof d.UNSAFE_componentWillMount=="function"||typeof d.componentWillMount=="function")&&(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"){var Ge=gn;Ge|=ll,(n.mode&qs)!==wt&&(Ge|=po),n.flags|=Ge}}else{if(typeof d.componentDidMount=="function"){var _t=gn;_t|=ll,(n.mode&qs)!==wt&&(_t|=po),n.flags|=_t}n.memoizedProps=o,n.memoizedState=se}return d.props=o,d.state=se,d.context=S,de}function iL(n,i,o,u,d){var g=i.stateNode;MS(n,i);var b=i.memoizedProps,w=i.type===i.elementType?b:Os(i.type,b);g.props=w;var S=i.pendingProps,D=g.context,M=o.contextType,W=Yr;if(typeof M=="object"&&M!==null)W=pi(M);else{var H=jc(i,o,!0);W=Lc(i,H)}var se=o.getDerivedStateFromProps,oe=typeof se=="function"||typeof g.getSnapshotBeforeUpdate=="function";!oe&&(typeof g.UNSAFE_componentWillReceiveProps=="function"||typeof g.componentWillReceiveProps=="function")&&(b!==S||D!==W)&&b1(i,g,u,W),OS();var de=i.memoizedState,Ge=g.state=de;if(yp(i,u,g,d),Ge=i.memoizedState,b===S&&de===Ge&&!tp()&&!Np()&&!xe)return typeof g.componentDidUpdate=="function"&&(b!==n.memoizedProps||de!==n.memoizedState)&&(i.flags|=gn),typeof g.getSnapshotBeforeUpdate=="function"&&(b!==n.memoizedProps||de!==n.memoizedState)&&(i.flags|=vc),!1;typeof se=="function"&&(g0(i,o,se,u),Ge=i.memoizedState);var _t=Np()||m1(i,o,w,u,de,Ge,W)||xe;return _t?(!oe&&(typeof g.UNSAFE_componentWillUpdate=="function"||typeof g.componentWillUpdate=="function")&&(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,Ge,W),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,Ge,W)),typeof g.componentDidUpdate=="function"&&(i.flags|=gn),typeof g.getSnapshotBeforeUpdate=="function"&&(i.flags|=vc)):(typeof g.componentDidUpdate=="function"&&(b!==n.memoizedProps||de!==n.memoizedState)&&(i.flags|=gn),typeof g.getSnapshotBeforeUpdate=="function"&&(b!==n.memoizedProps||de!==n.memoizedState)&&(i.flags|=vc),i.memoizedProps=u,i.memoizedState=Ge),g.props=u,g.state=Ge,g.context=W,_t}function kl(n,i){return{value:n,source:i,stack:Hs(i),digest:null}}function _0(n,i,o){return{value:n,source:null,stack:o??null,digest:i??null}}function rL(n,i){return!0}function y0(n,i){try{var o=rL(n,i);if(o===!1)return;var u=i.value,d=i.source,g=i.stack,b=g!==null?g:"";if(u!=null&&u._suppressLogging){if(n.tag===m)return;console.error(u)}var w=d?Rt(d):null,S=w?"The above error occurred in the <"+w+"> component:":"The above error occurred in one of your React components:",D;if(n.tag===y)D=`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 M=Rt(n)||"Anonymous";D="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+M+".")}var W=S+`
|
|
157
|
+
`+b+`
|
|
158
|
+
|
|
159
|
+
`+(""+D);console.error(W)}catch(H){setTimeout(function(){throw H})}}var sL=typeof WeakMap=="function"?WeakMap:Map;function _1(n,i,o){var u=za(Vn,o);u.tag=Eb,u.payload={element:null};var d=i.value;return u.callback=function(){XB(d),y0(n,i)},u}function N0(n,i,o){var u=za(Vn,o);u.tag=Eb;var d=n.type.getDerivedStateFromError;if(typeof d=="function"){var g=i.value;u.payload=function(){return d(g)},u.callback=function(){AE(n),y0(n,i)}}var b=n.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(u.callback=function(){AE(n),y0(n,i),typeof d!="function"&&GB(this);var S=i.value,D=i.stack;this.componentDidCatch(S,{componentStack:D!==null?D:""}),typeof d!="function"&&(Hr(n.lanes,Mt)||c("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Rt(n)||"Unknown"))}),u}function y1(n,i,o){var u=n.pingCache,d;if(u===null?(u=n.pingCache=new sL,d=new Set,u.set(i,d)):(d=u.get(i),d===void 0&&(d=new Set,u.set(i,d))),!d.has(o)){d.add(o);var g=ZB.bind(null,n,i,o);ks&&cd(n,o),i.then(g,g)}}function aL(n,i,o,u){var d=n.updateQueue;if(d===null){var g=new Set;g.add(o),n.updateQueue=g}else d.add(o)}function oL(n,i){var o=n.tag;if((n.mode&on)===wt&&(o===p||o===O||o===ce)){var u=n.alternate;u?(n.updateQueue=u.updateQueue,n.memoizedState=u.memoizedState,n.lanes=u.lanes):(n.updateQueue=null,n.memoizedState=null)}}function N1(n){var i=n;do{if(i.tag===B&&zj(i))return i;i=i.return}while(i!==null);return null}function w1(n,i,o,u,d){if((n.mode&on)===wt){if(n===i)n.flags|=_r;else{if(n.flags|=vn,o.flags|=Fg,o.flags&=-52805,o.tag===m){var g=o.alternate;if(g===null)o.tag=Z;else{var b=za(Vn,Mt);b.tag=gp,ko(o,b,Mt)}}o.lanes=Jt(o.lanes,Mt)}return n}return n.flags|=_r,n.lanes=d,n}function lL(n,i,o,u,d){if(o.flags|=_f,ks&&cd(n,d),u!==null&&typeof u=="object"&&typeof u.then=="function"){var g=u;oL(o),Ji()&&o.mode&on&&fS();var b=N1(i);if(b!==null){b.flags&=~Aa,w1(b,i,o,n,d),b.mode&on&&y1(n,g,d),aL(b,n,g);return}else{if(!AM(d)){y1(n,g,d),e_();return}var w=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.");u=w}}else if(Ji()&&o.mode&on){fS();var S=N1(i);if(S!==null){(S.flags&_r)===Ct&&(S.flags|=Aa),w1(S,i,o,n,d),fb(kl(u,o));return}}u=kl(u,o),zB(u);var D=i;do{switch(D.tag){case y:{var M=u;D.flags|=_r;var W=Qu(d);D.lanes=Jt(D.lanes,W);var H=_1(D,M,W);Db(D,H);return}case m:var se=u,oe=D.type,de=D.stateNode;if((D.flags&vn)===Ct&&(typeof oe.getDerivedStateFromError=="function"||de!==null&&typeof de.componentDidCatch=="function"&&!NE(de))){D.flags|=_r;var Ge=Qu(d);D.lanes=Jt(D.lanes,Ge);var _t=N0(D,se,Ge);Db(D,_t);return}break}D=D.return}while(D!==null)}function cL(){return null}var Kh=r.ReactCurrentOwner,js=!1,w0,Yh,x0,S0,E0,Cl,k0,Wp,Gh;w0={},Yh={},x0={},S0={},E0={},Cl=!1,k0={},Wp={},Gh={};function yr(n,i,o,u){n===null?i.child=ES(i,null,o,u):i.child=Ic(i,n.child,o,u)}function uL(n,i,o,u){i.child=Ic(i,n.child,null,u),i.child=Ic(i,null,o,u)}function x1(n,i,o,u,d){if(i.type!==i.elementType){var g=o.propTypes;g&&Ds(g,u,"prop",hn(o))}var b=o.render,w=i.ref,S,D;zc(i,d),Ku(i);{if(Kh.current=i,Bt(!0),S=Kc(n,i,b,u,w,d),D=Yc(),i.mode&Zn){ji(!0);try{S=Kc(n,i,b,u,w,d),D=Yc()}finally{ji(!1)}}Bt(!1)}return yc(),n!==null&&!js?(IS(n,i,d),$a(n,i,d)):(Ji()&&D&&ob(i),i.flags|=gc,yr(n,i,S,d),i.child)}function S1(n,i,o,u,d){if(n===null){var g=o.type;if(mP(g)&&o.compare===null&&o.defaultProps===void 0){var b=g;return b=nu(g),i.tag=ce,i.type=b,R0(i,g),E1(n,i,b,u,d)}{var w=g.propTypes;if(w&&Ds(w,u,"prop",hn(g)),o.defaultProps!==void 0){var S=hn(g)||"Unknown";Gh[S]||(c("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",S),Gh[S]=!0)}}var D=h_(o.type,null,u,i,i.mode,d);return D.ref=i.ref,D.return=i,i.child=D,D}{var M=o.type,W=M.propTypes;W&&Ds(W,u,"prop",hn(M))}var H=n.child,se=L0(n,d);if(!se){var oe=H.memoizedProps,de=o.compare;if(de=de!==null?de:ph,de(oe,u)&&n.ref===i.ref)return $a(n,i,d)}i.flags|=gc;var Ge=Ml(H,u);return Ge.ref=i.ref,Ge.return=i,i.child=Ge,Ge}function E1(n,i,o,u,d){if(i.type!==i.elementType){var g=i.elementType;if(g.$$typeof===Ue){var b=g,w=b._payload,S=b._init;try{g=S(w)}catch{g=null}var D=g&&g.propTypes;D&&Ds(D,u,"prop",hn(g))}}if(n!==null){var M=n.memoizedProps;if(ph(M,u)&&n.ref===i.ref&&i.type===n.type)if(js=!1,i.pendingProps=u=M,L0(n,d))(n.flags&Fg)!==Ct&&(js=!0);else return i.lanes=n.lanes,$a(n,i,d)}return C0(n,i,o,u,d)}function k1(n,i,o){var u=i.pendingProps,d=u.children,g=n!==null?n.memoizedState:null;if(u.mode==="hidden"||Me)if((i.mode&on)===wt){var b={baseLanes:Te,cachePool:null,transitions:null};i.memoizedState=b,rm(i,o)}else if(Hr(o,Ur)){var W={baseLanes:Te,cachePool:null,transitions:null};i.memoizedState=W;var H=g!==null?g.baseLanes:o;rm(i,H)}else{var w=null,S;if(g!==null){var D=g.baseLanes;S=Jt(D,o)}else S=o;i.lanes=i.childLanes=Ur;var M={baseLanes:S,cachePool:w,transitions:null};return i.memoizedState=M,i.updateQueue=null,rm(i,S),null}else{var se;g!==null?(se=Jt(g.baseLanes,o),i.memoizedState=null):se=o,rm(i,se)}return yr(n,i,d,o),i.child}function hL(n,i,o){var u=i.pendingProps;return yr(n,i,u,o),i.child}function dL(n,i,o){var u=i.pendingProps.children;return yr(n,i,u,o),i.child}function fL(n,i,o){{i.flags|=gn;{var u=i.stateNode;u.effectDuration=0,u.passiveEffectDuration=0}}var d=i.pendingProps,g=d.children;return yr(n,i,g,o),i.child}function C1(n,i){var o=i.ref;(n===null&&o!==null||n!==null&&n.ref!==o)&&(i.flags|=al,i.flags|=zg)}function C0(n,i,o,u,d){if(i.type!==i.elementType){var g=o.propTypes;g&&Ds(g,u,"prop",hn(o))}var b;{var w=jc(i,o,!0);b=Lc(i,w)}var S,D;zc(i,d),Ku(i);{if(Kh.current=i,Bt(!0),S=Kc(n,i,o,u,b,d),D=Yc(),i.mode&Zn){ji(!0);try{S=Kc(n,i,o,u,b,d),D=Yc()}finally{ji(!1)}}Bt(!1)}return yc(),n!==null&&!js?(IS(n,i,d),$a(n,i,d)):(Ji()&&D&&ob(i),i.flags|=gc,yr(n,i,S,d),i.child)}function D1(n,i,o,u,d){{switch(AP(i)){case!1:{var g=i.stateNode,b=i.type,w=new b(i.memoizedProps,g.context),S=w.state;g.updater.enqueueSetState(g,S,null);break}case!0:{i.flags|=vn,i.flags|=_r;var D=new Error("Simulated error coming from DevTools"),M=Qu(d);i.lanes=Jt(i.lanes,M);var W=N0(i,kl(D,i),M);Db(i,W);break}}if(i.type!==i.elementType){var H=o.propTypes;H&&Ds(H,u,"prop",hn(o))}}var se;Gs(o)?(se=!0,ip(i)):se=!1,zc(i,d);var oe=i.stateNode,de;oe===null?(Kp(n,i),v1(i,o,u),b0(i,o,u,d),de=!0):n===null?de=nL(i,o,u,d):de=iL(n,i,o,u,d);var Ge=D0(n,i,o,de,se,d);{var _t=i.stateNode;de&&_t.props!==u&&(Cl||c("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Rt(i)||"a component"),Cl=!0)}return Ge}function D0(n,i,o,u,d,g){C1(n,i);var b=(i.flags&vn)!==Ct;if(!u&&!b)return d&&cS(i,o,!1),$a(n,i,g);var w=i.stateNode;Kh.current=i;var S;if(b&&typeof o.getDerivedStateFromError!="function")S=null,d1();else{Ku(i);{if(Bt(!0),S=w.render(),i.mode&Zn){ji(!0);try{w.render()}finally{ji(!1)}}Bt(!1)}yc()}return i.flags|=gc,n!==null&&b?uL(n,i,S,g):yr(n,i,S,g),i.memoizedState=w.state,d&&cS(i,o,!0),i.child}function R1(n){var i=n.stateNode;i.pendingContext?oS(n,i.pendingContext,i.pendingContext!==i.context):i.context&&oS(n,i.context,!1),Rb(n,i.containerInfo)}function pL(n,i,o){if(R1(i),n===null)throw new Error("Should have a current fiber. This is a bug in React.");var u=i.pendingProps,d=i.memoizedState,g=d.element;MS(n,i),yp(i,u,null,o);var b=i.memoizedState;i.stateNode;var w=b.element;if(d.isDehydrated){var S={element:w,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},D=i.updateQueue;if(D.baseState=S,i.memoizedState=S,i.flags&Aa){var M=kl(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."),i);return A1(n,i,w,o,M)}else if(w!==g){var W=kl(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),i);return A1(n,i,w,o,W)}else{vj(i);var H=ES(i,null,w,o);i.child=H;for(var se=H;se;)se.flags=se.flags&~fi|Ta,se=se.sibling}}else{if(Vc(),w===g)return $a(n,i,o);yr(n,i,w,o)}return i.child}function A1(n,i,o,u,d){return Vc(),fb(d),i.flags|=Aa,yr(n,i,o,u),i.child}function mL(n,i,o){BS(i),n===null&&db(i);var u=i.type,d=i.pendingProps,g=n!==null?n.memoizedProps:null,b=d.children,w=Kv(u,d);return w?b=null:g!==null&&Kv(u,g)&&(i.flags|=Wu),C1(n,i),yr(n,i,b,o),i.child}function gL(n,i){return n===null&&db(i),null}function vL(n,i,o,u){Kp(n,i);var d=i.pendingProps,g=o,b=g._payload,w=g._init,S=w(b);i.type=S;var D=i.tag=gP(S),M=Os(S,d),W;switch(D){case p:return R0(i,S),i.type=S=nu(S),W=C0(null,i,S,M,u),W;case m:return i.type=S=s_(S),W=D1(null,i,S,M,u),W;case O:return i.type=S=a_(S),W=x1(null,i,S,M,u),W;case U:{if(i.type!==i.elementType){var H=S.propTypes;H&&Ds(H,M,"prop",hn(S))}return W=S1(null,i,S,Os(S.type,M),u),W}}var se="";throw S!==null&&typeof S=="object"&&S.$$typeof===Ue&&(se=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+S+". "+("Lazy element type must resolve to a class or function."+se))}function bL(n,i,o,u,d){Kp(n,i),i.tag=m;var g;return Gs(o)?(g=!0,ip(i)):g=!1,zc(i,d),v1(i,o,u),b0(i,o,u,d),D0(null,i,o,!0,g,d)}function _L(n,i,o,u){Kp(n,i);var d=i.pendingProps,g;{var b=jc(i,o,!1);g=Lc(i,b)}zc(i,u);var w,S;Ku(i);{if(o.prototype&&typeof o.prototype.render=="function"){var D=hn(o)||"Unknown";w0[D]||(c("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.",D,D),w0[D]=!0)}i.mode&Zn&&As.recordLegacyContextWarning(i,null),Bt(!0),Kh.current=i,w=Kc(null,i,o,d,g,u),S=Yc(),Bt(!1)}if(yc(),i.flags|=gc,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0){var M=hn(o)||"Unknown";Yh[M]||(c("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.",M,M,M),Yh[M]=!0)}if(typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0){{var W=hn(o)||"Unknown";Yh[W]||(c("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.",W,W,W),Yh[W]=!0)}i.tag=m,i.memoizedState=null,i.updateQueue=null;var H=!1;return Gs(o)?(H=!0,ip(i)):H=!1,i.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,Cb(i),g1(i,w),b0(i,o,d,u),D0(null,i,o,!0,H,u)}else{if(i.tag=p,i.mode&Zn){ji(!0);try{w=Kc(null,i,o,d,g,u),S=Yc()}finally{ji(!1)}}return Ji()&&S&&ob(i),yr(null,i,w,u),R0(i,o),i.child}}function R0(n,i){{if(i&&i.childContextTypes&&c("%s(...): childContextTypes cannot be defined on a function component.",i.displayName||i.name||"Component"),n.ref!==null){var o="",u=q();u&&(o+=`
|
|
160
|
+
|
|
161
|
+
Check the render method of \``+u+"`.");var d=u||"",g=n._debugSource;g&&(d=g.fileName+":"+g.lineNumber),E0[d]||(E0[d]=!0,c("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",o))}if(i.defaultProps!==void 0){var b=hn(i)||"Unknown";Gh[b]||(c("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",b),Gh[b]=!0)}if(typeof i.getDerivedStateFromProps=="function"){var w=hn(i)||"Unknown";S0[w]||(c("%s: Function components do not support getDerivedStateFromProps.",w),S0[w]=!0)}if(typeof i.contextType=="object"&&i.contextType!==null){var S=hn(i)||"Unknown";x0[S]||(c("%s: Function components do not support contextType.",S),x0[S]=!0)}}}var A0={dehydrated:null,treeContext:null,retryLane:Li};function T0(n){return{baseLanes:n,cachePool:cL(),transitions:null}}function yL(n,i){var o=null;return{baseLanes:Jt(n.baseLanes,i),cachePool:o,transitions:n.transitions}}function NL(n,i,o,u){if(i!==null){var d=i.memoizedState;if(d===null)return!1}return Mb(n,Vh)}function wL(n,i){return kf(n.childLanes,i)}function T1(n,i,o){var u=i.pendingProps;TP(i)&&(i.flags|=vn);var d=Ts.current,g=!1,b=(i.flags&vn)!==Ct;if(b||NL(d,n)?(g=!0,i.flags&=~vn):(n===null||n.memoizedState!==null)&&(d=Fj(d,VS)),d=Uc(d),Do(i,d),n===null){db(i);var w=i.memoizedState;if(w!==null){var S=w.dehydrated;if(S!==null)return CL(i,S)}var D=u.children,M=u.fallback;if(g){var W=xL(i,D,M,o),H=i.child;return H.memoizedState=T0(o),i.memoizedState=A0,W}else return M0(i,D)}else{var se=n.memoizedState;if(se!==null){var oe=se.dehydrated;if(oe!==null)return DL(n,i,b,u,oe,se,o)}if(g){var de=u.fallback,Ge=u.children,_t=EL(n,i,Ge,de,o),ut=i.child,cn=n.child.memoizedState;return ut.memoizedState=cn===null?T0(o):yL(cn,o),ut.childLanes=wL(n,o),i.memoizedState=A0,_t}else{var en=u.children,te=SL(n,i,en,o);return i.memoizedState=null,te}}}function M0(n,i,o){var u=n.mode,d={mode:"visible",children:i},g=O0(d,u);return g.return=n,n.child=g,g}function xL(n,i,o,u){var d=n.mode,g=n.child,b={mode:"hidden",children:i},w,S;return(d&on)===wt&&g!==null?(w=g,w.childLanes=Te,w.pendingProps=b,n.mode&Sn&&(w.actualDuration=0,w.actualStartTime=-1,w.selfBaseDuration=0,w.treeBaseDuration=0),S=Bo(o,d,u,null)):(w=O0(b,d),S=Bo(o,d,u,null)),w.return=n,S.return=n,w.sibling=S,n.child=w,S}function O0(n,i,o){return ME(n,i,Te,null)}function M1(n,i){return Ml(n,i)}function SL(n,i,o,u){var d=n.child,g=d.sibling,b=M1(d,{mode:"visible",children:o});if((i.mode&on)===wt&&(b.lanes=u),b.return=i,b.sibling=null,g!==null){var w=i.deletions;w===null?(i.deletions=[g],i.flags|=sl):w.push(g)}return i.child=b,b}function EL(n,i,o,u,d){var g=i.mode,b=n.child,w=b.sibling,S={mode:"hidden",children:o},D;if((g&on)===wt&&i.child!==b){var M=i.child;D=M,D.childLanes=Te,D.pendingProps=S,i.mode&Sn&&(D.actualDuration=0,D.actualStartTime=-1,D.selfBaseDuration=b.selfBaseDuration,D.treeBaseDuration=b.treeBaseDuration),i.deletions=null}else D=M1(b,S),D.subtreeFlags=b.subtreeFlags&Ma;var W;return w!==null?W=Ml(w,u):(W=Bo(u,g,d,null),W.flags|=fi),W.return=i,D.return=i,D.sibling=W,i.child=D,W}function qp(n,i,o,u){u!==null&&fb(u),Ic(i,n.child,null,o);var d=i.pendingProps,g=d.children,b=M0(i,g);return b.flags|=fi,i.memoizedState=null,b}function kL(n,i,o,u,d){var g=i.mode,b={mode:"visible",children:o},w=O0(b,g),S=Bo(u,g,d,null);return S.flags|=fi,w.return=i,S.return=i,w.sibling=S,i.child=w,(i.mode&on)!==wt&&Ic(i,n.child,null,d),S}function CL(n,i,o){return(n.mode&on)===wt?(c("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."),n.lanes=Mt):Xv(i)?n.lanes=hl:n.lanes=Ur,null}function DL(n,i,o,u,d,g,b){if(o)if(i.flags&Aa){i.flags&=~Aa;var te=_0(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return qp(n,i,b,te)}else{if(i.memoizedState!==null)return i.child=n.child,i.flags|=vn,null;var fe=u.children,ne=u.fallback,Oe=kL(n,i,fe,ne,b),et=i.child;return et.memoizedState=T0(b),i.memoizedState=A0,Oe}else{if(mj(),(i.mode&on)===wt)return qp(n,i,b,null);if(Xv(d)){var w,S,D;{var M=M2(d);w=M.digest,S=M.message,D=M.stack}var W;S?W=new Error(S):W=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var H=_0(W,w,D);return qp(n,i,b,H)}var se=Hr(b,n.childLanes);if(js||se){var oe=im();if(oe!==null){var de=VM(oe,b);if(de!==Li&&de!==g.retryLane){g.retryLane=de;var Ge=Vn;Lr(n,de),Ei(oe,n,de,Ge)}}e_();var _t=_0(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 qp(n,i,b,_t)}else if(tS(d)){i.flags|=vn,i.child=n.child;var ut=QB.bind(null,n);return O2(d,ut),null}else{bj(i,d,g.treeContext);var cn=u.children,en=M0(i,cn);return en.flags|=Ta,en}}}function O1(n,i,o){n.lanes=Jt(n.lanes,i);var u=n.alternate;u!==null&&(u.lanes=Jt(u.lanes,i)),xb(n.return,i,o)}function RL(n,i,o){for(var u=i;u!==null;){if(u.tag===B){var d=u.memoizedState;d!==null&&O1(u,o,n)}else if(u.tag===pe)O1(u,o,n);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===n)return;for(;u.sibling===null;){if(u.return===null||u.return===n)return;u=u.return}u.sibling.return=u.return,u=u.sibling}}function AL(n){for(var i=n,o=null;i!==null;){var u=i.alternate;u!==null&&Sp(u)===null&&(o=i),i=i.sibling}return o}function TL(n){if(n!==void 0&&n!=="forwards"&&n!=="backwards"&&n!=="together"&&!k0[n])if(k0[n]=!0,typeof n=="string")switch(n.toLowerCase()){case"together":case"forwards":case"backwards":{c('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',n,n.toLowerCase());break}case"forward":case"backward":{c('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',n,n.toLowerCase());break}default:c('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',n);break}else c('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',n)}function ML(n,i){n!==void 0&&!Wp[n]&&(n!=="collapsed"&&n!=="hidden"?(Wp[n]=!0,c('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',n)):i!=="forwards"&&i!=="backwards"&&(Wp[n]=!0,c('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',n)))}function j1(n,i){{var o=Qt(n),u=!o&&typeof Wi(n)=="function";if(o||u){var d=o?"array":"iterable";return c("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>",d,i,d),!1}}return!0}function OL(n,i){if((i==="forwards"||i==="backwards")&&n!==void 0&&n!==null&&n!==!1)if(Qt(n)){for(var o=0;o<n.length;o++)if(!j1(n[o],o))return}else{var u=Wi(n);if(typeof u=="function"){var d=u.call(n);if(d)for(var g=d.next(),b=0;!g.done;g=d.next()){if(!j1(g.value,b))return;b++}}else c('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?',i)}}function j0(n,i,o,u,d){var g=n.memoizedState;g===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:d}:(g.isBackwards=i,g.rendering=null,g.renderingStartTime=0,g.last=u,g.tail=o,g.tailMode=d)}function L1(n,i,o){var u=i.pendingProps,d=u.revealOrder,g=u.tail,b=u.children;TL(d),ML(g,d),OL(b,d),yr(n,i,b,o);var w=Ts.current,S=Mb(w,Vh);if(S)w=Ob(w,Vh),i.flags|=vn;else{var D=n!==null&&(n.flags&vn)!==Ct;D&&RL(i,i.child,o),w=Uc(w)}if(Do(i,w),(i.mode&on)===wt)i.memoizedState=null;else switch(d){case"forwards":{var M=AL(i.child),W;M===null?(W=i.child,i.child=null):(W=M.sibling,M.sibling=null),j0(i,!1,W,M,g);break}case"backwards":{var H=null,se=i.child;for(i.child=null;se!==null;){var oe=se.alternate;if(oe!==null&&Sp(oe)===null){i.child=se;break}var de=se.sibling;se.sibling=H,H=se,se=de}j0(i,!0,H,null,g);break}case"together":{j0(i,!1,null,null,void 0);break}default:i.memoizedState=null}return i.child}function jL(n,i,o){Rb(i,i.stateNode.containerInfo);var u=i.pendingProps;return n===null?i.child=Ic(i,null,u,o):yr(n,i,u,o),i.child}var B1=!1;function LL(n,i,o){var u=i.type,d=u._context,g=i.pendingProps,b=i.memoizedProps,w=g.value;{"value"in g||B1||(B1=!0,c("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var S=i.type.propTypes;S&&Ds(S,g,"prop","Context.Provider")}if(DS(i,d,w),b!==null){var D=b.value;if(Kr(D,w)){if(b.children===g.children&&!tp())return $a(n,i,o)}else Tj(i,d,o)}var M=g.children;return yr(n,i,M,o),i.child}var P1=!1;function BL(n,i,o){var u=i.type;u._context===void 0?u!==u.Consumer&&(P1||(P1=!0,c("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):u=u._context;var d=i.pendingProps,g=d.children;typeof g!="function"&&c("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."),zc(i,o);var b=pi(u);Ku(i);var w;return Kh.current=i,Bt(!0),w=g(b),Bt(!1),yc(),i.flags|=gc,yr(n,i,w,o),i.child}function Jh(){js=!0}function Kp(n,i){(i.mode&on)===wt&&n!==null&&(n.alternate=null,i.alternate=null,i.flags|=fi)}function $a(n,i,o){return n!==null&&(i.dependencies=n.dependencies),d1(),ld(i.lanes),Hr(o,i.childLanes)?(Rj(n,i),i.child):null}function PL(n,i,o){{var u=i.return;if(u===null)throw new Error("Cannot swap the root fiber.");if(n.alternate=null,i.alternate=null,o.index=i.index,o.sibling=i.sibling,o.return=i.return,o.ref=i.ref,i===u.child)u.child=o;else{var d=u.child;if(d===null)throw new Error("Expected parent to have a child.");for(;d.sibling!==i;)if(d=d.sibling,d===null)throw new Error("Expected to find the previous sibling.");d.sibling=o}var g=u.deletions;return g===null?(u.deletions=[n],u.flags|=sl):g.push(n),o.flags|=fi,o}}function L0(n,i){var o=n.lanes;return!!Hr(o,i)}function VL(n,i,o){switch(i.tag){case y:R1(i),i.stateNode,Vc();break;case N:BS(i);break;case m:{var u=i.type;Gs(u)&&ip(i);break}case x:Rb(i,i.stateNode.containerInfo);break;case P:{var d=i.memoizedProps.value,g=i.type._context;DS(i,g,d);break}case T:{var b=Hr(o,i.childLanes);b&&(i.flags|=gn);{var w=i.stateNode;w.effectDuration=0,w.passiveEffectDuration=0}}break;case B:{var S=i.memoizedState;if(S!==null){if(S.dehydrated!==null)return Do(i,Uc(Ts.current)),i.flags|=vn,null;var D=i.child,M=D.childLanes;if(Hr(o,M))return T1(n,i,o);Do(i,Uc(Ts.current));var W=$a(n,i,o);return W!==null?W.sibling:null}else Do(i,Uc(Ts.current));break}case pe:{var H=(n.flags&vn)!==Ct,se=Hr(o,i.childLanes);if(H){if(se)return L1(n,i,o);i.flags|=vn}var oe=i.memoizedState;if(oe!==null&&(oe.rendering=null,oe.tail=null,oe.lastEffect=null),Do(i,Ts.current),se)break;return null}case C:case J:return i.lanes=Te,k1(n,i,o)}return $a(n,i,o)}function V1(n,i,o){if(i._debugNeedsRemount&&n!==null)return PL(n,i,h_(i.type,i.key,i.pendingProps,i._debugOwner||null,i.mode,i.lanes));if(n!==null){var u=n.memoizedProps,d=i.pendingProps;if(u!==d||tp()||i.type!==n.type)js=!0;else{var g=L0(n,o);if(!g&&(i.flags&vn)===Ct)return js=!1,VL(n,i,o);(n.flags&Fg)!==Ct?js=!0:js=!1}}else if(js=!1,Ji()&&cj(i)){var b=i.index,w=uj();dS(i,w,b)}switch(i.lanes=Te,i.tag){case v:return _L(n,i,i.type,o);case re:{var S=i.elementType;return vL(n,i,S,o)}case p:{var D=i.type,M=i.pendingProps,W=i.elementType===D?M:Os(D,M);return C0(n,i,D,W,o)}case m:{var H=i.type,se=i.pendingProps,oe=i.elementType===H?se:Os(H,se);return D1(n,i,H,oe,o)}case y:return pL(n,i,o);case N:return mL(n,i,o);case _:return gL(n,i);case B:return T1(n,i,o);case x:return jL(n,i,o);case O:{var de=i.type,Ge=i.pendingProps,_t=i.elementType===de?Ge:Os(de,Ge);return x1(n,i,de,_t,o)}case k:return hL(n,i,o);case j:return dL(n,i,o);case T:return fL(n,i,o);case P:return LL(n,i,o);case L:return BL(n,i,o);case U:{var ut=i.type,cn=i.pendingProps,en=Os(ut,cn);if(i.type!==i.elementType){var te=ut.propTypes;te&&Ds(te,en,"prop",hn(ut))}return en=Os(ut.type,en),S1(n,i,ut,en,o)}case ce:return E1(n,i,i.type,i.pendingProps,o);case Z:{var fe=i.type,ne=i.pendingProps,Oe=i.elementType===fe?ne:Os(fe,ne);return bL(n,i,fe,Oe,o)}case pe:return L1(n,i,o);case Q:break;case C:return k1(n,i,o)}throw new Error("Unknown unit of work tag ("+i.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Gc(n){n.flags|=gn}function I1(n){n.flags|=al,n.flags|=zg}var F1,B0,z1,$1;F1=function(n,i,o,u){for(var d=i.child;d!==null;){if(d.tag===N||d.tag===_)a2(n,d.stateNode);else if(d.tag!==x){if(d.child!==null){d.child.return=d,d=d.child;continue}}if(d===i)return;for(;d.sibling===null;){if(d.return===null||d.return===i)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},B0=function(n,i){},z1=function(n,i,o,u,d){var g=n.memoizedProps;if(g!==u){var b=i.stateNode,w=Ab(),S=l2(b,o,g,u,d,w);i.updateQueue=S,S&&Gc(i)}},$1=function(n,i,o,u){o!==u&&Gc(i)};function Xh(n,i){if(!Ji())switch(n.tailMode){case"hidden":{for(var o=n.tail,u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?n.tail=null:u.sibling=null;break}case"collapsed":{for(var d=n.tail,g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?!i&&n.tail!==null?n.tail.sibling=null:n.tail=null:g.sibling=null;break}}}function Zi(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=Te,u=Ct;if(i){if((n.mode&Sn)!==wt){for(var S=n.selfBaseDuration,D=n.child;D!==null;)o=Jt(o,Jt(D.lanes,D.childLanes)),u|=D.subtreeFlags&Ma,u|=D.flags&Ma,S+=D.treeBaseDuration,D=D.sibling;n.treeBaseDuration=S}else for(var M=n.child;M!==null;)o=Jt(o,Jt(M.lanes,M.childLanes)),u|=M.subtreeFlags&Ma,u|=M.flags&Ma,M.return=n,M=M.sibling;n.subtreeFlags|=u}else{if((n.mode&Sn)!==wt){for(var d=n.actualDuration,g=n.selfBaseDuration,b=n.child;b!==null;)o=Jt(o,Jt(b.lanes,b.childLanes)),u|=b.subtreeFlags,u|=b.flags,d+=b.actualDuration,g+=b.treeBaseDuration,b=b.sibling;n.actualDuration=d,n.treeBaseDuration=g}else for(var w=n.child;w!==null;)o=Jt(o,Jt(w.lanes,w.childLanes)),u|=w.subtreeFlags,u|=w.flags,w.return=n,w=w.sibling;n.subtreeFlags|=u}return n.childLanes=o,i}function IL(n,i,o){if(xj()&&(i.mode&on)!==wt&&(i.flags&vn)===Ct)return _S(i),Vc(),i.flags|=Aa|_f|_r,!1;var u=lp(i);if(o!==null&&o.dehydrated!==null)if(n===null){if(!u)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(Nj(i),Zi(i),(i.mode&Sn)!==wt){var d=o!==null;if(d){var g=i.child;g!==null&&(i.treeBaseDuration-=g.treeBaseDuration)}}return!1}else{if(Vc(),(i.flags&vn)===Ct&&(i.memoizedState=null),i.flags|=gn,Zi(i),(i.mode&Sn)!==wt){var b=o!==null;if(b){var w=i.child;w!==null&&(i.treeBaseDuration-=w.treeBaseDuration)}}return!1}else return yS(),!0}function U1(n,i,o){var u=i.pendingProps;switch(lb(i),i.tag){case v:case re:case ce:case p:case O:case k:case j:case T:case L:case U:return Zi(i),null;case m:{var d=i.type;return Gs(d)&&np(i),Zi(i),null}case y:{var g=i.stateNode;if($c(i),rb(i),Lb(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),n===null||n.child===null){var b=lp(i);if(b)Gc(i);else if(n!==null){var w=n.memoizedState;(!w.isDehydrated||(i.flags&Aa)!==Ct)&&(i.flags|=vc,yS())}}return B0(n,i),Zi(i),null}case N:{Tb(i);var S=LS(),D=i.type;if(n!==null&&i.stateNode!=null)z1(n,i,D,u,S),n.ref!==i.ref&&I1(i);else{if(!u){if(i.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 Zi(i),null}var M=Ab(),W=lp(i);if(W)_j(i,S,M)&&Gc(i);else{var H=s2(D,u,S,M,i);F1(H,i,!1,!1),i.stateNode=H,o2(H,D,u,S)&&Gc(i)}i.ref!==null&&I1(i)}return Zi(i),null}case _:{var se=u;if(n&&i.stateNode!=null){var oe=n.memoizedProps;$1(n,i,oe,se)}else{if(typeof se!="string"&&i.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 de=LS(),Ge=Ab(),_t=lp(i);_t?yj(i)&&Gc(i):i.stateNode=c2(se,de,Ge,i)}return Zi(i),null}case B:{Hc(i);var ut=i.memoizedState;if(n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){var cn=IL(n,i,ut);if(!cn)return i.flags&_r?i:null}if((i.flags&vn)!==Ct)return i.lanes=o,(i.mode&Sn)!==wt&&a0(i),i;var en=ut!==null,te=n!==null&&n.memoizedState!==null;if(en!==te&&en){var fe=i.child;if(fe.flags|=ol,(i.mode&on)!==wt){var ne=n===null&&(i.memoizedProps.unstable_avoidThisFallback!==!0||!0);ne||Mb(Ts.current,VS)?FB():e_()}}var Oe=i.updateQueue;if(Oe!==null&&(i.flags|=gn),Zi(i),(i.mode&Sn)!==wt&&en){var et=i.child;et!==null&&(i.treeBaseDuration-=et.treeBaseDuration)}return null}case x:return $c(i),B0(n,i),n===null&&nj(i.stateNode.containerInfo),Zi(i),null;case P:var Je=i.type._context;return wb(Je,i),Zi(i),null;case Z:{var At=i.type;return Gs(At)&&np(i),Zi(i),null}case pe:{Hc(i);var Vt=i.memoizedState;if(Vt===null)return Zi(i),null;var kn=(i.flags&vn)!==Ct,dn=Vt.rendering;if(dn===null)if(kn)Xh(Vt,!1);else{var ii=$B()&&(n===null||(n.flags&vn)===Ct);if(!ii)for(var fn=i.child;fn!==null;){var Qn=Sp(fn);if(Qn!==null){kn=!0,i.flags|=vn,Xh(Vt,!1);var fr=Qn.updateQueue;return fr!==null&&(i.updateQueue=fr,i.flags|=gn),i.subtreeFlags=Ct,Aj(i,o),Do(i,Ob(Ts.current,Vh)),i.child}fn=fn.sibling}Vt.tail!==null&&Oi()>uE()&&(i.flags|=vn,kn=!0,Xh(Vt,!1),i.lanes=$w)}else{if(!kn){var ir=Sp(dn);if(ir!==null){i.flags|=vn,kn=!0;var Jr=ir.updateQueue;if(Jr!==null&&(i.updateQueue=Jr,i.flags|=gn),Xh(Vt,!0),Vt.tail===null&&Vt.tailMode==="hidden"&&!dn.alternate&&!Ji())return Zi(i),null}else Oi()*2-Vt.renderingStartTime>uE()&&o!==Ur&&(i.flags|=vn,kn=!0,Xh(Vt,!1),i.lanes=$w)}if(Vt.isBackwards)dn.sibling=i.child,i.child=dn;else{var xr=Vt.last;xr!==null?xr.sibling=dn:i.child=dn,Vt.last=dn}}if(Vt.tail!==null){var Sr=Vt.tail;Vt.rendering=Sr,Vt.tail=Sr.sibling,Vt.renderingStartTime=Oi(),Sr.sibling=null;var pr=Ts.current;return kn?pr=Ob(pr,Vh):pr=Uc(pr),Do(i,pr),Sr}return Zi(i),null}case Q:break;case C:case J:{Q0(i);var Ka=i.memoizedState,iu=Ka!==null;if(n!==null){var fd=n.memoizedState,ia=fd!==null;ia!==iu&&!Me&&(i.flags|=ol)}return!iu||(i.mode&on)===wt?Zi(i):Hr(na,Ur)&&(Zi(i),i.subtreeFlags&(fi|gn)&&(i.flags|=ol)),null}case Y:return null;case z:return null}throw new Error("Unknown unit of work tag ("+i.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function FL(n,i,o){switch(lb(i),i.tag){case m:{var u=i.type;Gs(u)&&np(i);var d=i.flags;return d&_r?(i.flags=d&~_r|vn,(i.mode&Sn)!==wt&&a0(i),i):null}case y:{i.stateNode,$c(i),rb(i),Lb();var g=i.flags;return(g&_r)!==Ct&&(g&vn)===Ct?(i.flags=g&~_r|vn,i):null}case N:return Tb(i),null;case B:{Hc(i);var b=i.memoizedState;if(b!==null&&b.dehydrated!==null){if(i.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Vc()}var w=i.flags;return w&_r?(i.flags=w&~_r|vn,(i.mode&Sn)!==wt&&a0(i),i):null}case pe:return Hc(i),null;case x:return $c(i),null;case P:var S=i.type._context;return wb(S,i),null;case C:case J:return Q0(i),null;case Y:return null;default:return null}}function H1(n,i,o){switch(lb(i),i.tag){case m:{var u=i.type.childContextTypes;u!=null&&np(i);break}case y:{i.stateNode,$c(i),rb(i),Lb();break}case N:{Tb(i);break}case x:$c(i);break;case B:Hc(i);break;case pe:Hc(i);break;case P:var d=i.type._context;wb(d,i);break;case C:case J:Q0(i);break}}var W1=null;W1=new Set;var Yp=!1,Qi=!1,zL=typeof WeakSet=="function"?WeakSet:Set,st=null,Jc=null,Xc=null;function $L(n){Pg(null,function(){throw n}),Vg()}var UL=function(n,i){if(i.props=n.memoizedProps,i.state=n.memoizedState,n.mode&Sn)try{ea(),i.componentWillUnmount()}finally{Qs(n)}else i.componentWillUnmount()};function q1(n,i){try{To(_i,n)}catch(o){On(n,i,o)}}function P0(n,i,o){try{UL(n,o)}catch(u){On(n,i,u)}}function HL(n,i,o){try{o.componentDidMount()}catch(u){On(n,i,u)}}function K1(n,i){try{G1(n)}catch(o){On(n,i,o)}}function Zc(n,i){var o=n.ref;if(o!==null)if(typeof o=="function"){var u;try{if(ye&&mt&&n.mode&Sn)try{ea(),u=o(null)}finally{Qs(n)}else u=o(null)}catch(d){On(n,i,d)}typeof u=="function"&&c("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Rt(n))}else o.current=null}function Gp(n,i,o){try{o()}catch(u){On(n,i,u)}}var Y1=!1;function WL(n,i){i2(n.containerInfo),st=i,qL();var o=Y1;return Y1=!1,o}function qL(){for(;st!==null;){var n=st,i=n.child;(n.subtreeFlags&Hg)!==Ct&&i!==null?(i.return=n,st=i):KL()}}function KL(){for(;st!==null;){var n=st;qe(n);try{YL(n)}catch(o){On(n,n.return,o)}Ae();var i=n.sibling;if(i!==null){i.return=n.return,st=i;return}st=n.return}}function YL(n){var i=n.alternate,o=n.flags;if((o&vc)!==Ct){switch(qe(n),n.tag){case p:case O:case ce:break;case m:{if(i!==null){var u=i.memoizedProps,d=i.memoizedState,g=n.stateNode;n.type===n.elementType&&!Cl&&(g.props!==n.memoizedProps&&c("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.",Rt(n)||"instance"),g.state!==n.memoizedState&&c("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.",Rt(n)||"instance"));var b=g.getSnapshotBeforeUpdate(n.elementType===n.type?u:Os(n.type,u),d);{var w=W1;b===void 0&&!w.has(n.type)&&(w.add(n.type),c("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Rt(n)))}g.__reactInternalSnapshotBeforeUpdate=b}break}case y:{{var S=n.stateNode;D2(S.containerInfo)}break}case N:case _:case x:case Z: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.")}Ae()}}function Ls(n,i,o){var u=i.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var g=d.next,b=g;do{if((b.tag&n)===n){var w=b.destroy;b.destroy=void 0,w!==void 0&&((n&Xi)!==Br?cM(i):(n&_i)!==Br&&Pw(i),(n&Js)!==Br&&ud(!0),Gp(i,o,w),(n&Js)!==Br&&ud(!1),(n&Xi)!==Br?uM():(n&_i)!==Br&&Vw())}b=b.next}while(b!==g)}}function To(n,i){var o=i.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var d=u.next,g=d;do{if((g.tag&n)===n){(n&Xi)!==Br?oM(i):(n&_i)!==Br&&hM(i);var b=g.create;(n&Js)!==Br&&ud(!0),g.destroy=b(),(n&Js)!==Br&&ud(!1),(n&Xi)!==Br?lM():(n&_i)!==Br&&dM();{var w=g.destroy;if(w!==void 0&&typeof w!="function"){var S=void 0;(g.tag&_i)!==Ct?S="useLayoutEffect":(g.tag&Js)!==Ct?S="useInsertionEffect":S="useEffect";var D=void 0;w===null?D=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof w.then=="function"?D=`
|
|
162
|
+
|
|
163
|
+
It looks like you wrote `+S+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
164
|
+
|
|
165
|
+
`+S+`(() => {
|
|
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`:D=" You returned: "+w,c("%s must not return anything besides a function, which is used for clean-up.%s",S,D)}}}g=g.next}while(g!==d)}}function GL(n,i){if((i.flags&gn)!==Ct)switch(i.tag){case T:{var o=i.stateNode.passiveEffectDuration,u=i.memoizedProps,d=u.id,g=u.onPostCommit,b=u1(),w=i.alternate===null?"mount":"update";c1()&&(w="nested-update"),typeof g=="function"&&g(d,w,o,b);var S=i.return;e:for(;S!==null;){switch(S.tag){case y:var D=S.stateNode;D.passiveEffectDuration+=o;break e;case T:var M=S.stateNode;M.passiveEffectDuration+=o;break e}S=S.return}break}}}function JL(n,i,o,u){if((o.flags&qu)!==Ct)switch(o.tag){case p:case O:case ce:{if(!Qi)if(o.mode&Sn)try{ea(),To(_i|bi,o)}finally{Qs(o)}else To(_i|bi,o);break}case m:{var d=o.stateNode;if(o.flags&gn&&!Qi)if(i===null)if(o.type===o.elementType&&!Cl&&(d.props!==o.memoizedProps&&c("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.",Rt(o)||"instance"),d.state!==o.memoizedState&&c("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.",Rt(o)||"instance")),o.mode&Sn)try{ea(),d.componentDidMount()}finally{Qs(o)}else d.componentDidMount();else{var g=o.elementType===o.type?i.memoizedProps:Os(o.type,i.memoizedProps),b=i.memoizedState;if(o.type===o.elementType&&!Cl&&(d.props!==o.memoizedProps&&c("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.",Rt(o)||"instance"),d.state!==o.memoizedState&&c("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.",Rt(o)||"instance")),o.mode&Sn)try{ea(),d.componentDidUpdate(g,b,d.__reactInternalSnapshotBeforeUpdate)}finally{Qs(o)}else d.componentDidUpdate(g,b,d.__reactInternalSnapshotBeforeUpdate)}var w=o.updateQueue;w!==null&&(o.type===o.elementType&&!Cl&&(d.props!==o.memoizedProps&&c("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.",Rt(o)||"instance"),d.state!==o.memoizedState&&c("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.",Rt(o)||"instance")),jS(o,w,d));break}case y:{var S=o.updateQueue;if(S!==null){var D=null;if(o.child!==null)switch(o.child.tag){case N:D=o.child.stateNode;break;case m:D=o.child.stateNode;break}jS(o,S,D)}break}case N:{var M=o.stateNode;if(i===null&&o.flags&gn){var W=o.type,H=o.memoizedProps;p2(M,W,H)}break}case _:break;case x:break;case T:{{var se=o.memoizedProps,oe=se.onCommit,de=se.onRender,Ge=o.stateNode.effectDuration,_t=u1(),ut=i===null?"mount":"update";c1()&&(ut="nested-update"),typeof de=="function"&&de(o.memoizedProps.id,ut,o.actualDuration,o.treeBaseDuration,o.actualStartTime,_t);{typeof oe=="function"&&oe(o.memoizedProps.id,ut,Ge,_t),KB(o);var cn=o.return;e:for(;cn!==null;){switch(cn.tag){case y:var en=cn.stateNode;en.effectDuration+=Ge;break e;case T:var te=cn.stateNode;te.effectDuration+=Ge;break e}cn=cn.return}}}break}case B:{rB(n,o);break}case pe:case Z:case Q:case C:case J:case z: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.")}Qi||o.flags&al&&G1(o)}function XL(n){switch(n.tag){case p:case O:case ce:{if(n.mode&Sn)try{ea(),q1(n,n.return)}finally{Qs(n)}else q1(n,n.return);break}case m:{var i=n.stateNode;typeof i.componentDidMount=="function"&&HL(n,n.return,i),K1(n,n.return);break}case N:{K1(n,n.return);break}}}function ZL(n,i){for(var o=null,u=n;;){if(u.tag===N){if(o===null){o=u;try{var d=u.stateNode;i?S2(d):k2(u.stateNode,u.memoizedProps)}catch(b){On(n,n.return,b)}}}else if(u.tag===_){if(o===null)try{var g=u.stateNode;i?E2(g):C2(g,u.memoizedProps)}catch(b){On(n,n.return,b)}}else if(!((u.tag===C||u.tag===J)&&u.memoizedState!==null&&u!==n)){if(u.child!==null){u.child.return=u,u=u.child;continue}}if(u===n)return;for(;u.sibling===null;){if(u.return===null||u.return===n)return;o===u&&(o=null),u=u.return}o===u&&(o=null),u.sibling.return=u.return,u=u.sibling}}function G1(n){var i=n.ref;if(i!==null){var o=n.stateNode,u;switch(n.tag){case N:u=o;break;default:u=o}if(typeof i=="function"){var d;if(n.mode&Sn)try{ea(),d=i(u)}finally{Qs(n)}else d=i(u);typeof d=="function"&&c("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Rt(n))}else i.hasOwnProperty("current")||c("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Rt(n)),i.current=u}}function QL(n){var i=n.alternate;i!==null&&(i.return=null),n.return=null}function J1(n){var i=n.alternate;i!==null&&(n.alternate=null,J1(i));{if(n.child=null,n.deletions=null,n.sibling=null,n.tag===N){var o=n.stateNode;o!==null&&sj(o)}n.stateNode=null,n._debugOwner=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}}function eB(n){for(var i=n.return;i!==null;){if(X1(i))return i;i=i.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 X1(n){return n.tag===N||n.tag===y||n.tag===x}function Z1(n){var i=n;e:for(;;){for(;i.sibling===null;){if(i.return===null||X1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==N&&i.tag!==_&&i.tag!==ve;){if(i.flags&fi||i.child===null||i.tag===x)continue e;i.child.return=i,i=i.child}if(!(i.flags&fi))return i.stateNode}}function tB(n){var i=eB(n);switch(i.tag){case N:{var o=i.stateNode;i.flags&Wu&&(eS(o),i.flags&=~Wu);var u=Z1(n);I0(n,u,o);break}case y:case x:{var d=i.stateNode.containerInfo,g=Z1(n);V0(n,g,d);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function V0(n,i,o){var u=n.tag,d=u===N||u===_;if(d){var g=n.stateNode;i?y2(o,g,i):b2(o,g)}else if(u!==x){var b=n.child;if(b!==null){V0(b,i,o);for(var w=b.sibling;w!==null;)V0(w,i,o),w=w.sibling}}}function I0(n,i,o){var u=n.tag,d=u===N||u===_;if(d){var g=n.stateNode;i?_2(o,g,i):v2(o,g)}else if(u!==x){var b=n.child;if(b!==null){I0(b,i,o);for(var w=b.sibling;w!==null;)I0(w,i,o),w=w.sibling}}}var er=null,Bs=!1;function nB(n,i,o){{var u=i;e:for(;u!==null;){switch(u.tag){case N:{er=u.stateNode,Bs=!1;break e}case y:{er=u.stateNode.containerInfo,Bs=!0;break e}case x:{er=u.stateNode.containerInfo,Bs=!0;break e}}u=u.return}if(er===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Q1(n,i,o),er=null,Bs=!1}QL(o)}function Mo(n,i,o){for(var u=o.child;u!==null;)Q1(n,i,u),u=u.sibling}function Q1(n,i,o){switch(iM(o),o.tag){case N:Qi||Zc(o,i);case _:{{var u=er,d=Bs;er=null,Mo(n,i,o),er=u,Bs=d,er!==null&&(Bs?w2(er,o.stateNode):N2(er,o.stateNode))}return}case ve:{er!==null&&(Bs?x2(er,o.stateNode):Jv(er,o.stateNode));return}case x:{{var g=er,b=Bs;er=o.stateNode.containerInfo,Bs=!0,Mo(n,i,o),er=g,Bs=b}return}case p:case O:case U:case ce:{if(!Qi){var w=o.updateQueue;if(w!==null){var S=w.lastEffect;if(S!==null){var D=S.next,M=D;do{var W=M,H=W.destroy,se=W.tag;H!==void 0&&((se&Js)!==Br?Gp(o,i,H):(se&_i)!==Br&&(Pw(o),o.mode&Sn?(ea(),Gp(o,i,H),Qs(o)):Gp(o,i,H),Vw())),M=M.next}while(M!==D)}}}Mo(n,i,o);return}case m:{if(!Qi){Zc(o,i);var oe=o.stateNode;typeof oe.componentWillUnmount=="function"&&P0(o,i,oe)}Mo(n,i,o);return}case Q:{Mo(n,i,o);return}case C:{if(o.mode&on){var de=Qi;Qi=de||o.memoizedState!==null,Mo(n,i,o),Qi=de}else Mo(n,i,o);break}default:{Mo(n,i,o);return}}}function iB(n){n.memoizedState}function rB(n,i){var o=i.memoizedState;if(o===null){var u=i.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var g=d.dehydrated;g!==null&&$2(g)}}}}function eE(n){var i=n.updateQueue;if(i!==null){n.updateQueue=null;var o=n.stateNode;o===null&&(o=n.stateNode=new zL),i.forEach(function(u){var d=eP.bind(null,n,u);if(!o.has(u)){if(o.add(u),ks)if(Jc!==null&&Xc!==null)cd(Xc,Jc);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");u.then(d,d)}})}}function sB(n,i,o){Jc=o,Xc=n,qe(i),tE(i,n),qe(i),Jc=null,Xc=null}function Ps(n,i,o){var u=i.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];try{nB(n,i,g)}catch(S){On(g,i,S)}}var b=Gt();if(i.subtreeFlags&Wg)for(var w=i.child;w!==null;)qe(w),tE(w,n),w=w.sibling;qe(b)}function tE(n,i,o){var u=n.alternate,d=n.flags;switch(n.tag){case p:case O:case U:case ce:{if(Ps(i,n),ta(n),d&gn){try{Ls(Js|bi,n,n.return),To(Js|bi,n)}catch(At){On(n,n.return,At)}if(n.mode&Sn){try{ea(),Ls(_i|bi,n,n.return)}catch(At){On(n,n.return,At)}Qs(n)}else try{Ls(_i|bi,n,n.return)}catch(At){On(n,n.return,At)}}return}case m:{Ps(i,n),ta(n),d&al&&u!==null&&Zc(u,u.return);return}case N:{Ps(i,n),ta(n),d&al&&u!==null&&Zc(u,u.return);{if(n.flags&Wu){var g=n.stateNode;try{eS(g)}catch(At){On(n,n.return,At)}}if(d&gn){var b=n.stateNode;if(b!=null){var w=n.memoizedProps,S=u!==null?u.memoizedProps:w,D=n.type,M=n.updateQueue;if(n.updateQueue=null,M!==null)try{m2(b,M,D,S,w,n)}catch(At){On(n,n.return,At)}}}}return}case _:{if(Ps(i,n),ta(n),d&gn){if(n.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 W=n.stateNode,H=n.memoizedProps,se=u!==null?u.memoizedProps:H;try{g2(W,se,H)}catch(At){On(n,n.return,At)}}return}case y:{if(Ps(i,n),ta(n),d&gn&&u!==null){var oe=u.memoizedState;if(oe.isDehydrated)try{z2(i.containerInfo)}catch(At){On(n,n.return,At)}}return}case x:{Ps(i,n),ta(n);return}case B:{Ps(i,n),ta(n);var de=n.child;if(de.flags&ol){var Ge=de.stateNode,_t=de.memoizedState,ut=_t!==null;if(Ge.isHidden=ut,ut){var cn=de.alternate!==null&&de.alternate.memoizedState!==null;cn||IB()}}if(d&gn){try{iB(n)}catch(At){On(n,n.return,At)}eE(n)}return}case C:{var en=u!==null&&u.memoizedState!==null;if(n.mode&on){var te=Qi;Qi=te||en,Ps(i,n),Qi=te}else Ps(i,n);if(ta(n),d&ol){var fe=n.stateNode,ne=n.memoizedState,Oe=ne!==null,et=n;if(fe.isHidden=Oe,Oe&&!en&&(et.mode&on)!==wt){st=et;for(var Je=et.child;Je!==null;)st=Je,oB(Je),Je=Je.sibling}ZL(et,Oe)}return}case pe:{Ps(i,n),ta(n),d&gn&&eE(n);return}case Q:return;default:{Ps(i,n),ta(n);return}}}function ta(n){var i=n.flags;if(i&fi){try{tB(n)}catch(o){On(n,n.return,o)}n.flags&=~fi}i&Ta&&(n.flags&=~Ta)}function aB(n,i,o){Jc=o,Xc=i,st=n,nE(n,i,o),Jc=null,Xc=null}function nE(n,i,o){for(var u=(n.mode&on)!==wt;st!==null;){var d=st,g=d.child;if(d.tag===C&&u){var b=d.memoizedState!==null,w=b||Yp;if(w){F0(n,i,o);continue}else{var S=d.alternate,D=S!==null&&S.memoizedState!==null,M=D||Qi,W=Yp,H=Qi;Yp=w,Qi=M,Qi&&!H&&(st=d,lB(d));for(var se=g;se!==null;)st=se,nE(se,i,o),se=se.sibling;st=d,Yp=W,Qi=H,F0(n,i,o);continue}}(d.subtreeFlags&qu)!==Ct&&g!==null?(g.return=d,st=g):F0(n,i,o)}}function F0(n,i,o){for(;st!==null;){var u=st;if((u.flags&qu)!==Ct){var d=u.alternate;qe(u);try{JL(i,d,u,o)}catch(b){On(u,u.return,b)}Ae()}if(u===n){st=null;return}var g=u.sibling;if(g!==null){g.return=u.return,st=g;return}st=u.return}}function oB(n){for(;st!==null;){var i=st,o=i.child;switch(i.tag){case p:case O:case U:case ce:{if(i.mode&Sn)try{ea(),Ls(_i,i,i.return)}finally{Qs(i)}else Ls(_i,i,i.return);break}case m:{Zc(i,i.return);var u=i.stateNode;typeof u.componentWillUnmount=="function"&&P0(i,i.return,u);break}case N:{Zc(i,i.return);break}case C:{var d=i.memoizedState!==null;if(d){iE(n);continue}break}}o!==null?(o.return=i,st=o):iE(n)}}function iE(n){for(;st!==null;){var i=st;if(i===n){st=null;return}var o=i.sibling;if(o!==null){o.return=i.return,st=o;return}st=i.return}}function lB(n){for(;st!==null;){var i=st,o=i.child;if(i.tag===C){var u=i.memoizedState!==null;if(u){rE(n);continue}}o!==null?(o.return=i,st=o):rE(n)}}function rE(n){for(;st!==null;){var i=st;qe(i);try{XL(i)}catch(u){On(i,i.return,u)}if(Ae(),i===n){st=null;return}var o=i.sibling;if(o!==null){o.return=i.return,st=o;return}st=i.return}}function cB(n,i,o,u){st=i,uB(i,n,o,u)}function uB(n,i,o,u){for(;st!==null;){var d=st,g=d.child;(d.subtreeFlags&bc)!==Ct&&g!==null?(g.return=d,st=g):hB(n,i,o,u)}}function hB(n,i,o,u){for(;st!==null;){var d=st;if((d.flags&fo)!==Ct){qe(d);try{dB(i,d,o,u)}catch(b){On(d,d.return,b)}Ae()}if(d===n){st=null;return}var g=d.sibling;if(g!==null){g.return=d.return,st=g;return}st=d.return}}function dB(n,i,o,u){switch(i.tag){case p:case O:case ce:{if(i.mode&Sn){s0();try{To(Xi|bi,i)}finally{r0(i)}}else To(Xi|bi,i);break}}}function fB(n){st=n,pB()}function pB(){for(;st!==null;){var n=st,i=n.child;if((st.flags&sl)!==Ct){var o=n.deletions;if(o!==null){for(var u=0;u<o.length;u++){var d=o[u];st=d,vB(d,n)}{var g=n.alternate;if(g!==null){var b=g.child;if(b!==null){g.child=null;do{var w=b.sibling;b.sibling=null,b=w}while(b!==null)}}}st=n}}(n.subtreeFlags&bc)!==Ct&&i!==null?(i.return=n,st=i):mB()}}function mB(){for(;st!==null;){var n=st;(n.flags&fo)!==Ct&&(qe(n),gB(n),Ae());var i=n.sibling;if(i!==null){i.return=n.return,st=i;return}st=n.return}}function gB(n){switch(n.tag){case p:case O:case ce:{n.mode&Sn?(s0(),Ls(Xi|bi,n,n.return),r0(n)):Ls(Xi|bi,n,n.return);break}}}function vB(n,i){for(;st!==null;){var o=st;qe(o),_B(o,i),Ae();var u=o.child;u!==null?(u.return=o,st=u):bB(n)}}function bB(n){for(;st!==null;){var i=st,o=i.sibling,u=i.return;if(J1(i),i===n){st=null;return}if(o!==null){o.return=u,st=o;return}st=u}}function _B(n,i){switch(n.tag){case p:case O:case ce:{n.mode&Sn?(s0(),Ls(Xi,n,i),r0(n)):Ls(Xi,n,i);break}}}function yB(n){switch(n.tag){case p:case O:case ce:{try{To(_i|bi,n)}catch(o){On(n,n.return,o)}break}case m:{var i=n.stateNode;try{i.componentDidMount()}catch(o){On(n,n.return,o)}break}}}function NB(n){switch(n.tag){case p:case O:case ce:{try{To(Xi|bi,n)}catch(i){On(n,n.return,i)}break}}}function wB(n){switch(n.tag){case p:case O:case ce:{try{Ls(_i|bi,n,n.return)}catch(o){On(n,n.return,o)}break}case m:{var i=n.stateNode;typeof i.componentWillUnmount=="function"&&P0(n,n.return,i);break}}}function xB(n){switch(n.tag){case p:case O:case ce:try{Ls(Xi|bi,n,n.return)}catch(i){On(n,n.return,i)}}}if(typeof Symbol=="function"&&Symbol.for){var Zh=Symbol.for;Zh("selector.component"),Zh("selector.has_pseudo_class"),Zh("selector.role"),Zh("selector.test_id"),Zh("selector.text")}var SB=[];function EB(){SB.forEach(function(n){return n()})}var kB=r.ReactCurrentActQueue;function CB(n){{var i=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,o=typeof jest<"u";return o&&i!==!1}}function sE(){{var n=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!n&&kB.current!==null&&c("The current testing environment is not configured to support act(...)"),n}}var DB=Math.ceil,z0=r.ReactCurrentDispatcher,$0=r.ReactCurrentOwner,tr=r.ReactCurrentBatchConfig,Vs=r.ReactCurrentActQueue,wi=0,aE=1,nr=2,vs=4,Ua=0,Qh=1,Dl=2,Jp=3,ed=4,oE=5,U0=6,ln=wi,Nr=null,Yn=null,xi=Te,na=Te,H0=wo(Te),Si=Ua,td=null,Xp=Te,nd=Te,Zp=Te,id=null,Pr=null,W0=0,lE=500,cE=1/0,RB=500,Ha=null;function rd(){cE=Oi()+RB}function uE(){return cE}var Qp=!1,q0=null,Qc=null,Rl=!1,Oo=null,sd=Te,K0=[],Y0=null,AB=50,ad=0,G0=null,J0=!1,em=!1,TB=50,eu=0,tm=null,od=Vn,nm=Te,hE=!1;function im(){return Nr}function wr(){return(ln&(nr|vs))!==wi?Oi():(od!==Vn||(od=Oi()),od)}function jo(n){var i=n.mode;if((i&on)===wt)return Mt;if((ln&nr)!==wi&&xi!==Te)return Qu(xi);var o=kj()!==Ej;if(o){if(tr.transition!==null){var u=tr.transition;u._updatedFibers||(u._updatedFibers=new Set),u._updatedFibers.add(n)}return nm===Li&&(nm=qw()),nm}var d=Cs();if(d!==Li)return d;var g=u2();return g}function MB(n){var i=n.mode;return(i&on)===wt?Mt:jM()}function Ei(n,i,o,u){nP(),hE&&c("useInsertionEffect must not schedule updates."),J0&&(em=!0),eh(n,o,u),(ln&nr)!==Te&&n===Nr?sP(i):(ks&&Gw(n,i,o),aP(i),n===Nr&&((ln&nr)===wi&&(nd=Jt(nd,o)),Si===ed&&Lo(n,xi)),Vr(n,u),o===Mt&&ln===wi&&(i.mode&on)===wt&&!Vs.isBatchingLegacy&&(rd(),hS()))}function OB(n,i,o){var u=n.current;u.lanes=i,eh(n,i,o),Vr(n,o)}function jB(n){return(ln&nr)!==wi}function Vr(n,i){var o=n.callbackNode;DM(n,i);var u=Sf(n,n===Nr?xi:Te);if(u===Te){o!==null&&CE(o),n.callbackNode=null,n.callbackPriority=Li;return}var d=fl(u),g=n.callbackPriority;if(g===d&&!(Vs.current!==null&&o!==i_)){o==null&&g!==Mt&&c("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}o!=null&&CE(o);var b;if(d===Mt)n.tag===xo?(Vs.isBatchingLegacy!==null&&(Vs.didScheduleLegacyUpdate=!0),lj(pE.bind(null,n))):uS(pE.bind(null,n)),Vs.current!==null?Vs.current.push(So):d2(function(){(ln&(nr|vs))===wi&&So()}),b=null;else{var w;switch(Zw(u)){case Wr:w=yf;break;case ja:w=qg;break;case La:w=ul;break;case Cf:w=Kg;break;default:w=ul;break}b=r_(w,dE.bind(null,n))}n.callbackPriority=d,n.callbackNode=b}function dE(n,i){if(Zj(),od=Vn,nm=Te,(ln&(nr|vs))!==wi)throw new Error("Should not already be working.");var o=n.callbackNode,u=qa();if(u&&n.callbackNode!==o)return null;var d=Sf(n,n===Nr?xi:Te);if(d===Te)return null;var g=!Ef(n,d)&&!OM(n,d)&&!i,b=g?HB(n,d):sm(n,d);if(b!==Ua){if(b===Dl){var w=mv(n);w!==Te&&(d=w,b=X0(n,w))}if(b===Qh){var S=td;throw Al(n,Te),Lo(n,d),Vr(n,Oi()),S}if(b===U0)Lo(n,d);else{var D=!Ef(n,d),M=n.current.alternate;if(D&&!BB(M)){if(b=sm(n,d),b===Dl){var W=mv(n);W!==Te&&(d=W,b=X0(n,W))}if(b===Qh){var H=td;throw Al(n,Te),Lo(n,d),Vr(n,Oi()),H}}n.finishedWork=M,n.finishedLanes=d,LB(n,b,d)}}return Vr(n,Oi()),n.callbackNode===o?dE.bind(null,n):null}function X0(n,i){var o=id;if(Df(n)){var u=Al(n,i);u.flags|=Aa,tj(n.containerInfo)}var d=sm(n,i);if(d!==Dl){var g=Pr;Pr=o,g!==null&&fE(g)}return d}function fE(n){Pr===null?Pr=n:Pr.push.apply(Pr,n)}function LB(n,i,o){switch(i){case Ua:case Qh:throw new Error("Root did not complete. This is a bug in React.");case Dl:{Tl(n,Pr,Ha);break}case Jp:{if(Lo(n,o),Hw(o)&&!DE()){var u=W0+lE-Oi();if(u>10){var d=Sf(n,Te);if(d!==Te)break;var g=n.suspendedLanes;if(!Sc(g,o)){wr(),Yw(n,g);break}n.timeoutHandle=Yv(Tl.bind(null,n,Pr,Ha),u);break}}Tl(n,Pr,Ha);break}case ed:{if(Lo(n,o),MM(o))break;if(!DE()){var b=kM(n,o),w=b,S=Oi()-w,D=tP(S)-S;if(D>10){n.timeoutHandle=Yv(Tl.bind(null,n,Pr,Ha),D);break}}Tl(n,Pr,Ha);break}case oE:{Tl(n,Pr,Ha);break}default:throw new Error("Unknown root exit status.")}}function BB(n){for(var i=n;;){if(i.flags&Ig){var o=i.updateQueue;if(o!==null){var u=o.stores;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d],b=g.getSnapshot,w=g.value;try{if(!Kr(b(),w))return!1}catch{return!1}}}}var S=i.child;if(i.subtreeFlags&Ig&&S!==null){S.return=i,i=S;continue}if(i===n)return!0;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}return!0}function Lo(n,i){i=kf(i,Zp),i=kf(i,nd),BM(n,i)}function pE(n){if(Qj(),(ln&(nr|vs))!==wi)throw new Error("Should not already be working.");qa();var i=Sf(n,Te);if(!Hr(i,Mt))return Vr(n,Oi()),null;var o=sm(n,i);if(n.tag!==xo&&o===Dl){var u=mv(n);u!==Te&&(i=u,o=X0(n,u))}if(o===Qh){var d=td;throw Al(n,Te),Lo(n,i),Vr(n,Oi()),d}if(o===U0)throw new Error("Root did not complete. This is a bug in React.");var g=n.current.alternate;return n.finishedWork=g,n.finishedLanes=i,Tl(n,Pr,Ha),Vr(n,Oi()),null}function PB(n,i){i!==Te&&(_v(n,Jt(i,Mt)),Vr(n,Oi()),(ln&(nr|vs))===wi&&(rd(),So()))}function Z0(n,i){var o=ln;ln|=aE;try{return n(i)}finally{ln=o,ln===wi&&!Vs.isBatchingLegacy&&(rd(),hS())}}function VB(n,i,o,u,d){var g=Cs(),b=tr.transition;try{return tr.transition=null,Bi(Wr),n(i,o,u,d)}finally{Bi(g),tr.transition=b,ln===wi&&rd()}}function Wa(n){Oo!==null&&Oo.tag===xo&&(ln&(nr|vs))===wi&&qa();var i=ln;ln|=aE;var o=tr.transition,u=Cs();try{return tr.transition=null,Bi(Wr),n?n():void 0}finally{Bi(u),tr.transition=o,ln=i,(ln&(nr|vs))===wi&&So()}}function mE(){return(ln&(nr|vs))!==wi}function rm(n,i){hr(H0,na,n),na=Jt(na,i)}function Q0(n){na=H0.current,ur(H0,n)}function Al(n,i){n.finishedWork=null,n.finishedLanes=Te;var o=n.timeoutHandle;if(o!==Gv&&(n.timeoutHandle=Gv,h2(o)),Yn!==null)for(var u=Yn.return;u!==null;){var d=u.alternate;H1(d,u),u=u.return}Nr=n;var g=Ml(n.current,null);return Yn=g,xi=na=i,Si=Ua,td=null,Xp=Te,nd=Te,Zp=Te,id=null,Pr=null,Oj(),As.discardPendingWarnings(),g}function gE(n,i){do{var o=Yn;try{if(pp(),FS(),Ae(),$0.current=null,o===null||o.return===null){Si=Qh,td=i,Yn=null;return}if(ye&&o.mode&Sn&&Up(o,!0),ge)if(yc(),i!==null&&typeof i=="object"&&typeof i.then=="function"){var u=i;pM(o,u,xi)}else fM(o,i,xi);lL(n,o.return,o,i,xi),yE(o)}catch(d){i=d,Yn===o&&o!==null?(o=o.return,Yn=o):o=Yn;continue}return}while(!0)}function vE(){var n=z0.current;return z0.current=Vp,n===null?Vp:n}function bE(n){z0.current=n}function IB(){W0=Oi()}function ld(n){Xp=Jt(n,Xp)}function FB(){Si===Ua&&(Si=Jp)}function e_(){(Si===Ua||Si===Jp||Si===Dl)&&(Si=ed),Nr!==null&&(gv(Xp)||gv(nd))&&Lo(Nr,xi)}function zB(n){Si!==ed&&(Si=Dl),id===null?id=[n]:id.push(n)}function $B(){return Si===Ua}function sm(n,i){var o=ln;ln|=nr;var u=vE();if(Nr!==n||xi!==i){if(ks){var d=n.memoizedUpdaters;d.size>0&&(cd(n,xi),d.clear()),Jw(n,i)}Ha=Xw(),Al(n,i)}Iw(i);do try{UB();break}catch(g){gE(n,g)}while(!0);if(pp(),ln=o,bE(u),Yn!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Fw(),Nr=null,xi=Te,Si}function UB(){for(;Yn!==null;)_E(Yn)}function HB(n,i){var o=ln;ln|=nr;var u=vE();if(Nr!==n||xi!==i){if(ks){var d=n.memoizedUpdaters;d.size>0&&(cd(n,xi),d.clear()),Jw(n,i)}Ha=Xw(),rd(),Al(n,i)}Iw(i);do try{WB();break}catch(g){gE(n,g)}while(!0);return pp(),bE(u),ln=o,Yn!==null?(_M(),Ua):(Fw(),Nr=null,xi=Te,Si)}function WB(){for(;Yn!==null&&!KT();)_E(Yn)}function _E(n){var i=n.alternate;qe(n);var o;(n.mode&Sn)!==wt?(i0(n),o=t_(i,n,na),Up(n,!0)):o=t_(i,n,na),Ae(),n.memoizedProps=n.pendingProps,o===null?yE(n):Yn=o,$0.current=null}function yE(n){var i=n;do{var o=i.alternate,u=i.return;if((i.flags&_f)===Ct){qe(i);var d=void 0;if((i.mode&Sn)===wt?d=U1(o,i,na):(i0(i),d=U1(o,i,na),Up(i,!1)),Ae(),d!==null){Yn=d;return}}else{var g=FL(o,i);if(g!==null){g.flags&=zT,Yn=g;return}if((i.mode&Sn)!==wt){Up(i,!1);for(var b=i.actualDuration,w=i.child;w!==null;)b+=w.actualDuration,w=w.sibling;i.actualDuration=b}if(u!==null)u.flags|=_f,u.subtreeFlags=Ct,u.deletions=null;else{Si=U0,Yn=null;return}}var S=i.sibling;if(S!==null){Yn=S;return}i=u,Yn=i}while(i!==null);Si===Ua&&(Si=oE)}function Tl(n,i,o){var u=Cs(),d=tr.transition;try{tr.transition=null,Bi(Wr),qB(n,i,o,u)}finally{tr.transition=d,Bi(u)}return null}function qB(n,i,o,u){do qa();while(Oo!==null);if(iP(),(ln&(nr|vs))!==wi)throw new Error("Should not already be working.");var d=n.finishedWork,g=n.finishedLanes;if(aM(g),d===null)return Bw(),null;if(g===Te&&c("root.finishedLanes should not be empty during a commit. This is a bug in React."),n.finishedWork=null,n.finishedLanes=Te,d===n.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.");n.callbackNode=null,n.callbackPriority=Li;var b=Jt(d.lanes,d.childLanes);PM(n,b),n===Nr&&(Nr=null,Yn=null,xi=Te),((d.subtreeFlags&bc)!==Ct||(d.flags&bc)!==Ct)&&(Rl||(Rl=!0,Y0=o,r_(ul,function(){return qa(),null})));var w=(d.subtreeFlags&(Hg|Wg|qu|bc))!==Ct,S=(d.flags&(Hg|Wg|qu|bc))!==Ct;if(w||S){var D=tr.transition;tr.transition=null;var M=Cs();Bi(Wr);var W=ln;ln|=vs,$0.current=null,WL(n,d),h1(),sB(n,d,g),r2(n.containerInfo),n.current=d,mM(g),aB(d,n,g),gM(),YT(),ln=W,Bi(M),tr.transition=D}else n.current=d,h1();var H=Rl;if(Rl?(Rl=!1,Oo=n,sd=g):(eu=0,tm=null),b=n.pendingLanes,b===Te&&(Qc=null),H||SE(n.current,!1),tM(d.stateNode,u),ks&&n.memoizedUpdaters.clear(),EB(),Vr(n,Oi()),i!==null)for(var se=n.onRecoverableError,oe=0;oe<i.length;oe++){var de=i[oe],Ge=de.stack,_t=de.digest;se(de.value,{componentStack:Ge,digest:_t})}if(Qp){Qp=!1;var ut=q0;throw q0=null,ut}return Hr(sd,Mt)&&n.tag!==xo&&qa(),b=n.pendingLanes,Hr(b,Mt)?(Xj(),n===G0?ad++:(ad=0,G0=n)):ad=0,So(),Bw(),null}function qa(){if(Oo!==null){var n=Zw(sd),i=zM(La,n),o=tr.transition,u=Cs();try{return tr.transition=null,Bi(i),YB()}finally{Bi(u),tr.transition=o}}return!1}function KB(n){K0.push(n),Rl||(Rl=!0,r_(ul,function(){return qa(),null}))}function YB(){if(Oo===null)return!1;var n=Y0;Y0=null;var i=Oo,o=sd;if(Oo=null,sd=Te,(ln&(nr|vs))!==wi)throw new Error("Cannot flush passive effects while already rendering.");J0=!0,em=!1,vM(o);var u=ln;ln|=vs,fB(i.current),cB(i,i.current,o,n);{var d=K0;K0=[];for(var g=0;g<d.length;g++){var b=d[g];GL(i,b)}}bM(),SE(i.current,!0),ln=u,So(),em?i===tm?eu++:(eu=0,tm=i):eu=0,J0=!1,em=!1,nM(i);{var w=i.current.stateNode;w.effectDuration=0,w.passiveEffectDuration=0}return!0}function NE(n){return Qc!==null&&Qc.has(n)}function GB(n){Qc===null?Qc=new Set([n]):Qc.add(n)}function JB(n){Qp||(Qp=!0,q0=n)}var XB=JB;function wE(n,i,o){var u=kl(o,i),d=_1(n,u,Mt),g=ko(n,d,Mt),b=wr();g!==null&&(eh(g,Mt,b),Vr(g,b))}function On(n,i,o){if($L(o),ud(!1),n.tag===y){wE(n,n,o);return}var u=null;for(u=i;u!==null;){if(u.tag===y){wE(u,n,o);return}else if(u.tag===m){var d=u.type,g=u.stateNode;if(typeof d.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&!NE(g)){var b=kl(o,n),w=N0(u,b,Mt),S=ko(u,w,Mt),D=wr();S!==null&&(eh(S,Mt,D),Vr(S,D));return}}u=u.return}c(`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`,o)}function ZB(n,i,o){var u=n.pingCache;u!==null&&u.delete(i);var d=wr();Yw(n,o),oP(n),Nr===n&&Sc(xi,o)&&(Si===ed||Si===Jp&&Hw(xi)&&Oi()-W0<lE?Al(n,Te):Zp=Jt(Zp,o)),Vr(n,d)}function xE(n,i){i===Li&&(i=MB(n));var o=wr(),u=Lr(n,i);u!==null&&(eh(u,i,o),Vr(u,o))}function QB(n){var i=n.memoizedState,o=Li;i!==null&&(o=i.retryLane),xE(n,o)}function eP(n,i){var o=Li,u;switch(n.tag){case B:u=n.stateNode;var d=n.memoizedState;d!==null&&(o=d.retryLane);break;case pe:u=n.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}u!==null&&u.delete(i),xE(n,o)}function tP(n){return n<120?120:n<480?480:n<1080?1080:n<1920?1920:n<3e3?3e3:n<4320?4320:DB(n/1960)*1960}function nP(){if(ad>AB)throw ad=0,G0=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.");eu>TB&&(eu=0,tm=null,c("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 iP(){As.flushLegacyContextWarning(),As.flushPendingUnsafeLifecycleWarnings()}function SE(n,i){qe(n),am(n,po,wB),i&&am(n,Ug,xB),am(n,po,yB),i&&am(n,Ug,NB),Ae()}function am(n,i,o){for(var u=n,d=null;u!==null;){var g=u.subtreeFlags&i;u!==d&&u.child!==null&&g!==Ct?u=u.child:((u.flags&i)!==Ct&&o(u),u.sibling!==null?u=u.sibling:u=d=u.return)}}var om=null;function EE(n){{if((ln&nr)!==wi||!(n.mode&on))return;var i=n.tag;if(i!==v&&i!==y&&i!==m&&i!==p&&i!==O&&i!==U&&i!==ce)return;var o=Rt(n)||"ReactComponent";if(om!==null){if(om.has(o))return;om.add(o)}else om=new Set([o]);var u=Ce;try{qe(n),c("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{u?qe(n):Ae()}}}var t_;{var rP=null;t_=function(n,i,o){var u=OE(rP,i);try{return V1(n,i,o)}catch(g){if(gj()||g!==null&&typeof g=="object"&&typeof g.then=="function")throw g;if(pp(),FS(),H1(n,i),OE(i,u),i.mode&Sn&&i0(i),Pg(null,V1,null,n,i,o),VT()){var d=Vg();typeof d=="object"&&d!==null&&d._suppressLogging&&typeof g=="object"&&g!==null&&!g._suppressLogging&&(g._suppressLogging=!0)}throw g}}}var kE=!1,n_;n_=new Set;function sP(n){if(A&&!Yj())switch(n.tag){case p:case O:case ce:{var i=Yn&&Rt(Yn)||"Unknown",o=i;if(!n_.has(o)){n_.add(o);var u=Rt(n)||"Unknown";c("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",u,i,i)}break}case m:{kE||(c("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),kE=!0);break}}}function cd(n,i){if(ks){var o=n.memoizedUpdaters;o.forEach(function(u){Gw(n,u,i)})}}var i_={};function r_(n,i){{var o=Vs.current;return o!==null?(o.push(i),i_):Lw(n,i)}}function CE(n){if(n!==i_)return qT(n)}function DE(){return Vs.current!==null}function aP(n){{if(n.mode&on){if(!sE())return}else if(!CB()||ln!==wi||n.tag!==p&&n.tag!==O&&n.tag!==ce)return;if(Vs.current===null){var i=Ce;try{qe(n),c(`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`,Rt(n))}finally{i?qe(n):Ae()}}}}function oP(n){n.tag!==xo&&sE()&&Vs.current===null&&c(`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 ud(n){hE=n}var bs=null,tu=null,lP=function(n){bs=n};function nu(n){{if(bs===null)return n;var i=bs(n);return i===void 0?n:i.current}}function s_(n){return nu(n)}function a_(n){{if(bs===null)return n;var i=bs(n);if(i===void 0){if(n!=null&&typeof n.render=="function"){var o=nu(n.render);if(n.render!==o){var u={$$typeof:lt,render:o};return n.displayName!==void 0&&(u.displayName=n.displayName),u}}return n}return i.current}}function RE(n,i){{if(bs===null)return!1;var o=n.elementType,u=i.type,d=!1,g=typeof u=="object"&&u!==null?u.$$typeof:null;switch(n.tag){case m:{typeof u=="function"&&(d=!0);break}case p:{(typeof u=="function"||g===Ue)&&(d=!0);break}case O:{(g===lt||g===Ue)&&(d=!0);break}case U:case ce:{(g===Ft||g===Ue)&&(d=!0);break}default:return!1}if(d){var b=bs(o);if(b!==void 0&&b===bs(u))return!0}return!1}}function AE(n){{if(bs===null||typeof WeakSet!="function")return;tu===null&&(tu=new WeakSet),tu.add(n)}}var cP=function(n,i){{if(bs===null)return;var o=i.staleFamilies,u=i.updatedFamilies;qa(),Wa(function(){o_(n.current,u,o)})}},uP=function(n,i){{if(n.context!==Yr)return;qa(),Wa(function(){hd(i,n,null,null)})}};function o_(n,i,o){{var u=n.alternate,d=n.child,g=n.sibling,b=n.tag,w=n.type,S=null;switch(b){case p:case ce:case m:S=w;break;case O:S=w.render;break}if(bs===null)throw new Error("Expected resolveFamily to be set during hot reload.");var D=!1,M=!1;if(S!==null){var W=bs(S);W!==void 0&&(o.has(W)?M=!0:i.has(W)&&(b===m?M=!0:D=!0))}if(tu!==null&&(tu.has(n)||u!==null&&tu.has(u))&&(M=!0),M&&(n._debugNeedsRemount=!0),M||D){var H=Lr(n,Mt);H!==null&&Ei(H,n,Mt,Vn)}d!==null&&!M&&o_(d,i,o),g!==null&&o_(g,i,o)}}var hP=function(n,i){{var o=new Set,u=new Set(i.map(function(d){return d.current}));return l_(n.current,u,o),o}};function l_(n,i,o){{var u=n.child,d=n.sibling,g=n.tag,b=n.type,w=null;switch(g){case p:case ce:case m:w=b;break;case O:w=b.render;break}var S=!1;w!==null&&i.has(w)&&(S=!0),S?dP(n,o):u!==null&&l_(u,i,o),d!==null&&l_(d,i,o)}}function dP(n,i){{var o=fP(n,i);if(o)return;for(var u=n;;){switch(u.tag){case N:i.add(u.stateNode);return;case x:i.add(u.stateNode.containerInfo);return;case y:i.add(u.stateNode.containerInfo);return}if(u.return===null)throw new Error("Expected to reach root first.");u=u.return}}}function fP(n,i){for(var o=n,u=!1;;){if(o.tag===N)u=!0,i.add(o.stateNode);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)return u;for(;o.sibling===null;){if(o.return===null||o.return===n)return u;o=o.return}o.sibling.return=o.return,o=o.sibling}return!1}var c_;{c_=!1;try{var TE=Object.preventExtensions({})}catch{c_=!0}}function pP(n,i,o,u){this.tag=n,this.key=o,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=i,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=u,this.flags=Ct,this.subtreeFlags=Ct,this.deletions=null,this.lanes=Te,this.childLanes=Te,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,!c_&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Gr=function(n,i,o,u){return new pP(n,i,o,u)};function u_(n){var i=n.prototype;return!!(i&&i.isReactComponent)}function mP(n){return typeof n=="function"&&!u_(n)&&n.defaultProps===void 0}function gP(n){if(typeof n=="function")return u_(n)?m:p;if(n!=null){var i=n.$$typeof;if(i===lt)return O;if(i===Ft)return U}return v}function Ml(n,i){var o=n.alternate;o===null?(o=Gr(n.tag,i,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o._debugSource=n._debugSource,o._debugOwner=n._debugOwner,o._debugHookTypes=n._debugHookTypes,o.alternate=n,n.alternate=o):(o.pendingProps=i,o.type=n.type,o.flags=Ct,o.subtreeFlags=Ct,o.deletions=null,o.actualDuration=0,o.actualStartTime=-1),o.flags=n.flags&Ma,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue;var u=n.dependencies;switch(o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.selfBaseDuration=n.selfBaseDuration,o.treeBaseDuration=n.treeBaseDuration,o._debugNeedsRemount=n._debugNeedsRemount,o.tag){case v:case p:case ce:o.type=nu(n.type);break;case m:o.type=s_(n.type);break;case O:o.type=a_(n.type);break}return o}function vP(n,i){n.flags&=Ma|fi;var o=n.alternate;if(o===null)n.childLanes=Te,n.lanes=i,n.child=null,n.subtreeFlags=Ct,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null,n.selfBaseDuration=0,n.treeBaseDuration=0;else{n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=Ct,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type;var u=o.dependencies;n.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},n.selfBaseDuration=o.selfBaseDuration,n.treeBaseDuration=o.treeBaseDuration}return n}function bP(n,i,o){var u;return n===rp?(u=on,i===!0&&(u|=Zn,u|=qs)):u=wt,ks&&(u|=Sn),Gr(y,null,null,u)}function h_(n,i,o,u,d,g){var b=v,w=n;if(typeof n=="function")u_(n)?(b=m,w=s_(w)):w=nu(w);else if(typeof n=="string")b=N;else e:switch(n){case Mn:return Bo(o.children,d,g,i);case Ar:b=j,d|=Zn,(d&on)!==wt&&(d|=qs);break;case I:return _P(o,d,g,i);case Lt:return yP(o,d,g,i);case ct:return NP(o,d,g,i);case pn:return ME(o,d,g,i);case li:case xt:case ci:case ui:case Zt:default:{if(typeof n=="object"&&n!==null)switch(n.$$typeof){case Ne:b=P;break e;case Be:b=L;break e;case lt:b=O,w=a_(w);break e;case Ft:b=U;break e;case Ue:b=re,w=null;break e}var S="";{(n===void 0||typeof n=="object"&&n!==null&&Object.keys(n).length===0)&&(S+=" 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 D=u?Rt(u):null;D&&(S+=`
|
|
197
|
+
|
|
198
|
+
Check the render method of \``+D+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(n==null?n:typeof n)+"."+S))}}var M=Gr(b,o,i,d);return M.elementType=n,M.type=w,M.lanes=g,M._debugOwner=u,M}function d_(n,i,o){var u=null;u=n._owner;var d=n.type,g=n.key,b=n.props,w=h_(d,g,b,u,i,o);return w._debugSource=n._source,w._debugOwner=n._owner,w}function Bo(n,i,o,u){var d=Gr(k,n,u,i);return d.lanes=o,d}function _P(n,i,o,u){typeof n.id!="string"&&c('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof n.id);var d=Gr(T,n,u,i|Sn);return d.elementType=I,d.lanes=o,d.stateNode={effectDuration:0,passiveEffectDuration:0},d}function yP(n,i,o,u){var d=Gr(B,n,u,i);return d.elementType=Lt,d.lanes=o,d}function NP(n,i,o,u){var d=Gr(pe,n,u,i);return d.elementType=ct,d.lanes=o,d}function ME(n,i,o,u){var d=Gr(C,n,u,i);d.elementType=pn,d.lanes=o;var g={isHidden:!1};return d.stateNode=g,d}function f_(n,i,o){var u=Gr(_,n,null,i);return u.lanes=o,u}function wP(){var n=Gr(N,null,null,wt);return n.elementType="DELETED",n}function xP(n){var i=Gr(ve,null,null,wt);return i.stateNode=n,i}function p_(n,i,o){var u=n.children!==null?n.children:[],d=Gr(x,u,n.key,i);return d.lanes=o,d.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},d}function OE(n,i){return n===null&&(n=Gr(v,null,null,wt)),n.tag=i.tag,n.key=i.key,n.elementType=i.elementType,n.type=i.type,n.stateNode=i.stateNode,n.return=i.return,n.child=i.child,n.sibling=i.sibling,n.index=i.index,n.ref=i.ref,n.pendingProps=i.pendingProps,n.memoizedProps=i.memoizedProps,n.updateQueue=i.updateQueue,n.memoizedState=i.memoizedState,n.dependencies=i.dependencies,n.mode=i.mode,n.flags=i.flags,n.subtreeFlags=i.subtreeFlags,n.deletions=i.deletions,n.lanes=i.lanes,n.childLanes=i.childLanes,n.alternate=i.alternate,n.actualDuration=i.actualDuration,n.actualStartTime=i.actualStartTime,n.selfBaseDuration=i.selfBaseDuration,n.treeBaseDuration=i.treeBaseDuration,n._debugSource=i._debugSource,n._debugOwner=i._debugOwner,n._debugNeedsRemount=i._debugNeedsRemount,n._debugHookTypes=i._debugHookTypes,n}function SP(n,i,o,u,d){this.tag=i,this.containerInfo=n,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Gv,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=Li,this.eventTimes=bv(Te),this.expirationTimes=bv(Vn),this.pendingLanes=Te,this.suspendedLanes=Te,this.pingedLanes=Te,this.expiredLanes=Te,this.mutableReadLanes=Te,this.finishedLanes=Te,this.entangledLanes=Te,this.entanglements=bv(Te),this.identifierPrefix=u,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var g=this.pendingUpdatersLaneMap=[],b=0;b<Gg;b++)g.push(new Set)}switch(i){case rp:this._debugRootType=o?"hydrateRoot()":"createRoot()";break;case xo:this._debugRootType=o?"hydrate()":"render()";break}}function jE(n,i,o,u,d,g,b,w,S,D){var M=new SP(n,i,o,w,S),W=bP(i,g);M.current=W,W.stateNode=M;{var H={element:u,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null};W.memoizedState=H}return Cb(W),M}var m_="18.3.1";function EP(n,i,o){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return un(u),{$$typeof:oi,key:u==null?null:""+u,children:n,containerInfo:i,implementation:o}}var g_,v_;g_=!1,v_={};function LE(n){if(!n)return Yr;var i=mc(n),o=oj(i);if(i.tag===m){var u=i.type;if(Gs(u))return lS(i,u,o)}return o}function kP(n,i){{var o=mc(n);if(o===void 0){if(typeof n.render=="function")throw new Error("Unable to find node on an unmounted component.");var u=Object.keys(n).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+u)}var d=Mw(o);if(d===null)return null;if(d.mode&Zn){var g=Rt(o)||"Component";if(!v_[g]){v_[g]=!0;var b=Ce;try{qe(d),o.mode&Zn?c("%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",i,i,g):c("%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",i,i,g)}finally{b?qe(b):Ae()}}}return d.stateNode}}function BE(n,i,o,u,d,g,b,w){var S=!1,D=null;return jE(n,i,S,D,o,u,d,g,b)}function PE(n,i,o,u,d,g,b,w,S,D){var M=!0,W=jE(o,u,M,n,d,g,b,w,S);W.context=LE(null);var H=W.current,se=wr(),oe=jo(H),de=za(se,oe);return de.callback=i??null,ko(H,de,oe),OB(W,oe,se),W}function hd(n,i,o,u){eM(i,n);var d=i.current,g=wr(),b=jo(d);yM(b);var w=LE(o);i.context===null?i.context=w:i.pendingContext=w,A&&Ce!==null&&!g_&&(g_=!0,c(`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.`,Rt(Ce)||"Unknown"));var S=za(g,b);S.payload={element:n},u=u===void 0?null:u,u!==null&&(typeof u!="function"&&c("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",u),S.callback=u);var D=ko(d,S,b);return D!==null&&(Ei(D,d,b,g),_p(D,d,b)),b}function lm(n){var i=n.current;if(!i.child)return null;switch(i.child.tag){case N:return i.child.stateNode;default:return i.child.stateNode}}function CP(n){switch(n.tag){case y:{var i=n.stateNode;if(Df(i)){var o=RM(i);PB(i,o)}break}case B:{Wa(function(){var d=Lr(n,Mt);if(d!==null){var g=wr();Ei(d,n,Mt,g)}});var u=Mt;b_(n,u);break}}}function VE(n,i){var o=n.memoizedState;o!==null&&o.dehydrated!==null&&(o.retryLane=LM(o.retryLane,i))}function b_(n,i){VE(n,i);var o=n.alternate;o&&VE(o,i)}function DP(n){if(n.tag===B){var i=Ju,o=Lr(n,i);if(o!==null){var u=wr();Ei(o,n,i,u)}b_(n,i)}}function RP(n){if(n.tag===B){var i=jo(n),o=Lr(n,i);if(o!==null){var u=wr();Ei(o,n,i,u)}b_(n,i)}}function IE(n){var i=WT(n);return i===null?null:i.stateNode}var FE=function(n){return null};function AP(n){return FE(n)}var zE=function(n){return!1};function TP(n){return zE(n)}var $E=null,UE=null,HE=null,WE=null,qE=null,KE=null,YE=null,GE=null,JE=null;{var XE=function(n,i,o){var u=i[o],d=Qt(n)?n.slice():zt({},n);return o+1===i.length?(Qt(d)?d.splice(u,1):delete d[u],d):(d[u]=XE(n[u],i,o+1),d)},ZE=function(n,i){return XE(n,i,0)},QE=function(n,i,o,u){var d=i[u],g=Qt(n)?n.slice():zt({},n);if(u+1===i.length){var b=o[u];g[b]=g[d],Qt(g)?g.splice(d,1):delete g[d]}else g[d]=QE(n[d],i,o,u+1);return g},ek=function(n,i,o){if(i.length!==o.length){l("copyWithRename() expects paths of the same length");return}else for(var u=0;u<o.length-1;u++)if(i[u]!==o[u]){l("copyWithRename() expects paths to be the same except for the deepest key");return}return QE(n,i,o,0)},tk=function(n,i,o,u){if(o>=i.length)return u;var d=i[o],g=Qt(n)?n.slice():zt({},n);return g[d]=tk(n[d],i,o+1,u),g},nk=function(n,i,o){return tk(n,i,0,o)},__=function(n,i){for(var o=n.memoizedState;o!==null&&i>0;)o=o.next,i--;return o};$E=function(n,i,o,u){var d=__(n,i);if(d!==null){var g=nk(d.memoizedState,o,u);d.memoizedState=g,d.baseState=g,n.memoizedProps=zt({},n.memoizedProps);var b=Lr(n,Mt);b!==null&&Ei(b,n,Mt,Vn)}},UE=function(n,i,o){var u=__(n,i);if(u!==null){var d=ZE(u.memoizedState,o);u.memoizedState=d,u.baseState=d,n.memoizedProps=zt({},n.memoizedProps);var g=Lr(n,Mt);g!==null&&Ei(g,n,Mt,Vn)}},HE=function(n,i,o,u){var d=__(n,i);if(d!==null){var g=ek(d.memoizedState,o,u);d.memoizedState=g,d.baseState=g,n.memoizedProps=zt({},n.memoizedProps);var b=Lr(n,Mt);b!==null&&Ei(b,n,Mt,Vn)}},WE=function(n,i,o){n.pendingProps=nk(n.memoizedProps,i,o),n.alternate&&(n.alternate.pendingProps=n.pendingProps);var u=Lr(n,Mt);u!==null&&Ei(u,n,Mt,Vn)},qE=function(n,i){n.pendingProps=ZE(n.memoizedProps,i),n.alternate&&(n.alternate.pendingProps=n.pendingProps);var o=Lr(n,Mt);o!==null&&Ei(o,n,Mt,Vn)},KE=function(n,i,o){n.pendingProps=ek(n.memoizedProps,i,o),n.alternate&&(n.alternate.pendingProps=n.pendingProps);var u=Lr(n,Mt);u!==null&&Ei(u,n,Mt,Vn)},YE=function(n){var i=Lr(n,Mt);i!==null&&Ei(i,n,Mt,Vn)},GE=function(n){FE=n},JE=function(n){zE=n}}function MP(n){var i=Mw(n);return i===null?null:i.stateNode}function OP(n){return null}function jP(){return Ce}function LP(n){var i=n.findFiberByHostInstance,o=r.ReactCurrentDispatcher;return QT({bundleType:n.bundleType,version:n.version,rendererPackageName:n.rendererPackageName,rendererConfig:n.rendererConfig,overrideHookState:$E,overrideHookStateDeletePath:UE,overrideHookStateRenamePath:HE,overrideProps:WE,overridePropsDeletePath:qE,overridePropsRenamePath:KE,setErrorHandler:GE,setSuspenseHandler:JE,scheduleUpdate:YE,currentDispatcherRef:o,findHostInstanceByFiber:MP,findFiberByHostInstance:i||OP,findHostInstancesForRefresh:hP,scheduleRefresh:cP,scheduleRoot:uP,setRefreshHandler:lP,getCurrentFiber:jP,reconcilerVersion:m_})}var ik=typeof reportError=="function"?reportError:function(n){console.error(n)};function y_(n){this._internalRoot=n}cm.prototype.render=y_.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?c("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):um(arguments[1])?c("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"&&c("You passed a second argument to root.render(...) but it only accepts one argument.");var o=i.containerInfo;if(o.nodeType!==di){var u=IE(i.current);u&&u.parentNode!==o&&c("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.")}}hd(n,i,null,null)},cm.prototype.unmount=y_.prototype.unmount=function(){typeof arguments[0]=="function"&&c("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;mE()&&c("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."),Wa(function(){hd(null,n,null,null)}),iS(i)}};function BP(n,i){if(!um(n))throw new Error("createRoot(...): Target container is not a DOM element.");rk(n);var o=!1,u=!1,d="",g=ik;i!=null&&(i.hydrate?l("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof i=="object"&&i!==null&&i.$$typeof===Hn&&c(`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 />);`),i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onRecoverableError!==void 0&&(g=i.onRecoverableError),i.transitionCallbacks!==void 0&&i.transitionCallbacks);var b=BE(n,rp,null,o,u,d,g);Xf(b.current,n);var w=n.nodeType===di?n.parentNode:n;return vh(w),new y_(b)}function cm(n){this._internalRoot=n}function PP(n){n&&ZM(n)}cm.prototype.unstable_scheduleHydration=PP;function VP(n,i,o){if(!um(n))throw new Error("hydrateRoot(...): Target container is not a DOM element.");rk(n),i===void 0&&c("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var u=o??null,d=o!=null&&o.hydratedSources||null,g=!1,b=!1,w="",S=ik;o!=null&&(o.unstable_strictMode===!0&&(g=!0),o.identifierPrefix!==void 0&&(w=o.identifierPrefix),o.onRecoverableError!==void 0&&(S=o.onRecoverableError));var D=PE(i,null,n,rp,u,g,b,w,S);if(Xf(D.current,n),vh(n),d)for(var M=0;M<d.length;M++){var W=d[M];$j(D,W)}return new cm(D)}function um(n){return!!(n&&(n.nodeType===Or||n.nodeType===Ra||n.nodeType===kg))}function dd(n){return!!(n&&(n.nodeType===Or||n.nodeType===Ra||n.nodeType===kg||n.nodeType===di&&n.nodeValue===" react-mount-point-unstable "))}function rk(n){n.nodeType===Or&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("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."),Dh(n)&&(n._reactRootContainer?c("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):c("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 IP=r.ReactCurrentOwner,sk;sk=function(n){if(n._reactRootContainer&&n.nodeType!==di){var i=IE(n._reactRootContainer.current);i&&i.parentNode!==n&&c("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 o=!!n._reactRootContainer,u=N_(n),d=!!(u&&No(u));d&&!o&&c("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."),n.nodeType===Or&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("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 N_(n){return n?n.nodeType===Ra?n.documentElement:n.firstChild:null}function ak(){}function FP(n,i,o,u,d){if(d){if(typeof u=="function"){var g=u;u=function(){var H=lm(b);g.call(H)}}var b=PE(i,u,n,xo,null,!1,!1,"",ak);n._reactRootContainer=b,Xf(b.current,n);var w=n.nodeType===di?n.parentNode:n;return vh(w),Wa(),b}else{for(var S;S=n.lastChild;)n.removeChild(S);if(typeof u=="function"){var D=u;u=function(){var H=lm(M);D.call(H)}}var M=BE(n,xo,null,!1,!1,"",ak);n._reactRootContainer=M,Xf(M.current,n);var W=n.nodeType===di?n.parentNode:n;return vh(W),Wa(function(){hd(i,M,o,u)}),M}}function zP(n,i){n!==null&&typeof n!="function"&&c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",i,n)}function hm(n,i,o,u,d){sk(o),zP(d===void 0?null:d,"render");var g=o._reactRootContainer,b;if(!g)b=FP(o,i,n,d,u);else{if(b=g,typeof d=="function"){var w=d;d=function(){var S=lm(b);w.call(S)}}hd(i,b,n,d)}return lm(b)}var ok=!1;function $P(n){{ok||(ok=!0,c("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 i=IP.current;if(i!==null&&i.stateNode!==null){var o=i.stateNode._warnedAboutRefsInRender;o||c("%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.",hn(i.type)||"A component"),i.stateNode._warnedAboutRefsInRender=!0}}return n==null?null:n.nodeType===Or?n:kP(n,"findDOMNode")}function UP(n,i,o){if(c("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"),!dd(i))throw new Error("Target container is not a DOM element.");{var u=Dh(i)&&i._reactRootContainer===void 0;u&&c("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 hm(null,n,i,!0,o)}function HP(n,i,o){if(c("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"),!dd(i))throw new Error("Target container is not a DOM element.");{var u=Dh(i)&&i._reactRootContainer===void 0;u&&c("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 hm(null,n,i,!1,o)}function WP(n,i,o,u){if(c("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"),!dd(o))throw new Error("Target container is not a DOM element.");if(n==null||!IT(n))throw new Error("parentComponent must be a valid React Component");return hm(n,i,o,!1,u)}var lk=!1;function qP(n){if(lk||(lk=!0,c("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")),!dd(n))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var i=Dh(n)&&n._reactRootContainer===void 0;i&&c("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(n._reactRootContainer){{var o=N_(n),u=o&&!No(o);u&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Wa(function(){hm(null,null,n,!1,function(){n._reactRootContainer=null,iS(n)})}),!0}else{{var d=N_(n),g=!!(d&&No(d)),b=n.nodeType===Or&&dd(n.parentNode)&&!!n.parentNode._reactRootContainer;g&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",b?"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}}$M(CP),HM(DP),WM(RP),qM(Cs),KM(IM),(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")&&c("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"),DT(YO),TT(Z0,VB,Wa);function KP(n,i){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!um(i))throw new Error("Target container is not a DOM element.");return EP(n,i,null,o)}function YP(n,i,o,u){return WP(n,i,o,u)}var w_={usingClientEntryPoint:!1,Events:[No,Oc,Zf,_w,yw,Z0]};function GP(n,i){return w_.usingClientEntryPoint||c('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),BP(n,i)}function JP(n,i,o){return w_.usingClientEntryPoint||c('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),VP(n,i,o)}function XP(n){return mE()&&c("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."),Wa(n)}var ZP=LP({findFiberByHostInstance:vl,bundleType:1,version:m_,rendererPackageName:"react-dom"});if(!ZP&&Et&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var ck=window.location.protocol;/^(https?|file):$/.test(ck)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(ck==="file:"?`
|
|
204
|
+
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}es.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=w_,es.createPortal=KP,es.createRoot=GP,es.findDOMNode=$P,es.flushSync=XP,es.hydrate=UP,es.hydrateRoot=JP,es.render=HP,es.unmountComponentAtNode=qP,es.unstable_batchedUpdates=Z0,es.unstable_renderSubtreeIntoContainer=YP,es.version=m_,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();PD.exports=es;var Id=PD.exports,FD,hk=Id;{var dk=hk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;FD=function(e,t){dk.usingClientEntryPoint=!0;try{return hk.createRoot(e,t)}finally{dk.usingClientEntryPoint=!1}}}function Fd(e,t,r){const s=R.useRef(t);s.current=t;const a=R.useRef(r);a.current=r,R.useEffect(()=>{if(!e)return;const l=p=>s.current.some(m=>m.current&&p instanceof Node&&m.current.contains(p)),c=p=>{l(p.target)||a.current()},f=p=>{p.key==="Escape"&&!p.defaultPrevented&&a.current()};return document.addEventListener("pointerdown",c,!0),document.addEventListener("keydown",f),()=>{document.removeEventListener("pointerdown",c,!0),document.removeEventListener("keydown",f)}},[e])}function Au(e,t){const r=R.useRef(t);r.current=t,R.useEffect(()=>{if(!e)return;const s=a=>{a.key==="Escape"&&!a.defaultPrevented&&r.current()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e])}function fk(e,t){const r=t==null?void 0:t.messageId;return typeof r=="string"&&r?`${e}:${r}`:null}function aV(e,t){return e===t||e.replace(/\s+/g,"")===t.replace(/\s+/g,"")}function oV(e,t){const r=t.delta;if(r===void 0)return e===void 0?{action:"create",text:t.text}:t.key?aV(e,t.text)?{action:"skip"}:{action:"replace",text:t.text}:{action:"append",add:t.text};if(e===void 0)return{action:"create",text:r};if(t.n!==void 0){const a=t.n-e.length;return a<=0?{action:"skip"}:a>=r.length?{action:"append",add:r}:{action:"append",add:r.slice(r.length-a)}}const s=cV(e,r);return s?{action:"append",add:s}:{action:"skip"}}function lV(e,t,r,s){const a=e,l=y=>y,c=y=>{const x=r.key??`anon@${a.length}`;return a.push(l(s(x,{...r,text:y}))),r.key&&t.set(r.key,a.length-1),{pushed:!0,at:a.length-1}},f=r.key?t.get(r.key):void 0,p=f===void 0?void 0:a[f],m=p&&p.kind===r.kind?f:!r.key&&a.length>0&&a[a.length-1].kind===r.kind?a.length-1:void 0,v=oV(m===void 0?void 0:a[m].text,r);return v.action==="create"?c(v.text):m===void 0?v.action==="append"?c(v.add):v.action==="replace"?c(v.text):c(r.delta??r.text):v.action==="skip"?{pushed:!1,at:m}:(e[m]={...e[m],text:v.action==="append"?a[m].text+v.add:v.text},{pushed:!1,at:m})}function pk(e){const t=new Map;return e.forEach((r,s)=>{r.key.startsWith("anon@")?t.delete(r.key):t.set(r.key,s)}),t}function cV(e,t){if(!e||!t)return t;if(t.startsWith(e))return t.slice(e.length);const r=Math.min(e.length,t.length);for(let s=r;s>=16;s--)if(e.endsWith(t.slice(0,s)))return t.slice(s);return t}class S_ extends Error{constructor(){super("unauthorized"),this.name="AuthRequired"}}var zl,mu,Ga,Fr,$l,gu,ns,Ul,ue,ou,zD,$D,nf,In,aa,Dm,ly,Rm,Cd,UD,Am,HD,Tm,$o,cy,WD,qD,uy,hy,KD,Pi,Mm,YD,GD,lu;class uV{constructor(){$t(this,ue);qt(this,"sessions",[]);qt(this,"cold",[]);qt(this,"archived",[]);qt(this,"byId",new Map);qt(this,"activeId",null);qt(this,"conn","connecting");qt(this,"net","ok");qt(this,"netError","");qt(this,"auth","unknown");qt(this,"authInfo",null);qt(this,"authError","");qt(this,"authBusy",!1);qt(this,"blocked",null);qt(this,"lastSeq",{});qt(this,"ws",null);$t(this,zl,0);$t(this,mu,null);$t(this,Ga,[]);$t(this,Fr,new Map);$t(this,$l,new Set);$t(this,gu,new Set);$t(this,ns,null);$t(this,Ul);$t(this,nf,0);qt(this,"subscribe",t=>(ie(this,gu).add(t),()=>ie(this,gu).delete(t)));qt(this,"getSnapshot",()=>ie(this,Ul));We(this,Ul,K(this,ue,Rm).call(this))}async checkAuth(){try{const t=await K(this,ue,In).call(this,"/api/auth/me",void 0,{retry:!1,timeoutMs:8e3});if(this.authInfo=t,t.authEnabled&&!t.authenticated){K(this,ue,Dm).call(this,""),this.authError="";return}We(this,zl,0),this.auth="in",this.authError="",this.bump(),this.connect(),this.refreshRows()}catch(t){if(t instanceof S_)return;const r=`无法连接服务端:${String(t.message??t)}`;if(this.auth==="in"){K(this,ue,aa).call(this,!1,r),K(this,ue,ly).call(this,Math.min(1e4,800*2**pd(this,zl)._++));return}this.auth="out",this.authError=r,this.bump()}}async login(t,r){if(this.authBusy)return!1;this.authBusy=!0,this.authError="",this.bump();try{const s=await fetch("/api/auth/login",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({username:t,password:r})});if(s.status===401)return this.authError="用户名或密码不正确",!1;if(s.status===429){const l=await s.json().catch(()=>({})),c=Math.ceil((l.retryAfterMs??3e4)/1e3);return this.authError=`尝试次数过多,请 ${c} 秒后再试`,!1}if(!s.ok)return this.authError=`登录失败:HTTP ${s.status}`,!1;const a=await s.json();return this.authInfo={authEnabled:!0,authenticated:!0,kind:"session",username:a.username,expiresAt:a.expiresAt??null,usingDefaultPassword:!!a.usingDefaultPassword},this.auth="in",this.authError="",this.bump(),this.connect(),!0}catch(s){return this.authError=`登录请求失败:${String(s.message??s)}`,!1}finally{this.authBusy=!1,this.bump()}}async logout(){try{await fetch("/api/auth/logout",{method:"POST"})}catch{}K(this,ue,Dm).call(this,""),this.authError="",this.bump()}bump(){pd(this,nf)._++,ie(this,ns)==null&&(typeof requestAnimationFrame=="function"?We(this,ns,requestAnimationFrame(()=>{We(this,ns,null),K(this,ue,Cd).call(this)})):typeof setTimeout=="function"?We(this,ns,setTimeout(()=>{We(this,ns,null),K(this,ue,Cd).call(this)},0)):K(this,ue,Cd).call(this)),K(this,ue,UD).call(this)}connect(){if(this.auth==="out")return;const t=location.protocol==="https:"?"wss":"ws",r=new WebSocket(`${t}://${location.host}/ws`);this.ws=r,r.onopen=()=>{for(this.conn="online",this.net="ok",this.netError="",We(this,zl,0),r.send(JSON.stringify({t:"resume",lastSeq:this.lastSeq}));ie(this,Ga).length;){const s=ie(this,Ga).shift();try{r.send(JSON.stringify(s))}catch{ie(this,Ga).unshift(s);break}}this.bump(),this.refreshRows(),window.setTimeout(()=>this.drainPersistedQueues(),700)},r.onmessage=s=>this.apply(JSON.parse(s.data)),r.onclose=()=>{if(this.conn="offline",this.bump(),this.auth==="out")return;const s=Math.min(1e4,800*2**pd(this,zl)._++);K(this,ue,ly).call(this,s)},r.onerror=()=>r.close()}send(t){var r;if(this.auth==="out"){K(this,ue,aa).call(this,!1,"未登录 — 请先登录再发送指令");return}if(((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN){this.ws.send(JSON.stringify(t));return}if(t.t==="prompt"||t.t==="respond-permission"){ie(this,Ga).push(t),ie(this,Ga).length>20&&ie(this,Ga).shift(),K(this,ue,aa).call(this,!1,"连接已断开 — 指令已排队,重连后自动发送");return}K(this,ue,aa).call(this,!1,"连接已断开 — 该操作未能送达")}drainPersistedQueues(){try{for(let t=0;t<localStorage.length;t++){const r=localStorage.key(t);if(!(r!=null&&r.startsWith("agentus.queue.")))continue;const s=r.slice(14);K(this,ue,Tm).call(this,s),this.drainQueue(s)}}catch{}}enqueuePrompt(t,r,s=[]){const a=ie(this,Fr).get(t)??[];K(this,ue,$o).call(this,t,[...a,{id:`q-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,text:r,attachments:s,at:Date.now()}])}dropQueued(t,r){const s=ie(this,Fr).get(t)??[];K(this,ue,$o).call(this,t,s.filter(a=>a.id!==r))}editQueued(t,r,s){const a=ie(this,Fr).get(t)??[],l=s.trim();K(this,ue,$o).call(this,t,l?a.map(c=>c.id===r?{...c,text:l}:c):a.filter(c=>c.id!==r))}sendQueuedNow(t,r){const s=ie(this,Fr).get(t)??[],a=s.find(l=>l.id===r);a&&(ie(this,$l).add(t),K(this,ue,$o).call(this,t,s.map(l=>l.id===r?{...l,inflight:!0}:l)),this.send({t:"prompt",sessionId:t,text:a.text,attachments:a.attachments,interrupt:!0}))}drainQueue(t){var l,c;const r=ie(this,Fr).get(t)??K(this,ue,Tm).call(this,t),s=r[0];!s||s.inflight||ie(this,$l).has(t)||(((l=this.byId.get(t))==null?void 0:l.busy)??((c=this.sessions.find(f=>f.id===t))==null?void 0:c.status)==="running")||(K(this,ue,$o).call(this,t,r.map(f=>f.id===s.id?{...f,inflight:!0}:f)),this.send({t:"prompt",sessionId:t,text:s.text,attachments:s.attachments,interrupt:!0}))}setActive(t){this.activeId=t,K(this,ue,ou).call(this,t),We(this,Ul,K(this,ue,Rm).call(this)),this.bump();const r=this.byId.get(t);r&&!r.loaded&&this.loadHistory(t)}async loadHistory(t){try{const{messages:r,hasOlder:s}=await K(this,ue,In).call(this,`/api/sessions/${t}/messages?tail=1`),a=K(this,ue,Pi).call(this,t);a.seen.clear(),a.msgs=[],a.blocks.clear(),a.minSeq=null,a.plan=null,a.turn=0,a.turnStart=0;for(const l of r)K(this,ue,lu).call(this,a,l);a.loaded=!0,a.hasOlder=!!s,K(this,ue,Mm).call(this,a),K(this,ue,YD).call(this,a),this.bump(),K(this,ue,KD).call(this,a)}catch{}}async loadEarlier(t){const r=K(this,ue,Pi).call(this,t);if(!(r.loadingOlder||!r.hasOlder||r.minSeq==null)){r.loadingOlder=!0,this.bump();try{const{messages:s,hasOlder:a}=await K(this,ue,In).call(this,`/api/sessions/${t}/messages?before=${r.minSeq}`),l=[],c=new Map;for(const p of s)K(this,ue,lu).call(this,r,p,{list:l,index:c});const f=[];for(const p of l){const m=r.blocks.get(p.key),v=m===void 0?void 0:r.msgs[m];if(v&&v.kind===p.kind&&(p.kind==="agent"||p.kind==="thought")&&v.kind===p.kind){const y=v,x=p;if(x.text.length>y.text.length){const N=r.msgs.indexOf(y);N>=0&&(r.msgs[N]={...y,text:x.text})}continue}f.push(p)}f.length&&(r.msgs=[...f,...r.msgs]),r.blocks=pk(r.msgs),r.hasOlder=!!a}catch{}finally{r.loadingOlder=!1,this.bump()}}}async loadBackends(){return await K(this,ue,In).call(this,"/api/backends")}async createBackend(t){await K(this,ue,In).call(this,"/api/backends",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}async updateBackend(t,r){await K(this,ue,In).call(this,`/api/backends/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(r)})}async deleteBackend(t){await K(this,ue,In).call(this,`/api/backends/${encodeURIComponent(t)}`,{method:"DELETE"})}async inspectBackend(t){return await K(this,ue,In).call(this,`/api/backends/${encodeURIComponent(t)}/inspect`,{method:"POST"},{timeoutMs:6e4,retry:!1})}async listEntries(t){return await K(this,ue,In).call(this,`/api/fs/dirs?files=1&path=${encodeURIComponent(t)}`)}async readFile(t){return await K(this,ue,In).call(this,`/api/fs/file?path=${encodeURIComponent(t)}`)}async statFile(t){return await K(this,ue,In).call(this,`/api/fs/stat?path=${encodeURIComponent(t)}`)}async writeFile(t,r,s){return await K(this,ue,In).call(this,"/api/fs/file",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({path:t,content:r,...s?{ifHash:s}:{}})},{retry:!1})}async fork(t){const r=await K(this,ue,In).call(this,`/api/sessions/${t}/fork`,{method:"POST"},{timeoutMs:12e4,retry:!1});return this.sessions.some(s=>s.id===r.id)||(this.sessions=[r,...this.sessions]),this.cold=this.cold.filter(s=>s.id!==r.id),this.archived=this.archived.filter(s=>s.id!==r.id),this.setActive(r.id),r.id}async setModel(t,r){const s=await K(this,ue,In).call(this,`/api/sessions/${t}/model`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({modelId:r})},{timeoutMs:9e4,retry:!1}),a=this.byId.get(t);a&&(a.info={...a.info,...s});const l=this.sessions.findIndex(c=>c.id===t);l>=0&&(this.sessions[l]={...this.sessions[l],...s}),this.bump()}async setContextLimit(t,r,s={}){const a=await K(this,ue,In).call(this,`/api/sessions/${t}/context-limit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({limit:r,...s})}),l=this.byId.get(t);l&&(l.info={...l.info,...a});const c=this.sessions.findIndex(p=>p.id===t);c>=0&&(this.sessions[c]={...this.sessions[c],...a});const f=this.archived.findIndex(p=>p.id===t);f>=0&&(this.archived[f]={...this.archived[f],...a}),this.bump()}async setWorkspace(t,r){const s=await K(this,ue,In).call(this,`/api/sessions/${t}/workspace`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:r})}),a=this.byId.get(t);a&&(a.info={...a.info,...s});const l=this.sessions.findIndex(c=>c.id===t);l>=0&&(this.sessions[l]={...this.sessions[l],...s}),this.bump()}async createSession(t,r,s){const a=await K(this,ue,In).call(this,"/api/sessions",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({backend:t,cwd:r,title:s||void 0})},{timeoutMs:12e4,retry:!1});return this.bump(),a.id}async refreshRows(){try{const{cold:t,archived:r}=await K(this,ue,In).call(this,"/api/sessions");this.cold=t??[],this.archived=r??[],this.bump()}catch{}}async rename(t,r){const s=await K(this,ue,In).call(this,`/api/sessions/${t}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({title:r})}),a=this.byId.get(t);a&&(a.info={...a.info,...s});for(const l of[this.sessions,this.archived]){const c=l.findIndex(f=>f.id===t);c>=0&&(l[c]={...l[c],...s})}return this.bump(),s}async regenerateTitle(t){const r=await K(this,ue,In).call(this,`/api/sessions/${t}/title/regenerate`,{method:"POST"}),s=r.info,a=this.byId.get(t);a&&(a.info={...a.info,...s});for(const l of[this.sessions,this.cold,this.archived]){const c=l.findIndex(f=>f.id===t);c>=0&&(l[c]={...l[c],...s})}return this.bump(),r}async resume(t){try{const r=await K(this,ue,In).call(this,`/api/sessions/${t}/resume`,{method:"POST"},{timeoutMs:12e4,retry:!1});K(this,ue,Pi).call(this,t).info=r,this.sessions.some(s=>s.id===t)||(this.sessions=[r,...this.sessions]),this.cold=this.cold.filter(s=>s.id!==t),this.setActive(t),await this.loadHistory(t)}catch(r){const s=r.httpStatus,a=r.httpBody;if(s===409&&((a==null?void 0:a.code)==="home_mismatch"||(a==null?void 0:a.code)==="context_missing")){const l=this.sessions.find(c=>c.id===t)??this.cold.find(c=>c.id===t)??this.archived.find(c=>c.id===t);this.blocked={id:t,title:(l==null?void 0:l.title)??t,code:a.code,sessionHome:a.sessionHome??null,rowHome:a.rowHome??null},this.bump();return}K(this,ue,aa).call(this,!1,`恢复失败:${String(r.message??r)}`)}}async restart(t){try{const r=await K(this,ue,In).call(this,`/api/sessions/${t}/restart`,{method:"POST"},{timeoutMs:12e4,retry:!1}),s=K(this,ue,Pi).call(this,t);s.info={...s.info,...r};for(const a of[this.sessions,this.cold,this.archived]){const l=a.findIndex(c=>c.id===t);l>=0&&(a[l]={...a[l],...r})}this.bump()}catch(r){const s=r.httpStatus,a=r.httpBody;if(s===409&&((a==null?void 0:a.code)==="home_mismatch"||(a==null?void 0:a.code)==="context_missing")){const l=this.sessions.find(c=>c.id===t);this.blocked={id:t,title:(l==null?void 0:l.title)??t,code:a.code,sessionHome:a.sessionHome??null,rowHome:a.rowHome??null},this.bump();return}K(this,ue,aa).call(this,!1,`重启 agent 进程失败:${String(r.message??r)}`)}}dismissBlocked(){this.blocked=null,this.bump()}deleteBlocked(){const t=this.blocked;this.blocked=null,t&&this.purgeCold(t.id),this.bump()}purgeCold(t){this.sessions=this.sessions.filter(r=>r.id!==t),this.cold=this.cold.filter(r=>r.id!==t),this.archived=this.archived.filter(r=>r.id!==t),this.byId.delete(t),this.bump(),K(this,ue,In).call(this,`/api/sessions/${t}`,{method:"DELETE"}).catch(()=>this.refreshRows()).then(()=>this.refreshRows())}async setArchived(t,r){try{const s=await K(this,ue,In).call(this,`/api/sessions/${t}/${r?"archive":"unarchive"}`,{method:"POST"}),a=this.byId.get(t);return a&&(a.info={...a.info,...s}),r?(this.sessions=this.sessions.filter(l=>l.id!==t),this.cold=this.cold.filter(l=>l.id!==t),this.archived.some(l=>l.id===t)||(this.archived=[s,...this.archived]),this.activeId===t&&K(this,ue,qD).call(this)):(this.archived=this.archived.filter(l=>l.id!==t),!this.sessions.some(l=>l.id===t)&&!this.cold.some(l=>l.id===t)&&(this.cold=[s,...this.cold])),this.bump(),s}catch(s){return K(this,ue,aa).call(this,!1,`${r?"归档":"取消归档"}失败:${String(s.message??s)}`),null}}async unarchiveAndResume(t){await this.setArchived(t,!1),await this.resume(t)}apply(t){var r,s,a;switch(t.t){case"hello":break;case"sessions":{this.sessions=t.sessions,this.cold=t.cold??[],this.archived=t.archived??[];const l=new Set([...t.sessions.map(c=>c.id),...this.cold.map(c=>c.id),...this.archived.map(c=>c.id)]);for(const c of[...t.sessions,...this.cold,...this.archived]){const f=K(this,ue,Pi).call(this,c.id);f.info={...f.info,...c}}if(t.pending){const c=new Map;for(const f of t.pending){const p=c.get(f.sessionId);p?p.push(f):c.set(f.sessionId,[f])}for(const[f,p]of c)K(this,ue,Pi).call(this,f).perms=p;for(const f of this.byId.values())c.has(f.info.id)||(f.perms=[])}for(const c of[...this.byId.keys()])l.has(c)||this.byId.delete(c);if(this.activeId&&!l.has(this.activeId)&&(this.activeId=null,K(this,ue,ou).call(this,null)),!this.activeId&&l.size){const c=K(this,ue,$D).call(this),f=c&&l.has(c)?c:((r=t.sessions[0])==null?void 0:r.id)??((s=this.cold[0])==null?void 0:s.id)??((a=this.archived[0])==null?void 0:a.id);f&&(this.activeId=f,this.loadHistory(f))}break}case"session":{this.sessions=this.sessions.map(l=>l.id===t.session.id?t.session:l),this.sessions.some(l=>l.id===t.session.id)||this.sessions.push(t.session),K(this,ue,Pi).call(this,t.session.id).info=t.session;break}case"messages":{const l=K(this,ue,Pi).call(this,t.sessionId);if(t.partial){for(const c of t.messages)K(this,ue,lu).call(this,l,c,{resync:!0});l.lastAt=Date.now();break}l.seen.clear(),l.msgs=[],l.blocks.clear(),l.plan=null,l.turn=0,l.turnStart=0,K(this,ue,Mm).call(this,l);for(const c of t.messages)K(this,ue,lu).call(this,l,c);l.loaded=!0;break}case"message":{const l=K(this,ue,Pi).call(this,t.message.sessionId);K(this,ue,lu).call(this,l,t.message,{delta:t.delta,n:t.n}),l.lastAt=Date.now(),this.lastSeq[t.message.sessionId]=Math.max(this.lastSeq[t.message.sessionId]??0,t.message.seq);break}case"turn-start":{const l=K(this,ue,Pi).call(this,t.sessionId);l.busy=!0,l.busySince=Date.now(),l.lastAt=Date.now(),l.trace=t.trace??null,K(this,ue,cy).call(this,t.sessionId);break}case"plan":{const l=K(this,ue,Pi).call(this,t.sessionId);K(this,ue,hy).call(this,l,t.plan),l.lastAt=Date.now();break}case"usage":{const l=K(this,ue,Pi).call(this,t.sessionId);l.info={...l.info,usage:t.usage},l.lastAt=Date.now();break}case"turn-end":{const l=K(this,ue,Pi).call(this,t.sessionId);if(l.busy=!1,l.busySince=null,K(this,ue,Mm).call(this,l),t.error&&l.msgs.push({key:`err-${Date.now()}`,kind:"meta",text:t.error}),t.error?K(this,ue,WD).call(this,t.sessionId):K(this,ue,cy).call(this,t.sessionId),!t.error){const c=t.sessionId;window.setTimeout(()=>this.drainQueue(c),250)}break}case"permission":K(this,ue,Pi).call(this,t.request.sessionId).perms.push(t.request);break;case"permission-resolved":for(const l of this.byId.values())l.perms=l.perms.filter(c=>c.requestId!==t.requestId);break;case"permission-expired":for(const l of this.byId.values())l.perms=l.perms.filter(c=>c.requestId!==t.requestId);K(this,ue,Pi).call(this,t.sessionId).msgs.push({key:`perm-exp-${t.requestId}`,kind:"meta",text:"这条审批已经过期:agent 等不到答复、先自己放过了(或它已经放弃这一轮)。你的点击没有生效。"});break;case"config-rejected":{const l=K(this,ue,Pi).call(this,t.sessionId),c=t.name||t.configId;l.msgs.push({key:`cfg-rej-${t.configId}-${Date.now()}`,kind:"meta",text:`${c} 这一档没生效:agent 没有接受「${t.value}」${t.actual?`,实际仍是「${t.actual}」`:""}。(模型只认它公布的那几档;换档位或换模型再试。)`});break}case"error":{this.activeId&&K(this,ue,Pi).call(this,this.activeId).msgs.push({key:`e-${Date.now()}`,kind:"meta",text:t.error});break}}this.bump()}}zl=new WeakMap,mu=new WeakMap,Ga=new WeakMap,Fr=new WeakMap,$l=new WeakMap,gu=new WeakMap,ns=new WeakMap,Ul=new WeakMap,ue=new WeakSet,ou=function(t){try{t?localStorage.setItem("agentus.active",t):localStorage.removeItem("agentus.active")}catch{}},zD=function(){try{const t=new URL(location.href),r=t.searchParams.get("session");return r?(t.searchParams.delete("session"),history.replaceState(null,"",t.toString()),r):null}catch{return null}},$D=function(){const t=K(this,ue,zD).call(this);if(t)return K(this,ue,ou).call(this,t),t;try{return localStorage.getItem("agentus.active")}catch{return null}},nf=new WeakMap,In=async function(t,r,s){const a=(s==null?void 0:s.timeoutMs)??15e3,l=(s==null?void 0:s.retry)===!1?1:2;let c=null;for(let f=0;f<l;f++){const p=new AbortController,m=setTimeout(()=>p.abort(),a);try{const v=await fetch(t,{...r,signal:p.signal});if(clearTimeout(m),v.status===401)throw K(this,ue,Dm).call(this,"会话已过期,请重新登录"),new S_;const y=v.status===204?null:await v.json().catch(()=>null);if(!v.ok){const x=(y==null?void 0:y.error)??`HTTP ${v.status}`,N=new Error(x);throw N.httpStatus=v.status,N.httpBody=y,N}return K(this,ue,aa).call(this,!0,""),y}catch(v){if(clearTimeout(m),v instanceof S_||v.httpStatus!==void 0)throw v;c=v;const y=(v==null?void 0:v.name)==="AbortError"?`请求超时 ${a/1e3}s`:String((v==null?void 0:v.message)??v);if(f===l-1)throw K(this,ue,aa).call(this,!1,`${y} (${t})`),new Error(y);await new Promise(x=>setTimeout(x,600))}}throw c instanceof Error?c:new Error(String(c))},aa=function(t,r){const s=t?"ok":"degraded";this.net===s&&this.netError===r||(this.net=s,this.netError=r,this.bump())},Dm=function(t){const r=this.auth==="in";if(this.auth="out",this.authError=r?t:this.authError,this.ws){const s=this.ws;this.ws=null,s.onclose=null;try{s.close()}catch{}}this.conn="offline",(r||this.sessions.length)&&(this.sessions=[],this.cold=[],this.archived=[],this.byId.clear(),this.activeId=null,K(this,ue,ou).call(this,null)),this.bump()},ly=function(t){ie(this,mu)||We(this,mu,setTimeout(()=>{We(this,mu,null),this.checkAuth()},t))},Rm=function(){return{sessions:this.sessions,cold:this.cold,archived:this.archived,activeId:this.activeId,active:this.activeId?this.byId.get(this.activeId):void 0,conn:this.conn,net:this.net,netError:this.netError,auth:this.auth,authInfo:this.authInfo,authError:this.authError,authBusy:this.authBusy,blocked:this.blocked,version:ie(this,nf)}},Cd=function(){ie(this,ns)!=null&&(typeof cancelAnimationFrame=="function"?cancelAnimationFrame(ie(this,ns)):typeof clearTimeout=="function"&&clearTimeout(ie(this,ns)),We(this,ns,null));for(const t of this.byId.values())t.busy=t.info.status==="running";We(this,Ul,K(this,ue,Rm).call(this));for(const t of ie(this,gu))t()},UD=function(){typeof document>"u"||!document.hidden||ie(this,ns)!=null&&K(this,ue,Cd).call(this)},Am=function(t){return`agentus.queue.${t}`},HD=function(t){try{const r=localStorage.getItem(K(this,ue,Am).call(this,t)),s=r?JSON.parse(r):[];return Array.isArray(s)?s.filter(a=>a&&typeof a.text=="string"&&a.text.trim()).map(a=>({id:String(a.id??`q-${a.at??Date.now()}`),text:a.text,attachments:a.attachments??[],at:a.at??Date.now()})):[]}catch{return[]}},Tm=function(t){const r=ie(this,Fr).get(t)??K(this,ue,HD).call(this,t);return r.length&&ie(this,Fr).set(t,r),r},$o=function(t,r){r.length?ie(this,Fr).set(t,r):ie(this,Fr).delete(t);try{r.length?localStorage.setItem(K(this,ue,Am).call(this,t),JSON.stringify(r)):localStorage.removeItem(K(this,ue,Am).call(this,t))}catch{}const s=this.byId.get(t);s&&(s.queue=r),this.bump()},cy=function(t){ie(this,$l).delete(t);const r=ie(this,Fr).get(t)??[];r.some(s=>s.inflight)&&K(this,ue,$o).call(this,t,r.filter(s=>!s.inflight))},WD=function(t){ie(this,$l).delete(t);const r=ie(this,Fr).get(t)??[];r.some(s=>s.inflight)&&K(this,ue,$o).call(this,t,r.map(s=>s.inflight?{...s,inflight:!1}:s))},qD=function(){const t=this.sessions[0]??this.cold[0]??this.archived[0]??null;this.activeId=(t==null?void 0:t.id)??null,K(this,ue,ou).call(this,this.activeId),t&&!this.sessions.some(r=>r.id===t.id)&&this.loadHistory(t.id)},uy=function(t,r,s,a,l){const c=t.plan;if(!c){t.plan={key:`plan-${t.turn}`,items:r,terminal:s,explanation:l,at:a,turn:t.turn};return}if(c.turn===t.turn){c.items=r,c.terminal=s,c.explanation=l;return}const f=t.turnStart>0&&t.turnStart<=t.msgs.length?t.turnStart:t.msgs.length;t.msgs.splice(f,0,{key:c.key,kind:"plan",items:c.items,terminal:c.terminal,explanation:c.explanation,at:c.at}),t.blocks=pk(t.msgs),t.turnStart=Math.min(t.turnStart+1,t.msgs.length),t.plan={key:`plan-${t.turn}`,items:r,terminal:s,explanation:l,at:a,turn:t.turn}},hy=function(t,r){K(this,ue,uy).call(this,t,r.items.map(s=>({content:s.content,status:s.status,priority:s.priority})),r.terminal??void 0,r.updatedAt,r.explanation??void 0)},KD=async function(t){try{const{plan:r}=await K(this,ue,In).call(this,`/api/sessions/${t.info.id}/plan`);if(!r)return;K(this,ue,hy).call(this,t,r),this.bump()}catch{}},Pi=function(t){let r=this.byId.get(t);return r||(r={info:this.sessions.find(s=>s.id===t)??{id:t},msgs:[],perms:[],busy:!1,busySince:null,loaded:!1,hasOlder:!1,loadingOlder:!1,minSeq:null,lastAt:Date.now(),rev:0,seen:new Set,blocks:new Map,plan:null,turn:0,turnStart:0,queue:K(this,ue,Tm).call(this,t)},this.byId.set(t,r)),r},Mm=function(t){for(let r=0;r<t.msgs.length;r++){const s=t.msgs[r];(s.kind==="agent"||s.kind==="thought")&&s.open&&(t.msgs[r]={...s,open:!1})}},YD=function(t){const r=t.msgs[t.msgs.length-1];r&&(r.kind==="agent"||r.kind==="thought")&&t.busy&&!r.open&&(t.msgs[t.msgs.length-1]={...r,open:!0})},GD=function(t,r){for(let s=0;s<t.length;s++){const a=t[s];a.kind==="thought"&&a.open&&a.key!==r&&(t[s]={...a,open:!1})}},lu=function(t,r,s){var j;const a=(s==null?void 0:s.list)??t.msgs,l=(s==null?void 0:s.index)??t.blocks,c=s==null?void 0:s.delta,f=r.payload;let p=null;const m=c!==void 0,v=(r.kind==="agent"||r.kind==="thought")&&fk(r.kind,f)!==null;if(!((s==null?void 0:s.resync)===!0&&(r.kind==="tool"||r.kind==="plan"||r.kind==="user"||r.kind==="meta"||v)||r.kind==="tool"||r.kind==="meta"||r.seq<=0||m)){if(t.seen.has(r.seq))return;t.seen.add(r.seq)}r.seq>0&&(t.minSeq==null||r.seq<t.minSeq)&&(t.minSeq=r.seq);const N=r.payload,_=typeof r.createdAt=="number"?r.createdAt:Date.now(),k=hV(N);switch(a[a.length-1],r.kind){case"user":if(a.some(L=>L.key===`m${r.seq}`))break;a.push({key:`m${r.seq}`,kind:"user",text:String(N.text??""),at:_,files:Array.isArray(N.attachments)?N.attachments.map(L=>({kind:String(L.kind??""),name:String(L.name??"file")})):[]}),s!=null&&s.list||(t.turn+=1,t.turnStart=a.length-1);break;case"agent":case"thought":{const L=r.kind,P=fk(L,N),{at:O}=lV(a,l,{key:P,kind:L,text:k,delta:c,n:s==null?void 0:s.n},(B,U)=>({key:B,kind:U.kind,text:U.text,open:!0,at:_})),T=a[O];c!==void 0&&t.info.status==="running"&&T&&(T.kind==="agent"||T.kind==="thought")&&!T.open&&(a[O]={...T,open:!0}),L==="thought"&&(p=((j=a[O])==null?void 0:j.key)??null);break}case"tool":{const L=String(N.toolCallId??r.toolCallId??r.seq),P=a.find(B=>B.kind==="tool"&&B.toolCallId===L),O=dV(N),T=fV(N);if(P){const B=a.indexOf(P),U={...P,title:N.title?String(N.title):P.title,status:N.status?String(N.status):P.status,detail:O??P.detail,input:T??P.input};B>=0&&(a[B]=U)}else a.push({key:`tc-${L}`,kind:"tool",toolCallId:L,at:_,title:String(N.title??"tool call"),status:String(N.status??"pending"),kind2:String(N.kind??""),detail:O,input:T});break}case"plan":{const L=N._meta??{},P=(N.entries??[]).map(B=>({content:String((B==null?void 0:B.content)??""),status:String((B==null?void 0:B.status)??"pending"),priority:B==null?void 0:B.priority})),O=typeof N._slotPlanTerminal=="string"?N._slotPlanTerminal:void 0,T=typeof L["agentus/explanation"]=="string"?String(L["agentus/explanation"]):void 0;if(s!=null&&s.list){const B=a.find(U=>U.kind==="plan");if(B&&B.kind==="plan"){const U=a.indexOf(B);a[U]={...B,items:P,terminal:O,explanation:T}}else a.push({key:`m${r.seq}`,kind:"plan",items:P,terminal:O,explanation:T,at:_});break}K(this,ue,uy).call(this,t,P,O,_,T);break}case"meta":if(a.some(L=>L.key===`m${r.seq}`))break;a.push({key:`m${r.seq}`,kind:"meta",text:k||JSON.stringify(N)});break}K(this,ue,GD).call(this,a,p),this.lastSeq[t.info.id]=Math.max(this.lastSeq[t.info.id]??0,r.seq),t.rev+=1,t.lastAt=Date.now()};function hV(e){const t=e.content;return(t==null?void 0:t.type)==="text"&&typeof t.text=="string"?t.text:""}function dV(e){const r=l=>l.length>4e3?`${l.slice(0,4e3)}
|
|
205
|
+
… (${l.length-4e3} more chars)`:l,s=e.rawOutput;if(typeof s=="string"&&s.trim())return r(s);if(s&&typeof s=="object")try{return r(JSON.stringify(s,null,1))}catch{}const a=e.content;if(Array.isArray(a)){const l=[];for(const c of a){const f=String((c==null?void 0:c.type)??"");if(f==="content"){const p=c.content;(p==null?void 0:p.type)==="text"&&p.text&&l.push(String(p.text))}else if(f==="diff"){const p=String(c.path??"file"),m=typeof c.newText=="string"?c.newText:"";l.push(`--- ${p}
|
|
206
|
+
${m.slice(0,1500)}`)}else if(f==="terminal"){const p=c.output;p&&l.push(String(p))}}if(l.length)return r(l.join(`
|
|
207
|
+
`))}return""}function fV(e){const t=e.rawInput;if(typeof t=="string"&&t.trim())return t.slice(0,1200);if(t&&typeof t=="object")try{return JSON.stringify(t,null,1).slice(0,1200)}catch{return""}return""}const Qe=new uV;function Wm(e){return`/api/fs/raw?path=${encodeURIComponent(e)}`}async function cg(e){var t;try{if((t=navigator.clipboard)!=null&&t.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{const r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="-1000px",r.style.opacity="0",document.body.appendChild(r),r.select(),r.setSelectionRange(0,r.value.length);const s=document.execCommand("copy");return r.remove(),s}catch{return!1}}const dy=new Set;function pV(e){return dy.add(e),()=>{dy.delete(e)}}function mV(e){for(const t of[...dy])try{t(e)}catch{}}const fy="data-agentus-table",gV=4,py="⇕",vV={asc:"▲",desc:"▼",none:py};function my(e){var r;if(!e)return"";const t=e.querySelector(".md-table-sort");return t?(((r=t.querySelector(".md-table-sort-label"))==null?void 0:r.textContent)??"").trim():(e.textContent??"").trim()}function bV(e,t,r){const s=e.tBodies[0];if(!s)return;const a=Array.from(s.rows).filter(c=>c.parentElement===s),l=c=>Number(c.dataset.mdRow??0);a.sort((c,f)=>{if(r==="none")return l(c)-l(f);const p=my(c.cells[t]).localeCompare(my(f.cells[t]),void 0,{numeric:!0,sensitivity:"base"});return p!==0?r==="asc"?p:-p:l(c)-l(f)});for(const c of a)s.appendChild(c)}function _V(e){const t=e.cloneNode(!0);t.removeAttribute(fy);for(const r of Array.from(t.querySelectorAll(".md-table-sort"))){const s=r.querySelector(".md-table-sort-label"),a=r.parentElement;a&&s&&(a.textContent=s.textContent??"",a.removeAttribute("aria-sort"))}return t}function yV(e){if(document.querySelector(".md-table-overlay"))return;const t=document.createElement("div");t.className="md-table-overlay",t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-label","table");const r=document.createElement("div");r.className="md-table-bar";const s=document.createElement("button");s.type="button",s.className="md-table-btn",s.textContent="rotate";const a=document.createElement("span");a.className="head-spacer";const l=document.createElement("button");l.type="button",l.className="md-table-btn",l.textContent="copy";const c=document.createElement("button");c.type="button",c.className="md-table-btn",c.textContent="close",c.setAttribute("aria-label","close table"),r.append(s,a,l,c);const f=document.createElement("div");f.className="md-table-stage";const p=document.createElement("div");p.className="md-table-zoom md";const m=_V(e);p.appendChild(m),f.appendChild(p),t.append(r,f),document.body.appendChild(t),EN(p);const v=window.innerHeight>window.innerWidth;p.classList.toggle("rot",v);const y=()=>{t.remove(),window.removeEventListener("keydown",x)},x=N=>{N.key==="Escape"&&y()};window.addEventListener("keydown",x),s.addEventListener("click",()=>p.classList.toggle("rot")),c.addEventListener("click",y),t.addEventListener("click",N=>{(N.target===t||N.target===f)&&y()}),l.addEventListener("click",()=>{const N=Array.from(m.rows).map(_=>Array.from(_.cells).map(k=>my(k).replace(/\s+/g," ")).join(" "));cg(N.join(`
|
|
208
|
+
`)).then(_=>{l.textContent=_?"copied":"copy failed",window.setTimeout(()=>{l.textContent="copy"},1200)})}),c.focus()}function EN(e){var t,r;if(e!=null&&e.querySelectorAll)for(const s of Array.from(e.querySelectorAll(`table:not([${fy}])`))){if(s.closest(".md-code")||s.closest(".file-source"))continue;const a=((t=s.tHead)==null?void 0:t.rows[0])??s.rows[0],l=s.tBodies[0];if(!a||!l||l.rows.length===0)continue;s.setAttribute(fy,"1");const c={col:-1,dir:"asc"};Array.from(l.rows).forEach((m,v)=>{m.dataset.mdRow=String(v)});for(const[m,v]of Array.from(a.cells).entries()){const y=(v.textContent??"").trim()||`column ${m+1}`,x=document.createElement("button");x.type="button",x.className="md-table-sort",x.title=`sort by ${y}`,x.setAttribute("aria-label",`sort by ${y}`);const N=document.createElement("span");for(N.className="md-table-sort-label";v.firstChild;)N.appendChild(v.firstChild);const _=document.createElement("span");_.className="md-table-sort-indicator",_.setAttribute("aria-hidden","true"),_.textContent="⇕",v.setAttribute("aria-sort","none"),x.append(N,_),x.addEventListener("click",()=>{const k=c.col!==m?"asc":c.dir==="asc"?"desc":c.dir==="desc"?"none":"asc";c.col=m,c.dir=k;for(const j of Array.from(a.cells)){j.setAttribute("aria-sort","none");const L=j.querySelector(".md-table-sort-indicator");L&&(L.textContent=py)}k==="none"?(v.setAttribute("aria-sort","none"),_.textContent=py):(v.setAttribute("aria-sort",k==="asc"?"ascending":"descending"),_.textContent=vV[k]),bV(s,m,k)}),v.appendChild(x)}const f=document.createElement("div");if(f.className="md-table-bar",l.rows.length>=gV){const m=document.createElement("input");m.type="search",m.className="md-table-filter",m.placeholder="filter rows…",m.setAttribute("aria-label",`filter ${a.cells.length}-column table`),m.autocomplete="off",m.addEventListener("input",()=>{const v=m.value.trim().toLowerCase();for(const y of Array.from(l.rows))y.hidden=!!v&&!(y.textContent??"").toLowerCase().includes(v)}),f.appendChild(m)}const p=document.createElement("button");p.type="button",p.className="md-table-btn",p.title="open this table full screen (landscape on a phone)",p.setAttribute("aria-label","open table full screen"),p.textContent="⤢",p.addEventListener("click",()=>yV(s)),f.appendChild(p),(r=s.parentElement)==null||r.insertBefore(f,s)}}const mk={};function NV(e){let t=mk[e];if(t)return t;t=mk[e]=[];for(let r=0;r<128;r++){const s=String.fromCharCode(r);t.push(s)}for(let r=0;r<e.length;r++){const s=e.charCodeAt(r);t[s]="%"+("0"+s.toString(16).toUpperCase()).slice(-2)}return t}function Su(e,t){typeof t!="string"&&(t=Su.defaultChars);const r=NV(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(s){let a="";for(let l=0,c=s.length;l<c;l+=3){const f=parseInt(s.slice(l+1,l+3),16);if(f<128){a+=r[f];continue}if((f&224)===192&&l+3<c){const p=parseInt(s.slice(l+4,l+6),16);if((p&192)===128){const m=f<<6&1984|p&63;m<128?a+="��":a+=String.fromCharCode(m),l+=3;continue}}if((f&240)===224&&l+6<c){const p=parseInt(s.slice(l+4,l+6),16),m=parseInt(s.slice(l+7,l+9),16);if((p&192)===128&&(m&192)===128){const v=f<<12&61440|p<<6&4032|m&63;v<2048||v>=55296&&v<=57343?a+="���":a+=String.fromCharCode(v),l+=6;continue}}if((f&248)===240&&l+9<c){const p=parseInt(s.slice(l+4,l+6),16),m=parseInt(s.slice(l+7,l+9),16),v=parseInt(s.slice(l+10,l+12),16);if((p&192)===128&&(m&192)===128&&(v&192)===128){let y=f<<18&1835008|p<<12&258048|m<<6&4032|v&63;y<65536||y>1114111?a+="����":(y-=65536,a+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),l+=9;continue}}a+="�"}return a})}Su.defaultChars=";/?:@&=+$,#";Su.componentChars="";const gk={};function wV(e){let t=gk[e];if(t)return t;t=gk[e]=[];for(let r=0;r<128;r++){const s=String.fromCharCode(r);/^[0-9a-z]$/i.test(s)?t.push(s):t.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}function io(e,t,r){typeof t!="string"&&(r=t,t=io.defaultChars),typeof r>"u"&&(r=!0);const s=wV(t);let a="";for(let l=0,c=e.length;l<c;l++){const f=e.charCodeAt(l);if(r&&f===37&&l+2<c&&/^[0-9a-f]{2}$/i.test(e.slice(l+1,l+3))){a+=e.slice(l,l+3),l+=2;continue}if(f<128){a+=s[f];continue}if(f>=55296&&f<=57343){if(f>=55296&&f<=56319&&l+1<c){const p=e.charCodeAt(l+1);if(p>=56320&&p<=57343){a+=encodeURIComponent(e[l]+e[l+1]),l++;continue}}a+="%EF%BF%BD";continue}a+=encodeURIComponent(e[l])}return a}io.defaultChars=";/?:@&=+$,-_.!~*'()#";io.componentChars="-_.!~*'()";function gy(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function qm(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const xV=/^([a-z0-9.+-]+:)/i,SV=/:[0-9]*$/,EV=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,kV=["<",">",'"',"`"," ","\r",`
|
|
209
|
+
`," "],CV=["{","}","|","\\","^","`"].concat(kV),DV=["'"].concat(CV),vk=["%","/","?",";","#"].concat(DV),bk=["/","?","#"],RV=255,_k=/^[+a-z0-9A-Z_-]{0,63}$/,AV=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yk={javascript:!0,"javascript:":!0},Nk={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function vy(e,t){if(e&&e instanceof qm)return e;const r=new qm;return r.parse(e,t),r}qm.prototype.parse=function(e,t){let r,s,a,l=e;if(l=l.trim(),!t&&e.split("#").length===1){const m=EV.exec(l);if(m)return this.pathname=m[1],m[2]&&(this.search=m[2]),this}let c=xV.exec(l);if(c&&(c=c[0],r=c.toLowerCase(),this.protocol=c,l=l.substr(c.length)),(t||c||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(a=l.substr(0,2)==="//",a&&!(c&&yk[c])&&(l=l.substr(2),this.slashes=!0)),!yk[c]&&(a||c&&!Nk[c])){let m=-1;for(let _=0;_<bk.length;_++)s=l.indexOf(bk[_]),s!==-1&&(m===-1||s<m)&&(m=s);let v,y;m===-1?y=l.lastIndexOf("@"):y=l.lastIndexOf("@",m),y!==-1&&(v=l.slice(0,y),l=l.slice(y+1),this.auth=v),m=-1;for(let _=0;_<vk.length;_++)s=l.indexOf(vk[_]),s!==-1&&(m===-1||s<m)&&(m=s);m===-1&&(m=l.length),l[m-1]===":"&&m--;const x=l.slice(0,m);l=l.slice(m),this.parseHost(x),this.hostname=this.hostname||"";const N=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!N){const _=this.hostname.split(/\./);for(let k=0,j=_.length;k<j;k++){const L=_[k];if(L&&!L.match(_k)){let P="";for(let O=0,T=L.length;O<T;O++)L.charCodeAt(O)>127?P+="x":P+=L[O];if(!P.match(_k)){const O=_.slice(0,k),T=_.slice(k+1),B=L.match(AV);B&&(O.push(B[1]),T.unshift(B[2])),T.length&&(l=T.join(".")+l),this.hostname=O.join(".");break}}}}this.hostname.length>RV&&(this.hostname=""),N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const f=l.indexOf("#");f!==-1&&(this.hash=l.substr(f),l=l.slice(0,f));const p=l.indexOf("?");return p!==-1&&(this.search=l.substr(p),l=l.slice(0,p)),l&&(this.pathname=l),Nk[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};qm.prototype.parseHost=function(e){let t=SV.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const TV=Object.freeze(Object.defineProperty({__proto__:null,decode:Su,encode:io,format:gy,parse:vy},Symbol.toStringTag,{value:"Module"})),JD=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,XD=/[\0-\x1F\x7F-\x9F]/,MV=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,kN=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,ZD=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,QD=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,OV=Object.freeze(Object.defineProperty({__proto__:null,Any:JD,Cc:XD,Cf:MV,P:kN,S:ZD,Z:QD},Symbol.toStringTag,{value:"Module"})),jV=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function LV(e){return e===0||e>=55296&&e<=57343||e>1114111}function BV(e){return LV(e)?65533:e>=128&&e<=159&&jV[e-128]||e}function PV(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(BV(e))}const Is=(()=>{const e=new Uint8Array(127);let t=0;for(let r=33;r<=126;r++)r!==34&&r!==36&&r!==92&&(e[r]=t++);return e})();function VV(e,t,r,s,a,l){const f=e.length,p=l*90;let m=0;const v=()=>{const Z=Is[e.charCodeAt(m++)];return Z<l?Z:Z*91-p+Is[e.charCodeAt(m++)]},y=r-s,x=r+a,N=new Int32Array(x);N.fill(-1,s,l),N.fill(-1,l+y,x);const _=new Int32Array(x),k=new Int32Array(x);function j(Z,ve){let pe=0,Q=ve;const C=ve+Z;for(;Q<C;){const J=Is[e.charCodeAt(m++)];if(J<89)pe+=J,N[Q++]=pe;else if(J===89){let Y=Is[e.charCodeAt(m++)]+2;for(;Y--;)N[Q++]=++pe}else{const Y=Is[e.charCodeAt(m++)];pe+=89+(Y<90?Y*91+Is[e.charCodeAt(m++)]:Is[e.charCodeAt(m++)]*8281+Is[e.charCodeAt(m++)]*91+Is[e.charCodeAt(m++)]),N[Q++]=pe}}}j(s,0),j(y,l);const L=new Int32Array(a*2);let P=0,O=0;function T(Z,ve){for(let pe=0;pe<Z;pe++){const Q=ve+pe,C=v(),J=v();L[O*2]=C,L[O*2+1]=J,O+=1,_[Q]=P;const Y=(N[C]<0?k[C]:1)+(N[J]<0?k[J]:1);k[Q]=Y,P+=Y}}T(a-l+s,l+y),T(l-s,s);const B=new Uint16Array(P);let U=0;for(let Z=0;Z<O;Z++)for(let ve=0;ve<2;ve++){const pe=L[Z*2+ve],Q=N[pe];if(Q<0){let C=_[pe];const J=C+k[pe];for(;C<J;)B[U++]=B[C++]}else B[U++]=Q}const ce=new Uint16Array(t);let re=0;for(;m<f;){let Z=Is[e.charCodeAt(m++)];Z>=l&&(Z=Z*91-p+Is[e.charCodeAt(m++)]);const ve=N[Z];if(ve<0){let pe=_[Z];const Q=pe+k[Z];for(;pe<Q;)ce[re++]=B[pe++]}else ce[re++]=ve}return ce}const IV=VV("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var Vi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(Vi||(Vi={}));var $r;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})($r||($r={}));const Km=32,e3=21,FV=2097151,by=2047;let t3=0;function zV(e){const t=e>>>e3;return t===by?t3:t}function $V(e){return e-$r.ZERO>>>0<=9}function UV(e){return(e|Km)-$r.LOWER_A>>>0<=5}function HV(e){return(e|Km)-$r.LOWER_A>>>0<=25}var wk;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(wk||(wk={}));var xk;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(xk||(xk={}));function WV(e,t,r,s){const a=(t&Vi.BRANCH_LENGTH)>>7,l=t&Vi.JUMP_TABLE;if(l){if(a===0)return s===l?r:-1;const p=s-l;if(p>>>0>=a)return-1;const m=e[r+p];return m===0?-1:r+a+m-1&65535}if(a===0)return-1;const c=a+1>>1,f=r+c+a;for(let p=0;p<a;p++){const v=e[r+(p>>1)]>>((p&1)<<3)&255;if(v===s){const y=r+c+p;return f+e[y]&65535}if(v>s)return-1}return-1}function Sk(e,t,r){return r===1?String.fromCharCode(e[t]&Vi.VALUE_MASK):r===2?String.fromCharCode(e[t+1]):String.fromCharCode(e[t+1],e[t+2])}function qV(e,t,r){let s=t+1,a=0,l=s;if(s<r&&(e.charCodeAt(s)|Km)===$r.LOWER_X)for(s+=1,l=s;s<r;){const f=e.charCodeAt(s);if($V(f))a=a*16+(f-$r.ZERO);else if(UV(f))a=a*16+((f|Km)-$r.LOWER_A+10);else break;s+=1}else for(;s<r;){const f=e.charCodeAt(s)-$r.ZERO;if(f>>>0>9)break;a=a*10+f,s+=1}if(s===l)return 0;s<r&&e.charCodeAt(s)===$r.SEMI&&(s+=1),a>1114111&&(a=1114112);let c=s-t;return c>=by&&(t3=c,c=by),c<<e3|a}function KV(e,t,r){const s=IV;let a=e.indexOf("&");if(a<0)return e;const l=e.length;let c=0,f="";const p=s[0],m=p&Vi.JUMP_TABLE,v=(p&Vi.BRANCH_LENGTH)>>7;do{const y=a+1,x=e.charCodeAt(y);let N,_;if(x===$r.NUM){const k=qV(e,y,l);N=zV(k),N>0&&e.charCodeAt(y+N-1)!==$r.SEMI&&(N=0),_=N===0?"":PV(k&FV)}else if(HV(x)){N=0,_="";const k=x-m;let j;if(k>>>0<v){const B=s[1+k];j=B===0?-1:v+B&65535}else j=-1;let L=0,P=0,O=j<0?0:s[j],T=y+1;e:for(;T<l;){for(;!(O&(Vi.VALUE_LENGTH|Vi.FLAG13))&&O&Vi.JUMP_TABLE;){const re=O&Vi.JUMP_TABLE,Z=(O&Vi.BRANCH_LENGTH)>>7;if(Z===0){if(e.charCodeAt(T)!==re)break e;j+=1}else{const ve=e.charCodeAt(T)-re;if(ve>>>0>=Z)break e;const pe=s[j+1+ve];if(pe===0)break e;j=j+Z+pe&65535}if(O=s[j],T+=1,T>=l)break e}if((O&(Vi.VALUE_LENGTH|Vi.FLAG13))===Vi.FLAG13){const re=(O&Vi.BRANCH_LENGTH)>>7;if(e.charCodeAt(T)!==(O&Vi.JUMP_TABLE))break;T+=1;const Z=re-1;let ve=j+1,pe=0;for(;pe+1<Z;pe+=2){const Q=s[ve];if(e.charCodeAt(T)!==(Q&255)||(T+=1,e.charCodeAt(T)!==(Q>>8&255)))break e;T+=1,ve+=1}if(pe<Z){if(e.charCodeAt(T)!==(s[ve]&255))break;T+=1}j+=1+(re>>1),O=s[j];continue}const B=O>>>14,U=e.charCodeAt(T);if(B!==0){if(U===$r.SEMI){N=T-y+1,_=B===1?String.fromCharCode(O&Vi.VALUE_MASK):Sk(s,j,B);break}if(B===1)break}const ce=WV(s,O,j+(B||1),U);if(ce<0)break;j=ce,O=s[j],T+=1}_===""&&N>0&&(_=Sk(s,L,P))}else N=0,_="";N===0||r?a=y:(c<a&&(f+=e.slice(c,a)),f+=_,a=c=y+N),e.charCodeAt(a)!==$r.AMP&&(a=e.indexOf("&",a))}while(a>=0);return f+e.slice(c)}function n3(e){return KV(e,!0,!1)}var YV=class{constructor(e={}){qt(this,"src_Any",JD.source);qt(this,"src_Cc",XD.source);qt(this,"src_Z",QD.source);qt(this,"src_P",kN.source);qt(this,"src_ZPCc",[this.src_Z,this.src_P,this.src_Cc].join("|"));qt(this,"src_ZCc",[this.src_Z,this.src_Cc].join("|"));qt(this,"cache",{});qt(this,"opts",{maxLength:1e4,urlAuth:!1,schema_names:[]});this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,r=4){const s=this.escapeRE(e),a=this.escapeRE(t),l=`(?:(?!${this.src_ZCc}|${s}|${a}).)`;let c=`${s}${l}{0,1000}${a}`;for(let f=2;f<=r;f++)c=`${s}(?:${l}|${c}){0,1000}${a}`;return c}get_text_separators(){var e;return(e=this.cache).text_separators??(e.text_separators=/[><\uff5c]/)}get_pseudo_letter(){var e;return(e=this.cache).src_pseudo_letter??(e.src_pseudo_letter=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`))}get_ipv4_addr(){var e;return(e=this.cache).src_ip4??(e.src_ip4=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])"))}get_ipv6_addr(){var r;const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return(r=this.cache).src_ip6_addr??(r.src_ip6_addr=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`))}get_ipv6_url_host(){var e;return(e=this.cache).src_ip6_host??(e.src_ip6_host=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`))}get_ipv6_mail_host(){var e;return(e=this.cache).src_ipv6_mail_host??(e.src_ipv6_mail_host=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`))}get_auth(){var e;return(e=this.cache).src_auth??(e.src_auth=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`))}get_port(){var e;return(e=this.cache).src_port??(e.src_port=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?"))}get_host_terminator(){var e;return(e=this.cache).src_host_terminator??(e.src_host_terminator=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`))}get_path_terminator(){var e;return(e=this.cache).src_path_terminator??(e.src_path_terminator=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`))}get_path(){var e;return(e=this.cache).src_path??(e.src_path=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`))}get_mail_name(){var e;return(e=this.cache).src_mail_name??(e.src_mail_name=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}"))}get_xn(){var e;return(e=this.cache).src_xn??(e.src_xn=new RegExp("xn--[a-z0-9\\-]{1,59}"))}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){var e;return(e=this.cache).src_domain_root??(e.src_domain_root=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`))}get_domain(){var e;return(e=this.cache).src_domain??(e.src_domain=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`))}get_url_host_port(){var e;return(e=this.cache).url_host_port??(e.url_host_port=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source))}get_fuzzy_url_host_port(){var e;return(e=this.cache).fuzzy_url_host_port??(e.fuzzy_url_host_port=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source))}get_mail_host(){var e;return(e=this.cache).src_mail_host??(e.src_mail_host=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source))}get_fuzzy_mail_host(){var e;return(e=this.cache).src_fuzzy_mail_host??(e.src_fuzzy_mail_host=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source))}get_path_extra(){var e;return(e=this.cache).src_path_extra??(e.src_path_extra=new RegExp(""))}get_fuzzy_mail_host_search(){var e;return(e=this.cache).mail_fuzzy_host_search??(e.mail_fuzzy_host_search=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig"))}get_fuzzy_link_search(){var e;return(e=this.cache).link_fuzzy_search??(e.link_fuzzy_search=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig"))}get_http_validator(){var e;return(e=this.cache).http_validator??(e.http_validator=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy"))}get_relative_proto_validator(){var e;return(e=this.cache).relative_proto_validator??(e.relative_proto_validator=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy"))}get_mail_name_validator(){var e;return(e=this.cache).mail_name_validator??(e.mail_name_validator=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`))}get_mailto_validator(){var e;return(e=this.cache).mailto_validator??(e.mailto_validator=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy"))}get_schema_names(){var e;return(e=this.cache).schema_names??(e.schema_names=new RegExp((this.opts.schema_names||[]).map(t=>this.escapeRE(t)).join("|")))}get_schema_search(){var e;return(e=this.cache).schema_search??(e.schema_search=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig"))}get_schema_at_start(){var e;return(e=this.cache).schema_at_start??(e.schema_at_start=new RegExp(`^${this.get_schema_search().source}`,"i"))}},E_={validate:(e,t,r)=>{const s=r.re.get_http_validator();s.lastIndex=t;const a=s.exec(e);return a?a[0].length:0},normalize:(e,t)=>t.normalize(e)},GV={"http:":E_,"https:":E_,"ftp:":E_,"//":{validate:function(e,t,r){const s=r.re.get_relative_proto_validator();s.lastIndex=t;const a=s.exec(e);return a?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:a[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,r){const s=r.re.get_mailto_validator();s.lastIndex=t;const a=s.exec(e);return a?a[0].length:0},normalize:(e,t)=>t.normalize(e)}},JV="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",XV="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function ZV(){const e=XV.split("|");return JV.split("|").forEach(t=>{const r=t.indexOf(":"),s=t.slice(0,r);for(const a of t.slice(r+1))e.push(s+a)}),e}var QV={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:ZV(),urlAuth:!1,maxLength:1e4},Ek=class{constructor(e,t,r,s){qt(this,"schema");qt(this,"index");qt(this,"lastIndex");qt(this,"raw");qt(this,"text");qt(this,"url");const a=e.slice(r,s);this.schema=t.toLowerCase(),this.index=r,this.lastIndex=s,this.raw=a,this.text=a,this.url=a}},e6=class{constructor(e={}){qt(this,"__opts__");qt(this,"__schemas__");qt(this,"re");const{rebuilder:t,...r}=e;this.__opts__={...QV,...r},this.__schemas__={...GV},this.re=t||new YV,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const r={normalize:(s,a)=>a.normalize(s),...t};this.__schemas__[e]=r}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,r;for(r=this.re.get_schema_search(),r.lastIndex=0;(t=r.exec(e))!==null;)if(this.testSchemaAt(e,t[2],r.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(r=this.re.get_fuzzy_link_search(),r.lastIndex=0,r.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const s=this.re.get_fuzzy_mail_host_search(),a=this.re.get_mail_name_validator();for(s.lastIndex=0;(t=s.exec(e))!==null;){const l=e.slice(Math.max(0,t.index-65),t.index);if(a.test(l))return!0}}return!1}testSchemaAt(e,t,r){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,r+this.__opts__.maxLength),r,this):0}match(e){const t=[],r=this.re.get_schema_search();let s,a,l,c,f,p,m=!1,v=!1,y=!1,x=0;if(!e.length)return null;for(r.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(s=this.re.get_fuzzy_link_search(),s.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(a=this.re.get_fuzzy_mail_host_search(),a.lastIndex=0,l=this.re.get_mail_name_validator());;){const N=Math.max(x-1,0);if(a&&l&&!y&&(!f||f.index<x))for(a.lastIndex<N&&(a.lastIndex=N);;){const P=a.exec(e);if(!P){y=!0,f=void 0;break}const O=l.exec(e.slice(Math.max(0,P.index-65),P.index));if(O){if(f={schema:"mailto:",index:P.index-O[1].length,lastIndex:P.index+P[0].length},f.index>=x)break;a.lastIndex<N&&(a.lastIndex=N)}}if(s&&!v&&(!c||c.index<x))for(s.lastIndex<N&&(s.lastIndex=N);;){const P=s.exec(e);if(!P){v=!0,c=void 0;break}if(c={schema:"",index:P.index+P[1].length,lastIndex:P.index+P[0].length},c.index>=x)break;s.lastIndex<N&&(s.lastIndex=N)}let _=f;(!_||c&&(c.index<_.index||c.index===_.index&&c.lastIndex>_.lastIndex))&&(_=c);let k;if(!m)for(;;){if(!p){r.lastIndex<N&&(r.lastIndex=N);const T=r.exec(e);if(!T){m=!0;break}p={schema:T[2],index:T.index+T[1].length,lastIndex:T.index+T[0].length}}if(p.index<x){p=void 0;continue}if(_&&p.index>_.index)break;const P=p;p=void 0;const O=this.testSchemaAt(e,P.schema,P.lastIndex);if(O){k={schema:P.schema,index:P.index,lastIndex:P.lastIndex+O};break}}let j=k;if((!j||f&&(f.index<j.index||f.index===j.index&&f.lastIndex>j.lastIndex))&&(j=f),(!j||c&&(c.index<j.index||c.index===j.index&&c.lastIndex>j.lastIndex))&&(j=c),!j)break;j===f?f=void 0:j===c&&(c=void 0);const L=new Ek(e,j.schema,j.index,j.lastIndex);L.schema?this.__schemas__[L.schema].normalize(L,this):this.normalize(L),t.push(L),x=j.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const r=this.testSchemaAt(e,t[2],t[0].length);if(!r)return null;const s=new Ek(e,t[2],t.index+t[1].length,t.index+t[0].length+r);return this.__schemas__[s.schema].normalize(s,this),s}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}};const fu=2147483647,ha=36,CN=1,zd=26,t6=38,n6=700,i3=72,r3=128,s3="-",i6=/^xn--/,r6=/[^\0-\x7F]/,s6=/[\x2E\u3002\uFF0E\uFF61]/g,a6={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k_=ha-CN,da=Math.floor,C_=String.fromCharCode;function Uo(e){throw new RangeError(a6[e])}function o6(e,t){const r=[];let s=e.length;for(;s--;)r[s]=t(e[s]);return r}function a3(e,t){const r=e.split("@");let s="";r.length>1&&(s=r[0]+"@",e=r[1]),e=e.replace(s6,".");const a=e.split("."),l=o6(a,t).join(".");return s+l}function o3(e){const t=[];let r=0;const s=e.length;for(;r<s;){const a=e.charCodeAt(r++);if(a>=55296&&a<=56319&&r<s){const l=e.charCodeAt(r++);(l&64512)==56320?t.push(((a&1023)<<10)+(l&1023)+65536):(t.push(a),r--)}else t.push(a)}return t}const l6=e=>String.fromCodePoint(...e),c6=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ha},kk=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},l3=function(e,t,r){let s=0;for(e=r?da(e/n6):e>>1,e+=da(e/t);e>k_*zd>>1;s+=ha)e=da(e/k_);return da(s+(k_+1)*e/(e+t6))},c3=function(e){const t=[],r=e.length;let s=0,a=r3,l=i3,c=e.lastIndexOf(s3);c<0&&(c=0);for(let f=0;f<c;++f)e.charCodeAt(f)>=128&&Uo("not-basic"),t.push(e.charCodeAt(f));for(let f=c>0?c+1:0;f<r;){const p=s;for(let v=1,y=ha;;y+=ha){f>=r&&Uo("invalid-input");const x=c6(e.charCodeAt(f++));x>=ha&&Uo("invalid-input"),x>da((fu-s)/v)&&Uo("overflow"),s+=x*v;const N=y<=l?CN:y>=l+zd?zd:y-l;if(x<N)break;const _=ha-N;v>da(fu/_)&&Uo("overflow"),v*=_}const m=t.length+1;l=l3(s-p,m,p==0),da(s/m)>fu-a&&Uo("overflow"),a+=da(s/m),s%=m,t.splice(s++,0,a)}return String.fromCodePoint(...t)},u3=function(e){const t=[];e=o3(e);const r=e.length;let s=r3,a=0,l=i3;for(const p of e)p<128&&t.push(C_(p));const c=t.length;let f=c;for(c&&t.push(s3);f<r;){let p=fu;for(const v of e)v>=s&&v<p&&(p=v);const m=f+1;p-s>da((fu-a)/m)&&Uo("overflow"),a+=(p-s)*m,s=p;for(const v of e)if(v<s&&++a>fu&&Uo("overflow"),v===s){let y=a;for(let x=ha;;x+=ha){const N=x<=l?CN:x>=l+zd?zd:x-l;if(y<N)break;const _=y-N,k=ha-N;t.push(C_(kk(N+_%k,0))),y=da(_/k)}t.push(C_(kk(y,0))),l=l3(a,m,f===c),a=0,++f}++a,++s}return t.join("")},u6=function(e){return a3(e,function(t){return i6.test(t)?c3(t.slice(4).toLowerCase()):t})},h6=function(e){return a3(e,function(t){return r6.test(t)?"xn--"+u3(t):t})},Ck={version:"2.3.1",ucs2:{decode:o3,encode:l6},decode:c3,encode:u3,toASCII:h6,toUnicode:u6};/*! markdown-it 15.0.2 https://github.com/markdown-it/markdown-it @license MIT */var Dk=Object.defineProperty,h3=(e,t)=>{let r={};for(var s in e)Dk(r,s,{get:e[s],enumerable:!0});return Dk(r,Symbol.toStringTag,{value:"Module"}),r},d6=h3({arrayReplaceAt:()=>f6,asciiTrim:()=>hg,callable:()=>d3,escapeHtml:()=>Xo,escapeRE:()=>x6,fromCodePoint:()=>$d,isMdAsciiPunct:()=>Wd,isPunctChar:()=>p3,isPunctCharCode:()=>Hd,isSpace:()=>Fn,isValidEntityCode:()=>DN,isWhiteSpace:()=>Ud,lib:()=>S6,normalizeReference:()=>ug,unescapeAll:()=>Eu,unescapeMd:()=>v6});function d3(e){const t=function(...r){return Reflect.construct(e,r,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function f6(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function DN(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function $d(e){if(e>65535){e-=65536;const t=55296+(e>>10),r=56320+(e&1023);return String.fromCharCode(t,r)}return String.fromCharCode(e)}var f3=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,p6=new RegExp(`${f3.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),m6=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function g6(e,t){if(t.charCodeAt(0)===35&&m6.test(t)){const s=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return DN(s)?$d(s):e}const r=n3(e);return r!==e?r:e}function v6(e){return e.indexOf("\\")<0?e:e.replace(f3,"$1")}function Eu(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(p6,function(t,r,s){return r||g6(t,s)})}var b6=/[&<>"]/,_6=/[&<>"]/g,y6={"&":"&","<":"<",">":">",'"':"""};function N6(e){return y6[e]}function Xo(e){return b6.test(e)?e.replace(_6,N6):e}var w6=/[.?*+^$[\]\\(){}|-]/g;function x6(e){return e.replace(w6,"\\$&")}function Fn(e){switch(e){case 9:case 32:return!0}return!1}function Ud(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function p3(e){return kN.test(e)||ZD.test(e)}function Hd(e){return p3($d(e))}function Wd(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ug(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function Rk(e){return e===32||e===9||e===10||e===13}function hg(e){let t=0;for(;t<e.length&&Rk(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&Rk(e.charCodeAt(r));r--);return e.slice(t,r+1)}var S6={mdurl:TV,ucmicro:OV};function E6(e,t,r){let s,a,l,c;const f=e.posMax,p=e.pos;for(e.pos=t+1,s=1;e.pos<f;){if(l=e.src.charCodeAt(e.pos),l===93&&(s--,s===0)){a=!0;break}if(c=e.pos,e.md.inline.skipToken(e),l===91){if(c===e.pos-1)s++;else if(r)return e.pos=p,-1}}let m=-1;return a&&(m=e.pos),e.pos=p,m}function k6(e,t,r){let s,a=t;const l={ok:!1,pos:0,str:""};if(e.charCodeAt(a)===60){for(a++;a<r;){if(s=e.charCodeAt(a),s===10||s===60)return l;if(s===62)return l.pos=a+1,l.str=Eu(e.slice(t+1,a)),l.ok=!0,l;if(s===92&&a+1<r){a+=2;continue}a++}return l}let c=0;for(;a<r&&(s=e.charCodeAt(a),!(s===32||s<32||s===127));){if(s===92&&a+1<r){if(e.charCodeAt(a+1)===32){a++;continue}a+=2;continue}if(s===40&&(c++,c>32))return l;if(s===41){if(c===0)break;c--}a++}return t===a||c!==0||(l.str=Eu(e.slice(t,a)),l.pos=a,l.ok=!0),l}function C6(e,t,r,s){let a,l=t;const c={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(s)c.str=s.str,c.marker=s.marker;else{if(l>=r)return c;let f=e.charCodeAt(l);if(f!==34&&f!==39&&f!==40)return c;t++,l++,f===40&&(f=41),c.marker=f}for(;l<r;){if(a=e.charCodeAt(l),a===c.marker)return c.pos=l+1,c.str+=Eu(e.slice(t,l)),c.ok=!0,c;if(a===40&&c.marker===41)return c;a===92&&l+1<r&&l++,l++}return c.can_continue=!0,c.str+=Eu(e.slice(t,l)),c}var D6=h3({parseLinkDestination:()=>k6,parseLinkLabel:()=>E6,parseLinkTitle:()=>C6});function qd(e){"@babel/helpers - typeof";return qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(e)}function R6(e,t){if(qd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.call(e,t);if(qd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A6(e){var t=R6(e,"string");return qd(t)=="symbol"?t:t+""}function ht(e,t,r){return(t=A6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Gl=class{constructor(e,t,r){ht(this,"map",null),ht(this,"level",0),ht(this,"children",null),ht(this,"content",""),ht(this,"markup",""),ht(this,"info",""),ht(this,"block",!1),ht(this,"hidden",!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=r,this.meta=null}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let r=0,s=t.length;r<s;r++)if(t[r][0]===e)return r;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){const r=this.attrIndex(e),s=[e,t];r<0?this.attrPush(s):this.attrs[r]=s}attrGet(e){const t=this.attrIndex(e);let r=null;return t>=0&&(r=this.attrs[t][1]),r}attrJoin(e,t){const r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=`${this.attrs[r][1]} ${t}`}},Kd=class{constructor(){ht(this,"__rules__",[]),ht(this,"__cache__",null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){const e=new Set;this.__rules__.forEach(t=>{t.enabled&&t.alt.forEach(r=>{r&&e.add(r)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach(t=>{t.enabled&&this.__cache__[""].push(t.fn)}),e.forEach(t=>{this.__cache__[t]=[],this.__rules__.forEach(r=>{r.enabled&&r.alt.indexOf(t)>=0&&this.__cache__[t].push(r.fn)})})}at(e,t,r={}){const s=this.__find__(e);if(s===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__[s].fn=t,this.__rules__[s].alt=r.alt||[],this.__cache__=null}before(e,t,r,s={}){const a=this.__find__(e);if(a===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null}after(e,t,r,s={}){const a=this.__find__(e);if(a===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null}push(e,t,r={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null}enable(e,t=!1){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(s=>{const a=this.__find__(s);if(a<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${s}`)}this.__rules__[a].enabled=!0,r.push(s)}),this.__cache__=null,r}enableOnly(e,t=!1){Array.isArray(e)||(e=[e]),this.__rules__.forEach(r=>{r.enabled=!1}),this.enable(e,t)}disable(e,t=!1){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(s=>{const a=this.__find__(s);if(a<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${s}`)}this.__rules__[a].enabled=!1,r.push(s)}),this.__cache__=null,r}getRules(e){return this.__cache__||this.__compile__(),this.__cache__[e]||[]}},_a={};_a.code_inline=function(e,t,r,s,a){const l=e[t];return`<code${a.renderAttrs(l)}>${Xo(l.content)}</code>`};_a.code_block=function(e,t,r,s,a){const l=e[t];return`<pre${a.renderAttrs(l)}><code>${Xo(e[t].content)}</code></pre>
|
|
210
|
+
`};_a.fence=function(e,t,r,s,a){const l=e[t],c=l.info?Eu(l.info).trim():"";let f="",p="";if(c){const v=c.split(/(\s+)/g);f=v[0],p=v.slice(2).join("")}let m;if(r.highlight?m=r.highlight(l.content,f,p)||Xo(l.content):m=Xo(l.content),m.indexOf("<pre")===0)return m+`
|
|
211
|
+
`;if(c){const v=l.attrIndex("class"),y=l.attrs?l.attrs.slice():[];v<0?y.push(["class",`${r.langPrefix}${f}`]):(y[v]=[y[v][0],y[v][1]],y[v][1]+=` ${r.langPrefix}${f}`);const x={attrs:y};return`<pre><code${a.renderAttrs(x)}>${m}</code></pre>
|
|
212
|
+
`}return`<pre><code${a.renderAttrs(l)}>${m}</code></pre>
|
|
213
|
+
`};_a.image=function(e,t,r,s,a){const l=e[t];return l.attrs[l.attrIndex("alt")][1]=a.renderInlineAsText(l.children,r,s),a.renderToken(e,t,r)};_a.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
214
|
+
`:`<br>
|
|
215
|
+
`};_a.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
216
|
+
`:`<br>
|
|
217
|
+
`:`
|
|
218
|
+
`};_a.text=function(e,t){return Xo(e[t].content)};_a.html_block=function(e,t){return e[t].content};_a.html_inline=function(e,t){return e[t].content};var m3=class{constructor(){ht(this,"rules",Object.assign({},_a))}renderAttrs(e){let t,r,s;if(!e.attrs)return"";for(s="",t=0,r=e.attrs.length;t<r;t++)s+=` ${Xo(e.attrs[t][0])}="${Xo(String(e.attrs[t][1]))}"`;return s}renderToken(e,t,r){const s=e[t];let a="";if(s.hidden)return"";let l=t-1;for(;l>=0&&e[l].hidden&&e[l].nesting===0;)l--;s.block&&s.nesting!==-1&&l>=0&&e[l].hidden&&e[l].nesting===-1&&(a+=`
|
|
219
|
+
`),a+=(s.nesting===-1?"</":"<")+s.tag,a+=this.renderAttrs(s),s.nesting===0&&r.xhtmlOut&&(a+=" /");let c=!1;if(s.block&&(c=!0,s.nesting===1)){let f=t+1;for(;f<e.length&&e[f].hidden&&e[f].nesting===0;)f++;if(f<e.length){const p=e[f];(p.type==="inline"||p.hidden||p.nesting===-1&&p.tag===s.tag)&&(c=!1)}}return a+=c?`>
|
|
220
|
+
`:">",a}renderInline(e,t,r){let s="";const a=this.rules;for(let l=0,c=e.length;l<c;l++){const f=e[l].type;typeof a[f]<"u"?s+=a[f](e,l,t,r,this):s+=this.renderToken(e,l,t)}return s}renderInlineAsText(e,t,r){let s="";for(let a=0,l=e.length;a<l;a++)switch(e[a].type){case"text":case"code_inline":s+=e[a].content;break;case"image":s+=this.renderInlineAsText(e[a].children,t,r);break;case"html_inline":case"html_block":s+=e[a].content;break;case"softbreak":case"hardbreak":s+=`
|
|
221
|
+
`}return s}render(e,t,r){let s="";const a=this.rules;for(let l=0,c=e.length;l<c;l++){const f=e[l].type;f==="inline"?s+=this.renderInline(e[l].children,t,r):typeof a[f]<"u"?s+=a[f](e,l,t,r,this):s+=this.renderToken(e,l,t)}return s}},g3=class{constructor(e,t,r){ht(this,"tokens",[]),ht(this,"inlineMode",!1),ht(this,"Token",Gl),this.src=e,this.env=r,this.md=t}},T6=/\r\n?/g,M6=/\0/g;function O6(e){let t;t=e.src.replace(T6,`
|
|
222
|
+
`),t=t.replace(M6,"�"),e.src=t}function j6(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function L6(e){const t=e.tokens;let r=0;for(let s=0;s<t.length;s++)t[s].type!=="reference_definition"&&(s!==r&&(t[r]=t[s]),r++);t.length!==r&&(t.length=r)}function B6(e){const t=e.tokens;for(let r=0,s=t.length;r<s;r++){const a=t[r];a.type==="inline"&&e.md.inline.parse(a.content,e.md,e.env,a.children)}}function P6(e){return/^<a[>\s]/i.test(e)}function V6(e){return/^<\/a\s*>/i.test(e)}function I6(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,s=t.length;r<s;r++){if(t[r].type!=="inline"||!e.md.linkify.test(t[r].content))continue;const a=t[r].children,l=[];let c=0;for(let f=a.length-1;f>=0;f--){const p=a[f];if(p.type==="link_close"){for(f--;a[f].level!==p.level&&a[f].type!=="link_open";)f--;continue}if(p.type==="html_inline"&&(P6(p.content)&&c>0&&c--,V6(p.content)&&c++),!(c>0)&&p.type==="text"&&e.md.linkify.test(p.content)){const m=p.content;let v=e.md.linkify.match(m);const y=[];let x=p.level,N=0;v.length>0&&v[0].index===0&&f>0&&a[f-1].type==="text_special"&&(v=v.slice(1));for(let _=0;_<v.length;_++){const k=v[_].url,j=e.md.normalizeLink(k);if(!e.md.validateLink(j))continue;let L=v[_].text;v[_].schema?v[_].schema==="mailto:"&&!/^mailto:/i.test(L)?L=e.md.normalizeLinkText(`mailto:${L}`).replace(/^mailto:/,""):L=e.md.normalizeLinkText(L):L=e.md.normalizeLinkText(`http://${L}`).replace(/^http:\/\//,"");const P=v[_].index;if(P>N){const U=new e.Token("text","",0);U.content=m.slice(N,P),U.level=x,y.push(U)}const O=new e.Token("link_open","a",1);O.attrs=[["href",j]],O.level=x++,O.markup="linkify",O.info="auto",y.push(O);const T=new e.Token("text","",0);T.content=L,T.level=x,y.push(T);const B=new e.Token("link_close","a",-1);B.level=--x,B.markup="linkify",B.info="auto",y.push(B),N=v[_].lastIndex}if(N<m.length){const _=new e.Token("text","",0);_.content=m.slice(N),_.level=x,y.push(_)}l.push({index:f,nodes:y})}}if(l.length>0){let f=a.length;for(const y of l)f+=y.nodes.length-1;const p=new Array(f);let m=0,v=0;l.reverse();for(let y=0;y<a.length;y++){const x=l[m];if((x==null?void 0:x.index)===y){for(const N of x.nodes)p[v++]=N;m++}else p[v++]=a[y]}t[r].children=p}}}var v3=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,F6=/\((c|tm|r)\)/i,z6=/\((c|tm|r)\)/gi,$6={c:"©",r:"®",tm:"™"};function U6(e,t){return $6[t.toLowerCase()]}function H6(e){let t=0;for(let r=e.length-1;r>=0;r--){const s=e[r];s.type==="text"&&!t&&(s.content=s.content.replace(z6,U6)),s.type==="link_open"&&s.info==="auto"&&t--,s.type==="link_close"&&s.info==="auto"&&t++}}function W6(e){let t=0;for(let r=e.length-1;r>=0;r--){const s=e[r];s.type==="text"&&!t&&v3.test(s.content)&&(s.content=s.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),s.type==="link_open"&&s.info==="auto"&&t--,s.type==="link_close"&&s.info==="auto"&&t++}}function q6(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(F6.test(e.tokens[t].content)&&H6(e.tokens[t].children),v3.test(e.tokens[t].content)&&W6(e.tokens[t].children))}var K6=/['"]/,Ak=/['"]/g,Tk="’",Y6=1e3;function Mk(e,t,r){for(;e.length>r;){const s=e.pop();s.isSingleQuote?t.single=s.prevSameQuoteIdx:t.double=s.prevSameQuoteIdx}}function dm(e,t,r,s){e[t]||(e[t]=[]),e[t].push({pos:r,ch:s})}function G6(e,t){let r="",s=0;t.sort((a,l)=>a.pos-l.pos);for(let a=0;a<t.length;a++){const l=t[a];r+=e.slice(s,l.pos)+l.ch,s=l.pos+1}return r+e.slice(s)}function J6(e,t){let r;const s=[],a={single:-1,double:-1},l={};for(let c=0;c<e.length;c++){const f=e[c],p=e[c].level;for(r=s.length-1;r>=0&&!(s[r].level<=p);r--);if(Mk(s,a,r+1),f.type!=="text")continue;const m=f.content;let v=0;const y=m.length;e:for(;v<y;){Ak.lastIndex=v;const x=Ak.exec(m);if(!x)break;let N=!0,_=!0;v=x.index+1;const k=x[0]==="'";let j=32;if(x.index-1>=0)j=m.charCodeAt(x.index-1);else for(r=c-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){j=e[r].content.charCodeAt(e[r].content.length-1);break}let L=32;if(v<y)L=m.charCodeAt(v);else for(r=c+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){L=e[r].content.charCodeAt(0);break}const P=Wd(j)||Hd(j),O=Wd(L)||Hd(L),T=Ud(j),B=Ud(L);if(B?N=!1:O&&(T||P||(N=!1)),T?_=!1:P&&(B||O||(_=!1)),L===34&&x[0]==='"'&&j>=48&&j<=57&&(_=N=!1),N&&_&&(N=P,_=O),!N&&!_){k&&dm(l,c,x.index,Tk);continue}if(_&&(r=k?a.single:a.double,r>=0&&s[r].level===p)){const U=s[r];let ce,re;k?(ce=t.md.options.quotes[2],re=t.md.options.quotes[3]):(ce=t.md.options.quotes[0],re=t.md.options.quotes[1]),dm(l,c,x.index,re),dm(l,U.tokenIdx,U.contentPos,ce),Mk(s,a,r);continue e}if(N){if(s.length>=Y6)return;s.push({tokenIdx:c,contentPos:x.index,isSingleQuote:k,level:p,prevSameQuoteIdx:k?a.single:a.double}),k?a.single=s.length-1:a.double=s.length-1}else _&&k&&dm(l,c,x.index,Tk)}}Object.keys(l).forEach(function(c){const f=Number(c);e[f].content=G6(e[f].content,l[c])})}function X6(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!K6.test(e.tokens[t].content)||J6(e.tokens[t].children,e)}function Z6(e){let t,r;const s=e.length;for(t=0;t<s;t++)e[t].type==="text_special"&&(e[t].type="text");for(t=r=0;t<s;t++)e[t].type==="text"&&t+1<s&&e[t+1].type==="text"?e[t+1].content=e[t].content+e[t+1].content:(t!==r&&(e[r]=e[t]),r++);t!==r&&(e.length=r)}function Q6(e){let t,r;const s=e.tokens,a=s.length;for(let l=0;l<a;l++){if(s[l].type!=="inline")continue;const c=s[l].children,f=c.length;for(t=0;t<f;t++)c[t].type==="text_special"&&(c[t].type="text"),c[t].children&&Z6(c[t].children);for(t=r=0;t<f;t++)c[t].type==="text"&&t+1<f&&c[t+1].type==="text"?c[t+1].content=c[t].content+c[t+1].content:(t!==r&&(c[r]=c[t]),r++);t!==r&&(c.length=r)}}var D_=[["normalize",O6],["block",j6],["strip_references",L6],["inline",B6],["linkify",I6],["replacements",q6],["smartquotes",X6],["text_join",Q6]],b3=class{constructor(){ht(this,"ruler",new Kd),ht(this,"State",g3);for(let e=0;e<D_.length;e++)this.ruler.push(D_[e][0],D_[e][1])}process(e){const t=this.ruler.getRules("");for(let r=0,s=t.length;r<s;r++)t[r](e)}},_3=class{constructor(e,t,r,s){ht(this,"bMarks",[]),ht(this,"eMarks",[]),ht(this,"tShift",[]),ht(this,"sCount",[]),ht(this,"bsCount",[]),ht(this,"blkIndent",0),ht(this,"line",0),ht(this,"lineMax",0),ht(this,"tight",!1),ht(this,"listIndent",-1),ht(this,"parentType","root"),ht(this,"level",0),ht(this,"Token",Gl),this.src=e,this.md=t,this.env=r,this.tokens=s;const a=this.src;for(let l=0,c=0,f=0,p=0,m=a.length,v=!1;c<m;c++){const y=a.charCodeAt(c);if(!v)if(Fn(y)){f++,y===9?p+=4-p%4:p++;continue}else v=!0;(y===10||c===m-1)&&(y!==10&&c++,this.bMarks.push(l),this.eMarks.push(c),this.tShift.push(f),this.sCount.push(p),this.bsCount.push(0),v=!1,f=0,p=0,l=c+1)}this.bMarks.push(a.length),this.eMarks.push(a.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,r){const s=new Gl(e,t,r);return s.block=!0,r<0&&this.level--,s.level=this.level,r>0&&this.level++,this.tokens.push(s),s}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e}skipSpaces(e){for(let t=this.src.length;e<t&&Fn(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!Fn(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,r){if(e<=r)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,r,s){if(e>=t)return"";const a=new Array(t-e);for(let l=0,c=e;c<t;c++,l++){let f=0;const p=this.bMarks[c];let m=p,v;for(c+1<t||s?v=this.eMarks[c]+1:v=this.eMarks[c];m<v&&f<r;){const y=this.src.charCodeAt(m);if(Fn(y))y===9?f+=4-(f+this.bsCount[c])%4:f++;else if(m-p<this.tShift[c])f++;else break;m++}f>r?a[l]=new Array(f-r+1).join(" ")+this.src.slice(m,v):a[l]=this.src.slice(m,v)}return a.join("")}},eI=65536;function R_(e,t){const r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];return e.src.slice(r,s)}function Ok(e){const t=[],r=e.length;let s=0,a=e.charCodeAt(s),l=!1,c=0,f="";for(;s<r;)a===124&&(l?(f+=e.substring(c,s-1),c=s):(t.push(f+e.substring(c,s)),f="",c=s+1)),l=a===92,s++,a=e.charCodeAt(s);return t.push(f+e.substring(c)),t}function tI(e,t,r,s){if(t+2>r)return!1;let a=t+1;if(e.sCount[a]<e.blkIndent||e.sCount[a]-e.blkIndent>=4)return!1;let l=e.bMarks[a]+e.tShift[a];if(l>=e.eMarks[a])return!1;const c=e.src.charCodeAt(l++);if(c!==124&&c!==45&&c!==58||l>=e.eMarks[a])return!1;const f=e.src.charCodeAt(l++);if(f!==124&&f!==45&&f!==58&&!Fn(f)||c===45&&Fn(f))return!1;for(;l<e.eMarks[a];){const T=e.src.charCodeAt(l);if(T!==124&&T!==45&&T!==58&&!Fn(T))return!1;l++}let p=R_(e,t+1),m=p.split("|");const v=[];for(let T=0;T<m.length;T++){const B=m[T].trim();if(!B){if(T===0||T===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(B))return!1;B.charCodeAt(B.length-1)===58?v.push(B.charCodeAt(0)===58?"center":"right"):B.charCodeAt(0)===58?v.push("left"):v.push("")}if(p=R_(e,t).trim(),p.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;m=Ok(p),m.length&&m[0]===""&&m.shift(),m.length&&m[m.length-1]===""&&m.pop();const y=m.length;if(y===0||y!==v.length)return!1;if(s)return!0;const x=e.parentType;e.parentType="table";const N=e.md.block.ruler.getRules("blockquote"),_=e.push("table_open","table",1),k=[t,0];_.map=k;const j=e.push("thead_open","thead",1);j.map=[t,t+1];const L=e.push("tr_open","tr",1);L.map=[t,t+1];for(let T=0;T<m.length;T++){const B=e.push("th_open","th",1);v[T]&&(B.attrs=[["style",`text-align:${v[T]}`]]);const U=e.push("inline","",0);U.content=m[T].trim(),U.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let P,O=0;for(a=t+2;a<r&&!(e.sCount[a]<e.blkIndent);a++){let T=!1;for(let U=0,ce=N.length;U<ce;U++)if(N[U](e,a,r,!0)){T=!0;break}if(T||(p=R_(e,a).trim(),!p)||e.sCount[a]-e.blkIndent>=4||(m=Ok(p),m.length&&m[0]===""&&m.shift(),m.length&&m[m.length-1]===""&&m.pop(),O+=y-m.length,O>eI))break;if(a===t+2){const U=e.push("tbody_open","tbody",1);U.map=P=[t+2,0]}const B=e.push("tr_open","tr",1);B.map=[a,a+1];for(let U=0;U<y;U++){const ce=e.push("td_open","td",1);v[U]&&(ce.attrs=[["style",`text-align:${v[U]}`]]);const re=e.push("inline","",0);re.content=m[U]?m[U].trim():"",re.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return P&&(e.push("tbody_close","tbody",-1),P[1]=a),e.push("table_close","table",-1),k[1]=a,e.parentType=x,e.line=a,!0}function nI(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let s=t+1,a=s;for(;s<r;){if(e.isEmpty(s)){s++;continue}if(e.sCount[s]-e.blkIndent>=4){s++,a=s;continue}break}e.line=a;const l=e.push("code_block","code",0);return l.content=e.getLines(t,a,4+e.blkIndent,!1)+`
|
|
223
|
+
`,l.map=[t,e.line],!0}function iI(e,t,r,s){let a=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||a+3>l)return!1;const c=e.src.charCodeAt(a);if(c!==126&&c!==96)return!1;let f=a;a=e.skipChars(a,c);let p=a-f;if(p<3)return!1;const m=e.src.slice(f,a),v=e.src.slice(a,l);if(c===96&&v.indexOf(String.fromCharCode(c))>=0)return!1;if(s)return!0;let y=t,x=!1;for(;y++,!(y>=r||(a=f=e.bMarks[y]+e.tShift[y],l=e.eMarks[y],a<l&&e.sCount[y]<e.blkIndent));)if(e.src.charCodeAt(a)===c&&!(e.sCount[y]-e.blkIndent>=4)&&(a=e.skipChars(a,c),!(a-f<p)&&(a=e.skipSpaces(a),!(a<l)))){x=!0;break}p=e.sCount[t],e.line=y+(x?1:0);const N=e.push("fence","code",0);return N.info=v,N.content=e.getLines(t+1,y,p,!0),N.markup=m,N.map=[t,e.line],!0}function rI(e,t,r,s){let a=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];const c=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(a)!==62)return!1;if(s)return!0;const f=[],p=[],m=[],v=[],y=e.md.block.ruler.getRules("blockquote"),x=e.parentType;e.parentType="blockquote";let N=!1,_;for(_=t;_<r;_++){const O=e.sCount[_]<e.blkIndent;if(a=e.bMarks[_]+e.tShift[_],l=e.eMarks[_],a>=l)break;if(e.src.charCodeAt(a++)===62&&!O){let B=e.sCount[_]+1,U,ce;e.src.charCodeAt(a)===32?(a++,B++,ce=!1,U=!0):e.src.charCodeAt(a)===9?(U=!0,(e.bsCount[_]+B)%4===3?(a++,B++,ce=!1):ce=!0):U=!1;let re=B;for(f.push(e.bMarks[_]),e.bMarks[_]=a;a<l;){const Z=e.src.charCodeAt(a);if(Fn(Z))Z===9?re+=4-(re+e.bsCount[_]+(ce?1:0))%4:re++;else break;a++}N=a>=l,p.push(e.bsCount[_]),e.bsCount[_]=e.sCount[_]+1+(U?1:0),m.push(e.sCount[_]),e.sCount[_]=re-B,v.push(e.tShift[_]),e.tShift[_]=a-e.bMarks[_];continue}if(N)break;let T=!1;for(let B=0,U=y.length;B<U;B++)if(y[B](e,_,r,!0)){T=!0;break}if(T){e.lineMax=_,e.blkIndent!==0&&(f.push(e.bMarks[_]),p.push(e.bsCount[_]),v.push(e.tShift[_]),m.push(e.sCount[_]),e.sCount[_]-=e.blkIndent);break}f.push(e.bMarks[_]),p.push(e.bsCount[_]),v.push(e.tShift[_]),m.push(e.sCount[_]),e.sCount[_]=-1}const k=e.blkIndent;e.blkIndent=0;const j=e.push("blockquote_open","blockquote",1);j.markup=">";const L=[t,0];j.map=L,e.md.block.tokenize(e,t,_);const P=e.push("blockquote_close","blockquote",-1);P.markup=">",e.lineMax=c,e.parentType=x,L[1]=e.line;for(let O=0;O<v.length;O++)e.bMarks[O+t]=f[O],e.tShift[O+t]=v[O],e.sCount[O+t]=m[O],e.bsCount[O+t]=p[O];return e.blkIndent=k,!0}function sI(e,t,r,s){const a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let l=e.bMarks[t]+e.tShift[t];const c=e.src.charCodeAt(l++);if(c!==42&&c!==45&&c!==95)return!1;let f=1;for(;l<a;){const m=e.src.charCodeAt(l++);if(m!==c&&!Fn(m))return!1;m===c&&f++}if(f<3)return!1;if(s)return!0;e.line=t+1;const p=e.push("hr","hr",0);return p.map=[t,e.line],p.markup=Array(f+1).join(String.fromCharCode(c)),!0}function jk(e,t){const r=e.eMarks[t];let s=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(s++);return a!==42&&a!==45&&a!==43||s<r&&!Fn(e.src.charCodeAt(s))?-1:s}function Lk(e,t){const r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];let a=r;if(a+1>=s)return-1;let l=e.src.charCodeAt(a++);if(l<48||l>57)return-1;for(;;){if(a>=s)return-1;if(l=e.src.charCodeAt(a++),l>=48&&l<=57){if(a-r>=10)return-1;continue}if(l===41||l===46)break;return-1}return a<s&&(l=e.src.charCodeAt(a),!Fn(l))?-1:a}function aI(e,t){const r=e.level+2;for(let s=t+2,a=e.tokens.length-2;s<a;s++)e.tokens[s].level===r&&e.tokens[s].type==="paragraph_open"&&(e.tokens[s+2].hidden=!0,e.tokens[s].hidden=!0,s+=2)}function oI(e,t,r,s){let a,l,c,f,p=t,m=!0;if(e.sCount[p]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[p]-e.listIndent>=4&&e.sCount[p]<e.blkIndent)return!1;let v=!1;s&&e.parentType==="paragraph"&&e.sCount[p]>=e.blkIndent&&(v=!0);let y,x,N;if((N=Lk(e,p))>=0){if(y=!0,c=e.bMarks[p]+e.tShift[p],x=Number(e.src.slice(c,N-1)),v&&x!==1)return!1}else if((N=jk(e,p))>=0)y=!1;else return!1;if(v&&e.skipSpaces(N)>=e.eMarks[p])return!1;if(s)return!0;const _=e.src.charCodeAt(N-1),k=e.tokens.length;y?(f=e.push("ordered_list_open","ol",1),x!==1&&(f.attrs=[["start",x]])):f=e.push("bullet_list_open","ul",1);const j=[p,0];f.map=j,f.markup=String.fromCharCode(_);let L=!1;const P=e.md.block.ruler.getRules("list"),O=e.parentType;for(e.parentType="list";p<r;){l=N,a=e.eMarks[p];const T=e.sCount[p]+N-(e.bMarks[p]+e.tShift[p]);let B=T;for(;l<a;){const Y=e.src.charCodeAt(l);if(Y===9)B+=4-(B+e.bsCount[p])%4;else if(Y===32)B++;else break;l++}const U=l;let ce;U>=a?ce=1:ce=B-T,ce>4&&(ce=1);const re=T+ce;f=e.push("list_item_open","li",1),f.markup=String.fromCharCode(_);const Z=[p,0];f.map=Z,y&&(f.info=e.src.slice(c,N-1));const ve=e.tight,pe=e.tShift[p],Q=e.sCount[p],C=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=re,e.tight=!0,e.tShift[p]=U-e.bMarks[p],e.sCount[p]=B,U>=a&&e.isEmpty(p+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,p,r),(!e.tight||L)&&(m=!1),L=e.line-p>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=C,e.tShift[p]=pe,e.sCount[p]=Q,e.tight=ve,f=e.push("list_item_close","li",-1),f.markup=String.fromCharCode(_),p=e.line,Z[1]=p,p>=r||e.sCount[p]<e.blkIndent||e.sCount[p]-e.blkIndent>=4)break;let J=!1;for(let Y=0,z=P.length;Y<z;Y++)if(P[Y](e,p,r,!0)){J=!0;break}if(J)break;if(y){if(N=Lk(e,p),N<0)break;c=e.bMarks[p]+e.tShift[p]}else if(N=jk(e,p),N<0)break;if(_!==e.src.charCodeAt(N-1))break}return y?f=e.push("ordered_list_close","ol",-1):f=e.push("bullet_list_close","ul",-1),f.markup=String.fromCharCode(_),j[1]=p,e.line=p,e.parentType=O,m&&aI(e,k),!0}function lI(e,t,r,s){let a=e.bMarks[t]+e.tShift[t],l=e.eMarks[t],c=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(a)!==91)return!1;function f(T){const B=e.lineMax;if(T>=B||e.isEmpty(T))return null;let U=!1;if(e.sCount[T]-e.blkIndent>3&&(U=!0),e.sCount[T]<0&&(U=!0),!U){const Z=e.md.block.ruler.getRules("reference"),ve=e.parentType;e.parentType="reference";let pe=!1;for(let Q=0,C=Z.length;Q<C;Q++)if(Z[Q](e,T,B,!0)){pe=!0;break}if(e.parentType=ve,pe)return null}const ce=e.bMarks[T]+e.tShift[T],re=e.eMarks[T];return e.src.slice(ce,re+1)}let p=e.src.slice(a,l+1);l=p.length;let m=-1;for(a=1;a<l;a++){const T=p.charCodeAt(a);if(T===91)return!1;if(T===93){m=a;break}else if(T===10){const B=f(c);B!==null&&(p+=B,l=p.length,c++)}else if(T===92&&(a++,a<l&&p.charCodeAt(a)===10)){const B=f(c);B!==null&&(p+=B,l=p.length,c++)}}if(m<0||p.charCodeAt(m+1)!==58)return!1;for(a=m+2;a<l;a++){const T=p.charCodeAt(a);if(T===10){const B=f(c);B!==null&&(p+=B,l=p.length,c++)}else if(!Fn(T))break}const v=e.md.helpers.parseLinkDestination(p,a,l);if(!v.ok)return!1;const y=e.md.normalizeLink(v.str);if(!e.md.validateLink(y))return!1;a=v.pos;const x=a,N=c,_=a;for(;a<l;a++){const T=p.charCodeAt(a);if(T===10){const B=f(c);B!==null&&(p+=B,l=p.length,c++)}else if(!Fn(T))break}let k=e.md.helpers.parseLinkTitle(p,a,l);for(;k.can_continue;){const T=f(c);if(T===null)break;p+=T,a=l,l=p.length,c++,k=e.md.helpers.parseLinkTitle(p,a,l,k)}let j;for(a<l&&_!==a&&k.ok?(j=k.str,a=k.pos):(j="",a=x,c=N);a<l&&Fn(p.charCodeAt(a));)a++;if(a<l&&p.charCodeAt(a)!==10&&j)for(j="",a=x,c=N;a<l&&Fn(p.charCodeAt(a));)a++;if(a<l&&p.charCodeAt(a)!==10)return!1;const L=ug(p.slice(1,m));if(!L)return!1;if(s)return!0;typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[L]>"u"&&(e.env.references[L]={title:j,href:y});const P=e.push("reference_definition","",0);P.map=[t,c],P.hidden=!0;const O=Object.create(null);return O.label=L,P.meta=O,e.line=c,!0}var cI=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],y3=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,N3="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",uI=new RegExp(`^(?:${y3}|${N3}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),hI=new RegExp(`^(?:${y3}|${N3})`),Ol=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${cI.join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${hI.source}\\s*$`),/^$/,!1]];function dI(e,t,r,s){let a=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(a)!==60)return!1;let c=e.src.slice(a,l),f=0;for(;f<Ol.length&&!Ol[f][0].test(c);f++);if(f===Ol.length)return!1;if(s)return Ol[f][2];let p=t+1;const m=Ol[f][1].test("");if(!Ol[f][1].test(c)){for(;p<r&&!(e.sCount[p]<e.blkIndent&&(m||!e.isEmpty(p)));p++)if(a=e.bMarks[p]+e.tShift[p],l=e.eMarks[p],c=e.src.slice(a,l),Ol[f][1].test(c)){c.length!==0&&p++;break}}e.line=p;const v=e.push("html_block","",0);return v.map=[t,p],v.content=e.getLines(t,p,e.blkIndent,!0),!0}function fI(e,t,r,s){let a=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let c=e.src.charCodeAt(a);if(c!==35||a>=l)return!1;let f=1;for(c=e.src.charCodeAt(++a);c===35&&a<l&&f<=6;)f++,c=e.src.charCodeAt(++a);if(f>6||a<l&&!Fn(c))return!1;if(s)return!0;l=e.skipSpacesBack(l,a);const p=e.skipCharsBack(l,35,a);p>a&&Fn(e.src.charCodeAt(p-1))&&(l=p),e.line=t+1;const m=e.push("heading_open",`h${f}`,1);m.markup="########".slice(0,f),m.map=[t,e.line];const v=e.push("inline","",0);v.content=hg(e.src.slice(a,l)),v.map=[t,e.line],v.children=[];const y=e.push("heading_close",`h${f}`,-1);return y.markup="########".slice(0,f),!0}function pI(e,t,r){const s=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const a=e.parentType;e.parentType="paragraph";let l=0,c,f=t+1;for(;f<r&&!e.isEmpty(f);f++){if(e.sCount[f]-e.blkIndent>3)continue;if(e.sCount[f]>=e.blkIndent){let N=e.bMarks[f]+e.tShift[f];const _=e.eMarks[f];if(N<_&&(c=e.src.charCodeAt(N),(c===45||c===61)&&(N=e.skipChars(N,c),N=e.skipSpaces(N),N>=_))){l=c===61?1:2;break}}if(e.sCount[f]<0)continue;let x=!1;for(let N=0,_=s.length;N<_;N++)if(s[N](e,f,r,!0)){x=!0;break}if(x)break}if(!l)return e.parentType=a,!1;const p=hg(e.getLines(t,f,e.blkIndent,!1));e.line=f+1;const m=e.push("heading_open",`h${l}`,1);m.markup=String.fromCharCode(c),m.map=[t,e.line];const v=e.push("inline","",0);v.content=p,v.map=[t,e.line-1],v.children=[];const y=e.push("heading_close",`h${l}`,-1);return y.markup=String.fromCharCode(c),e.parentType=a,!0}function mI(e,t,r){const s=e.md.block.ruler.getRules("paragraph"),a=e.parentType;let l=t+1;for(e.parentType="paragraph";l<r&&!e.isEmpty(l);l++){if(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)continue;let m=!1;for(let v=0,y=s.length;v<y;v++)if(s[v](e,l,r,!0)){m=!0;break}if(m)break}const c=hg(e.getLines(t,l,e.blkIndent,!1));e.line=l;const f=e.push("paragraph_open","p",1);f.map=[t,e.line];const p=e.push("inline","",0);return p.content=c,p.map=[t,e.line],p.children=[],e.push("paragraph_close","p",-1),e.parentType=a,!0}var fm=[["table",tI,["paragraph","reference"]],["code",nI],["fence",iI,["paragraph","reference","blockquote","list"]],["blockquote",rI,["paragraph","reference","blockquote","list"]],["hr",sI,["paragraph","reference","blockquote","list"]],["list",oI,["paragraph","reference","blockquote"]],["reference",lI],["html_block",dI,["paragraph","reference","blockquote"]],["heading",fI,["paragraph","reference","blockquote"]],["lheading",pI],["paragraph",mI]],w3=class{constructor(){ht(this,"ruler",new Kd),ht(this,"State",_3);for(let e=0;e<fm.length;e++)this.ruler.push(fm[e][0],fm[e][1],{alt:(fm[e][2]||[]).slice()})}tokenize(e,t,r){const s=this.ruler.getRules(""),a=s.length,l=e.md.options.maxNesting;let c=t,f=!1;for(;c<r&&(e.line=c=e.skipEmptyLines(c),!(c>=r||e.sCount[c]<e.blkIndent));){if(e.level>=l){e.line=r;break}const p=e.line;let m=!1;for(let v=0;v<a;v++)if(m=s[v](e,c,r,!1),m){if(p>=e.line)throw new Error("block rule didn't increment state.line");break}if(!m)throw new Error("none of the block rules matched");e.tight=!f,e.isEmpty(e.line-1)&&(f=!0),c=e.line,c<r&&e.isEmpty(c)&&(f=!0,c++,e.line=c)}}parse(e,t,r,s){if(!e)return;const a=new this.State(e,t,r,s);this.tokenize(a,a.line,a.lineMax)}},x3=class{constructor(e,t,r,s){ht(this,"pos",0),ht(this,"level",0),ht(this,"pending",""),ht(this,"pendingLevel",0),ht(this,"cache",{}),ht(this,"backticks",{}),ht(this,"backticksScanned",!1),ht(this,"linkLevel",0),ht(this,"delimiters",[]),ht(this,"_prev_delimiters",[]),ht(this,"Token",Gl),this.src=e,this.env=r,this.md=t,this.tokens=s,this.tokens_meta=Array(s.length),this.posMax=this.src.length}pushPending(){const e=new Gl("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}push(e,t,r){this.pending&&this.pushPending();const s=new Gl(e,t,r);let a;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),s.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],a={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(s),this.tokens_meta.push(a),s}scanDelims(e,t){const r=this.posMax,s=this.src.charCodeAt(e);let a;if(e===0)a=32;else if(e===1)a=this.src.charCodeAt(0),(a&63488)===55296&&(a=65533);else if(a=this.src.charCodeAt(e-1),(a&64512)===56320){const _=this.src.charCodeAt(e-2);a=(_&64512)===55296?65536+(_-55296<<10)+(a-56320):65533}else(a&64512)===55296&&(a=65533);let l=e;for(;l<r&&this.src.charCodeAt(l)===s;)l++;const c=l-e;let f=l<r?this.src.charCodeAt(l):32;if((f&64512)===55296){const _=this.src.charCodeAt(l+1);f=(_&64512)===56320?65536+(f-55296<<10)+(_-56320):65533}else(f&64512)===56320&&(f=65533);const p=Wd(a)||Hd(a),m=Wd(f)||Hd(f),v=Ud(a),y=Ud(f),x=!y&&(!m||v||p),N=!v&&(!p||y||m);return{can_open:x&&(t||!N||p),can_close:N&&(t||!x||m),length:c}}};function gI(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function vI(e,t){let r=e.pos;for(;r<e.posMax&&!gI(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}function bI(e){return e>=65&&e<=90||e>=97&&e<=122}function _I(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function yI(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,s=e.posMax;if(r+3>s||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const a=r-Math.min(10,e.pending.length,r);let l=r;for(;l>a&&_I(e.src.charCodeAt(l-1));)l--;if(l===r||!bI(e.src.charCodeAt(l)))return!1;const c=r-l,f=e.md.linkify.matchAtStart(e.src.slice(l));if(!f)return!1;let p=f.url;if(p.length<=c)return!1;let m=p.length;for(;m>0&&p.charCodeAt(m-1)===42;)m--;m!==p.length&&(p=p.slice(0,m));const v=e.md.normalizeLink(p);if(!e.md.validateLink(v))return!1;if(!t){e.pending=e.pending.slice(0,-c);const y=e.push("link_open","a",1);y.attrs=[["href",v]],y.markup="linkify",y.info="auto";const x=e.push("text","",0);x.content=e.md.normalizeLinkText(p);const N=e.push("link_close","a",-1);N.markup="linkify",N.info="auto"}return e.pos+=p.length-c,!0}function NI(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const s=e.pending.length-1,a=e.posMax;if(!t)if(s>=0&&e.pending.charCodeAt(s)===32)if(s>=1&&e.pending.charCodeAt(s-1)===32){let l=s-1;for(;l>=1&&e.pending.charCodeAt(l-1)===32;)l--;e.pending=e.pending.slice(0,l),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<a&&Fn(e.src.charCodeAt(r));)r++;return e.pos=r,!0}var RN=[];for(let e=0;e<256;e++)RN.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){RN[e.charCodeAt(0)]=1});function wI(e,t){let r=e.pos;const s=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=s))return!1;let a=e.src.charCodeAt(r);if(a===10){for(t||e.push("hardbreak","br",0),r++;r<s&&(a=e.src.charCodeAt(r),!!Fn(a));)r++;return e.pos=r,!0}if(a===32){if(!t){const f=e.push("text_special","",0);f.content="\\",f.markup="\\",f.info="escape"}return e.pos=r,!0}let l=e.src[r];if(a>=55296&&a<=56319&&r+1<s){const f=e.src.charCodeAt(r+1);f>=56320&&f<=57343&&(l+=e.src[r+1],r++)}const c="\\"+l;if(!t){const f=e.push("text_special","",0);a<256&&RN[a]!==0?f.content=l:f.content=c,f.markup=c,f.info="escape"}return e.pos=r+1,!0}function xI(e){const t={};let r=0;for(;(r=e.indexOf("`",r))!==-1;){const s=r;for(;e.charCodeAt(++r)===96;);t[r-s]=s}return t}function SI(e,t){var r;const s=e.pos;if(e.src.charCodeAt(s)!==96)return!1;const a=e.posMax;let l=s+1;for(;l<a&&e.src.charCodeAt(l)===96;)l++;const c=e.src.slice(s,l),f=c.length;if(e.backticksScanned||(e.backticks=xI(e.src),e.backticksScanned=!0),((r=e.backticks[f])!==null&&r!==void 0?r:-1)>=l){let p=l,m;for(;(m=e.src.indexOf("`",p))!==-1&&m<a;){for(p=m+1;e.src.charCodeAt(p)===96;)p++;if(p>a)break;if(p-m===f){if(!t){const v=e.push("code_inline","code",0);v.markup=c;let y=e.src.slice(l,m).replace(/\n/g," ");y.startsWith(" ")&&y.endsWith(" ")&&/[^ ]/.test(y)&&(y=y.slice(1,-1)),v.content=y}return e.pos=p,!0}}}return t||(e.pending+=c),e.pos=l,!0}function EI(e,t){const r=e.pos,s=e.src.charCodeAt(r);if(t||s!==126)return!1;const a=e.scanDelims(e.pos,!0);let l=a.length;const c=String.fromCharCode(s);if(l<2)return!1;let f;l%2&&(f=e.push("text","",0),f.content=c,l--);for(let p=0;p<l;p+=2)f=e.push("text","",0),f.content=c+c,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:a.can_open,close:a.can_close});return e.pos+=a.length,!0}function Bk(e,t){let r;const s=[],a=t.length;for(let l=0;l<a;l++){const c=t[l];if(c.marker!==126||c.end===-1)continue;const f=t[c.end];r=e.tokens[c.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[f.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[f.token-1].type==="text"&&e.tokens[f.token-1].content==="~"&&s.push(f.token-1)}for(;s.length;){const l=s.pop();let c=l+1;for(;c<e.tokens.length&&e.tokens[c].type==="s_close";)c++;c--,l!==c&&(r=e.tokens[c],e.tokens[c]=e.tokens[l],e.tokens[l]=r)}}function kI(e){const t=e.tokens_meta,r=e.tokens_meta.length;Bk(e,e.delimiters);for(let a=0;a<r;a++){var s;const l=(s=t[a])===null||s===void 0?void 0:s.delimiters;l&&Bk(e,l)}}var S3={tokenize:EI,postProcess:kI};function CI(e,t){const r=e.pos,s=e.src.charCodeAt(r);if(t||s!==95&&s!==42)return!1;const a=e.scanDelims(e.pos,s===42);for(let l=0;l<a.length;l++){const c=e.push("text","",0);c.content=String.fromCharCode(s),e.delimiters.push({marker:s,length:a.length,token:e.tokens.length-1,end:-1,open:a.can_open,close:a.can_close})}return e.pos+=a.length,!0}function Pk(e,t){const r=t.length;for(let s=r-1;s>=0;s--){const a=t[s];if(a.marker!==95&&a.marker!==42||a.end===-1)continue;const l=t[a.end],c=s>0&&t[s-1].end===a.end+1&&t[s-1].marker===a.marker&&t[s-1].token===a.token-1&&t[a.end+1].token===l.token+1,f=String.fromCharCode(a.marker),p=e.tokens[a.token];p.type=c?"strong_open":"em_open",p.tag=c?"strong":"em",p.nesting=1,p.markup=c?f+f:f,p.content="";const m=e.tokens[l.token];m.type=c?"strong_close":"em_close",m.tag=c?"strong":"em",m.nesting=-1,m.markup=c?f+f:f,m.content="",c&&(e.tokens[t[s-1].token].content="",e.tokens[t[a.end+1].token].content="",s--)}}function DI(e){const t=e.tokens_meta,r=e.tokens_meta.length;Pk(e,e.delimiters);for(let a=0;a<r;a++){var s;const l=(s=t[a])===null||s===void 0?void 0:s.delimiters;l&&Pk(e,l)}}var E3={tokenize:CI,postProcess:DI};function RI(e,t){let r,s,a,l,c="",f="",p=e.pos,m=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const v=e.pos,y=e.posMax,x=e.pos+1,N=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(N<0)return!1;let _=N+1;if(_<y&&e.src.charCodeAt(_)===40){for(m=!1,_++;_<y&&(r=e.src.charCodeAt(_),!(!Fn(r)&&r!==10));_++);if(_>=y)return!1;if(p=_,a=e.md.helpers.parseLinkDestination(e.src,_,e.posMax),a.ok){for(c=e.md.normalizeLink(a.str),e.md.validateLink(c)?_=a.pos:c="",p=_;_<y&&(r=e.src.charCodeAt(_),!(!Fn(r)&&r!==10));_++);if(a=e.md.helpers.parseLinkTitle(e.src,_,e.posMax),_<y&&p!==_&&a.ok)for(f=a.str,_=a.pos;_<y&&(r=e.src.charCodeAt(_),!(!Fn(r)&&r!==10));_++);}(_>=y||e.src.charCodeAt(_)!==41)&&(m=!0),_++}if(m){if(typeof e.env.references>"u")return!1;if(_<y&&e.src.charCodeAt(_)===91?(p=_+1,_=e.md.helpers.parseLinkLabel(e,_),_>=0?s=e.src.slice(p,_++):_=N+1):_=N+1,s||(s=e.src.slice(x,N)),s=ug(s),l=e.env.references[s],!l)return e.pos=v,!1;c=l.href,f=l.title}if(!t){e.pos=x,e.posMax=N;const k=e.push("link_open","a",1),j=[["href",c]];if(k.attrs=j,f&&j.push(["title",f]),s){const L=Object.create(null);L.label=s,k.meta=L}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=_,e.posMax=y,!0}function AI(e,t){let r,s,a,l,c,f,p,m,v="";const y=e.pos,x=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const N=e.pos+2,_=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(_<0)return!1;if(l=_+1,l<x&&e.src.charCodeAt(l)===40){for(l++;l<x&&(r=e.src.charCodeAt(l),!(!Fn(r)&&r!==10));l++);if(l>=x)return!1;for(m=l,f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),f.ok&&(v=e.md.normalizeLink(f.str),e.md.validateLink(v)?l=f.pos:v=""),m=l;l<x&&(r=e.src.charCodeAt(l),!(!Fn(r)&&r!==10));l++);if(f=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<x&&m!==l&&f.ok)for(p=f.str,l=f.pos;l<x&&(r=e.src.charCodeAt(l),!(!Fn(r)&&r!==10));l++);else p="";if(l>=x||e.src.charCodeAt(l)!==41)return e.pos=y,!1;l++}else{if(typeof e.env.references>"u")return!1;if(l<x&&e.src.charCodeAt(l)===91?(m=l+1,l=e.md.helpers.parseLinkLabel(e,l),l>=0?a=e.src.slice(m,l++):l=_+1):l=_+1,a||(a=e.src.slice(N,_)),a=ug(a),c=e.env.references[a],!c)return e.pos=y,!1;v=c.href,p=c.title}if(!t){s=e.src.slice(N,_);const k=[];e.md.inline.parse(s,e.md,e.env,k);const j=e.push("image","img",0),L=[["src",v],["alt",""]];if(j.attrs=L,j.children=k,j.content=s,p&&L.push(["title",p]),a){const P=Object.create(null);P.label=a,j.meta=P}}return e.pos=l,e.posMax=x,!0}var TI=/^([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])?)*)$/,MI=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function OI(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const s=e.pos,a=e.posMax;for(;;){if(++r>=a)return!1;const c=e.src.charCodeAt(r);if(c===60)return!1;if(c===62)break}const l=e.src.slice(s+1,r);if(MI.test(l)){const c=e.md.normalizeLink(l);if(!e.md.validateLink(c))return!1;if(!t){const f=e.push("link_open","a",1);f.attrs=[["href",c]],f.markup="autolink",f.info="auto";const p=e.push("text","",0);p.content=e.md.normalizeLinkText(l);const m=e.push("link_close","a",-1);m.markup="autolink",m.info="auto"}return e.pos+=l.length+2,!0}if(TI.test(l)){const c=e.md.normalizeLink(`mailto:${l}`);if(!e.md.validateLink(c))return!1;if(!t){const f=e.push("link_open","a",1);f.attrs=[["href",c]],f.markup="autolink",f.info="auto";const p=e.push("text","",0);p.content=e.md.normalizeLinkText(l);const m=e.push("link_close","a",-1);m.markup="autolink",m.info="auto"}return e.pos+=l.length+2,!0}return!1}function jI(e){return/^<a[>\s]/i.test(e)}function LI(e){return/^<\/a\s*>/i.test(e)}function BI(e){const t=e|32;return t>=97&&t<=122}function PI(e,t){if(!e.md.options.html)return!1;const r=e.posMax,s=e.pos;if(e.src.charCodeAt(s)!==60||s+2>=r)return!1;const a=e.src.charCodeAt(s+1);if(a!==33&&a!==63&&a!==47&&!BI(a))return!1;const l=e.src.slice(s).match(uI);if(!l)return!1;if(!t){const c=e.push("html_inline","",0);c.content=l[0],jI(c.content)&&e.linkLevel++,LI(c.content)&&e.linkLevel--}return e.pos+=l[0].length,!0}var VI=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,II=/^&([a-z][a-z0-9]{1,31});/i;function FI(e,t){const r=e.pos,s=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=s)return!1;if(e.src.charCodeAt(r+1)===35){const a=e.src.slice(r).match(VI);if(a){if(!t){const l=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),c=e.push("text_special","",0);c.content=DN(l)?$d(l):$d(65533),c.markup=a[0],c.info="entity"}return e.pos+=a[0].length,!0}}else{const a=e.src.slice(r).match(II);if(a){const l=n3(a[0]);if(l!==a[0]){if(!t){const c=e.push("text_special","",0);c.content=l,c.markup=a[0],c.info="entity"}return e.pos+=a[0].length,!0}}}return!1}function Vk(e){const t={},r=e.length;if(!r)return;let s=0,a=-2;const l=[];for(let c=0;c<r;c++){const f=e[c];if(l.push(0),(e[s].marker!==f.marker||a!==f.token-1)&&(s=c),a=f.token,f.length=f.length||0,!f.close)continue;t.hasOwnProperty(f.marker)||(t[f.marker]=[-1,-1,-1,-1,-1,-1]);const p=t[f.marker][(f.open?3:0)+f.length%3];let m=s-l[s]-1,v=m;for(;m>p;m-=l[m]+1){const y=e[m];if(y.marker===f.marker&&y.open&&y.end<0){let x=!1;if((y.close||f.open)&&(y.length+f.length)%3===0&&(y.length%3!==0||f.length%3!==0)&&(x=!0),!x){const N=m>0&&!e[m-1].open?l[m-1]+1:0;l[c]=c-m+N,l[m]=N,f.open=!1,y.end=c,y.close=!1,v=-1,a=-2;break}}}v!==-1&&(t[f.marker][(f.open?3:0)+(f.length||0)%3]=v)}}function zI(e){const t=e.tokens_meta,r=e.tokens_meta.length;Vk(e.delimiters);for(let a=0;a<r;a++){var s;const l=(s=t[a])===null||s===void 0?void 0:s.delimiters;l&&Vk(l)}}function $I(e){let t,r,s=0;const a=e.tokens,l=e.tokens.length;for(t=r=0;t<l;t++)a[t].nesting<0&&s--,a[t].level=s,a[t].nesting>0&&s++,a[t].type==="text"&&t+1<l&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==r&&(a[r]=a[t]),r++);t!==r&&(a.length=r)}var A_=[["text",vI],["linkify",yI],["newline",NI],["escape",wI],["backticks",SI],["strikethrough",S3.tokenize],["emphasis",E3.tokenize],["link",RI],["image",AI],["autolink",OI],["html_inline",PI],["entity",FI]],T_=[["balance_pairs",zI],["strikethrough",S3.postProcess],["emphasis",E3.postProcess],["fragments_join",$I]],k3=class{constructor(){ht(this,"ruler",new Kd),ht(this,"ruler2",new Kd),ht(this,"State",x3);for(let e=0;e<A_.length;e++)this.ruler.push(A_[e][0],A_[e][1]);for(let e=0;e<T_.length;e++)this.ruler2.push(T_[e][0],T_[e][1])}skipToken(e){const t=e.pos,r=this.ruler.getRules(""),s=r.length,a=e.md.options.maxNesting,l=e.cache;if(typeof l[t]<"u"){e.pos=l[t];return}let c=!1;if(e.level<a){for(let f=0;f<s;f++)if(e.level++,c=r[f](e,!0),e.level--,c){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;c||e.pos++,l[t]=e.pos}tokenize(e){const t=this.ruler.getRules(""),r=t.length,s=e.posMax,a=e.md.options.maxNesting;for(;e.pos<s;){const l=e.pos;let c=!1;if(e.level<a){for(let f=0;f<r;f++)if(c=t[f](e,!1),c){if(l>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(c){if(e.pos>=s)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,r,s){const a=new this.State(e,t,r,s);this.tokenize(a);const l=this.ruler2.getRules(""),c=l.length;for(let f=0;f<c;f++)l[f](a)}},UI={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},HI=/^(vbscript|javascript|file|data):/,WI=/^data:image\/(gif|png|jpeg|webp);/,Ik=["http:","https:","mailto:"],ya=class{validateLink(e){const t=e.trim().toLowerCase();return HI.test(t)?WI.test(t):!0}normalizeLink(e){const t=vy(e,!0);if(t.hostname&&(!t.protocol||Ik.indexOf(t.protocol)>=0))try{t.hostname=Ck.toASCII(t.hostname)}catch{}return t.auth&&(t.auth=io(t.auth)),t.hostname&&(t.hostname=io(t.hostname)),t.pathname&&(t.pathname=io(t.pathname)),t.search&&(t.search=io(t.search)),t.hash&&(t.hash=io(t.hash)),gy(t)}normalizeLinkText(e){const t=vy(e,!0);if(t.hostname&&(!t.protocol||Ik.indexOf(t.protocol)>=0))try{t.hostname=Ck.toUnicode(t.hostname)}catch{}return Su(gy(t),Su.defaultChars+"%")}constructor(...e){ht(this,"inline",new k3),ht(this,"block",new w3),ht(this,"core",new b3),ht(this,"renderer",new m3),ht(this,"linkify",new e6),ht(this,"utils",d6),ht(this,"helpers",Object.assign({},D6));const[t,r]=e;typeof t=="string"?(this.configure(t),r&&this.set(r)):(this.configure("default"),this.set(t||{}))}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e=="string"){const a=e;if(t=UI[a],!t)throw new Error(`Wrong 'markdown-it' preset "${a}", check name`)}else t=e;if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");t.options&&(this.options={...t.options});const r=t.components;if(r){var s;["core","block","inline"].forEach(l=>{var c;const f=(c=r[l])===null||c===void 0?void 0:c.rules;f&&this[l].ruler.enableOnly(f)});const a=(s=r.inline)===null||s===void 0?void 0:s.rules2;a&&this.inline.ruler2.enableOnly(a)}return this}enable(e,t=!1){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(a=>{r=r.concat(this[a].ruler.enable(e,!0))}),r=r.concat(this.inline.ruler2.enable(e,!0));const s=e.filter(a=>r.indexOf(a)<0);if(s.length&&!t)throw new Error(`MarkdownIt. Failed to enable unknown rule(s): ${s}`);return this}disable(e,t=!1){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(a=>{r=r.concat(this[a].ruler.disable(e,!0))}),r=r.concat(this.inline.ruler2.disable(e,!0));const s=e.filter(a=>r.indexOf(a)<0);if(s.length&&!t)throw new Error(`MarkdownIt. Failed to disable unknown rule(s): ${s}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};ht(ya,"Token",Gl);ht(ya,"Ruler",Kd);ht(ya,"Renderer",m3);ht(ya,"ParserCore",b3);ht(ya,"StateCore",g3);ht(ya,"ParserBlock",w3);ht(ya,"StateBlock",_3);ht(ya,"ParserInline",k3);ht(ya,"StateInline",x3);var qI=d3(ya);/*! @license DOMPurify 3.4.16 | (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.16/LICENSE */function Fk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,s=Array(t);r<t;r++)s[r]=e[r];return s}function KI(e){if(Array.isArray(e))return e}function YI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var s,a,l,c,f=[],p=!0,m=!1;try{if(l=(r=r.call(e)).next,t!==0)for(;!(p=(s=l.call(r)).done)&&(f.push(s.value),f.length!==t);p=!0);}catch(v){m=!0,a=v}finally{try{if(!p&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(m)throw a}}return f}}function GI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
224
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function JI(e,t){return KI(e)||YI(e,t)||XI(e,t)||GI()}function XI(e,t){if(e){if(typeof e=="string")return Fk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fk(e,t):void 0}}const C3=Object.entries,zk=Object.setPrototypeOf,ZI=Object.isFrozen,QI=Object.getPrototypeOf,e4=Object.getOwnPropertyDescriptor;let Di=Object.freeze,Ui=Object.seal,cu=Object.create,D3=typeof Reflect<"u"&&Reflect,_y=D3.apply,yy=D3.construct;Di||(Di=function(t){return t});Ui||(Ui=function(t){return t});_y||(_y=function(t,r){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];return t.apply(r,a)});yy||(yy=function(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];return new t(...s)});const Ll=vi(Array.prototype.forEach),t4=vi(Array.prototype.lastIndexOf),$k=vi(Array.prototype.pop),md=vi(Array.prototype.push),n4=vi(Array.prototype.splice),pu=Array.isArray,Dd=vi(String.prototype.toLowerCase),M_=vi(String.prototype.toString),Uk=vi(String.prototype.match),gd=vi(String.prototype.replace),Hk=vi(String.prototype.indexOf),i4=vi(String.prototype.trim),r4=vi(Number.prototype.toString),s4=vi(Boolean.prototype.toString),Wk=typeof BigInt>"u"?null:vi(BigInt.prototype.toString),qk=typeof Symbol>"u"?null:vi(Symbol.prototype.toString),zr=vi(Object.prototype.hasOwnProperty),vd=vi(Object.prototype.toString),mr=vi(RegExp.prototype.test),Po=a4(TypeError);function vi(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,s=new Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];return _y(e,t,s)}}function a4(e){return function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return yy(e,r)}}function _n(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dd;if(zk&&zk(e,null),!pu(t))return e;let s=t.length;for(;s--;){let a=t[s];if(typeof a=="string"){const l=r(a);l!==a&&(ZI(t)||(t[s]=l),a=l)}e[a]=!0}return e}function o4(e){for(let t=0;t<e.length;t++)zr(e,t)||(e[t]=null);return e}function ts(e){const t=cu(null);for(const s of C3(e)){var r=JI(s,2);const a=r[0],l=r[1];zr(e,a)&&(pu(l)?t[a]=o4(l):l&&typeof l=="object"&&l.constructor===Object?t[a]=ts(l):t[a]=l)}return t}function l4(e){switch(typeof e){case"string":return e;case"number":return r4(e);case"boolean":return s4(e);case"bigint":return Wk?Wk(e):"0";case"symbol":return qk?qk(e):"Symbol()";case"undefined":return vd(e);case"function":case"object":{if(e===null)return vd(e);const t=e,r=ys(t,"toString");if(typeof r=="function"){const s=r(t);return typeof s=="string"?s:vd(s)}return vd(e)}default:return vd(e)}}function ys(e,t){for(;e!==null;){const s=e4(e,t);if(s){if(s.get)return vi(s.get);if(typeof s.value=="function")return vi(s.value)}e=QI(e)}function r(){return null}return r}function c4(e){try{return mr(e,""),!0}catch{return!1}}const Kk=Di(["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"]),O_=Di(["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"]),j_=Di(["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"]),u4=Di(["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"]),L_=Di(["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"]),h4=Di(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yk=Di(["#text"]),Gk=Di(["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"]),B_=Di(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),Jk=Di(["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"]),pm=Di(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),d4=Ui(/{{[\w\W]*|^[\w\W]*}}/g),f4=Ui(/<%[\w\W]*|^[\w\W]*%>/g),p4=Ui(/\${[\w\W]*/g),m4=Ui(/^data-[\-\w.\u00B7-\uFFFF]+$/),g4=Ui(/^aria-[\-\w]+$/),Xk=Ui(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),v4=Ui(/^(?:\w+script|data):/i),b4=Ui(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_4=Ui(/^html$/i),y4=Ui(/^[a-z][.\w]*(-[.\w]+)+$/i),Zk=Ui(/<[/\w!]/g),Qk=Ui(/<[/\w]/g),N4=Ui(/<\/no(script|embed|frames)/i),w4=Ui(/\/>/i),Xr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},R3=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],x4=Di(_n({},R3)),S4=function(){const e={};return Ll(R3,t=>{e[t]=Ui(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Di(e)}(),E4=function(){return typeof window>"u"?null:window},k4=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(s=r.getAttribute(a));const l="dompurify"+(s?"#"+s:"");try{return t.createPolicy(l,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},eC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Vo=function(t,r,s,a){return zr(t,r)&&pu(t[r])?_n(a.base?ts(a.base):{},t[r],a.transform):s},P_=function(t,r,s){const a=zr(t,r)?t[r]:void 0;return a&&typeof a=="object"?ts(a):s()};function A3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E4();const t=Ce=>A3(Ce);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==Xr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const s=r,a=s.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,c=e.Node,f=e.Element,p=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const m=e.DOMParser,v=e.trustedTypes,y=f.prototype,x=ys(y,"cloneNode"),N=ys(y,"remove"),_=ys(y,"removeAttributeNode"),k=ys(y,"nextSibling"),j=ys(y,"childNodes"),L=ys(y,"parentNode"),P=ys(y,"shadowRoot"),O=ys(y,"attributes"),T=c&&c.prototype?ys(c.prototype,"nodeType"):null,B=c&&c.prototype?ys(c.prototype,"nodeName"):null,U=c&&c.prototype?ys(c.prototype,"ownerDocument"):null,ce=function(A){return T?T(A):A.nodeType},re=function(A){return B?B(A):A.nodeName};if(typeof l=="function"){const Ce=r.createElement("template");Ce.content&&Ce.content.ownerDocument&&(r=Ce.content.ownerDocument)}let Z,ve="",pe,Q=!1,C=0;const J=function(){if(C>0)throw Po('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Y=function(A){J(),C++;try{return Z.createHTML(A)}finally{C--}},z=function(A){J(),C++;try{return Z.createScriptURL(A)}finally{C--}},X=function(){return Q||(pe=k4(v,a),Q=!0),pe},$=r,xe=$.implementation,Me=$.createNodeIterator,Pe=$.createDocumentFragment,ze=$.getElementsByTagName,ge=s.importNode;let ye=eC();t.isSupported=typeof C3=="function"&&typeof L=="function"&&xe&&xe.createHTMLDocument!==void 0;const mt=d4,pt=f4,Ut=p4,Ht=m4,Tt=g4,Xt=v4,Et=b4,kt=y4;let $e=Xk,nt=null;const yt=_n({},[...Kk,...O_,...j_,...L_,...Yk]);let vt=null;const un=_n({},[...Gk,...B_,...Jk,...pm]);let Ye=Object.seal(cu(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}})),ee=null,je=null;const ke=Object.seal(cu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let dt=!0,bt=!0,sn=!1,ft=!0,Se=!1,Le=!0,it=!1,Nt=!1,V=null,be=null,De=!1,gt=!1,Wt=!1,le=!1,G=!0,Ee=!1;const me="user-content-";let Fe=!0,ot=!1,Kt={},Cn=null;const rt=_n({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let jn=null;const Rr=_n({},["audio","video","img","source","image","track"]);let Dt=null;const Ln=_n({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Un="http://www.w3.org/1998/Math/MathML",Ai="http://www.w3.org/2000/svg",Tn="http://www.w3.org/1999/xhtml";let Hn=Tn,oi=!1,Mn=null;const Ar=_n({},[Un,Ai,Tn],M_),I=Di(["mi","mo","mn","ms","mtext"]);let Ne=_n({},I);const Be=Di(["annotation-xml"]);let lt=_n({},Be);const Lt=_n({},["title","style","font","a","script"]);let ct=null;const Ft=["application/xhtml+xml","text/html"],Ue="text/html";let xt=null,Zt=null;const pn=r.createElement("form"),li=function(A){return A instanceof RegExp||A instanceof Function},ci=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Zt&&Zt===A)return;(!A||typeof A!="object")&&(A={}),A=ts(A),ct=Ft.indexOf(A.PARSER_MEDIA_TYPE)===-1?Ue:A.PARSER_MEDIA_TYPE,xt=ct==="application/xhtml+xml"?M_:Dd,nt=Vo(A,"ALLOWED_TAGS",yt,{transform:xt}),vt=Vo(A,"ALLOWED_ATTR",un,{transform:xt}),Mn=Vo(A,"ALLOWED_NAMESPACES",Ar,{transform:M_}),Dt=Vo(A,"ADD_URI_SAFE_ATTR",Ln,{transform:xt,base:Ln}),jn=Vo(A,"ADD_DATA_URI_TAGS",Rr,{transform:xt,base:Rr}),Cn=Vo(A,"FORBID_CONTENTS",rt,{transform:xt}),ee=Vo(A,"FORBID_TAGS",ts({}),{transform:xt}),je=Vo(A,"FORBID_ATTR",ts({}),{transform:xt}),Kt=zr(A,"USE_PROFILES")?A.USE_PROFILES&&typeof A.USE_PROFILES=="object"?ts(A.USE_PROFILES):A.USE_PROFILES:!1,dt=A.ALLOW_ARIA_ATTR!==!1,bt=A.ALLOW_DATA_ATTR!==!1,sn=A.ALLOW_UNKNOWN_PROTOCOLS||!1,ft=A.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=A.SAFE_FOR_TEMPLATES||!1,Le=A.SAFE_FOR_XML!==!1,it=A.WHOLE_DOCUMENT||!1,gt=A.RETURN_DOM||!1,Wt=A.RETURN_DOM_FRAGMENT||!1,le=A.RETURN_TRUSTED_TYPE||!1,De=A.FORCE_BODY||!1,G=A.SANITIZE_DOM!==!1,Ee=A.SANITIZE_NAMED_PROPS||!1,Fe=A.KEEP_CONTENT!==!1,ot=A.IN_PLACE||!1,$e=c4(A.ALLOWED_URI_REGEXP)?A.ALLOWED_URI_REGEXP:Xk,Hn=typeof A.NAMESPACE=="string"?A.NAMESPACE:Tn,Ne=P_(A,"MATHML_TEXT_INTEGRATION_POINTS",()=>_n({},I)),lt=P_(A,"HTML_INTEGRATION_POINTS",()=>_n({},Be));const q=P_(A,"CUSTOM_ELEMENT_HANDLING",()=>cu(null));if(Ye=cu(null),zr(q,"tagNameCheck")&&li(q.tagNameCheck)&&(Ye.tagNameCheck=q.tagNameCheck),zr(q,"attributeNameCheck")&&li(q.attributeNameCheck)&&(Ye.attributeNameCheck=q.attributeNameCheck),zr(q,"allowCustomizedBuiltInElements")&&typeof q.allowCustomizedBuiltInElements=="boolean"&&(Ye.allowCustomizedBuiltInElements=q.allowCustomizedBuiltInElements),Ui(Ye),Se&&(bt=!1),Wt&&(gt=!0),Kt&&(nt=_n({},Yk),vt=cu(null),Kt.html===!0&&(_n(nt,Kk),_n(vt,Gk)),Kt.svg===!0&&(_n(nt,O_),_n(vt,B_),_n(vt,pm)),Kt.svgFilters===!0&&(_n(nt,j_),_n(vt,B_),_n(vt,pm)),Kt.mathMl===!0&&(_n(nt,L_),_n(vt,Jk),_n(vt,pm))),ke.tagCheck=null,ke.attributeCheck=null,zr(A,"ADD_TAGS")&&(typeof A.ADD_TAGS=="function"?ke.tagCheck=A.ADD_TAGS:pu(A.ADD_TAGS)&&(nt===yt&&(nt=ts(nt)),_n(nt,A.ADD_TAGS,xt))),zr(A,"ADD_ATTR")&&(typeof A.ADD_ATTR=="function"?ke.attributeCheck=A.ADD_ATTR:pu(A.ADD_ATTR)&&(vt===un&&(vt=ts(vt)),_n(vt,A.ADD_ATTR,xt))),zr(A,"ADD_FORBID_CONTENTS")&&pu(A.ADD_FORBID_CONTENTS)&&(Cn===rt&&(Cn=ts(Cn)),_n(Cn,A.ADD_FORBID_CONTENTS,xt)),Fe&&(nt["#text"]=!0),it&&_n(nt,["html","head","body"]),nt.table&&(_n(nt,["tbody"]),delete ee.tbody),A.TRUSTED_TYPES_POLICY){if(typeof A.TRUSTED_TYPES_POLICY.createHTML!="function")throw Po('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof A.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Po('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Re=Z;Z=A.TRUSTED_TYPES_POLICY;try{ve=Y("")}catch(Ae){throw Z=Re,Ae}}else A.TRUSTED_TYPES_POLICY===null?(Z=void 0,ve=""):(Z===void 0&&(Z=X()),Z&&typeof ve=="string"&&(ve=Y("")));Di&&Di(A),Zt=A},ui=_n({},[...O_,...j_,...u4]),Rn=_n({},[...L_,...h4]),or=function(A,q,Re){return q.namespaceURI===Tn?A==="svg":q.namespaceURI===Un?A==="svg"&&(Re==="annotation-xml"||Ne[Re]):!!ui[A]},Wi=function(A,q,Re){return q.namespaceURI===Tn?A==="math":q.namespaceURI===Ai?A==="math"&<[Re]:!!Rn[A]},zt=function(A,q,Re){return q.namespaceURI===Ai&&!lt[Re]||q.namespaceURI===Un&&!Ne[Re]?!1:!Rn[A]&&(Lt[A]||!ui[A])},Ti=function(A){let q=L(A);(!q||!q.tagName)&&(q={namespaceURI:Hn,tagName:"template"});const Re=Dd(A.tagName),Ae=Dd(q.tagName);return Mn[A.namespaceURI]?A.namespaceURI===Ai?or(Re,q,Ae):A.namespaceURI===Un?Wi(Re,q,Ae):A.namespaceURI===Tn?zt(Re,q,Ae):!!(ct==="application/xhtml+xml"&&Mn[A.namespaceURI]):!1},qi=function(A){md(t.removed,{element:A});try{L(A).removeChild(A)}catch{if(N(A),!L(A))throw Po("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},mn=function(A,q,Re){try{_(A,q)}catch{try{A.removeAttribute(Re)}catch{}}},Nn=function(A){Mi(A);const q=j(A);if(q){const Ae=[];Ll(q,qe=>{md(Ae,qe)}),Ll(Ae,qe=>{try{N(qe)}catch{}})}const Re=O(A);if(Re)for(let Ae=Re.length-1;Ae>=0;--Ae){const qe=Re[Ae],Gt=qe&&qe.name;typeof Gt=="string"&&mn(A,qe,Gt)}},Yt=function(A,q,Re){if(!Re)try{Re=q.getAttributeNode(A)}catch{Re=null}md(t.removed,{attribute:Re||null,from:q});try{Re?_(q,Re):q.removeAttribute(A)}catch{try{q.removeAttribute(A)}catch{}}if(A==="is")if(gt||Wt)try{qi(q)}catch{}else try{q.setAttribute(A,"")}catch{}},wn=function(A){const q=O(A);if(q)for(let Re=q.length-1;Re>=0;--Re){const Ae=q[Re],qe=Ae&&Ae.name;typeof qe!="string"||vt[xt(qe)]||mn(A,Ae,qe)}},Mi=function(A){const q=[A];for(;q.length>0;){const Re=q.pop();ce(Re)===Xr.element&&wn(Re);const Ae=j(Re);if(Ae)for(let qe=Ae.length-1;qe>=0;--qe)q.push(Ae[qe])}},lr=function(A,q){return Le?A==="patchsrc"?!0:A==="for"&&q!=="label"&&q!=="output":!1},ls=function(A){if(!Le)return;const q=[A];for(;q.length>0;){const Re=q.pop(),Ae=ce(Re);if(Ae===Xr.processingInstruction||Ae===Xr.comment&&mr(Qk,Re.data)){try{N(Re)}catch{}continue}if(Ae===Xr.element){const Gt=Re,Bt=xt(re(Re));try{Gt.hasAttribute&&Gt.hasAttribute("patchsrc")&&Gt.removeAttribute("patchsrc"),Gt.hasAttribute&&Gt.hasAttribute("for")&&lr("for",Bt)&&Gt.removeAttribute("for")}catch{}}const qe=j(Re);if(qe)for(let Gt=qe.length-1;Gt>=0;--Gt)q.push(qe[Gt])}},Zo=function(A){let q=null,Re=null;if(De)A="<remove></remove>"+A;else{const Gt=Uk(A,/^[\r\n\t ]+/);Re=Gt&&Gt[0]}ct==="application/xhtml+xml"&&Hn===Tn&&(A='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+A+"</body></html>");const Ae=Z?Y(A):A;if(Hn===Tn)try{q=new m().parseFromString(Ae,ct)}catch{}if(!q||!q.documentElement){q=xe.createDocument(Hn,"template",null);try{q.documentElement.innerHTML=oi?ve:Ae}catch{}}const qe=q.body||q.documentElement;return A&&Re&&qe.insertBefore(r.createTextNode(Re),qe.childNodes[0]||null),Hn===Tn?ze.call(q,it?"html":"body")[0]:it?q.documentElement:qe},Qo=function(A){const q=U?U(A):A.ownerDocument;return Me.call(q||A,A,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Ss=function(A){return A=gd(A,mt," "),A=gd(A,pt," "),A=gd(A,Ut," "),A},Na=function(A){var q;A.normalize();const Re=U?U(A):A.ownerDocument,Ae=Me.call(Re||A,A,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null);let qe=Ae.nextNode();for(;qe;)qe.data=Ss(qe.data),qe=Ae.nextNode();const Gt=(q=A.querySelectorAll)===null||q===void 0?void 0:q.call(A,"template");Gt&&Ll(Gt,Bt=>{Tr(Bt.content)&&Na(Bt.content)})},vr=function(A){const q=B?B(A):null;return typeof q!="string"||xt(q)!=="form"?!1:typeof A.nodeName!="string"||typeof A.textContent!="string"||typeof A.removeChild!="function"||A.attributes!==O(A)||typeof A.removeAttribute!="function"||typeof A.removeAttributeNode!="function"||typeof A.getAttributeNode!="function"||typeof A.setAttribute!="function"||typeof A.namespaceURI!="string"||typeof A.insertBefore!="function"||typeof A.hasChildNodes!="function"||A.nodeType!==T(A)||A.childNodes!==j(A)},Tr=function(A){if(!T||typeof A!="object"||A===null)return!1;try{return T(A)===Xr.documentFragment}catch{return!1}},Mr=function(A){if(!T||typeof A!="object"||A===null)return!1;try{return typeof T(A)=="number"}catch{return!1}};function Ki(Ce,A,q){Ce.length!==0&&Ll(Ce,Re=>{Re.call(t,A,q,Zt)})}const wa=function(A,q){return!!(Le&&A.hasChildNodes()&&!Mr(A.firstElementChild)&&mr(Zk,A.textContent)&&mr(Zk,A.innerHTML)||Le&&A.namespaceURI===Tn&&x4[q]&&(Mr(A.firstElementChild)||typeof A.textContent=="string"&&mr(S4[q],A.textContent))||A.nodeType===Xr.processingInstruction||Le&&A.nodeType===Xr.comment&&mr(Qk,A.data))},Es=function(A,q){if(A instanceof RegExp)return mr(A,q);if(A instanceof Function){for(var Re=arguments.length,Ae=new Array(Re>2?Re-2:0),qe=2;qe<Re;qe++)Ae[qe-2]=arguments[qe];return!!A(q,...Ae)}return!1},el=function(A,q,Re){if(!ee[q]&&co(q)&&Es(Ye.tagNameCheck,q))return!1;if(Fe&&!Cn[q]){const Ae=L(A),qe=j(A);if(qe&&Ae){const Gt=qe.length;for(let Bt=Gt-1;Bt>=0;--Bt){const rn=A===Re?x(qe[Bt],!0):qe[Bt];Ae.insertBefore(rn,k(A))}}}return qi(A),!0},tl=function(A,q,Re,Ae){return A.length===0?q:q===Re||q===Ae?ts(q):q},cs=function(A,q){return A===q||L(A)!==null?!1:(ot&&Mi(A),!0)},sc=function(A,q){if(Ki(ye.beforeSanitizeElements,A,null),cs(A,q))return!0;if(vr(A))return qi(A),!0;const Re=xt(re(A));if(nt=tl(ye.uponSanitizeElement,nt,yt,V),Ki(ye.uponSanitizeElement,A,{tagName:Re,allowedTags:nt}),cs(A,q))return!0;if(wa(A,Re))return qi(A),!0;if(ee[Re]||!(ke.tagCheck instanceof Function&&ke.tagCheck(Re))&&!nt[Re]){const Ae=el(A,Re,q);return Ae===!1&&(Ki(ye.afterSanitizeElements,A,null),cs(A,q))?!0:Ae}if(ce(A)===Xr.element&&!Ti(A)||(Re==="noscript"||Re==="noembed"||Re==="noframes")&&mr(N4,A.innerHTML))return qi(A),!0;if(Se&&A.nodeType===Xr.text){const Ae=Ss(A.textContent);A.textContent!==Ae&&(md(t.removed,{element:A.cloneNode()}),A.textContent=Ae)}return Ki(ye.afterSanitizeElements,A,null),cs(A,q)},Hs=function(A,q,Re){if(je[q]||lr(q,A)||G&&(q==="id"||q==="name")&&(Re in r||Re in pn))return!1;const Ae=vt[q]||ke.attributeCheck instanceof Function&&ke.attributeCheck(q,A);return bt&&mr(Ht,q)||dt&&mr(Tt,q)?!0:Ae?Dt[q]||mr($e,gd(Re,Et,""))||(q==="src"||q==="xlink:href"||q==="href")&&A!=="script"&&Hk(Re,"data:")===0&&jn[A]||sn&&!mr(Xt,gd(Re,Et,""))?!0:!Re:co(A)&&Es(Ye.tagNameCheck,A)&&Es(Ye.attributeNameCheck,q,A)||q==="is"&&Ye.allowCustomizedBuiltInElements&&Es(Ye.tagNameCheck,Re)},ac=_n({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),co=function(A){return!ac[Dd(A)]&&mr(kt,A)},hn=function(A,q,Re,Ae){if(Z&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!Re)switch(v.getAttributeType(A,q)){case"TrustedHTML":return Y(Ae);case"TrustedScriptURL":return z(Ae)}return Ae},ju=function(A,q,Re,Ae){try{return Re?A.setAttributeNS(Re,q,Ae):A.setAttribute(q,Ae),vr(A)?(qi(A),!1):!0}catch{return Yt(q,A),!1}},us=function(A,q){if(Ki(ye.beforeSanitizeAttributes,A,null),cs(A,q))return;const Re=A.attributes;if(!Re||vr(A))return;vt=tl(ye.uponSanitizeAttribute,vt,un,be);const Ae={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt,forceKeepAttr:void 0};let qe=Re.length;const Gt=xt(A.nodeName);for(;qe--;){const Bt=Re[qe],rn=Bt.name,Wn=Bt.namespaceURI,Yi=Bt.value,hs=xt(rn),uo=Yi;let ni=rn==="value"?uo:i4(uo),Sa=!1;if(Ae.attrName=hs,Ae.attrValue=ni,Ae.keepAttr=!0,Ae.forceKeepAttr=void 0,Ki(ye.uponSanitizeAttribute,A,Ae),ni=Ae.attrValue,Ee&&(hs==="id"||hs==="name")&&Hk(ni,me)!==0&&(Yt(rn,A,Bt),ni=me+ni,Sa=!0),Le&&mr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ni)){Yt(rn,A,Bt);continue}if(hs==="attributename"&&Uk(ni,"href")){Yt(rn,A,Bt);continue}if(!Ae.forceKeepAttr){if(!Ae.keepAttr){Yt(rn,A,Bt);continue}if(!ft&&mr(w4,ni)){Yt(rn,A,Bt);continue}if(Se&&(ni=Ss(ni)),!Hs(Gt,hs,ni)){Yt(rn,A,Bt);continue}ni=hn(Gt,hs,Wn,ni),ni!==uo&&ju(A,rn,Wn,ni)&&Sa&&$k(t.removed)}}Ki(ye.afterSanitizeAttributes,A,null),cs(A,q)},Rt=function(A){let q=null;const Re=Qo(A);for(Ki(ye.beforeSanitizeShadowDOM,A,null);q=Re.nextNode();)if(Ki(ye.uponSanitizeShadowNode,q,null),sc(q,A),us(q,A),Tr(q.content)&&Rt(q.content),ce(q)===Xr.element){const Ae=P(q);Tr(Ae)&&(xa(Ae),Rt(Ae))}Ki(ye.afterSanitizeShadowDOM,A,null)},xa=function(A){const q=[{node:A,shadow:null}];for(;q.length>0;){const Re=q.pop();if(Re.shadow){Rt(Re.shadow);continue}const Ae=Re.node,qe=ce(Ae)===Xr.element,Gt=j(Ae);if(Gt)for(let Bt=Gt.length-1;Bt>=0;--Bt)q.push({node:Gt[Bt],shadow:null});if(qe){const Bt=B?B(Ae):null;if(typeof Bt=="string"&&xt(Bt)==="template"){const rn=Ae.content;Tr(rn)&&q.push({node:rn,shadow:null})}}if(qe){const Bt=P(Ae);Tr(Bt)&&q.push({node:null,shadow:Bt},{node:Bt,shadow:null})}}};return t.sanitize=function(Ce){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,Re=null,Ae=null,qe=null;if(oi=!Ce,oi&&(Ce="<!-->"),typeof Ce!="string"&&!Mr(Ce)&&(Ce=l4(Ce),typeof Ce!="string"))throw Po("dirty is not a string, aborting");if(!t.isSupported)return Ce;Nt?(nt=V,vt=be):ci(A),(ye.uponSanitizeElement.length>0||ye.uponSanitizeAttribute.length>0)&&(nt=ts(nt)),ye.uponSanitizeAttribute.length>0&&(vt=ts(vt)),t.removed=[];const Gt=ot&&typeof Ce!="string"&&Mr(Ce);if(Gt){ls(Ce);const Wn=re(Ce);if(typeof Wn=="string"){const Yi=xt(Wn);if(!nt[Yi]||ee[Yi])throw Nn(Ce),Po("root node is forbidden and cannot be sanitized in-place")}if(vr(Ce))throw Nn(Ce),Po("root node is clobbered and cannot be sanitized in-place");try{xa(Ce)}catch(Yi){throw Nn(Ce),Yi}}else if(Mr(Ce))q=Zo("<!---->"),Re=q.ownerDocument.importNode(Ce,!0),Re.nodeType===Xr.element&&Re.nodeName==="BODY"||Re.nodeName==="HTML"?q=Re:q.appendChild(Re),xa(q);else{if(!gt&&!Se&&!it&&Ce.indexOf("<")===-1)return Z&&le?Y(Ce):Ce;if(q=Zo(Ce),!q)return gt?null:le?ve:""}q&&De&&qi(q.firstChild);const Bt=Gt?Ce:q;try{const Wn=Qo(Bt);for(;Ae=Wn.nextNode();)sc(Ae,Bt),us(Ae,Bt),Tr(Ae.content)&&Rt(Ae.content)}catch(Wn){throw Gt&&(Nn(Ce),Ll(t.removed,Yi=>{Yi.element&&Mi(Yi.element)})),Wn}if(Gt){let Wn=!1;if(Ll(t.removed,Yi=>{Yi.element&&(Yi.element===Ce&&(Wn=!0),Mi(Yi.element))}),Wn)throw Po("a node selected for removal could not be safely returned; refusing to sanitize in place");return Se&&Na(Ce),Ce}if(gt){if(Se&&Na(q),Wt)for(qe=Pe.call(q.ownerDocument);q.firstChild;)qe.appendChild(q.firstChild);else qe=q;return(vt.shadowroot||vt.shadowrootmode)&&(qe=ge.call(s,qe,!0)),qe}let rn=it?q.outerHTML:q.innerHTML;return it&&nt["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&mr(_4,q.ownerDocument.doctype.name)&&(rn="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
|
|
225
|
+
`+rn),Se&&(rn=Ss(rn)),Z&&le?Y(rn):rn},t.setConfig=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ci(Ce),Nt=!0,V=nt,be=vt},t.clearConfig=function(){Zt=null,Nt=!1,V=null,be=null,Z=pe,ve=""},t.isValidAttribute=function(Ce,A,q){Zt||ci({});const Re=xt(Ce),Ae=xt(A);return Hs(Re,Ae,q)},t.addHook=function(Ce,A){typeof A=="function"&&zr(ye,Ce)&&md(ye[Ce],A)},t.removeHook=function(Ce,A){if(zr(ye,Ce)){if(A!==void 0){const q=t4(ye[Ce],A);return q===-1?void 0:n4(ye[Ce],q,1)[0]}return $k(ye[Ce])}},t.removeHooks=function(Ce){zr(ye,Ce)&&(ye[Ce]=[])},t.removeAllHooks=function(){ye=eC()},t}var C4=A3();function T3(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const r=e[t],s=typeof r;(s==="object"||s==="function")&&!Object.isFrozen(r)&&T3(r)}),e}class tC{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function M3(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Yo(e,...t){const r=Object.create(null);for(const s in e)r[s]=e[s];return t.forEach(function(s){for(const a in s)r[a]=s[a]}),r}const D4="</span>",nC=e=>!!e.scope,R4=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map((s,a)=>`${s}${"_".repeat(a+1)}`)].join(" ")}return`${t}${e}`};class A4{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=M3(t)}openNode(t){if(!nC(t))return;const r=R4(t.scope,{prefix:this.classPrefix});this.span(r)}closeNode(t){nC(t)&&(this.buffer+=D4)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const iC=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class AN{constructor(){this.rootNode=iC(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const r=iC({scope:t});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(s=>this._walk(t,s)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{AN._collapse(r)}))}}class T4 extends AN{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,r){const s=t.root;r&&(s.scope=`language:${r}`),this.add(s)}toHTML(){return new A4(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Yd(e){return e?typeof e=="string"?e:e.source:null}function O3(e){return ic("(?=",e,")")}function M4(e){return ic("(?:",e,")*")}function O4(e){return ic("(?:",e,")?")}function ic(...e){return e.map(r=>Yd(r)).join("")}function j4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function dg(...e){return"("+(j4(e).capture?"":"?:")+e.map(s=>Yd(s)).join("|")+")"}function j3(e){return new RegExp(e.toString()+"|").exec("").length-1}function L4(e,t){const r=e&&e.exec(t);return r&&r.index===0}const B4=new RegExp(dg(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function TN(e,{joinWith:t}){let r=0;return e.map(s=>{r+=1;const a=r;let l=Yd(s),c="";for(;l.length>0;){const f=B4.exec(l);if(!f){c+=l;break}c+=l.substring(0,f.index),l=l.substring(f.index+f[0].length),f[0][0]==="\\"&&f[1]?c+="\\"+String(Number(f[1])+a):(c+=f[0],(f[0]==="("||/^\(\?[<']/.test(f[0]))&&r++)}return c}).map(s=>`(${s})`).join(t)}const P4=/\b\B/,L3="[a-zA-Z]\\w*",MN="[a-zA-Z_]\\w*",B3="\\b\\d+(\\.\\d+)?",P3="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",V3="\\b(0b[01]+)",V4="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",I4=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ic(t,/.*\b/,e.binary,/\b.*/)),Yo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,s)=>{r.index!==0&&s.ignoreMatch()}},e)},Gd={begin:"\\\\[\\s\\S]",relevance:0},F4={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Gd]},z4={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Gd]},$4={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},fg=function(e,t,r={}){const s=Yo({scope:"comment",begin:e,end:t,contains:[]},r);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=dg("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:ic(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},U4=fg("//","$"),H4=fg("/\\*","\\*/"),W4=fg("#","$"),q4={scope:"number",begin:B3,relevance:0},K4={scope:"number",begin:P3,relevance:0},Y4={scope:"number",begin:V3,relevance:0},G4={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Gd,{begin:/\[/,end:/\]/,relevance:0,contains:[Gd]}]},J4={scope:"title",begin:L3,relevance:0},X4={scope:"title",begin:MN,relevance:0},Z4={begin:"\\.\\s*"+MN,relevance:0},Q4=function(e){return Object.assign(e,{"on:begin":(t,r)=>{r.data._beginMatch=t[1]},"on:end":(t,r)=>{r.data._beginMatch!==t[1]&&r.ignoreMatch()}})};var mm=Object.freeze({__proto__:null,APOS_STRING_MODE:F4,BACKSLASH_ESCAPE:Gd,BINARY_NUMBER_MODE:Y4,BINARY_NUMBER_RE:V3,COMMENT:fg,C_BLOCK_COMMENT_MODE:H4,C_LINE_COMMENT_MODE:U4,C_NUMBER_MODE:K4,C_NUMBER_RE:P3,END_SAME_AS_BEGIN:Q4,HASH_COMMENT_MODE:W4,IDENT_RE:L3,MATCH_NOTHING_RE:P4,METHOD_GUARD:Z4,NUMBER_MODE:q4,NUMBER_RE:B3,PHRASAL_WORDS_MODE:$4,QUOTE_STRING_MODE:z4,REGEXP_MODE:G4,RE_STARTERS_RE:V4,SHEBANG:I4,TITLE_MODE:J4,UNDERSCORE_IDENT_RE:MN,UNDERSCORE_TITLE_MODE:X4});function e9(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function t9(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function n9(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=e9,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function i9(e,t){Array.isArray(e.illegal)&&(e.illegal=dg(...e.illegal))}function r9(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function s9(e,t){e.relevance===void 0&&(e.relevance=1)}const a9=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(s=>{delete e[s]}),e.keywords=r.keywords,e.begin=ic(r.beforeMatch,O3(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},o9=["of","and","for","in","not","or","if","then","parent","list","value"],l9="keyword";function I3(e,t,r=l9){const s=Object.create(null);return typeof e=="string"?a(r,e.split(" ")):Array.isArray(e)?a(r,e):Object.keys(e).forEach(function(l){Object.assign(s,I3(e[l],t,l))}),s;function a(l,c){t&&(c=c.map(f=>f.toLowerCase())),c.forEach(function(f){const p=f.split("|");s[p[0]]=[l,c9(p[0],p[1])]})}}function c9(e,t){return t?Number(t):u9(e)?0:1}function u9(e){return o9.includes(e.toLowerCase())}const rC={},Jl=e=>{console.error(e)},sC=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ru=(e,t)=>{rC[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),rC[`${e}/${t}`]=!0)},Ym=new Error;function F3(e,t,{key:r}){let s=0;const a=e[r],l={},c={};for(let f=1;f<=t.length;f++)c[f+s]=a[f],l[f+s]=!0,s+=j3(t[f-1]);e[r]=c,e[r]._emit=l,e[r]._multi=!0}function h9(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Jl("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ym;if(typeof e.beginScope!="object"||e.beginScope===null)throw Jl("beginScope must be object"),Ym;F3(e,e.begin,{key:"beginScope"}),e.begin=TN(e.begin,{joinWith:""})}}function d9(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Jl("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ym;if(typeof e.endScope!="object"||e.endScope===null)throw Jl("endScope must be object"),Ym;F3(e,e.end,{key:"endScope"}),e.end=TN(e.end,{joinWith:""})}}function f9(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function p9(e){f9(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),h9(e),d9(e)}function m9(e){function t(c,f){return new RegExp(Yd(c),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(f?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(f,p){p.position=this.position++,this.matchIndexes[this.matchAt]=p,this.regexes.push([p,f]),this.matchAt+=j3(f)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const f=this.regexes.map(p=>p[1]);this.matcherRe=t(TN(f,{joinWith:"|"}),!0),this.lastIndex=0}exec(f){this.matcherRe.lastIndex=this.lastIndex;const p=this.matcherRe.exec(f);if(!p)return null;const m=p.findIndex((y,x)=>x>0&&y!==void 0),v=this.matchIndexes[m];return p.splice(0,m),Object.assign(p,v)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(f){if(this.multiRegexes[f])return this.multiRegexes[f];const p=new r;return this.rules.slice(f).forEach(([m,v])=>p.addRule(m,v)),p.compile(),this.multiRegexes[f]=p,p}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(f,p){this.rules.push([f,p]),p.type==="begin"&&this.count++}exec(f){const p=this.getMatcher(this.regexIndex);p.lastIndex=this.lastIndex;let m=p.exec(f);if(this.resumingScanAtSamePosition()&&!(m&&m.index===this.lastIndex)){const v=this.getMatcher(0);v.lastIndex=this.lastIndex+1,m=v.exec(f)}return m&&(this.regexIndex+=m.position+1,this.regexIndex===this.count&&this.considerAll()),m}}function a(c){const f=new s;return c.contains.forEach(p=>f.addRule(p.begin,{rule:p,type:"begin"})),c.terminatorEnd&&f.addRule(c.terminatorEnd,{type:"end"}),c.illegal&&f.addRule(c.illegal,{type:"illegal"}),f}function l(c,f){const p=c;if(c.isCompiled)return p;[t9,r9,p9,a9].forEach(v=>v(c,f)),e.compilerExtensions.forEach(v=>v(c,f)),c.__beforeBegin=null,[n9,i9,s9].forEach(v=>v(c,f)),c.isCompiled=!0;let m=null;return typeof c.keywords=="object"&&c.keywords.$pattern&&(c.keywords=Object.assign({},c.keywords),m=c.keywords.$pattern,delete c.keywords.$pattern),m=m||/\w+/,c.keywords&&(c.keywords=I3(c.keywords,e.case_insensitive)),p.keywordPatternRe=t(m,!0),f&&(c.begin||(c.begin=/\B|\b/),p.beginRe=t(p.begin),!c.end&&!c.endsWithParent&&(c.end=/\B|\b/),c.end&&(p.endRe=t(p.end)),p.terminatorEnd=Yd(p.end)||"",c.endsWithParent&&f.terminatorEnd&&(p.terminatorEnd+=(c.end?"|":"")+f.terminatorEnd)),c.illegal&&(p.illegalRe=t(c.illegal)),c.contains||(c.contains=[]),c.contains=[].concat(...c.contains.map(function(v){return g9(v==="self"?c:v)})),c.contains.forEach(function(v){l(v,p)}),c.starts&&l(c.starts,f),p.matcher=a(p),p}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Yo(e.classNameAliases||{}),l(e)}function z3(e){return e?e.endsWithParent||z3(e.starts):!1}function g9(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Yo(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:z3(e)?Yo(e,{starts:e.starts?Yo(e.starts):null}):Object.isFrozen(e)?Yo(e):e}var v9="11.12.0";class b9 extends Error{constructor(t,r){super(t),this.name="HTMLInjectionError",this.html=r}}const V_=M3,aC=Yo,oC=Symbol("nomatch"),_9=7,$3=function(e){const t=Object.create(null),r=Object.create(null),s=[];let a=!0;const l="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let f={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:T4};function p(z){return f.noHighlightRe.test(z)}function m(z){let X=z.className+" ";X+=z.parentNode?z.parentNode.className:"";const $=f.languageDetectRe.exec(X);if($){const xe=re($[1]);return xe||(sC(l.replace("{}",$[1])),sC("Falling back to no-highlight mode for this block.",z)),xe?$[1]:"no-highlight"}return X.split(/\s+/).find(xe=>p(xe)||re(xe))}function v(z,X,$){let xe="",Me="";typeof X=="object"?(xe=z,$=X.ignoreIllegals,Me=X.language):(ru("10.7.0","highlight(lang, code, ...args) has been deprecated."),ru("10.7.0",`Please use highlight(code, options) instead.
|
|
226
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Me=z,xe=X),$===void 0&&($=!0);const Pe={code:xe,language:Me};J("before:highlight",Pe);const ze=Pe.result?Pe.result:y(Pe.language,Pe.code,$);return ze.code=Pe.code,J("after:highlight",ze),ze}function y(z,X,$,xe){const Me=Object.create(null);function Pe(Se,Le){return Se.keywords[Le]}function ze(){if(!Ye.keywords){je.addText(ke);return}let Se=0;Ye.keywordPatternRe.lastIndex=0;let Le=Ye.keywordPatternRe.exec(ke),it="";for(;Le;){it+=ke.substring(Se,Le.index);const Nt=yt.case_insensitive?Le[0].toLowerCase():Le[0],V=Pe(Ye,Nt);if(V){const[be,De]=V;if(je.addText(it),it="",Me[Nt]=(Me[Nt]||0)+1,Me[Nt]<=_9&&(dt+=De),be.startsWith("_"))it+=Le[0];else{const gt=yt.classNameAliases[be]||be;mt(Le[0],gt)}}else it+=Le[0];Se=Ye.keywordPatternRe.lastIndex,Le=Ye.keywordPatternRe.exec(ke)}it+=ke.substring(Se),je.addText(it)}function ge(){if(ke==="")return;let Se=null;if(typeof Ye.subLanguage=="string"){if(!t[Ye.subLanguage]){je.addText(ke);return}Se=y(Ye.subLanguage,ke,!0,ee[Ye.subLanguage]),ee[Ye.subLanguage]=Se._top}else Se=N(ke,Ye.subLanguage.length?Ye.subLanguage:null);Ye.relevance>0&&(dt+=Se.relevance),je.__addSublanguage(Se._emitter,Se.language)}function ye(){Ye.subLanguage!=null?ge():ze(),ke=""}function mt(Se,Le){Se!==""&&(je.startScope(Le),je.addText(Se),je.endScope())}function pt(Se,Le){let it=1;const Nt=Le.length-1;for(;it<=Nt;){if(!Se._emit[it]){it++;continue}const V=yt.classNameAliases[Se[it]]||Se[it],be=Le[it];V?mt(be,V):(ke=be,ze(),ke=""),it++}}function Ut(Se,Le){return Se.scope&&typeof Se.scope=="string"&&je.openNode(yt.classNameAliases[Se.scope]||Se.scope),Se.beginScope&&(Se.beginScope._wrap?(mt(ke,yt.classNameAliases[Se.beginScope._wrap]||Se.beginScope._wrap),ke=""):Se.beginScope._multi&&(pt(Se.beginScope,Le),ke="")),Ye=Object.create(Se,{parent:{value:Ye}}),Ye}function Ht(Se,Le,it){let Nt=L4(Se.endRe,it);if(Nt){if(Se["on:end"]){const V=new tC(Se);Se["on:end"](Le,V),V.isMatchIgnored&&(Nt=!1)}if(Nt){for(;Se.endsParent&&Se.parent;)Se=Se.parent;return Se}}if(Se.endsWithParent)return Ht(Se.parent,Le,it)}function Tt(Se){return Ye.matcher.regexIndex===0?(ke+=Se[0],1):(ft=!0,0)}function Xt(Se){const Le=Se[0],it=Se.rule,Nt=new tC(it),V=[it.__beforeBegin,it["on:begin"]];for(const be of V)if(be&&(be(Se,Nt),Nt.isMatchIgnored))return Tt(Le);return it.skip?ke+=Le:(it.excludeBegin&&(ke+=Le),ye(),!it.returnBegin&&!it.excludeBegin&&(ke=Le)),Ut(it,Se),it.returnBegin?0:Le.length}function Et(Se){const Le=Se[0],it=X.substring(Se.index),Nt=Ht(Ye,Se,it);if(!Nt)return oC;const V=Ye;Ye.endScope&&Ye.endScope._wrap?(ye(),mt(Le,Ye.endScope._wrap)):Ye.endScope&&Ye.endScope._multi?(ye(),pt(Ye.endScope,Se)):V.skip?ke+=Le:(V.returnEnd||V.excludeEnd||(ke+=Le),ye(),V.excludeEnd&&(ke=Le));do Ye.scope&&je.closeNode(),!Ye.skip&&!Ye.subLanguage&&(dt+=Ye.relevance),Ye=Ye.parent;while(Ye!==Nt.parent);return Nt.starts&&Ut(Nt.starts,Se),V.returnEnd?0:Le.length}function kt(){const Se=[];for(let Le=Ye;Le!==yt;Le=Le.parent)Le.scope&&Se.unshift(Le.scope);Se.forEach(Le=>je.openNode(Le))}let $e={};function nt(Se,Le){const it=Le&&Le[0];if(ke+=Se,it==null)return ye(),0;if($e.type==="begin"&&Le.type==="end"&&$e.index===Le.index&&it===""){if(ke+=X.slice(Le.index,Le.index+1),!a){const Nt=new Error(`0 width match regex (${z})`);throw Nt.languageName=z,Nt.badRule=$e.rule,Nt}return 1}if($e=Le,Le.type==="begin")return Xt(Le);if(Le.type==="illegal"&&!$){const Nt=new Error('Illegal lexeme "'+it+'" for mode "'+(Ye.scope||"<unnamed>")+'"');throw Nt.mode=Ye,Nt}else if(Le.type==="end"){const Nt=Et(Le);if(Nt!==oC)return Nt}if(Le.type==="illegal"&&it==="")return Le.index===X.length||(ke+=`
|
|
227
|
+
`),1;if(sn>1e5&&sn>Le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ke+=it,it.length}const yt=re(z);if(!yt)throw Jl(l.replace("{}",z)),new Error('Unknown language: "'+z+'"');const vt=m9(yt);let un="",Ye=xe||vt;const ee={},je=new f.__emitter(f);kt();let ke="",dt=0,bt=0,sn=0,ft=!1;try{if(yt.__emitTokens)yt.__emitTokens(X,je);else{for(Ye.matcher.considerAll();;){sn++,ft?ft=!1:Ye.matcher.considerAll(),Ye.matcher.lastIndex=bt;const Se=Ye.matcher.exec(X);if(!Se)break;const Le=X.substring(bt,Se.index),it=nt(Le,Se);bt=Se.index+it}nt(X.substring(bt))}return je.finalize(),un=je.toHTML(),{language:z,value:un,relevance:dt,illegal:!1,_emitter:je,_top:Ye}}catch(Se){if(Se.message&&Se.message.includes("Illegal"))return{language:z,value:V_(X),illegal:!0,relevance:0,_illegalBy:{message:Se.message,index:bt,context:X.slice(bt-100,bt+100),mode:Se.mode,resultSoFar:un},_emitter:je};if(a)return{language:z,value:V_(X),illegal:!1,relevance:0,errorRaised:Se,_emitter:je,_top:Ye};throw Se}}function x(z){const X={value:V_(z),illegal:!1,relevance:0,_top:c,_emitter:new f.__emitter(f)};return X._emitter.addText(z),X}function N(z,X){X=X||f.languages||Object.keys(t);const $=x(z),xe=X.filter(re).filter(ve).map(ye=>y(ye,z,!1));xe.unshift($);const Me=xe.sort((ye,mt)=>{if(ye.relevance!==mt.relevance)return mt.relevance-ye.relevance;if(ye.language&&mt.language){if(re(ye.language).supersetOf===mt.language)return 1;if(re(mt.language).supersetOf===ye.language)return-1}return 0}),[Pe,ze]=Me,ge=Pe;return ge.secondBest=ze,ge}function _(z,X,$){const xe=X&&r[X]||$;z.classList.add("hljs"),z.classList.add(`language-${xe}`)}function k(z){let X=null;const $=m(z);if(p($))return;if(J("before:highlightElement",{el:z,language:$}),z.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",z);return}if(z.children.length>0&&(f.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(z)),f.throwUnescapedHTML))throw new b9("One of your code blocks includes unescaped HTML.",z.innerHTML);X=z;const xe=X.textContent,Me=$?v(xe,{language:$,ignoreIllegals:!0}):N(xe);z.innerHTML=Me.value,z.dataset.highlighted="yes",_(z,$,Me.language),z.result={language:Me.language,re:Me.relevance,relevance:Me.relevance},Me.secondBest&&(z.secondBest={language:Me.secondBest.language,relevance:Me.secondBest.relevance}),J("after:highlightElement",{el:z,result:Me,text:xe})}function j(z){f=aC(f,z)}const L=()=>{T(),ru("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function P(){T(),ru("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let O=!1;function T(){function z(){T()}if(document.readyState==="loading"){O||window.addEventListener("DOMContentLoaded",z,!1),O=!0;return}document.querySelectorAll(f.cssSelector).forEach(k)}function B(z,X){let $=null;try{$=X(e)}catch(xe){if(Jl("Language definition for '{}' could not be registered.".replace("{}",z)),a)Jl(xe);else throw xe;$=c}$.name||($.name=z),t[z]=$,$.rawDefinition=X.bind(null,e),$.aliases&&Z($.aliases,{languageName:z})}function U(z){delete t[z];for(const X of Object.keys(r))r[X]===z&&delete r[X]}function ce(){return Object.keys(t)}function re(z){return z=(z||"").toLowerCase(),t[z]||t[r[z]]}function Z(z,{languageName:X}){typeof z=="string"&&(z=[z]),z.forEach($=>{r[$.toLowerCase()]=X})}function ve(z){const X=re(z);return X&&!X.disableAutodetect}function pe(z){z["before:highlightBlock"]&&!z["before:highlightElement"]&&(z["before:highlightElement"]=X=>{z["before:highlightBlock"](Object.assign({block:X.el},X))}),z["after:highlightBlock"]&&!z["after:highlightElement"]&&(z["after:highlightElement"]=X=>{z["after:highlightBlock"](Object.assign({block:X.el},X))})}function Q(z){pe(z),s.push(z)}function C(z){const X=s.indexOf(z);X!==-1&&s.splice(X,1)}function J(z,X){const $=z;s.forEach(function(xe){xe[$]&&xe[$](X)})}function Y(z){return ru("10.7.0","highlightBlock will be removed entirely in v12.0"),ru("10.7.0","Please use highlightElement now."),k(z)}Object.assign(e,{highlight:v,highlightAuto:N,highlightAll:T,highlightElement:k,highlightBlock:Y,configure:j,initHighlighting:L,initHighlightingOnLoad:P,registerLanguage:B,unregisterLanguage:U,listLanguages:ce,getLanguage:re,registerAliases:Z,autoDetection:ve,inherit:aC,addPlugin:Q,removePlugin:C}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=v9,e.regex={concat:ic,lookahead:O3,either:dg,optional:O4,anyNumberOfTimes:M4};for(const z in mm)typeof mm[z]=="object"&&T3(mm[z]);return Object.assign(e,mm),e},ku=$3({});ku.newInstance=()=>$3({});var y9=ku;ku.HighlightJS=ku;ku.default=ku;const Gm=jD(y9);function N9(e){const t=e.regex,r={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},l=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,a]};a.contains.push(f);const p={match:/\\"/},m={className:"string",begin:/'/,end:/'/},v={match:/\\'/},y={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],N=e.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),_={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},k=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],j=["true","false"],L={match:/(\/[a-z._-]+)+/},P=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],O=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],T=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],B=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:k,literal:j,built_in:[...P,...O,"set","shopt",...T,...B]},contains:[N,e.SHEBANG(),_,y,l,c,L,f,p,m,v,r]}}const w9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),x9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],S9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],E9=[...x9,...S9],k9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),C9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),D9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),R9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","corner-bottom-left-shape","corner-bottom-right-shape","corner-shape","corner-top-left-shape","corner-top-right-shape","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function A9(e){const t=e.regex,r=w9(e),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},a="and or not only",l=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,s,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+C9.join("|")+")"},{begin:":(:)?("+D9.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+R9.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,r.UNICODE_RANGE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:l},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:k9.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+E9.join("|")+")\\b"}]}}function T9(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function M9(e){const l={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:l,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:l,illegal:/["']/}]}]}}function O9(e){const t=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},s=e.COMMENT();s.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const a={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},l={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[s,l,a,c,r,"self"],relevance:0},p=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,v=/'[^']*'/,y=t.either(p,m,v),x=t.concat(y,"(\\s*\\.\\s*",y,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{begin:x,className:"attr",starts:{end:/$/,contains:[s,f,l,a,c,r]}}]}}var uu="[0-9](_*[0-9])*",gm=`\\.(${uu})`,vm="[0-9a-fA-F](_*[0-9a-fA-F])*",lC={className:"number",variants:[{begin:`(\\b(${uu})((${gm})|\\.)?|(${gm}))[eE][+-]?(${uu})[fFdD]?\\b`},{begin:`\\b(${uu})((${gm})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${gm})[fFdD]?\\b`},{begin:`\\b(${uu})[fFdD]\\b`},{begin:`\\b0[xX]((${vm})\\.?|(${vm})?\\.(${vm}))[pP][+-]?(${uu})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${vm})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function U3(e,t,r){return r===-1?"":e.replace(t,s=>U3(e,t,r-1))}function j9(e){const t=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",s="(?:(?:\\s*\\[\\s*])+)?",a=r+"<@@@>"+s,c="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+a+")?")+"|"+a+")",f=U3("(?:\\s*<\\s*"+c+"(?:\\s*,\\s*"+c+")*\\s*>)?",/<@@@>/g,2),x={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},N={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},_={className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:x,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:[r,t.concat(f,s,/\s+/),r,s,/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:[r,t.concat(f,s,/\s+/),r,/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:x,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[N,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,lC,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},lC,N]}}const cC="[A-Za-z$_][0-9A-Za-z$_]*",L9=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],B9=["true","false","null","undefined","NaN","Infinity"],H3=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],W3=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],q3=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],P9=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],V9=[].concat(q3,H3,W3);function I9(e){const t=e.regex,r=($,{after:xe})=>{const Me="</"+$[0].slice(1);return $.input.indexOf(Me,xe)!==-1},s=cC,a={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:($,xe)=>{const Me=$[0].length+$.index,Pe=$.input[Me];if(Pe==="<"||Pe===","){xe.ignoreMatch();return}Pe===">"&&(r($,{after:Me})||xe.ignoreMatch());let ze;const ge=$.input.substring(Me);if(ze=ge.match(/^\s*=/)){xe.ignoreMatch();return}if((ze=ge.match(/^\s+extends\s+/))&&ze.index===0){xe.ignoreMatch();return}}},f={$pattern:cC,keyword:L9,literal:B9,built_in:V9,"variable.language":P9},p="[0-9](_?[0-9])*",m=`\\.(${p})`,v="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${v})((${m})|\\.)?|(${m}))[eE][+-]?(${p})\\b`},{begin:`\\b(${v})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},N={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},j={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},P={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},O=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,N,_,k,j,{match:/\$\d+/},y];x.contains=O.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(O)});const T=[].concat(P,x.contains),B=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(T)}]),U={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:B},ce={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},re={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...H3,...W3]}},Z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ve={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[U],illegal:/%/},pe={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Q($){return t.concat("(?!",$.join("|"),")")}const C={match:t.concat(/\b/,Q([...q3,"super","import","await"].map($=>`${$}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},J={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},U]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",X={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[U]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:re},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),Z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,N,_,k,j,P,{match:/\$\d+/},y,re,{scope:"attr",match:s+t.lookahead(":"),relevance:0},X,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[P,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:l},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},ve,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[U,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},J,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[U]},C,pe,ce,Y,{match:/\$[(.]/}]}}const F9="([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",z9={scope:"number",match:F9,relevance:0};function $9(e){const t={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],a={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:s},contains:[t,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,z9,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function U9(e){const t=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},a={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},l={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,p={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},v={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},y=e.inherit(m,{contains:[]}),x=e.inherit(v,{contains:[]});m.contains.push(x),v.contains.push(y);let N=[r,p];return[m,v,y,x].forEach(L=>{L.contains=L.contains.concat(N)}),N=N.concat(m,v),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:N},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:N}]}]},r,l,s,m,v,{className:"quote",begin:"^>\\s+",contains:N,end:"$"},a,p,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function H9(e){const t=e.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","lazy","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","aiter","all","anext","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozendict","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","sentinel","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},p={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},v={begin:/\{\{/,relevance:0},y={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p,v,m]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p,v,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,v,m]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,v,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",N=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,_=`\\b|${s.join("|")}`,k={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${N}))[eE][+-]?(${x})[jJ]?(?=${_})`},{begin:`(${N})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${_})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${_})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${_})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${_})`},{begin:`\\b(${x})[jJ](?=${_})`}]},j={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},L={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",p,k,y,e.HASH_COMMENT_MODE]}]};return m.contains=[y,k,p],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[p,k,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},y,j,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[L]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[k,L,y]}]}}function W9(e){const t=e.regex,r=/(r#)?/,s=t.concat(r,e.UNDERSCORE_IDENT_RE),a=t.concat(r,e.IDENT_RE),l={scope:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!(?:let|for|while|if|else|match)\b)/,a,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(16|32|64|128))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","raw","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],p=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],v=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f16","f32","f64","f128","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:v,keyword:f,literal:p,built_in:m},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{scope:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|"|\\|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{scope:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/\bsafe/,/\s+/,/extern/],scope:{1:"keyword",3:"keyword"}},{begin:[/fn/,/\s+/,s],scope:{1:"keyword",3:"title.function"}},{scope:"meta",begin:"#!?\\[",end:"\\]",contains:[{scope:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,s],scope:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,s,/\s+/,/in/],scope:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,s],scope:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,s],scope:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:v}},{scope:"punctuation",begin:"->"},l]}}function q9(e){const t=e.regex,r=e.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},a={begin:/"/,end:/"/,contains:[{match:/""/}]},l=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],p=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],v=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],y=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],N=v,_=[...m,...p].filter(B=>!v.includes(B)),k={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},j={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},L={match:t.concat(/\b/,t.either(...N),/\s*\(/),relevance:0,keywords:{built_in:N}};function P(B){return t.concat(/\b/,t.either(...B.map(U=>U.replace(/\s+/,"\\s+"))),/\b/)}const O={scope:"keyword",match:P(x),relevance:0};function T(B,{exceptions:U,when:ce}={}){const re=ce;return U=U||[],B.map(Z=>Z.match(/\|\d+$/)||U.includes(Z)?Z:re(Z)?`${Z}|0`:Z)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:T(_,{when:B=>B.length<3}),literal:l,type:f,built_in:y},contains:[{scope:"type",match:P(c)},O,L,k,s,a,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,j]}}const Jm="[A-Za-z$_][0-9A-Za-z$_]*",K3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Y3=["true","false","null","undefined","NaN","Infinity"],G3=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],J3=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],X3=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Z3=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],Q3=[].concat(X3,G3,J3);function K9(e){const t=e.regex,r=($,{after:xe})=>{const Me="</"+$[0].slice(1);return $.input.indexOf(Me,xe)!==-1},s=Jm,a={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:($,xe)=>{const Me=$[0].length+$.index,Pe=$.input[Me];if(Pe==="<"||Pe===","){xe.ignoreMatch();return}Pe===">"&&(r($,{after:Me})||xe.ignoreMatch());let ze;const ge=$.input.substring(Me);if(ze=ge.match(/^\s*=/)){xe.ignoreMatch();return}if((ze=ge.match(/^\s+extends\s+/))&&ze.index===0){xe.ignoreMatch();return}}},f={$pattern:Jm,keyword:K3,literal:Y3,built_in:Q3,"variable.language":Z3},p="[0-9](_?[0-9])*",m=`\\.(${p})`,v="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${v})((${m})|\\.)?|(${m}))[eE][+-]?(${p})\\b`},{begin:`\\b(${v})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},N={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},j={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},P={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},O=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,N,_,k,j,{match:/\$\d+/},y];x.contains=O.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(O)});const T=[].concat(P,x.contains),B=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(T)}]),U={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:B},ce={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},re={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...G3,...J3]}},Z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ve={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[U],illegal:/%/},pe={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Q($){return t.concat("(?!",$.join("|"),")")}const C={match:t.concat(/\b/,Q([...X3,"super","import","await"].map($=>`${$}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},J={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},U]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",X={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[U]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:re},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),Z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,N,_,k,j,P,{match:/\$\d+/},y,re,{scope:"attr",match:s+t.lookahead(":"),relevance:0},X,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[P,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:l},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},ve,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[U,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},J,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[U]},C,pe,ce,Y,{match:/\$[(.]/}]}}function Y9(e){const t=e.regex,r=K9(e),s=Jm,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],l={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a},contains:[r.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},p=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Jm,keyword:K3.concat(p),literal:Y3,built_in:Q3.concat(a),"variable.language":Z3},v={className:"meta",begin:"@"+s},y=(k,j,L)=>{const P=k.contains.findIndex(O=>O.label===j);if(P===-1)throw new Error("can not find mode to replace");k.contains.splice(P,1,L)};Object.assign(r.keywords,m),r.exports.PARAMS_CONTAINS.push(v);const x=r.contains.find(k=>k.scope==="attr"),N=Object.assign({},x,{match:t.concat(s,t.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,x,N]),r.contains=r.contains.concat([v,l,c,N]),y(r,"shebang",e.SHEBANG()),y(r,"use_strict",f);const _=r.contains.find(k=>k.label==="func.def");return _.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function G9(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},l={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(l,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),p=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[l,p,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[l,c,p,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[p]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:"javascript"}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function J9(e){const t="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},l={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},N={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},_={begin:/\{/,end:/\}/,contains:[N],illegal:"\\n",relevance:0},k={begin:"\\[",end:"\\]",contains:[N],illegal:"\\n",relevance:0},j=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},x,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},_,k,l,c],L=[...j];return L.pop(),L.push(f),N.contains=L,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:j}}for(const[e,t]of Object.entries({bash:N9,css:A9,diff:T9,go:M9,ini:O9,java:j9,javascript:I9,json:$9,markdown:U9,python:H9,rust:W9,sql:q9,typescript:Y9,xml:G9,yaml:J9}))Gm.registerLanguage(e,t);for(const[e,t]of Object.entries({sh:"bash",shell:"bash",zsh:"bash",console:"bash",ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",py:"python",python3:"python",yml:"yaml",rb:"ruby",rs:"rust",golang:"go",html:"xml",vue:"xml",svg:"xml",md:"markdown",toml:"ini",conf:"ini",text:"bash",txt:"bash"}))try{Gm.registerAliases(e,{languageName:t})}catch{}const X9=/(?:#L(\d+)|#(\d+)|:(\d+))$/;function ON(e,t){let r=String(e??"").trim();if(!r||r==="#")return null;if(/^file:\/\//i.test(r))r=decodeURIComponent(r.replace(/^file:\/\/(?:localhost)?/i,""));else if(/^[a-z][a-z0-9+.-]*:/i.test(r))return null;const s=X9.exec(r);let a;if(s&&(a=Number(s[1]??s[2]??s[3]),r=r.slice(0,s.index)),!r)return null;if(!r.startsWith("/")&&!r.startsWith("~/")){const l=r.includes("/")||/\.[A-Za-z0-9]{1,8}$/.test(r);if(!t||!l||!/^[\w.@+/-]+$/.test(r))return null;r=Z9(t,r)}return a==null||!Number.isFinite(a)?{path:r}:{path:r,line:a}}function Z9(e,t){const r=e.split("/").filter(Boolean);for(const s of t.split("/"))!s||s==="."||(s===".."?r.pop():r.push(s));return`/${r.join("/")}`}function jN(e){const t=e==null?void 0:e.base;return typeof t=="string"&&t?t:void 0}const ai=new qI({html:!1,linkify:!0,breaks:!0,highlight(e,t){const r=e.replace(/\n$/,""),s=(t||"").trim().toLowerCase();if(s&&Gm.getLanguage(s))try{return Gm.highlight(r,{language:s,ignoreIllegals:!0}).value}catch{}return ai.utils.escapeHtml(r)}}),Q9=ai.renderer.rules.link_open??((e,t,r,s,a)=>a.renderToken(e,t,r)),eF=(e,t,r,s,a)=>{const l=String(e[t].attrGet("href")??""),c=l?ON(l,jN(s)):null;return c?(e[t].attrSet("href","#"),e[t].attrSet("class","md-file-link"),e[t].attrSet("data-file-path",c.path),c.line&&e[t].attrSet("data-file-line",String(c.line)),a.renderToken(e,t,r)):(e[t].attrSet("target","_blank"),e[t].attrSet("rel","noopener noreferrer"),Q9(e,t,r,s,a))};ai.renderer.rules.link_open=eF;ai.renderer.rules.image=(e,t,r,s,a)=>{const l=String(e[t].attrGet("src")??""),c=l?ON(l,jN(s)):null;if(c){e[t].attrSet("src",Wm(c.path)),e[t].attrSet("loading","lazy"),e[t].attrSet("class","md-img");const f=e[t].content??"",p=a.renderToken(e,t,r);return`<a class="md-img-link" href="${ai.utils.escapeHtml(Wm(c.path))}" target="_blank" rel="noopener noreferrer" title="${ai.utils.escapeHtml(f||c.path)}">${p}</a>`}return a.renderToken(e,t,r)};const uC=new RegExp("(?<![\\w\"'`/.\\-])(?:file:\\/\\/)?((?:~\\/|\\/)[\\w.@+/-]*[\\w.@+-]\\.[A-Za-z0-9]{1,8})(?::(\\d+))?","g"),hC=ai.renderer.rules.text??((e,t)=>ai.utils.escapeHtml(e[t].content));ai.renderer.rules.text=(e,t,r,s,a)=>{const l=e[t].content;if(e[t].inLink||!l)return hC(e,t,r,s,a);const c=jN(s);let f="",p=0;uC.lastIndex=0;for(const m of l.matchAll(uC)){const v=ON(m[0],c),y=m.index??0;if(!v)continue;f+=ai.utils.escapeHtml(l.slice(p,y));const x=v.line?` data-file-line="${v.line}"`:"",N=`${ai.utils.escapeHtml(m[1])}${m[2]?`<span class="md-file-line">:${m[2]}</span>`:""}`;f+=`<a class="md-file-link" href="#" data-file-path="${ai.utils.escapeHtml(v.path)}"${x}>${N}</a>`,p=y+m[0].length}return f?f+ai.utils.escapeHtml(l.slice(p)):hC(e,t,r,s,a)};ai.core.ruler.push("local-file-mark",e=>{for(const t of e.tokens){if(t.type!=="inline"||!t.children)continue;let r=0;for(const s of t.children)s.type==="link_open"?r+=1:s.type==="link_close"?r=Math.max(0,r-1):r>0&&(s.inLink=!0)}return!0});const tF=ai.validateLink.bind(ai);ai.validateLink=e=>/^file:/i.test(e)?!0:tF(e);const nF=ai.renderer.rules.fence??((e,t,r,s,a)=>a.renderToken(e,t,r)),iF=(e,t,r,s,a)=>{const c=(e[t].info||"").trim().split(/\s+/)[0]??"",f=nF(e,t,r,s,a);return`<div class="md-code"><div class="md-code-bar"><span class="md-lang">${ai.utils.escapeHtml(c||"code")}</span><button class="md-copy" type="button" data-copy>copy</button></div>${f}</div>`};ai.renderer.rules.fence=iF;function LN(e,t){const r=ai.render(String(e??""),{base:t});return C4.sanitize(r,{ADD_ATTR:["target","rel","data-copy","data-file-path","data-file-line","loading"],ADD_TAGS:["div","span","button","table","thead","tbody","tr","th","td"]})}function rF({text:e,base:t}){const r=R.useMemo(()=>LN(e,t),[e,t]),s=R.useRef(null);return R.useEffect(()=>{EN(s.current)},[r]),R.useEffect(()=>{const a=s.current;if(!a)return;const l=c=>{var x;const f=c.target,p=f==null?void 0:f.closest("a.md-file-link");if(p){c.preventDefault();const N=p.dataset.filePath??"",_=Number(p.dataset.fileLine??"")||void 0;N&&mV({path:N,..._?{line:_}:{}});return}const m=f==null?void 0:f.closest("button[data-copy]");if(!m)return;const v=(x=m.closest(".md-code"))==null?void 0:x.querySelector("code"),y=(v==null?void 0:v.textContent)??"";cg(y).then(N=>{m.textContent=N?"copied":"copy failed",window.setTimeout(()=>{m.textContent="copy"},1200)})};return a.addEventListener("click",l),()=>a.removeEventListener("click",l)},[]),h.jsxDEV("div",{className:"md",ref:s,dangerouslySetInnerHTML:{__html:r}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Markdown.tsx",lineNumber:306,columnNumber:10},this)}function jt(e,{size:t=16,className:r}){return h.jsxDEV("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:r,children:e},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:15,columnNumber:5},this)}const eR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:h.jsxDEV("path",{d:"M3 6h18M3 12h18M3 18h18"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:32,columnNumber:67},void 0)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:32,columnNumber:65},void 0),e),sF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("circle",{cx:"12",cy:"5",r:"1.4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:36,columnNumber:9},void 0),h.jsxDEV("circle",{cx:"12",cy:"12",r:"1.4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:36,columnNumber:42},void 0),h.jsxDEV("circle",{cx:"12",cy:"19",r:"1.4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:36,columnNumber:76},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:36,columnNumber:7},void 0),e),tR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M12 20h9"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:40,columnNumber:9},void 0),h.jsxDEV("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L8 18l-4 1 1-4z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:40,columnNumber:30},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:40,columnNumber:7},void 0),e),nR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"9",y:"9",width:"12",height:"12",rx:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:44,columnNumber:9},void 0),h.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:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:44,columnNumber:59},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:44,columnNumber:7},void 0),e),iR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M12 3v11"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:48,columnNumber:9},void 0),h.jsxDEV("path",{d:"M7 10l5 5 5-5"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:48,columnNumber:30},void 0),h.jsxDEV("path",{d:"M4 20h16"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:48,columnNumber:56},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:48,columnNumber:7},void 0),e),aF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"3",y:"7",width:"18",height:"13",rx:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:52,columnNumber:9},void 0),h.jsxDEV("path",{d:"M3 11h18"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:52,columnNumber:59},void 0),h.jsxDEV("path",{d:"M9 3h6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:52,columnNumber:80},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:52,columnNumber:7},void 0),e),oF=(e={})=>jt(h.jsxDEV("path",{d:"m4 12.5 5 5L20 6.5"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:55,columnNumber:66},void 0),e),Zl=(e={})=>jt(h.jsxDEV("path",{d:"M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:58,columnNumber:7},void 0),e),lF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v1.4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:68,columnNumber:7},void 0),h.jsxDEV("path",{d:"M3 10.4h17.2a1 1 0 0 1 .97 1.24l-1.6 6.06A2 2 0 0 1 17.65 19.2H5a2 2 0 0 1-2-2z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:69,columnNumber:7},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:67,columnNumber:5},void 0),e),cF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("circle",{cx:"9",cy:"8",r:"3"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:77,columnNumber:9},void 0),h.jsxDEV("path",{d:"M3.5 20a5.5 5.5 0 0 1 11 0"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:77,columnNumber:39},void 0),h.jsxDEV("circle",{cx:"17",cy:"9.2",r:"2.2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:77,columnNumber:78},void 0),h.jsxDEV("path",{d:"M16.2 20a4.6 4.6 0 0 1 5.3-3.2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:77,columnNumber:113},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:77,columnNumber:7},void 0),e),rR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M3 10.5 12 3l9 7.5"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:80,columnNumber:9},void 0),h.jsxDEV("path",{d:"M5 9.5V21h14V9.5"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:80,columnNumber:40},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:80,columnNumber:7},void 0),e),uF=(e={})=>jt(h.jsxDEV("path",{d:"M12 3l7 3v5c0 4.5-3 8-7 10-4-2-7-5.5-7-10V6z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:84,columnNumber:7},void 0),e),dC=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M4 17a8 8 0 1 1 16 0"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:88,columnNumber:9},void 0),h.jsxDEV("path",{d:"M12 17l4-5"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:88,columnNumber:42},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:88,columnNumber:7},void 0),e),sR=(e={})=>jt(h.jsxDEV("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1.5",fill:"currentColor",stroke:"none"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:91,columnNumber:65},void 0),e),va=(e={})=>jt(h.jsxDEV("path",{d:"M6 6l12 12M18 6L6 18"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:93,columnNumber:66},void 0),e),BN=(e={})=>jt(h.jsxDEV("path",{d:"M6 9l6 6 6-6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:95,columnNumber:72},void 0),e),os=(e={})=>jt(h.jsxDEV("path",{d:"M9 6l6 6-6 6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:97,columnNumber:73},void 0),e),aR=(e={})=>jt(h.jsxDEV("path",{d:"M12 19V5M6 11l6-6 6 6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:99,columnNumber:68},void 0),e),oR=(e={})=>jt(h.jsxDEV("path",{d:"M12 5v14M6 13l6 6 6-6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:101,columnNumber:70},void 0),e),hF=(e={})=>jt(h.jsxDEV("path",{d:"M4 12l16-8-6 8 6 8z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:103,columnNumber:65},void 0),e),Ny=(e={})=>jt(h.jsxDEV("path",{d:"M12 5v14M5 12h14"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:105,columnNumber:65},void 0),e),dF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("circle",{cx:"11",cy:"11",r:"6.5"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:108,columnNumber:9},void 0),h.jsxDEV("path",{d:"M16 16l4 4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:108,columnNumber:43},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:108,columnNumber:7},void 0),e),lR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M12 4v8"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:112,columnNumber:9},void 0),h.jsxDEV("path",{d:"M7.5 7a7 7 0 1 0 9 0"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:112,columnNumber:29},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:112,columnNumber:7},void 0),e),Om=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M3 12a9 9 0 1 0 3-6.7"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:116,columnNumber:9},void 0),h.jsxDEV("path",{d:"M3 4v4h4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:116,columnNumber:43},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:116,columnNumber:7},void 0),e),fF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:122,columnNumber:9},void 0),h.jsxDEV("path",{d:"M15 4v16"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:122,columnNumber:59},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:122,columnNumber:7},void 0),e),pF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:126,columnNumber:9},void 0),h.jsxDEV("path",{d:"m7 9 3 3-3 3M13 15h4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:126,columnNumber:59},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:126,columnNumber:7},void 0),e),Ql=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M6 2h8l4 4v16H6z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:129,columnNumber:9},void 0),h.jsxDEV("path",{d:"M14 2v4h4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:129,columnNumber:38},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:129,columnNumber:7},void 0),e),Jd=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"9",y:"3",width:"6",height:"11",rx:"3"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:133,columnNumber:9},void 0),h.jsxDEV("path",{d:"M5 11a7 7 0 0 0 14 0M12 18v3M9 21h6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:133,columnNumber:58},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:133,columnNumber:7},void 0),e),pg=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M11 5 6 9H3v6h3l5 4z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:137,columnNumber:9},void 0),h.jsxDEV("path",{d:"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:137,columnNumber:42},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:137,columnNumber:7},void 0),e),cR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M11 5 6 9H3v6h3l5 4z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:140,columnNumber:9},void 0),h.jsxDEV("path",{d:"m16 9 5 6M21 9l-5 6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:140,columnNumber:42},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:140,columnNumber:7},void 0),e),uR=h.jsxDEV("path",{d:"M6.6 3.5h1.9c.8 0 1.5.6 1.7 1.4l.7 2.6c.2.8-.1 1.7-.8 2.2l-1.2.8a12.5 12.5 0 0 0 5.6 5.6l.8-1.2c.5-.7 1.4-1 2.2-.8l2.6.7c.8.2 1.4.9 1.4 1.7v1.9c0 1.2-1 2.2-2.2 2.1C11 20.9 3.1 13 3.2 5.7c0-1.2 1-2.2 2.2-2.2z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:143,columnNumber:17},void 0),mF=(e={})=>jt(uR,e),gF=(e={})=>jt(h.jsxDEV("g",{transform:"rotate(135 12 12)",children:uR},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:146,columnNumber:7},void 0),e),vF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M9 9v2a3 3 0 0 0 4.6 2.5M15 11.5V6a3 3 0 0 0-5.7-1.3"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:150,columnNumber:9},void 0),h.jsxDEV("path",{d:"M5 11a7 7 0 0 0 10.8 5.9M19 11v.5"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:150,columnNumber:74},void 0),h.jsxDEV("path",{d:"M12 18v3M9 21h6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:150,columnNumber:120},void 0),h.jsxDEV("path",{d:"m4 4 16 16"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:150,columnNumber:148},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:150,columnNumber:7},void 0),e),bF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:154,columnNumber:9},void 0),h.jsxDEV("path",{d:"M7 10h.01M11 10h.01M15 10h.01M7 14h10"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:154,columnNumber:59},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:154,columnNumber:7},void 0),e),_F=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"7",y:"5",width:"3.5",height:"14",rx:"1",fill:"currentColor",stroke:"none"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:157,columnNumber:9},void 0),h.jsxDEV("rect",{x:"13.5",y:"5",width:"3.5",height:"14",rx:"1",fill:"currentColor",stroke:"none"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:157,columnNumber:94},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:157,columnNumber:7},void 0),e),yF=(e={})=>jt(h.jsxDEV("path",{d:"M20 11.5 12 19.5a5 5 0 0 1-7-7l8-8a3.5 3.5 0 0 1 5 5l-8 8a2 2 0 0 1-3-3l7-7"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:161,columnNumber:7},void 0),e),rf=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("circle",{cx:"12",cy:"12",r:"3"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:165,columnNumber:9},void 0),h.jsxDEV("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2v.2a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-2.9-1.2l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.7 1.7 0 0 0 3 15a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.2-2.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 10 4.2V4a2 2 0 1 1 4 0v.2a1.7 1.7 0 0 0 2.9 1.2l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1A1.7 1.7 0 0 0 21 11h.2a2 2 0 1 1 0 4H21z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:165,columnNumber:41},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:165,columnNumber:7},void 0),e),PN=(e={})=>jt(h.jsxDEV("path",{d:"M19 12H5M11 6l-6 6 6 6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:168,columnNumber:70},void 0),e),Xd=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M20 11a8 8 0 1 0-2 6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:172,columnNumber:9},void 0),h.jsxDEV("path",{d:"M20 5v6h-6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:172,columnNumber:42},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:172,columnNumber:7},void 0),e),NF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:h.jsxDEV("path",{d:"M4 8h13l-3-3M20 16H7l3 3"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:176,columnNumber:9},void 0)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:176,columnNumber:7},void 0),e),hR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:180,columnNumber:9},void 0),h.jsxDEV("path",{d:"M10 3v4M14 3v4M10 17v4M14 17v4M3 10h4M3 14h4M17 10h4M17 14h4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:180,columnNumber:59},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:180,columnNumber:7},void 0),e),wF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M9.5 4a2.5 2.5 0 0 1 2.5 2.5v11a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 2.26-4.9A2.5 2.5 0 0 1 9.5 4Z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:184,columnNumber:9},void 0),h.jsxDEV("path",{d:"M14.5 4A2.5 2.5 0 0 0 12 6.5v11a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-2.26-4.9A2.5 2.5 0 0 0 14.5 4Z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:184,columnNumber:162},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:184,columnNumber:7},void 0),e),dR=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("circle",{cx:"7",cy:"5",r:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:188,columnNumber:9},void 0),h.jsxDEV("circle",{cx:"7",cy:"19",r:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:188,columnNumber:39},void 0),h.jsxDEV("circle",{cx:"17",cy:"9",r:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:188,columnNumber:70},void 0),h.jsxDEV("path",{d:"M7 7v10M17 11c0 3-3 4-6 4H9"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:188,columnNumber:101},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:188,columnNumber:7},void 0),e),xF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M2 12s3.6-6 10-6 10 6 10 6-3.6 6-10 6-10-6-10-6z"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:192,columnNumber:9},void 0),h.jsxDEV("circle",{cx:"12",cy:"12",r:"2.6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:192,columnNumber:70},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:192,columnNumber:7},void 0),e),SF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M3 3l18 18"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:195,columnNumber:9},void 0),h.jsxDEV("path",{d:"M10.6 6.2A9.9 9.9 0 0 1 12 6c6.4 0 10 6 10 6a17 17 0 0 1-2.8 3.3"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:195,columnNumber:32},void 0),h.jsxDEV("path",{d:"M6.3 7.9A16.5 16.5 0 0 0 2 12s3.6 6 10 6c1.5 0 2.8-.3 4-.8"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:195,columnNumber:109},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:195,columnNumber:7},void 0),e),EF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:199,columnNumber:9},void 0),h.jsxDEV("path",{d:"M8 20h8M12 16v4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:199,columnNumber:59},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:199,columnNumber:7},void 0),e),kF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("rect",{x:"4",y:"10",width:"16",height:"10",rx:"2"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:203,columnNumber:9},void 0),h.jsxDEV("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:203,columnNumber:60},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:203,columnNumber:7},void 0),e),CF=(e={})=>jt(h.jsxDEV(h.Fragment,{children:[h.jsxDEV("path",{d:"M3.5 12a8.5 8.5 0 1 0 2.6-6.1"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:207,columnNumber:9},void 0),h.jsxDEV("path",{d:"M3 4v4h4"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:207,columnNumber:51},void 0),h.jsxDEV("path",{d:"M12 8v4.4l3 1.8"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:207,columnNumber:72},void 0)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Icons.tsx",lineNumber:207,columnNumber:7},void 0),e),fC={mode:"system",accent:""},fR="agentus.theme",DF="#ffb454",wy=new Set;let so=RF();function RF(){try{const e=localStorage.getItem(fR);return e?VN(JSON.parse(e)):{...fC}}catch{return{...fC}}}function VN(e){const t=e??{},r=t.mode==="light"||t.mode==="dark"?t.mode:"system",s=typeof t.accent=="string"&&Xm(t.accent)?t.accent:"";return{mode:r,accent:s}}function Xm(e){const t=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.exec(String(e??"").trim());if(!t)return null;let r=t[1];r.length===3&&(r=r.split("").map(a=>a+a).join(""));const s=Number.parseInt(r.slice(0,6),16);return`${s>>16&255}, ${s>>8&255}, ${s&255}`}function AF(){return so}function TF(e){return wy.add(e),()=>wy.delete(e)}function pR(){return R.useSyncExternalStore(TF,AF)}function MF(e){return e.mode==="dark"||e.mode==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches}function pC(e,t,r){const s=f=>{let p=f.replace("#","");p.length===3&&(p=p.split("").map(v=>v+v).join(""));const m=Number.parseInt(p.slice(0,6),16);return[m>>16&255,m>>8&255,m&255]},a=s(e),l=s(t);return`#${a.map((f,p)=>Math.round(f+(l[p]-f)*r)).map(f=>f.toString(16).padStart(2,"0")).join("")}`}function Zm(e){const[t,r,s]=[1,3,5].map(l=>Number.parseInt(e.slice(l,l+2),16)/255),a=l=>l<=.03928?l/12.92:((l+.055)/1.055)**2.4;return .2126*a(t)+.7152*a(r)+.0722*a(s)}function OF(e,t){const r=Zm(e),s=Zm(t);return(Math.max(r,s)+.05)/(Math.min(r,s)+.05)}const jF=4.8,LF=.66,BF=.18;function PF(e){const[t,r,s]=[1,3,5].map(l=>Number.parseInt(e.slice(l,l+2),16)),a=Math.max(t,r,s);return a===0?0:(a-Math.min(t,r,s))/a}function VF(e,t){const[r,s,a]=[1,3,5].map(O=>Number.parseInt(e.slice(O,O+2),16)/255),l=Math.max(r,s,a),c=Math.min(r,s,a),f=l-c;if(l===0||f===0||f/l>=t)return e;const p=Math.min(1,t+.01),m=l===r?((s-a)/f+(s<a?6:0))/6:l===s?((a-r)/f+2)/6:((r-s)/f+4)/6,v=l*p,y=v*(1-Math.abs(m*6%2-1)),x=l-v,N=Math.floor(m*6)%6,_=[[v,y,0],[y,v,0],[0,v,y],[0,y,v],[y,0,v],[v,0,y]],[k,j,L]=_[N],P=O=>Math.round((O+x)*255).toString(16).padStart(2,"0");return`#${P(k)}${P(j)}${P(L)}`}function IF(e){const[t,r,s]=[1,3,5].map(v=>Number.parseInt(e.slice(v,v+2),16)/255),a=Math.max(t,r,s),l=Math.min(t,r,s),c=(a+l)/2;if(a===l)return[0,0,c];const f=a-l,p=c>.5?f/(2-a-l):f/(a+l);return[a===t?((r-s)/f+(r<s?6:0))/6:a===r?((s-t)/f+2)/6:((t-r)/f+4)/6,p,c]}function FF(e,t,r){const s=a=>{const l=(a+e*12)%12,c=t*Math.min(r,1-r);return Math.round(255*(r-c*Math.max(-1,Math.min(l-3,9-l,1))))};return`#${[s(0),s(8),s(4)].map(a=>a.toString(16).padStart(2,"0")).join("")}`}function zF(e,t){if(!Xm(e))return e;const[r,s,a]=IF(e),l=Zm(t)>.5?-1:1,c=p=>OF(p,t)>=jF,f=PF(e)>=BF;for(let p=0;p<=100;p+=1){const m=a+l*p*.01;if(p>0&&(m<=0||m>=1))break;const v=p===0?e:FF(r,s,m),y=f?VF(v,LF):v;if(c(y))return y;if(c(v))return v}return e}function $F(e){if(typeof document>"u")return e;const t=getComputedStyle(document.documentElement).getPropertyValue("--bg-panel").trim();return/^#[0-9a-f]{6}$/i.test(t)?t:e}function xy(e){if(typeof document>"u")return;const t=document.documentElement,r=e.accent?Xm(e.accent):null;if(t.dataset.theme=e.mode,e.accent&&r){t.style.setProperty("--accent",e.accent),t.style.setProperty("--accent-rgb",r);const s=MF(e);t.style.setProperty("--accent-text",zF(e.accent,$F(s?"#121a22":"#ffffff"))),t.style.setProperty("--accent-dim",s?pC(e.accent,"#000000",.45):pC(e.accent,"#ffffff",.45)),t.style.setProperty("--on-accent",Zm(e.accent)>.45?"#101820":"#f2f6fa")}else t.style.removeProperty("--accent"),t.style.removeProperty("--accent-text"),t.style.removeProperty("--accent-dim"),t.style.removeProperty("--on-accent"),t.style.setProperty("--accent-rgb",Xm(DF)??"255, 180, 84");t.style.colorScheme=e.mode==="system"?"":e.mode}function mR(e){so=VN(e);try{localStorage.setItem(fR,JSON.stringify(so))}catch{}xy(so);for(const t of wy)t()}function gR(e){const t=VN(e);t.mode===so.mode&&t.accent===so.accent||mR(t)}async function UF(e){mR(e);try{const t=await fetch("/api/settings",{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({theme:so})});if(!t.ok)return(await t.json().catch(()=>({}))).error??`save failed (${t.status})`;const r=await t.json();return gR(r.theme),""}catch(t){return String((t==null?void 0:t.message)??t)}}async function HF(){try{const e=await fetch("/api/settings",{credentials:"same-origin"});if(!e.ok)return;const t=await e.json();gR(t.theme)}catch{}}function WF(){xy(so),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>xy(so))}function qF(){const e=pR(),t=R.useSyncExternalStore(r=>{const s=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)"):null;return s==null||s.addEventListener("change",r),()=>s==null?void 0:s.removeEventListener("change",r)},()=>typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1);return e.mode==="dark"||e.mode==="system"&&t}const mC={"content-type":"application/json"};function KF(e){if(!e)return"unknown client";const t=/Edg\//.test(e)?"Edge":/OPR\//.test(e)?"Opera":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":/curl\//.test(e)?"curl":/node/i.test(e)?"script":e.slice(0,24),r=/Mac OS X|Macintosh/.test(e)?"macOS":/iPhone|iPad/.test(e)?"iOS":/Android/.test(e)?"Android":/Windows/.test(e)?"Windows":/Linux/.test(e)?"Linux":"";return r?`${t} · ${r}`:t}function YF(e){const t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<60?`${t} 秒前`:t<3600?`${Math.round(t/60)} 分钟前`:t<86400?`${Math.round(t/3600)} 小时前`:`${Math.round(t/86400)} 天前`}function I_(e){const t=Math.max(0,Math.round(e/1e3));return t<60?`${t} 秒`:t<3600?`${Math.round(t/60)} 分钟`:t<86400?`${Math.round(t/3600)} 小时`:`${Math.round(t/86400)} 天`}function gC({title:e,children:t,onClose:r}){return h.jsxDEV("div",{className:"modal-bg",onClick:r,children:h.jsxDEV("div",{className:"modal narrow",onClick:s=>s.stopPropagation(),role:"dialog","aria-label":e,children:[h.jsxDEV("div",{className:"modal-head",children:[h.jsxDEV("h3",{children:e},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:84,columnNumber:11},this),h.jsxDEV("button",{className:"icon-btn",onClick:r,"aria-label":"close",children:h.jsxDEV(va,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:85,columnNumber:77},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:85,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:83,columnNumber:9},this),t]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:82,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:81,columnNumber:5},this)}function bm({value:e,onChange:t,label:r,placeholder:s,onEnter:a}){const[l,c]=R.useState(!1);return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("label",{children:r},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:104,columnNumber:7},this),h.jsxDEV("div",{className:"pw-wrap",children:[h.jsxDEV("input",{type:l?"text":"password",value:e,autoComplete:"off","aria-label":r,placeholder:s,onChange:f=>t(f.target.value),onKeyDown:f=>{f.key==="Enter"&&a&&a()}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:106,columnNumber:9},this),h.jsxDEV("button",{type:"button",className:"pw-eye",onClick:()=>c(f=>!f),title:l?"隐藏":"显示","aria-label":l?"hide password":"show password",children:l?h.jsxDEV(SF,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:122,columnNumber:19},this):h.jsxDEV(xF,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:122,columnNumber:46},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:115,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:105,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:103,columnNumber:5},this)}function GF({account:e,onChanged:t}){const[r,s]=R.useState([]),[a,l]=R.useState(0),[c,f]=R.useState([]),[p,m]=R.useState({maxFails:5,lockMs:3e4}),[v,y]=R.useState(""),[x,N]=R.useState(""),[_,k]=R.useState(""),[j,L]=R.useState(!1),[P,O]=R.useState(!1),[T,B]=R.useState(""),[U,ce]=R.useState(""),[re,Z]=R.useState(""),[ve,pe]=R.useState(""),Q=ge=>{k(ge),window.setTimeout(()=>k(""),4e3)},C=R.useCallback(async()=>{try{const ge=await fetch("/api/auth/sessions",{credentials:"same-origin"}),ye=await ge.json().catch(()=>({}));ge.ok&&(s(ye.sessions??[]),ye.ttlMs&&l(ye.ttlMs))}catch{}},[]),J=R.useCallback(async()=>{try{const ge=await fetch("/api/auth/locked-ips",{credentials:"same-origin"}),ye=await ge.json().catch(()=>({}));ge.ok&&(f(ye.locks??[]),m({maxFails:ye.maxFails??5,lockMs:ye.lockMs??3e4}))}catch{}},[]);R.useEffect(()=>{C(),J()},[C,J]);const Y=async(ge,ye)=>{y(ye),N("");try{const mt=await fetch("/api/auth/credentials",{method:"POST",credentials:"same-origin",headers:mC,body:JSON.stringify(ge)}),pt=await mt.json().catch(()=>({}));if(!mt.ok)throw new Error(pt.error??`HTTP ${mt.status}`);return t({username:pt.username,configuredUsername:pt.username,credentialSource:pt.credentialSource??"saved",usingDefaultPassword:!!pt.usingDefaultPassword}),await C(),!0}catch(mt){return N(String((mt==null?void 0:mt.message)??mt)),!1}finally{y("")}},z=async()=>{N("");const ge=U.trim();if(ge.length<2){N("用户名至少 2 位");return}if(ge===(e==null?void 0:e.configuredUsername)){N("和现在的用户名一样");return}await Y({currentPassword:T,username:ge},"user")&&(L(!1),B(""),ce(""),Q("用户名已更新"))},X=async()=>{if(N(""),re!==ve){N("两次输入的新密码不一致");return}if(re.length<((e==null?void 0:e.minPasswordLen)??6)){N(`密码至少 ${(e==null?void 0:e.minPasswordLen)??6} 位`);return}await Y({currentPassword:T,newPassword:re},"pass")&&(O(!1),B(""),Z(""),pe(""),Q("密码已更新;其他设备已登出"))},$=async ge=>{y(ge),N("");try{const ye=await fetch("/api/auth/sessions/revoke",{method:"POST",credentials:"same-origin",headers:mC,body:JSON.stringify({jti:ge})});if(!ye.ok)throw new Error((await ye.json().catch(()=>({}))).error??`HTTP ${ye.status}`);await C(),Q("已撤销该设备")}catch(ye){N(String((ye==null?void 0:ye.message)??ye))}finally{y("")}},xe=async()=>{y("others"),N("");try{const ge=await fetch("/api/auth/sessions/revoke-others",{method:"POST",credentials:"same-origin"}),ye=await ge.json().catch(()=>({}));if(!ge.ok)throw new Error(ye.error??`HTTP ${ge.status}`);await C(),Q(ye.count?`已登出其他 ${ye.count} 个会话`:"没有其他会话")}catch(ge){N(String((ge==null?void 0:ge.message)??ge))}finally{y("")}},Me=async ge=>{y(ge??"all"),N("");try{const ye=await fetch(`/api/auth/locked-ips${ge?`?ip=${encodeURIComponent(ge)}`:""}`,{method:"DELETE",credentials:"same-origin"}),mt=await ye.json().catch(()=>({}));if(!ye.ok)throw new Error(mt.error??`HTTP ${ye.status}`);await J(),Q(ge?`已解除 ${ge} 的锁定`:`已解除全部锁定(${mt.count??0})`)}catch(ye){N(String((ye==null?void 0:ye.message)??ye))}finally{y("")}},Pe=r.filter(ge=>!ge.current).length,ze=r.slice(0,8);return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("section",{className:"set-card",id:"set-account","data-setgroup":"account",children:[h.jsxDEV("h3",{children:"账号"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:262,columnNumber:9},this),h.jsxDEV("p",{className:"set-hint",children:[(e==null?void 0:e.credentialSource)==="default"?h.jsxDEV(h.Fragment,{children:["现在是",h.jsxDEV("b",{children:"内置默认口令"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:265,columnNumber:18},this),"(",h.jsxDEV("code",{children:"admin / 123456"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:265,columnNumber:32},this),"),对公网开放时务必改掉。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:265,columnNumber:13},this):(e==null?void 0:e.credentialSource)==="env"?h.jsxDEV(h.Fragment,{children:["当前口令来自环境变量(",h.jsxDEV("code",{children:"AGENTUS_USERNAME"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:267,columnNumber:26},this)," / ",h.jsxDEV("code",{children:"AGENTUS_PASSWORD"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:267,columnNumber:58},this),"); 在这里保存后以本页为准,环境变量只当引导。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:267,columnNumber:13},this):h.jsxDEV(h.Fragment,{children:["当前口令存在数据目录的 ",h.jsxDEV("code",{children:"credentials.json"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:270,columnNumber:27},this),"(0600,scrypt 哈希,明文不落盘)。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:270,columnNumber:13},this)," ","改密码会让",h.jsxDEV("b",{children:"其他设备"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:272,columnNumber:21},this),"立刻登出(本机自动续上)。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:263,columnNumber:9},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"当前账号"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:275,columnNumber:11},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("span",{className:"acct-name",children:(e==null?void 0:e.configuredUsername)??"—"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:277,columnNumber:13},this),h.jsxDEV("button",{className:"set-mini",onClick:()=>{N(""),L(!0)},children:"改用户名"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:278,columnNumber:13},this),h.jsxDEV("button",{className:"set-mini",onClick:()=>{N(""),O(!0)},children:"改密码"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:279,columnNumber:13},this),_?h.jsxDEV("span",{className:"set-toast",children:_},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:280,columnNumber:20},this):null,x&&!j&&!P?h.jsxDEV("span",{className:"set-inline-err",children:x},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:281,columnNumber:46},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:276,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:274,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:261,columnNumber:7},this),h.jsxDEV("section",{className:"set-card",id:"set-sessions","data-setgroup":"account",children:[h.jsxDEV("h3",{children:[h.jsxDEV(EF,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:288,columnNumber:13},this)," 登录会话"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:288,columnNumber:9},this),h.jsxDEV("p",{className:"set-hint",children:["每个浏览器/脚本各占一行;会话有效期 ",a?Math.round(a/864e5):7," 天, 可以单独踢掉一台设备。改密码等于把其他设备全部登出。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:289,columnNumber:9},this),h.jsxDEV("div",{className:"acct-list",children:[r.length===0?h.jsxDEV("div",{className:"acct-empty",children:"没有可显示的会话"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:294,columnNumber:36},this):null,ze.map(ge=>h.jsxDEV("div",{className:"acct-row",children:[h.jsxDEV("div",{className:"acct-main",children:[h.jsxDEV("span",{className:"acct-name",children:[KF(ge.ua),ge.current?h.jsxDEV("span",{className:"acct-badge",children:"当前"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:300,columnNumber:32},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:298,columnNumber:17},this),h.jsxDEV("span",{className:"acct-sub",children:[ge.ip||"未知 IP"," · ",ge.current?"现在":`活跃 ${YF(ge.lastSeen)}`," · 到期还有 ",I_(ge.expiresAt-Date.now())]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:302,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:297,columnNumber:15},this),ge.current?h.jsxDEV("span",{className:"acct-when",children:"这台设备"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:307,columnNumber:17},this):h.jsxDEV("button",{className:"set-mini danger",disabled:v===ge.jti,onClick:()=>void $(ge.jti),children:v===ge.jti?"…":"撤销"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:309,columnNumber:17},this)]},ge.jti,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:296,columnNumber:13},this)),r.length>ze.length?h.jsxDEV("div",{className:"acct-empty",children:["还有 ",r.length-ze.length," 个会话未列出 —— 点“登出其他设备”可以一次清掉。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:316,columnNumber:13},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:293,columnNumber:9},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:320,columnNumber:11},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("button",{className:"set-mini",onClick:()=>void C(),disabled:v==="reload",children:"刷新"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:322,columnNumber:13},this),h.jsxDEV("button",{className:"set-mini danger",onClick:()=>void xe(),disabled:v==="others"||Pe===0,children:v==="others"?"…":Pe?`登出其他设备(${Pe})`:"没有其他设备"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:323,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:321,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:319,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:287,columnNumber:7},this),h.jsxDEV("section",{className:"set-card",id:"set-locks","data-setgroup":"account",children:[h.jsxDEV("h3",{children:[h.jsxDEV(kF,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:332,columnNumber:13},this)," 登录失败锁定"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:332,columnNumber:9},this),h.jsxDEV("p",{className:"set-hint",children:["同一个 IP 连续失败 ",p.maxFails," 次会被锁定 ",Math.round(p.lockMs/1e3)," 秒 (防爆破;把自己锁在门外时可以在这里放行)。清单在内存里,重启即清空。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:333,columnNumber:9},this),h.jsxDEV("div",{className:"acct-list",children:[c.length===0?h.jsxDEV("div",{className:"acct-empty",children:"没有失败的来源,也没有被锁的 IP"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:338,columnNumber:33},this):null,c.map(ge=>h.jsxDEV("div",{className:"acct-row",children:[h.jsxDEV("div",{className:"acct-main",children:[h.jsxDEV("span",{className:"acct-name",children:[ge.ip,ge.locked?h.jsxDEV("span",{className:"acct-badge danger",children:["已锁定 ",I_(ge.retryAfterMs)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:344,columnNumber:31},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:342,columnNumber:17},this),h.jsxDEV("span",{className:"acct-sub",children:ge.locked?`剩余 ${I_(ge.retryAfterMs)} 后自动解除`:`已失败 ${ge.fails} 次`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:346,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:341,columnNumber:15},this),h.jsxDEV("button",{className:"set-mini",disabled:v===ge.ip,onClick:()=>void Me(ge.ip),children:v===ge.ip?"…":"解锁"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:350,columnNumber:15},this)]},ge.ip,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:340,columnNumber:13},this))]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:337,columnNumber:9},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:357,columnNumber:11},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("button",{className:"set-mini",onClick:()=>void J(),children:"刷新"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:359,columnNumber:13},this),h.jsxDEV("button",{className:"set-mini danger",disabled:v==="all"||c.length===0,onClick:()=>void Me(),children:v==="all"?"…":"全部解锁"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:360,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:358,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:356,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:331,columnNumber:7},this),j?h.jsxDEV(gC,{title:"改用户名",onClose:()=>{L(!1),N("")},children:[h.jsxDEV(bm,{label:"当前密码",value:T,onChange:B,placeholder:"改之前先证明是你"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:369,columnNumber:11},this),h.jsxDEV("label",{children:"新用户名"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:370,columnNumber:11},this),h.jsxDEV("input",{value:U,autoComplete:"off","aria-label":"new username",placeholder:(e==null?void 0:e.configuredUsername)??"",onChange:ge=>ce(ge.target.value),onKeyDown:ge=>{ge.key==="Enter"&&z()}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:371,columnNumber:11},this),x?h.jsxDEV("div",{className:"err",children:x},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:379,columnNumber:18},this):null,h.jsxDEV("div",{className:"row",children:[h.jsxDEV("button",{className:"cancel",onClick:()=>{L(!1),N("")},children:"取消"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:381,columnNumber:13},this),h.jsxDEV("button",{className:"go",disabled:v==="user"||!T||!U.trim(),onClick:()=>void z(),children:v==="user"?"…":"保存"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:382,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:380,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:368,columnNumber:9},this):null,P?h.jsxDEV(gC,{title:"改密码",onClose:()=>{O(!1),N("")},children:[h.jsxDEV(bm,{label:"当前密码",value:T,onChange:B},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:391,columnNumber:11},this),h.jsxDEV(bm,{label:"新密码",value:re,onChange:Z,placeholder:`至少 ${(e==null?void 0:e.minPasswordLen)??6} 位`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:392,columnNumber:11},this),h.jsxDEV(bm,{label:"确认新密码",value:ve,onChange:pe,onEnter:()=>void X()},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:393,columnNumber:11},this),h.jsxDEV("div",{className:"set-hint",children:"保存后其他设备会被登出;本机自动续上。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:394,columnNumber:11},this),x?h.jsxDEV("div",{className:"err",children:x},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:395,columnNumber:18},this):null,h.jsxDEV("div",{className:"row",children:[h.jsxDEV("button",{className:"cancel",onClick:()=>{O(!1),N("")},children:"取消"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:397,columnNumber:13},this),h.jsxDEV("button",{className:"go",disabled:v==="pass"||!T||!re||!ve,onClick:()=>void X(),children:v==="pass"?"…":"保存"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:398,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:396,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:390,columnNumber:9},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Account.tsx",lineNumber:259,columnNumber:5},this)}const JF=[{key:"turnStart",label:"任务开始",hint:"agent 开始跑 → 一条进行中的卡片(Android 16 可提升成实时动态)"},{key:"approval",label:"需要我批准",hint:"权限请求 → 带按钮的通知,锁屏上就能按「仅此次 / 拒绝」"},{key:"completion",label:"跑完 / 出错",hint:"回合结束 → 一条可点开该会话的通知"},{key:"quietWhenWatching",label:"我正在看这个会话时不推",hint:"页面就在眼前时,手机上再响一次是噪音(审批除外——那是我必须做的决定)"}];function XF(e){if(!e)return"—";const t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<60?`${t} 秒前`:t<3600?`${Math.round(t/60)} 分钟前`:`${Math.round(t/3600)} 小时前`}function ZF({sessionId:e}){var N;const[t,r]=R.useState(null),[s,a]=R.useState(""),[l,c]=R.useState(""),[f,p]=R.useState(!1),m=R.useCallback(async()=>{try{const _=await fetch("/api/notify/settings",{credentials:"same-origin"});if(!_.ok)throw new Error(`${_.status} ${_.statusText}`);r(await _.json()),a("")}catch(_){a(`读不到手机通知设置:${_.message}`)}},[]);R.useEffect(()=>{m();const _=window.setInterval(()=>void m(),5e3);return()=>window.clearInterval(_)},[m]);const v=async(_,k,j)=>{p(!0);try{const L=await fetch(_,{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify(k)}),P=await L.json().catch(()=>({}));if(!L.ok)throw new Error(P.error??`${L.status}`);return c(j),a(""),await m(),!0}catch(L){return a(`${j}失败:${L.message}`),!1}finally{p(!1)}},y=_=>{if(!t)return;const k={...t.rules,[_]:!t.rules[_]};r({...t,rules:k}),v("/api/notify/settings",{rules:k},"已保存规则")},x=async _=>{try{await navigator.clipboard.writeText(_),c("配对串已复制")}catch{c("复制失败,请手动选中")}};return h.jsxDEV("section",{className:"set-card",id:"set-notify","data-setgroup":"notify",children:[h.jsxDEV("h3",{children:"手机通知(Android 伴侣)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:125,columnNumber:7},this),h.jsxDEV("p",{className:"set-hint",children:["App 只是一个通用渲染器——它显示什么、什么时候响,全由这里的规则决定,",h.jsxDEV("b",{children:"改规则不需要重新装 APK"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:128,columnNumber:9},this),"。手机在外面也能收:App 自己开一条套接字连回这台服务端, 服务端就知道要往哪台手机推。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:126,columnNumber:7},this),s?h.jsxDEV("div",{className:"set-err",role:"alert",children:s},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:131,columnNumber:14},this):null,l?h.jsxDEV("div",{className:"set-toast",children:l},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:132,columnNumber:15},this):null,h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"装 App"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:135,columnNumber:9},this),h.jsxDEV("div",{children:[h.jsxDEV("a",{className:"set-mini",href:(t==null?void 0:t.apkUrl)??"/agentus-companion.apk",download:!0,children:"agentus-companion.apk"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:137,columnNumber:11},this),t!=null&&t.apkBytes?h.jsxDEV("span",{className:"set-hint",children:[" · ",(t.apkBytes/1048576).toFixed(1)," MB"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:140,columnNumber:29},this):null,h.jsxDEV("span",{className:"set-hint",children:" · 装完在 App 里贴下面这行配对串,或直接填地址 + 用户名密码"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:141,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:136,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:134,columnNumber:7},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"配对串"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:146,columnNumber:9},this),h.jsxDEV("div",{children:[h.jsxDEV("code",{className:"set-input",style:{display:"inline-block",minWidth:"20em"},children:(t==null?void 0:t.pairUri)??"…"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:148,columnNumber:11},this),h.jsxDEV("button",{type:"button",className:"set-mini",disabled:!t,onClick:()=>void x((t==null?void 0:t.pairUri)??""),children:"复制"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:149,columnNumber:11},this),h.jsxDEV("button",{type:"button",className:"set-mini",disabled:f,onClick:()=>void v("/api/notify/pair-code/rotate",{},"已换新配对码"),children:"换一个"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:150,columnNumber:11},this),h.jsxDEV("span",{className:"set-hint",children:[" · 当前码 ",h.jsxDEV("b",{children:(t==null?void 0:t.code)??"…"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:156,columnNumber:45},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:156,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:147,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:145,columnNumber:7},this),JF.map(_=>h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:_.label},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:162,columnNumber:11},this),h.jsxDEV("div",{children:[h.jsxDEV("button",{type:"button",className:`set-mini ${t!=null&&t.rules[_.key]?"on":""}`,"aria-pressed":!!(t!=null&&t.rules[_.key]),disabled:!t||f,onClick:()=>y(_.key),children:t!=null&&t.rules[_.key]?"开":"关"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:164,columnNumber:13},this),h.jsxDEV("span",{className:"set-hint",children:[" ",_.hint]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:173,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:163,columnNumber:11},this)]},_.key,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:161,columnNumber:9},this)),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"现在"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:179,columnNumber:9},this),h.jsxDEV("div",{className:"set-hint",children:t!=null&&t.presence.call?h.jsxDEV(h.Fragment,{children:["正在通话 ",h.jsxDEV("b",{children:((N=t.presence.sessionId)==null?void 0:N.slice(0,8))??""},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:182,columnNumber:22},this),"(这个会话的进行中/完成通知不推,其它通知照发但静音 —— 免提的声音会进麦克风)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:182,columnNumber:15},this):t!=null&&t.presence.sessionId?h.jsxDEV(h.Fragment,{children:["你正看着 ",h.jsxDEV("b",{children:t.presence.sessionId.slice(0,8)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:184,columnNumber:24},this),t.watching?"(这个会话的进行中/完成通知暂时不推)":"(但「我正在看就不推」是关的)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:184,columnNumber:17},this):"没有正在查看的会话"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:180,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:178,columnNumber:7},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"操作"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:190,columnNumber:9},this),h.jsxDEV("div",{children:[h.jsxDEV("button",{type:"button",className:"set-mini",disabled:f,onClick:()=>void v("/api/notify/probe",{},"已发测试通知"),children:"发测试通知到手机"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:192,columnNumber:11},this),h.jsxDEV("button",{type:"button",className:"set-mini",disabled:f||!e,title:e?"把这条会话推成一条手机通知":"先打开一个会话",onClick:()=>void v("/api/notify/push",{sessionId:e,kind:"note",title:"来自驾驶舱的推送"},"已推到手机"),children:"把当前会话推到手机"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:195,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:191,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:189,columnNumber:7},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"试上岛"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:208,columnNumber:9},this),h.jsxDEV("div",{children:[h.jsxDEV("button",{type:"button",className:"set-mini",disabled:f,title:"按 App 自己的顺序(先小米焦点通知,再安卓原生实时动态)",onClick:()=>void v("/api/notify/push",{sessionId:e,kind:"island",title:"上岛测试 · 自动"},"已推自动通道"),children:"自动通道"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:213,columnNumber:11},this),h.jsxDEV("button",{type:"button",className:"set-mini",disabled:f,title:"只走安卓 16 原生实时动态(不需要小米任何授权)",onClick:()=>void v("/api/notify/push",{sessionId:e,kind:"island",path:"aosp",title:"上岛测试 · 原生实时动态"},"已推原生通道"),children:"原生实时动态"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:218,columnNumber:11},this),h.jsxDEV("button",{type:"button",className:"set-mini",disabled:f,title:"只走小米超级岛 / 焦点通知(需要小米平台侧开通)",onClick:()=>void v("/api/notify/push",{sessionId:e,kind:"island",path:"xiaomi",title:"上岛测试 · 小米岛"},"已推小米通道"),children:"小米岛"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:223,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:209,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:207,columnNumber:7},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"已配对设备"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:232,columnNumber:9},this),h.jsxDEV("div",{children:((t==null?void 0:t.devices.length)??0)===0?h.jsxDEV("span",{className:"set-hint",children:"还没有设备。装好 App、贴上面那行配对串,这里就会多一台。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:235,columnNumber:13},this):h.jsxDEV("table",{style:{borderCollapse:"collapse"},children:h.jsxDEV("tbody",{children:t==null?void 0:t.devices.map(_=>h.jsxDEV("tr",{children:[h.jsxDEV("td",{style:{padding:"2px 10px 2px 0"},children:[h.jsxDEV("b",{style:{color:_.online?"#4ec9a0":"inherit"},children:_.online?"●":"○"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:242,columnNumber:23},this)," ",_.name]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:241,columnNumber:21},this),h.jsxDEV("td",{className:"set-hint",style:{padding:"2px 10px 2px 0"},children:[_.platform," ",_.sdkInt," · v",_.appVersion," · ",_.online?"在线":`最后在线 ${XF(_.lastSeenAt)}`]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:244,columnNumber:21},this),h.jsxDEV("td",{className:"set-hint",style:{padding:"2px 10px 2px 0"},title:_.capabilities.join(", "),children:[(_.capabilities??[]).length," 项能力"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:247,columnNumber:21},this),h.jsxDEV("td",{children:h.jsxDEV("button",{type:"button",className:"set-mini",disabled:f,onClick:()=>void v("/api/notify/devices/revoke",{deviceId:_.deviceId},`已撤销 ${_.name}`),children:"撤销"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:251,columnNumber:23},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:250,columnNumber:21},this)]},_.deviceId,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:240,columnNumber:19},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:238,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:237,columnNumber:13},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:233,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:231,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/NotifySettings.tsx",lineNumber:124,columnNumber:5},this)}const vC={id:"",label:"",kind:"hermes",cmd:"hermes",args:"acp",env:"",home:"",profile:"",cwd:"",notes:"",defaultMode:"",nativePlanSource:"none"};function vR(e){return Array.isArray(e)?e.join(" "):e??""}function QF(e,t){return(t??[]).map(r=>`${r}=`).join(`
|
|
228
|
+
`)}function F_(e){return{id:e.id,label:e.label,kind:e.kind,cmd:e.cmd,args:vR(e.args),env:QF(void 0,e.env),home:e.home??"",profile:e.profile??"",cwd:e.cwd??"",defaultMode:e.defaultMode??"",notes:e.notes??"",nativePlanSource:e.nativePlanSource??"none"}}function e7(e,t){var s,a,l;const r=(l=(a=(s=e.handshake)==null?void 0:s.modes)==null?void 0:a.names)==null?void 0:l[t];return r&&r!==t?`${r}(${t})`:t}function jm({tone:e,children:t}){return h.jsxDEV("span",{className:`be-badge be-${e}`,children:t},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:65,columnNumber:10},this)}const Sy={online:"在线",offline:"不可用",missing:"找不到命令",unchecked:"未检测"},t7={startup:"启动检查",manual:"手动探测",session:"真实会话"};function Ey(e){return e==="online"?"ok":e==="offline"?"danger":e==="missing"?"warn":"dim"}function ky(e){if(!e)return"—";const t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<45?"刚刚":t<3600?`${Math.round(t/60)} 分钟前`:t<86400?`${Math.round(t/3600)} 小时前`:`${Math.round(t/86400)} 天前`}function n7({row:e}){const t=e.health;if(!t||!t.at)return null;const r=t.kind?t7[t.kind]??t.kind:"未知深度";return h.jsxDEV("div",{className:"be-health",children:[h.jsxDEV(jm,{tone:Ey(t.status),children:Sy[t.status]??t.status},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:101,columnNumber:7},this),h.jsxDEV("span",{className:"be-dim",children:["上次检查 ",ky(t.at)," · ",r,t.latencyMs!==null&&t.latencyMs!==void 0?` · ${t.latencyMs}ms`:"",t.lastSuccessAt?` · 上次成功 ${ky(t.lastSuccessAt)}`:""]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:102,columnNumber:7},this),t.errorCode?h.jsxDEV("code",{className:"be-code",children:t.errorCode},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:107,columnNumber:22},this):null,t.errorCode&&t.guidance?h.jsxDEV("div",{className:"be-guidance",children:t.guidance},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:108,columnNumber:36},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:100,columnNumber:5},this)}function i7({row:e}){var s,a;const t=e.handshake;if(!t)return null;const r=[t.modes?`模式 ${t.modes.available.length}`:null,(s=t.configOptions)!=null&&s.length?`选项 ${t.configOptions.length}`:null,t.models?`模型 ${t.models.available.length}`:null,(a=t.commands)!=null&&a.length?`命令 ${t.commands.length}`:null,t.loadSession===null||t.loadSession===void 0?null:`session/load ${t.loadSession?"有":"无"}`].filter(Boolean);return h.jsxDEV("div",{className:"be-handshake",children:["握手(上次真实会话):",h.jsxDEV("code",{children:r.join(" · ")||"无可用信息"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:126,columnNumber:18},this),h.jsxDEV("span",{className:"be-dim",children:[" · ",ky(t.at)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:127,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:125,columnNumber:5},this)}function r7(){var Q;const[e,t]=R.useState([]),[r,s]=R.useState(null),[a,l]=R.useState(null),[c,f]=R.useState(""),[p,m]=R.useState(""),[v,y]=R.useState(""),[x,N]=R.useState(null),_=R.useCallback(async()=>{try{t(await Qe.loadBackends()),y("")}catch(C){y(`后端列表拉取失败:${String(C.message??C)}`)}},[]);R.useEffect(()=>{_()},[_]);const k=R.useRef(null),j=R.useRef(null),L=(C,J,Y="")=>{if(k.current=document.activeElement??null,y(""),m(Y),J){l(null),s(J);return}if(C){l(C.id),s(F_(C));return}l(null),s({...vC})},P=()=>{s(null),l(null);const C=k.current;k.current=null,C&&document.body.contains(C)&&C.focus()},O=r!==null;R.useEffect(()=>{if(!O)return;const C=document.querySelector("[data-set-scroll]"),J=C?C.style.overflow:"";C&&(C.style.overflow="hidden");const Y=X=>{X.key==="Escape"&&P()};window.addEventListener("keydown",Y);const z=window.setTimeout(()=>{var X,$;($=(X=j.current)==null?void 0:X.querySelector("input:not([disabled]), select, textarea"))==null||$.focus()},0);return()=>{window.removeEventListener("keydown",Y),window.clearTimeout(z),C&&(C.style.overflow=J)}},[O]);const T=(C,J)=>s(Y=>({...Y??vC,[C]:J})),B=a?e.find(C=>C.id===a)??null:null,U=((Q=B==null?void 0:B.handshake)==null?void 0:Q.modes)??null,ce=((U==null?void 0:U.available)??[]).map(C=>{var J;return{id:C,name:((J=U==null?void 0:U.names)==null?void 0:J[C])??C}}),re=!!(r!=null&&r.defaultMode)&&!ce.some(C=>C.id===(r==null?void 0:r.defaultMode)),Z=async()=>{if(r){f("save"),y(""),m("");try{if(a){const C=e.find(z=>z.id===a),J=C?F_(C):null,Y={};if(J)for(const[z,X]of Object.entries(r))z!=="id"&&String(J[z]??"")!==String(X??"")&&(Y[z]=X);else Object.assign(Y,r),delete Y.id;if(!Object.keys(Y).length){m("没有改动"),s(null),l(null);return}await Qe.updateBackend(a,Y)}else await Qe.createBackend(r);m(a?"已保存":"已创建"),s(null),l(null),await _()}catch(C){y(String(C.message??C))}finally{f("")}}},ve=async C=>{if(window.confirm(`删除后端 ${C.id}?(被会话引用的后端不能删)`)){f(`del:${C.id}`),y(""),m("");try{await Qe.deleteBackend(C.id),m(`已删除 ${C.id}`),a===C.id&&(l(null),s(null)),await _()}catch(J){y(String(J.message??J))}finally{f("")}}},pe=async C=>{f(`probe:${C.id}`),y(""),m("");try{const J=await Qe.inspectBackend(C.id);N({id:C.id,data:J}),await _()}catch(J){y(String(J.message??J)),await _()}finally{f("")}};return h.jsxDEV("section",{className:"set-card",id:"set-backends","data-setgroup":"agent",children:[h.jsxDEV("h3",{children:"后端"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:284,columnNumber:7},this),h.jsxDEV("p",{className:"set-hint",children:["一条后端 = ",h.jsxDEV("b",{children:"用哪个命令"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:286,columnNumber:16},this)," · ",h.jsxDEV("b",{children:"哪套环境变量"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:286,columnNumber:31},this)," · ",h.jsxDEV("b",{children:"哪个主目录"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:286,columnNumber:47},this)," · ",h.jsxDEV("b",{children:"哪套配置"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:286,columnNumber:62},this),"。 新建会话时按行选择,所以每个槽位可以各自隔离。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:285,columnNumber:7},this),h.jsxDEV("div",{className:"be-list",children:[e.map(C=>{var J;return h.jsxDEV("div",{className:"be-row",children:[h.jsxDEV("div",{className:"be-row-main",children:[h.jsxDEV("div",{className:"be-row-title",children:[h.jsxDEV("b",{children:C.label},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:295,columnNumber:17},this)," ",h.jsxDEV("code",{children:C.id},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:295,columnNumber:36},this),C.builtin?h.jsxDEV(jm,{tone:"dim",children:"内置"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:296,columnNumber:32},this):null,(J=C.health)!=null&&J.at?h.jsxDEV(jm,{tone:Ey(C.health.status),children:Sy[C.health.status]??C.health.status},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:298,columnNumber:19},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:294,columnNumber:15},this),h.jsxDEV("div",{className:"be-row-sub",children:[h.jsxDEV("code",{children:[C.cmd," ",(C.args??[]).join(" ")]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:302,columnNumber:17},this),C.profile?h.jsxDEV(h.Fragment,{children:[" · profile ",h.jsxDEV("code",{children:C.profile},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:303,columnNumber:45},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:303,columnNumber:32},this):null,C.home?h.jsxDEV(h.Fragment,{children:[" · home ",h.jsxDEV("code",{children:C.home},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:304,columnNumber:39},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:304,columnNumber:29},this):null,(C.env??[]).length?h.jsxDEV(h.Fragment,{children:[" · env ",h.jsxDEV("code",{children:(C.env??[]).join(", ")},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:305,columnNumber:52},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:305,columnNumber:43},this):null," ",C.nativePlanSource==="acp"?h.jsxDEV(h.Fragment,{children:[" · 计划 ",h.jsxDEV("code",{children:"原生帧"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:310,columnNumber:29},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:310,columnNumber:21},this):h.jsxDEV(h.Fragment,{children:[" · 计划 ",h.jsxDEV("code",{children:"agentus-plan 工具"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:311,columnNumber:29},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:311,columnNumber:21},this),C.defaultMode?h.jsxDEV(h.Fragment,{children:[" · 默认权限 ",h.jsxDEV("code",{children:e7(C,C.defaultMode)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:314,columnNumber:46},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:314,columnNumber:36},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:301,columnNumber:15},this),C.notes?h.jsxDEV("div",{className:"be-row-note",children:C.notes},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:316,columnNumber:28},this):null,(C.warnings??[]).map((Y,z)=>h.jsxDEV("div",{className:"hint-warn",children:Y},z,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:317,columnNumber:51},this)),h.jsxDEV(n7,{row:C},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:318,columnNumber:15},this),h.jsxDEV(i7,{row:C},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:319,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:293,columnNumber:13},this),h.jsxDEV("div",{className:"be-row-actions",children:[h.jsxDEV("button",{className:"set-mini",onClick:()=>void pe(C),disabled:c===`probe:${C.id}`,children:c===`probe:${C.id}`?"探测中…":"探测"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:322,columnNumber:15},this),h.jsxDEV("button",{className:"set-mini",onClick:()=>L(C),children:"编辑"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:325,columnNumber:15},this),h.jsxDEV("button",{className:"set-mini",onClick:()=>L(null,{...F_(C),id:`${C.id}-copy`,label:`${C.label} copy`},"复制为新行:确认 id 后保存"),children:"复制"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:328,columnNumber:15},this),h.jsxDEV("button",{className:"set-mini",onClick:()=>void ve(C),disabled:c===`del:${C.id}`,children:"删除"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:340,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:321,columnNumber:13},this)]},C.id,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:292,columnNumber:11},this)}),e.length?null:h.jsxDEV("p",{className:"set-hint",children:"还没有后端行。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:346,columnNumber:25},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:290,columnNumber:7},this),x?h.jsxDEV("div",{className:"be-inspect",children:[h.jsxDEV("div",{className:"be-inspect-head",children:[h.jsxDEV("b",{children:["探测结果:",x.id]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:352,columnNumber:13},this),h.jsxDEV("button",{className:"set-mini",onClick:()=>N(null),children:"收起"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:353,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:351,columnNumber:11},this),h.jsxDEV("ul",{children:[h.jsxDEV("li",{children:["判定: ",h.jsxDEV(jm,{tone:Ey(x.data.status),children:Sy[x.data.status]??x.data.status},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:357,columnNumber:19},this),x.data.errorCode?h.jsxDEV(h.Fragment,{children:[" ",h.jsxDEV("code",{className:"be-code",children:x.data.errorCode},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:358,columnNumber:44},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:358,columnNumber:41},this):null,h.jsxDEV("span",{className:"be-dim",children:[" · 用时 ",x.data.latencyMs,"ms"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:359,columnNumber:15},this),x.data.guidance?h.jsxDEV("div",{className:"be-guidance",children:x.data.guidance},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:360,columnNumber:40},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:356,columnNumber:13},this),h.jsxDEV("li",{children:["命令: ",h.jsxDEV("code",{children:x.data.cmd},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:362,columnNumber:21},this),x.data.resolved?h.jsxDEV(h.Fragment,{children:[" → ",h.jsxDEV("code",{children:x.data.resolved},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:362,columnNumber:82},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:362,columnNumber:77},this):h.jsxDEV(h.Fragment,{children:[" ",h.jsxDEV("span",{className:"be-danger",children:"找不到"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:362,columnNumber:127},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:362,columnNumber:124},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:362,columnNumber:13},this),h.jsxDEV("li",{children:["argv: ",h.jsxDEV("code",{children:(x.data.args??[]).join(" ")},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:363,columnNumber:23},this),x.data.profile?h.jsxDEV(h.Fragment,{children:["(profile ",h.jsxDEV("code",{children:x.data.profile},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:363,columnNumber:108},this),")"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:363,columnNumber:97},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:363,columnNumber:13},this),h.jsxDEV("li",{children:["版本: ",h.jsxDEV("code",{children:x.data.version??"—"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:364,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:364,columnNumber:13},this),h.jsxDEV("li",{children:["代码树(它真正加载的那份): ",h.jsxDEV("code",{children:x.data.installDir??"—"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:366,columnNumber:30},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:365,columnNumber:13},this),h.jsxDEV("li",{children:["home: ",h.jsxDEV("code",{children:x.data.home??"—"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:369,columnNumber:21},this),x.data.homeExists?h.jsxDEV(h.Fragment,{children:["(存在,",x.data.homeEntries," 项",x.data.stateDb?`,state.db ${(x.data.stateDb.bytes/1024).toFixed(0)}KB`:",无 state.db",")"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:371,columnNumber:19},this):h.jsxDEV(h.Fragment,{children:["(",h.jsxDEV("span",{className:"be-danger",children:"不存在"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:372,columnNumber:22},this),",首次启动会创建)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:372,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:368,columnNumber:13},this),x.data.acpCheck?h.jsxDEV("li",{children:["acp --check: ",x.data.acpCheck.ok?"OK":h.jsxDEV("span",{className:"be-danger",children:"失败"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:376,columnNumber:65},this)," ",h.jsxDEV("span",{className:"be-dim",children:"(过了也不代表能起会话:检查在适配器的 server 模块导入之前就返回了)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:377,columnNumber:22},this),h.jsxDEV("div",{className:"be-inspect-out",children:x.data.acpCheck.output},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:378,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:375,columnNumber:15},this):null,x.data.error?h.jsxDEV("li",{className:"be-danger",children:x.data.error},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:381,columnNumber:35},this):null,(x.data.warnings??[]).map((C,J)=>h.jsxDEV("li",{className:"hint-warn",children:C},J,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:382,columnNumber:58},this))]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:355,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:350,columnNumber:9},this):null,h.jsxDEV("div",{className:"row",children:[h.jsxDEV("button",{className:"set-mini",onClick:()=>L(null),children:"新建后端"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:387,columnNumber:9},this),h.jsxDEV("button",{className:"set-mini",onClick:()=>void _(),children:"刷新"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:388,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:386,columnNumber:7},this),p?h.jsxDEV("span",{className:"set-toast",children:p},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:391,columnNumber:14},this):null,!r&&v?h.jsxDEV("div",{className:"set-err",role:"alert",children:v},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:392,columnNumber:24},this):null,r?Id.createPortal(h.jsxDEV("div",{className:"be-backdrop",onMouseDown:C=>{C.target===C.currentTarget&&P()},children:h.jsxDEV("div",{className:"be-modal",role:"dialog","aria-modal":"true",ref:j,"aria-label":a?`编辑后端 ${r.label||a}`:"新建后端",children:[h.jsxDEV("div",{className:"be-modal-head",children:[h.jsxDEV("b",{children:a?"编辑后端":"新建后端"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:409,columnNumber:19},this),a?h.jsxDEV("code",{children:a},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:410,columnNumber:30},this):null,h.jsxDEV("button",{className:"set-mini be-modal-x",onClick:P,"aria-label":"关闭",children:"✕"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:411,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:408,columnNumber:17},this),h.jsxDEV("div",{className:"be-modal-body",children:[h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"id"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:415,columnNumber:21},this),h.jsxDEV("input",{className:"set-input",value:r.id??"",spellCheck:!1,disabled:!!a,placeholder:"hermes-fork",onChange:C=>T("id",C.target.value.trim())},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:416,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:414,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"名称"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:423,columnNumber:21},this),h.jsxDEV("input",{className:"set-input",value:r.label??"",onChange:C=>T("label",C.target.value),placeholder:"Hermes(源码树)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:424,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:422,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"类型"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:427,columnNumber:21},this),h.jsxDEV("select",{className:"set-select",value:r.kind??"hermes",onChange:C=>T("kind",C.target.value),children:[h.jsxDEV("option",{value:"hermes",children:"hermes(ACP + home 隔离)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:429,columnNumber:23},this),h.jsxDEV("option",{value:"qoder",children:"qoder"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:430,columnNumber:23},this),h.jsxDEV("option",{value:"mock",children:"mock(QA)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:431,columnNumber:23},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:428,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:426,columnNumber:19},this),(r.kind??"hermes")==="hermes"?h.jsxDEV("p",{className:"set-hint be-kind-help",children:["hermes 行的四件事:",h.jsxDEV("b",{children:"命令"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:436,columnNumber:36},this)," 填 ",h.jsxDEV("code",{children:"hermes"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:436,columnNumber:48},this),",或指向某份源码树的启动器 (如 ",h.jsxDEV("code",{children:"~/.local/bin/hermes-dev"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:437,columnNumber:26},this),");",h.jsxDEV("b",{children:"HERMES_HOME"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:437,columnNumber:64},this)," 是这一行读写的",h.jsxDEV("code",{children:"~/.hermes"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:438,columnNumber:23},this)," 目录 —— ",h.jsxDEV("b",{children:["留空就用默认的 ",h.jsxDEV("code",{children:"~/.hermes"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:438,columnNumber:63},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:438,columnNumber:52},this),"(也就是你现在这个 hermes 的数据目录:共用它会共用会话列表、记忆和 cron); 想让某个槽位用干净的数据,就填一个别的目录;",h.jsxDEV("b",{children:"profile"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:440,columnNumber:45},this)," 以 ",h.jsxDEV("code",{children:"-p"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:440,columnNumber:62},this)," 传给命令;",h.jsxDEV("b",{children:"额外环境"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:441,columnNumber:23},this)," 里放 ",h.jsxDEV("code",{children:"PYTHONPATH"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:441,columnNumber:38},this)," 就能让这一行跑那份源码树。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:435,columnNumber:21},this):null,h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"计划来源"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:445,columnNumber:21},this),h.jsxDEV("select",{className:"set-select",value:r.nativePlanSource??"none",onChange:C=>T("nativePlanSource",C.target.value),children:[h.jsxDEV("option",{value:"none",children:"注入 agentus-plan 计划工具(推荐)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:451,columnNumber:23},this),h.jsxDEV("option",{value:"acp",children:"agent 自己发计划帧(原生 ACP)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:452,columnNumber:23},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:446,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:444,columnNumber:19},this),h.jsxDEV("p",{className:"set-hint be-kind-help",children:["计划卡的数据由谁写:",h.jsxDEV("b",{children:"计划工具"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:456,columnNumber:31},this)," 会在握手时给 agent 注入 ",h.jsxDEV("code",{children:"agentus-plan"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:456,columnNumber:59},this),"(",h.jsxDEV("code",{children:"update_plan"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:457,columnNumber:22},this),"/",h.jsxDEV("code",{children:"read_plan"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:457,columnNumber:47},this),"),工具写的计划存在座舱里、重启不丢, 新 agent 不用改一行代码就有计划卡 —— 所有后端默认走这条。",h.jsxDEV("b",{children:"原生"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:458,columnNumber:55},this)," 是逃生口:只有 在这个 agent 自己发的 ACP ",h.jsxDEV("code",{children:"plan"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:459,columnNumber:40},this)," 帧比座舱对象更可信时才选它,选了之后 该会话的帧才会被渲染(否则帧一律丢弃)。 两者不会打架:MCP 驱动的会话里原生帧整条被丢弃,卡片只由工具写。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:455,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"命令"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:464,columnNumber:21},this),h.jsxDEV("input",{className:"set-input",value:r.cmd??"",spellCheck:!1,onChange:C=>T("cmd",C.target.value),placeholder:"hermes 或 /path/to/hermes-dev"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:465,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:463,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"参数"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:468,columnNumber:21},this),h.jsxDEV("input",{className:"set-input",value:vR(r.args),spellCheck:!1,onChange:C=>T("args",C.target.value),placeholder:"acp"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:469,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:467,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"HERMES_HOME"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:472,columnNumber:21},this),h.jsxDEV("input",{className:"set-input",value:r.home??"",spellCheck:!1,onChange:C=>T("home",C.target.value),placeholder:"留空 = 默认 ~/.hermes"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:473,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:471,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"profile"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:476,columnNumber:21},this),h.jsxDEV("input",{className:"set-input",value:r.profile??"",spellCheck:!1,onChange:C=>T("profile",C.target.value),placeholder:"留空 = 该 home 的默认 profile"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:477,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:475,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"额外环境"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:480,columnNumber:21},this),h.jsxDEV("textarea",{className:"set-textarea",value:typeof r.env=="string"?r.env:"",spellCheck:!1,placeholder:`每行 KEY=VALUE,例如
|
|
229
|
+
PYTHONPATH=/Users/liang/Project/hermes-agent`,onChange:C=>T("env",C.target.value)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:481,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:479,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"默认工作目录"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:488,columnNumber:21},this),h.jsxDEV("input",{className:"set-input",value:r.cwd??"",spellCheck:!1,onChange:C=>T("cwd",C.target.value),placeholder:"留空 = 新建会话时再选"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:489,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:487,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"默认权限"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:492,columnNumber:21},this),h.jsxDEV("select",{className:"set-select",value:r.defaultMode??"",onChange:C=>T("defaultMode",C.target.value),children:[h.jsxDEV("option",{value:"",children:"不指定(用 agent 自己的默认)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:498,columnNumber:23},this),ce.map(C=>h.jsxDEV("option",{value:C.id,children:C.name},C.id,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:500,columnNumber:25},this)),re?h.jsxDEV("option",{value:r.defaultMode??"",children:[r.defaultMode,"(不在缓存档位里)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:503,columnNumber:25},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:493,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:491,columnNumber:19},this),h.jsxDEV("p",{className:"set-hint be-kind-help",children:["新建会话时按这里选中,第一句话就已经按它来;会话里随时能改,",h.jsxDEV("b",{children:"恢复旧会话不会被它覆盖"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:509,columnNumber:21},this),"(那是你在那段会话里的选择)。档位来自这个后端上次的握手:",ce.length?h.jsxDEV(h.Fragment,{children:[" 现在是 ",ce.map(C=>C.name).join(" / "),"。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:511,columnNumber:25},this):h.jsxDEV(h.Fragment,{children:" 这个行还没起过会话,所以只有「不指定」——新建一个会话(不用发消息)握手一次就有了。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:512,columnNumber:25},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:507,columnNumber:19},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"备注"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:515,columnNumber:21},this),h.jsxDEV("input",{className:"set-input",value:r.notes??"",onChange:C=>T("notes",C.target.value)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:516,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:514,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:413,columnNumber:17},this),h.jsxDEV("div",{className:"be-modal-foot",children:[v?h.jsxDEV("span",{className:"set-err be-modal-err",role:"alert",children:v},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:520,columnNumber:26},this):null,h.jsxDEV("button",{className:"set-mini",onClick:P,disabled:c==="save",children:"取消"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:521,columnNumber:19},this),h.jsxDEV("button",{className:"set-save",onClick:()=>void Z(),disabled:c==="save"||!(r.id||"").trim(),children:c==="save"?"保存中…":a?"保存":"创建"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:522,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:519,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:401,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:397,columnNumber:13},this),document.body):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/BackendsPanel.tsx",lineNumber:283,columnNumber:5},this)}const bR="agentus.voice",Rd={autoRead:!1,voiceURI:"",rate:1,lang:typeof navigator<"u"&&navigator.language?navigator.language:"en-US",serverTts:!1,stt:"auto"};function s7(){try{const e=localStorage.getItem(bR);if(!e)return{...Rd};const t=JSON.parse(e),r=Number(t.rate);return{...Rd,...t,rate:Number.isFinite(r)?Math.min(2,Math.max(.5,r)):Rd.rate}}catch{return{...Rd}}}function _R(e){try{localStorage.setItem(bR,JSON.stringify(e))}catch{}}const IN={provider:"browser",tts:{server:!1,model:null,voice:null},stt:{server:!1,streaming:!1,model:null,batchModel:null,language:null},hotwords:{fixed:0,dynamic:!1,limit:0}};let hu=null;const Cy=new Set;async function Qm(e=!1){if(hu&&!e)return hu;try{const t=await fetch("/api/voice",{credentials:"same-origin"});if(!t.ok)throw new Error(String(t.status));hu=await t.json()}catch{hu=IN}for(const t of Cy)t();return hu}function pa(){return hu??IN}function a7(e){return Cy.add(e),()=>Cy.delete(e)}const bC=80,yR=220,o7=2,l7=12,c7=3,_C=2,u7=400,z_=0,h7=1,d7=4,f7=400,p7=60;let $_=0;const bd=[];async function m7(e,t,r){$_>=c7&&await new Promise((s,a)=>{const l={priority:e,run:s};bd.push(l),bd.sort((f,p)=>f.priority-p.priority);const c=()=>{const f=bd.indexOf(l);f>=0&&bd.splice(f,1),a(new as)};t&&(t.aborted?c():t.addEventListener("abort",c,{once:!0}))}),$_++;try{return await r()}finally{const s=bd.shift();s?s.run():$_--}}function yC(e,t=yR){const r=e.replace(/```[\s\S]*?```/g," code block ").replace(/[*_`#>|]/g," ").replace(/\s+/g," ").trim();if(!r)return[];const s=[];let a=r;for(;a.length>t;){const l=a.slice(0,t),c=Math.max(l.lastIndexOf(". "),l.lastIndexOf("。"),l.lastIndexOf("! "),l.lastIndexOf("? ")),f=Math.max(l.lastIndexOf(", "),l.lastIndexOf("; "),l.lastIndexOf(",")),p=c>t*.5?c+1:f>t*.5?f+1:l.lastIndexOf(" "),m=p>0?p:t;s.push(a.slice(0,m).trim()),a=a.slice(m).trim()}return a&&s.push(a),s.filter(Boolean)}let ss=null;function NR(){return window.AudioContext??window.webkitAudioContext??null}async function NC(e){const t=[e,{audio:{channelCount:1,echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1}},{audio:!0}];let r=null;for(let s=0;s<t.length;s++)try{const a=await navigator.mediaDevices.getUserMedia(t[s]);return s>0&&console.warn("[voice] microphone opened only with degraded constraints",t[s]),a}catch(a){r=a;const l=(a==null?void 0:a.name)??"";if(l==="NotAllowedError"||l==="SecurityError")throw a;await new Promise(c=>setTimeout(c,250))}throw r instanceof Error?r:new Error(String(r))}async function g7(){const e=NR();if(!e)return!1;try{return ss=ss??new e,ss.state==="suspended"&&await ss.resume(),ss.state==="running"}catch{return!1}}const Il={analyser:null};let _m=null;function v7(){const e=Il.analyser;if(!e)return-1;const t=_m&&_m.length===e.fftSize?_m:new Float32Array(new ArrayBuffer(e.fftSize*4));_m=t,e.getFloatTimeDomainData(t);let r=0;for(let s=0;s<t.length;s++)r+=t[s]*t[s];return Math.min(1,Math.sqrt(r/t.length)*4)}function b7(e){const t=Il.analyser;if(!t)return!1;const r=new Float32Array(new ArrayBuffer(t.fftSize*4));t.getFloatTimeDomainData(r);const s=Math.max(1,Math.floor(r.length/e.length));for(let a=0,l=0;a<e.length;a++,l+=s)e[a]=r[l]??0;return!0}class as extends Error{constructor(){super("stopped"),this.name="SpeechStopped"}}async function wR(e,t){const r=NR();if(r)try{ss=ss??new r,ss.state==="suspended"&&await ss.resume();const a=await ss.decodeAudioData(await e.arrayBuffer());await new Promise((l,c)=>{const f=ss.createBufferSource();f.buffer=a;const p=ss.createAnalyser();p.fftSize=512,f.connect(p),p.connect(ss.destination),Il.analyser=p,f.onended=()=>{Il.analyser===p&&(Il.analyser=null),l()};const m=()=>{Il.analyser===p&&(Il.analyser=null);try{f.stop()}catch{}c(new as)};if(t){if(t.aborted)return m();t.addEventListener("abort",m,{once:!0})}f.start()});return}catch(a){if(a instanceof as)throw a;if(t!=null&&t.aborted)throw new as}const s=URL.createObjectURL(e);try{await new Promise((a,l)=>{const c=new Audio(s),f=()=>{try{c.pause()}catch{}l(new as)};c.onended=()=>{p(),a()},c.onerror=()=>{p(),l(new Error("audio playback failed"))};const p=()=>{t&&t.removeEventListener("abort",f)};if(t){if(t.aborted)return f();t.addEventListener("abort",f,{once:!0})}c.play().catch(m=>{p(),l(new Error(String((m==null?void 0:m.message)??m)))})})}finally{URL.revokeObjectURL(s)}}function _d(){return typeof window<"u"&&"speechSynthesis"in window}var Hl,vu,Wo,bu,Wl,Ja,_u,Xn,Bl,Dy,xR,Lm,la,Ry,SR;class _7{constructor(){$t(this,Xn);$t(this,Hl,{speakingId:null,speaking:!1,error:"",note:""});$t(this,vu,new Set);$t(this,Wo,null);$t(this,bu,0);$t(this,Wl,!1);$t(this,Ja,[]);$t(this,_u,new Set);qt(this,"subscribe",t=>(ie(this,vu).add(t),()=>ie(this,vu).delete(t)));qt(this,"getSnapshot",()=>ie(this,Hl));qt(this,"subscribeVoices",t=>(ie(this,_u).add(t),()=>ie(this,_u).delete(t)));qt(this,"voices",()=>ie(this,Ja));$t(this,la,new Map)}init(){if(!_d())return;const t=()=>{const a=window.speechSynthesis.getVoices();if(a.length!==ie(this,Ja).length){We(this,Ja,a);for(const l of ie(this,_u))l()}};t(),window.speechSynthesis.addEventListener("voiceschanged",t);let r=0;const s=window.setInterval(()=>{r+=1,t(),(ie(this,Ja).length||r>40)&&window.clearInterval(s)},250);window.addEventListener("pointerdown",t,{once:!0})}pickVoice(t){const r=ie(this,Ja).length?ie(this,Ja):_d()?window.speechSynthesis.getVoices():[];if(!r.length)return null;if(t.voiceURI){const l=r.find(c=>c.voiceURI===t.voiceURI);if(l)return l}const s=t.lang.toLowerCase(),a=s.split("-")[0];return r.find(l=>l.lang.toLowerCase()===s)??r.find(l=>l.lang.toLowerCase().startsWith(a))??r.find(l=>l.default)??r[0]}async speak(t,r,s){const a=String(t??"").trim();if(!a)return;this.stop();const l=++pd(this,bu)._;We(this,Wl,!1);const c=s.serverTts&&pa().tts.server,f=yC(a,c?bC:yR);if(!f.length)return;const p=new AbortController;We(this,Wo,p),K(this,Xn,Bl).call(this,{error:"",note:"",speakingId:r,speaking:!0});try{c?await K(this,Xn,SR).call(this,f,s,p.signal):await K(this,Xn,Dy).call(this,f,s,p.signal)}catch(m){if(ie(this,Wl)||l!==ie(this,bu)||m instanceof as||(m==null?void 0:m.name)==="AbortError")return;if(s.serverTts&&_d()){K(this,Xn,Bl).call(this,{note:`服务端语音这一句失败了(${String((m==null?void 0:m.message)??m)}),已改用浏览器语音`});try{await K(this,Xn,Dy).call(this,f,s,p.signal);return}catch(v){if(ie(this,Wl)||v instanceof as)return;K(this,Xn,Bl).call(this,{error:String((v==null?void 0:v.message)??v)})}}else K(this,Xn,Bl).call(this,{error:String((m==null?void 0:m.message)??m)})}finally{ie(this,Wo)===p&&We(this,Wo,null),l===ie(this,bu)&&K(this,Xn,Bl).call(this,{speaking:!1,speakingId:null})}}prefetch(t,r){if(!(r.serverTts&&pa().tts.server))return;const s=String(t??"").trim();if(s)for(const a of yC(s,bC)){const l=K(this,Xn,Ry).call(this,a,r);if(ie(this,la).has(l))continue;const c=K(this,Xn,Lm).call(this,a,r,void 0,h7);for(c.catch(()=>{}),ie(this,la).set(l,c);ie(this,la).size>l7;){const f=ie(this,la).keys().next().value;if(f===void 0)break;ie(this,la).delete(f)}}}stop(){var t;We(this,Wl,!0),(t=ie(this,Wo))==null||t.abort(),We(this,Wo,null),_d()&&window.speechSynthesis.cancel(),ie(this,Hl).speaking&&K(this,Xn,Bl).call(this,{speaking:!1,speakingId:null})}}Hl=new WeakMap,vu=new WeakMap,Wo=new WeakMap,bu=new WeakMap,Wl=new WeakMap,Ja=new WeakMap,_u=new WeakMap,Xn=new WeakSet,Bl=function(t){We(this,Hl,{...ie(this,Hl),...t});for(const r of ie(this,vu))r()},Dy=async function(t,r,s){if(!_d())throw new Error("this browser has no speech synthesis");const a=window.speechSynthesis,l=this.pickVoice(r);for(const[c,f]of t.entries()){if(s!=null&&s.aborted)throw new as;if(await new Promise((p,m)=>{const v=new SpeechSynthesisUtterance(f);l?(v.voice=l,v.lang=l.lang):v.lang=r.lang,v.rate=r.rate,v.onend=()=>p(),v.onerror=y=>m(new Error(`speech error: ${y.error??"unknown"}`)),a.speak(v),c===0&&a.resume()}),s!=null&&s.aborted)throw new as;a.paused&&a.resume()}},xR=function(t,r,s,a){return m7(a,s,async()=>{const l=await fetch("/api/tts",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},signal:s,body:JSON.stringify({text:t,speed:r.rate})});if(!l.ok){const c=await l.json().catch(()=>({error:`${l.status}`}));throw new Error(c.error??`tts ${l.status}`)}return await l.blob()})},Lm=async function(t,r,s,a=z_){let l=null;for(let c=0;c<=_C;c++){if(s!=null&&s.aborted)throw new as;try{return await K(this,Xn,xR).call(this,t,r,s,a)}catch(f){if(f instanceof as||(f==null?void 0:f.name)==="AbortError"||s!=null&&s.aborted)throw f;l=f,c<_C&&await new Promise(p=>{window.setTimeout(p,u7*(c+1))})}}throw l instanceof Error?l:new Error(String(l))},la=new WeakMap,Ry=function(t,r){return`${r.rate}|${pa().tts.voice??""}|${t}`},SR=async function(t,r,s){const a=[],l=c=>{const f=K(this,Xn,Ry).call(this,c,r),p=ie(this,la).get(f);if(p)return ie(this,la).delete(f),p.catch(()=>K(this,Xn,Lm).call(this,c,r,s,z_));const m=K(this,Xn,Lm).call(this,c,r,s,z_);return m.catch(()=>{}),m};for(let c=0;c<t.length;c++){if(s.aborted)throw new as;for(;a.length<Math.min(o7,t.length-c);)a.push(l(t[c+a.length]));if(await wR(await a.shift(),s),s.aborted)throw new as}};const kr=new _7;kr.init();function FN(){return R.useSyncExternalStore(kr.subscribe,kr.getSnapshot)}let wC="",zN=!1;function xC(e){zN=e}function y7(){return zN}function N7(e,t,r){return zN||!t.autoRead||e===wC?!1:(wC=e,!0)}function ER(){const e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function Ay(){return!!ER()}function kR(){const e=window.AgentusMic;return e&&typeof e.start=="function"&&typeof e.stop=="function"?e:null}function CR(){const e=kR();if(!e)return!1;try{return!!e.available()}catch{return!1}}function w7(){var e;return CR()||typeof((e=navigator.mediaDevices)==null?void 0:e.getUserMedia)=="function"}function x7(){if(typeof window<"u"&&!window.isSecureContext){const e=typeof location<"u"?location.hostname:"";return`当前页面是明文 http,浏览器不允许网页录音。改用 https 入口(${e?`https://${e}:8443`:"https://<主机>:8443"})或本机 localhost;手机上也可以用 Agentus app。`}return"this browser cannot record audio"}function S7(){return new Promise(e=>{const t=document.createElement("input");t.type="file",t.accept="audio/*",t.setAttribute("capture","microphone"),t.style.position="fixed",t.style.left="-9999px";let r=!1;const s=a=>{r||(r=!0,t.remove(),e(a))};t.onchange=()=>{var a;return s(((a=t.files)==null?void 0:a[0])??null)},window.addEventListener("focus",()=>{window.setTimeout(()=>{var a;return s(((a=t.files)==null?void 0:a[0])??null)},600)},{once:!0}),document.body.appendChild(t),t.click()})}var si,yu,zs,is,Xa,rr,rs,ql,qo,Kl,Yl,Za,ca,Ko,$s,Nu,Qa,eo,to,no,Us,ua,wu,Ke,Ty,My,xu,bn,DR,RR,AR,Bm,Ad,TR,MR,Oy,Td,OR,jy,Ly,jR;class E7{constructor(){$t(this,Ke);$t(this,si,{status:"idle",text:"",interim:"",error:"",engine:null,seconds:0});$t(this,yu,new Set);$t(this,zs,null);$t(this,is,null);$t(this,Xa,[]);$t(this,rr,null);$t(this,rs,null);$t(this,ql,null);$t(this,qo,null);$t(this,Kl,null);$t(this,Yl,null);$t(this,Za,"");$t(this,ca,0);$t(this,Ko,new Float32Array(256));$t(this,$s,!0);$t(this,Nu);$t(this,Qa,!1);$t(this,eo,[]);$t(this,to,null);$t(this,no,0);$t(this,Us,"");$t(this,ua,!1);$t(this,wu,()=>{const t=globalThis.__asFeed;return t&&typeof t=="object"?t:null});qt(this,"level",()=>{const t=ie(this,wu).call(this);if(!t)return ie(this,ca);const r=Number(t.level);return Number.isFinite(r)?r:0});qt(this,"wave",()=>ie(this,Ko));qt(this,"subscribe",t=>(ie(this,yu).add(t),()=>ie(this,yu).delete(t)));$t(this,xu,null);qt(this,"getSnapshot",()=>{const t=ie(this,wu).call(this);if(!t)return ie(this,si);const r=String(t.text??""),s=String(t.interim??""),a=ie(this,xu);return a&&a.text===r&&a.interim===s&&a.status===ie(this,si).status&&a.error===ie(this,si).error&&a.engine===ie(this,si).engine&&a.seconds===ie(this,si).seconds?a:(We(this,xu,{...ie(this,si),text:r,interim:s}),ie(this,xu))})}setRelay(t){if(We(this,$s,t),!t){We(this,ua,!0),K(this,Ke,Ty).call(this);return}We(this,ua,!1),ie(this,Qa)&&K(this,Ke,Bm).call(this)}resetText(){We(this,Za,""),K(this,Ke,bn).call(this,{text:"",interim:""})}async start(t,r){if(ie(this,si).status!=="idle"&&ie(this,si).status!=="error")return!1;K(this,Ke,bn).call(this,{status:"idle",text:"",interim:"",error:"",seconds:0}),We(this,Za,"");const s=ie(this,wu).call(this);if(s)return We(this,$s,!0),K(this,Ke,bn).call(this,{status:"listening",engine:"stream",error:"",text:String(s.text??""),interim:String(s.interim??"")}),!0;const a=t.stt,l=pa().stt.server,c=pa().stt.streaming,f=(a==="browser"||a==="auto")&&Ay();try{if(a==="stream"||a==="auto"&&c){if(!c)throw new Error("streaming STT is not configured on the server (settings → 语音)");return await K(this,Ke,RR).call(this,t,r),!0}return f?(K(this,Ke,DR).call(this,t),!0):l?(await K(this,Ke,OR).call(this,t),!0):(K(this,Ke,bn).call(this,{status:"error",engine:null,error:(typeof window<"u"&&!window.isSecureContext&&!w7()?`${x7()} `:"")+(a==="server"||l?"no dictation available: this browser has no speech recognition and the server has no STT endpoint (AGENTUS_STT_BASE_URL)":"no dictation available in this browser — set the server STT endpoint or use Chromium/Edge")}),!1)}catch(p){return K(this,Ke,bn).call(this,{status:"error",error:String((p==null?void 0:p.message)??p)}),!1}}stop(){if(ie(this,si).status==="requesting"){this.cancel();return}if(ie(this,zs)){try{ie(this,zs).stop()}catch{}return}if(ie(this,rs)&&ie(this,rs).readyState===WebSocket.OPEN){We(this,ua,!0),K(this,Ke,bn).call(this,{status:"transcribing"});try{ie(this,rs).send(JSON.stringify({t:"asr-stop"}))}catch{K(this,Ke,Td).call(this);return}window.setTimeout(()=>{ie(this,si).status==="transcribing"&&K(this,Ke,Td).call(this)},8e3);return}ie(this,is)&&ie(this,is).state!=="inactive"&&ie(this,is).stop(),ie(this,rr)&&(window.clearInterval(ie(this,rr)),We(this,rr,null)),ie(this,si).status==="listening"&&K(this,Ke,bn).call(this,{status:"idle",interim:""})}cancel(){if(ie(this,zs)){try{ie(this,zs).abort()}catch{}We(this,zs,null)}ie(this,is)&&ie(this,is).state!=="inactive"&&(ie(this,is).onstop=null,ie(this,is).stop(),We(this,is,null)),ie(this,rr)&&(window.clearInterval(ie(this,rr)),We(this,rr,null)),K(this,Ke,Oy).call(this),We(this,Za,""),We(this,Xa,[]),K(this,Ke,bn).call(this,{status:"idle",text:"",interim:"",error:"",seconds:0})}consume(){const t=ie(this,si).text.trim();return K(this,Ke,bn).call(this,{status:"idle",text:"",interim:"",seconds:0}),t}}si=new WeakMap,yu=new WeakMap,zs=new WeakMap,is=new WeakMap,Xa=new WeakMap,rr=new WeakMap,rs=new WeakMap,ql=new WeakMap,qo=new WeakMap,Kl=new WeakMap,Yl=new WeakMap,Za=new WeakMap,ca=new WeakMap,Ko=new WeakMap,$s=new WeakMap,Nu=new WeakMap,Qa=new WeakMap,eo=new WeakMap,to=new WeakMap,no=new WeakMap,Us=new WeakMap,ua=new WeakMap,wu=new WeakMap,Ke=new WeakSet,Ty=function(){ie(this,to)!==null&&(window.clearTimeout(ie(this,to)),We(this,to,null));const t=ie(this,rs);if(We(this,rs,null),ie(this,eo).length=0,!!t)try{t.close()}catch{}},My=function(t){let r=0;for(let l=0;l<t.length;l++)r+=t[l]*t[l];const s=Math.min(1,Math.sqrt(r/t.length)*6);We(this,ca,s>ie(this,ca)?ie(this,ca)+(s-ie(this,ca))*.6:ie(this,ca)*.72+s*.28);const a=Math.max(1,Math.floor(t.length/ie(this,Ko).length));for(let l=0,c=0;l<ie(this,Ko).length&&c<t.length;l++,c+=a)ie(this,Ko)[l]=t[c]},xu=new WeakMap,bn=function(t){We(this,si,{...ie(this,si),...t});for(const r of ie(this,yu))r()},DR=function(t){const r=ER();if(!r)throw new Error("speech recognition unavailable");const s=new r;s.lang=t.lang,s.continuous=!0,s.interimResults=!0,s.maxAlternatives=1;let a="";s.onstart=()=>K(this,Ke,bn).call(this,{status:"listening",engine:"browser",error:""}),s.onresult=l=>{var f;let c="";for(let p=l.resultIndex;p<l.results.length;p+=1){const m=l.results[p],v=((f=m[0])==null?void 0:f.transcript)??"";m.isFinal?a+=v:c+=v}K(this,Ke,bn).call(this,{text:a.trim(),interim:c.trim()})},s.onerror=l=>{const c=String((l==null?void 0:l.error)??"unknown");K(this,Ke,bn).call(this,{status:"error",error:c==="not-allowed"||c==="service-not-allowed"?"microphone permission denied":c==="no-speech"?"heard nothing — try again closer to the microphone":`speech recognition failed: ${c}`})},s.onend=()=>{ie(this,si).status==="listening"&&K(this,Ke,bn).call(this,{status:"idle",interim:""}),We(this,zs,null)},We(this,zs,s),K(this,Ke,bn).call(this,{status:"requesting",engine:"browser"});try{s.start()}catch(l){throw We(this,zs,null),new Error(String((l==null?void 0:l.message)??l))}},RR=async function(t,r){var c;const s=CR()?kR():null;if(!s&&typeof((c=navigator.mediaDevices)==null?void 0:c.getUserMedia)!="function"){await K(this,Ke,jy).call(this,t);return}const a=window.AudioContext??window.webkitAudioContext;if(!s&&!a)throw new Error("this browser cannot process audio");K(this,Ke,bn).call(this,{status:"requesting",engine:"stream",error:""}),We(this,$s,!0),We(this,ua,!1),We(this,no,0),We(this,Us,""),We(this,Nu,r),We(this,Qa,!0),ie(this,eo).length=0,K(this,Ke,Bm).call(this);const l=f=>K(this,Ke,AR).call(this,f);s?await K(this,Ke,MR).call(this,s,l):await K(this,Ke,TR).call(this,a,l),K(this,Ke,bn).call(this,{status:"listening",engine:"stream",seconds:0}),We(this,rr,window.setInterval(()=>K(this,Ke,bn).call(this,{seconds:ie(this,si).seconds+1}),1e3))},AR=function(t){const r=ie(this,rs);r&&r.readyState===WebSocket.OPEN?r.send(t):ie(this,eo).length<p7&&ie(this,eo).push(t)},Bm=function(){if(ie(this,rs)||!ie(this,Qa))return;const t=ie(this,Nu)?`?sessionId=${encodeURIComponent(ie(this,Nu))}`:"",r=new WebSocket(`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws/asr${t}`);r.binaryType="arraybuffer",We(this,rs,r),r.onopen=()=>{We(this,no,0),We(this,Us,"");for(const s of ie(this,eo))r.send(s);ie(this,eo).length=0,ie(this,si).status!=="listening"&&K(this,Ke,bn).call(this,{status:"listening",engine:"stream",error:""})},r.onmessage=s=>{let a;try{a=JSON.parse(String(s.data))}catch{return}a.t==="asr-partial"?K(this,Ke,bn).call(this,{interim:String(a.text??"")}):a.t==="asr-final"?(We(this,Za,`${ie(this,Za)}${a.text??""}`.replace(/\s+/g," ").trim()),K(this,Ke,bn).call(this,{text:ie(this,Za),interim:""})):a.t==="asr-error"?K(this,Ke,Ad).call(this,String(a.error??"streaming asr failed")):a.t==="asr-done"&&(ie(this,ua)||!ie(this,Qa)||!ie(this,$s)?K(this,Ke,Td).call(this):K(this,Ke,Ad).call(this,"the recogniser ended the turn by itself"))},r.onerror=()=>K(this,Ke,Ad).call(this,"the streaming socket failed — is the server up?"),r.onclose=()=>{ie(this,rs)===r&&We(this,rs,null),K(this,Ke,Ad).call(this,ie(this,Us)||"the streaming socket failed — is the server up?")}},Ad=function(t){if(!(!ie(this,Qa)||ie(this,ua)||!ie(this,$s))&&(ie(this,Us)||We(this,Us,t),ie(this,to)===null)){if(ie(this,no)>=d7){K(this,Ke,bn).call(this,{status:"error",error:ie(this,Us)}),We(this,Us,""),K(this,Ke,Td).call(this);return}We(this,no,ie(this,no)+1),We(this,to,window.setTimeout(()=>{We(this,to,null),K(this,Ke,Bm).call(this)},f7*ie(this,no)))}},TR=async function(t,r){const s=await NC({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}});We(this,Kl,s);const a=new t({sampleRate:16e3});We(this,ql,a);const l=a.createMediaStreamSource(s),c=a.createScriptProcessor(2048,1,1),f=a.createGain();f.gain.value=0,We(this,qo,c),c.onaudioprocess=p=>{const m=p.inputBuffer.getChannelData(0);if(K(this,Ke,My).call(this,m),!ie(this,$s))return;const v=LR(m,a.sampleRate,16e3);v.length&&r(v.buffer)},l.connect(c),c.connect(f),f.connect(a.destination)},MR=async function(t,r){let s="permission";for(let a=0;a<12&&(s=String(t.start(16e3)),!(s==="ok"||s==="already"));a++){if(s==="permission"){K(this,Ke,bn).call(this,{status:"requesting",engine:"stream"}),await new Promise(l=>setTimeout(l,600));continue}throw new Error(`手机上的原生麦克风打不开(${s})`)}if(s!=="ok"&&s!=="already")throw new Error(`手机上的原生麦克风打不开(${s})`);We(this,Yl,t),window.__asMic=a=>{const l=atob(a),c=l.length>>1,f=new Int16Array(c);for(let m=0;m<c;m++){const v=l.charCodeAt(2*m),y=l.charCodeAt(2*m+1);f[m]=(y<<8|v)<<16>>16}const p=new Float32Array(c);for(let m=0;m<c;m++)p[m]=f[m]/32768;K(this,Ke,My).call(this,p),ie(this,$s)&&r(f.buffer)}},Oy=function(){if(K(this,Ke,Ty).call(this),We(this,Qa,!1),We(this,ua,!1),We(this,no,0),We(this,Us,""),ie(this,qo)){ie(this,qo).onaudioprocess=null;try{ie(this,qo).disconnect()}catch{}We(this,qo,null)}if(ie(this,ql)&&(ie(this,ql).close().catch(()=>{}),We(this,ql,null)),ie(this,Kl)){for(const t of ie(this,Kl).getTracks())t.stop();We(this,Kl,null)}if(ie(this,Yl)){try{ie(this,Yl).stop()}catch{}We(this,Yl,null)}window.__asMic=void 0,ie(this,rr)&&(window.clearInterval(ie(this,rr)),We(this,rr,null)),We(this,ca,0),ie(this,Ko).fill(0),We(this,$s,!0)},Td=function(){K(this,Ke,Oy).call(this),K(this,Ke,bn).call(this,{status:"idle",interim:""})},OR=async function(t){var l;if(typeof((l=navigator.mediaDevices)==null?void 0:l.getUserMedia)!="function"){await K(this,Ke,jy).call(this,t);return}K(this,Ke,bn).call(this,{status:"requesting",engine:"server",error:""});const r=await NC({audio:!0}),s=MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"",a=new MediaRecorder(r,s?{mimeType:s}:void 0);We(this,Xa,[]),a.ondataavailable=c=>{c.data.size&&ie(this,Xa).push(c.data)},a.onstop=()=>{for(const c of r.getTracks())c.stop();K(this,Ke,jR).call(this,t)},We(this,is,a),a.start(1e3),K(this,Ke,bn).call(this,{status:"recording",engine:"server",seconds:0}),We(this,rr,window.setInterval(()=>K(this,Ke,bn).call(this,{seconds:ie(this,si).seconds+1}),1e3))},jy=async function(t){K(this,Ke,bn).call(this,{status:"requesting",engine:"server",error:""});const r=await S7();if(!r){K(this,Ke,bn).call(this,{status:"idle",text:"",interim:"",error:""});return}await K(this,Ke,Ly).call(this,t,r)},Ly=async function(t,r){K(this,Ke,bn).call(this,{status:"transcribing"});try{const s=await fetch(`/api/stt?language=${encodeURIComponent(t.lang)}`,{method:"POST",credentials:"same-origin",headers:{"content-type":r.type||"audio/webm"},body:r}),a=await s.json().catch(()=>({}));if(!s.ok)throw new Error(a.error??`stt ${s.status}`);K(this,Ke,bn).call(this,{status:"idle",text:String(a.text??"").trim(),interim:""})}catch(s){K(this,Ke,bn).call(this,{status:"error",error:String((s==null?void 0:s.message)??s)})}},jR=async function(t){var s;ie(this,rr)&&(window.clearInterval(ie(this,rr)),We(this,rr,null));const r=new Blob(ie(this,Xa),{type:((s=ie(this,Xa)[0])==null?void 0:s.type)||"audio/webm"});if(We(this,Xa,[]),We(this,is,null),!r.size){K(this,Ke,bn).call(this,{status:"error",error:"nothing was recorded — check the microphone"});return}await K(this,Ke,Ly).call(this,t,r)};function LR(e,t,r){if(t===r){const c=new Int16Array(e.length);for(let f=0;f<e.length;f+=1)c[f]=SC(e[f]);return c}const s=t/r,a=Math.max(0,Math.floor(e.length/s)),l=new Int16Array(a);for(let c=0;c<a;c+=1){const f=c*s,p=Math.floor(f),m=Math.min(p+1,e.length-1),v=f-p;l[c]=SC(e[p]*(1-v)+e[m]*v)}return l}function SC(e){const t=Math.round((Number.isFinite(e)?e:0)*32767);return t>32767?32767:t<-32768?-32768:t}const Dn=new E7;function BR(){return R.useSyncExternalStore(Dn.subscribe,Dn.getSnapshot)}let ma=s7();const eg=new Set;async function PR(){try{const e=await fetch("/api/settings",{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({prefs:ma})});return e.ok?"":(await e.json().catch(()=>({}))).error??`save failed (${e.status})`}catch(e){return String((e==null?void 0:e.message)??e)}}function EC(e){const t={...Rd};if(!e||typeof e!="object")return t;const r=e;return{autoRead:typeof r.autoRead=="boolean"?r.autoRead:t.autoRead,voiceURI:typeof r.voiceURI=="string"?r.voiceURI:t.voiceURI,rate:Number.isFinite(Number(r.rate))?Math.min(2,Math.max(.5,Number(r.rate))):t.rate,lang:typeof r.lang=="string"&&r.lang?r.lang:t.lang,serverTts:typeof r.serverTts=="boolean"?r.serverTts:t.serverTts,stt:r.stt==="browser"||r.stt==="stream"||r.stt==="server"?r.stt:"auto"}}function k7(e){ma=e,_R(ma);for(const t of eg)t()}async function C7(){try{const e=await fetch("/api/settings",{credentials:"same-origin"});if(!e.ok)return;const t=await e.json(),r=EC(t.prefs),s=EC(t.prefsDefaults);if(U_.every(l=>r[l]===s[l])&&U_.some(l=>ma[l]!==r[l])){PR();return}U_.some(l=>ma[l]!==r[l])&&k7(r)}catch{}}const U_=["autoRead","voiceURI","rate","lang","serverTts","stt"];function D7(e){const t={...ma,...e},r=Number.isFinite(t.rate)?Math.min(2,Math.max(.5,t.rate)):1;ma={...t,rate:r},_R(ma);for(const s of eg)s();PR()}function R7(){return ma}function Tu(){return[R.useSyncExternalStore(t=>(eg.add(t),()=>eg.delete(t)),()=>ma),D7]}function A7(e,t){const[r]=Tu();R.useEffect(()=>{!r.autoRead||!t||!e||!e.text.trim()||N7(e.key,r)&&kr.speak(e.text,e.key,r)},[e==null?void 0:e.key,t,r.autoRead])}const yd=[{id:"account",label:"账号与安全",hint:"谁能进这台驾驶舱",items:[{anchor:"set-account",label:"账号"},{anchor:"set-sessions",label:"登录会话"},{anchor:"set-locks",label:"登录失败锁定"}]},{id:"agent",label:"智能体",hint:"槽位跑哪个后端",items:[{anchor:"set-backends",label:"后端"},{anchor:"set-lifecycle",label:"槽位空闲回收"}]},{id:"notify",label:"通知",hint:"手机上怎么收到",items:[{anchor:"set-notify",label:"手机通知(Android 伴侣)"}]},{id:"look",label:"外观",hint:"配色",items:[{anchor:"set-theme",label:"主题"}]},{id:"voice",label:"语音",hint:"怎么听、怎么说",items:[{anchor:"set-asr",label:"语音识别(ASR)"},{anchor:"set-hotwords",label:"热词"},{anchor:"set-tts",label:"语音合成(TTS)"},{anchor:"set-browser",label:"这个浏览器"}]}],T7=["#ffb454","#76bbdf","#4ec9a0","#8f7bd7","#ff6b9d"];function ym(e){return{provider:e.provider,baseUrl:e.baseUrl,asrModel:e.asrModel,asrBatchModel:e.asrBatchModel,asrStream:e.asrStream,ttsModel:e.ttsModel,ttsVoice:e.ttsVoice,ttsFormat:e.ttsFormat,dynamicHotwords:e.dynamicHotwords,hotwordLimit:e.hotwordLimit,hotwordsText:e.hotwords.join(`
|
|
230
|
+
`)}}const M7=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function O7({onClose:e,sessionId:t}){var yt,vt,un,Ye;const r=pR(),[s,a]=R.useState(null),[l,c]=R.useState(null),[f,p]=R.useState(null),[m,v]=R.useState(""),[y,x]=R.useState(IN),[N,_]=R.useState(null),[k,j]=R.useState(""),[L,P]=R.useState(""),[O,T]=R.useState(""),[B,U]=R.useState(""),[ce,re]=R.useState("Agentus 语音合成自测:龙安欢音色。"),[Z,ve]=R.useState(null),[pe,Q]=Tu(),C=BR(),[J,Y]=R.useState(null),[z,X]=R.useState(""),$=R.useCallback(async()=>{var ee;U("");try{const je=await fetch("/api/auth/me",{credentials:"same-origin"});if(je.ok){const ft=await je.json().catch(()=>({}));ft.configuredUsername&&ve({configuredUsername:ft.configuredUsername,credentialSource:ft.credentialSource??"default",minPasswordLen:ft.minPasswordLen??6,usingDefaultPassword:!!ft.usingDefaultPassword})}const ke=await fetch("/api/settings",{credentials:"same-origin"}),dt=await ke.json().catch(()=>({}));if(!ke.ok)throw new Error(dt.error??`settings ${ke.status}`);a(dt),c(ft=>ft??ym(dt)),typeof((ee=dt.agent)==null?void 0:ee.idleKillMin)=="number"&&Y(dt.agent.idleKillMin),await Qm(!0),x(pa());const[bt,sn]=await Promise.all([fetch("/api/voice/models",{credentials:"same-origin"}),fetch(`/api/voice/hotwords${t?`?sessionId=${encodeURIComponent(t)}`:""}`,{credentials:"same-origin"})]);if(bt.ok)p(await bt.json()),v("");else{const ft=await bt.json().catch(()=>({}));v(ft.error??`model list ${bt.status}`)}sn.ok&&_(await sn.json())}catch(je){U(String((je==null?void 0:je.message)??je))}},[t]);R.useEffect(()=>{$()},[$]);const xe=!!(s&&l&&!M7(l,ym(s))),Me=async()=>{if(J==null)return;const[ee,je]=(s==null?void 0:s.agentIdleRange)??[0,60],ke=Math.max(ee,Math.min(je,Math.round(J)));Y(ke),X("");try{const dt=await fetch("/api/settings",{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({agent:{idleKillMin:ke}})}),bt=await dt.json().catch(()=>({}));if(!dt.ok)throw new Error(bt.error??`save failed (${dt.status})`);a(bt),X(ke===0?"已保存:空闲槽位不再被回收。":`已保存:空闲 ${ke} 分钟后停掉 agent 进程。`)}catch(dt){X(`保存失败:${String((dt==null?void 0:dt.message)??dt)}`)}},Pe=async()=>{if(!l)return!1;P("save"),U(""),T("");try{const ee={...l,hotwords:l.hotwordsText.split(`
|
|
231
|
+
`).map(bt=>bt.trim()).filter(Boolean)};delete ee.hotwordsText,k.trim()&&(ee.apiKey=k.trim());const je=await fetch("/api/settings",{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({voice:ee})}),ke=await je.json().catch(()=>({}));if(!je.ok)throw new Error(ke.error??`save failed (${je.status})`);a(ke),c(ym(ke)),j(""),await Qm(!0),x(pa());const dt=await fetch(`/api/voice/hotwords${t?`?sessionId=${encodeURIComponent(t)}`:""}`,{credentials:"same-origin"});return dt.ok&&_(await dt.json()),T("已保存"),window.setTimeout(()=>T(""),2500),!0}catch(ee){return U(String((ee==null?void 0:ee.message)??ee)),!1}finally{P("")}},ze=async ee=>{const je=await UF(ee);je&&U(je)},ge=async()=>{if(await g7(),!(xe&&!await Pe())){P("tts"),U(""),T("");try{const ee=await fetch("/api/tts",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({text:ce,voice:l==null?void 0:l.ttsVoice})});if(!ee.ok){const ke=await ee.json().catch(()=>({}));throw new Error(ke.error??`tts ${ee.status}`)}const je=await ee.blob();await wR(je),T(`合成成功 · ${je.type||"audio"} · ${Math.round(je.size/1024)} KB`)}catch(ee){U(String((ee==null?void 0:ee.message)??ee))}finally{P("")}}},ye=()=>{U(""),Dn.start(R7(),t)},mt=async()=>{P("models"),v("");try{const ee=await fetch("/api/voice/models",{credentials:"same-origin"}),je=await ee.json().catch(()=>({}));if(!ee.ok)throw new Error(je.error??`model list ${ee.status}`);p(je),T(`endpoint 报告 ${je.total} 个模型`)}catch(ee){v(String((ee==null?void 0:ee.message)??ee))}finally{P("")}},pt=(ee,je)=>{c(ke=>ke&&{...ke,[ee]:je})},Ut=C.status==="listening"||C.status==="requesting"||C.status==="recording",Ht=R.useRef(null),[Tt,Xt]=R.useState(yd[0].id),[Et,kt]=R.useState(yd[0].items[0].anchor),$e=R.useCallback(ee=>{var ke,dt;const je=yd.find(bt=>bt.id===ee);Xt(ee),kt(((ke=je==null?void 0:je.items[0])==null?void 0:ke.anchor)??""),(dt=Ht.current)==null||dt.scrollTo({top:0,behavior:"auto"})},[]),nt=R.useCallback(ee=>{var je;(je=document.getElementById(ee))==null||je.scrollIntoView({block:"start",behavior:"smooth"}),kt(ee)},[]);return R.useEffect(()=>{var dt;const ee=Ht.current;if(!ee)return;const je=(((dt=yd.find(bt=>bt.id===Tt))==null?void 0:dt.items)??[]).map(bt=>bt.anchor);if(!je.length)return;const ke=()=>{const bt=ee.getBoundingClientRect().top;let sn=je[0];for(const ft of je){const Se=document.getElementById(ft);Se&&Se.getBoundingClientRect().height>0&&Se.getBoundingClientRect().top-bt<=32&&(sn=ft)}ee.scrollTop+ee.clientHeight>=ee.scrollHeight-4&&(sn=je[je.length-1]),kt(ft=>ft===sn?ft:sn)};return ee.addEventListener("scroll",ke,{passive:!0}),ke(),()=>ee.removeEventListener("scroll",ke)},[Tt]),h.jsxDEV("div",{className:"main",children:[h.jsxDEV("div",{className:"chat-head set-head",children:[h.jsxDEV("button",{className:"icon-btn",onClick:e,title:"返回会话","aria-label":"back",children:h.jsxDEV(PN,{size:16},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:380,columnNumber:87},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:380,columnNumber:9},this),h.jsxDEV("span",{className:"title",children:[h.jsxDEV(rf,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:381,columnNumber:33},this)," 设置"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:381,columnNumber:9},this),h.jsxDEV("span",{className:"head-spacer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:382,columnNumber:9},this),O?h.jsxDEV("span",{className:"set-toast",children:O},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:383,columnNumber:16},this):null,h.jsxDEV("button",{className:"set-save",onClick:()=>void Pe(),disabled:L==="save"||!xe,children:L==="save"?"保存中…":xe?"保存":"已保存"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:384,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:379,columnNumber:7},this),h.jsxDEV("div",{className:"set-main",children:[h.jsxDEV("nav",{className:"set-nav","aria-label":"设置分类",children:yd.map(ee=>h.jsxDEV("div",{className:"set-nav-group",children:[h.jsxDEV("button",{type:"button",className:`set-nav-cat ${Tt===ee.id?"on":""}`,"aria-current":Tt===ee.id?"page":void 0,onClick:()=>$e(ee.id),title:ee.hint,children:ee.label},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:392,columnNumber:15},this),Tt===ee.id?ee.items.map(je=>h.jsxDEV("button",{type:"button",className:`set-nav-item ${Et===je.anchor?"on":""}`,"aria-current":Et===je.anchor?"true":void 0,onClick:()=>nt(je.anchor),children:je.label},je.anchor,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:405,columnNumber:21},this)):null]},ee.id,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:391,columnNumber:13},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:389,columnNumber:9},this),h.jsxDEV("div",{className:"set-body",ref:Ht,"data-cat":Tt,"data-set-scroll":!0,children:[B?h.jsxDEV("div",{className:"set-err",role:"alert",children:[B,h.jsxDEV("button",{className:"draft-x",onClick:()=>U(""),"aria-label":"dismiss",children:h.jsxDEV(va,{size:11},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:423,columnNumber:89},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:423,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:421,columnNumber:11},this):null,h.jsxDEV("h4",{className:"set-group",id:"grp-account","data-setgroup":"account",children:"账号与安全"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:427,columnNumber:9},this),h.jsxDEV(GF,{account:Z,onChanged:ee=>ve(je=>je&&{...je,...ee})},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:429,columnNumber:9},this),h.jsxDEV("h4",{className:"set-group",id:"grp-agent","data-setgroup":"agent",children:"智能体"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:434,columnNumber:9},this),h.jsxDEV(r7,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:436,columnNumber:9},this),h.jsxDEV("h4",{className:"set-group",id:"grp-notify","data-setgroup":"notify",children:"通知"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:438,columnNumber:9},this),h.jsxDEV(ZF,{sessionId:t},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:440,columnNumber:9},this),h.jsxDEV("h4",{className:"set-group",id:"grp-look","data-setgroup":"look",children:"外观"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:442,columnNumber:9},this),h.jsxDEV("section",{className:"set-card",id:"set-theme","data-setgroup":"look",children:[h.jsxDEV("h3",{children:"主题"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:445,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:"亮/暗跟随系统;强调色会重新给整套驾驶舱上色(按钮、链接、流式光标、用量环)。 选择存在服务端,换一台设备也一致。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:446,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"外观"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:451,columnNumber:13},this),h.jsxDEV("div",{className:"set-seg",role:"group","aria-label":"theme mode",children:[["system","跟随系统"],["light","亮"],["dark","暗"]].map(([ee,je])=>h.jsxDEV("button",{type:"button",className:r.mode===ee?"on":"","aria-pressed":r.mode===ee,onClick:()=>void ze({...r,mode:ee}),children:je},ee,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:454,columnNumber:17},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:452,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:450,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"强调色"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:467,columnNumber:13},this),h.jsxDEV("div",{className:"set-swatches",children:[T7.map(ee=>h.jsxDEV("button",{type:"button",className:`set-swatch ${r.accent===ee?"on":""}`,style:{background:ee},title:ee,"aria-label":`accent ${ee}`,onClick:()=>void ze({...r,accent:ee})},ee,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:470,columnNumber:17},this)),h.jsxDEV("input",{type:"color",className:"set-color",value:r.accent||"#ffb454",onChange:ee=>void ze({...r,accent:ee.target.value}),"aria-label":"custom accent"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:480,columnNumber:15},this),h.jsxDEV("button",{type:"button",className:"set-mini",onClick:()=>void ze({...r,accent:""}),children:"默认"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:487,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:468,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:466,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:444,columnNumber:9},this),h.jsxDEV("h4",{className:"set-group",id:"grp-voice","data-setgroup":"voice",children:"语音"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:492,columnNumber:9},this),h.jsxDEV("section",{className:"set-card",id:"set-lifecycle","data-setgroup":"agent",children:[h.jsxDEV("h3",{children:"槽位空闲回收"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:496,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:["空闲超过这个时长后,自动停掉槽位的 ",h.jsxDEV("b",{children:"agent 进程"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:498,columnNumber:31},this)," 以释放内存 —— 对话记录、模型、思考深度全都 保留,点一下该槽位就会重新起来(状态显示「已回收(空闲)」)。这是「回收进程」,不是「归档会话」: 归档只在你手动点击时发生,两者互不影响。数值对齐 AionUi 的「Agent 空闲超时」,",h.jsxDEV("b",{children:"0 = 关闭"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:500,columnNumber:59},this),"。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:497,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"Agent 空闲超时(分钟)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:503,columnNumber:13},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("input",{className:"set-num",type:"number",min:((yt=s==null?void 0:s.agentIdleRange)==null?void 0:yt[0])??0,max:((vt=s==null?void 0:s.agentIdleRange)==null?void 0:vt[1])??60,step:5,value:J??((un=s==null?void 0:s.agentDefaults)==null?void 0:un.idleKillMin)??5,onChange:ee=>Y(Number(ee.target.value)),onBlur:()=>void Me()},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:505,columnNumber:15},this),h.jsxDEV("span",{className:"set-hint",children:J===0?"已关闭:空闲的槽位不会被回收(长跑任务可以这么做)":`空闲 ${J??((Ye=s==null?void 0:s.agentDefaults)==null?void 0:Ye.idleKillMin)??5} 分钟后回收`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:515,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:504,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:502,columnNumber:11},this),z?h.jsxDEV("p",{className:"set-hint",children:z},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:522,columnNumber:22},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:495,columnNumber:9},this),h.jsxDEV("section",{className:"set-card",id:"set-asr","data-setgroup":"voice",children:[h.jsxDEV("h3",{children:"语音识别(ASR)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:526,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:["当前生效:",h.jsxDEV("b",{children:y.provider},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:528,columnNumber:18},this),y.stt.streaming?" · 流式":"",y.stt.server?` · ${y.stt.streaming?y.stt.model:y.stt.batchModel}`:" · 未配置(只能用浏览器自带识别)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:527,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"提供方"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:533,columnNumber:13},this),h.jsxDEV("select",{className:"set-select",value:(l==null?void 0:l.provider)??"browser",onChange:ee=>pt("provider",ee.target.value),children:[h.jsxDEV("option",{value:"dashscope",children:"阿里百炼(DashScope,本文档默认)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:539,columnNumber:15},this),h.jsxDEV("option",{value:"openai",children:"OpenAI 兼容端点"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:540,columnNumber:15},this),h.jsxDEV("option",{value:"browser",children:"浏览器自带(不经过服务端)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:541,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:534,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:532,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"端点"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:545,columnNumber:13},this),h.jsxDEV("input",{className:"set-input",placeholder:"https://llm-xxxx.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",value:(l==null?void 0:l.baseUrl)??"",onChange:ee=>pt("baseUrl",ee.target.value),spellCheck:!1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:546,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:544,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"API Key"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:555,columnNumber:13},this),h.jsxDEV("input",{className:"set-input",type:"password",placeholder:s!=null&&s.apiKeySet?`已保存 ${s.apiKeyMasked}(留空不改)`:"sk-…",value:k,onChange:ee=>j(ee.target.value),spellCheck:!1,autoComplete:"off"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:556,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:554,columnNumber:11},this),s!=null&&s.apiKeySource?h.jsxDEV("p",{className:"set-hint",children:["密钥来自环境:",h.jsxDEV("code",{children:s.apiKeySource},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:567,columnNumber:44},this),"(",h.jsxDEV("code",{children:"DASHSCOPE_API_KEY"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:567,columnNumber:77},this)," / ",h.jsxDEV("code",{children:"DASHSCOPE_BASE_URL"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:567,columnNumber:110},this),")"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:567,columnNumber:13},this):null,h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"流式模型"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:570,columnNumber:13},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("input",{className:"set-input",list:"asr-models",value:(l==null?void 0:l.asrModel)??"",onChange:ee=>pt("asrModel",ee.target.value),spellCheck:!1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:572,columnNumber:15},this),h.jsxDEV("label",{className:"set-check",children:[h.jsxDEV("input",{type:"checkbox",checked:!!(l!=null&&l.asrStream),onChange:ee=>pt("asrStream",ee.target.checked)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:574,columnNumber:17},this),"启用流式(边说边出字)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:573,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:571,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:569,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"批量模型"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:580,columnNumber:13},this),h.jsxDEV("input",{className:"set-input",list:"asr-models",value:(l==null?void 0:l.asrBatchModel)??"",onChange:ee=>pt("asrBatchModel",ee.target.value),spellCheck:!1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:581,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:579,columnNumber:11},this),h.jsxDEV("datalist",{id:"asr-models",children:((f==null?void 0:f.asr)??[]).map(ee=>h.jsxDEV("option",{value:ee},ee,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:584,columnNumber:45},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:583,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:[m?`无法读取端点模型列表:${m}`:f?`端点报告 ${f.total} 个模型,其中识别类 ${f.asr.length} 个(上面可直接选,也可以手填任意 id)`:"正在读取端点模型列表…",h.jsxDEV("button",{className:"set-mini",onClick:()=>void mt(),disabled:L==="models",children:[h.jsxDEV(Xd,{size:11},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:593,columnNumber:15},this)," 重新读取"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:592,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:586,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:525,columnNumber:9},this),h.jsxDEV("section",{className:"set-card",id:"set-hotwords","data-setgroup":"voice",children:[h.jsxDEV("h3",{children:"热词"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:600,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:["固定热词每行一个,可写 ",h.jsxDEV("code",{children:"词=权重"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:602,columnNumber:25},this),"(1–5,",h.jsxDEV("code",{children:"50"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:602,columnNumber:47},this)," 是超级热词); 动态热词从当前会话的上下文里自动抽取高频实体词,一起送进识别。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:601,columnNumber:11},this),h.jsxDEV("textarea",{className:"set-textarea",rows:5,placeholder:`Agentus=5
|
|
232
|
+
ACP
|
|
233
|
+
qodercli`,value:(l==null?void 0:l.hotwordsText)??"",onChange:ee=>pt("hotwordsText",ee.target.value),spellCheck:!1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:605,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"动态热词"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:614,columnNumber:13},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("label",{className:"set-check",children:[h.jsxDEV("input",{type:"checkbox",checked:!!(l!=null&&l.dynamicHotwords),onChange:ee=>pt("dynamicHotwords",ee.target.checked)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:617,columnNumber:17},this),"从上下文抽取"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:616,columnNumber:15},this),h.jsxDEV("label",{className:"set-check",children:["上限",h.jsxDEV("input",{className:"set-num",type:"number",min:0,max:200,value:(l==null?void 0:l.hotwordLimit)??30,onChange:ee=>pt("hotwordLimit",Number(ee.target.value))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:622,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:620,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:615,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:613,columnNumber:11},this),h.jsxDEV("div",{className:"set-hot",children:[h.jsxDEV("span",{className:"set-hot-title",children:N?`下次识别携带 ${N.words.length} 个热词(固定 ${N.fixed} / 动态 ${N.dynamic})`:"…"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:634,columnNumber:13},this),h.jsxDEV("div",{className:"set-hot-list",children:[((N==null?void 0:N.words)??[]).slice(0,40).map(ee=>h.jsxDEV("span",{className:`set-chip ${ee.origin}`,title:`${ee.origin} · 权重 ${ee.weight}`,children:[ee.word,ee.weight>=5?h.jsxDEV("b",{children:ee.weight===50?"50":ee.weight},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:639,columnNumber:36},this):null]},`${ee.origin}-${ee.word}`,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:637,columnNumber:17},this)),N&&!N.words.length?h.jsxDEV("span",{className:"set-hint",children:"还没有热词:写几个固定词,或先聊两句再回来看动态抽取。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:642,columnNumber:43},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:635,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:633,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:599,columnNumber:9},this),h.jsxDEV("section",{className:"set-card",id:"set-tts","data-setgroup":"voice",children:[h.jsxDEV("h3",{children:"语音合成(TTS)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:649,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:["走百炼的 ",h.jsxDEV("code",{children:"SpeechSynthesizer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:651,columnNumber:18},this),"(合成结果由服务端取回,密钥不出服务端)。 朗读按钮仍可在下面选择走浏览器自带声音。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:650,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"模型"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:655,columnNumber:13},this),h.jsxDEV("input",{className:"set-input",list:"tts-models",value:(l==null?void 0:l.ttsModel)??"",onChange:ee=>pt("ttsModel",ee.target.value),spellCheck:!1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:656,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:654,columnNumber:11},this),h.jsxDEV("datalist",{id:"tts-models",children:((f==null?void 0:f.tts)??[]).map(ee=>h.jsxDEV("option",{value:ee},ee,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:659,columnNumber:45},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:658,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"音色"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:662,columnNumber:13},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("input",{className:"set-input",list:"tts-voices",value:(l==null?void 0:l.ttsVoice)??"",onChange:ee=>pt("ttsVoice",ee.target.value),spellCheck:!1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:664,columnNumber:15},this),h.jsxDEV("select",{className:"set-select",value:(l==null?void 0:l.ttsFormat)??"wav",onChange:ee=>pt("ttsFormat",ee.target.value),children:[h.jsxDEV("option",{value:"wav",children:"wav"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:666,columnNumber:17},this),h.jsxDEV("option",{value:"mp3",children:"mp3"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:667,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:665,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:663,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:661,columnNumber:11},this),h.jsxDEV("datalist",{id:"tts-voices",children:((s==null?void 0:s.ttsVoices)??[]).map(ee=>h.jsxDEV("option",{value:ee},ee,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:672,columnNumber:49},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:671,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:["默认 ",h.jsxDEV("code",{children:"longanhuan_v3.6"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:674,columnNumber:38},this)," = 龙安欢。系统音色还有 loongjielidou / loongeva / loongjohn,手填任意音色 id 也可以。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:674,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"试听"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:676,columnNumber:13},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("input",{className:"set-input",value:ce,onChange:ee=>re(ee.target.value)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:678,columnNumber:15},this),h.jsxDEV("button",{className:"set-mini",onClick:()=>void ge(),disabled:L==="tts",children:[h.jsxDEV(pg,{size:12},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:680,columnNumber:17},this)," ",L==="tts"?"合成中…":"合成并播放"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:679,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:677,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:675,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:"试听使用已保存的配置(有未保存修改会先保存)。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:684,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:648,columnNumber:9},this),h.jsxDEV("section",{className:"set-card",id:"set-browser","data-setgroup":"voice",children:[h.jsxDEV("h3",{children:"这个浏览器"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:689,columnNumber:11},this),h.jsxDEV("p",{className:"set-hint",children:"听写引擎与朗读声音是本机设置:手机和电脑的麦克风/声音本来就不一样。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:690,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"听写引擎"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:692,columnNumber:13},this),h.jsxDEV("select",{className:"set-select",value:pe.stt,onChange:ee=>Q({stt:ee.target.value}),children:[h.jsxDEV("option",{value:"auto",children:"自动(优先服务端流式)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:698,columnNumber:15},this),h.jsxDEV("option",{value:"stream",children:"服务端流式(百炼,带热词)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:699,columnNumber:15},this),h.jsxDEV("option",{value:"browser",children:"浏览器自带"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:700,columnNumber:15},this),h.jsxDEV("option",{value:"server",children:"服务端批量上传"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:701,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:693,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:691,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"测试识别"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:705,columnNumber:13},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("button",{className:"set-mini",onClick:ye,disabled:Ut||C.status==="transcribing",children:[h.jsxDEV(Jd,{size:12},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:708,columnNumber:17},this)," 开麦说一句"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:707,columnNumber:15},this),Ut||C.status==="transcribing"?h.jsxDEV("button",{className:"set-mini",onClick:()=>Dn.stop(),children:[h.jsxDEV(sR,{size:11},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:711,columnNumber:79},this)," 停止"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:711,columnNumber:17},this):null,h.jsxDEV("span",{className:`dict-chip ${C.error?"err":""}`,style:{margin:0},children:C.error?C.error:C.status==="requesting"?"等待麦克风…":C.status==="transcribing"?"收尾中…":`${C.text}${C.interim?` ${C.interim}`:""}${C.engine?` · ${C.engine}`:""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:713,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:706,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:704,columnNumber:11},this),h.jsxDEV("div",{className:"set-row",children:[h.jsxDEV("label",{children:"朗读"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:725,columnNumber:13},this),h.jsxDEV("div",{className:"set-pair",children:[h.jsxDEV("label",{className:"set-check",children:[h.jsxDEV("input",{type:"checkbox",checked:pe.autoRead,onChange:ee=>Q({autoRead:ee.target.checked})},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:728,columnNumber:17},this),"回复完成自动朗读"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:727,columnNumber:15},this),h.jsxDEV("label",{className:"set-check",children:[h.jsxDEV("input",{type:"checkbox",checked:pe.serverTts,onChange:ee=>Q({serverTts:ee.target.checked})},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:732,columnNumber:17},this),"用服务端声音(否则用系统声音)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:731,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:726,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:724,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:688,columnNumber:9},this),h.jsxDEV("div",{className:"set-actions",children:[h.jsxDEV("button",{className:"set-save",onClick:()=>void Pe(),disabled:L==="save"||!xe,children:L==="save"?"保存中…":"保存"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:740,columnNumber:11},this),xe?h.jsxDEV("button",{className:"set-mini",onClick:()=>c(s?ym(s):null),children:"撤销修改"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:743,columnNumber:20},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:739,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:419,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:388,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/SettingsPage.tsx",lineNumber:378,columnNumber:5},this)}const Cu=e=>String(e).padStart(2,"0"),j7=["周日","周一","周二","周三","周四","周五","周六"];function ao(e){const t=new Date(e);return`${Cu(t.getHours())}:${Cu(t.getMinutes())}`}function ec(e){const t=new Date(e);return`${t.getFullYear()}-${Cu(t.getMonth()+1)}-${Cu(t.getDate())} ${ao(e)}`}function VR(e,t){const r=new Date(e),s=new Date(t),a=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime(),l=new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime();return Math.round((l-a)/864e5)}function By(e,t=Date.now()){const r=new Date(e),s=VR(e,t);return s<=0?ao(e):s===1?`昨天 ${ao(e)}`:r.getFullYear()===new Date(t).getFullYear()?`${r.getMonth()+1}月${r.getDate()}日 ${ao(e)}`:ec(e)}function L7(e,t=Date.now()){const r=Math.floor((t-e)/1e3);if(r<0)return ao(e);if(r<45)return"刚刚";if(r<3600)return`${Math.max(1,Math.floor(r/60))} 分钟前`;const s=new Date(e),a=VR(e,t);return a<=0?ao(e):a===1?"昨天":a<7?j7[s.getDay()]:s.getFullYear()===new Date(t).getFullYear()?`${s.getMonth()+1}月${s.getDate()}日`:`${s.getFullYear()}-${Cu(s.getMonth()+1)}-${Cu(s.getDate())}`}const B7=6e4;function IR(e){const t=Math.round(Math.max(0,e)/1e3);return t<60?`${t} 秒`:`${Math.floor(t/60)} 分 ${t%60} 秒`}function P7(e,t){const r=Math.max(0,t-e),s=r>=B7;return{quiet:s,gapMs:r,said:s?`agent 已经 ${IR(r)} 没有输出了 —— 回合还在跑,可以点下面的停止`:"agent 正在工作(有输出就会重置这个计时)"}}const V7={hermes:{letter:"H",label:"Hermes",icon:"/coding-agents/hermes.png"},qoder:{letter:"Q",label:"Qoder",icon:"/coding-agents/qoder.svg"},mock:{letter:"M",label:"Mock"}};function $N(e){return V7[e]??{letter:e.slice(0,1).toUpperCase(),label:e}}function I7(e,t){const r=[],s=/(\*\*[^*]+\*\*|`[^`]+`|\[[^\]]+\]\([^)]+\))/g;let a=0,l,c=0;for(;l=s.exec(e);){l.index>a&&r.push(e.slice(a,l.index));const f=l[0],p=`${t}-i${c++}`;if(f.startsWith("**"))r.push(h.jsxDEV("strong",{children:f.slice(2,-2)},p,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/MiniMarkdown.tsx",lineNumber:16,columnNumber:42},this));else if(f.startsWith("`"))r.push(h.jsxDEV("code",{className:"inline",children:f.slice(1,-1)},p,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/MiniMarkdown.tsx",lineNumber:17,columnNumber:46},this));else{const m=/\[([^\]]+)\]\(([^)]+)\)/.exec(f);r.push(h.jsxDEV("a",{href:m[2],target:"_blank",rel:"noreferrer",children:m[1]},p,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/MiniMarkdown.tsx",lineNumber:20,columnNumber:18},this))}a=l.index+f.length}return a<e.length&&r.push(e.slice(a)),r}function F7({text:e}){const t=e.split(/```/);return h.jsxDEV(h.Fragment,{children:t.map((r,s)=>s%2===1?h.jsxDEV("pre",{className:"code",children:h.jsxDEV("code",{children:r.replace(/^[a-z]*\n/,"").replace(/\n$/,"")},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/MiniMarkdown.tsx",lineNumber:34,columnNumber:43},this)},s,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/MiniMarkdown.tsx",lineNumber:34,columnNumber:11},this):h.jsxDEV(R.Fragment,{children:I7(r,`p${s}`)},s,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/MiniMarkdown.tsx",lineNumber:36,columnNumber:11},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/MiniMarkdown.tsx",lineNumber:31,columnNumber:5},this)}const kC=12,z7=80;function $7(e){const t=[],r=/[^。!?!?\n…]*[。!?!?\n…]+/g;let s=0;for(const f of e.matchAll(r)){const p=f[0].trim();p&&t.push(p),s=(f.index??0)+f[0].length}const a=[];for(const f of t){const p=a[a.length-1];p!==void 0&&p.length<kC&&p.length+f.length<=z7?a[a.length-1]=`${p} ${f}`:a.push(f)}const l=[],c=a[a.length-1];return c!==void 0&&c.length<kC&&l.push(a.pop()),{done:a,tail:[...l,e.slice(s).trim()].filter(Boolean).join(" ")}}const sf={interruptMode:"voice",bargeSensitivity:60,bargeMs:300,silenceMs:1200,minChars:3},FR=[{id:"voice",label:"语音打断",hint:"说一句就能打断它(灵敏度、持续时间在设置里调)"},{id:"button",label:"按键打断",hint:"只有点圆球才打断——外放串音、环境吵的时候用它"}],tg={bargeSensitivity:[0,100],bargeMs:[100,1e3],silenceMs:[400,4e3],minChars:[1,20]},U7=[{key:"bargeSensitivity",label:"抢话灵敏度",show:e=>`${Math.round(e)}%`,ends:["迟钝","灵敏"],hint:"越高越容易打断它(100% 最灵敏)。手机外放容易串音,串音频繁就调低一点"},{key:"bargeMs",label:"抢话持续时间",show:e=>e>=1e3?`${(e/1e3).toFixed(1)} 秒`:`${e} 毫秒`,ends:["快","稳"],hint:"要连续这么大声才算抢话"},{key:"silenceMs",label:"说完停顿",show:e=>`${(e/1e3).toFixed(1)} 秒`,ends:["快","慢"],hint:"静音这么久就算你说完了,自动把话发出去"},{key:"minChars",label:"最少字数",show:e=>e<=1?"不限制":`${e} 字`,ends:["1","20"],hint:"自动发送时少于这个字数不发送(1 = 不限制);点一下圆球是明确指令,照发。默认 3 字,挡掉语气词和噪音"}];function H7(e){return .5-.45*(Math.min(100,Math.max(0,Number(e)))/100)}const zR="agentus.call",W7=Object.keys(tg);function q7(e,t){const[r,s]=tg[e],a=Number(t);return Number.isFinite(a)?Math.min(s,Math.max(r,a)):sf[e]}function UN(e){const t={...sf};if(!e||typeof e!="object")return t;const r=e;FR.some(s=>s.id===r.interruptMode)&&(t.interruptMode=r.interruptMode);for(const s of W7)s in r&&(t[s]=q7(s,r[s]));return t}function K7(){try{return UN(JSON.parse(localStorage.getItem(zR)??"null"))}catch{return{...sf}}}let Zd=K7();const Py=new Set;function $R(e){Zd=e;try{localStorage.setItem(zR,JSON.stringify(Zd))}catch{}for(const t of Py)t()}async function UR(e){const t=UN({...Zd,...e});$R(t);try{const r=await fetch("/api/settings",{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({call:t})});return r.ok?(HR((await r.json()).call),""):(await r.json().catch(()=>({}))).error??`save failed (${r.status})`}catch(r){return String((r==null?void 0:r.message)??r)}}function HR(e){const t=UN(e);Object.keys(sf).every(r=>t[r]===Zd[r])||$R(t)}async function Y7(){try{const e=await fetch("/api/settings",{credentials:"same-origin"});if(!e.ok)return;HR((await e.json()).call)}catch{}}function G7(){return[R.useSyncExternalStore(t=>(Py.add(t),()=>Py.delete(t)),()=>Zd),t=>void UR(t)]}const J7={connecting:{core:[125,145,200],glow:"rgba(125,145,200,0.30)"},listening:{core:[56,189,248],glow:"rgba(56,189,248,0.34)"},thinking:{core:[167,139,250],glow:"rgba(167,139,250,0.30)"},speaking:{core:[251,191,36],glow:"rgba(251,191,36,0.32)"},error:{core:[248,113,113],glow:"rgba(248,113,113,0.30)"}},H_={connecting:"正在接通…",listening:"在听你说",thinking:"思考中…",speaking:"正在回答",error:"出错了"},X7=.06,CC=120,Z7=/^(?:Stopped waiting for another Hermes process on this session\. Your message was not processed\.|⏳? ?Another Hermes process kept this session busy too long[\s\S]*not processed[\s\S]*)$/;function DC(e){return[...e].length}const Q7=1,ez=R.memo(function({kind:t,who:r,text:s,current:a}){return s.trim()?h.jsxDEV("div",{className:`call-hm ${t}${a?" current":""}`,children:[r?h.jsxDEV("span",{className:"call-hm-who",children:r},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:95,columnNumber:14},this):null,t==="agent"||t==="user"?h.jsxDEV(F7,{text:s},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:96,columnNumber:46},this):h.jsxDEV("span",{children:s},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:96,columnNumber:77},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:94,columnNumber:5},this):null});function RC(e){switch(e.kind){case"user":return{kind:"user",who:"你",text:e.text};case"agent":return{kind:"agent",who:"它",text:e.text};case"meta":return{kind:"meta",who:"",text:e.text};case"tool":return{kind:"tool",who:"",text:`${e.title||e.kind2||"工具"}${e.status?` · ${e.status}`:""}`};case"plan":return{kind:"tool",who:"",text:`计划:${e.items.map(t=>t.content).join(";")}`};case"thought":return{kind:"tool",who:"",text:e.text}}}function tz({sessionId:e,onClose:t,onKeyboard:r}){var Wt,le;const[s]=Tu(),a=FN(),[l,c]=R.useState("connecting"),[f,p]=R.useState(!1),[m,v]=R.useState(""),[y,x]=R.useState(""),[N,_]=R.useState(""),[k]=G7(),[j,L]=R.useState(!1),[P,O]=R.useState(!1),[T,B]=R.useState(!0),U=R.useRef(null),[ce,re]=R.useState(""),Z=R.useRef(k);Z.current=k;const ve=G=>{UR(G).then(re)},pe=R.useRef(null),Q=R.useRef(null),C=R.useRef("connecting");C.current=l;const J=R.useRef(0),Y=R.useRef([]),z=R.useRef(0),X=R.useRef(0),$=R.useRef(0),xe=R.useRef(!1),Me=R.useRef([]),Pe=R.useRef(!1),ze=R.useRef(0),ge=R.useRef(""),ye=R.useRef(""),mt=R.useRef(""),pt=R.useRef(!0),Ut=R.useRef(!1);Ut.current=f;const Ht=R.useSyncExternalStore(Qe.subscribe,Qe.getSnapshot),Tt=R.useMemo(()=>{var G;return typeof window<"u"&&((G=window.matchMedia)==null?void 0:G.call(window,"(prefers-reduced-motion: reduce)").matches)},[]);R.useEffect(()=>{let G=!1;xC(!0);const Ee=Fe=>{fetch("/api/notify/presence",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:Fe?e:null,visible:Fe,call:Fe})}).catch(()=>{})};return Ee(!0),(async()=>{var Fe;try{const ot=Qe.getSnapshot(),Kt=((Fe=ot.active)==null?void 0:Fe.info.id)===e?ot.active:void 0;if(Kt!=null&&Kt.busy){if(G)return;xe.current=!0,ge.current="",c("thinking");return}const Cn=[...(Kt==null?void 0:Kt.msgs)??[]].reverse().find(jn=>jn.kind==="agent");ye.current=(Cn==null?void 0:Cn.key)??"",Dn.stop();const rt=await Dn.start(s,e);if(G)return;if(!rt)throw new Error(Dn.getSnapshot().error||"无法打开麦克风");c("listening")}catch(ot){if(G)return;v(String((ot==null?void 0:ot.message)??ot)),c("error")}})(),()=>{G=!0,pt.current=!1,kr.stop(),Dn.stop(),xC(!1),Ee(!1)}},[]),R.useEffect(()=>{const G=window.setInterval(()=>{const Ee=Z.current,me=Dn.getSnapshot(),Fe=Dn.level();if(me.error&&C.current==="listening"){v(me.error),c("error");return}if(Fe>X7&&(X.current=Date.now()),C.current==="listening"){x((me.text+(me.interim?` ${me.interim}`:"")).trim());const ot=(me.text||me.interim).trim(),Kt=Date.now()-X.current;ot&&!Ut.current&&DC(ot)>=Ee.minChars&&Kt>Ee.silenceMs&&!xe.current&&(xe.current=!0,c("thinking"),x(ot),v(""),ye.current=mt.current,Dn.setRelay(!1),Qe.send({t:"prompt",sessionId:e,text:ot,interrupt:!0}))}else if(C.current==="speaking"){const ot=Ee.interruptMode==="voice"&&Fe>H7(Ee.bargeSensitivity);$.current=ot?$.current+CC:0,$.current>=Ee.bargeMs&&($.current=0,dt())}else $.current=0},CC);return()=>window.clearInterval(G)},[e]);const Xt=((Wt=Ht.active)==null?void 0:Wt.info.id)===e?Ht.active:void 0,Et=(Xt==null?void 0:Xt.msgs)??[],kt=Et.map(G=>G.kind),$e=kt.lastIndexOf("user"),nt=kt.lastIndexOf("agent");mt.current=nt>=0?Et[nt].key??"":"";const yt=nt>$e?Et[nt]:void 0,vt=(yt==null?void 0:yt.kind)==="agent"?yt.text:"",un=(yt==null?void 0:yt.key)??"",Ye=kt.lastIndexOf("meta"),ee=Ye>$e&&((le=Et[Ye])==null?void 0:le.kind)==="meta"?Et[Ye].text:"",je=!!(Xt!=null&&Xt.busy),ke=()=>{for(const G of Me.current.slice(0,Q7))kr.prefetch(G,s)};R.useEffect(()=>{if(C.current!=="thinking"&&C.current!=="speaking"||!un||un===ye.current)return;if(Z7.test(vt.trim())){v("刚才那句没被处理(这个会话正被另一个 Hermes 进程占用),再说一次即可。"),bt();return}un!==ge.current&&(ge.current=un,ze.current=0,Me.current=[]);const{done:G,tail:Ee}=$7(vt),me=G.slice(ze.current);me.length&&(ze.current=G.length,Me.current.push(...me),_(Fe=>`${Fe}${Fe?" ":""}${me.join(" ")}`),C.current==="thinking"&&c("speaking"),ke()),!je&&Ee&&ze.current>=G.length&&(ze.current=G.length+1,Me.current.push(Ee),_(Fe=>`${Fe}${Fe?" ":""}${Ee}`)),!je&&C.current==="thinking"&&!Me.current.length&&G.length===0&&!Ee&&(ee&&v(ee),bt())},[vt,un,je,ee]),R.useEffect(()=>{C.current!=="speaking"||Pe.current||(Pe.current=!0,(async()=>{for(;pt.current&&Me.current.length&&C.current!=="error";){const G=Me.current.shift();if(ke(),await kr.speak(G,"call",s),!pt.current||C.current!=="speaking")break}Pe.current=!1,pt.current&&C.current==="speaking"&&!Me.current.length&&!je&&bt()})())},[l,N,je]);const dt=async()=>{var Ee;kr.stop(),((Ee=Qe.getSnapshot().sessions.find(me=>me.id===e))==null?void 0:Ee.status)==="running"&&Qe.send({t:"cancel",sessionId:e}),await bt()},bt=async G=>{if(pt.current){Me.current=[],ze.current=0,Pe.current=!1,xe.current=!1,c("listening"),_(""),x(""),X.current=Date.now();try{const Ee=Dn.getSnapshot();Ee.status==="idle"||Ee.status==="error"||Ee.status==="transcribing"?await Dn.start(s,e):(Dn.resetText(),Dn.setRelay(!0))}catch(Ee){v(String((Ee==null?void 0:Ee.message)??Ee)),c("error")}}},sn=()=>{pt.current=!1,kr.stop(),Dn.stop(),t()},ft=async()=>{if(f){p(!1);try{await Dn.start(s,e),Dn.setRelay(C.current==="listening")}catch(G){v(String((G==null?void 0:G.message)??G))}return}p(!0),Dn.stop()},Se=async()=>{const G=C.current;if(G==="listening"){const Ee=Dn.getSnapshot(),me=(Ee.text||Ee.interim).trim();me&&(xe.current=!0,c("thinking"),v(""),ye.current=mt.current,Dn.setRelay(!1),Qe.send({t:"prompt",sessionId:e,text:me,interrupt:!0}));return}if(G==="speaking"){await dt();return}if(G==="thinking"){await dt();return}G==="error"&&await bt()};R.useEffect(()=>{const G=pe.current,Ee=Q.current;if(!G||!Ee)return;const me=G.getContext("2d"),Fe=Ee.getContext("2d");if(!me||!Fe)return;const ot=Math.min(2,window.devicePixelRatio||1),Kt=new Float32Array(96);let Cn=0;const rt=()=>{const Dt=G.getBoundingClientRect();G.width=Math.max(1,Math.round(Dt.width*ot)),G.height=Math.max(1,Math.round(Dt.height*ot));const Ln=Ee.getBoundingClientRect();Ee.width=Math.max(1,Math.round(Ln.width*ot)),Ee.height=Math.max(1,Math.round(Ln.height*ot))};rt();const jn=new ResizeObserver(rt);jn.observe(G),jn.observe(Ee);const Rr=Dt=>{Cn=window.requestAnimationFrame(Rr);const Ln=C.current,Un=J7[Ln],Ai=Ln==="listening"?Dn.level():Ln==="speaking"?Math.max(0,v7()):-1,Tn=Ai<0?-1:Ai;J.current=Tn<0?J.current*.9:Tn>J.current?J.current+(Tn-J.current)*.45:J.current*.88+Tn*.12;const Hn=Math.min(1,J.current),oi=1+.05*Math.sin(Dt/1150),Mn=Ai<0?.22+.1*Math.sin(Dt/1150):.2+.8*Hn,Ar=G.width/ot,I=G.height/ot;me.setTransform(ot,0,0,ot,0,0),me.clearRect(0,0,Ar,I);const Ne=Ar/2,Be=I/2,lt=Math.min(Ar,I)*.33,Lt=Math.sin(Dt/900)*(3+14*Mn),ct=Math.cos(Dt/1410)*(2+10*Mn),Ft=1+.05*Math.sin(Dt/770)*(.4+Mn),Ue=lt*(.86+.34*Mn)*oi*Ft,xt=`${Un.core[0]},${Un.core[1]},${Un.core[2]}`,Zt=Y.current,pn=Dt;(Ai>=0?Hn>.4&&pn-z.current>380:pn-z.current>1300)&&Ln!=="connecting"&&(z.current=pn,Zt.push({born:pn,strength:Ai>=0?.6+.4*Hn:.4}),Zt.length>6&&Zt.shift()),me.globalCompositeOperation="lighter";for(let mn=0;mn<3;mn++){const Nn=Dt/(2100+mn*900)+mn*Math.PI*2/3,Yt=Ue*(.1+.11*mn)*(.8+.5*Mn),wn=Ne+Math.cos(Nn)*Yt+Lt*.8,Mi=Be+Math.sin(Nn)*Yt+ct*.8,lr=Ue*Math.min(1.22+.16*mn,.98*(Math.min(Ar,I)/2)/Ue)*(.95+.2*Mn),ls=me.createRadialGradient(wn,Mi,0,wn,Mi,lr);ls.addColorStop(0,`rgba(${xt},0.20)`),ls.addColorStop(.45,`rgba(${xt},0.09)`),ls.addColorStop(1,"rgba(0,0,0,0)"),me.fillStyle=ls,me.beginPath(),me.arc(wn,Mi,lr,0,Math.PI*2),me.fill()}const ci=me.createRadialGradient(Ne+Lt,Be+ct,Ue*.82,Ne+Lt,Be+ct,Ue*1.42);ci.addColorStop(0,`rgba(${xt},0)`),ci.addColorStop(.22,`rgba(${xt},${.42-.16*Mn})`),ci.addColorStop(.6,`rgba(${xt},${.14-.06*Mn})`),ci.addColorStop(1,"rgba(0,0,0,0)"),me.fillStyle=ci,me.beginPath(),me.arc(Ne+Lt,Be+ct,Ue*1.42,0,Math.PI*2),me.fill();for(let mn=Zt.length-1;mn>=0;mn--){const Nn=(pn-Zt[mn].born)/(Tt?2600:1400);if(Nn>=1){Zt.splice(mn,1);continue}const Yt=Ue*(1+Nn*1.05)*oi;me.beginPath(),me.arc(Ne+Lt*.3,Be+ct*.3,Yt,0,Math.PI*2),me.strokeStyle=`rgba(${xt},${(1-Nn)*.5*Zt[mn].strength})`,me.lineWidth=1.2+2.4*(1-Nn),me.stroke()}const ui=Ne+Lt*.7,Rn=Be+ct*.7,or=me.createRadialGradient(ui-Ue*.18,Rn-Ue*.18,Ue*.05,ui,Rn,Ue);or.addColorStop(0,`rgba(255,255,255,${.92-.18*Mn})`),or.addColorStop(.3,`rgba(${xt},0.92)`),or.addColorStop(.66,`rgba(${xt},0.62)`),or.addColorStop(.88,`rgba(${xt},0.28)`),or.addColorStop(1,`rgba(${xt},0)`),me.fillStyle=or,me.beginPath(),me.arc(ui,Rn,Ue,0,Math.PI*2),me.fill(),me.globalCompositeOperation="source-over",me.beginPath(),me.arc(ui,Rn,Ue*.97,0,Math.PI*2),me.strokeStyle="rgba(255,255,255,0.10)",me.lineWidth=1.4,me.stroke(),me.beginPath(),me.arc(ui,Rn,Ue*.985,-2.5,-.35),me.strokeStyle=`rgba(255,255,255,${.42-.12*Mn})`,me.lineWidth=2,me.lineCap="round",me.stroke();const Wi=me.createRadialGradient(Ne-Ue*.34,Be-Ue*.42,0,Ne-Ue*.34,Be-Ue*.42,Ue*.55);if(Wi.addColorStop(0,"rgba(255,255,255,0.40)"),Wi.addColorStop(1,"rgba(255,255,255,0)"),me.fillStyle=Wi,me.beginPath(),me.arc(Ne-Ue*.34,Be-Ue*.42,Ue*.55,0,Math.PI*2),me.fill(),!Tt){me.globalCompositeOperation="lighter";for(let mn=0;mn<3;mn++){const Nn=Dt/(1150+mn*520)+mn*2.1,Yt=Ue*(1.08+.11*mn),wn=Ne+Math.cos(Nn)*Yt,Mi=Be+Math.sin(Nn)*Yt*.95,lr=me.createRadialGradient(wn,Mi,0,wn,Mi,9);lr.addColorStop(0,`rgba(255,255,255,${.5+.4*Mn})`),lr.addColorStop(.35,`rgba(${xt},${.4+.3*Mn})`),lr.addColorStop(1,"rgba(0,0,0,0)"),me.fillStyle=lr,me.beginPath(),me.arc(wn,Mi,9,0,Math.PI*2),me.fill()}}me.globalCompositeOperation="source-over";const zt=Ee.width/ot,Ti=Ee.height/ot;Fe.setTransform(ot,0,0,ot,0,0),Fe.clearRect(0,0,zt,Ti);let qi=!1;if(Ln==="listening"){const mn=Dn.wave(),Nn=Math.max(1,Math.floor(mn.length/Kt.length));for(let Yt=0,wn=0;Yt<Kt.length;Yt++,wn+=Nn)Kt[Yt]=mn[wn]??0;qi=!0}else Ln==="speaking"&&(qi=b7(Kt));if(qi){const mn=Yt=>({x:Yt/(Kt.length-1)*zt,y:Ti/2-Kt[Yt]*Ti*1.35});Fe.beginPath();for(let Yt=0;Yt<Kt.length;Yt++){const wn=mn(Yt);Yt?Fe.lineTo(wn.x,wn.y):Fe.moveTo(wn.x,wn.y)}for(let Yt=Kt.length-1;Yt>=0;Yt--){const wn=mn(Yt);Fe.lineTo(wn.x,Ti/2-(wn.y-Ti/2)*.35)}Fe.closePath();const Nn=Fe.createLinearGradient(0,0,0,Ti);Nn.addColorStop(0,`rgba(${Un.core[0]},${Un.core[1]},${Un.core[2]},0.05)`),Nn.addColorStop(.5,`rgba(${Un.core[0]},${Un.core[1]},${Un.core[2]},0.30)`),Nn.addColorStop(1,`rgba(${Un.core[0]},${Un.core[1]},${Un.core[2]},0.05)`),Fe.fillStyle=Nn,Fe.fill(),Fe.beginPath();for(let Yt=0;Yt<Kt.length;Yt++){const wn=mn(Yt);Yt?Fe.lineTo(wn.x,wn.y):Fe.moveTo(wn.x,wn.y)}Fe.strokeStyle=`rgba(255,255,255,${.55+.3*Hn})`,Fe.lineWidth=1.7,Fe.lineJoin="round",Fe.lineCap="round",Fe.stroke()}else Fe.beginPath(),Fe.moveTo(0,Ti/2),Fe.lineTo(zt,Ti/2),Fe.strokeStyle="rgba(255,255,255,0.07)",Fe.lineWidth=1,Fe.stroke()};return Cn=window.requestAnimationFrame(Rr),()=>{window.cancelAnimationFrame(Cn),jn.disconnect()}},[Tt]);const Le=Et.length?RC(Et[Et.length-1]).text:"";R.useEffect(()=>{if(!P||!T)return;const G=U.current;G&&(G.scrollTop=G.scrollHeight)},[P,T,Et.length,Le]);const it=()=>{const G=U.current;G&&B(G.scrollHeight-G.scrollTop-G.clientHeight<24)},Nt=()=>{const G=U.current;G&&(G.scrollTop=G.scrollHeight),B(!0)},V=()=>{P||B(!0),O(!P)},be=DC(y),De=l==="listening"&&be>0&&be<k.minChars,gt=l==="listening"?y?be<k.minChars?`太短了(少于 ${k.minChars} 字,不会自动发送)——继续说,或点一下圆球直接发送`:"点一下直接发送,或说完停一下":f?"麦克风已静音":"说点什么…":l==="speaking"?k.interruptMode==="voice"?"说一句就能打断它,点圆球也可以":"点一下圆球打断,然后自己说":l==="thinking"?"点一下停止它":"";return Id.createPortal(h.jsxDEV("div",{className:"call-mode","data-phase":l,role:"dialog","aria-modal":"true","aria-label":"语音通话",children:[h.jsxDEV("button",{type:"button",className:"call-gear",onClick:()=>L(!0),"aria-label":"通话设置",title:"通话设置",children:h.jsxDEV(rf,{size:18},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:774,columnNumber:9},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:767,columnNumber:7},this),h.jsxDEV("div",{className:"call-head",children:[h.jsxDEV("span",{className:"call-title",children:H_[l]},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:778,columnNumber:9},this),h.jsxDEV("span",{className:"call-sub",children:f?"麦克风已静音":"免提 · 语音通话"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:779,columnNumber:9},this),h.jsxDEV("div",{className:"call-modes",role:"group","aria-label":"打断方式","data-mode":k.interruptMode,children:FR.map(G=>h.jsxDEV("button",{type:"button",className:`call-mode-btn ${k.interruptMode===G.id?"on":""}`,"aria-pressed":k.interruptMode===G.id,title:G.hint,onClick:()=>ve({interruptMode:G.id}),children:G.label},G.id,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:786,columnNumber:13},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:784,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:777,columnNumber:7},this),h.jsxDEV("button",{type:"button",className:"call-orb",onClick:()=>void Se(),"aria-label":`${H_[l]} — ${gt||"点击切换"}`,title:gt,children:h.jsxDEV("canvas",{ref:pe,className:"call-orb-canvas"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:807,columnNumber:9},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:800,columnNumber:7},this),h.jsxDEV("div",{className:"call-lines",children:[y?h.jsxDEV("p",{className:"call-heard",children:y},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:811,columnNumber:18},this):null,N?h.jsxDEV("p",{className:"call-reply",children:N},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:812,columnNumber:18},this):null,m?h.jsxDEV("p",{className:"call-err",children:m},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:813,columnNumber:16},this):null,!m&&a.note?h.jsxDEV("p",{className:"call-note",children:a.note},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:814,columnNumber:32},this):null,!y&&!N&&!m||De?h.jsxDEV("p",{className:"call-hint",children:gt},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:815,columnNumber:51},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:810,columnNumber:7},this),h.jsxDEV("canvas",{ref:Q,className:"call-wave","aria-hidden":"true"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:818,columnNumber:7},this),h.jsxDEV("div",{className:"call-hist","data-open":P,children:[h.jsxDEV("button",{type:"button",className:"call-hist-bar",onClick:V,"aria-expanded":P,"aria-label":P?"收起历史聊天记录":"翻阅历史聊天记录",title:P?"收起":"翻阅历史聊天记录",children:[h.jsxDEV(CF,{size:15},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:831,columnNumber:11},this),h.jsxDEV("span",{className:"call-hist-title",children:"历史记录"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:832,columnNumber:11},this),h.jsxDEV("span",{className:"call-hist-n",children:[Et.length," 条"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:833,columnNumber:11},this),!P&&Le?h.jsxDEV("span",{className:"call-hist-peek",children:Le.slice(0,60)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:834,columnNumber:36},this):null,h.jsxDEV("span",{className:"call-hist-chev","aria-hidden":"true",children:h.jsxDEV(BN,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:835,columnNumber:63},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:835,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:823,columnNumber:9},this),P?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"call-hist-list",ref:U,onScroll:it,children:Et.map((G,Ee)=>{const me=RC(G);return h.jsxDEV(ez,{kind:me.kind,who:me.who,text:me.text,current:Ee===Et.length-1&&l==="speaking"},G.key,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:842,columnNumber:24},this)})},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:839,columnNumber:13},this),T?null:h.jsxDEV("button",{type:"button",className:"call-hist-back",onClick:Nt,children:"回到最新 ↓"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:846,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:838,columnNumber:11},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:822,columnNumber:7},this),h.jsxDEV("div",{className:"call-controls",children:[h.jsxDEV("button",{type:"button",className:`call-btn ${f?"on":""}`,onClick:()=>void ft(),"aria-pressed":f,title:f?"打开麦克风":"静音麦克风",children:f?h.jsxDEV(vF,{size:18},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:860,columnNumber:20},this):h.jsxDEV(Jd,{size:18},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:860,columnNumber:47},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:853,columnNumber:9},this),h.jsxDEV("button",{type:"button",className:"call-btn hangup",onClick:sn,title:"挂断","aria-label":"挂断",children:h.jsxDEV(gF,{size:20},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:863,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:862,columnNumber:9},this),h.jsxDEV("button",{type:"button",className:"call-btn",onClick:r,title:"改用键盘","aria-label":"改用键盘",children:h.jsxDEV(bF,{size:18},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:866,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:865,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:852,columnNumber:7},this),j?h.jsxDEV("div",{className:"call-sheet",role:"dialog","aria-label":"通话设置",children:h.jsxDEV("div",{className:"call-sheet-card",children:[h.jsxDEV("div",{className:"call-sheet-head",children:[h.jsxDEV("span",{children:"通话设置"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:874,columnNumber:15},this),h.jsxDEV("button",{type:"button",className:"call-sheet-x",onClick:()=>L(!1),"aria-label":"关闭设置",children:h.jsxDEV(va,{size:16},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:876,columnNumber:17},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:875,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:873,columnNumber:13},this),h.jsxDEV("p",{className:"call-sheet-note",children:ce?`保存失败:${ce}(已在本机生效)`:"调整立即生效,并保存到服务器(换设备也一样)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:879,columnNumber:13},this),k.interruptMode==="button"?h.jsxDEV("p",{className:"call-sheet-warn",children:"现在是「按键打断」:语音抢话已关闭,所以灵敏度和持续时间当前不起作用(切回「语音打断」,在通话页上一下就行)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:886,columnNumber:15},this):null,U7.map(G=>h.jsxDEV("label",{className:`call-knob ${k.interruptMode==="button"&&G.key.startsWith("barge")?"off":""}`,children:[h.jsxDEV("span",{className:"call-knob-top",children:[h.jsxDEV("span",{className:"call-knob-name",children:G.label},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:893,columnNumber:19},this),h.jsxDEV("span",{className:"call-knob-val",children:G.show(k[G.key])},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:894,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:892,columnNumber:17},this),h.jsxDEV("input",{type:"range",min:tg[G.key][0],max:tg[G.key][1],step:G.key==="bargeSensitivity"?5:G.key==="silenceMs"?100:G.key==="minChars"?1:50,value:k[G.key],onChange:Ee=>ve({[G.key]:Number(Ee.target.value)}),"aria-label":G.label,disabled:k.interruptMode==="button"&&G.key.startsWith("barge")},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:896,columnNumber:17},this),h.jsxDEV("span",{className:"call-knob-ends",children:[h.jsxDEV("span",{children:G.ends[0]},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:906,columnNumber:50},this),h.jsxDEV("span",{children:G.ends[1]},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:906,columnNumber:74},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:906,columnNumber:17},this),h.jsxDEV("span",{className:"call-knob-hint",children:G.hint},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:907,columnNumber:17},this)]},G.key,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:891,columnNumber:15},this)),h.jsxDEV("div",{className:"call-sheet-foot",children:[h.jsxDEV("button",{type:"button",className:"call-sheet-btn",onClick:()=>ve(sf),children:"恢复默认"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:911,columnNumber:15},this),h.jsxDEV("button",{type:"button",className:"call-sheet-btn primary",onClick:()=>L(!1),children:"完成"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:912,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:910,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:872,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:871,columnNumber:9},this):null,h.jsxDEV("p",{className:"sr-only","aria-live":"polite",children:H_[l]},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:919,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/CallMode.tsx",lineNumber:766,columnNumber:5},this),document.body)}function HN({size:e=22}){const t=qF();return h.jsxDEV("img",{className:"brand-mark",src:t?"/icons/agentus-mark-inverse.svg":"/icons/agentus-mark.svg",width:e,height:Math.round(e*(880/1484)),alt:"","aria-hidden":"true",draggable:!1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/Brand.tsx",lineNumber:13,columnNumber:5},this)}const nz=12e4;function iz(e){if(!e.visible)return!1;const t=e.idleMs??nz;return e.now-e.lastInputAt<t}function WN({value:e,onChange:t}){var x;const[r,s]=R.useState(null),[a,l]=R.useState(""),[c,f]=R.useState(!1),[p,m]=R.useState(""),v=async N=>{f(!0),m("");try{const _=N?`?path=${encodeURIComponent(N)}`:"",k=await fetch(`/api/fs/dirs${_}`),j=await k.json().catch(()=>({}));if(!k.ok){m(j.error??`HTTP ${k.status}`);return}s(j),l(j.path)}catch(_){m(String((_==null?void 0:_.message)??_))}finally{f(!1)}};R.useEffect(()=>{v(e||"")},[]);const y=(()=>{if(!r)return[];const N=r.path.split("/").filter(Boolean),_=[{label:"/",path:"/"}];let k="";for(const j of N)k+=`/${j}`,_.push({label:j,path:k});return _.length>5?[_[0],..._.slice(-4)]:_})();return h.jsxDEV("div",{className:"wp",children:[h.jsxDEV("div",{className:"wp-bar",children:[h.jsxDEV("input",{className:"wp-path",value:a,spellCheck:!1,onChange:N=>l(N.target.value),onKeyDown:N=>{N.key==="Enter"&&(N.preventDefault(),v(a))},placeholder:"~/project — Enter to browse","aria-label":"browse directory"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:76,columnNumber:9},this),h.jsxDEV("button",{className:"wp-use",disabled:c||!a.trim(),title:"use the directory typed in the field",onClick:()=>t(a.trim()),children:"use"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:90,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:"home","aria-label":"home",disabled:c,onClick:()=>void v((r==null?void 0:r.home)??""),children:h.jsxDEV(rR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:99,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:98,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:"parent directory","aria-label":"parent directory",disabled:c||!(r!=null&&r.parent),onClick:()=>(r==null?void 0:r.parent)&&void v(r.parent),children:h.jsxDEV(aR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:108,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:101,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:75,columnNumber:7},this),h.jsxDEV("div",{className:"wp-now",children:[y.length>1?h.jsxDEV("div",{className:"wp-crumbs",children:y.map((N,_)=>h.jsxDEV("span",{children:[_>0&&h.jsxDEV(os,{size:10},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:117,columnNumber:27},this),h.jsxDEV("button",{className:"wp-crumb",onClick:()=>void v(N.path),title:N.path,children:N.label},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:118,columnNumber:17},this)]},N.path,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:116,columnNumber:15},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:114,columnNumber:11},this):null,(x=r==null?void 0:r.recent)!=null&&x.length?h.jsxDEV("div",{className:"wp-recent",children:r.recent.slice(0,4).map(N=>h.jsxDEV("button",{className:`wp-chip ${e===N?"sel":""}`,title:`use ${N}`,onClick:()=>t(N),onDoubleClick:()=>void v(N),children:N.split("/").filter(Boolean).pop()??N},N,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:126,columnNumber:15},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:124,columnNumber:11},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:112,columnNumber:7},this),h.jsxDEV("div",{className:"wp-list",role:"listbox","aria-label":"folders",children:[c&&!r?h.jsxDEV("div",{className:"wp-note",children:"loading…"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:141,columnNumber:29},this):null,p?h.jsxDEV("div",{className:"wp-note err",children:p},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:142,columnNumber:16},this):null,r==null?void 0:r.entries.map(N=>h.jsxDEV("div",{role:"option","aria-selected":e===N.path,className:`wp-row ${e===N.path?"sel":""}`,onClick:()=>t(N.path),title:`use ${N.path}`,children:[h.jsxDEV(Zl,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:152,columnNumber:13},this),h.jsxDEV("span",{className:"wp-name",children:N.name},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:153,columnNumber:13},this),h.jsxDEV("button",{className:"wp-enter",title:`open ${N.name}`,"aria-label":`open ${N.name}`,onClick:_=>{_.stopPropagation(),v(N.path)},children:h.jsxDEV(os,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:160,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:154,columnNumber:13},this)]},N.path,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:144,columnNumber:11},this)),r&&!r.entries.length&&!p?h.jsxDEV("div",{className:"wp-note",children:"no subfolders here — pick this one with “use”"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:165,columnNumber:11},this):null,r!=null&&r.truncated?h.jsxDEV("div",{className:"wp-note",children:"list truncated at 300 entries"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:167,columnNumber:31},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:140,columnNumber:7},this),h.jsxDEV("div",{className:"wp-picked",title:e,children:[h.jsxDEV(Om,{size:12},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:171,columnNumber:9},this),h.jsxDEV("span",{className:"wp-picked-path",children:e||"(no folder chosen yet)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:172,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:170,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/WorkspacePicker.tsx",lineNumber:71,columnNumber:5},this)}/**
|
|
234
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
235
|
+
* @license MIT
|
|
236
|
+
*
|
|
237
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
238
|
+
* @license MIT
|
|
239
|
+
*
|
|
240
|
+
* Originally forked from (with the author's permission):
|
|
241
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
242
|
+
* http://bellard.org/jslinux/
|
|
243
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
244
|
+
*/var WR=Object.defineProperty,rz=Object.getOwnPropertyDescriptor,sz=(e,t)=>{for(var r in t)WR(e,r,{get:t[r],enumerable:!0})},ti=(e,t,r,s)=>{for(var a=s>1?void 0:s?rz(t,r):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(a=(s?c(t,r,a):c(a))||a);return s&&a&&WR(t,r,a),a},tt=(e,t)=>(r,s)=>t(r,s,e),AC="Terminal input",Vy={get:()=>AC,set:e=>AC=e},TC="Too much output to announce, navigate to rows manually to read",Iy={get:()=>TC,set:e=>TC=e};function az(e){return e.replace(/\r?\n/g,"\r")}function oz(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function lz(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function cz(e,t,r,s){if(e.stopPropagation(),e.clipboardData){let a=e.clipboardData.getData("text/plain");qR(a,t,r,s)}}function qR(e,t,r,s){e=az(e),e=oz(e,r.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(e,!0),t.value=""}function KR(e,t,r){let s=r.getBoundingClientRect(),a=e.clientX-s.left-10,l=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${a}px`,t.style.top=`${l}px`,t.style.zIndex="1000",t.focus()}function MC(e,t,r,s,a){KR(e,t,r),a&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function Ho(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function mg(e,t=0,r=e.length){let s="";for(let a=t;a<r;++a){let l=e[a];l>65535?(l-=65536,s+=String.fromCharCode((l>>10)+55296)+String.fromCharCode(l%1024+56320)):s+=String.fromCharCode(l)}return s}var uz=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let r=e.length;if(!r)return 0;let s=0,a=0;if(this._interim){let l=e.charCodeAt(a++);56320<=l&&l<=57343?t[s++]=(this._interim-55296)*1024+l-56320+65536:(t[s++]=this._interim,t[s++]=l),this._interim=0}for(let l=a;l<r;++l){let c=e.charCodeAt(l);if(55296<=c&&c<=56319){if(++l>=r)return this._interim=c,s;let f=e.charCodeAt(l);56320<=f&&f<=57343?t[s++]=(c-55296)*1024+f-56320+65536:(t[s++]=c,t[s++]=f);continue}c!==65279&&(t[s++]=c)}return s}},hz=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let r=e.length;if(!r)return 0;let s=0,a,l,c,f,p=0,m=0;if(this.interim[0]){let x=!1,N=this.interim[0];N&=(N&224)===192?31:(N&240)===224?15:7;let _=0,k;for(;(k=this.interim[++_]&63)&&_<4;)N<<=6,N|=k;let j=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,L=j-_;for(;m<L;){if(m>=r)return 0;if(k=e[m++],(k&192)!==128){m--,x=!0;break}else this.interim[_++]=k,N<<=6,N|=k&63}x||(j===2?N<128?m--:t[s++]=N:j===3?N<2048||N>=55296&&N<=57343||N===65279||(t[s++]=N):N<65536||N>1114111||(t[s++]=N)),this.interim.fill(0)}let v=r-4,y=m;for(;y<r;){for(;y<v&&!((a=e[y])&128)&&!((l=e[y+1])&128)&&!((c=e[y+2])&128)&&!((f=e[y+3])&128);)t[s++]=a,t[s++]=l,t[s++]=c,t[s++]=f,y+=4;if(a=e[y++],a<128)t[s++]=a;else if((a&224)===192){if(y>=r)return this.interim[0]=a,s;if(l=e[y++],(l&192)!==128){y--;continue}if(p=(a&31)<<6|l&63,p<128){y--;continue}t[s++]=p}else if((a&240)===224){if(y>=r)return this.interim[0]=a,s;if(l=e[y++],(l&192)!==128){y--;continue}if(y>=r)return this.interim[0]=a,this.interim[1]=l,s;if(c=e[y++],(c&192)!==128){y--;continue}if(p=(a&15)<<12|(l&63)<<6|c&63,p<2048||p>=55296&&p<=57343||p===65279)continue;t[s++]=p}else if((a&248)===240){if(y>=r)return this.interim[0]=a,s;if(l=e[y++],(l&192)!==128){y--;continue}if(y>=r)return this.interim[0]=a,this.interim[1]=l,s;if(c=e[y++],(c&192)!==128){y--;continue}if(y>=r)return this.interim[0]=a,this.interim[1]=l,this.interim[2]=c,s;if(f=e[y++],(f&192)!==128){y--;continue}if(p=(a&7)<<18|(l&63)<<12|(c&63)<<6|f&63,p<65536||p>1114111)continue;t[s++]=p}}return s}},YR="",Go=" ",af=class GR{constructor(){this.fg=0,this.bg=0,this.extended=new ng}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new GR;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},ng=class JR{constructor(t=0,r=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new JR(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},xs=class XR extends af{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new ng,this.combinedData=""}static fromCharData(t){let r=new XR;return r.setFromCharData(t),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Ho(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let r=!1;if(t[1].length>2)r=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let a=t[1].charCodeAt(1);56320<=a&&a<=57343?this.content=(s-55296)*1024+a-56320+65536|t[2]<<22:r=!0}else r=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;r&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},OC="di$target",Fy="di$dependencies",W_=new Map;function dz(e){return e[Fy]||[]}function Hi(e){if(W_.has(e))return W_.get(e);let t=function(r,s,a){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");fz(t,r,a)};return t._id=e,W_.set(e,t),t}function fz(e,t,r){t[OC]===t?t[Fy].push({id:e,index:r}):(t[Fy]=[{id:e,index:r}],t[OC]=t)}var Cr=Hi("BufferService"),ZR=Hi("CoreMouseService"),rc=Hi("CoreService"),pz=Hi("CharsetService"),qN=Hi("InstantiationService"),QR=Hi("LogService"),Dr=Hi("OptionsService"),eA=Hi("OscLinkService"),mz=Hi("UnicodeService"),of=Hi("DecorationService"),zy=class{constructor(e,t,r){this._bufferService=e,this._optionsService=t,this._oscLinkService=r}provideLinks(e,t){var v;let r=this._bufferService.buffer.lines.get(e-1);if(!r){t(void 0);return}let s=[],a=this._optionsService.rawOptions.linkHandler,l=new xs,c=r.getTrimmedLength(),f=-1,p=-1,m=!1;for(let y=0;y<c;y++)if(!(p===-1&&!r.hasContent(y))){if(r.loadCell(y,l),l.hasExtendedAttrs()&&l.extended.urlId)if(p===-1){p=y,f=l.extended.urlId;continue}else m=l.extended.urlId!==f;else p!==-1&&(m=!0);if(m||p!==-1&&y===c-1){let x=(v=this._oscLinkService.getLinkData(f))==null?void 0:v.uri;if(x){let N={start:{x:p+1,y:e},end:{x:y+(!m&&y===c-1?1:0),y:e}},_=!1;if(!(a!=null&&a.allowNonHttpProtocols))try{let k=new URL(x);["http:","https:"].includes(k.protocol)||(_=!0)}catch{_=!0}_||s.push({text:x,range:N,activate:(k,j)=>a?a.activate(k,j,N):gz(k,j),hover:(k,j)=>{var L;return(L=a==null?void 0:a.hover)==null?void 0:L.call(a,k,j,N)},leave:(k,j)=>{var L;return(L=a==null?void 0:a.leave)==null?void 0:L.call(a,k,j,N)}})}m=!1,l.hasExtendedAttrs()&&l.extended.urlId?(p=y,f=l.extended.urlId):(p=-1,f=-1)}}t(s)}};zy=ti([tt(0,Cr),tt(1,Dr),tt(2,eA)],zy);function gz(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
245
|
+
|
|
246
|
+
WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var gg=Hi("CharSizeService"),oo=Hi("CoreBrowserService"),KN=Hi("MouseService"),lo=Hi("RenderService"),vz=Hi("SelectionService"),tA=Hi("CharacterJoinerService"),Mu=Hi("ThemeService"),nA=Hi("LinkProviderService"),bz=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?jC.isErrorNoTelemetry(e)?new jC(e.message+`
|
|
247
|
+
|
|
248
|
+
`+e.stack):new Error(e.message+`
|
|
249
|
+
|
|
250
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},_z=new bz;function Pm(e){yz(e)||_z.onUnexpectedError(e)}var $y="Canceled";function yz(e){return e instanceof Nz?!0:e instanceof Error&&e.name===$y&&e.message===$y}var Nz=class extends Error{constructor(){super($y),this.name=this.message}};function wz(e){return new Error(`Illegal argument: ${e}`)}var jC=class Uy extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Uy)return t;let r=new Uy;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Hy=class iA extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,iA.prototype)}};function Zr(e,t=0){return e[e.length-(1+t)]}var xz;(e=>{function t(l){return l<0}e.isLessThan=t;function r(l){return l<=0}e.isLessThanOrEqual=r;function s(l){return l>0}e.isGreaterThan=s;function a(l){return l===0}e.isNeitherLessOrGreaterThan=a,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(xz||(xz={}));function Sz(e,t){let r=this,s=!1,a;return function(){return s||(s=!0,t||(a=e.apply(r,arguments))),a}}var rA;(e=>{function t(T){return T&&typeof T=="object"&&typeof T[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function s(){return r}e.empty=s;function*a(T){yield T}e.single=a;function l(T){return t(T)?T:a(T)}e.wrap=l;function c(T){return T||r}e.from=c;function*f(T){for(let B=T.length-1;B>=0;B--)yield T[B]}e.reverse=f;function p(T){return!T||T[Symbol.iterator]().next().done===!0}e.isEmpty=p;function m(T){return T[Symbol.iterator]().next().value}e.first=m;function v(T,B){let U=0;for(let ce of T)if(B(ce,U++))return!0;return!1}e.some=v;function y(T,B){for(let U of T)if(B(U))return U}e.find=y;function*x(T,B){for(let U of T)B(U)&&(yield U)}e.filter=x;function*N(T,B){let U=0;for(let ce of T)yield B(ce,U++)}e.map=N;function*_(T,B){let U=0;for(let ce of T)yield*B(ce,U++)}e.flatMap=_;function*k(...T){for(let B of T)yield*B}e.concat=k;function j(T,B,U){let ce=U;for(let re of T)ce=B(ce,re);return ce}e.reduce=j;function*L(T,B,U=T.length){for(B<0&&(B+=T.length),U<0?U+=T.length:U>T.length&&(U=T.length);B<U;B++)yield T[B]}e.slice=L;function P(T,B=Number.POSITIVE_INFINITY){let U=[];if(B===0)return[U,T];let ce=T[Symbol.iterator]();for(let re=0;re<B;re++){let Z=ce.next();if(Z.done)return[U,e.empty()];U.push(Z.value)}return[U,{[Symbol.iterator](){return ce}}]}e.consume=P;async function O(T){let B=[];for await(let U of T)B.push(U);return Promise.resolve(B)}e.asyncToArray=O})(rA||(rA={}));function tc(e){if(rA.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Ez(...e){return Kn(()=>tc(e))}function Kn(e){return{dispose:Sz(()=>{e()})}}var sA=class aA{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{tc(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?aA.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};sA.DISABLE_DISPOSED_WARNING=!1;var Jo=sA,nn=class{constructor(){this._store=new Jo,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};nn.None=Object.freeze({dispose(){}});var Du=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},ro=typeof window=="object"?window:globalThis,Wy=class qy{constructor(t){this.element=t,this.next=qy.Undefined,this.prev=qy.Undefined}};Wy.Undefined=new Wy(void 0);var Gn=Wy,LC=class{constructor(){this._first=Gn.Undefined,this._last=Gn.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Gn.Undefined}clear(){let e=this._first;for(;e!==Gn.Undefined;){let t=e.next;e.prev=Gn.Undefined,e.next=Gn.Undefined,e=t}this._first=Gn.Undefined,this._last=Gn.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new Gn(e);if(this._first===Gn.Undefined)this._first=r,this._last=r;else if(t){let a=this._last;this._last=r,r.prev=a,a.next=r}else{let a=this._first;this._first=r,r.next=a,a.prev=r}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(r))}}shift(){if(this._first!==Gn.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Gn.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Gn.Undefined&&e.next!==Gn.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Gn.Undefined&&e.next===Gn.Undefined?(this._first=Gn.Undefined,this._last=Gn.Undefined):e.next===Gn.Undefined?(this._last=this._last.prev,this._last.next=Gn.Undefined):e.prev===Gn.Undefined&&(this._first=this._first.next,this._first.prev=Gn.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Gn.Undefined;)yield e.element,e=e.next}},kz=globalThis.performance&&typeof globalThis.performance.now=="function",Cz=class oA{static create(t){return new oA(t)}constructor(t){this._now=kz&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},ar;(e=>{e.None=()=>nn.None;function t(Q,C){return y(Q,()=>{},0,void 0,!0,void 0,C)}e.defer=t;function r(Q){return(C,J=null,Y)=>{let z=!1,X;return X=Q($=>{if(!z)return X?X.dispose():z=!0,C.call(J,$)},null,Y),z&&X.dispose(),X}}e.once=r;function s(Q,C,J){return m((Y,z=null,X)=>Q($=>Y.call(z,C($)),null,X),J)}e.map=s;function a(Q,C,J){return m((Y,z=null,X)=>Q($=>{C($),Y.call(z,$)},null,X),J)}e.forEach=a;function l(Q,C,J){return m((Y,z=null,X)=>Q($=>C($)&&Y.call(z,$),null,X),J)}e.filter=l;function c(Q){return Q}e.signal=c;function f(...Q){return(C,J=null,Y)=>{let z=Ez(...Q.map(X=>X($=>C.call(J,$))));return v(z,Y)}}e.any=f;function p(Q,C,J,Y){let z=J;return s(Q,X=>(z=C(z,X),z),Y)}e.reduce=p;function m(Q,C){let J,Y={onWillAddFirstListener(){J=Q(z.fire,z)},onDidRemoveLastListener(){J==null||J.dispose()}},z=new Ie(Y);return C==null||C.add(z),z.event}function v(Q,C){return C instanceof Array?C.push(Q):C&&C.add(Q),Q}function y(Q,C,J=100,Y=!1,z=!1,X,$){let xe,Me,Pe,ze=0,ge,ye={leakWarningThreshold:X,onWillAddFirstListener(){xe=Q(pt=>{ze++,Me=C(Me,pt),Y&&!Pe&&(mt.fire(Me),Me=void 0),ge=()=>{let Ut=Me;Me=void 0,Pe=void 0,(!Y||ze>1)&&mt.fire(Ut),ze=0},typeof J=="number"?(clearTimeout(Pe),Pe=setTimeout(ge,J)):Pe===void 0&&(Pe=0,queueMicrotask(ge))})},onWillRemoveListener(){z&&ze>0&&(ge==null||ge())},onDidRemoveLastListener(){ge=void 0,xe.dispose()}},mt=new Ie(ye);return $==null||$.add(mt),mt.event}e.debounce=y;function x(Q,C=0,J){return e.debounce(Q,(Y,z)=>Y?(Y.push(z),Y):[z],C,void 0,!0,void 0,J)}e.accumulate=x;function N(Q,C=(Y,z)=>Y===z,J){let Y=!0,z;return l(Q,X=>{let $=Y||!C(X,z);return Y=!1,z=X,$},J)}e.latch=N;function _(Q,C,J){return[e.filter(Q,C,J),e.filter(Q,Y=>!C(Y),J)]}e.split=_;function k(Q,C=!1,J=[],Y){let z=J.slice(),X=Q(Me=>{z?z.push(Me):xe.fire(Me)});Y&&Y.add(X);let $=()=>{z==null||z.forEach(Me=>xe.fire(Me)),z=null},xe=new Ie({onWillAddFirstListener(){X||(X=Q(Me=>xe.fire(Me)),Y&&Y.add(X))},onDidAddFirstListener(){z&&(C?setTimeout($):$())},onDidRemoveLastListener(){X&&X.dispose(),X=null}});return Y&&Y.add(xe),xe.event}e.buffer=k;function j(Q,C){return(J,Y,z)=>{let X=C(new P);return Q(function($){let xe=X.evaluate($);xe!==L&&J.call(Y,xe)},void 0,z)}}e.chain=j;let L=Symbol("HaltChainable");class P{constructor(){this.steps=[]}map(C){return this.steps.push(C),this}forEach(C){return this.steps.push(J=>(C(J),J)),this}filter(C){return this.steps.push(J=>C(J)?J:L),this}reduce(C,J){let Y=J;return this.steps.push(z=>(Y=C(Y,z),Y)),this}latch(C=(J,Y)=>J===Y){let J=!0,Y;return this.steps.push(z=>{let X=J||!C(z,Y);return J=!1,Y=z,X?z:L}),this}evaluate(C){for(let J of this.steps)if(C=J(C),C===L)break;return C}}function O(Q,C,J=Y=>Y){let Y=(...xe)=>$.fire(J(...xe)),z=()=>Q.on(C,Y),X=()=>Q.removeListener(C,Y),$=new Ie({onWillAddFirstListener:z,onDidRemoveLastListener:X});return $.event}e.fromNodeEventEmitter=O;function T(Q,C,J=Y=>Y){let Y=(...xe)=>$.fire(J(...xe)),z=()=>Q.addEventListener(C,Y),X=()=>Q.removeEventListener(C,Y),$=new Ie({onWillAddFirstListener:z,onDidRemoveLastListener:X});return $.event}e.fromDOMEventEmitter=T;function B(Q){return new Promise(C=>r(Q)(C))}e.toPromise=B;function U(Q){let C=new Ie;return Q.then(J=>{C.fire(J)},()=>{C.fire(void 0)}).finally(()=>{C.dispose()}),C.event}e.fromPromise=U;function ce(Q,C){return Q(J=>C.fire(J))}e.forward=ce;function re(Q,C,J){return C(J),Q(Y=>C(Y))}e.runAndSubscribe=re;class Z{constructor(C,J){this._observable=C,this._counter=0,this._hasChanged=!1;let Y={onWillAddFirstListener:()=>{C.addObserver(this)},onDidRemoveLastListener:()=>{C.removeObserver(this)}};this.emitter=new Ie(Y),J&&J.add(this.emitter)}beginUpdate(C){this._counter++}handlePossibleChange(C){}handleChange(C,J){this._hasChanged=!0}endUpdate(C){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function ve(Q,C){return new Z(Q,C).emitter.event}e.fromObservable=ve;function pe(Q){return(C,J,Y)=>{let z=0,X=!1,$={beginUpdate(){z++},endUpdate(){z--,z===0&&(Q.reportChanges(),X&&(X=!1,C.call(J)))},handlePossibleChange(){},handleChange(){X=!0}};Q.addObserver($),Q.reportChanges();let xe={dispose(){Q.removeObserver($)}};return Y instanceof Jo?Y.add(xe):Array.isArray(Y)&&Y.push(xe),xe}}e.fromObservableLight=pe})(ar||(ar={}));var Ky=class Yy{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Yy._idPool++}`,Yy.all.add(this)}start(t){this._stopWatch=new Cz,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Ky.all=new Set,Ky._idPool=0;var Dz=Ky,Rz=-1,lA=class cA{constructor(t,r,s=(cA._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=s,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,r){let s=this.threshold;if(s<=0||r<s)return;this._stacks||(this._stacks=new Map);let a=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,a+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[l,c]=this.getMostFrequentStack(),f=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${c}):`;console.warn(f),console.warn(l);let p=new Mz(f,l);this._errorHandler(p)}return()=>{let l=this._stacks.get(t.value)||0;this._stacks.set(t.value,l-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[s,a]of this._stacks)(!t||r<a)&&(t=[s,a],r=a);return t}};lA._idPool=1;var Az=lA,Tz=class uA{constructor(t){this.value=t}static create(){let t=new Error;return new uA(t.stack??"")}print(){console.warn(this.value.split(`
|
|
251
|
+
`).slice(2).join(`
|
|
252
|
+
`))}},Mz=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Oz=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},jz=0,q_=class{constructor(e){this.value=e,this.id=jz++}},Lz=2,Bz,Ie=class{constructor(e){var t,r,s,a;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new Az((e==null?void 0:e.onListenerError)??Pm,((r=this._options)==null?void 0:r.leakWarningThreshold)??Rz):void 0,this._perfMon=(s=this._options)!=null&&s._profName?new Dz(this._options._profName):void 0,this._deliveryQueue=(a=this._options)==null?void 0:a.deliveryQueue}dispose(){var e,t,r,s;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(r=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t),(s=this._leakageMon)==null||s.dispose())}get event(){return this._event??(this._event=(e,t,r)=>{var c,f,p,m,v;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let y=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(y);let x=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],N=new Oz(`${y}. HINT: Stack shows most frequent listener (${x[1]}-times)`,x[0]);return(((c=this._options)==null?void 0:c.onListenerError)||Pm)(N),nn.None}if(this._disposed)return nn.None;t&&(e=e.bind(t));let s=new q_(e),a;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=Tz.create(),a=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof q_?(this._deliveryQueue??(this._deliveryQueue=new Pz),this._listeners=[this._listeners,s]):this._listeners.push(s):((p=(f=this._options)==null?void 0:f.onWillAddFirstListener)==null||p.call(f,this),this._listeners=s,(v=(m=this._options)==null?void 0:m.onDidAddFirstListener)==null||v.call(m,this)),this._size++;let l=Kn(()=>{a==null||a(),this._removeListener(s)});return r instanceof Jo?r.add(l):Array.isArray(r)&&r.push(l),l}),this._event}_removeListener(e){var a,l,c,f;if((l=(a=this._options)==null?void 0:a.onWillRemoveListener)==null||l.call(a,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(f=(c=this._options)==null?void 0:c.onDidRemoveLastListener)==null||f.call(c,this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let s=this._deliveryQueue.current===this;if(this._size*Lz<=t.length){let p=0;for(let m=0;m<t.length;m++)t[m]?t[p++]=t[m]:s&&(this._deliveryQueue.end--,p<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=p}}_deliver(e,t){var s;if(!e)return;let r=((s=this._options)==null?void 0:s.onListenerError)||Pm;if(!r){e.value(t);return}try{e.value(t)}catch(a){r(a)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,r,s,a;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(r=this._perfMon)==null||r.stop()),(s=this._perfMon)==null||s.start(this._size),this._listeners)if(this._listeners instanceof q_)this._deliver(this._listeners,e);else{let l=this._deliveryQueue;l.enqueue(this,e,this._listeners.length),this._deliverQueue(l)}(a=this._perfMon)==null||a.stop()}hasListeners(){return this._size>0}},Pz=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Gy=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Ie,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Ie,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,r){if(this.getZoomLevel(r)===t)return;let s=this.getWindowId(r);this.mapWindowIdToZoomLevel.set(s,t),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,r){this.mapWindowIdToZoomFactor.set(this.getWindowId(r),t)}setFullscreen(t,r){if(this.isFullscreen(r)===t)return;let s=this.getWindowId(r);this.mapWindowIdToFullScreen.set(s,t),this._onDidChangeFullscreen.fire(s)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};Gy.INSTANCE=new Gy;var YN=Gy;function Vz(e,t,r){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",r)}YN.INSTANCE.onDidChangeZoomLevel;function Iz(e){return YN.INSTANCE.getZoomFactor(e)}YN.INSTANCE.onDidChangeFullscreen;var Ou=typeof navigator=="object"?navigator.userAgent:"",Jy=Ou.indexOf("Firefox")>=0,Fz=Ou.indexOf("AppleWebKit")>=0,GN=Ou.indexOf("Chrome")>=0,zz=!GN&&Ou.indexOf("Safari")>=0;Ou.indexOf("Electron/")>=0;Ou.indexOf("Android")>=0;var K_=!1;if(typeof ro.matchMedia=="function"){let e=ro.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ro.matchMedia("(display-mode: fullscreen)");K_=e.matches,Vz(ro,e,({matches:r})=>{K_&&t.matches||(K_=r)})}var du="en",Xy=!1,Zy=!1,Vm=!1,hA=!1,Nm,Im=du,BC=du,$z,Fs,Xl=globalThis,sr,TD;typeof Xl.vscode<"u"&&typeof Xl.vscode.process<"u"?sr=Xl.vscode.process:typeof process<"u"&&typeof((TD=process==null?void 0:process.versions)==null?void 0:TD.node)=="string"&&(sr=process);var MD,Uz=typeof((MD=sr==null?void 0:sr.versions)==null?void 0:MD.electron)=="string",Hz=Uz&&(sr==null?void 0:sr.type)==="renderer",OD;if(typeof sr=="object"){Xy=sr.platform==="win32",Zy=sr.platform==="darwin",Vm=sr.platform==="linux",Vm&&sr.env.SNAP&&sr.env.SNAP_REVISION,sr.env.CI||sr.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Nm=du,Im=du;let e=sr.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Nm=t.userLocale,BC=t.osLocale,Im=t.resolvedLanguage||du,$z=(OD=t.languagePack)==null?void 0:OD.translationsConfigFile}catch{}hA=!0}else typeof navigator=="object"&&!Hz?(Fs=navigator.userAgent,Xy=Fs.indexOf("Windows")>=0,Zy=Fs.indexOf("Macintosh")>=0,(Fs.indexOf("Macintosh")>=0||Fs.indexOf("iPad")>=0||Fs.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Vm=Fs.indexOf("Linux")>=0,(Fs==null?void 0:Fs.indexOf("Mobi"))>=0,Im=globalThis._VSCODE_NLS_LANGUAGE||du,Nm=navigator.language.toLowerCase(),BC=Nm):console.error("Unable to resolve platform.");var dA=Xy,ga=Zy,Wz=Vm,PC=hA,ba=Fs,Io=Im,qz;(e=>{function t(){return Io}e.value=t;function r(){return Io.length===2?Io==="en":Io.length>=3?Io[0]==="e"&&Io[1]==="n"&&Io[2]==="-":!1}e.isDefaultVariant=r;function s(){return Io==="en"}e.isDefault=s})(qz||(qz={}));var Kz=typeof Xl.postMessage=="function"&&!Xl.importScripts;(()=>{if(Kz){let e=[];Xl.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let s=0,a=e.length;s<a;s++){let l=e[s];if(l.id===r.data.vscodeScheduleAsyncWork){e.splice(s,1),l.callback();return}}});let t=0;return r=>{let s=++t;e.push({id:s,callback:r}),Xl.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})();var Yz=!!(ba&&ba.indexOf("Chrome")>=0);ba&&ba.indexOf("Firefox")>=0;!Yz&&ba&&ba.indexOf("Safari")>=0;ba&&ba.indexOf("Edg/")>=0;ba&&ba.indexOf("Android")>=0;var su=typeof navigator=="object"?navigator:{};PC||document.queryCommandSupported&&document.queryCommandSupported("copy")||su&&su.clipboard&&su.clipboard.writeText,PC||su&&su.clipboard&&su.clipboard.readText;var JN=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Y_=new JN,VC=new JN,IC=new JN,Gz=new Array(230),fA;(e=>{function t(f){return Y_.keyCodeToStr(f)}e.toString=t;function r(f){return Y_.strToKeyCode(f)}e.fromString=r;function s(f){return VC.keyCodeToStr(f)}e.toUserSettingsUS=s;function a(f){return IC.keyCodeToStr(f)}e.toUserSettingsGeneral=a;function l(f){return VC.strToKeyCode(f)||IC.strToKeyCode(f)}e.fromUserSettings=l;function c(f){if(f>=98&&f<=113)return null;switch(f){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Y_.keyCodeToStr(f)}e.toElectronAccelerator=c})(fA||(fA={}));var Jz=class pA{constructor(t,r,s,a,l){this.ctrlKey=t,this.shiftKey=r,this.altKey=s,this.metaKey=a,this.keyCode=l}equals(t){return t instanceof pA&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",s=this.altKey?"1":"0",a=this.metaKey?"1":"0";return`K${t}${r}${s}${a}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new Xz([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},Xz=class{constructor(e){if(e.length===0)throw wz("chords");this.chords=e}getHashCode(){let e="";for(let t=0,r=this.chords.length;t<r;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function Zz(e){if(e.charCode){let r=String.fromCharCode(e.charCode).toUpperCase();return fA.fromString(r)}let t=e.keyCode;if(t===3)return 7;if(Jy)switch(t){case 59:return 85;case 60:if(Wz)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(ga)return 57;break}else if(Fz&&(ga&&t===93||!ga&&t===92))return 57;return Gz[t]||0}var Qz=ga?256:2048,e8=512,t8=1024,n8=ga?2048:256,FC=class{constructor(e){var r;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(r=t.getModifierState)==null?void 0:r.call(t,"AltGraph"),this.keyCode=Zz(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=Qz),this.altKey&&(t|=e8),this.shiftKey&&(t|=t8),this.metaKey&&(t|=n8),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new Jz(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},zC=new WeakMap;function i8(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,r=e.parent.location;if(t.origin!=="null"&&r.origin!=="null"&&t.origin!==r.origin)return null}catch{return null}return e.parent}var r8=class{static getSameOriginWindowChain(e){let t=zC.get(e);if(!t){t=[],zC.set(e,t);let r=e,s;do s=i8(r),s?t.push({window:new WeakRef(r),iframeElement:r.frameElement||null}):t.push({window:new WeakRef(r),iframeElement:null}),r=s;while(r)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let r=0,s=0,a=this.getSameOriginWindowChain(e);for(let l of a){let c=l.window.deref();if(r+=(c==null?void 0:c.scrollY)??0,s+=(c==null?void 0:c.scrollX)??0,c===t||!l.iframeElement)break;let f=l.iframeElement.getBoundingClientRect();r+=f.top,s+=f.left}return{top:r,left:s}}},wm=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let r=r8.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=r.left,this.posy-=r.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},$C=class{constructor(e,t=0,r=0){var a;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=r,this.deltaX=t;let s=!1;if(GN){let l=navigator.userAgent.match(/Chrome\/(\d+)/);s=(l?parseInt(l[1]):123)<=122}if(e){let l=e,c=e,f=((a=e.view)==null?void 0:a.devicePixelRatio)||1;if(typeof l.wheelDeltaY<"u")s?this.deltaY=l.wheelDeltaY/(120*f):this.deltaY=l.wheelDeltaY/120;else if(typeof c.VERTICAL_AXIS<"u"&&c.axis===c.VERTICAL_AXIS)this.deltaY=-c.detail/3;else if(e.type==="wheel"){let p=e;p.deltaMode===p.DOM_DELTA_LINE?Jy&&!ga?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof l.wheelDeltaX<"u")zz&&dA?this.deltaX=-(l.wheelDeltaX/120):s?this.deltaX=l.wheelDeltaX/(120*f):this.deltaX=l.wheelDeltaX/120;else if(typeof c.HORIZONTAL_AXIS<"u"&&c.axis===c.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let p=e;p.deltaMode===p.DOM_DELTA_LINE?Jy&&!ga?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(s?this.deltaY=e.wheelDelta/(120*f):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},mA=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),s8;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof a8?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ar.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:mA})})(s8||(s8={}));var a8=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?mA:(this._emitter||(this._emitter=new Ie),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},XN=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Hy("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new Hy("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},o8=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,r=globalThis){if(this.isDisposed)throw new Hy("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let s=r.setInterval(()=>{e()},t);this.disposable=Kn(()=>{r.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},l8;(e=>{async function t(s){let a,l=await Promise.all(s.map(c=>c.then(f=>f,f=>{a||(a=f)})));if(typeof a<"u")throw a;return l}e.settled=t;function r(s){return new Promise(async(a,l)=>{try{await s(a,l)}catch(c){l(c)}})}e.withAsyncBody=r})(l8||(l8={}));var UC=class Ns{static fromArray(t){return new Ns(r=>{r.emitMany(t)})}static fromPromise(t){return new Ns(async r=>{r.emitMany(await t)})}static fromPromises(t){return new Ns(async r=>{await Promise.all(t.map(async s=>r.emitOne(await s)))})}static merge(t){return new Ns(async r=>{await Promise.all(t.map(async s=>{for await(let a of s)r.emitOne(a)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new Ie,queueMicrotask(async()=>{let s={emitOne:a=>this.emitOne(a),emitMany:a=>this.emitMany(a),reject:a=>this.reject(a)};try{await Promise.resolve(t(s)),this.resolve()}catch(a){this.reject(a)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await ar.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var r;return(r=this._onReturn)==null||r.call(this),{done:!0,value:void 0}}}}static map(t,r){return new Ns(async s=>{for await(let a of t)s.emitOne(r(a))})}map(t){return Ns.map(this,t)}static filter(t,r){return new Ns(async s=>{for await(let a of t)r(a)&&s.emitOne(a)})}filter(t){return Ns.filter(this,t)}static coalesce(t){return Ns.filter(t,r=>!!r)}coalesce(){return Ns.coalesce(this)}static async toPromise(t){let r=[];for await(let s of t)r.push(s);return r}toPromise(){return Ns.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};UC.EMPTY=UC.fromArray([]);var{getWindow:fa,getWindowId:c8,onDidRegisterWindow:u8}=function(){let e=new Map,t={window:ro,disposables:new Jo};e.set(ro.vscodeWindowId,t);let r=new Ie,s=new Ie,a=new Ie;function l(c,f){return(typeof c=="number"?e.get(c):void 0)??(f?t:void 0)}return{onDidRegisterWindow:r.event,onWillUnregisterWindow:a.event,onDidUnregisterWindow:s.event,registerWindow(c){if(e.has(c.vscodeWindowId))return nn.None;let f=new Jo,p={window:c,disposables:f.add(new Jo)};return e.set(c.vscodeWindowId,p),f.add(Kn(()=>{e.delete(c.vscodeWindowId),s.fire(c)})),f.add(It(c,Ii.BEFORE_UNLOAD,()=>{a.fire(c)})),r.fire(p),f},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(c){return c.vscodeWindowId},hasWindow(c){return e.has(c)},getWindowById:l,getWindow(c){var m;let f=c;if((m=f==null?void 0:f.ownerDocument)!=null&&m.defaultView)return f.ownerDocument.defaultView.window;let p=c;return p!=null&&p.view?p.view.window:ro},getDocument(c){return fa(c).document}}}(),h8=class{constructor(e,t,r,s){this._node=e,this._type=t,this._handler=r,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function It(e,t,r,s){return new h8(e,t,r,s)}var HC=function(e,t,r,s){return It(e,t,r,s)},ZN,d8=class extends o8{constructor(e){super(),this.defaultTarget=e&&fa(e)}cancelAndSet(e,t,r){return super.cancelAndSet(e,t,r??this.defaultTarget)}},WC=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Pm(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,r=new Map,s=new Map,a=l=>{r.set(l,!1);let c=e.get(l)??[];for(t.set(l,c),e.set(l,[]),s.set(l,!0);c.length>0;)c.sort(WC.sort),c.shift().execute();s.set(l,!1)};ZN=(l,c,f=0)=>{let p=c8(l),m=new WC(c,f),v=e.get(p);return v||(v=[],e.set(p,v)),v.push(m),r.get(p)||(r.set(p,!0),l.requestAnimationFrame(()=>a(p))),m}})();function f8(e){let t=e.getBoundingClientRect(),r=fa(e);return{left:t.left+r.scrollX,top:t.top+r.scrollY,width:t.width,height:t.height}}var Ii={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},p8=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=Ir(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=Ir(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=Ir(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=Ir(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=Ir(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=Ir(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=Ir(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=Ir(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=Ir(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=Ir(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=Ir(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=Ir(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=Ir(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=Ir(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function Ir(e){return typeof e=="number"?`${e}px`:e}function Pd(e){return new p8(e)}var gA=class{constructor(){this._hooks=new Jo,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let r=this._onStopCallback;this._onStopCallback=null,e&&r&&r(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,r,s,a){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=a;let l=e;try{e.setPointerCapture(t),this._hooks.add(Kn(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{l=fa(e)}this._hooks.add(It(l,Ii.POINTER_MOVE,c=>{if(c.buttons!==r){this.stopMonitoring(!0);return}c.preventDefault(),this._pointerMoveCallback(c)})),this._hooks.add(It(l,Ii.POINTER_UP,c=>this.stopMonitoring(!0)))}};function m8(e,t,r){let s=null,a=null;if(typeof r.value=="function"?(s="value",a=r.value,a.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof r.get=="function"&&(s="get",a=r.get),!a)throw new Error("not supported");let l=`$memoize$${t}`;r[s]=function(...c){return this.hasOwnProperty(l)||Object.defineProperty(this,l,{configurable:!1,enumerable:!1,writable:!1,value:a.apply(this,c)}),this[l]}}var oa;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(oa||(oa={}));var Md=class gr extends nn{constructor(){super(),this.dispatched=!1,this.targets=new LC,this.ignoreTargets=new LC,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ar.runAndSubscribe(u8,({window:t,disposables:r})=>{r.add(It(t.document,"touchstart",s=>this.onTouchStart(s),{passive:!1})),r.add(It(t.document,"touchend",s=>this.onTouchEnd(t,s))),r.add(It(t.document,"touchmove",s=>this.onTouchMove(s),{passive:!1}))},{window:ro,disposables:this._store}))}static addTarget(t){if(!gr.isTouchDevice())return nn.None;gr.INSTANCE||(gr.INSTANCE=new gr);let r=gr.INSTANCE.targets.push(t);return Kn(r)}static ignoreTarget(t){if(!gr.isTouchDevice())return nn.None;gr.INSTANCE||(gr.INSTANCE=new gr);let r=gr.INSTANCE.ignoreTargets.push(t);return Kn(r)}static isTouchDevice(){return"ontouchstart"in ro||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let r=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let s=0,a=t.targetTouches.length;s<a;s++){let l=t.targetTouches.item(s);this.activeTouches[l.identifier]={id:l.identifier,initialTarget:l.target,initialTimeStamp:r,initialPageX:l.pageX,initialPageY:l.pageY,rollingTimestamps:[r],rollingPageX:[l.pageX],rollingPageY:[l.pageY]};let c=this.newGestureEvent(oa.Start,l.target);c.pageX=l.pageX,c.pageY=l.pageY,this.dispatchEvent(c)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,r){let s=Date.now(),a=Object.keys(this.activeTouches).length;for(let l=0,c=r.changedTouches.length;l<c;l++){let f=r.changedTouches.item(l);if(!this.activeTouches.hasOwnProperty(String(f.identifier))){console.warn("move of an UNKNOWN touch",f);continue}let p=this.activeTouches[f.identifier],m=Date.now()-p.initialTimeStamp;if(m<gr.HOLD_DELAY&&Math.abs(p.initialPageX-Zr(p.rollingPageX))<30&&Math.abs(p.initialPageY-Zr(p.rollingPageY))<30){let v=this.newGestureEvent(oa.Tap,p.initialTarget);v.pageX=Zr(p.rollingPageX),v.pageY=Zr(p.rollingPageY),this.dispatchEvent(v)}else if(m>=gr.HOLD_DELAY&&Math.abs(p.initialPageX-Zr(p.rollingPageX))<30&&Math.abs(p.initialPageY-Zr(p.rollingPageY))<30){let v=this.newGestureEvent(oa.Contextmenu,p.initialTarget);v.pageX=Zr(p.rollingPageX),v.pageY=Zr(p.rollingPageY),this.dispatchEvent(v)}else if(a===1){let v=Zr(p.rollingPageX),y=Zr(p.rollingPageY),x=Zr(p.rollingTimestamps)-p.rollingTimestamps[0],N=v-p.rollingPageX[0],_=y-p.rollingPageY[0],k=[...this.targets].filter(j=>p.initialTarget instanceof Node&&j.contains(p.initialTarget));this.inertia(t,k,s,Math.abs(N)/x,N>0?1:-1,v,Math.abs(_)/x,_>0?1:-1,y)}this.dispatchEvent(this.newGestureEvent(oa.End,p.initialTarget)),delete this.activeTouches[f.identifier]}this.dispatched&&(r.preventDefault(),r.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,r){let s=document.createEvent("CustomEvent");return s.initEvent(t,!1,!0),s.initialTarget=r,s.tapCount=0,s}dispatchEvent(t){if(t.type===oa.Tap){let r=new Date().getTime(),s=0;r-this._lastSetTapCountTime>gr.CLEAR_TAP_COUNT_TIME?s=1:s=2,this._lastSetTapCountTime=r,t.tapCount=s}else(t.type===oa.Change||t.type===oa.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let s of this.ignoreTargets)if(s.contains(t.initialTarget))return;let r=[];for(let s of this.targets)if(s.contains(t.initialTarget)){let a=0,l=t.initialTarget;for(;l&&l!==s;)a++,l=l.parentElement;r.push([a,s])}r.sort((s,a)=>s[0]-a[0]);for(let[s,a]of r)a.dispatchEvent(t),this.dispatched=!0}}inertia(t,r,s,a,l,c,f,p,m){this.handle=ZN(t,()=>{let v=Date.now(),y=v-s,x=0,N=0,_=!0;a+=gr.SCROLL_FRICTION*y,f+=gr.SCROLL_FRICTION*y,a>0&&(_=!1,x=l*a*y),f>0&&(_=!1,N=p*f*y);let k=this.newGestureEvent(oa.Change);k.translationX=x,k.translationY=N,r.forEach(j=>j.dispatchEvent(k)),_||this.inertia(t,r,v,a,l,c+x,f,p,m+N)})}onTouchMove(t){let r=Date.now();for(let s=0,a=t.changedTouches.length;s<a;s++){let l=t.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(l.identifier))){console.warn("end of an UNKNOWN touch",l);continue}let c=this.activeTouches[l.identifier],f=this.newGestureEvent(oa.Change,c.initialTarget);f.translationX=l.pageX-Zr(c.rollingPageX),f.translationY=l.pageY-Zr(c.rollingPageY),f.pageX=l.pageX,f.pageY=l.pageY,this.dispatchEvent(f),c.rollingPageX.length>3&&(c.rollingPageX.shift(),c.rollingPageY.shift(),c.rollingTimestamps.shift()),c.rollingPageX.push(l.pageX),c.rollingPageY.push(l.pageY),c.rollingTimestamps.push(r)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};Md.SCROLL_FRICTION=-.005,Md.HOLD_DELAY=700,Md.CLEAR_TAP_COUNT_TIME=400,ti([m8],Md,"isTouchDevice",1);var g8=Md,QN=class extends nn{onclick(e,t){this._register(It(e,Ii.CLICK,r=>t(new wm(fa(e),r))))}onmousedown(e,t){this._register(It(e,Ii.MOUSE_DOWN,r=>t(new wm(fa(e),r))))}onmouseover(e,t){this._register(It(e,Ii.MOUSE_OVER,r=>t(new wm(fa(e),r))))}onmouseleave(e,t){this._register(It(e,Ii.MOUSE_LEAVE,r=>t(new wm(fa(e),r))))}onkeydown(e,t){this._register(It(e,Ii.KEY_DOWN,r=>t(new FC(r))))}onkeyup(e,t){this._register(It(e,Ii.KEY_UP,r=>t(new FC(r))))}oninput(e,t){this._register(It(e,Ii.INPUT,t))}onblur(e,t){this._register(It(e,Ii.BLUR,t))}onfocus(e,t){this._register(It(e,Ii.FOCUS,t))}onchange(e,t){this._register(It(e,Ii.CHANGE,t))}ignoreGesture(e){return g8.ignoreTarget(e)}},qC=11,v8=class extends QN{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=qC+"px",this.domNode.style.height=qC+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new gA),this._register(HC(this.bgDomNode,Ii.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(HC(this.domNode,Ii.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new d8),this._pointerdownScheduleRepeatTimer=this._register(new XN)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,fa(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},b8=class Qy{constructor(t,r,s,a,l,c,f){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(r=r|0,s=s|0,a=a|0,l=l|0,c=c|0,f=f|0),this.rawScrollLeft=a,this.rawScrollTop=f,r<0&&(r=0),a+r>s&&(a=s-r),a<0&&(a=0),l<0&&(l=0),f+l>c&&(f=c-l),f<0&&(f=0),this.width=r,this.scrollWidth=s,this.scrollLeft=a,this.height=l,this.scrollHeight=c,this.scrollTop=f}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,r){return new Qy(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,r?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,r?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new Qy(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,r){let s=this.width!==t.width,a=this.scrollWidth!==t.scrollWidth,l=this.scrollLeft!==t.scrollLeft,c=this.height!==t.height,f=this.scrollHeight!==t.scrollHeight,p=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:r,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:s,scrollWidthChanged:a,scrollLeftChanged:l,heightChanged:c,scrollHeightChanged:f,scrollTopChanged:p}}},_8=class extends nn{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Ie),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new b8(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var s;let r=this._state.withScrollDimensions(e,t);this._setState(r,!!this._smoothScrolling),(s=this._smoothScrolling)==null||s.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let r=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let s;t?s=new YC(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):s=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=s}else{let r=this._state.withScrollPosition(e);this._smoothScrolling=YC.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let r=this._state;r.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(r,t)))}},KC=class{constructor(e,t,r){this.scrollLeft=e,this.scrollTop=t,this.isDone=r}};function G_(e,t){let r=t-e;return function(s){return e+r*w8(s)}}function y8(e,t,r){return function(s){return s<r?e(s/r):t((s-r)/(1-r))}}var YC=class eN{constructor(t,r,s,a){this.from=t,this.to=r,this.duration=a,this.startTime=s,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,r,s){if(Math.abs(t-r)>2.5*s){let a,l;return t<r?(a=t+.75*s,l=r-.75*s):(a=t-.75*s,l=r+.75*s),y8(G_(t,a),G_(l,r),.33)}return G_(t,r)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let r=(t-this.startTime)/this.duration;if(r<1){let s=this.scrollLeft(r),a=this.scrollTop(r);return new KC(s,a,!1)}return new KC(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,r,s){return eN.start(t,r,s)}static start(t,r,s){s=s+10;let a=Date.now()-10;return new eN(t,r,a,s)}};function N8(e){return Math.pow(e,3)}function w8(e){return 1-N8(1-e)}var x8=class extends nn{constructor(e,t,r){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=r,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new XN)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},S8=140,vA=class extends QN{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new x8(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new gA),this._shouldRender=!0,this.domNode=Pd(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(It(this.domNode.domNode,Ii.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new v8(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,r,s){this.slider=Pd(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof r=="number"&&this.slider.setWidth(r),typeof s=="number"&&this.slider.setHeight(s),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(It(this.slider.domNode,Ii.POINTER_DOWN,a=>{a.button===0&&(a.preventDefault(),this._sliderPointerDown(a))})),this.onclick(this.slider.domNode,a=>{a.leftButton&&a.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,r=t+this._scrollbarState.getSliderPosition(),s=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),a=this._sliderPointerPosition(e);r<=a&&a<=s?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,r;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,r=e.offsetY;else{let a=f8(this.domNode.domNode);t=e.pageX-a.left,r=e.pageY-a.top}let s=this._pointerDownRelativePosition(t,r);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),r=this._sliderOrthogonalPointerPosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,a=>{let l=this._sliderOrthogonalPointerPosition(a),c=Math.abs(l-r);if(dA&&c>S8){this._setDesiredScrollPositionNow(s.getScrollPosition());return}let f=this._sliderPointerPosition(a)-t;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(f))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},bA=class tN{constructor(t,r,s,a,l,c){this._scrollbarSize=Math.round(r),this._oppositeScrollbarSize=Math.round(s),this._arrowSize=Math.round(t),this._visibleSize=a,this._scrollSize=l,this._scrollPosition=c,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new tN(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let r=Math.round(t);return this._visibleSize!==r?(this._visibleSize=r,this._refreshComputedValues(),!0):!1}setScrollSize(t){let r=Math.round(t);return this._scrollSize!==r?(this._scrollSize=r,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let r=Math.round(t);return this._scrollPosition!==r?(this._scrollPosition=r,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,r,s,a,l){let c=Math.max(0,s-t),f=Math.max(0,c-2*r),p=a>0&&a>s;if(!p)return{computedAvailableSize:Math.round(c),computedIsNeeded:p,computedSliderSize:Math.round(f),computedSliderRatio:0,computedSliderPosition:0};let m=Math.round(Math.max(20,Math.floor(s*f/a))),v=(f-m)/(a-s),y=l*v;return{computedAvailableSize:Math.round(c),computedIsNeeded:p,computedSliderSize:Math.round(m),computedSliderRatio:v,computedSliderPosition:Math.round(y)}}_refreshComputedValues(){let t=tN._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize-this._computedSliderSize/2;return Math.round(r/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize,s=this._scrollPosition;return r<this._computedSliderPosition?s-=this._visibleSize:s+=this._visibleSize,s}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let r=this._computedSliderPosition+t;return Math.round(r/this._computedSliderRatio)}},E8=class extends vA{constructor(e,t,r){let s=e.getScrollDimensions(),a=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new bA(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,s.width,s.scrollWidth,a.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},k8=class extends vA{constructor(e,t,r){let s=e.getScrollDimensions(),a=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new bA(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,s.height,s.scrollHeight,a.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},C8=500,GC=50,D8=class{constructor(e,t,r){this.timestamp=e,this.deltaX=t,this.deltaY=r,this.score=0}},nN=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,r=0,s=1,a=this._rear;do{let l=a===this._front?t:Math.pow(2,-s);if(t-=l,r+=this._memory[a].score*l,a===this._front)break;a=(this._capacity+a-1)%this._capacity,s++}while(!0);return r<=.5}acceptStandardWheelEvent(t){if(GN){let r=fa(t.browserEvent),s=Iz(r);this.accept(Date.now(),t.deltaX*s,t.deltaY*s)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,r,s){let a=null,l=new D8(t,r,s);this._front===-1&&this._rear===-1?(this._memory[0]=l,this._front=0,this._rear=0):(a=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=l),l.score=this._computeScore(l,a)}_computeScore(t,r){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let s=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(s+=.25),r){let a=Math.abs(t.deltaX),l=Math.abs(t.deltaY),c=Math.abs(r.deltaX),f=Math.abs(r.deltaY),p=Math.max(Math.min(a,c),1),m=Math.max(Math.min(l,f),1),v=Math.max(a,c),y=Math.max(l,f);v%p===0&&y%m===0&&(s-=.5)}return Math.min(Math.max(s,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};nN.INSTANCE=new nN;var R8=nN,A8=class extends QN{constructor(e,t,r){super(),this._onScroll=this._register(new Ie),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Ie),this.onWillScroll=this._onWillScroll.event,this._options=M8(t),this._scrollable=r,this._register(this._scrollable.onScroll(a=>{this._onWillScroll.fire(a),this._onDidScroll(a),this._onScroll.fire(a)}));let s={onMouseWheel:a=>this._onMouseWheel(a),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new k8(this._scrollable,this._options,s)),this._horizontalScrollbar=this._register(new E8(this._scrollable,this._options,s)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Pd(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Pd(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Pd(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,a=>this._onMouseOver(a)),this.onmouseleave(this._listenOnDomNode,a=>this._onMouseLeave(a)),this._hideTimeout=this._register(new XN),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=tc(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,ga&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new $C(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=tc(this._mouseWheelToDispose),e)){let t=r=>{this._onMouseWheel(new $C(r))};this._mouseWheelToDispose.push(It(this._listenOnDomNode,Ii.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var a;if((a=e.browserEvent)!=null&&a.defaultPrevented)return;let t=R8.INSTANCE;t.acceptStandardWheelEvent(e);let r=!1;if(e.deltaY||e.deltaX){let l=e.deltaY*this._options.mouseWheelScrollSensitivity,c=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&c+l===0?c=l=0:Math.abs(l)>=Math.abs(c)?c=0:l=0),this._options.flipAxes&&([l,c]=[c,l]);let f=!ga&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||f)&&!c&&(c=l,l=0),e.browserEvent&&e.browserEvent.altKey&&(c=c*this._options.fastScrollSensitivity,l=l*this._options.fastScrollSensitivity);let p=this._scrollable.getFutureScrollPosition(),m={};if(l){let v=GC*l,y=p.scrollTop-(v<0?Math.floor(v):Math.ceil(v));this._verticalScrollbar.writeScrollPosition(m,y)}if(c){let v=GC*c,y=p.scrollLeft-(v<0?Math.floor(v):Math.ceil(v));this._horizontalScrollbar.writeScrollPosition(m,y)}m=this._scrollable.validateScrollPosition(m),(p.scrollLeft!==m.scrollLeft||p.scrollTop!==m.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(m):this._scrollable.setScrollPositionNow(m),r=!0)}let s=r;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,r=e.scrollLeft>0,s=r?" left":"",a=t?" top":"",l=r||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${s}`),this._topShadowDomNode.setClassName(`shadow${a}`),this._topLeftShadowDomNode.setClassName(`shadow${l}${a}${s}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),C8)}},T8=class extends A8{constructor(e,t,r){super(e,t,r)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function M8(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,ga&&(t.className+=" mac"),t}var iN=class extends nn{constructor(e,t,r,s,a,l,c,f){super(),this._bufferService=r,this._optionsService=c,this._renderService=f,this._onRequestScrollLines=this._register(new Ie),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let p=this._register(new _8({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:m=>ZN(s.window,m)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{p.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new T8(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},p)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(a.onProtocolChange(m=>{this._scrollableElement.updateOptions({handleMouseWheel:!(m&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(ar.runAndSubscribe(l.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=l.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Kn(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=s.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Kn(()=>this._styleElement.remove())),this._register(ar.runAndSubscribe(l.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${l.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${l.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${l.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
253
|
+
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(m=>this._handleScroll(m)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),r=t-this._bufferService.buffer.ydisp;r!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(r)),this._isHandlingScroll=!1}};iN=ti([tt(2,Cr),tt(3,oo),tt(4,ZR),tt(5,Mu),tt(6,Dr),tt(7,lo)],iN);var rN=class extends nn{constructor(e,t,r,s,a){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=r,this._decorationService=s,this._renderService=a,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(l=>this._removeDecoration(l))),this._register(Kn(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var s;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((s=e==null?void 0:e.options)==null?void 0:s.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let r=e.options.x??0;return r&&r>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let r=this._decorationElements.get(e);r||(r=this._createElement(e),e.element=r,this._decorationElements.set(e,r),this._container.appendChild(r),e.onDispose(()=>{this._decorationElements.delete(e),r.remove()})),r.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(r.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,r.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(r)}}_refreshXPosition(e,t=e.element){if(!t)return;let r=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=r?`${r*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=r?`${r*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};rN=ti([tt(1,Cr),tt(2,oo),tt(3,of),tt(4,lo)],rN);var O8=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},ra={full:0,left:0,center:0,right:0},Fo={full:0,left:0,center:0,right:0},Nd={full:0,left:0,center:0,right:0},ig=class extends nn{constructor(e,t,r,s,a,l,c,f){var m;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=r,this._decorationService=s,this._renderService=a,this._optionsService=l,this._themeService=c,this._coreBrowserService=f,this._colorZoneStore=new O8,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(),(m=this._viewportElement.parentElement)==null||m.insertBefore(this._canvas,this._viewportElement),this._register(Kn(()=>{var v;return(v=this._canvas)==null?void 0:v.remove()}));let p=this._canvas.getContext("2d");if(p)this._ctx=p;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Fo.full=this._canvas.width,Fo.left=e,Fo.center=t,Fo.right=e,this._refreshDrawHeightConstants(),Nd.full=1,Nd.left=1,Nd.center=1+Fo.left,Nd.right=1+Fo.left+Fo.center}_refreshDrawHeightConstants(){ra.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);ra.left=t,ra.center=t,ra.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ra.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ra.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ra.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ra.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Nd[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-ra[e.position||"full"]/2),Fo[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+ra[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};ig=ti([tt(2,Cr),tt(3,of),tt(4,lo),tt(5,Dr),tt(6,Mu),tt(7,oo)],ig);var we;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
|
|
254
|
+
`,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(we||(we={}));var Fm;(e=>(e.PAD="",e.HOP="",e.BPH="",e.NBH="",e.IND="",e.NEL="
",e.SSA="",e.ESA="",e.HTS="",e.HTJ="",e.VTS="",e.PLD="",e.PLU="",e.RI="",e.SS2="",e.SS3="",e.DCS="",e.PU1="",e.PU2="",e.STS="",e.CCH="",e.MW="",e.SPA="",e.EPA="",e.SOS="",e.SGCI="",e.SCI="",e.CSI="",e.ST="",e.OSC="",e.PM="",e.APC=""))(Fm||(Fm={}));var _A;(e=>e.ST=`${we.ESC}\\`)(_A||(_A={}));var sN=class{constructor(e,t,r,s,a,l){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=s,this._coreService=a,this._renderService=l,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let r;t.start+=this._dataAlreadySent.length,this._isComposing?r=this._textarea.value.substring(t.start,this._compositionPosition.start):r=this._textarea.value.substring(t.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,r=t.replace(e,"");this._dataAlreadySent=r,t.length>e.length?this._coreService.triggerDataEvent(r,!0):t.length<e.length?this._coreService.triggerDataEvent(`${we.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,a=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=a+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let l=this._compositionView.getBoundingClientRect();this._textarea.style.left=a+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(l.width,1)+"px",this._textarea.style.height=Math.max(l.height,1)+"px",this._textarea.style.lineHeight=l.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};sN=ti([tt(2,Cr),tt(3,Dr),tt(4,rc),tt(5,lo)],sN);var Fi=0,zi=0,$i=0,ei=0,JC={css:"#00000000",rgba:0},gi;(e=>{function t(a,l,c,f){return f!==void 0?`#${jl(a)}${jl(l)}${jl(c)}${jl(f)}`:`#${jl(a)}${jl(l)}${jl(c)}`}e.toCss=t;function r(a,l,c,f=255){return(a<<24|l<<16|c<<8|f)>>>0}e.toRgba=r;function s(a,l,c,f){return{css:e.toCss(a,l,c,f),rgba:e.toRgba(a,l,c,f)}}e.toColor=s})(gi||(gi={}));var $n;(e=>{function t(p,m){if(ei=(m.rgba&255)/255,ei===1)return{css:m.css,rgba:m.rgba};let v=m.rgba>>24&255,y=m.rgba>>16&255,x=m.rgba>>8&255,N=p.rgba>>24&255,_=p.rgba>>16&255,k=p.rgba>>8&255;Fi=N+Math.round((v-N)*ei),zi=_+Math.round((y-_)*ei),$i=k+Math.round((x-k)*ei);let j=gi.toCss(Fi,zi,$i),L=gi.toRgba(Fi,zi,$i);return{css:j,rgba:L}}e.blend=t;function r(p){return(p.rgba&255)===255}e.isOpaque=r;function s(p,m,v){let y=zm.ensureContrastRatio(p.rgba,m.rgba,v);if(y)return gi.toColor(y>>24&255,y>>16&255,y>>8&255)}e.ensureContrastRatio=s;function a(p){let m=(p.rgba|255)>>>0;return[Fi,zi,$i]=zm.toChannels(m),{css:gi.toCss(Fi,zi,$i),rgba:m}}e.opaque=a;function l(p,m){return ei=Math.round(m*255),[Fi,zi,$i]=zm.toChannels(p.rgba),{css:gi.toCss(Fi,zi,$i,ei),rgba:gi.toRgba(Fi,zi,$i,ei)}}e.opacity=l;function c(p,m){return ei=p.rgba&255,l(p,ei*m/255)}e.multiplyOpacity=c;function f(p){return[p.rgba>>24&255,p.rgba>>16&255,p.rgba>>8&255]}e.toColorRGB=f})($n||($n={}));var Jn;(e=>{let t,r;try{let a=document.createElement("canvas");a.width=1,a.height=1;let l=a.getContext("2d",{willReadFrequently:!0});l&&(t=l,t.globalCompositeOperation="copy",r=t.createLinearGradient(0,0,1,1))}catch{}function s(a){if(a.match(/#[\da-f]{3,8}/i))switch(a.length){case 4:return Fi=parseInt(a.slice(1,2).repeat(2),16),zi=parseInt(a.slice(2,3).repeat(2),16),$i=parseInt(a.slice(3,4).repeat(2),16),gi.toColor(Fi,zi,$i);case 5:return Fi=parseInt(a.slice(1,2).repeat(2),16),zi=parseInt(a.slice(2,3).repeat(2),16),$i=parseInt(a.slice(3,4).repeat(2),16),ei=parseInt(a.slice(4,5).repeat(2),16),gi.toColor(Fi,zi,$i,ei);case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}let l=a.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(l)return Fi=parseInt(l[1]),zi=parseInt(l[2]),$i=parseInt(l[3]),ei=Math.round((l[5]===void 0?1:parseFloat(l[5]))*255),gi.toColor(Fi,zi,$i,ei);if(!t||!r)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=r,t.fillStyle=a,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[Fi,zi,$i,ei]=t.getImageData(0,0,1,1).data,ei!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:gi.toRgba(Fi,zi,$i,ei),css:a}}e.toColor=s})(Jn||(Jn={}));var Er;(e=>{function t(s){return r(s>>16&255,s>>8&255,s&255)}e.relativeLuminance=t;function r(s,a,l){let c=s/255,f=a/255,p=l/255,m=c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4),v=f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4),y=p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4);return m*.2126+v*.7152+y*.0722}e.relativeLuminance2=r})(Er||(Er={}));var zm;(e=>{function t(c,f){if(ei=(f&255)/255,ei===1)return f;let p=f>>24&255,m=f>>16&255,v=f>>8&255,y=c>>24&255,x=c>>16&255,N=c>>8&255;return Fi=y+Math.round((p-y)*ei),zi=x+Math.round((m-x)*ei),$i=N+Math.round((v-N)*ei),gi.toRgba(Fi,zi,$i)}e.blend=t;function r(c,f,p){let m=Er.relativeLuminance(c>>8),v=Er.relativeLuminance(f>>8);if(Ya(m,v)<p){if(v<m){let N=s(c,f,p),_=Ya(m,Er.relativeLuminance(N>>8));if(_<p){let k=a(c,f,p),j=Ya(m,Er.relativeLuminance(k>>8));return _>j?N:k}return N}let y=a(c,f,p),x=Ya(m,Er.relativeLuminance(y>>8));if(x<p){let N=s(c,f,p),_=Ya(m,Er.relativeLuminance(N>>8));return x>_?y:N}return y}}e.ensureContrastRatio=r;function s(c,f,p){let m=c>>24&255,v=c>>16&255,y=c>>8&255,x=f>>24&255,N=f>>16&255,_=f>>8&255,k=Ya(Er.relativeLuminance2(x,N,_),Er.relativeLuminance2(m,v,y));for(;k<p&&(x>0||N>0||_>0);)x-=Math.max(0,Math.ceil(x*.1)),N-=Math.max(0,Math.ceil(N*.1)),_-=Math.max(0,Math.ceil(_*.1)),k=Ya(Er.relativeLuminance2(x,N,_),Er.relativeLuminance2(m,v,y));return(x<<24|N<<16|_<<8|255)>>>0}e.reduceLuminance=s;function a(c,f,p){let m=c>>24&255,v=c>>16&255,y=c>>8&255,x=f>>24&255,N=f>>16&255,_=f>>8&255,k=Ya(Er.relativeLuminance2(x,N,_),Er.relativeLuminance2(m,v,y));for(;k<p&&(x<255||N<255||_<255);)x=Math.min(255,x+Math.ceil((255-x)*.1)),N=Math.min(255,N+Math.ceil((255-N)*.1)),_=Math.min(255,_+Math.ceil((255-_)*.1)),k=Ya(Er.relativeLuminance2(x,N,_),Er.relativeLuminance2(m,v,y));return(x<<24|N<<16|_<<8|255)>>>0}e.increaseLuminance=a;function l(c){return[c>>24&255,c>>16&255,c>>8&255,c&255]}e.toChannels=l})(zm||(zm={}));function jl(e){let t=e.toString(16);return t.length<2?"0"+t:t}function Ya(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var j8=class extends af{constructor(e,t,r){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},rg=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new xs}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let r=[],s=t.translateToString(!0),a=0,l=0,c=0,f=t.getFg(0),p=t.getBg(0);for(let m=0;m<t.getTrimmedLength();m++)if(t.loadCell(m,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==f||this._workCell.bg!==p){if(m-a>1){let v=this._getJoinedRanges(s,c,l,t,a);for(let y=0;y<v.length;y++)r.push(v[y])}a=m,c=l,f=this._workCell.fg,p=this._workCell.bg}l+=this._workCell.getChars().length||Go.length}if(this._bufferService.cols-a>1){let m=this._getJoinedRanges(s,c,l,t,a);for(let v=0;v<m.length;v++)r.push(m[v])}return r}_getJoinedRanges(e,t,r,s,a){let l=e.substring(t,r),c=[];try{c=this._characterJoiners[0].handler(l)}catch(f){console.error(f)}for(let f=1;f<this._characterJoiners.length;f++)try{let p=this._characterJoiners[f].handler(l);for(let m=0;m<p.length;m++)rg._mergeRanges(c,p[m])}catch(p){console.error(p)}return this._stringRangesToCellRanges(c,s,a),c}_stringRangesToCellRanges(e,t,r){let s=0,a=!1,l=0,c=e[s];if(c){for(let f=r;f<this._bufferService.cols;f++){let p=t.getWidth(f),m=t.getString(f).length||Go.length;if(p!==0){if(!a&&c[0]<=l&&(c[0]=f,a=!0),c[1]<=l){if(c[1]=f,c=e[++s],!c)break;c[0]<=l?(c[0]=f,a=!0):a=!1}l+=m}}c&&(c[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let r=!1;for(let s=0;s<e.length;s++){let a=e[s];if(r){if(t[1]<=a[0])return e[s-1][1]=t[1],e;if(t[1]<=a[1])return e[s-1][1]=Math.max(t[1],a[1]),e.splice(s,1),e;e.splice(s,1),s--}else{if(t[1]<=a[0])return e.splice(s,0,t),e;if(t[1]<=a[1])return a[0]=Math.min(t[0],a[0]),e;t[0]<a[1]&&(a[0]=Math.min(t[0],a[0]),r=!0);continue}}return r?e[e.length-1][1]=t[1]:e.push(t),e}};rg=ti([tt(0,Cr)],rg);function L8(e){return 57508<=e&&e<=57558}function B8(e){return 9472<=e&&e<=9631}function P8(e){return L8(e)||B8(e)}function V8(){return{css:{canvas:xm(),cell:xm()},device:{canvas:xm(),cell:xm(),char:{width:0,height:0,left:0,top:0}}}}function xm(){return{width:0,height:0}}var aN=class{constructor(e,t,r,s,a,l,c){this._document=e,this._characterJoinerService=t,this._optionsService=r,this._coreBrowserService=s,this._coreService=a,this._decorationService=l,this._themeService=c,this._workCell=new xs,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r}createRow(e,t,r,s,a,l,c,f,p,m,v){let y=[],x=this._characterJoinerService.getJoinedCharacters(t),N=this._themeService.colors,_=e.getNoBgTrimmedLength();r&&_<l+1&&(_=l+1);let k,j=0,L="",P=0,O=0,T=0,B=0,U=!1,ce=0,re=!1,Z=0,ve=0,pe=[],Q=m!==-1&&v!==-1;for(let C=0;C<_;C++){e.loadCell(C,this._workCell);let J=this._workCell.getWidth();if(J===0)continue;let Y=!1,z=C>=ve,X=C,$=this._workCell;if(x.length>0&&C===x[0][0]&&z){let $e=x.shift(),nt=this._isCellInSelection($e[0],t);for(P=$e[0]+1;P<$e[1];P++)z&&(z=nt===this._isCellInSelection(P,t));z&&(z=!r||l<$e[0]||l>=$e[1]),z?(Y=!0,$=new j8(this._workCell,e.translateToString(!0,$e[0],$e[1]),$e[1]-$e[0]),X=$e[1]-1,J=$.getWidth()):ve=$e[1]}let xe=this._isCellInSelection(C,t),Me=r&&C===l,Pe=Q&&C>=m&&C<=v,ze=!1;this._decorationService.forEachDecorationAtCell(C,t,void 0,$e=>{ze=!0});let ge=$.getChars()||Go;if(ge===" "&&($.isUnderline()||$.isOverline())&&(ge=" "),Z=J*f-p.get(ge,$.isBold(),$.isItalic()),!k)k=this._document.createElement("span");else if(j&&(xe&&re||!xe&&!re&&$.bg===O)&&(xe&&re&&N.selectionForeground||$.fg===T)&&$.extended.ext===B&&Pe===U&&Z===ce&&!Me&&!Y&&!ze&&z){$.isInvisible()?L+=Go:L+=ge,j++;continue}else j&&(k.textContent=L),k=this._document.createElement("span"),j=0,L="";if(O=$.bg,T=$.fg,B=$.extended.ext,U=Pe,ce=Z,re=xe,Y&&l>=C&&l<=X&&(l=C),!this._coreService.isCursorHidden&&Me&&this._coreService.isCursorInitialized){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)c&&pe.push("xterm-cursor-blink"),pe.push(s==="bar"?"xterm-cursor-bar":s==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(a)switch(a){case"outline":pe.push("xterm-cursor-outline");break;case"block":pe.push("xterm-cursor-block");break;case"bar":pe.push("xterm-cursor-bar");break;case"underline":pe.push("xterm-cursor-underline");break}}if($.isBold()&&pe.push("xterm-bold"),$.isItalic()&&pe.push("xterm-italic"),$.isDim()&&pe.push("xterm-dim"),$.isInvisible()?L=Go:L=$.getChars()||Go,$.isUnderline()&&(pe.push(`xterm-underline-${$.extended.underlineStyle}`),L===" "&&(L=" "),!$.isUnderlineColorDefault()))if($.isUnderlineColorRGB())k.style.textDecorationColor=`rgb(${af.toColorRGB($.getUnderlineColor()).join(",")})`;else{let $e=$.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&$.isBold()&&$e<8&&($e+=8),k.style.textDecorationColor=N.ansi[$e].css}$.isOverline()&&(pe.push("xterm-overline"),L===" "&&(L=" ")),$.isStrikethrough()&&pe.push("xterm-strikethrough"),Pe&&(k.style.textDecoration="underline");let ye=$.getFgColor(),mt=$.getFgColorMode(),pt=$.getBgColor(),Ut=$.getBgColorMode(),Ht=!!$.isInverse();if(Ht){let $e=ye;ye=pt,pt=$e;let nt=mt;mt=Ut,Ut=nt}let Tt,Xt,Et=!1;this._decorationService.forEachDecorationAtCell(C,t,void 0,$e=>{$e.options.layer!=="top"&&Et||($e.backgroundColorRGB&&(Ut=50331648,pt=$e.backgroundColorRGB.rgba>>8&16777215,Tt=$e.backgroundColorRGB),$e.foregroundColorRGB&&(mt=50331648,ye=$e.foregroundColorRGB.rgba>>8&16777215,Xt=$e.foregroundColorRGB),Et=$e.options.layer==="top")}),!Et&&xe&&(Tt=this._coreBrowserService.isFocused?N.selectionBackgroundOpaque:N.selectionInactiveBackgroundOpaque,pt=Tt.rgba>>8&16777215,Ut=50331648,Et=!0,N.selectionForeground&&(mt=50331648,ye=N.selectionForeground.rgba>>8&16777215,Xt=N.selectionForeground)),Et&&pe.push("xterm-decoration-top");let kt;switch(Ut){case 16777216:case 33554432:kt=N.ansi[pt],pe.push(`xterm-bg-${pt}`);break;case 50331648:kt=gi.toColor(pt>>16,pt>>8&255,pt&255),this._addStyle(k,`background-color:#${XC((pt>>>0).toString(16),"0",6)}`);break;case 0:default:Ht?(kt=N.foreground,pe.push("xterm-bg-257")):kt=N.background}switch(Tt||$.isDim()&&(Tt=$n.multiplyOpacity(kt,.5)),mt){case 16777216:case 33554432:$.isBold()&&ye<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ye+=8),this._applyMinimumContrast(k,kt,N.ansi[ye],$,Tt,void 0)||pe.push(`xterm-fg-${ye}`);break;case 50331648:let $e=gi.toColor(ye>>16&255,ye>>8&255,ye&255);this._applyMinimumContrast(k,kt,$e,$,Tt,Xt)||this._addStyle(k,`color:#${XC(ye.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(k,kt,N.foreground,$,Tt,Xt)||Ht&&pe.push("xterm-fg-257")}pe.length&&(k.className=pe.join(" "),pe.length=0),!Me&&!Y&&!ze&&z?j++:k.textContent=L,Z!==this.defaultSpacing&&(k.style.letterSpacing=`${Z}px`),y.push(k),C=X}return k&&j&&(k.textContent=L),y}_applyMinimumContrast(e,t,r,s,a,l){if(this._optionsService.rawOptions.minimumContrastRatio===1||P8(s.getCode()))return!1;let c=this._getContrastCache(s),f;if(!a&&!l&&(f=c.getColor(t.rgba,r.rgba)),f===void 0){let p=this._optionsService.rawOptions.minimumContrastRatio/(s.isDim()?2:1);f=$n.ensureContrastRatio(a||t,l||r,p),c.setColor((a||t).rgba,(l||r).rgba,f??null)}return f?(this._addStyle(e,`color:${f.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let r=this._selectionStart,s=this._selectionEnd;return!r||!s?!1:this._columnSelectMode?r[0]<=s[0]?e>=r[0]&&t>=r[1]&&e<s[0]&&t<=s[1]:e<r[0]&&t>=r[1]&&e>=s[0]&&t<=s[1]:t>r[1]&&t<s[1]||r[1]===s[1]&&t===r[1]&&e>=r[0]&&e<s[0]||r[1]<s[1]&&t===s[1]&&e<s[0]||r[1]<s[1]&&t===r[1]&&e>=r[0]}};aN=ti([tt(1,tA),tt(2,Dr),tt(3,oo),tt(4,rc),tt(5,of),tt(6,Mu)],aN);function XC(e,t,r){for(;e.length<r;)e=t+e;return e}var I8=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let r=e.createElement("span");r.classList.add("xterm-char-measure-element");let s=e.createElement("span");s.classList.add("xterm-char-measure-element"),s.style.fontWeight="bold";let a=e.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontStyle="italic";let l=e.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontWeight="bold",l.style.fontStyle="italic",this._measureElements=[r,s,a,l],this._container.appendChild(r),this._container.appendChild(s),this._container.appendChild(a),this._container.appendChild(l),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,r,s){e===this._font&&t===this._fontSize&&r===this._weight&&s===this._weightBold||(this._font=e,this._fontSize=t,this._weight=r,this._weightBold=s,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${r}`,this._measureElements[1].style.fontWeight=`${s}`,this._measureElements[2].style.fontWeight=`${r}`,this._measureElements[3].style.fontWeight=`${s}`,this.clear())}get(e,t,r){let s=0;if(!t&&!r&&e.length===1&&(s=e.charCodeAt(0))<256){if(this._flat[s]!==-9999)return this._flat[s];let c=this._measure(e,0);return c>0&&(this._flat[s]=c),c}let a=e;t&&(a+="B"),r&&(a+="I");let l=this._holey.get(a);if(l===void 0){let c=0;t&&(c|=1),r&&(c|=2),l=this._measure(e,c),l>0&&this._holey.set(a,l)}return l}_measure(e,t){let r=this._measureElements[t];return r.textContent=e.repeat(32),r.offsetWidth/32}},F8=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,r,s=!1){if(this.selectionStart=t,this.selectionEnd=r,!t||!r||t[0]===r[0]&&t[1]===r[1]){this.clear();return}let a=e.buffers.active.ydisp,l=t[1]-a,c=r[1]-a,f=Math.max(l,0),p=Math.min(c,e.rows-1);if(f>=e.rows||p<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=s,this.viewportStartRow=l,this.viewportEndRow=c,this.viewportCappedStartRow=f,this.viewportCappedEndRow=p,this.startCol=t[0],this.endCol=r[0]}isCellSelected(e,t,r){return this.hasSelection?(r-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&r>=this.viewportCappedStartRow&&t<this.endCol&&r<=this.viewportCappedEndRow:t<this.startCol&&r>=this.viewportCappedStartRow&&t>=this.endCol&&r<=this.viewportCappedEndRow:r>this.viewportStartRow&&r<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol):!1}};function z8(){return new F8}var J_="xterm-dom-renderer-owner-",_s="xterm-rows",Sm="xterm-fg-",ZC="xterm-bg-",wd="xterm-focus",Em="xterm-selection",$8=1,oN=class extends nn{constructor(e,t,r,s,a,l,c,f,p,m,v,y,x,N){super(),this._terminal=e,this._document=t,this._element=r,this._screenElement=s,this._viewportElement=a,this._helperContainer=l,this._linkifier2=c,this._charSizeService=p,this._optionsService=m,this._bufferService=v,this._coreService=y,this._coreBrowserService=x,this._themeService=N,this._terminalClass=$8++,this._rowElements=[],this._selectionRenderModel=z8(),this.onRequestRedraw=this._register(new Ie).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(Em),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=V8(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(_=>this._injectCss(_))),this._injectCss(this._themeService.colors),this._rowFactory=f.createInstance(aN,document),this._element.classList.add(J_+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(_=>this._handleLinkHover(_))),this._register(this._linkifier2.onHideLinkUnderline(_=>this._handleLinkLeave(_))),this._register(Kn(()=>{this._element.classList.remove(J_+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new I8(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let r of this._rowElements)r.style.width=`${this.dimensions.css.canvas.width}px`,r.style.height=`${this.dimensions.css.cell.height}px`,r.style.lineHeight=`${this.dimensions.css.cell.height}px`,r.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${_s} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${_s} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${_s} .xterm-dim { color: ${$n.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let r=`blink_underline_${this._terminalClass}`,s=`blink_bar_${this._terminalClass}`,a=`blink_block_${this._terminalClass}`;t+=`@keyframes ${r} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${s} { 50% { box-shadow: none; }}`,t+=`@keyframes ${a} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${_s}.${wd} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${_s}.${wd} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s} 1s step-end infinite;}${this._terminalSelector} .${_s}.${wd} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${a} 1s step-end infinite;}${this._terminalSelector} .${_s} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${_s} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${_s} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${_s} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${_s} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Em} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Em} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Em} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[l,c]of e.ansi.entries())t+=`${this._terminalSelector} .${Sm}${l} { color: ${c.css}; }${this._terminalSelector} .${Sm}${l}.xterm-dim { color: ${$n.multiplyOpacity(c,.5).css}; }${this._terminalSelector} .${ZC}${l} { background-color: ${c.css}; }`;t+=`${this._terminalSelector} .${Sm}257 { color: ${$n.opaque(e.background).css}; }${this._terminalSelector} .${Sm}257.xterm-dim { color: ${$n.multiplyOpacity($n.opaque(e.background),.5).css}; }${this._terminalSelector} .${ZC}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let r=this._rowElements.length;r<=t;r++){let s=this._document.createElement("div");this._rowContainer.appendChild(s),this._rowElements.push(s)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(wd),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(wd),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,r){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,r),!this._selectionRenderModel.hasSelection))return;let s=this._selectionRenderModel.viewportStartRow,a=this._selectionRenderModel.viewportEndRow,l=this._selectionRenderModel.viewportCappedStartRow,c=this._selectionRenderModel.viewportCappedEndRow,f=this._document.createDocumentFragment();if(r){let p=e[0]>t[0];f.appendChild(this._createSelectionElement(l,p?t[0]:e[0],p?e[0]:t[0],c-l+1))}else{let p=s===l?e[0]:0,m=l===a?t[0]:this._bufferService.cols;f.appendChild(this._createSelectionElement(l,p,m));let v=c-l-1;if(f.appendChild(this._createSelectionElement(l+1,0,this._bufferService.cols,v)),l!==c){let y=a===c?t[0]:this._bufferService.cols;f.appendChild(this._createSelectionElement(c,0,y))}}this._selectionContainer.appendChild(f)}_createSelectionElement(e,t,r,s=1){let a=this._document.createElement("div"),l=t*this.dimensions.css.cell.width,c=this.dimensions.css.cell.width*(r-t);return l+c>this.dimensions.css.canvas.width&&(c=this.dimensions.css.canvas.width-l),a.style.height=`${s*this.dimensions.css.cell.height}px`,a.style.top=`${e*this.dimensions.css.cell.height}px`,a.style.left=`${l}px`,a.style.width=`${c}px`,a}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let r=this._bufferService.buffer,s=r.ybase+r.y,a=Math.min(r.x,this._bufferService.cols-1),l=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,c=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let p=e;p<=t;p++){let m=p+r.ydisp,v=this._rowElements[p],y=r.lines.get(m);if(!v||!y)break;v.replaceChildren(...this._rowFactory.createRow(y,m,m===s,c,f,a,l,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${J_}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,r,s,a,l){r<0&&(e=0),s<0&&(t=0);let c=this._bufferService.rows-1;r=Math.max(Math.min(r,c),0),s=Math.max(Math.min(s,c),0),a=Math.min(a,this._bufferService.cols);let f=this._bufferService.buffer,p=f.ybase+f.y,m=Math.min(f.x,a-1),v=this._optionsService.rawOptions.cursorBlink,y=this._optionsService.rawOptions.cursorStyle,x=this._optionsService.rawOptions.cursorInactiveStyle;for(let N=r;N<=s;++N){let _=N+f.ydisp,k=this._rowElements[N],j=f.lines.get(_);if(!k||!j)break;k.replaceChildren(...this._rowFactory.createRow(j,_,_===p,y,x,m,v,this.dimensions.css.cell.width,this._widthCache,l?N===r?e:0:-1,l?(N===s?t:a)-1:-1))}}};oN=ti([tt(7,qN),tt(8,gg),tt(9,Dr),tt(10,Cr),tt(11,rc),tt(12,oo),tt(13,Mu)],oN);var lN=class extends nn{constructor(e,t,r){super(),this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=this._register(new Ie),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new H8(this._optionsService))}catch{this._measureStrategy=this._register(new U8(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};lN=ti([tt(2,Dr)],lN);var yA=class extends nn{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},U8=class extends yA{constructor(e,t,r){super(),this._document=e,this._parentElement=t,this._optionsService=r,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},H8=class extends yA{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},W8=class extends nn{constructor(e,t,r){super(),this._textarea=e,this._window=t,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new q8(this._window)),this._onDprChange=this._register(new Ie),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new Ie),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this._register(ar.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(It(this._textarea,"focus",()=>this._isFocused=!0)),this._register(It(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},q8=class extends nn{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Du),this._onDprChange=this._register(new Ie),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Kn(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=It(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},K8=class extends nn{constructor(){super(),this.linkProviders=[],this._register(Kn(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function ew(e,t,r){let s=r.getBoundingClientRect(),a=e.getComputedStyle(r),l=parseInt(a.getPropertyValue("padding-left")),c=parseInt(a.getPropertyValue("padding-top"));return[t.clientX-s.left-l,t.clientY-s.top-c]}function Y8(e,t,r,s,a,l,c,f,p){if(!l)return;let m=ew(e,t,r);if(m)return m[0]=Math.ceil((m[0]+(p?c/2:0))/c),m[1]=Math.ceil(m[1]/f),m[0]=Math.min(Math.max(m[0],1),s+(p?1:0)),m[1]=Math.min(Math.max(m[1],1),a),m}var cN=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,r,s,a){return Y8(window,e,t,r,s,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(e,t){let r=ew(window,e,t);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};cN=ti([tt(0,lo),tt(1,gg)],cN);var G8=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},NA={};sz(NA,{getSafariVersion:()=>X8,isChromeOS:()=>EA,isFirefox:()=>wA,isIpad:()=>Z8,isIphone:()=>Q8,isLegacyEdge:()=>J8,isLinux:()=>tw,isMac:()=>sg,isNode:()=>vg,isSafari:()=>xA,isWindows:()=>SA});var vg=typeof process<"u"&&"title"in process,lf=vg?"node":navigator.userAgent,cf=vg?"node":navigator.platform,wA=lf.includes("Firefox"),J8=lf.includes("Edge"),xA=/^((?!chrome|android).)*safari/i.test(lf);function X8(){if(!xA)return 0;let e=lf.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var sg=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(cf),Z8=cf==="iPad",Q8=cf==="iPhone",SA=["Windows","Win16","Win32","WinCE"].includes(cf),tw=cf.indexOf("Linux")>=0,EA=/\bCrOS\b/.test(lf),kA=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,r=0,s=e.timeRemaining(),a=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),r=Math.max(t,r),a=e.timeRemaining(),r*1.5>a){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=a}this.clear()}},e$=class extends kA{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},t$=class extends kA{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},ag=!vg&&"requestIdleCallback"in window?t$:e$,n$=class{constructor(){this._queue=new ag}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},uN=class extends nn{constructor(e,t,r,s,a,l,c,f,p){super(),this._rowCount=e,this._optionsService=r,this._charSizeService=s,this._coreService=a,this._coreBrowserService=f,this._renderer=this._register(new Du),this._pausedResizeTask=new n$,this._observerDisposable=this._register(new Du),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 Ie),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new Ie),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new Ie),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new Ie),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new G8((m,v)=>this._renderRows(m,v),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new i$(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Kn(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(c.onResize(()=>this._fullRefresh())),this._register(c.buffers.onBufferActivate(()=>{var m;return(m=this._renderer.value)==null?void 0:m.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(l.onDecorationRegistered(()=>this._fullRefresh())),this._register(l.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(c.cols,c.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(c.buffer.y,c.buffer.y,!0))),this._register(p.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(m=>this._registerIntersectionObserver(m,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let r=new e.IntersectionObserver(s=>this._handleIntersectionChange(s[s.length-1]),{threshold:0});r.observe(t),this._observerDisposable.value=Kn(()=>r.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let s=this._syncOutputHandler.flush();s&&(e=Math.min(e,s.start),t=Math.max(t,s.end)),r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var r;return(r=this._renderer.value)==null?void 0:r.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,r){var s;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,(s=this._renderer.value)==null||s.handleSelectionChanged(e,t,r)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};uN=ti([tt(2,Dr),tt(3,gg),tt(4,rc),tt(5,of),tt(6,Cr),tt(7,oo),tt(8,Mu)],uN);var i$=class{constructor(e,t,r){this._coreBrowserService=e,this._coreService=t,this._onTimeout=r,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function r$(e,t,r,s){let a=r.buffer.x,l=r.buffer.y;if(!r.buffer.hasScrollback)return o$(a,l,e,t,r,s)+bg(l,t,r,s)+l$(a,l,e,t,r,s);let c;if(l===t)return c=a>e?"D":"C",ef(Math.abs(a-e),Qd(c,s));c=l>t?"D":"C";let f=Math.abs(l-t),p=a$(l>t?e:a,r)+(f-1)*r.cols+1+s$(l>t?a:e);return ef(p,Qd(c,s))}function s$(e,t){return e-1}function a$(e,t){return t.cols-e}function o$(e,t,r,s,a,l){return bg(t,s,a,l).length===0?"":ef(DA(e,t,e,t-nc(t,a),!1,a).length,Qd("D",l))}function bg(e,t,r,s){let a=e-nc(e,r),l=t-nc(t,r),c=Math.abs(a-l)-c$(e,t,r);return ef(c,Qd(CA(e,t),s))}function l$(e,t,r,s,a,l){let c;bg(t,s,a,l).length>0?c=s-nc(s,a):c=t;let f=s,p=u$(e,t,r,s,a,l);return ef(DA(e,c,r,f,p==="C",a).length,Qd(p,l))}function c$(e,t,r){var c;let s=0,a=e-nc(e,r),l=t-nc(t,r);for(let f=0;f<Math.abs(a-l);f++){let p=CA(e,t)==="A"?-1:1;(c=r.buffer.lines.get(a+p*f))!=null&&c.isWrapped&&s++}return s}function nc(e,t){let r=0,s=t.buffer.lines.get(e),a=s==null?void 0:s.isWrapped;for(;a&&e>=0&&e<t.rows;)r++,s=t.buffer.lines.get(--e),a=s==null?void 0:s.isWrapped;return r}function u$(e,t,r,s,a,l){let c;return bg(r,s,a,l).length>0?c=s-nc(s,a):c=t,e<r&&c<=s||e>=r&&c<s?"C":"D"}function CA(e,t){return e>t?"A":"B"}function DA(e,t,r,s,a,l){let c=e,f=t,p="";for(;(c!==r||f!==s)&&f>=0&&f<l.buffer.lines.length;)c+=a?1:-1,a&&c>l.cols-1?(p+=l.buffer.translateBufferLineToString(f,!1,e,c),c=0,e=0,f++):!a&&c<0&&(p+=l.buffer.translateBufferLineToString(f,!1,0,e+1),c=l.cols-1,e=c,f--);return p+l.buffer.translateBufferLineToString(f,!1,e,c)}function Qd(e,t){let r=t?"O":"[";return we.ESC+r+e}function ef(e,t){e=Math.floor(e);let r="";for(let s=0;s<e;s++)r+=t;return r}var h$=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function QC(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var X_=50,d$=15,f$=50,p$=500,m$=" ",g$=new RegExp(m$,"g"),hN=class extends nn{constructor(e,t,r,s,a,l,c,f,p){super(),this._element=e,this._screenElement=t,this._linkifier=r,this._bufferService=s,this._coreService=a,this._mouseService=l,this._optionsService=c,this._renderService=f,this._coreBrowserService=p,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new xs,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new Ie),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new Ie),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new Ie),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new Ie),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=m=>this._handleMouseMove(m),this._mouseUpListener=m=>this._handleMouseUp(m),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(m=>this._handleTrim(m)),this._register(this._bufferService.buffers.onBufferActivate(m=>this._handleBufferActivate(m))),this.enable(),this._model=new h$(this._bufferService),this._activeSelectionMode=0,this._register(Kn(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(m=>{m.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let r=this._bufferService.buffer,s=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let a=e[0]<t[0]?e[0]:t[0],l=e[0]<t[0]?t[0]:e[0];for(let c=e[1];c<=t[1];c++){let f=r.translateBufferLineToString(c,!0,a,l);s.push(f)}}else{let a=e[1]===t[1]?t[0]:void 0;s.push(r.translateBufferLineToString(e[1],!0,e[0],a));for(let l=e[1]+1;l<=t[1]-1;l++){let c=r.lines.get(l),f=r.translateBufferLineToString(l,!0);c!=null&&c.isWrapped?s[s.length-1]+=f:s.push(f)}if(e[1]!==t[1]){let l=r.lines.get(t[1]),c=r.translateBufferLineToString(t[1],!0,0,t[0]);l&&l.isWrapped?s[s.length-1]+=c:s.push(c)}}return s.map(a=>a.replace(g$," ")).join(SA?`\r
|
|
255
|
+
`:`
|
|
256
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),tw&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!r||!s||!t?!1:this._areCoordsInSelection(t,r,s)}isCellInSelection(e,t){let r=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!r||!s?!1:this._areCoordsInSelection([e,t],r,s)}_areCoordsInSelection(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var a,l;let r=(l=(a=this._linkifier.currentLink)==null?void 0:a.link)==null?void 0:l.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=QC(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let s=this._getMouseBufferCoords(e);return s?(this._selectWordAt(s,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=ew(this._coreBrowserService.window,e,this._screenElement)[1],r=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-X_),X_),t/=X_,t/Math.abs(t)+Math.round(t*(d$-1)))}shouldForceSelection(e){return sg?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),f$)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(sg&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){let s=r.lines.get(this._model.selectionEnd[1]);s&&s.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<p$&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&r[0]!==void 0&&r[1]!==void 0){let s=r$(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(s,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!r){this._oldHasSelection&&this._fireOnSelectionChange(e,t,r);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,r)}_fireOnSelectionChange(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let r=t;for(let s=0;t>=s;s++){let a=e.loadCell(s,this._workCell).getChars().length;this._workCell.getWidth()===0?r--:a>1&&t!==s&&(r+=a-1)}return r}setSelection(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,r=!0,s=!0){if(e[0]>=this._bufferService.cols)return;let a=this._bufferService.buffer,l=a.lines.get(e[1]);if(!l)return;let c=a.translateBufferLineToString(e[1],!1),f=this._convertViewportColToCharacterIndex(l,e[0]),p=f,m=e[0]-f,v=0,y=0,x=0,N=0;if(c.charAt(f)===" "){for(;f>0&&c.charAt(f-1)===" ";)f--;for(;p<c.length&&c.charAt(p+1)===" ";)p++}else{let j=e[0],L=e[0];l.getWidth(j)===0&&(v++,j--),l.getWidth(L)===2&&(y++,L++);let P=l.getString(L).length;for(P>1&&(N+=P-1,p+=P-1);j>0&&f>0&&!this._isCharWordSeparator(l.loadCell(j-1,this._workCell));){l.loadCell(j-1,this._workCell);let O=this._workCell.getChars().length;this._workCell.getWidth()===0?(v++,j--):O>1&&(x+=O-1,f-=O-1),f--,j--}for(;L<l.length&&p+1<c.length&&!this._isCharWordSeparator(l.loadCell(L+1,this._workCell));){l.loadCell(L+1,this._workCell);let O=this._workCell.getChars().length;this._workCell.getWidth()===2?(y++,L++):O>1&&(N+=O-1,p+=O-1),p++,L++}}p++;let _=f+m-v+x,k=Math.min(this._bufferService.cols,p-f+v+y-x-N);if(!(!t&&c.slice(f,p).trim()==="")){if(r&&_===0&&l.getCodePoint(0)!==32){let j=a.lines.get(e[1]-1);if(j&&l.isWrapped&&j.getCodePoint(this._bufferService.cols-1)!==32){let L=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(L){let P=this._bufferService.cols-L.start;_-=P,k+=P}}}if(s&&_+k===this._bufferService.cols&&l.getCodePoint(this._bufferService.cols-1)!==32){let j=a.lines.get(e[1]+1);if(j!=null&&j.isWrapped&&j.getCodePoint(0)!==32){let L=this._getWordAt([0,e[1]+1],!1,!1,!0);L&&(k+=L.length)}}return{start:_,length:k}}}_selectWordAt(e,t){let r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let r=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=QC(r,this._bufferService.cols)}};hN=ti([tt(3,Cr),tt(4,rc),tt(5,KN),tt(6,Dr),tt(7,lo),tt(8,oo)],hN);var eD=class{constructor(){this._data={}}set(e,t,r){this._data[e]||(this._data[e]={}),this._data[e][t]=r}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},tD=class{constructor(){this._color=new eD,this._css=new eD}setCss(e,t,r){this._css.set(e,t,r)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,r){this._color.set(e,t,r)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},ki=Object.freeze((()=>{let e=[Jn.toColor("#2e3436"),Jn.toColor("#cc0000"),Jn.toColor("#4e9a06"),Jn.toColor("#c4a000"),Jn.toColor("#3465a4"),Jn.toColor("#75507b"),Jn.toColor("#06989a"),Jn.toColor("#d3d7cf"),Jn.toColor("#555753"),Jn.toColor("#ef2929"),Jn.toColor("#8ae234"),Jn.toColor("#fce94f"),Jn.toColor("#729fcf"),Jn.toColor("#ad7fa8"),Jn.toColor("#34e2e2"),Jn.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let r=0;r<216;r++){let s=t[r/36%6|0],a=t[r/6%6|0],l=t[r%6];e.push({css:gi.toCss(s,a,l),rgba:gi.toRgba(s,a,l)})}for(let r=0;r<24;r++){let s=8+r*10;e.push({css:gi.toCss(s,s,s),rgba:gi.toRgba(s,s,s)})}return e})()),Pl=Jn.toColor("#ffffff"),Od=Jn.toColor("#000000"),nD=Jn.toColor("#ffffff"),iD=Od,xd={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},v$=Pl,dN=class extends nn{constructor(e){super(),this._optionsService=e,this._contrastCache=new tD,this._halfContrastCache=new tD,this._onChangeColors=this._register(new Ie),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Pl,background:Od,cursor:nD,cursorAccent:iD,selectionForeground:void 0,selectionBackgroundTransparent:xd,selectionBackgroundOpaque:$n.blend(Od,xd),selectionInactiveBackgroundTransparent:xd,selectionInactiveBackgroundOpaque:$n.blend(Od,xd),scrollbarSliderBackground:$n.opacity(Pl,.2),scrollbarSliderHoverBackground:$n.opacity(Pl,.4),scrollbarSliderActiveBackground:$n.opacity(Pl,.5),overviewRulerBorder:Pl,ansi:ki.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=An(e.foreground,Pl),t.background=An(e.background,Od),t.cursor=$n.blend(t.background,An(e.cursor,nD)),t.cursorAccent=$n.blend(t.background,An(e.cursorAccent,iD)),t.selectionBackgroundTransparent=An(e.selectionBackground,xd),t.selectionBackgroundOpaque=$n.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=An(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=$n.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?An(e.selectionForeground,JC):void 0,t.selectionForeground===JC&&(t.selectionForeground=void 0),$n.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=$n.opacity(t.selectionBackgroundTransparent,.3)),$n.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=$n.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=An(e.scrollbarSliderBackground,$n.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=An(e.scrollbarSliderHoverBackground,$n.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=An(e.scrollbarSliderActiveBackground,$n.opacity(t.foreground,.5)),t.overviewRulerBorder=An(e.overviewRulerBorder,v$),t.ansi=ki.slice(),t.ansi[0]=An(e.black,ki[0]),t.ansi[1]=An(e.red,ki[1]),t.ansi[2]=An(e.green,ki[2]),t.ansi[3]=An(e.yellow,ki[3]),t.ansi[4]=An(e.blue,ki[4]),t.ansi[5]=An(e.magenta,ki[5]),t.ansi[6]=An(e.cyan,ki[6]),t.ansi[7]=An(e.white,ki[7]),t.ansi[8]=An(e.brightBlack,ki[8]),t.ansi[9]=An(e.brightRed,ki[9]),t.ansi[10]=An(e.brightGreen,ki[10]),t.ansi[11]=An(e.brightYellow,ki[11]),t.ansi[12]=An(e.brightBlue,ki[12]),t.ansi[13]=An(e.brightMagenta,ki[13]),t.ansi[14]=An(e.brightCyan,ki[14]),t.ansi[15]=An(e.brightWhite,ki[15]),e.extendedAnsi){let r=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let s=0;s<r;s++)t.ansi[s+16]=An(e.extendedAnsi[s],ki[s+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};dN=ti([tt(0,Dr)],dN);function An(e,t){if(e!==void 0)try{return Jn.toColor(e)}catch{}return t}var b$=class{constructor(...e){this._entries=new Map;for(let[t,r]of e)this.set(t,r)}set(e,t){let r=this._entries.get(e);return this._entries.set(e,t),r}forEach(e){for(let[t,r]of this._entries.entries())e(t,r)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},_$=class{constructor(){this._services=new b$,this._services.set(qN,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let r=dz(e).sort((l,c)=>l.index-c.index),s=[];for(let l of r){let c=this._services.get(l.id);if(!c)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${l.id._id}.`);s.push(c)}let a=r.length>0?r[0].index:t.length;if(t.length!==a)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${a+1} conflicts with ${t.length} static arguments`);return new e(...t,...s)}},y$={trace:0,debug:1,info:2,warn:3,error:4,off:5},N$="xterm.js: ",fN=class extends nn{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=y$[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,r){this._evalLazyOptionalParams(r),e.call(console,(this._optionsService.options.logger?"":N$)+t,...r)}trace(e,...t){var r;this._logLevel<=0&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var r;this._logLevel<=1&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var r;this._logLevel<=2&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var r;this._logLevel<=3&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var r;this._logLevel<=4&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.error.bind(this._optionsService.options.logger))??console.error,e,t)}};fN=ti([tt(0,Dr)],fN);var rD=class extends nn{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new Ie),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new Ie),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new Ie),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...r){if(t){for(let s=e;s<this._length-t;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let s=this._length-1;s>=e;s--)this._array[this._getCyclicIndex(s+r.length)]=this._array[this._getCyclicIndex(s)];for(let s=0;s<r.length;s++)this._array[this._getCyclicIndex(e+s)]=r[s];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){let s=this._length+r.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=r.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(let a=t-1;a>=0;a--)this.set(e+a+r,this.get(e+a));let s=e+t+r-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let s=0;s<t;s++)this.set(e+s+r,this.get(e+s))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},tn=3,mi=Object.freeze(new af),km=0,Z_=2,jd=class RA{constructor(t,r,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*tn);let a=r||xs.fromCharData([0,YR,1,0]);for(let l=0;l<t;++l)this.setCell(l,a);this.length=t}get(t){let r=this._data[t*tn+0],s=r&2097151;return[this._data[t*tn+1],r&2097152?this._combined[t]:s?Ho(s):"",r>>22,r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):s]}set(t,r){this._data[t*tn+1]=r[0],r[1].length>1?(this._combined[t]=r[1],this._data[t*tn+0]=t|2097152|r[2]<<22):this._data[t*tn+0]=r[1].charCodeAt(0)|r[2]<<22}getWidth(t){return this._data[t*tn+0]>>22}hasWidth(t){return this._data[t*tn+0]&12582912}getFg(t){return this._data[t*tn+1]}getBg(t){return this._data[t*tn+2]}hasContent(t){return this._data[t*tn+0]&4194303}getCodePoint(t){let r=this._data[t*tn+0];return r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r&2097151}isCombined(t){return this._data[t*tn+0]&2097152}getString(t){let r=this._data[t*tn+0];return r&2097152?this._combined[t]:r&2097151?Ho(r&2097151):""}isProtected(t){return this._data[t*tn+2]&536870912}loadCell(t,r){return km=t*tn,r.content=this._data[km+0],r.fg=this._data[km+1],r.bg=this._data[km+2],r.content&2097152&&(r.combinedData=this._combined[t]),r.bg&268435456&&(r.extended=this._extendedAttrs[t]),r}setCell(t,r){r.content&2097152&&(this._combined[t]=r.combinedData),r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*tn+0]=r.content,this._data[t*tn+1]=r.fg,this._data[t*tn+2]=r.bg}setCellFromCodepoint(t,r,s,a){a.bg&268435456&&(this._extendedAttrs[t]=a.extended),this._data[t*tn+0]=r|s<<22,this._data[t*tn+1]=a.fg,this._data[t*tn+2]=a.bg}addCodepointToCell(t,r,s){let a=this._data[t*tn+0];a&2097152?this._combined[t]+=Ho(r):a&2097151?(this._combined[t]=Ho(a&2097151)+Ho(r),a&=-2097152,a|=2097152):a=r|1<<22,s&&(a&=-12582913,a|=s<<22),this._data[t*tn+0]=a}insertCells(t,r,s){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),r<this.length-t){let a=new xs;for(let l=this.length-t-r-1;l>=0;--l)this.setCell(t+r+l,this.loadCell(t+l,a));for(let l=0;l<r;++l)this.setCell(t+l,s)}else for(let a=t;a<this.length;++a)this.setCell(a,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(t,r,s){if(t%=this.length,r<this.length-t){let a=new xs;for(let l=0;l<this.length-t-r;++l)this.setCell(t+l,this.loadCell(t+r+l,a));for(let l=this.length-r;l<this.length;++l)this.setCell(l,s)}else for(let a=t;a<this.length;++a)this.setCell(a,s);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,s)}replaceCells(t,r,s,a=!1){if(a){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,s),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,s);t<r&&t<this.length;)this.isProtected(t)||this.setCell(t,s),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,s);t<r&&t<this.length;)this.setCell(t++,s)}resize(t,r){if(t===this.length)return this._data.length*4*Z_<this._data.buffer.byteLength;let s=t*tn;if(t>this.length){if(this._data.buffer.byteLength>=s*4)this._data=new Uint32Array(this._data.buffer,0,s);else{let a=new Uint32Array(s);a.set(this._data),this._data=a}for(let a=this.length;a<t;++a)this.setCell(a,r)}else{this._data=this._data.subarray(0,s);let a=Object.keys(this._combined);for(let c=0;c<a.length;c++){let f=parseInt(a[c],10);f>=t&&delete this._combined[f]}let l=Object.keys(this._extendedAttrs);for(let c=0;c<l.length;c++){let f=parseInt(l[c],10);f>=t&&delete this._extendedAttrs[f]}}return this.length=t,s*4*Z_<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*Z_<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,r=!1){if(r){for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,t);return}this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let r in t._combined)this._combined[r]=t._combined[r];this._extendedAttrs={};for(let r in t._extendedAttrs)this._extendedAttrs[r]=t._extendedAttrs[r];this.isWrapped=t.isWrapped}clone(){let t=new RA(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let r in this._combined)t._combined[r]=this._combined[r];for(let r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*tn+0]&4194303)return t+(this._data[t*tn+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*tn+0]&4194303||this._data[t*tn+2]&50331648)return t+(this._data[t*tn+0]>>22);return 0}copyCellsFrom(t,r,s,a,l){let c=t._data;if(l)for(let p=a-1;p>=0;p--){for(let m=0;m<tn;m++)this._data[(s+p)*tn+m]=c[(r+p)*tn+m];c[(r+p)*tn+2]&268435456&&(this._extendedAttrs[s+p]=t._extendedAttrs[r+p])}else for(let p=0;p<a;p++){for(let m=0;m<tn;m++)this._data[(s+p)*tn+m]=c[(r+p)*tn+m];c[(r+p)*tn+2]&268435456&&(this._extendedAttrs[s+p]=t._extendedAttrs[r+p])}let f=Object.keys(t._combined);for(let p=0;p<f.length;p++){let m=parseInt(f[p],10);m>=r&&(this._combined[m-r+s]=t._combined[m])}}translateToString(t,r,s,a){r=r??0,s=s??this.length,t&&(s=Math.min(s,this.getTrimmedLength())),a&&(a.length=0);let l="";for(;r<s;){let c=this._data[r*tn+0],f=c&2097151,p=c&2097152?this._combined[r]:f?Ho(f):Go;if(l+=p,a)for(let m=0;m<p.length;++m)a.push(r);r+=c>>22||1}return a&&a.push(r),l}};function w$(e,t,r,s,a,l){let c=[];for(let f=0;f<e.length-1;f++){let p=f,m=e.get(++p);if(!m.isWrapped)continue;let v=[e.get(f)];for(;p<e.length&&m.isWrapped;)v.push(m),m=e.get(++p);if(!l&&s>=f&&s<p){f+=v.length-1;continue}let y=0,x=tf(v,y,t),N=1,_=0;for(;N<v.length;){let j=tf(v,N,t),L=j-_,P=r-x,O=Math.min(L,P);v[y].copyCellsFrom(v[N],_,x,O,!1),x+=O,x===r&&(y++,x=0),_+=O,_===j&&(N++,_=0),x===0&&y!==0&&v[y-1].getWidth(r-1)===2&&(v[y].copyCellsFrom(v[y-1],r-1,x++,1,!1),v[y-1].setCell(r-1,a))}v[y].replaceCells(x,r,a);let k=0;for(let j=v.length-1;j>0&&(j>y||v[j].getTrimmedLength()===0);j--)k++;k>0&&(c.push(f+v.length-k),c.push(k)),f+=v.length-1}return c}function x$(e,t){let r=[],s=0,a=t[s],l=0;for(let c=0;c<e.length;c++)if(a===c){let f=t[++s];e.onDeleteEmitter.fire({index:c-l,amount:f}),c+=f-1,l+=f,a=t[++s]}else r.push(c);return{layout:r,countRemoved:l}}function S$(e,t){let r=[];for(let s=0;s<t.length;s++)r.push(e.get(t[s]));for(let s=0;s<r.length;s++)e.set(s,r[s]);e.length=t.length}function E$(e,t,r){let s=[],a=e.map((p,m)=>tf(e,m,t)).reduce((p,m)=>p+m),l=0,c=0,f=0;for(;f<a;){if(a-f<r){s.push(a-f);break}l+=r;let p=tf(e,c,t);l>p&&(l-=p,c++);let m=e[c].getWidth(l-1)===2;m&&l--;let v=m?r-1:r;s.push(v),f+=v}return s}function tf(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();let s=!e[t].hasContent(r-1)&&e[t].getWidth(r-1)===1,a=e[t+1].getWidth(0)===2;return s&&a?r-1:r}var AA=class TA{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=TA._nextId++,this._onDispose=this.register(new Ie),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),tc(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};AA._nextId=1;var k$=AA,Ri={},Vl=Ri.B;Ri[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:"≥","{":"π","|":"≠","}":"£","~":"·"};Ri.A={"#":"£"};Ri.B=void 0;Ri[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};Ri.C=Ri[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};Ri.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};Ri.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};Ri.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};Ri.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};Ri.E=Ri[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};Ri.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};Ri.H=Ri[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};Ri["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var sD=4294967295,aD=class{constructor(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=mi.clone(),this.savedCharset=Vl,this.markers=[],this._nullCell=xs.fromCharData([0,YR,1,0]),this._whitespaceCell=xs.fromCharData([0,Go,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new ag,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new rD(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new ng),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new ng),this._whitespaceCell}getBlankLine(e,t){return new jd(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>sD?sD:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=mi);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new rD(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let r=this.getNullCell(mi),s=0,a=this._getCorrectBufferLength(t);if(a>this.lines.maxLength&&(this.lines.maxLength=a),this.lines.length>0){if(this._cols<e)for(let c=0;c<this.lines.length;c++)s+=+this.lines.get(c).resize(e,r);let l=0;if(this._rows<t)for(let c=this._rows;c<t;c++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new jd(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+l+1?(this.ybase--,l++,this.ydisp>0&&this.ydisp--):this.lines.push(new jd(e,r)));else for(let c=this._rows;c>t;c--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(a<this.lines.maxLength){let c=this.lines.length-a;c>0&&(this.lines.trimStart(c),this.ybase=Math.max(this.ybase-c,0),this.ydisp=Math.max(this.ydisp-c,0),this.savedY=Math.max(this.savedY-c,0)),this.lines.maxLength=a}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),l&&(this.y+=l),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let l=0;l<this.lines.length;l++)s+=+this.lines.get(l).resize(e,r);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),s>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,s=w$(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(mi),r);if(s.length>0){let a=x$(this.lines,s);S$(this.lines,a.layout),this._reflowLargerAdjustViewport(e,t,a.countRemoved)}}_reflowLargerAdjustViewport(e,t,r){let s=this.getNullCell(mi),a=r;for(;a-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new jd(e,s))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)}_reflowSmaller(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,s=this.getNullCell(mi),a=[],l=0;for(let c=this.lines.length-1;c>=0;c--){let f=this.lines.get(c);if(!f||!f.isWrapped&&f.getTrimmedLength()<=e)continue;let p=[f];for(;f.isWrapped&&c>0;)f=this.lines.get(--c),p.unshift(f);if(!r){let O=this.ybase+this.y;if(O>=c&&O<c+p.length)continue}let m=p[p.length-1].getTrimmedLength(),v=E$(p,this._cols,e),y=v.length-p.length,x;this.ybase===0&&this.y!==this.lines.length-1?x=Math.max(0,this.y-this.lines.maxLength+y):x=Math.max(0,this.lines.length-this.lines.maxLength+y);let N=[];for(let O=0;O<y;O++){let T=this.getBlankLine(mi,!0);N.push(T)}N.length>0&&(a.push({start:c+p.length+l,newLines:N}),l+=N.length),p.push(...N);let _=v.length-1,k=v[_];k===0&&(_--,k=v[_]);let j=p.length-y-1,L=m;for(;j>=0;){let O=Math.min(L,k);if(p[_]===void 0)break;if(p[_].copyCellsFrom(p[j],L-O,k-O,O,!0),k-=O,k===0&&(_--,k=v[_]),L-=O,L===0){j--;let T=Math.max(j,0);L=tf(p,T,this._cols)}}for(let O=0;O<p.length;O++)v[O]<e&&p[O].setCell(v[O],s);let P=y-x;for(;P-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+l)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+y,this.ybase+t-1)}if(a.length>0){let c=[],f=[];for(let k=0;k<this.lines.length;k++)f.push(this.lines.get(k));let p=this.lines.length,m=p-1,v=0,y=a[v];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+l);let x=0;for(let k=Math.min(this.lines.maxLength-1,p+l-1);k>=0;k--)if(y&&y.start>m+x){for(let j=y.newLines.length-1;j>=0;j--)this.lines.set(k--,y.newLines[j]);k++,c.push({index:m+1,amount:y.newLines.length}),x+=y.newLines.length,y=a[++v]}else this.lines.set(k,f[m--]);let N=0;for(let k=c.length-1;k>=0;k--)c[k].index+=N,this.lines.onInsertEmitter.fire(c[k]),N+=c[k].amount;let _=Math.max(0,p+l-this.lines.maxLength);_>0&&this.lines.onTrimEmitter.fire(_)}}translateBufferLineToString(e,t,r=0,s){let a=this.lines.get(e);return a?a.translateToString(t,r,s):""}getWrappedRangeForLine(e){let t=e,r=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new k$(e);return this.markers.push(t),t.register(this.lines.onTrim(r=>{t.line-=r,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(r=>{t.line>=r.index&&(t.line+=r.amount)})),t.register(this.lines.onDelete(r=>{t.line>=r.index&&t.line<r.index+r.amount&&t.dispose(),t.line>r.index&&(t.line-=r.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},C$=class extends nn{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new Ie),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 aD(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new aD(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},MA=2,OA=1,pN=class extends nn{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new Ie),this.onResize=this._onResize.event,this._onScroll=this._register(new Ie),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,MA),this.rows=Math.max(e.rawOptions.rows||0,OA),this.buffers=this._register(new C$(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let r=this.cols!==e,s=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:r,rowsChanged:s})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let r=this.buffer,s;s=this._cachedBlankLine,(!s||s.length!==this.cols||s.getFg(0)!==e.fg||s.getBg(0)!==e.bg)&&(s=r.getBlankLine(e,t),this._cachedBlankLine=s),s.isWrapped=t;let a=r.ybase+r.scrollTop,l=r.ybase+r.scrollBottom;if(r.scrollTop===0){let c=r.lines.isFull;l===r.lines.length-1?c?r.lines.recycle().copyFrom(s):r.lines.push(s.clone()):r.lines.splice(l+1,0,s.clone()),c?this.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this.isUserScrolling||r.ydisp++)}else{let c=l-a+1;r.lines.shiftElements(a+1,c-1,-1),r.lines.set(l,s.clone())}this.isUserScrolling||(r.ydisp=r.ybase),this._onScroll.fire(r.ydisp)}scrollLines(e,t){let r=this.buffer;if(e<0){if(r.ydisp===0)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);let s=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),s!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};pN=ti([tt(0,Dr)],pN);var au={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:sg,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},D$=["normal","bold","100","200","300","400","500","600","700","800","900"],R$=class extends nn{constructor(e){super(),this._onOptionChange=this._register(new Ie),this.onOptionChange=this._onOptionChange.event;let t={...au};for(let r in e)if(r in t)try{let s=e[r];t[r]=this._sanitizeAndValidateOption(r,s)}catch(s){console.error(s)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Kn(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(r=>{r===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(r=>{e.indexOf(r)!==-1&&t()})}_setupOptions(){let e=r=>{if(!(r in au))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},t=(r,s)=>{if(!(r in au))throw new Error(`No option with key "${r}"`);s=this._sanitizeAndValidateOption(r,s),this.rawOptions[r]!==s&&(this.rawOptions[r]=s,this._onOptionChange.fire(r))};for(let r in this.rawOptions){let s={get:e.bind(this,r),set:t.bind(this,r)};Object.defineProperty(this.options,r,s)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=au[e]),!A$(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=au[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=D$.includes(t)?t:au[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function A$(e){return e==="block"||e==="underline"||e==="bar"}function Ld(e,t=5){if(typeof e!="object")return e;let r=Array.isArray(e)?[]:{};for(let s in e)r[s]=t<=1?e[s]:e[s]&&Ld(e[s],t-1);return r}var oD=Object.freeze({insertMode:!1}),lD=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),mN=class extends nn{constructor(e,t,r){super(),this._bufferService=e,this._logService=t,this._optionsService=r,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new Ie),this.onData=this._onData.event,this._onUserInput=this._register(new Ie),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new Ie),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new Ie),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=Ld(oD),this.decPrivateModes=Ld(lD)}reset(){this.modes=Ld(oD),this.decPrivateModes=Ld(lD)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let r=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&r.ybase!==r.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(s=>s.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};mN=ti([tt(0,Cr),tt(1,QR),tt(2,Dr)],mN);var cD={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function Q_(e,t){let r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(r|=64,r|=e.action):(r|=e.button&3,e.button&4&&(r|=64),e.button&8&&(r|=128),e.action===32?r|=32:e.action===0&&!t&&(r|=3)),r}var ey=String.fromCharCode,uD={DEFAULT:e=>{let t=[Q_(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${ey(t[0])}${ey(t[1])}${ey(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${Q_(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${Q_(e,!0)};${e.x};${e.y}${t}`}},gN=class extends nn{constructor(e,t,r){super(),this._bufferService=e,this._coreService=t,this._optionsService=r,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new Ie),this.onProtocolChange=this._onProtocolChange.event;for(let s of Object.keys(cD))this.addProtocol(s,cD[s]);for(let s of Object.keys(uD))this.addEncoding(s,uD[s]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,r){if(e.deltaY===0||e.shiftKey||t===void 0||r===void 0)return 0;let s=t/r,a=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=s+0,Math.abs(e.deltaY)<50&&(a*=.3),this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,r){if(r){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};gN=ti([tt(0,Cr),tt(1,rc),tt(2,Dr)],gN);var ty=[[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]],T$=[[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]],Ci;function M$(e,t){let r=0,s=t.length-1,a;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=r;)if(a=r+s>>1,e>t[a][1])r=a+1;else if(e<t[a][0])s=a-1;else return!0;return!1}var O$=class{constructor(){if(this.version="6",!Ci){Ci=new Uint8Array(65536),Ci.fill(1),Ci[0]=0,Ci.fill(0,1,32),Ci.fill(0,127,160),Ci.fill(2,4352,4448),Ci[9001]=2,Ci[9002]=2,Ci.fill(2,11904,42192),Ci[12351]=1,Ci.fill(2,44032,55204),Ci.fill(2,63744,64256),Ci.fill(2,65040,65050),Ci.fill(2,65072,65136),Ci.fill(2,65280,65377),Ci.fill(2,65504,65511);for(let e=0;e<ty.length;++e)Ci.fill(0,ty[e][0],ty[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Ci[e]:M$(e,T$)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),s=r===0&&t!==0;if(s){let a=Fl.extractWidth(t);a===0?s=!1:a>r&&(r=a)}return Fl.createPropertyValue(0,r,s)}},Fl=class $m{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Ie,this.onChange=this._onChange.event;let t=new O$;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,s=!1){return(t&16777215)<<3|(r&3)<<1|(s?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,s=0,a=t.length;for(let l=0;l<a;++l){let c=t.charCodeAt(l);if(55296<=c&&c<=56319){if(++l>=a)return r+this.wcwidth(c);let m=t.charCodeAt(l);56320<=m&&m<=57343?c=(c-55296)*1024+m-56320+65536:r+=this.wcwidth(m)}let f=this.charProperties(c,s),p=$m.extractWidth(f);$m.extractShouldJoin(f)&&(p-=$m.extractWidth(s)),r+=p,s=f}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},j$=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function hD(e){var s;let t=(s=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:s.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&t&&(r.isWrapped=t[3]!==0&&t[3]!==32)}var Sd=2147483647,L$=256,jA=class vN{constructor(t=32,r=32){if(this.maxLength=t,this.maxSubParamsLength=r,r>L$)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let r=new vN;if(!t.length)return r;for(let s=Array.isArray(t[0])?1:0;s<t.length;++s){let a=t[s];if(Array.isArray(a))for(let l=0;l<a.length;++l)r.addSubParam(a[l]);else r.addParam(a)}return r}clone(){let t=new vN(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let r=0;r<this.length;++r){t.push(this.params[r]);let s=this._subParamsIdx[r]>>8,a=this._subParamsIdx[r]&255;a-s>0&&t.push(Array.prototype.slice.call(this._subParams,s,a))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Sd?Sd:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Sd?Sd:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let r=this._subParamsIdx[t]>>8,s=this._subParamsIdx[t]&255;return s-r>0?this._subParams.subarray(r,s):null}getSubParamsAll(){let t={};for(let r=0;r<this.length;++r){let s=this._subParamsIdx[r]>>8,a=this._subParamsIdx[r]&255;a-s>0&&(t[r]=this._subParams.slice(s,a))}return t}addDigit(t){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let s=this._digitIsSub?this._subParams:this.params,a=s[r-1];s[r-1]=~a?Math.min(a*10+t,Sd):t}},Ed=[],B$=class{constructor(){this._state=0,this._active=Ed,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let s=r.indexOf(t);s!==-1&&r.splice(s,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Ed}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Ed,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Ed,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,r){if(!this._active.length)this._handlerFb(this._id,"PUT",mg(e,t,r));else for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,r)}start(){this.reset(),this._state=1}put(e,t,r){if(this._state!==3){if(this._state===1)for(;t<r;){let s=e[t++];if(s===59){this._state=2,this._start();break}if(s<48||57<s){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+s-48}this._state===2&&r-t>0&&this._put(e,t,r)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let r=!1,s=this._active.length-1,a=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,r=t,a=this._stack.fallThrough,this._stack.paused=!1),!a&&r===!1){for(;s>=0&&(r=this._active[s].end(e),r!==!0);s--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,r;s--}for(;s>=0;s--)if(r=this._active[s].end(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,r}this._active=Ed,this._id=-1,this._state=0}}},Qr=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=mg(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(r=>(this._data="",this._hitLimit=!1,r));return this._data="",this._hitLimit=!1,t}},kd=[],P$=class{constructor(){this._handlers=Object.create(null),this._active=kd,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=kd}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let s=r.indexOf(t);s!==-1&&r.splice(s,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=kd,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||kd,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(t)}put(e,t,r){if(!this._active.length)this._handlerFb(this._ident,"PUT",mg(e,t,r));else for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,r)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let r=!1,s=this._active.length-1,a=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,r=t,a=this._stack.fallThrough,this._stack.paused=!1),!a&&r===!1){for(;s>=0&&(r=this._active[s].unhook(e),r!==!0);s--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,r;s--}for(;s>=0;s--)if(r=this._active[s].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,r}this._active=kd,this._ident=0}},Bd=new jA;Bd.addParam(0);var dD=class{constructor(e){this._handler=e,this._data="",this._params=Bd,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Bd,this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=mg(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(r=>(this._params=Bd,this._data="",this._hitLimit=!1,r));return this._params=Bd,this._data="",this._hitLimit=!1,t}},V$=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,r,s){this.table[t<<8|e]=r<<4|s}addMany(e,t,r,s){for(let a=0;a<e.length;a++)this.table[t<<8|e[a]]=r<<4|s}},ws=160,I$=function(){let e=new V$(4095),t=Array.apply(null,Array(256)).map((f,p)=>p),r=(f,p)=>t.slice(f,p),s=r(32,127),a=r(0,24);a.push(25),a.push.apply(a,r(28,32));let l=r(0,14),c;e.setDefault(1,0),e.addMany(s,0,2,0);for(c in l)e.addMany([24,26,153,154],c,3,0),e.addMany(r(128,144),c,3,0),e.addMany(r(144,152),c,3,0),e.add(156,c,0,0),e.add(27,c,11,1),e.add(157,c,4,8),e.addMany([152,158,159],c,0,7),e.add(155,c,11,3),e.add(144,c,11,9);return e.addMany(a,0,3,0),e.addMany(a,1,3,1),e.add(127,1,0,1),e.addMany(a,8,0,8),e.addMany(a,3,3,3),e.add(127,3,0,3),e.addMany(a,4,3,4),e.add(127,4,0,4),e.addMany(a,6,3,6),e.addMany(a,5,3,5),e.add(127,5,0,5),e.addMany(a,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(s,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(s,7,0,7),e.addMany(a,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(a,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(a,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(a,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(a,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(a,13,13,13),e.addMany(s,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(ws,0,2,0),e.add(ws,8,5,8),e.add(ws,6,0,6),e.add(ws,11,0,11),e.add(ws,13,13,13),e}(),F$=class extends nn{constructor(e=I$){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new jA,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,r,s)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,r)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Kn(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new B$),this._dcsParser=this._register(new P$),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(r=e.prefix.charCodeAt(0),r&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let a=0;a<e.intermediates.length;++a){let l=e.intermediates.charCodeAt(a);if(32>l||l>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=l}}if(e.final.length!==1)throw new Error("final must be a single byte");let s=e.final.charCodeAt(0);if(t[0]>s||s>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return r<<=8,r|=s,r}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let r=this._identifier(e,[48,126]);this._escHandlers[r]===void 0&&(this._escHandlers[r]=[]);let s=this._escHandlers[r];return s.push(t),{dispose:()=>{let a=s.indexOf(t);a!==-1&&s.splice(a,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let r=this._identifier(e);this._csiHandlers[r]===void 0&&(this._csiHandlers[r]=[]);let s=this._csiHandlers[r];return s.push(t),{dispose:()=>{let a=s.indexOf(t);a!==-1&&s.splice(a,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,r,s,a){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=s,this._parseStack.chunkPos=a}parse(e,t,r){let s=0,a=0,l=0,c;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,l=this._parseStack.chunkPos+1;else{if(r===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let f=this._parseStack.handlers,p=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(r===!1&&p>-1){for(;p>=0&&(c=f[p](this._params),c!==!0);p--)if(c instanceof Promise)return this._parseStack.handlerPos=p,c}this._parseStack.handlers=[];break;case 4:if(r===!1&&p>-1){for(;p>=0&&(c=f[p](),c!==!0);p--)if(c instanceof Promise)return this._parseStack.handlerPos=p,c}this._parseStack.handlers=[];break;case 6:if(s=e[this._parseStack.chunkPos],c=this._dcsParser.unhook(s!==24&&s!==26,r),c)return c;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(s=e[this._parseStack.chunkPos],c=this._oscParser.end(s!==24&&s!==26,r),c)return c;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,l=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let f=l;f<t;++f){switch(s=e[f],a=this._transitions.table[this.currentState<<8|(s<160?s:ws)],a>>4){case 2:for(let x=f+1;;++x){if(x>=t||(s=e[x])<32||s>126&&s<ws){this._printHandler(e,f,x),f=x-1;break}if(++x>=t||(s=e[x])<32||s>126&&s<ws){this._printHandler(e,f,x),f=x-1;break}if(++x>=t||(s=e[x])<32||s>126&&s<ws){this._printHandler(e,f,x),f=x-1;break}if(++x>=t||(s=e[x])<32||s>126&&s<ws){this._printHandler(e,f,x),f=x-1;break}}break;case 3:this._executeHandlers[s]?this._executeHandlers[s]():this._executeHandlerFb(s),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:f,code:s,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let p=this._csiHandlers[this._collect<<8|s],m=p?p.length-1:-1;for(;m>=0&&(c=p[m](this._params),c!==!0);m--)if(c instanceof Promise)return this._preserveStack(3,p,m,a,f),c;m<0&&this._csiHandlerFb(this._collect<<8|s,this._params),this.precedingJoinState=0;break;case 8:do switch(s){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(s-48)}while(++f<t&&(s=e[f])>47&&s<60);f--;break;case 9:this._collect<<=8,this._collect|=s;break;case 10:let v=this._escHandlers[this._collect<<8|s],y=v?v.length-1:-1;for(;y>=0&&(c=v[y](),c!==!0);y--)if(c instanceof Promise)return this._preserveStack(4,v,y,a,f),c;y<0&&this._escHandlerFb(this._collect<<8|s),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|s,this._params);break;case 13:for(let x=f+1;;++x)if(x>=t||(s=e[x])===24||s===26||s===27||s>127&&s<ws){this._dcsParser.put(e,f,x),f=x-1;break}break;case 14:if(c=this._dcsParser.unhook(s!==24&&s!==26),c)return this._preserveStack(6,[],0,a,f),c;s===27&&(a|=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 x=f+1;;x++)if(x>=t||(s=e[x])<32||s>127&&s<ws){this._oscParser.put(e,f,x),f=x-1;break}break;case 6:if(c=this._oscParser.end(s!==24&&s!==26),c)return this._preserveStack(5,[],0,a,f),c;s===27&&(a|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=a&15}}},z$=/^([\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})$/,$$=/^[\da-f]+$/;function fD(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let r=z$.exec(t);if(r){let s=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/s*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/s*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/s*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),$$.exec(t)&&[3,6,9,12].includes(t.length))){let r=t.length/3,s=[0,0,0];for(let a=0;a<3;++a){let l=parseInt(t.slice(r*a,r*a+r),16);s[a]=r===1?l<<4:r===2?l:r===3?l>>4:l>>8}return s}}function ny(e,t){let r=e.toString(16),s=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}function U$(e,t=16){let[r,s,a]=e;return`rgb:${ny(r,t)}/${ny(s,t)}/${ny(a,t)}`}var H$={"(":0,")":1,"*":2,"+":3,"-":1,".":2},zo=131072,pD=10;function mD(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var gD=5e3,vD=0,W$=class extends nn{constructor(e,t,r,s,a,l,c,f,p=new F$){super(),this._bufferService=e,this._charsetService=t,this._coreService=r,this._logService=s,this._optionsService=a,this._oscLinkService=l,this._coreMouseService=c,this._unicodeService=f,this._parser=p,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new uz,this._utf8Decoder=new hz,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=mi.clone(),this._eraseAttrDataInternal=mi.clone(),this._onRequestBell=this._register(new Ie),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new Ie),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new Ie),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new Ie),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new Ie),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new Ie),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new Ie),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new Ie),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new Ie),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new Ie),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new Ie),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new Ie),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new Ie),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 bN(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(m=>this._activeBuffer=m.activeBuffer)),this._parser.setCsiHandlerFallback((m,v)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(m),params:v.toArray()})}),this._parser.setEscHandlerFallback(m=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(m)})}),this._parser.setExecuteHandlerFallback(m=>{this._logService.debug("Unknown EXECUTE code: ",{code:m})}),this._parser.setOscHandlerFallback((m,v,y)=>{this._logService.debug("Unknown OSC code: ",{identifier:m,action:v,data:y})}),this._parser.setDcsHandlerFallback((m,v,y)=>{v==="HOOK"&&(y=y.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(m),action:v,payload:y})}),this._parser.setPrintHandler((m,v,y)=>this.print(m,v,y)),this._parser.registerCsiHandler({final:"@"},m=>this.insertChars(m)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},m=>this.scrollLeft(m)),this._parser.registerCsiHandler({final:"A"},m=>this.cursorUp(m)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},m=>this.scrollRight(m)),this._parser.registerCsiHandler({final:"B"},m=>this.cursorDown(m)),this._parser.registerCsiHandler({final:"C"},m=>this.cursorForward(m)),this._parser.registerCsiHandler({final:"D"},m=>this.cursorBackward(m)),this._parser.registerCsiHandler({final:"E"},m=>this.cursorNextLine(m)),this._parser.registerCsiHandler({final:"F"},m=>this.cursorPrecedingLine(m)),this._parser.registerCsiHandler({final:"G"},m=>this.cursorCharAbsolute(m)),this._parser.registerCsiHandler({final:"H"},m=>this.cursorPosition(m)),this._parser.registerCsiHandler({final:"I"},m=>this.cursorForwardTab(m)),this._parser.registerCsiHandler({final:"J"},m=>this.eraseInDisplay(m,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},m=>this.eraseInDisplay(m,!0)),this._parser.registerCsiHandler({final:"K"},m=>this.eraseInLine(m,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},m=>this.eraseInLine(m,!0)),this._parser.registerCsiHandler({final:"L"},m=>this.insertLines(m)),this._parser.registerCsiHandler({final:"M"},m=>this.deleteLines(m)),this._parser.registerCsiHandler({final:"P"},m=>this.deleteChars(m)),this._parser.registerCsiHandler({final:"S"},m=>this.scrollUp(m)),this._parser.registerCsiHandler({final:"T"},m=>this.scrollDown(m)),this._parser.registerCsiHandler({final:"X"},m=>this.eraseChars(m)),this._parser.registerCsiHandler({final:"Z"},m=>this.cursorBackwardTab(m)),this._parser.registerCsiHandler({final:"`"},m=>this.charPosAbsolute(m)),this._parser.registerCsiHandler({final:"a"},m=>this.hPositionRelative(m)),this._parser.registerCsiHandler({final:"b"},m=>this.repeatPrecedingCharacter(m)),this._parser.registerCsiHandler({final:"c"},m=>this.sendDeviceAttributesPrimary(m)),this._parser.registerCsiHandler({prefix:">",final:"c"},m=>this.sendDeviceAttributesSecondary(m)),this._parser.registerCsiHandler({final:"d"},m=>this.linePosAbsolute(m)),this._parser.registerCsiHandler({final:"e"},m=>this.vPositionRelative(m)),this._parser.registerCsiHandler({final:"f"},m=>this.hVPosition(m)),this._parser.registerCsiHandler({final:"g"},m=>this.tabClear(m)),this._parser.registerCsiHandler({final:"h"},m=>this.setMode(m)),this._parser.registerCsiHandler({prefix:"?",final:"h"},m=>this.setModePrivate(m)),this._parser.registerCsiHandler({final:"l"},m=>this.resetMode(m)),this._parser.registerCsiHandler({prefix:"?",final:"l"},m=>this.resetModePrivate(m)),this._parser.registerCsiHandler({final:"m"},m=>this.charAttributes(m)),this._parser.registerCsiHandler({final:"n"},m=>this.deviceStatus(m)),this._parser.registerCsiHandler({prefix:"?",final:"n"},m=>this.deviceStatusPrivate(m)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},m=>this.softReset(m)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},m=>this.setCursorStyle(m)),this._parser.registerCsiHandler({final:"r"},m=>this.setScrollRegion(m)),this._parser.registerCsiHandler({final:"s"},m=>this.saveCursor(m)),this._parser.registerCsiHandler({final:"t"},m=>this.windowOptions(m)),this._parser.registerCsiHandler({final:"u"},m=>this.restoreCursor(m)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},m=>this.insertColumns(m)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},m=>this.deleteColumns(m)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},m=>this.selectProtected(m)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},m=>this.requestMode(m,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},m=>this.requestMode(m,!1)),this._parser.setExecuteHandler(we.BEL,()=>this.bell()),this._parser.setExecuteHandler(we.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(we.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(we.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(we.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(we.BS,()=>this.backspace()),this._parser.setExecuteHandler(we.HT,()=>this.tab()),this._parser.setExecuteHandler(we.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(we.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Fm.IND,()=>this.index()),this._parser.setExecuteHandler(Fm.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Fm.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Qr(m=>(this.setTitle(m),this.setIconName(m),!0))),this._parser.registerOscHandler(1,new Qr(m=>this.setIconName(m))),this._parser.registerOscHandler(2,new Qr(m=>this.setTitle(m))),this._parser.registerOscHandler(4,new Qr(m=>this.setOrReportIndexedColor(m))),this._parser.registerOscHandler(8,new Qr(m=>this.setHyperlink(m))),this._parser.registerOscHandler(10,new Qr(m=>this.setOrReportFgColor(m))),this._parser.registerOscHandler(11,new Qr(m=>this.setOrReportBgColor(m))),this._parser.registerOscHandler(12,new Qr(m=>this.setOrReportCursorColor(m))),this._parser.registerOscHandler(104,new Qr(m=>this.restoreIndexedColor(m))),this._parser.registerOscHandler(110,new Qr(m=>this.restoreFgColor(m))),this._parser.registerOscHandler(111,new Qr(m=>this.restoreBgColor(m))),this._parser.registerOscHandler(112,new Qr(m=>this.restoreCursorColor(m))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let m in Ri)this._parser.registerEscHandler({intermediates:"(",final:m},()=>this.selectCharset("("+m)),this._parser.registerEscHandler({intermediates:")",final:m},()=>this.selectCharset(")"+m)),this._parser.registerEscHandler({intermediates:"*",final:m},()=>this.selectCharset("*"+m)),this._parser.registerEscHandler({intermediates:"+",final:m},()=>this.selectCharset("+"+m)),this._parser.registerEscHandler({intermediates:"-",final:m},()=>this.selectCharset("-"+m)),this._parser.registerEscHandler({intermediates:".",final:m},()=>this.selectCharset("."+m)),this._parser.registerEscHandler({intermediates:"/",final:m},()=>this.selectCharset("/"+m));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(m=>(this._logService.error("Parsing error: ",m),m)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new dD((m,v)=>this.requestStatusString(m,v)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,r,s){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=s}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,r)=>setTimeout(()=>r("#SLOW_TIMEOUT"),gD))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${gD} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let r,s=this._activeBuffer.x,a=this._activeBuffer.y,l=0,c=this._parseStack.paused;if(c){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;s=this._parseStack.cursorStartX,a=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>zo&&(l=this._parseStack.position+zo)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,m=>String.fromCharCode(m)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(m=>m.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<zo&&(this._parseBuffer=new Uint32Array(Math.min(e.length,zo))),c||this._dirtyRowTracker.clearRange(),e.length>zo)for(let m=l;m<e.length;m+=zo){let v=m+zo<e.length?m+zo:e.length,y=typeof e=="string"?this._stringDecoder.decode(e.substring(m,v),this._parseBuffer):this._utf8Decoder.decode(e.subarray(m,v),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,y))return this._preserveStack(s,a,y,m),this._logSlowResolvingAsync(r),r}else if(!c){let m=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,m))return this._preserveStack(s,a,m,0),this._logSlowResolvingAsync(r),r}(this._activeBuffer.x!==s||this._activeBuffer.y!==a)&&this._onCursorMove.fire();let f=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),p=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);p<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(p,this._bufferService.rows-1),end:Math.min(f,this._bufferService.rows-1)})}print(e,t,r){let s,a,l=this._charsetService.charset,c=this._optionsService.rawOptions.screenReaderMode,f=this._bufferService.cols,p=this._coreService.decPrivateModes.wraparound,m=this._coreService.modes.insertMode,v=this._curAttrData,y=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&y.getWidth(this._activeBuffer.x-1)===2&&y.setCellFromCodepoint(this._activeBuffer.x-1,0,1,v);let x=this._parser.precedingJoinState;for(let N=t;N<r;++N){if(s=e[N],s<127&&l){let L=l[String.fromCharCode(s)];L&&(s=L.charCodeAt(0))}let _=this._unicodeService.charProperties(s,x);a=Fl.extractWidth(_);let k=Fl.extractShouldJoin(_),j=k?Fl.extractWidth(x):0;if(x=_,c&&this._onA11yChar.fire(Ho(s)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+a-j>f){if(p){let L=y,P=this._activeBuffer.x-j;for(this._activeBuffer.x=j,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),y=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),j>0&&y instanceof jd&&y.copyCellsFrom(L,P,0,j,!1);P<f;)L.setCellFromCodepoint(P++,0,1,v)}else if(this._activeBuffer.x=f-1,a===2)continue}if(k&&this._activeBuffer.x){let L=y.getWidth(this._activeBuffer.x-1)?1:2;y.addCodepointToCell(this._activeBuffer.x-L,s,a);for(let P=a-j;--P>=0;)y.setCellFromCodepoint(this._activeBuffer.x++,0,0,v);continue}if(m&&(y.insertCells(this._activeBuffer.x,a-j,this._activeBuffer.getNullCell(v)),y.getWidth(f-1)===2&&y.setCellFromCodepoint(f-1,0,1,v)),y.setCellFromCodepoint(this._activeBuffer.x++,s,a,v),a>0)for(;--a;)y.setCellFromCodepoint(this._activeBuffer.x++,0,0,v)}this._parser.precedingJoinState=x,this._activeBuffer.x<f&&r-t>0&&y.getWidth(this._activeBuffer.x)===0&&!y.hasContent(this._activeBuffer.x)&&y.setCellFromCodepoint(this._activeBuffer.x,0,1,v),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,r=>mD(r.params[0],this._optionsService.rawOptions.windowOptions)?t(r):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new dD(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Qr(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,r,s=!1,a=!1){let l=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);l.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),a),s&&(l.isWrapped=!1)}_resetBufferLine(e,t=!1){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);r&&(r.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),r.isWrapped=!1)}eraseInDisplay(e,t=!1){var s;this._restrictCursor(this._bufferService.cols);let r;switch(e.params[0]){case 0:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);r<this._bufferService.rows;r++)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(r);break;case 1:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(r+1).isWrapped=!1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(r=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,r-1);r--&&!((s=this._activeBuffer.lines.get(this._activeBuffer.ybase+r))!=null&&s.getTrimmedLength()););for(;r>=0;r--)this._bufferService.scroll(this._eraseAttrData())}else{for(r=this._bufferService.rows,this._dirtyRowTracker.markDirty(r-1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let a=this._activeBuffer.lines.length-this._bufferService.rows;a>0&&(this._activeBuffer.lines.trimStart(a),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-a,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-a,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,a=this._bufferService.rows-1+this._activeBuffer.ybase-s+1;for(;t--;)this._activeBuffer.lines.splice(a-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,s;for(s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,s=this._bufferService.rows-1+this._activeBuffer.ybase-s;t--;)this._activeBuffer.lines.splice(r,1),this._activeBuffer.lines.splice(s,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(mi));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);s.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);s.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);s.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);s.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let r=e.params[0]||1,s=Fl.extractWidth(t),a=this._activeBuffer.x-s,l=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(a),c=new Uint32Array(l.length*r),f=0;for(let m=0;m<l.length;){let v=l.codePointAt(m)||0;c[f++]=v,m+=v>65535?2:1}let p=f;for(let m=1;m<r;++m)c.copyWithin(p,0,f),p+=f;return this.print(c,0,p),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(we.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(we.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(we.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(we.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(we.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,Vl),this._charsetService.setgCharset(1,Vl),this._charsetService.setgCharset(2,Vl),this._charsetService.setgCharset(3,Vl);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(k=>(k[k.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",k[k.SET=1]="SET",k[k.RESET=2]="RESET",k[k.PERMANENTLY_SET=3]="PERMANENTLY_SET",k[k.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(r={}));let s=this._coreService.decPrivateModes,{activeProtocol:a,activeEncoding:l}=this._coreMouseService,c=this._coreService,{buffers:f,cols:p}=this._bufferService,{active:m,alt:v}=f,y=this._optionsService.rawOptions,x=(k,j)=>(c.triggerDataEvent(`${we.ESC}[${t?"":"?"}${k};${j}$y`),!0),N=k=>k?1:2,_=e.params[0];return t?_===2?x(_,4):_===4?x(_,N(c.modes.insertMode)):_===12?x(_,3):_===20?x(_,N(y.convertEol)):x(_,0):_===1?x(_,N(s.applicationCursorKeys)):_===3?x(_,y.windowOptions.setWinLines?p===80?2:p===132?1:0:0):_===6?x(_,N(s.origin)):_===7?x(_,N(s.wraparound)):_===8?x(_,3):_===9?x(_,N(a==="X10")):_===12?x(_,N(y.cursorBlink)):_===25?x(_,N(!c.isCursorHidden)):_===45?x(_,N(s.reverseWraparound)):_===66?x(_,N(s.applicationKeypad)):_===67?x(_,4):_===1e3?x(_,N(a==="VT200")):_===1002?x(_,N(a==="DRAG")):_===1003?x(_,N(a==="ANY")):_===1004?x(_,N(s.sendFocus)):_===1005?x(_,4):_===1006?x(_,N(l==="SGR")):_===1015?x(_,4):_===1016?x(_,N(l==="SGR_PIXELS")):_===1048?x(_,1):_===47||_===1047||_===1049?x(_,N(m===v)):_===2004?x(_,N(s.bracketedPasteMode)):_===2026?x(_,N(s.synchronizedOutput)):x(_,0)}_updateAttrColor(e,t,r,s,a){return t===2?(e|=50331648,e&=-16777216,e|=af.fromColorRGB([r,s,a])):t===5&&(e&=-50331904,e|=33554432|r&255),e}_extractColor(e,t,r){let s=[0,0,-1,0,0,0],a=0,l=0;do{if(s[l+a]=e.params[t+l],e.hasSubParams(t+l)){let c=e.getSubParams(t+l),f=0;do s[1]===5&&(a=1),s[l+f+1+a]=c[f];while(++f<c.length&&f+l+1+a<s.length);break}if(s[1]===5&&l+a>=2||s[1]===2&&l+a>=5)break;s[1]&&(a=1)}while(++l+t<e.length&&l+a<s.length);for(let c=2;c<s.length;++c)s[c]===-1&&(s[c]=0);switch(s[0]){case 38:r.fg=this._updateAttrColor(r.fg,s[1],s[3],s[4],s[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,s[1],s[3],s[4],s[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,s[1],s[3],s[4],s[5])}return l}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=mi.fg,e.bg=mi.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,r,s=this._curAttrData;for(let a=0;a<t;a++)r=e.params[a],r>=30&&r<=37?(s.fg&=-50331904,s.fg|=16777216|r-30):r>=40&&r<=47?(s.bg&=-50331904,s.bg|=16777216|r-40):r>=90&&r<=97?(s.fg&=-50331904,s.fg|=16777216|r-90|8):r>=100&&r<=107?(s.bg&=-50331904,s.bg|=16777216|r-100|8):r===0?this._processSGR0(s):r===1?s.fg|=134217728:r===3?s.bg|=67108864:r===4?(s.fg|=268435456,this._processUnderline(e.hasSubParams(a)?e.getSubParams(a)[0]:1,s)):r===5?s.fg|=536870912:r===7?s.fg|=67108864:r===8?s.fg|=1073741824:r===9?s.fg|=2147483648:r===2?s.bg|=134217728:r===21?this._processUnderline(2,s):r===22?(s.fg&=-134217729,s.bg&=-134217729):r===23?s.bg&=-67108865:r===24?(s.fg&=-268435457,this._processUnderline(0,s)):r===25?s.fg&=-536870913:r===27?s.fg&=-67108865:r===28?s.fg&=-1073741825:r===29?s.fg&=2147483647:r===39?(s.fg&=-67108864,s.fg|=mi.fg&16777215):r===49?(s.bg&=-67108864,s.bg|=mi.bg&16777215):r===38||r===48||r===58?a+=this._extractColor(e,a,s):r===53?s.bg|=1073741824:r===55?s.bg&=-1073741825:r===59?(s.extended=s.extended.clone(),s.extended.underlineColor=-1,s.updateExtended()):r===100?(s.fg&=-67108864,s.fg|=mi.fg&16777215,s.bg&=-67108864,s.bg|=mi.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",r);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${we.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${we.ESC}[${t};${r}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${we.ESC}[?${t};${r}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=mi.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let r=t%2===1;this._coreService.decPrivateModes.cursorBlink=r}return!0}setScrollRegion(e){let t=e.params[0]||1,r;return(e.length<2||(r=e.params[1])>this._bufferService.rows||r===0)&&(r=this._bufferService.rows),r>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=r-1,this._setCursor(0,0)),!0}windowOptions(e){if(!mD(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${we.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>pD&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>pD&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],r=e.split(";");for(;r.length>1;){let s=r.shift(),a=r.shift();if(/^\d+$/.exec(s)){let l=parseInt(s);if(bD(l))if(a==="?")t.push({type:0,index:l});else{let c=fD(a);c&&t.push({type:1,index:l,color:c})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let r=e.slice(0,t).trim(),s=e.slice(t+1);return s?this._createHyperlink(r,s):r.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let r=e.split(":"),s,a=r.findIndex(l=>l.startsWith("id="));return a!==-1&&(s=r[a].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:s,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let r=e.split(";");for(let s=0;s<r.length&&!(t>=this._specialColors.length);++s,++t)if(r[s]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let a=fD(r[s]);a&&this._onColor.fire([{type:1,index:this._specialColors[t],color:a}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],r=e.split(";");for(let s=0;s<r.length;++s)if(/^\d+$/.exec(r[s])){let a=parseInt(r[s]);bD(a)&&t.push({type:2,index:a})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,Vl),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(H$[e[0]],Ri[e[1]]||Vl),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=mi.clone(),this._eraseAttrDataInternal=mi.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new xs;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let r=this._activeBuffer.ybase+this._activeBuffer.y+t,s=this._activeBuffer.lines.get(r);s&&(s.fill(e),s.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let r=c=>(this._coreService.triggerDataEvent(`${we.ESC}${c}${we.ESC}\\`),!0),s=this._bufferService.buffer,a=this._optionsService.rawOptions;return r(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${s.scrollTop+1};${s.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[a.cursorStyle]-(a.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},bN=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(vD=e,e=t,t=vD),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};bN=ti([tt(0,Cr)],bN);function bD(e){return 0<=e&&e<256}var q$=5e7,_D=12,K$=50,Y$=class extends nn{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new Ie),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let r;for(;r=this._writeBuffer.shift();){this._action(r);let s=this._callbacks.shift();s&&s()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>q$)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let r=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let s=this._writeBuffer[this._bufferOffset],a=this._action(s,t);if(a){let c=f=>performance.now()-r>=_D?setTimeout(()=>this._innerWrite(0,f)):this._innerWrite(r,f);a.catch(f=>(queueMicrotask(()=>{throw f}),Promise.resolve(!1))).then(c);return}let l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=s.length,performance.now()-r>=_D)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>K$&&(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()}},_N=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let f=t.addMarker(t.ybase+t.y),p={data:e,id:this._nextId++,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(p,f)),this._dataByLinkId.set(p.id,p),p.id}let r=e,s=this._getEntryIdKey(r),a=this._entriesWithId.get(s);if(a)return this.addLineToLink(a.id,t.ybase+t.y),a.id;let l=t.addMarker(t.ybase+t.y),c={id:this._nextId++,key:this._getEntryIdKey(r),data:r,lines:[l]};return l.onDispose(()=>this._removeMarkerFromLink(c,l)),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.id}addLineToLink(e,t){let r=this._dataByLinkId.get(e);if(r&&r.lines.every(s=>s.line!==t)){let s=this._bufferService.buffer.addMarker(t);r.lines.push(s),s.onDispose(()=>this._removeMarkerFromLink(r,s))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let r=e.lines.indexOf(t);r!==-1&&(e.lines.splice(r,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};_N=ti([tt(0,Cr)],_N);var yD=!1,G$=class extends nn{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new Du),this._onBinary=this._register(new Ie),this.onBinary=this._onBinary.event,this._onData=this._register(new Ie),this.onData=this._onData.event,this._onLineFeed=this._register(new Ie),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new Ie),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new Ie),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new Ie),this._instantiationService=new _$,this.optionsService=this._register(new R$(e)),this._instantiationService.setService(Dr,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(pN)),this._instantiationService.setService(Cr,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(fN)),this._instantiationService.setService(QR,this._logService),this.coreService=this._register(this._instantiationService.createInstance(mN)),this._instantiationService.setService(rc,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(gN)),this._instantiationService.setService(ZR,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(Fl)),this._instantiationService.setService(mz,this.unicodeService),this._charsetService=this._instantiationService.createInstance(j$),this._instantiationService.setService(pz,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(_N),this._instantiationService.setService(eA,this._oscLinkService),this._inputHandler=this._register(new W$(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(ar.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(ar.forward(this._bufferService.onResize,this._onResize)),this._register(ar.forward(this.coreService.onData,this._onData)),this._register(ar.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new Y$((t,r)=>this._inputHandler.parse(t,r))),this._register(ar.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new Ie),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!yD&&(this._logService.warn("writeSync is unreliable and will be removed soon."),yD=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,MA),t=Math.max(t,OA),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(hD.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(hD(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Kn(()=>{for(let t of e)t.dispose()})}}},J$={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function X$(e,t,r,s){var c;let a={type:0,cancel:!1,key:void 0},l=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?a.key=we.ESC+"OA":a.key=we.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?a.key=we.ESC+"OD":a.key=we.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?a.key=we.ESC+"OC":a.key=we.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?a.key=we.ESC+"OB":a.key=we.ESC+"[B");break;case 8:a.key=e.ctrlKey?"\b":we.DEL,e.altKey&&(a.key=we.ESC+a.key);break;case 9:if(e.shiftKey){a.key=we.ESC+"[Z";break}a.key=we.HT,a.cancel=!0;break;case 13:a.key=e.altKey?we.ESC+we.CR:we.CR,a.cancel=!0;break;case 27:a.key=we.ESC,e.altKey&&(a.key=we.ESC+we.ESC),a.cancel=!0;break;case 37:if(e.metaKey)break;l?a.key=we.ESC+"[1;"+(l+1)+"D":t?a.key=we.ESC+"OD":a.key=we.ESC+"[D";break;case 39:if(e.metaKey)break;l?a.key=we.ESC+"[1;"+(l+1)+"C":t?a.key=we.ESC+"OC":a.key=we.ESC+"[C";break;case 38:if(e.metaKey)break;l?a.key=we.ESC+"[1;"+(l+1)+"A":t?a.key=we.ESC+"OA":a.key=we.ESC+"[A";break;case 40:if(e.metaKey)break;l?a.key=we.ESC+"[1;"+(l+1)+"B":t?a.key=we.ESC+"OB":a.key=we.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(a.key=we.ESC+"[2~");break;case 46:l?a.key=we.ESC+"[3;"+(l+1)+"~":a.key=we.ESC+"[3~";break;case 36:l?a.key=we.ESC+"[1;"+(l+1)+"H":t?a.key=we.ESC+"OH":a.key=we.ESC+"[H";break;case 35:l?a.key=we.ESC+"[1;"+(l+1)+"F":t?a.key=we.ESC+"OF":a.key=we.ESC+"[F";break;case 33:e.shiftKey?a.type=2:e.ctrlKey?a.key=we.ESC+"[5;"+(l+1)+"~":a.key=we.ESC+"[5~";break;case 34:e.shiftKey?a.type=3:e.ctrlKey?a.key=we.ESC+"[6;"+(l+1)+"~":a.key=we.ESC+"[6~";break;case 112:l?a.key=we.ESC+"[1;"+(l+1)+"P":a.key=we.ESC+"OP";break;case 113:l?a.key=we.ESC+"[1;"+(l+1)+"Q":a.key=we.ESC+"OQ";break;case 114:l?a.key=we.ESC+"[1;"+(l+1)+"R":a.key=we.ESC+"OR";break;case 115:l?a.key=we.ESC+"[1;"+(l+1)+"S":a.key=we.ESC+"OS";break;case 116:l?a.key=we.ESC+"[15;"+(l+1)+"~":a.key=we.ESC+"[15~";break;case 117:l?a.key=we.ESC+"[17;"+(l+1)+"~":a.key=we.ESC+"[17~";break;case 118:l?a.key=we.ESC+"[18;"+(l+1)+"~":a.key=we.ESC+"[18~";break;case 119:l?a.key=we.ESC+"[19;"+(l+1)+"~":a.key=we.ESC+"[19~";break;case 120:l?a.key=we.ESC+"[20;"+(l+1)+"~":a.key=we.ESC+"[20~";break;case 121:l?a.key=we.ESC+"[21;"+(l+1)+"~":a.key=we.ESC+"[21~";break;case 122:l?a.key=we.ESC+"[23;"+(l+1)+"~":a.key=we.ESC+"[23~";break;case 123:l?a.key=we.ESC+"[24;"+(l+1)+"~":a.key=we.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?a.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?a.key=we.NUL:e.keyCode>=51&&e.keyCode<=55?a.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?a.key=we.DEL:e.keyCode===219?a.key=we.ESC:e.keyCode===220?a.key=we.FS:e.keyCode===221&&(a.key=we.GS);else if((!r||s)&&e.altKey&&!e.metaKey){let f=(c=J$[e.keyCode])==null?void 0:c[e.shiftKey?1:0];if(f)a.key=we.ESC+f;else if(e.keyCode>=65&&e.keyCode<=90){let p=e.ctrlKey?e.keyCode-64:e.keyCode+32,m=String.fromCharCode(p);e.shiftKey&&(m=m.toUpperCase()),a.key=we.ESC+m}else if(e.keyCode===32)a.key=we.ESC+(e.ctrlKey?we.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let p=e.code.slice(3,4);e.shiftKey||(p=p.toLowerCase()),a.key=we.ESC+p,a.cancel=!0}}else r&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(a.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?a.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(a.key=we.US),e.key==="@"&&(a.key=we.NUL));break}return a}var ri=0,Z$=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new ag,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new ag,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((a,l)=>this._getKey(a)-this._getKey(l)),t=0,r=0,s=new Array(this._array.length+this._insertedValues.length);for(let a=0;a<s.length;a++)r>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[r])?(s[a]=e[t],t++):s[a]=this._array[r++];this._array=s,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(ri=this._search(t),ri===-1)||this._getKey(this._array[ri])!==t)return!1;do if(this._array[ri]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(ri),!0;while(++ri<this._array.length&&this._getKey(this._array[ri])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((a,l)=>a-l),t=0,r=new Array(this._array.length-e.length),s=0;for(let a=0;a<this._array.length;a++)e[t]===a?t++:r[s++]=this._array[a];this._array=r,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(ri=this._search(e),!(ri<0||ri>=this._array.length)&&this._getKey(this._array[ri])===e))do yield this._array[ri];while(++ri<this._array.length&&this._getKey(this._array[ri])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(ri=this._search(e),!(ri<0||ri>=this._array.length)&&this._getKey(this._array[ri])===e))do t(this._array[ri]);while(++ri<this._array.length&&this._getKey(this._array[ri])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,r=this._array.length-1;for(;r>=t;){let s=t+r>>1,a=this._getKey(this._array[s]);if(a>e)r=s-1;else if(a<e)t=s+1;else{for(;s>0&&this._getKey(this._array[s-1])===e;)s--;return s}}return t}},iy=0,ND=0,Q$=class extends nn{constructor(){super(),this._decorations=new Z$(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new Ie),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new Ie),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Kn(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new eU(e);if(t){let r=t.marker.onDispose(()=>t.dispose()),s=t.onDispose(()=>{s.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),r.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,r){let s=0,a=0;for(let l of this._decorations.getKeyIterator(t))s=l.options.x??0,a=s+(l.options.width??1),e>=s&&e<a&&(!r||(l.options.layer??"bottom")===r)&&(yield l)}forEachDecorationAtCell(e,t,r,s){this._decorations.forEachByKey(t,a=>{iy=a.options.x??0,ND=iy+(a.options.width??1),e>=iy&&e<ND&&(!r||(a.options.layer??"bottom")===r)&&s(a)})}},eU=class extends Jo{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new Ie),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new Ie),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Jn.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Jn.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},tU=1e3,nU=class{constructor(e,t=tU){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let s=performance.now();if(s-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=s,this._innerRefresh();else if(!this._additionalRefreshRequested){let a=s-this._lastRefreshMs,l=this._debounceThresholdMS-a;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},l)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},wD=20,og=class extends nn{constructor(e,t,r,s){super(),this._terminal=e,this._coreBrowserService=r,this._renderService=s,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let a=this._coreBrowserService.mainDocument;this._accessibilityContainer=a.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=a.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=a.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new nU(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(l=>this._handleResize(l.rows))),this._register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(l=>this._handleChar(l))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
257
|
+
`))),this._register(this._terminal.onA11yTab(l=>this._handleTab(l))),this._register(this._terminal.onKey(l=>this._handleKey(l.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(It(a,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Kn(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<wD+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
258
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===wD+1&&(this._liveRegion.textContent+=Iy.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let r=this._terminal.buffer,s=r.lines.length.toString();for(let a=e;a<=t;a++){let l=r.lines.get(r.ydisp+a),c=[],f=(l==null?void 0:l.translateToString(!0,void 0,void 0,c))||"",p=(r.ydisp+a+1).toString(),m=this._rowElements[a];m&&(f.length===0?(m.textContent=" ",this._rowColumns.set(m,[0,1])):(m.textContent=f,this._rowColumns.set(m,c)),m.setAttribute("aria-posinset",p),m.setAttribute("aria-setsize",s),this._alignRowWidth(m))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let r=e.target,s=this._rowElements[t===0?1:this._rowElements.length-2],a=r.getAttribute("aria-posinset"),l=t===0?"1":`${this._terminal.buffer.lines.length}`;if(a===l||e.relatedTarget!==s)return;let c,f;if(t===0?(c=r,f=this._rowElements.pop(),this._rowContainer.removeChild(f)):(c=this._rowElements.shift(),f=r,this._rowContainer.removeChild(c)),c.removeEventListener("focus",this._topBoundaryFocusListener),f.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{let p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var f;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},r={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(r.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===r.node&&t.offset>r.offset)&&([t,r]=[r,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let s=this._rowElements.slice(-1)[0];if(r.node.compareDocumentPosition(s)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(r={node:s,offset:((f=s.textContent)==null?void 0:f.length)??0}),!this._rowContainer.contains(r.node))return;let a=({node:p,offset:m})=>{let v=p instanceof Text?p.parentNode:p,y=parseInt(v==null?void 0:v.getAttribute("aria-posinset"),10)-1;if(isNaN(y))return console.warn("row is invalid. Race condition?"),null;let x=this._rowColumns.get(v);if(!x)return console.warn("columns is null. Race condition?"),null;let N=m<x.length?x[m]:x.slice(-1)[0]+1;return N>=this._terminal.cols&&(++y,N=0),{row:y,column:N}},l=a(t),c=a(r);if(!(!l||!c)){if(l.row>c.row||l.row===c.row&&l.column>=c.column)throw new Error("invalid range");this._terminal.select(l.column,l.row,(c.row-l.row)*this._terminal.cols-l.column+c.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var a,l;e.style.transform="";let t=e.getBoundingClientRect().width,r=(l=(a=this._rowColumns.get(e))==null?void 0:a.slice(-1))==null?void 0:l[0];if(!r)return;let s=r*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${s/t})`}};og=ti([tt(1,qN),tt(2,oo),tt(3,lo)],og);var yN=class extends nn{constructor(e,t,r,s,a){super(),this._element=e,this._mouseService=t,this._renderService=r,this._bufferService=s,this._linkProviderService=a,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new Ie),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new Ie),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Kn(()=>{var l;tc(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(l=this._activeProviderReplies)==null||l.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(It(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(It(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(It(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(It(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let r=e.composedPath();for(let s=0;s<r.length;s++){let a=r[s];if(a.classList.contains("xterm"))break;if(a.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var s,a;(!this._activeProviderReplies||!t)&&((s=this._activeProviderReplies)==null||s.forEach(l=>{l==null||l.forEach(c=>{c.link.dispose&&c.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(let[l,c]of this._linkProviderService.linkProviders.entries())t?(a=this._activeProviderReplies)!=null&&a.get(l)&&(r=this._checkLinkProviderResult(l,e,r)):c.provideLinks(e.y,f=>{var m,v;if(this._isMouseOut)return;let p=f==null?void 0:f.map(y=>({link:y}));(m=this._activeProviderReplies)==null||m.set(l,p),r=this._checkLinkProviderResult(l,e,r),((v=this._activeProviderReplies)==null?void 0:v.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let r=new Set;for(let s=0;s<t.size;s++){let a=t.get(s);if(a)for(let l=0;l<a.length;l++){let c=a[l],f=c.link.range.start.y<e?0:c.link.range.start.x,p=c.link.range.end.y>e?this._bufferService.cols:c.link.range.end.x;for(let m=f;m<=p;m++){if(r.has(m)){a.splice(l--,1);break}r.add(m)}}}}_checkLinkProviderResult(e,t,r){var l;if(!this._activeProviderReplies)return r;let s=this._activeProviderReplies.get(e),a=!1;for(let c=0;c<e;c++)(!this._activeProviderReplies.has(c)||this._activeProviderReplies.get(c))&&(a=!0);if(!a&&s){let c=s.find(f=>this._linkAtPosition(f.link,t));c&&(r=!0,this._handleNewLink(c))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let c=0;c<this._activeProviderReplies.size;c++){let f=(l=this._activeProviderReplies.get(c))==null?void 0:l.find(p=>this._linkAtPosition(p.link,t));if(f){r=!0,this._handleNewLink(f);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&iU(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,tc(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var r,s;return(s=(r=this._currentLink)==null?void 0:r.state)==null?void 0:s.decorations.pointerCursor},set:r=>{var s;(s=this._currentLink)!=null&&s.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>{var r,s;return(s=(r=this._currentLink)==null?void 0:r.state)==null?void 0:s.decorations.underline},set:r=>{var s,a,l;(s=this._currentLink)!=null&&s.state&&((l=(a=this._currentLink)==null?void 0:a.state)==null?void 0:l.decorations.underline)!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;let s=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(s,a),this._lastMouseEvent)){let l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,t,r){var s;(s=this._currentLink)!=null&&s.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)}_fireUnderlineEvent(e,t){let r=e.range,s=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-s-1,r.end.x,r.end.y-s-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,t,r){var s;(s=this._currentLink)!=null&&s.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)}_linkAtPosition(e,t){let r=e.range.start.y*this._bufferService.cols+e.range.start.x,s=e.range.end.y*this._bufferService.cols+e.range.end.x,a=t.y*this._bufferService.cols+t.x;return r<=a&&a<=s}_positionFromMouseEvent(e,t,r){let s=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(s)return{x:s[0],y:s[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,r,s,a){return{x1:e,y1:t,x2:r,y2:s,cols:this._bufferService.cols,fg:a}}};yN=ti([tt(1,KN),tt(2,lo),tt(3,Cr),tt(4,nA)],yN);function iU(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var rU=class extends G${constructor(e={}){super(e),this._linkifier=this._register(new Du),this.browser=NA,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Du),this._onCursorMove=this._register(new Ie),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new Ie),this.onKey=this._onKey.event,this._onRender=this._register(new Ie),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new Ie),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new Ie),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new Ie),this.onBell=this._onBell.event,this._onFocus=this._register(new Ie),this._onBlur=this._register(new Ie),this._onA11yCharEmitter=this._register(new Ie),this._onA11yTabEmitter=this._register(new Ie),this._onWillOpen=this._register(new Ie),this._setup(),this._decorationService=this._instantiationService.createInstance(Q$),this._instantiationService.setService(of,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(K8),this._instantiationService.setService(nA,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(zy)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(ar.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(ar.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(ar.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(ar.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Kn(()=>{var t,r;this._customKeyEventHandler=void 0,(r=(t=this.element)==null?void 0:t.parentNode)==null||r.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let r,s="";switch(t.index){case 256:r="foreground",s="10";break;case 257:r="background",s="11";break;case 258:r="cursor",s="12";break;default:r="ansi",s="4;"+t.index}switch(t.type){case 0:let a=$n.toColorRGB(r==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[r]);this.coreService.triggerDataEvent(`${we.ESC}]${s};${U$(a)}${_A.ST}`);break;case 1:if(r==="ansi")this._themeService.modifyColors(l=>l.ansi[t.index]=gi.toColor(...t.color));else{let l=r;this._themeService.modifyColors(c=>c[l]=gi.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(og,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(we.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(we.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let r=Math.min(this.buffer.x,this.cols-1),s=this._renderService.dimensions.css.cell.height,a=t.getWidth(r),l=this._renderService.dimensions.css.cell.width*a,c=this.buffer.y*this._renderService.dimensions.css.cell.height,f=r*this._renderService.dimensions.css.cell.width;this.textarea.style.left=f+"px",this.textarea.style.top=c+"px",this.textarea.style.width=l+"px",this.textarea.style.height=s+"px",this.textarea.style.lineHeight=s+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(It(this.element,"copy",t=>{this.hasSelection()&&lz(t,this._selectionService)}));let e=t=>cz(t,this.textarea,this.coreService,this.optionsService);this._register(It(this.textarea,"paste",e)),this._register(It(this.element,"paste",e)),wA?this._register(It(this.element,"mousedown",t=>{t.button===2&&MC(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(It(this.element,"contextmenu",t=>{MC(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),tw&&this._register(It(this.element,"auxclick",t=>{t.button===1&&KR(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(It(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(It(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(It(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(It(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(It(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(It(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(It(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var a;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((a=this.element)==null?void 0:a.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(It(this.screenElement,"mousemove",l=>this.updateCursorStyle(l))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let r=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",Vy.get()),EA||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>r.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(W8,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(oo,this._coreBrowserService),this._register(It(this.textarea,"focus",l=>this._handleTextAreaFocus(l))),this._register(It(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(lN,this._document,this._helperContainer),this._instantiationService.setService(gg,this._charSizeService),this._themeService=this._instantiationService.createInstance(dN),this._instantiationService.setService(Mu,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(rg),this._instantiationService.setService(tA,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(uN,this.rows,this.screenElement)),this._instantiationService.setService(lo,this._renderService),this._register(this._renderService.onRenderedViewportChange(l=>this._onRender.fire(l))),this.onResize(l=>this._renderService.resize(l.cols,l.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(sN,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(cN),this._instantiationService.setService(KN,this._mouseService);let s=this._linkifier.value=this._register(this._instantiationService.createInstance(yN,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(iN,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(l=>{super.scrollLines(l,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(hN,this.element,this.screenElement,s)),this._instantiationService.setService(vz,this._selectionService),this._register(this._selectionService.onRequestScrollLines(l=>this.scrollLines(l.amount,l.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(l=>this._renderService.handleSelectionChanged(l.start,l.end,l.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(l=>{this.textarea.value=l,this.textarea.focus(),this.textarea.select()})),this._register(ar.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var l;this._selectionService.refresh(),(l=this._viewport)==null||l.queueSync()})),this._register(this._instantiationService.createInstance(rN,this.screenElement)),this._register(It(this.element,"mousedown",l=>this._selectionService.handleMouseDown(l))),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(og,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",l=>this._handleScreenReaderModeOptionChange(l))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(ig,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",l=>{!this._overviewRulerRenderer&&l&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(ig,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(oN,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function r(l){var m,v,y,x,N;let c=e._mouseService.getMouseReportCoords(l,e.screenElement);if(!c)return!1;let f,p;switch(l.overrideType||l.type){case"mousemove":p=32,l.buttons===void 0?(f=3,l.button!==void 0&&(f=l.button<3?l.button:3)):f=l.buttons&1?0:l.buttons&4?1:l.buttons&2?2:3;break;case"mouseup":p=0,f=l.button<3?l.button:3;break;case"mousedown":p=1,f=l.button<3?l.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(l)===!1)return!1;let _=l.deltaY;if(_===0||e.coreMouseService.consumeWheelEvent(l,(x=(y=(v=(m=e._renderService)==null?void 0:m.dimensions)==null?void 0:v.device)==null?void 0:y.cell)==null?void 0:x.height,(N=e._coreBrowserService)==null?void 0:N.dpr)===0)return!1;p=_<0?0:1,f=4;break;default:return!1}return p===void 0||f===void 0||f>4?!1:e.coreMouseService.triggerMouseEvent({col:c.col,row:c.row,x:c.x,y:c.y,button:f,action:p,ctrl:l.ctrlKey,alt:l.altKey,shift:l.shiftKey})}let s={mouseup:null,wheel:null,mousedrag:null,mousemove:null},a={mouseup:l=>(r(l),l.buttons||(this._document.removeEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.removeEventListener("mousemove",s.mousedrag)),this.cancel(l)),wheel:l=>(r(l),this.cancel(l,!0)),mousedrag:l=>{l.buttons&&r(l)},mousemove:l=>{l.buttons||r(l)}};this._register(this.coreMouseService.onProtocolChange(l=>{l?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(l)),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()),l&8?s.mousemove||(t.addEventListener("mousemove",a.mousemove),s.mousemove=a.mousemove):(t.removeEventListener("mousemove",s.mousemove),s.mousemove=null),l&16?s.wheel||(t.addEventListener("wheel",a.wheel,{passive:!1}),s.wheel=a.wheel):(t.removeEventListener("wheel",s.wheel),s.wheel=null),l&2?s.mouseup||(s.mouseup=a.mouseup):(this._document.removeEventListener("mouseup",s.mouseup),s.mouseup=null),l&4?s.mousedrag||(s.mousedrag=a.mousedrag):(this._document.removeEventListener("mousemove",s.mousedrag),s.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(It(t,"mousedown",l=>{if(l.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(l)))return r(l),s.mouseup&&this._document.addEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.addEventListener("mousemove",s.mousedrag),this.cancel(l)})),this._register(It(t,"wheel",l=>{var c,f,p,m,v;if(!s.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(l)===!1)return!1;if(!this.buffer.hasScrollback){if(l.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(l,(m=(p=(f=(c=e._renderService)==null?void 0:c.dimensions)==null?void 0:f.device)==null?void 0:p.cell)==null?void 0:m.height,(v=e._coreBrowserService)==null?void 0:v.dpr)===0)return this.cancel(l,!0);let y=we.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(l.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(y,!0),this.cancel(l,!0)}}},{passive:!1}))}refresh(e,t){var r;(r=this._renderService)==null||r.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){qR(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,r){this._selectionService.setSelection(e,t,r)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var r;(r=this._selectionService)==null||r.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let r=X$(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),r.type===3||r.type===2){let s=this.rows-1;return this.scrollLines(r.type===2?-s:s),this.cancel(e,!0)}if(r.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((r.key===we.ETX||r.key===we.CR)&&(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?r:r&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(sU(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var r;(r=this._charSizeService)==null||r.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(mi));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(we.ESC+"[I"):this.coreService.triggerDataEvent(we.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),r=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${we.ESC}[4;${r};${t}t`);break;case 1:let s=this._renderService.dimensions.css.cell.width.toFixed(0),a=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${we.ESC}[6;${a};${s}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function sU(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var aU=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=()=>this._wrappedAddonDispose(r),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},oU=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new xs)}translateToString(e,t,r){return this._line.translateToString(e,t,r)}},xD=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new oU(t)}getNullCell(){return new xs}},lU=class extends nn{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new Ie),this.onBufferChange=this._onBufferChange.event,this._normal=new xD(this._core.buffers.normal,"normal"),this._alternate=new xD(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)}},cU=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,r=>t(r.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(r,s)=>t(r,s.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},uU=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},hU=["cols","rows"],sa=0,dU=class extends nn{constructor(e){super(),this._core=this._register(new rU(e)),this._addonManager=this._register(new aU),this._publicOptions={...this._core.options};let t=s=>this._core.options[s],r=(s,a)=>{this._checkReadonlyOptions(s),this._core.options[s]=a};for(let s in this._core.options){let a={get:t.bind(this,s),set:r.bind(this,s)};Object.defineProperty(this._publicOptions,s,a)}}_checkReadonlyOptions(e){if(hU.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new cU(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new uU(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 lU(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
|
|
259
|
+
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return Vy.get()},set promptLabel(e){Vy.set(e)},get tooMuchOutput(){return Iy.get()},set tooMuchOutput(e){Iy.set(e)}}}_verifyIntegers(...e){for(sa of e)if(sa===1/0||isNaN(sa)||sa%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(sa of e)if(sa&&(sa===1/0||isNaN(sa)||sa%1!==0||sa<0))throw new Error("This API only accepts positive integers")}};/**
|
|
260
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
261
|
+
* @license MIT
|
|
262
|
+
*
|
|
263
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
264
|
+
* @license MIT
|
|
265
|
+
*
|
|
266
|
+
* Originally forked from (with the author's permission):
|
|
267
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
268
|
+
* http://bellard.org/jslinux/
|
|
269
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
270
|
+
*/var fU=2,pU=1,mU=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var y;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((y=this._terminal.options.overviewRuler)==null?void 0:y.width)||14,r=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(r.getPropertyValue("height")),a=Math.max(0,parseInt(r.getPropertyValue("width"))),l=window.getComputedStyle(this._terminal.element),c={top:parseInt(l.getPropertyValue("padding-top")),bottom:parseInt(l.getPropertyValue("padding-bottom")),right:parseInt(l.getPropertyValue("padding-right")),left:parseInt(l.getPropertyValue("padding-left"))},f=c.top+c.bottom,p=c.right+c.left,m=s-f,v=a-p-t;return{cols:Math.max(fU,Math.floor(v/e.css.cell.width)),rows:Math.max(pU,Math.floor(m/e.css.cell.height))}}};function gU(e){return e==null?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} kB`:`${(e/1048576).toFixed(1)} MB`}const SD=new Set(["markdown","code","text","csv","html"]);function vU(e){const t=e==null?void 0:e.httpBody;return!t||t.error!=="changed_on_disk"?null:{content:t.content??"",hash:t.hash??""}}function bU({path:e,line:t,onClose:r}){const[s,a]=R.useState(null),[l,c]=R.useState(""),[f,p]=R.useState(!1),[m,v]=R.useState(!1),[y,x]=R.useState(""),[N,_]=R.useState(null),[k,j]=R.useState(!1),[L,P]=R.useState(""),O=R.useRef(e),T=R.useCallback(async(Z,ve={})=>{O.current=Z,p(!0),c("");try{const pe=await Qe.statFile(Z);if(O.current!==Z)return;if(!SD.has(pe.kind)){a({...pe,content:"",truncated:!1,binary:!0}),_(null);return}const Q=await Qe.readFile(Z);if(O.current!==Z)return;a({...pe,content:Q.content,truncated:Q.truncated,binary:Q.binary}),ve.keepDraft||(x(Q.content),v(!1)),_(null)}catch(pe){O.current===Z&&c(String((pe==null?void 0:pe.message)??pe))}finally{O.current===Z&&p(!1)}},[]);R.useEffect(()=>{T(e)},[e,T]),R.useEffect(()=>{a(null),v(!1),x(""),P("")},[e]),R.useEffect(()=>{if(!s)return;const Z=window.setInterval(()=>{(async()=>{try{const ve=await Qe.statFile(e);if(O.current!==e||ve.hash===s.hash)return;if(m){_({content:"",hash:ve.hash});return}await T(e)}catch{}})()},3e3);return()=>window.clearInterval(Z)},[s,m,e,T]);const B=!!(s&&m&&y!==s.content),U=R.useCallback(async()=>{if(s){j(!0),P("");try{const Z=await Qe.writeFile(s.path,y,s.hash);a({...s,content:y,hash:Z.hash,mtimeMs:Z.mtimeMs,size:Z.size}),v(!1),P("saved"),window.setTimeout(()=>P(""),1500)}catch(Z){const ve=vU(Z);ve?_(ve):c(String((Z==null?void 0:Z.message)??Z))}finally{j(!1)}}},[s,y]);R.useEffect(()=>{if(!m)return;const Z=ve=>{(ve.metaKey||ve.ctrlKey)&&ve.key.toLowerCase()==="s"&&(ve.preventDefault(),U())};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[m,U]);const ce=!!(s!=null&&s.editable)&&!(s!=null&&s.binary),re=R.useMemo(()=>s?s.binary&&!SD.has(s.kind)?h.jsxDEV(_U,{file:s},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:176,columnNumber:59},this):m?h.jsxDEV("textarea",{className:"file-edit",value:y,spellCheck:!1,"aria-label":`edit ${s.name}`,onChange:Z=>x(Z.target.value)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:179,columnNumber:9},this):h.jsxDEV(yU,{file:s,line:t},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:188,columnNumber:12},this):h.jsxDEV("div",{className:"tool-note",children:"loading…"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:175,columnNumber:23},this),[s,m,y,t]);return h.jsxDEV("div",{className:"file-preview",children:[h.jsxDEV("div",{className:"file-preview-head",children:[h.jsxDEV("button",{className:"icon-btn",title:"close preview","aria-label":"close preview",onClick:r,children:h.jsxDEV(PN,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:195,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:194,columnNumber:9},this),h.jsxDEV(Ql,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:197,columnNumber:9},this),h.jsxDEV("span",{className:"file-name",title:(s==null?void 0:s.path)??e,children:[(s==null?void 0:s.name)??e.split("/").pop()??e,B?h.jsxDEV("span",{className:"file-dirty",title:"unsaved changes",children:" ●"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:200,columnNumber:20},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:198,columnNumber:9},this),h.jsxDEV("span",{className:"file-size",children:[gU(s==null?void 0:s.size),s!=null&&s.truncated&&!m?" · showing the head":"",L?` · ${L}`:"",f&&s?" · loading…":""]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:202,columnNumber:9},this),h.jsxDEV("span",{className:"head-spacer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:208,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:`open ${(s==null?void 0:s.name)??"file"} in a new tab`,"aria-label":"open raw",onClick:()=>window.open(Wm((s==null?void 0:s.path)??e),"_blank","noopener"),children:h.jsxDEV(iR,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:215,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:209,columnNumber:9},this),ce?m?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("button",{className:"icon-btn",title:"save (⌘S)","aria-label":"save",disabled:k||!B,onClick:()=>void U(),children:"save"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:220,columnNumber:15},this),h.jsxDEV("button",{className:"icon-btn",title:"discard and leave the editor","aria-label":"cancel edit",onClick:()=>{v(!1),x((s==null?void 0:s.content)??"")},children:"cancel"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:229,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:219,columnNumber:13},this):h.jsxDEV("button",{className:"icon-btn",title:"edit this file","aria-label":"edit",onClick:()=>{v(!0),x((s==null?void 0:s.content)??"")},children:"edit"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:239,columnNumber:13},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:193,columnNumber:7},this),N?h.jsxDEV("div",{className:"file-conflict",children:[h.jsxDEV("span",{children:N.content?"this file changed on disk since you opened it":"the agent changed this file while you were editing"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:247,columnNumber:11},this),h.jsxDEV("button",{className:"icon-btn",onClick:()=>{B&&!window.confirm("discard your changes and load the file from disk?")||(_(null),T(e))},children:"reload theirs"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:252,columnNumber:11},this),h.jsxDEV("button",{className:"icon-btn",onClick:()=>_(null),children:"keep mine"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:263,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:246,columnNumber:9},this):null,l?h.jsxDEV("div",{className:"tool-error",children:l},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:266,columnNumber:16},this):null,h.jsxDEV("div",{className:"file-preview-body",children:re},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:267,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:192,columnNumber:5},this)}function _U({file:e}){const t=Wm(e.path);return e.kind==="image"?h.jsxDEV("a",{className:"file-image-wrap",href:t,target:"_blank",rel:"noopener noreferrer",title:"open full size",children:h.jsxDEV("img",{className:"file-image",src:t,alt:e.name},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:278,columnNumber:9},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:277,columnNumber:7},this):e.kind==="pdf"?h.jsxDEV("iframe",{className:"file-frame",src:t,title:e.name},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:283,columnNumber:12},this):e.kind==="audio"?h.jsxDEV("audio",{className:"file-audio",src:t,controls:!0,preload:"metadata"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:286,columnNumber:12},this):e.kind==="video"?h.jsxDEV("video",{className:"file-video",src:t,controls:!0,preload:"metadata"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:289,columnNumber:12},this):h.jsxDEV("div",{className:"tool-note",children:["no preview for this type yet (",e.kind,")",h.jsxDEV("div",{className:"file-fallback",children:h.jsxDEV("a",{className:"icon-btn",href:t,target:"_blank",rel:"noopener noreferrer",children:"open in a new tab"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:297,columnNumber:9},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:296,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:294,columnNumber:5},this)}function yU({file:e,line:t}){const[r,s]=R.useState(!!t||e.kind!=="markdown"),a=R.useRef(null),l=R.useRef(null);return R.useEffect(()=>{r||EN(l.current)},[r,e.content]),R.useEffect(()=>{s(!!t||e.kind!=="markdown")},[e.path,e.kind,t]),R.useEffect(()=>{if(!t||!a.current)return;const c=a.current.querySelector(`[data-line="${t}"]`);c==null||c.scrollIntoView({block:"center"})},[t,r,e.content]),e.binary?h.jsxDEV("div",{className:"tool-note",children:"binary file — no preview"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:326,columnNumber:27},this):h.jsxDEV(h.Fragment,{children:[e.kind==="markdown"?h.jsxDEV("div",{className:"file-view-toggle",children:[h.jsxDEV("button",{className:`tool-tab ${r?"":"active"}`,onClick:()=>s(!1),children:"rendered"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:332,columnNumber:11},this),h.jsxDEV("button",{className:`tool-tab ${r?"active":""}`,onClick:()=>s(!0),children:"source"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:333,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:331,columnNumber:9},this):null,r?h.jsxDEV("div",{className:"file-source",ref:a,children:e.content.split(`
|
|
271
|
+
`).map((c,f)=>h.jsxDEV("div",{className:`file-line ${t===f+1?"hit":""}`,"data-line":f+1,children:[h.jsxDEV("span",{className:"file-ln",children:f+1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:340,columnNumber:15},this),h.jsxDEV("span",{className:"file-lt",children:c||" "},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:341,columnNumber:15},this)]},`${f}-${c}`,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:339,columnNumber:13},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:337,columnNumber:9},this):h.jsxDEV("div",{className:"md file-md",ref:l,dangerouslySetInnerHTML:{__html:LN(e.content,e.path.replace(/\/[^/]*$/,"")||"/")}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:346,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/FilePreview.tsx",lineNumber:329,columnNumber:5},this)}const ED=360,ry=(e,t,r)=>Math.max(t,Math.min(r,e));function NU(e,t){try{const r=window.localStorage.getItem(e),s=r===null?Number.NaN:Number.parseFloat(r);return Number.isFinite(s)&&s>0?s:t}catch{return t}}function sy(e,t){try{window.localStorage.setItem(e,String(Math.round(t)))}catch{}}function NN(e){const{storage:t,fallback:r,min:s,max:a,rightEdge:l=!1,label:c}=e,[f,p]=R.useState(()=>NU(t,r)),[,m]=R.useState(0);R.useEffect(()=>{const k=()=>m(j=>j+1);return window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]);const v=Math.max(s,a()),y=ry(f,s,v),x=R.useRef(y);x.current=y,R.useEffect(()=>{f>v&&(p(v),sy(t,v))},[f,v,t]);const N=R.useCallback(k=>{if(k.pointerType!=="touch"&&k.button!==0)return;k.preventDefault();const j=k.currentTarget,L=k.clientX,P=x.current,O=Math.max(s,a());let T=P,B=0,U=!1;const ce=document.body;ce.classList.add("pane-dragging");const re=C=>{var J;if(!U){if(U=!0,B&&window.cancelAnimationFrame(B),typeof C=="number"){const Y=l?C-L:L-C;T=ry(P+Y,s,O)}p(T),sy(t,T),ce.classList.remove("pane-dragging"),window.removeEventListener("pointermove",Z),window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve),window.removeEventListener("blur",pe),j.removeEventListener("lostpointercapture",Q);try{(J=j.hasPointerCapture)!=null&&J.call(j,k.pointerId)&&j.releasePointerCapture(k.pointerId)}catch{}}},Z=C=>{if(U)return;if(C.buttons===0){re(C.clientX);return}const J=l?C.clientX-L:L-C.clientX;T=ry(P+J,s,O),!B&&(B=window.requestAnimationFrame(()=>{B=0,p(T)}))},ve=C=>re(C.clientX),pe=()=>re(),Q=()=>re();try{j.setPointerCapture(k.pointerId)}catch{}j.addEventListener("lostpointercapture",Q),window.addEventListener("pointermove",Z),window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),window.addEventListener("blur",pe)},[s,a,l,t]),_=h.jsxDEV("div",{className:"pane-handle",role:"separator","aria-orientation":"vertical","aria-label":c,title:`${c} — drag to resize, double-click to reset`,onPointerDown:N,onDoubleClick:()=>{p(r),sy(t,r)},children:h.jsxDEV("span",{className:"pane-handle-line"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/paneWidth.tsx",lineNumber:177,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/paneWidth.tsx",lineNumber:165,columnNumber:5},this);return{width:y,handle:_}}const wU=300;function xU(e){return e==null?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} kB`:`${(e/1048576).toFixed(1)} MB`}function SU({v:e,onClose:t,onPickWorkspace:r,focus:s,panelWidth:a,panelHandle:l}){Au(typeof window<"u"&&window.matchMedia("(max-width: 720px)").matches,t);const[c,f]=R.useState("files"),p=e.info.workspace||e.info.cwd,[m,v]=R.useState(p),y=NN({storage:"agentus.explorer-width",fallback:300,min:220,max:()=>Math.max(220,Math.min(460,a-wU)),rightEdge:!1,label:"resize the file tree"}),[x,N]=R.useState(null),[_,k]=R.useState(""),[j,L]=R.useState(null),[P,O]=R.useState(!1);R.useEffect(()=>{v(p),L(null)},[p,e.info.id]),R.useEffect(()=>{if(!s)return;f("files"),L(s);const re=s.path.replace(/\/[^/]*$/,"")||"/";v(re)},[s]);const T=R.useCallback(async re=>{O(!0),k("");try{const Z=await Qe.listEntries(re);N(Z)}catch(Z){k(String((Z==null?void 0:Z.message)??Z))}finally{O(!1)}},[]);R.useEffect(()=>{T(m)},[m,T]);const B=re=>{if(re.kind==="dir"){v(re.path),L(null);return}L({path:re.path})},ce=R.useMemo(()=>{if(!x)return[];const re=x.path.startsWith("/")?"/":"\\";if(!(x.root&&(x.path===x.root||x.path.startsWith(`${x.root}${re}`)))||!x.root)return[{label:x.path===x.home?"~":x.path,path:x.path}];const ve=x.path.slice(x.root.length).split(re).filter(Boolean),pe=[{label:p.split(re).filter(Boolean).pop()??p,path:x.root}];let Q=x.root;for(const C of ve)Q=`${Q}${re}${C}`,pe.push({label:C,path:Q});return pe},[x,p]).map(re=>re.label).join(" / ");return h.jsxDEV("aside",{className:"tool-panel","aria-label":"workspace panel",style:{"--panel-w":`${a}px`},children:[l,h.jsxDEV("div",{className:"tool-tabs",children:[h.jsxDEV("button",{className:`tool-tab ${c==="files"?"active":""}`,onClick:()=>f("files"),children:[h.jsxDEV(Ql,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:171,columnNumber:11},this)," files"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:167,columnNumber:9},this),h.jsxDEV("button",{className:`tool-tab ${c==="terminal"?"active":""}`,onClick:()=>f("terminal"),children:[h.jsxDEV(pF,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:177,columnNumber:11},this)," terminal"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:173,columnNumber:9},this),h.jsxDEV("span",{className:"head-spacer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:179,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:`workspace: ${p}
|
|
272
|
+
click to point this session at another directory`,"aria-label":"change workspace",onClick:r,children:h.jsxDEV(NF,{size:15},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:186,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:180,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:"close panel","aria-label":"close panel",onClick:t,children:h.jsxDEV(va,{size:15},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:189,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:188,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:166,columnNumber:7},this),c==="files"?h.jsxDEV("div",{className:`panel-split ${j?"has-preview":""}`,children:[j?h.jsxDEV("div",{className:"preview-col",children:h.jsxDEV(bU,{path:j.path,line:j.line,onClose:()=>L(null)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:203,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:202,columnNumber:13},this):null,h.jsxDEV("div",{className:"explorer-col",style:{"--explorer-w":`${y.width}px`},children:[j?y.handle:null,h.jsxDEV("div",{className:"ws-root",title:p,children:[h.jsxDEV(Zl,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:209,columnNumber:15},this),h.jsxDEV("span",{className:"ws-root-name",children:ce||p},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:210,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:208,columnNumber:13},this),h.jsxDEV("div",{className:"file-bar",children:[h.jsxDEV("button",{className:"icon-btn",title:"parent directory","aria-label":"parent directory",disabled:!(x!=null&&x.parent),onClick:()=>(x==null?void 0:x.parent)&&v(x.parent),children:h.jsxDEV(PN,{size:15},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:220,columnNumber:17},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:213,columnNumber:15},this),h.jsxDEV("button",{className:"icon-btn",title:`home (${(x==null?void 0:x.home)??"~"})`,"aria-label":"home",onClick:()=>(x==null?void 0:x.home)&&v(x.home),children:h.jsxDEV(rR,{size:15},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:228,columnNumber:17},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:222,columnNumber:15},this),h.jsxDEV("span",{className:"file-bar-path",title:(x==null?void 0:x.path)??m,children:(x==null?void 0:x.path)??m},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:230,columnNumber:15},this),h.jsxDEV("button",{className:"icon-btn",title:"refresh","aria-label":"refresh",onClick:()=>void T(m),children:h.jsxDEV(Xd,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:232,columnNumber:17},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:231,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:212,columnNumber:13},this),_?h.jsxDEV("div",{className:"tool-error",children:_},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:235,columnNumber:22},this):null,P&&!x?h.jsxDEV("div",{className:"tool-note",children:"loading…"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:236,columnNumber:36},this):null,h.jsxDEV("div",{className:"file-list",children:[x==null?void 0:x.entries.map(re=>h.jsxDEV("button",{className:`file-row ${(j==null?void 0:j.path)===re.path?"sel":""}`,title:re.path,onClick:()=>B(re),children:[re.kind==="dir"?h.jsxDEV(Zl,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:245,columnNumber:39},this):h.jsxDEV(Ql,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:245,columnNumber:66},this),h.jsxDEV("span",{className:"file-name",children:re.name},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:246,columnNumber:19},this),re.kind==="file"?h.jsxDEV("span",{className:"file-size",children:xU(re.size)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:247,columnNumber:40},this):null,re.kind==="dir"?h.jsxDEV(os,{size:13,className:"file-enter"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:248,columnNumber:39},this):null]},re.path,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:239,columnNumber:17},this)),x&&!x.entries.length?h.jsxDEV("div",{className:"tool-note",children:"empty directory"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:251,columnNumber:53},this):null,x!=null&&x.truncated?h.jsxDEV("div",{className:"tool-note",children:["list capped at ",x.entries.length," entries"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:252,columnNumber:37},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:237,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:206,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:200,columnNumber:9},this):h.jsxDEV(kU,{v:e,root:p},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:257,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:160,columnNumber:5},this)}const kD={black:"#2e3436",red:"#cc0000",green:"#4e9a06",yellow:"#c4a000",blue:"#3465a4",magenta:"#75507b",cyan:"#06989a",white:"#d3d7cf",brightBlack:"#555753",brightRed:"#ef2929",brightGreen:"#8ae234",brightYellow:"#fce94f",brightBlue:"#729fcf",brightMagenta:"#ad7fa8",brightCyan:"#34e2e2",brightWhite:"#eeeeec"};function EU(e){const t=getComputedStyle(document.documentElement),r=(s,a)=>t.getPropertyValue(s).trim()||a;return e?{background:r("--bg-1","#0e1518"),foreground:r("--text","#e3ecf3"),cursor:r("--accent","#4aacdf"),selectionBackground:"rgba(74,172,223,0.30)",...kD}:{background:r("--bg-1","#ffffff"),foreground:r("--text","#1c2735"),cursor:r("--accent","#2679a5"),selectionBackground:"rgba(38,121,165,0.25)",...kD}}function kU({v:e,root:t}){const[r,s]=R.useState("connecting"),[a,l]=R.useState(""),[c,f]=R.useState(0),[p,m]=R.useState(null),v=R.useRef(null),y=R.useRef(null),x=R.useRef(null),N=R.useRef(()=>{});R.useEffect(()=>{const k=v.current;if(!k)return;let j=!1;s("connecting"),l(""),m(null);const L=document.documentElement.getAttribute("data-theme")!=="light",P=new dU({theme:EU(L),fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',fontSize:12.5,lineHeight:1.25,cursorBlink:!0,scrollback:5e3,allowProposedApi:!0}),O=new mU;P.loadAddon(O),P.open(k),y.current=P;try{O.fit()}catch{}const T=P.cols||80,B=P.rows||24,ce=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws/term?sessionId=${encodeURIComponent(e.info.id)}&cols=${T}&rows=${B}`;let re;try{re=new WebSocket(ce)}catch(Y){s("error"),l(String((Y==null?void 0:Y.message)??Y));return}x.current=re;const Z=()=>x.current===re;re.onopen=()=>{Z()&&(s("ready"),l(""))},re.onmessage=Y=>{if(!Z())return;let z;try{z=JSON.parse(String(Y.data))}catch{return}if(z.t==="term-data"&&typeof z.data=="string"){P.write(z.data);return}if(z.t==="term-ready"){s("ready"),l(""),typeof z.tty=="boolean"&&m(z.tty);return}if(z.t==="term-exit"){s("closed");return}z.t==="term-error"&&(s("error"),l(z.error??"terminal error"))},re.onclose=()=>{j||!Z()||s(Y=>Y==="error"?Y:"closed")},re.onerror=()=>{Z()&&l(Y=>Y||"terminal socket failed")};const ve=Y=>{re.readyState===WebSocket.OPEN&&re.send(JSON.stringify({t:"term-input",data:Y}))};N.current=ve;const pe=P.onData(ve),Q=()=>{try{O.fit()}catch{return}k.dataset.termCols=String(P.cols),k.dataset.termRows=String(P.rows),re.readyState===WebSocket.OPEN&&re.send(JSON.stringify({t:"term-resize",cols:P.cols,rows:P.rows}))},C=new ResizeObserver(()=>Q());C.observe(k);const J=()=>Q();return window.addEventListener("resize",J),P.focus(),()=>{j=!0,C.disconnect(),window.removeEventListener("resize",J),pe.dispose();try{re.send(JSON.stringify({t:"term-close"}))}catch{}re.close(),x.current=null,P.dispose(),y.current=null}},[e.info.id,t,c]);const _=r==="ready"?p===!1?"shell (no tty)":"shell":r==="connecting"?"starting…":r;return h.jsxDEV("div",{className:"tool-body term-body",children:[h.jsxDEV("div",{className:"term-bar",children:[h.jsxDEV("span",{className:`term-dot ${r}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:435,columnNumber:9},this),h.jsxDEV("span",{className:"term-status",title:p===!1?"this shell runs on pipes, not a tty: no prompt, no colours, no full-screen apps":void 0,children:[_,r==="ready"?h.jsxDEV("span",{className:"term-cwd",title:t,children:[" ",t.split("/").filter(Boolean).pop()]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:438,columnNumber:33},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:436,columnNumber:9},this),h.jsxDEV("span",{className:"head-spacer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:440,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:"send Ctrl-C","aria-label":"send interrupt",onClick:()=>N.current(""),children:h.jsxDEV(va,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:447,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:441,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:"new shell","aria-label":"new shell",onClick:()=>f(k=>k+1),children:h.jsxDEV(Xd,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:455,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:449,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:434,columnNumber:7},this),a?h.jsxDEV("div",{className:"tool-error",children:a},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:458,columnNumber:16},this):null,h.jsxDEV("div",{className:"term-host",ref:v,"data-term-host":"1",onClick:()=>{var k;return(k=y.current)==null?void 0:k.focus()}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:459,columnNumber:7},this),p===!1?h.jsxDEV("div",{className:"term-note",children:"no tty on this machine (python3 missing) — pipe shell: no prompt, no colours, no full-screen apps"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:461,columnNumber:9},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/ToolPanel.tsx",lineNumber:433,columnNumber:5},this)}const Um=5;function CU(e,t={}){const r=Math.min(100,Math.max(1,Math.floor(t.limit??Um))),s=[...e];if(t.searching||t.expanded||s.length<=r)return{shown:s,hidden:0};const a=s.slice(0,r);if(t.isActive){const l=s.findIndex(c=>t.isActive(c));l>=r&&(a[a.length-1]=s[l])}return{shown:a,hidden:s.length-a.length}}function DU(){const e=R.useSyncExternalStore(Qe.subscribe,Qe.getSnapshot),[t,r]=R.useState(!1),[s,a]=R.useState(!1),[l,c]=R.useState({}),[f,p]=R.useState(""),[m,v]=R.useState(!1),y=NN({storage:"agentus.rail-width",fallback:268,min:200,max:()=>Math.min(460,window.innerWidth-ED-200),rightEdge:!0,label:"resize the session rail"}),x=NN({storage:"agentus.panel-width",fallback:760,min:380,max:()=>Math.max(380,window.innerWidth-y.width-ED),label:"resize the workspace panel"});if(R.useEffect(()=>{Qe.checkAuth()},[]),R.useEffect(()=>{r(!1)},[e.activeId]),R.useEffect(()=>{e.blocked&&r(!1)},[e.blocked]),Au(t,()=>r(!1)),R.useEffect(()=>{e.auth==="in"&&(HF(),Y7(),C7())},[e.auth]),e.auth!=="in")return h.jsxDEV(TU,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:90,columnNumber:34},this);const N=e.activeId?Qe.byId.get(e.activeId):void 0,_=(N==null?void 0:N.perms[0])??null;return h.jsxDEV("div",{className:"app",children:[t&&h.jsxDEV("div",{className:"scrim",onClick:()=>r(!1)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:98,columnNumber:18},this),h.jsxDEV(BU,{open:t,onNew:()=>a({}),onNewIn:k=>a({cwd:k}),onSettings:()=>{v(!0),r(!1)},settingsOpen:m,railWidth:y.width,railHandle:y.handle},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:99,columnNumber:7},this),h.jsxDEV(PU,{onMenu:()=>r(!0),settingsOpen:m,onCloseSettings:()=>v(!1),onPermClick:()=>{_&&p(_.requestId)},panelWidth:x.width,panelHandle:x.handle},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:108,columnNumber:7},this),s&&h.jsxDEV(gH,{cwd:s.cwd,onClose:()=>a(!1)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:116,columnNumber:17},this),e.blocked&&h.jsxDEV(AU,{slot:e.blocked},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:119,columnNumber:24},this),_&&N&&(f===_.requestId||!l[_.requestId])?h.jsxDEV(iH,{req:_,sessionTitle:N.info.title,onSkip:()=>{c(k=>({...k,[_.requestId]:!0})),p("")}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:123,columnNumber:9},this):null,h.jsxDEV(RU,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:132,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:97,columnNumber:5},this)}function RU(){const[e,t]=R.useState(!1);return R.useEffect(()=>{var f,p;const r=((p=(f=document.querySelector('script[src*="/assets/index-"]'))==null?void 0:f.src.match(/index-([A-Za-z0-9_-]+)\.js/))==null?void 0:p[1])??null;if(!r)return;let s=!0;const a=async()=>{try{const v=await(await fetch("/api/version",{cache:"no-store"})).json();s&&v.asset&&v.asset!==r&&t(!0)}catch{}};a();const l=window.setInterval(()=>void a(),6e4),c=()=>{document.visibilityState==="visible"&&a()};return document.addEventListener("visibilitychange",c),()=>{s=!1,window.clearInterval(l),document.removeEventListener("visibilitychange",c)}},[]),e?h.jsxDEV("button",{type:"button",className:"stale-banner",title:"服务端已经换成新的一组前端资源,这个页面还跑着旧的",onClick:()=>window.location.reload(),children:"已有新版本 · 点这里刷新(这个页面跑的还是旧代码)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:165,columnNumber:5},this):null}function AU({slot:e}){Au(!0,()=>Qe.dismissBlocked());const t=e.code==="home_mismatch";return h.jsxDEV("div",{className:"modal-bg",onClick:()=>Qe.dismissBlocked(),children:h.jsxDEV("div",{className:"modal narrow",onClick:r=>r.stopPropagation(),children:[h.jsxDEV("h3",{children:"这个会话不能继续使用"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:190,columnNumber:9},this),h.jsxDEV("div",{className:"hint",children:t?"它是在另一个 agent home 里创建的,而这行后端现在指向另一个 home —— agent 那边没有这份会话,发消息不会有任何回复。":"agent 那边已经找不到这份会话了(它所在的 home 里没有这个会话),发消息不会有任何回复。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:191,columnNumber:9},this),h.jsxDEV("div",{className:"blocked-homes",children:[h.jsxDEV("div",{children:[h.jsxDEV("span",{children:"会话所属 home"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:197,columnNumber:16},this),h.jsxDEV("code",{children:e.sessionHome??"(早期会话,未记录)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:197,columnNumber:38},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:197,columnNumber:11},this),h.jsxDEV("div",{children:[h.jsxDEV("span",{children:"后端当前 home"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:198,columnNumber:16},this),h.jsxDEV("code",{children:e.rowHome??"(该后端没有 home)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:198,columnNumber:38},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:198,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:196,columnNumber:9},this),h.jsxDEV("div",{className:"hint",children:["「",e.title,"」的历史消息在本地库里,删除会连同记录一起清掉且无法撤销;想留着就先取消,再从会话菜单里导出。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:200,columnNumber:9},this),h.jsxDEV("div",{className:"row",children:[h.jsxDEV("button",{className:"cancel",onClick:()=>Qe.dismissBlocked(),children:"取消"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:204,columnNumber:11},this),h.jsxDEV("button",{className:"go danger",onClick:()=>Qe.deleteBlocked(),children:"删除会话"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:205,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:203,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:189,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:188,columnNumber:5},this)}function TU(){const{auth:e,authError:t,authBusy:r,authInfo:s}=R.useSyncExternalStore(Qe.subscribe,Qe.getSnapshot),[a,l]=R.useState("admin"),[c,f]=R.useState(""),p=e==="unknown",m=v=>{v.preventDefault(),Qe.login(a.trim(),c).then(y=>{y&&f("")})};return h.jsxDEV("div",{className:"auth-wrap",children:h.jsxDEV("form",{className:"auth-card",onSubmit:m,children:[h.jsxDEV("div",{className:"auth-logo",children:[h.jsxDEV(HN,{size:30},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:225,columnNumber:36},this)," Agentus"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:225,columnNumber:9},this),h.jsxDEV("div",{className:"auth-sub",children:"keep your agents on the track"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:226,columnNumber:9},this),p?h.jsxDEV("div",{className:"auth-note",children:"正在检查登录状态…"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:228,columnNumber:11},this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV("label",{className:"auth-field",children:[h.jsxDEV("span",{children:"用户名"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:232,columnNumber:15},this),h.jsxDEV("input",{value:a,onChange:v=>l(v.target.value),autoComplete:"username",autoCapitalize:"none",spellCheck:!1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:233,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:231,columnNumber:13},this),h.jsxDEV("label",{className:"auth-field",children:[h.jsxDEV("span",{children:"密码"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:242,columnNumber:15},this),h.jsxDEV("input",{type:"password",value:c,onChange:v=>f(v.target.value),autoComplete:"current-password",autoFocus:!0},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:243,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:241,columnNumber:13},this),t?h.jsxDEV("div",{className:"auth-err",role:"alert",children:t},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:251,columnNumber:26},this):null,h.jsxDEV("button",{className:"auth-btn",type:"submit",disabled:r,children:r?"登录中…":"登录"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:252,columnNumber:13},this),s!=null&&s.usingDefaultPassword?h.jsxDEV("div",{className:"auth-warn",children:["⚠ 当前是默认口令 ",h.jsxDEV("code",{children:"admin / 123456"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:257,columnNumber:27},this),"。够挡住误闯,挡不住同网段的人 — 设置 ",h.jsxDEV("code",{children:"AGENTUS_PASSWORD"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:258,columnNumber:20},this)," 后重启即可更换。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:256,columnNumber:15},this):null,h.jsxDEV("div",{className:"auth-foot",children:["会话保存在 HttpOnly Cookie 中(7 天)。脚本可用 ",h.jsxDEV("code",{children:"Authorization: Bearer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:262,columnNumber:49},this)," + 数据目录里的 ",h.jsxDEV("code",{children:"auth.token"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:263,columnNumber:22},this),"。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:261,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:230,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:224,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:223,columnNumber:5},this)}function wN({text:e,what:t="消息"}){const[r,s]=R.useState(""),a=R.useRef(null);R.useEffect(()=>()=>{a.current&&window.clearTimeout(a.current)},[]);const l=r==="ok"?"已复制":r==="no"?"复制失败(浏览器拒绝)":`复制${t}`;return h.jsxDEV("button",{type:"button",className:`bubble-btn copy ${r}`,title:l,"aria-label":l,"data-copy-state":r,onClick:async c=>{c.stopPropagation();const f=await cg(e);s(f?"ok":"no"),a.current&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>s(""),1500)},children:r==="ok"?h.jsxDEV(oF,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:298,columnNumber:25},this):h.jsxDEV(nR,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:298,columnNumber:51},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:284,columnNumber:5},this)}function MU({sid:e,busy:t}){const[r,s]=R.useState("idle"),[a,l]=R.useState("");return h.jsxDEV("button",{type:"button",className:`bubble-btn fork ${r}`,disabled:t||r==="working",title:a||(r==="failed"?"fork 失败":"从这里 fork —— agent 把这段上下文复制到一个新会话"),"aria-label":r==="failed"?"fork 失败":"从这里 fork",onClick:async c=>{c.stopPropagation(),s("working"),l("");try{await Qe.fork(e),s("idle")}catch(f){l(String((f==null?void 0:f.message)??f)),s("failed")}},children:h.jsxDEV(dR,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:329,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:310,columnNumber:5},this)}function Vd(e){return e.lastAt??e.createdAt}function CD(e,t){const r=new Map;for(const a of e){const l=a.s.workspace||a.s.cwd,c=l.split("/").filter(Boolean).pop()??l,f=r.get(l)??{path:l,label:c,items:[]};f.items.push(a),r.set(l,f)}const s=a=>a.items.reduce((l,c)=>Math.max(l,Vd(c.s)),0);return[...r.values()].map(a=>({...a,items:[...a.items].sort((l,c)=>(l.cold===c.cold?0:l.cold?1:-1)||Vd(c.s)-Vd(l.s)||c.s.createdAt-l.s.createdAt)})).sort((a,l)=>a.path===t?-1:l.path===t?1:s(l)-s(a)||a.label.localeCompare(l.label))}const OU={starting:"启动中",ready:"待命",running:"运行中",error:"出错",closed:"已关闭",reaped:"已回收(空闲)"};function LA({backend:e,cold:t,status:r}){const s=$N(e),[a,l]=R.useState(!1),c=s.icon&&!a,f=!t&&r==="running";return h.jsxDEV("span",{className:`be-avatar be-${e} ${t?"cold":""} ${f?"live":""}`,"data-backend":e,"data-letter":s.letter,title:`${s.label} · ${t?"无进程":OU[r]??r}`,"aria-hidden":"true",children:[c?h.jsxDEV("img",{src:s.icon,alt:"",draggable:!1,onError:()=>l(!0)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:407,columnNumber:11},this):s.letter,t?null:h.jsxDEV("span",{className:`be-dot ${r}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:409,columnNumber:16},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:397,columnNumber:5},this)}function jU({backend:e}){const t=$N(e),[r,s]=R.useState(!1);return!t.icon||r?null:h.jsxDEV("span",{className:"agent-mark","data-backend":e,"aria-hidden":"true",children:h.jsxDEV("img",{src:t.icon,alt:"",draggable:!1,onError:()=>s(!0)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:429,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:428,columnNumber:5},this)}function LU({x:e,y:t,trigger:r,info:s,cold:a,archived:l,canFork:c,onDismiss:f,onRename:p,onRetitle:m,retitling:v,onFork:y,onWorkspace:x,onExport:N,onRestart:_,onResume:k,onArchive:j,onUnarchive:L,onUnarchiveResume:P,onDelete:O}){const T=R.useRef(null),B=R.useRef(r);B.current=r,Fd(!0,[T,B],f);const[U,ce]=R.useState(null);R.useEffect(()=>{const Z=T.current;if(!Z)return;const ve=Z.getBoundingClientRect();ce({left:Math.max(6,Math.min(e,window.innerWidth-ve.width-6)),top:Math.max(6,Math.min(t,window.innerHeight-ve.height-6))})},[e,t]);const re=(Z,ve,pe,Q=!1)=>h.jsxDEV("button",{type:"button",role:"menuitem",className:`sess-menu-item ${Q?"danger":""}`,onClick:C=>{C.stopPropagation(),pe()},children:[ve,h.jsxDEV("span",{children:Z},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:480,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:473,columnNumber:5},this);return h.jsxDEV("div",{ref:T,className:"sess-menu",role:"menu","aria-label":`会话设置:${s.title}`,style:U?{left:U.left,top:U.top}:{left:e,top:t,visibility:"hidden"},onClick:Z=>Z.stopPropagation(),children:[h.jsxDEV("div",{className:"sess-menu-head",children:[h.jsxDEV(LA,{backend:s.backend,cold:a,status:s.status},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:494,columnNumber:9},this),h.jsxDEV("span",{className:"sess-menu-title",title:s.workspace||s.cwd,children:s.title},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:495,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:493,columnNumber:7},this),re("重命名",h.jsxDEV(tR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:497,columnNumber:20},this),p),re(v?"正在重新生成…":"重新生成会话名",v?h.jsxDEV(Xd,{size:14,className:"spin"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:500,columnNumber:21},this):h.jsxDEV(Xd,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:500,columnNumber:66},this),m),c?re(a?"fork 会话(先恢复)":"fork 会话",h.jsxDEV(dR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:503,columnNumber:58},this),y):null,re("工作目录…",h.jsxDEV(Zl,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:504,columnNumber:22},this),x),re("导出会话(Markdown)",h.jsxDEV(iR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:505,columnNumber:31},this),N),re("复制会话 ID",h.jsxDEV(nR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:506,columnNumber:24},this),()=>{cg(s.id)}),l&&a?re("取消归档并恢复",h.jsxDEV(Om,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:511,columnNumber:27},this),P):a?re("恢复会话",h.jsxDEV(Om,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:513,columnNumber:26},this),k):re("重启 agent 进程",h.jsxDEV(lR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:514,columnNumber:33},this),_),l?a?null:re("取消归档",h.jsxDEV(Om,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:516,columnNumber:39},this),L):re("归档会话",h.jsxDEV(aF,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:517,columnNumber:24},this),j),a?re("删除会话(连记录)",h.jsxDEV(va,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:518,columnNumber:33},this),O,!0):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:485,columnNumber:5},this)}function BU({open:e,onNew:t,onNewIn:r,onSettings:s,settingsOpen:a,railWidth:l,railHandle:c}){const{sessions:f,cold:p,archived:m,activeId:v,conn:y,net:x,netError:N,authInfo:_}=R.useSyncExternalStore(Qe.subscribe,Qe.getSnapshot),k=R.useRef(Date.now()),[,j]=R.useState(0);R.useEffect(()=>{const le=window.setInterval(()=>j(G=>G+1),6e4);return()=>window.clearInterval(le)},[]),R.useEffect(()=>{const le=()=>{k.current=Date.now()},G=["pointerdown","keydown","mousemove","wheel","touchstart"];for(const Ee of G)window.addEventListener(Ee,le,{passive:!0});return()=>{for(const Ee of G)window.removeEventListener(Ee,le)}},[]);const L=()=>iz({visible:document.visibilityState==="visible",lastInputAt:k.current,now:Date.now()}),P=()=>y7()&&document.visibilityState==="visible",O=(le,G,Ee=!1,me=!1)=>{fetch("/api/notify/presence",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},keepalive:Ee,body:JSON.stringify({sessionId:le,visible:G,call:me})}).catch(()=>{})};R.useEffect(()=>{P()?O(v??null,!0,!1,!0):L()?O(v??null,!0):O(null,!1)},[v]);const T=R.useRef(v??null);T.current=v??null,R.useEffect(()=>{const le=()=>{P()?O(T.current,!0,!1,!0):L()?O(T.current,!0):O(null,!1)},G=window.setInterval(le,3e4);return document.addEventListener("visibilitychange",le),()=>{window.clearInterval(G),document.removeEventListener("visibilitychange",le),O(null,!1,!0)}},[]);const[B,U]=R.useState(""),ce="agentus.railClosed",re="agentus.railMore",Z=le=>{try{const G=JSON.parse(localStorage.getItem(le)??"{}");return G&&typeof G=="object"?G:{}}catch{return{}}},[ve,pe]=R.useState(()=>Z(ce)),[Q,C]=R.useState(()=>Z(re));R.useEffect(()=>{try{localStorage.setItem(ce,JSON.stringify(ve))}catch{}},[ve]),R.useEffect(()=>{try{localStorage.setItem(re,JSON.stringify(Q))}catch{}},[Q]);const J="agentus.railSections",[Y,z]=R.useState(()=>{try{return JSON.parse(localStorage.getItem(J)??"{}")}catch{return{}}});R.useEffect(()=>{try{localStorage.setItem(J,JSON.stringify(Y))}catch{}},[Y]);const[X,$]=R.useState(""),[xe,Me]=R.useState(""),Pe=R.useRef(new Map),[ze,ge]=R.useState(null),[ye,mt]=R.useState(""),[pt,Ut]=R.useState(""),[Ht,Tt]=R.useState(""),[Xt,Et]=R.useState(""),kt=R.useRef(null),$e=R.useRef(!1),nt=()=>{kt.current&&(window.clearTimeout(kt.current),kt.current=null)};R.useEffect(()=>nt,[]);const yt=(le,G,Ee)=>{$e.current=!1,nt(),kt.current=window.setTimeout(()=>{$e.current=!0,vt(le,G,Ee,Pe.current.get(le)??null)},500)},vt=(le,G,Ee,me)=>{ge({id:le,x:G,y:Ee,trigger:me})},un=(le,G,Ee)=>{const me=Pe.current.get(le),Fe=Ee??me??null,ot=Fe==null?void 0:Fe.getBoundingClientRect(),Kt=Number.isFinite(G.clientX)&&Number.isFinite(G.clientY)&&(G.clientX!==0||G.clientY!==0),Cn=Kt?Number(G.clientX):ot?ot.right-6:12,rt=Kt?Number(G.clientY):ot?ot.bottom+4:12;vt(le,Cn,rt,Fe)},Ye=le=>{ge(null),Ut(le.title),mt(le.id)},ee=async le=>{const G=pt.trim();mt("");const Ee=f.find(me=>me.id===le)??m.find(me=>me.id===le);if(!(!Ee||G===Ee.title)){Me("");try{await Qe.rename(le,G.length?G:null)}catch(me){Me(`改名失败:${String((me==null?void 0:me.message)??me)}`)}}},je=async le=>{Me(""),Et(le.id);try{const{via:G}=await Qe.regenerateTitle(le.id);ge(null),G==="derived"&&Me("已按最新一条消息生成会话名(该后端不支持摘要式重新生成)")}catch(G){Me(`生成会话名失败:${String((G==null?void 0:G.message)??G)}`)}finally{Et("")}},ke=ze?f.find(le=>le.id===ze.id)??p.find(le=>le.id===ze.id)??m.find(le=>le.id===ze.id)??null:null,dt=!!(ke!=null&&ke.cold),bt=!!(ke!=null&&ke.archivedAt),sn=Ht?f.find(le=>le.id===Ht)??p.find(le=>le.id===Ht)??m.find(le=>le.id===Ht)??null:null,ft=B.trim().toLowerCase(),Se=le=>!ft||`${le.title} ${le.backend} ${le.workspace||le.cwd}`.toLowerCase().includes(ft),Le=R.useMemo(()=>{const le=[...f.map(Ee=>({s:Ee,cold:!!Ee.cold})),...p.map(Ee=>({s:Ee,cold:!0}))].filter(({s:Ee})=>Se(Ee)),G=[...f,...p].find(Ee=>Ee.id===v);return CD(le,(G==null?void 0:G.workspace)??(G==null?void 0:G.cwd)??"")},[f,p,v,ft]),it=R.useMemo(()=>CD(m.map(le=>({s:le,cold:!!le.cold})).filter(({s:le})=>Se(le)),""),[m,ft]),Nt=!!ft||!Y.team,V=!!ft||!Y.workspaces,be=!!(ft&&it.length||!Y.archived),De=R.useMemo(()=>new Set([...Le,...it].map(le=>le.path)),[Le,it]);R.useEffect(()=>{if(!De.size)return;const le=G=>{const Ee=Object.entries(G).filter(([me])=>De.has(me.replace(/^(ws|arch):/,"")));return Ee.length===Object.keys(G).length?G:Object.fromEntries(Ee)};pe(le),C(le)},[De]);const gt=(le,G)=>le.map(Ee=>{const me=G+Ee.path,Fe=!!ft||!ve[me],ot=Ee.items.filter(rt=>!rt.cold).length,{shown:Kt,hidden:Cn}=CU(Ee.items,{searching:!!ft,isActive:rt=>rt.s.id===v,expanded:!!Q[me]});return h.jsxDEV("div",{className:"rail-group",children:[h.jsxDEV("div",{className:"rail-group-row",children:[h.jsxDEV("button",{type:"button",className:`rail-group-head ${Fe?"open":""}`,title:Ee.path,"aria-expanded":Fe,"data-workspace":Ee.path,onClick:()=>pe(rt=>({...rt,[me]:!rt[me]})),children:[Fe?h.jsxDEV(lF,{size:13,className:"rail-group-folder"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:802,columnNumber:17},this):h.jsxDEV(Zl,{size:13,className:"rail-group-folder"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:804,columnNumber:17},this),h.jsxDEV("span",{className:"rail-group-name",children:Ee.label},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:806,columnNumber:15},this),h.jsxDEV("span",{className:"rail-group-count",children:Ee.label&&ot?`${ot}/${Ee.items.length}`:Ee.items.length},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:807,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:793,columnNumber:13},this),h.jsxDEV("button",{type:"button",className:"item-btn group-add",title:`在 ${Ee.path} 新建会话`,"aria-label":`在 ${Ee.path} 新建会话`,onClick:rt=>{rt.stopPropagation(),rt.preventDefault(),pe(jn=>({...jn,[me]:!1})),r(Ee.path)},children:h.jsxDEV(Ny,{size:12},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:827,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:815,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:792,columnNumber:13},this),Fe?h.jsxDEV("div",{className:"rail-group-body",children:Kt.map(({s:rt,cold:jn})=>{var Rr;return h.jsxDEV("div",{ref:Dt=>{Dt?Pe.current.set(rt.id,Dt):Pe.current.delete(rt.id)},className:`session-item ${jn?"cold":""} ${rt.id===v?"active":""} ${ye===rt.id?"editing":""}`,"data-session":rt.id,title:rt.archivedAt?`${rt.title} — 已归档${jn?"(进程已停)":""},点一下打开;菜单里可取消归档并恢复`:`${rt.title}${jn?" — 进程已停,点一下恢复":""}`,onContextMenu:Dt=>{Dt.preventDefault(),un(rt.id,Dt)},onTouchStart:Dt=>{const Ln=Dt.touches[0];yt(rt.id,(Ln==null?void 0:Ln.clientX)??0,(Ln==null?void 0:Ln.clientY)??0)},onTouchEnd:nt,onTouchMove:nt,onTouchCancel:nt,onClick:Dt=>{if($e.current){$e.current=!1,Dt.preventDefault();return}ye!==rt.id&&(jn&&!rt.archivedAt?Qe.resume(rt.id):Qe.setActive(rt.id))},children:[h.jsxDEV(LA,{backend:rt.backend,cold:jn,status:rt.status},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:856,columnNumber:21},this),ye===rt.id?h.jsxDEV("input",{className:"title-input",value:pt,autoFocus:!0,"aria-label":`重命名 ${rt.title}`,onChange:Dt=>Ut(Dt.target.value),onClick:Dt=>Dt.stopPropagation(),onPointerDown:Dt=>Dt.stopPropagation(),onBlur:()=>void ee(rt.id),onKeyDown:Dt=>{Dt.key==="Enter"?(Dt.preventDefault(),ee(rt.id)):Dt.key==="Escape"&&(Dt.preventDefault(),Dt.stopPropagation(),mt(""))}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:858,columnNumber:23},this):h.jsxDEV("span",{className:"title",onDoubleClick:Dt=>{Dt.stopPropagation(),Ye(rt)},children:rt.title},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:873,columnNumber:23},this),(Rr=Qe.byId.get(rt.id))!=null&&Rr.perms.length?h.jsxDEV("span",{className:"badge perm",title:"有审批在等你",children:["⚿ ",Qe.byId.get(rt.id).perms.length]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:876,columnNumber:23},this):null,h.jsxDEV("span",{className:"rail-at",title:`最后一次消息:${ec(Vd(rt))}`,children:L7(Vd(rt))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:881,columnNumber:21},this),h.jsxDEV("button",{type:"button",className:"item-btn row-menu",title:"会话设置:重命名 / fork / 工作目录 / 导出 / 归档","aria-label":`${rt.title} 的会话设置`,"aria-haspopup":"menu","aria-expanded":(ze==null?void 0:ze.id)===rt.id,onClick:Dt=>{Dt.stopPropagation(),Dt.preventDefault(),un(rt.id,Dt,Dt.currentTarget)},children:h.jsxDEV(sF,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:891,columnNumber:23},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:882,columnNumber:21},this)]},rt.id,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:833,columnNumber:19},this)})},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:831,columnNumber:15},this):null,Fe&&!ft&&Ee.items.length>Um&&h.jsxDEV("button",{type:"button",className:`rail-more ${Q[me]?"open":""}`,onClick:()=>C(rt=>({...rt,[me]:!rt[Ee.path]})),"aria-expanded":!!Q[me],title:Q[me]?"只显示最近几个":`展开这个工作空间里其余的 ${Ee.items.length-Um} 个会话`,children:[h.jsxDEV(os,{size:10,className:`rail-more-chev ${Q[me]?"open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:908,columnNumber:17},this),Q[me]?"收起":`展开其余 ${Ee.items.length-Um} 条`]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:901,columnNumber:15},this)]},Ee.path,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:791,columnNumber:11},this)}),Wt=async le=>{$(le),Me("");try{await Qe.fork(le)}catch(G){Me(String((G==null?void 0:G.message)??G))}finally{$("")}};return h.jsxDEV("aside",{className:`sidebar ${e?"open":""}`,style:{"--rail-w":`${l}px`},children:[c,h.jsxDEV("header",{children:[h.jsxDEV("span",{className:"logo",children:[h.jsxDEV(HN,{size:24},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:932,columnNumber:32},this)," Agentus"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:932,columnNumber:9},this),h.jsxDEV("span",{className:"tagline",children:"keep your agents on the track"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:933,columnNumber:9},this),h.jsxDEV("button",{className:`icon-btn rail-gear ${a?"on":""}`,title:"设置 — 后端、主题、语音识别、语音合成、热词","aria-label":"settings","aria-pressed":a,onClick:s,children:h.jsxDEV(rf,{size:15},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:941,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:934,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:931,columnNumber:7},this),x==="degraded"||y==="offline"?h.jsxDEV("div",{className:"net-banner",title:N,children:[h.jsxDEV("span",{children:y==="offline"?"⚠ 与服务的连接已断开 — 正在重连(指令会排队)":`⚠ 服务不可达 — ${N||"请求超时"}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:946,columnNumber:11},this),h.jsxDEV("button",{onClick:()=>location.reload(),children:"reload"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:951,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:945,columnNumber:9},this):null,h.jsxDEV("button",{className:"new-btn",onClick:t,title:"new session (pick a backend + working directory)",children:[h.jsxDEV(Ny,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:955,columnNumber:9},this)," new session"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:954,columnNumber:7},this),h.jsxDEV("div",{className:"rail-search-wrap",children:[h.jsxDEV(dF,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:958,columnNumber:9},this),h.jsxDEV("input",{className:"rail-search",value:B,onChange:le=>U(le.target.value),placeholder:"search sessions…","aria-label":"search sessions"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:959,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:957,columnNumber:7},this),xe?h.jsxDEV("div",{className:"rail-error",title:xe,children:[xe,h.jsxDEV("button",{className:"draft-x","aria-label":"dismiss",onClick:()=>Me(""),children:h.jsxDEV(va,{size:11},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:970,columnNumber:87},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:970,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:968,columnNumber:9},this):null,h.jsxDEV("div",{className:"session-list",children:[h.jsxDEV("button",{type:"button",className:`rail-section ${Nt?"open":""}`,"data-section":"team","aria-expanded":Nt,"aria-controls":"rail-team",title:Nt?"折叠团队":"展开团队",onClick:()=>z(le=>({...le,team:!le.team})),children:[h.jsxDEV(os,{size:11,className:`rail-section-chev ${Nt?"open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:986,columnNumber:11},this),h.jsxDEV("span",{children:"团队"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:987,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:982,columnNumber:9},this),Nt?h.jsxDEV("div",{className:"rail-placeholder","data-placeholder":"team",id:"rail-team","aria-disabled":"true",title:"团队 — 还没有实现,先占个位(现在的驾驶舱一条会话就是一个 agent,没有团队/成员的概念)",children:[h.jsxDEV(cF,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:992,columnNumber:13},this),h.jsxDEV("span",{className:"rail-placeholder-name",children:"还没做,先占个位"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:993,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:990,columnNumber:11},this):null,h.jsxDEV("button",{type:"button",className:`rail-section ${V?"open":""}`,"data-section":"workspaces","aria-expanded":V,"aria-controls":"rail-workspaces",title:V?"折叠工作空间":"展开工作空间",onClick:()=>z(le=>({...le,workspaces:!le.workspaces})),children:[h.jsxDEV(os,{size:11,className:`rail-section-chev ${V?"open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1003,columnNumber:11},this),h.jsxDEV("span",{children:"工作空间"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1004,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:999,columnNumber:9},this),h.jsxDEV("div",{id:"rail-workspaces",children:[V?gt(Le,"ws:"):null,V&&!Le.length&&h.jsxDEV("div",{className:"rail-empty",children:ft?"no session matches that search.":"No sessions yet — create one."},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1009,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1006,columnNumber:9},this),h.jsxDEV("button",{type:"button",className:`rail-section ${be?"open":""}`,"data-section":"archived","aria-expanded":be,"aria-controls":"rail-archived",title:be?"折叠已归档":"展开已归档",onClick:()=>z(le=>({...le,archived:!le.archived})),children:[h.jsxDEV(os,{size:11,className:`rail-section-chev ${be?"open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1022,columnNumber:11},this),h.jsxDEV("span",{children:"已归档"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1023,columnNumber:11},this),m.length?h.jsxDEV("span",{className:"rail-section-count",children:m.length},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1024,columnNumber:30},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1018,columnNumber:9},this),h.jsxDEV("div",{id:"rail-archived","data-archived":"1",children:[be?gt(it,"arch:"):null,be&&!it.length&&h.jsxDEV("div",{className:"rail-empty",children:ft?"no archived session matches that search.":"Nothing archived yet."},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1029,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1026,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:973,columnNumber:7},this),ze&&ke?Id.createPortal(h.jsxDEV(LU,{x:ze.x,y:ze.y,trigger:ze.trigger,info:ke,cold:dt,archived:bt,canFork:!!ke.acpSessionId||dt,onDismiss:()=>ge(null),onRename:()=>Ye(ke),retitling:Xt===ke.id,onRetitle:()=>{je(ke)},onFork:()=>{ge(null),Wt(ke.id)},onWorkspace:()=>{ge(null),Tt(ke.id)},onExport:()=>{ge(null);const le=document.createElement("a");le.href=`/api/sessions/${ke.id}/export?format=md`,le.download="",document.body.appendChild(le),le.click(),le.remove()},onResume:()=>{ge(null),Qe.resume(ke.id)},onArchive:()=>{ge(null),confirm(`归档“${ke.title}”?
|
|
273
|
+
|
|
274
|
+
收进「已归档」,随时可以取消归档并恢复。${dt?"":"运行中的 agent 进程会一起停掉(对话记录保留)。"}`)&&Qe.setArchived(ke.id,!0)},onUnarchive:()=>{ge(null),Qe.setArchived(ke.id,!1)},onUnarchiveResume:()=>{ge(null),Qe.unarchiveAndResume(ke.id)},onRestart:()=>{ge(null),confirm(`重启“${ke.title}”的 agent 进程?
|
|
275
|
+
|
|
276
|
+
旧进程退出、新进程接管同一个会话:对话记录、模型和思考深度都保留,只有进程换新(改完代码或改了后端配置后,用它让槽位吃到新东西)。正在跑的这一轮会被中断。`)&&Qe.restart(ke.id)},onDelete:()=>{ge(null),confirm(`删除“${ke.title}”?
|
|
277
|
+
|
|
278
|
+
记录会从磁盘上移除,无法撤销。`)&&Qe.purgeCold(ke.id)}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1035,columnNumber:40},this),document.body):null,Ht?Id.createPortal(h.jsxDEV("div",{className:"modal-bg",onClick:()=>Tt(""),children:h.jsxDEV("div",{className:"modal narrow",onClick:le=>le.stopPropagation(),children:[h.jsxDEV("h3",{children:"工作目录"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1075,columnNumber:13},this),h.jsxDEV("div",{className:"hint",children:"文件面板与终端以它为根。运行中的 agent 仍留在启动时的目录 —— 新目录对下一次恢复生效。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1076,columnNumber:13},this),h.jsxDEV(WN,{value:(sn==null?void 0:sn.workspace)??(sn==null?void 0:sn.cwd)??"",onChange:le=>{const G=Ht;Tt(""),Qe.setWorkspace(G,le)}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1079,columnNumber:13},this),h.jsxDEV("div",{className:"row",children:h.jsxDEV("button",{className:"cancel",onClick:()=>Tt(""),children:"取消"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1083,columnNumber:34},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1083,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1074,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1073,columnNumber:9},this),document.body):null,h.jsxDEV("footer",{children:[h.jsxDEV("span",{className:`conn ${y}`,children:y==="online"?"● online":y},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1087,columnNumber:9},this),_?h.jsxDEV("span",{className:"who",title:`signed in as ${_.username??"?"}`,children:_.username},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1088,columnNumber:21},this):null,h.jsxDEV("button",{className:"logout-btn",title:`signed in as ${(_==null?void 0:_.username)??"?"} — sign out`,"aria-label":"sign out",onClick:()=>void Qe.logout(),children:h.jsxDEV(lR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1095,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1089,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1086,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:929,columnNumber:5},this)}function PU({onMenu:e,settingsOpen:t,onCloseSettings:r,onPermClick:s,panelWidth:a,panelHandle:l}){const{active:c}=R.useSyncExternalStore(Qe.subscribe,Qe.getSnapshot),[f,p]=R.useState(!1),[m,v]=R.useState(null);R.useEffect(()=>pV(k=>{p(!0),v({...k})}),[]);const[y,x]=R.useState(!1),[N,_]=R.useState(!1);return R.useEffect(()=>{Qm()},[]),A7(VU(c),!!(c&&!c.busy&&c.loaded)),t?h.jsxDEV(O7,{onClose:r,sessionId:c==null?void 0:c.info.id},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1134,columnNumber:12},this):c?h.jsxDEV("div",{className:"main",children:[h.jsxDEV(FU,{v:c,onMenu:e,panelOpen:f,onTogglePanel:()=>p(k=>!k),onPickWorkspace:()=>x(!0),call:N,onCall:()=>{Dn.stop(),_(!0)},onPerm:s},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1152,columnNumber:7},this),h.jsxDEV("div",{className:"main-body",children:[h.jsxDEV("div",{className:"chat-col",children:[h.jsxDEV(UU,{v:c},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1164,columnNumber:11},this),h.jsxDEV(mH,{v:c,call:N,onCloseCall:()=>_(!1)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1165,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1163,columnNumber:9},this),f&&h.jsxDEV(SU,{v:c,onClose:()=>p(!1),onPickWorkspace:()=>x(!0),focus:m,panelWidth:a,panelHandle:l},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1168,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1162,columnNumber:7},this),y&&h.jsxDEV(IU,{v:c,onClose:()=>x(!1)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1179,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1151,columnNumber:5},this):h.jsxDEV("div",{className:"main",children:[h.jsxDEV("div",{className:"chat-head",children:[h.jsxDEV("button",{className:"icon-btn menu-btn",onClick:e,title:"sessions","aria-label":"sessions",children:h.jsxDEV(eR,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1140,columnNumber:105},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1140,columnNumber:11},this),h.jsxDEV("span",{className:"title",children:"Agentus"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1141,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1139,columnNumber:9},this),h.jsxDEV("div",{className:"empty",children:[h.jsxDEV("div",{className:"big",children:h.jsxDEV(HN,{size:72},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1144,columnNumber:32},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1144,columnNumber:11},this),h.jsxDEV("p",{children:["No session selected.",h.jsxDEV("br",{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1145,columnNumber:34},this),"Create one and point it at a real ",h.jsxDEV("code",{children:"hermes acp"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1145,columnNumber:74},this)," / ",h.jsxDEV("code",{children:"qodercli --acp"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1145,columnNumber:100},this),"."]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1145,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1143,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1138,columnNumber:7},this)}function VU(e){if(!e||e.busy||!e.loaded||Date.now()-e.lastAt>3e4)return null;for(let t=e.msgs.length-1;t>=0;t-=1){const r=e.msgs[t];if(r.kind==="agent"&&r.text.trim())return{key:r.key,text:r.text}}return null}function IU({v:e,onClose:t}){Au(!0,t);const r=e.info.workspace||e.info.cwd,[s,a]=R.useState(r),[l,c]=R.useState(!1),[f,p]=R.useState(""),m=async()=>{c(!0),p("");try{await Qe.setWorkspace(e.info.id,s.trim()),t()}catch(v){p(String((v==null?void 0:v.message)??v))}finally{c(!1)}};return h.jsxDEV("div",{className:"modal-bg",onClick:t,children:h.jsxDEV("div",{className:"modal narrow",onClick:v=>v.stopPropagation(),children:[h.jsxDEV("h3",{children:"workspace"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1223,columnNumber:9},this),h.jsxDEV("div",{className:"hint",children:"the file panel and terminal work here. A running agent keeps the directory it was started in — the new one applies to this session from the next resume."},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1224,columnNumber:9},this),h.jsxDEV(WN,{value:s,onChange:a},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1228,columnNumber:9},this),f&&h.jsxDEV("div",{className:"err",children:f},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1229,columnNumber:17},this),h.jsxDEV("div",{className:"row",children:[h.jsxDEV("button",{className:"cancel",onClick:t,children:"cancel"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1231,columnNumber:11},this),h.jsxDEV("button",{className:"go",disabled:l||!s.trim(),onClick:()=>void m(),children:l?"saving…":"use this folder"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1232,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1230,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1222,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1221,columnNumber:5},this)}function FU({v:e,onMenu:t,panelOpen:r,onTogglePanel:s,onPickWorkspace:a,call:l,onCall:c,onPerm:f}){const p=e.info;(p.workspace||p.cwd).split("/").filter(Boolean).pop()??p.cwd;const[m,v]=Tu(),x=R.useSyncExternalStore(a7,pa).tts.server||typeof window<"u"&&"speechSynthesis"in window,N=x?m.autoRead?"自动朗读:开 —— 每条回复结束后自动念出来(点一下关闭)":"自动朗读:关 —— 点一下开启,之后每条回复结束都会自动念出来":"自动朗读:这台设备没有可用语音(浏览器无 speechSynthesis,服务端也没配)";return h.jsxDEV("div",{className:"chat-head",children:[h.jsxDEV("button",{className:"icon-btn menu-btn",onClick:t,title:"sessions","aria-label":"sessions",children:h.jsxDEV(eR,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1274,columnNumber:101},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1274,columnNumber:7},this),h.jsxDEV("span",{className:"title",title:p.title,children:p.title},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1275,columnNumber:7},this),h.jsxDEV(zU,{busy:e.busy,lastAt:e.lastAt},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1276,columnNumber:7},this),e.perms.length>0?h.jsxDEV("button",{type:"button",className:"chip perm-chip",title:"这个会话有请求等你的答复 —— 点一下打开授权弹窗","aria-label":`有 ${e.perms.length} 个请求等你授权`,onClick:f,children:[h.jsxDEV("span",{className:"perm-pulse"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1285,columnNumber:11},this),"⚿ ",e.perms.length]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1278,columnNumber:9},this):null,h.jsxDEV("span",{className:"head-spacer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1288,columnNumber:7},this),h.jsxDEV("span",{className:"head-actions",children:[h.jsxDEV("button",{className:`icon-btn ${l?"on":""}`,title:"语音通话 —— 像打电话一样跟这个会话说话","aria-label":"开始语音通话",onClick:c,children:h.jsxDEV(mF,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1300,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1294,columnNumber:9},this),h.jsxDEV("button",{className:`icon-btn auto-read ${m.autoRead?"on":""}`,title:N,"aria-label":"自动朗读新回复","aria-pressed":m.autoRead,disabled:!x,onClick:()=>v({autoRead:!m.autoRead}),children:m.autoRead?h.jsxDEV(pg,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1310,columnNumber:29},this):h.jsxDEV(cR,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1310,columnNumber:46},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1302,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:`workspace: ${p.workspace||p.cwd}
|
|
279
|
+
click to point this session at another directory`,"aria-label":"workspace",onClick:a,children:h.jsxDEV(Zl,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1318,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1312,columnNumber:9},this),h.jsxDEV("button",{className:`icon-btn ${r?"on":""}`,title:"workspace panel — files and terminal","aria-label":"workspace panel","aria-expanded":r,onClick:s,children:h.jsxDEV(fF,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1327,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1320,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1293,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1273,columnNumber:5},this)}const xN={current:()=>{}},zU=R.memo(function({busy:t,lastAt:r}){const[,s]=R.useState(0);if(R.useEffect(()=>{if(!t)return;const c=window.setInterval(()=>s(f=>f+1),1e3);return()=>window.clearInterval(c)},[t]),!t)return null;const{quiet:a,said:l}=P7(r,Date.now());return h.jsxDEV("span",{className:`turn-pulse ${a?"quiet":""}`,role:"status","aria-label":l,title:l},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1398,columnNumber:10},this)}),$U=R.memo(function({busy:t,since:r}){const[s,a]=R.useState(null),[l,c]=R.useState(()=>Date.now());if(R.useEffect(()=>{if(!t){a(null);return}a(r??Date.now()),c(Date.now());const p=window.setInterval(()=>c(Date.now()),1e3);return()=>window.clearInterval(p)},[t,r]),!t)return null;const f=s??r;return h.jsxDEV("div",{className:"stream-hint",role:"status","data-anchor":f??void 0,children:[h.jsxDEV("span",{className:"stream-spin","aria-hidden":"true"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1427,columnNumber:7},this),h.jsxDEV("span",{children:"处理中"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1428,columnNumber:7},this),f!=null?h.jsxDEV("span",{className:"elapsed",children:["(",IR(l-f),")"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1429,columnNumber:28},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1426,columnNumber:5},this)});function UU({v:e}){const t=R.useRef(null),r=R.useRef(!0),s=R.useRef(!1),a=R.useRef(0),[l,c]=R.useState(!0),[f,p]=R.useState(!1),m=140,v=_=>_.scrollHeight-_.scrollTop-_.clientHeight<=m,y=()=>{const _=t.current;_&&(s.current=!0,_.scrollTop=_.scrollHeight)};xN.current=()=>{r.current=!0,a.current=Date.now()+1500,c(!0),p(!1),y()},R.useEffect(()=>{const _=t.current;if(!_)return;const k=()=>{s.current=!1,r.current=!1,c(!1)},j=()=>{if(s.current){s.current=!1;return}const U=v(_);r.current=U,c(U),U&&p(!1)},L=U=>{U.deltaY<0&&k()};let P=0;const O=U=>{var ce;P=((ce=U.touches[0])==null?void 0:ce.clientY)??0},T=U=>{var re;(((re=U.touches[0])==null?void 0:re.clientY)??0)>P+4&&k()},B=U=>{(U.key==="PageUp"||U.key==="ArrowUp"||U.key==="Home")&&k()};return _.addEventListener("scroll",j,{passive:!0}),_.addEventListener("wheel",L,{passive:!0}),_.addEventListener("touchstart",O,{passive:!0}),_.addEventListener("touchmove",T,{passive:!0}),_.addEventListener("keydown",B),()=>{_.removeEventListener("scroll",j),_.removeEventListener("wheel",L),_.removeEventListener("touchstart",O),_.removeEventListener("touchmove",T),_.removeEventListener("keydown",B)}},[]),R.useEffect(()=>{if(r.current||Date.now()<a.current){y();return}e.msgs.length&&p(!0)},[e.rev,e.busy,e.perms.length]);const x=async()=>{const _=t.current,k=(_==null?void 0:_.scrollHeight)??0,j=(_==null?void 0:_.scrollTop)??0;r.current=!1,c(!1),await Qe.loadEarlier(e.info.id),requestAnimationFrame(()=>{const L=t.current;L&&(s.current=!0,L.scrollTop=L.scrollHeight-k+j)})},N=R.useRef(0);return R.useEffect(()=>{N.current=0},[e.info.id]),R.useEffect(()=>{const _=t.current;!_||!e.hasOlder||e.loadingOlder||N.current>=4||_.scrollHeight>_.clientHeight+80||(N.current+=1,Qe.loadEarlier(e.info.id))},[e.rev,e.hasOlder,e.loadingOlder,e.info.id]),h.jsxDEV("div",{className:"stream-wrap",children:[h.jsxDEV("div",{className:"stream",ref:t,tabIndex:0,children:h.jsxDEV("div",{className:"stream-inner",children:[e.hasOlder&&h.jsxDEV("div",{className:"load-earlier",children:h.jsxDEV("button",{className:"ghost-btn",disabled:e.loadingOlder,onClick:()=>void x(),children:e.loadingOlder?"loading…":"↑ load earlier messages"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1562,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1561,columnNumber:13},this),ZU(e.msgs).map(_=>_.kind==="work"?h.jsxDEV(QU,{items:_.items},_.key,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1568,columnNumber:15},this):h.jsxDEV(KU,{m:_.m,sid:e.info.id,backend:e.info.backend,busy:e.busy,last:_.tail,live:_.live,base:e.info.workspace||e.info.cwd},_.m.key,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1569,columnNumber:15},this)),h.jsxDEV($U,{busy:e.busy,since:e.busySince},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1570,columnNumber:11},this),e.perms.map(_=>h.jsxDEV(eH,{sid:e.info.id,req:_},_.requestId,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1577,columnNumber:31},this))]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1559,columnNumber:9},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1558,columnNumber:7},this),!l&&h.jsxDEV("button",{className:`jump-latest ${f?"has-new":""}`,onClick:()=>xN.current(),title:f?"new output — jump to the newest":"jump to the newest","aria-label":"jump to newest output",children:[h.jsxDEV(oR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1587,columnNumber:11},this),f?h.jsxDEV("span",{className:"jump-dot","aria-hidden":"true"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1588,columnNumber:21},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1581,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1557,columnNumber:5},this)}const BA=R.memo(XU,(e,t)=>e.live===t.live&&e.m.key===t.m.key&&e.m.text===t.m.text&&e.m.at===t.m.at),HU=(e,t)=>{const r=e.m,s=t.m;return r.key===s.key&&r.title===s.title&&r.status===s.status&&r.detail===s.detail&&r.input===s.input&&r.at===s.at},PA=R.memo(JU,HU),WU=(e,t)=>{const r=e.m,s=t.m;return e.busy===t.busy&&r.key===s.key&&r.at===s.at&&r.terminal===s.terminal&&r.explanation===s.explanation&&JSON.stringify(r.items)===JSON.stringify(s.items)},qU=R.memo(GU,WU);function KU({m:e,sid:t,backend:r,last:s,busy:a,live:l,base:c}){switch(e.kind){case"user":return h.jsxDEV("div",{className:"msg user",children:[h.jsxDEV("div",{className:"role",children:"YOU"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1634,columnNumber:11},this),h.jsxDEV("div",{className:"bubble",children:[e.files.length>0?h.jsxDEV("div",{className:"bubble-files",children:e.files.map((f,p)=>h.jsxDEV("span",{className:"bubble-file",title:f.name,children:[f.kind==="image"?h.jsxDEV(yF,{size:12},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1640,columnNumber:43},this):h.jsxDEV(Ql,{size:12},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1640,columnNumber:73},this),f.name]},`${f.name}-${p}`,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1639,columnNumber:19},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1637,columnNumber:15},this):null,e.text,h.jsxDEV("div",{className:"bubble-actions",children:[e.at?h.jsxDEV("span",{className:"msg-at",title:ec(e.at),children:By(e.at)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1648,columnNumber:23},this):null,h.jsxDEV(wN,{text:e.text,what:"这条消息"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1649,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1647,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1635,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1633,columnNumber:9},this);case"agent":return h.jsxDEV("div",{className:"msg agent",children:[h.jsxDEV("div",{className:"role with-mark",children:[h.jsxDEV(jU,{backend:r},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1658,columnNumber:13},this),$N(r).label||"AGENT"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1657,columnNumber:11},this),h.jsxDEV("div",{className:"bubble",children:[h.jsxDEV(rF,{text:e.text,base:c},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1662,columnNumber:13},this),h.jsxDEV("div",{className:"bubble-actions",children:[e.at?h.jsxDEV("span",{className:"msg-at",title:ec(e.at),children:By(e.at)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1664,columnNumber:23},this):null,h.jsxDEV(wN,{text:e.text,what:"这条回复"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1665,columnNumber:15},this),h.jsxDEV(rH,{id:e.key,text:e.text},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1666,columnNumber:15},this),s&&!a?h.jsxDEV(MU,{sid:t,busy:a},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1667,columnNumber:32},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1663,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1661,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1656,columnNumber:9},this);case"thought":return h.jsxDEV(BA,{m:e,live:!!l},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1673,columnNumber:14},this);case"tool":return h.jsxDEV(PA,{m:e},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1675,columnNumber:14},this);case"plan":return h.jsxDEV(qU,{m:e,busy:a},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1677,columnNumber:14},this);case"meta":return h.jsxDEV("div",{className:"msg meta",children:h.jsxDEV("div",{className:"bubble",children:e.text},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1679,columnNumber:40},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1679,columnNumber:14},this);default:return null}}function YU({v:e}){const[t,r]=R.useState(!1),s=e.plan;if(!s||!s.items.length)return null;const a=s.items.length,l=s.items.filter(m=>m.status==="completed").length,c=l===a,f=s.terminal==="interrupted"?"已打断":s.terminal==="failed"?"运行出错":s.terminal==="ended"?"回合结束":c?"已完成":e.busy?"进行中":"待命中",p=s.terminal?"terminal":c?"done":e.busy?"running":"";return h.jsxDEV("div",{className:`plan-bar ${c&&!s.terminal?"completed":""}`,children:[h.jsxDEV("button",{type:"button",className:"plan-head",onClick:()=>r(m=>!m),"aria-expanded":t,title:"任务计划 · 点击展开/折叠",children:[h.jsxDEV("span",{className:"plan-title",children:"任务计划"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1713,columnNumber:9},this),h.jsxDEV("span",{className:"plan-dots","aria-hidden":"true",children:s.items.map((m,v)=>h.jsxDEV("span",{className:`dot ${m.status}`},v,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1716,columnNumber:13},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1714,columnNumber:9},this),h.jsxDEV("span",{className:"plan-count",children:[l,"/",a]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1719,columnNumber:9},this),h.jsxDEV("span",{className:`plan-state ${p}`,children:f},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1720,columnNumber:9},this),h.jsxDEV(os,{size:11,className:`tool-chev ${t?"open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1721,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1706,columnNumber:7},this),t?h.jsxDEV("ol",{className:"plan-body",children:s.items.map((m,v)=>h.jsxDEV("li",{className:`plan-step ${m.status}`,children:[h.jsxDEV("span",{className:"step-icon","aria-hidden":"true",children:m.status==="completed"?"✓":m.status==="in_progress"?"◉":m.status==="cancelled"?"✕":"○"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1727,columnNumber:15},this),h.jsxDEV("span",{className:"step-title",children:m.content},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1728,columnNumber:15},this)]},v,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1726,columnNumber:13},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1724,columnNumber:9},this):null,t&&s.explanation?h.jsxDEV("p",{className:"plan-explanation",children:s.explanation},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1735,columnNumber:35},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1705,columnNumber:5},this)}function GU({m:e,busy:t}){const[r,s]=R.useState(!1),a=e.items.length;if(!a)return null;const l=e.items.filter(m=>m.status==="completed").length,c=l===a,f=e.terminal==="interrupted"?"已打断":e.terminal==="failed"?"运行出错":e.terminal==="ended"?"回合结束":c?"已完成":t?"进行中":"",p=e.terminal?"terminal":c?"done":t?"running":"";return h.jsxDEV("div",{className:"msg",children:h.jsxDEV("div",{className:`plan-card ${c&&!e.terminal?"completed":""}`,children:[h.jsxDEV("button",{type:"button",className:"plan-head",onClick:()=>s(m=>!m),"aria-expanded":r,title:"任务计划 · click to collapse/expand",children:[h.jsxDEV("span",{className:"plan-title",children:"任务计划"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1763,columnNumber:11},this),h.jsxDEV("span",{className:"plan-dots","aria-hidden":"true",children:e.items.map((m,v)=>h.jsxDEV("span",{className:`dot ${m.status}`},v,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1766,columnNumber:15},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1764,columnNumber:11},this),h.jsxDEV("span",{className:"plan-count",children:[l,"/",a]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1769,columnNumber:11},this),f?h.jsxDEV("span",{className:`plan-state ${p}`,children:f},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1770,columnNumber:24},this):null,h.jsxDEV(os,{size:11,className:`tool-chev ${r?"open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1771,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1762,columnNumber:9},this),r?h.jsxDEV("ol",{className:"plan-body",children:e.items.map((m,v)=>h.jsxDEV("li",{className:`plan-step ${m.status}`,children:[h.jsxDEV("span",{className:"step-icon","aria-hidden":"true",children:m.status==="completed"?"✓":m.status==="in_progress"?"◉":m.status==="cancelled"?"✕":"○"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1777,columnNumber:17},this),h.jsxDEV("span",{className:"step-title",children:m.content},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1778,columnNumber:17},this)]},v,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1776,columnNumber:15},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1774,columnNumber:11},this):null,r&&e.explanation?h.jsxDEV("p",{className:"plan-explanation",children:e.explanation},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1784,columnNumber:34},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1761,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1760,columnNumber:5},this)}function JU({m:e}){const[t,r]=R.useState(!1),s=!!(e.input||e.detail),a=SN(e.status);return h.jsxDEV("div",{className:"msg",children:h.jsxDEV("div",{className:`tool-card ${e.status}`,children:[h.jsxDEV("button",{type:"button",className:"tool-head",onClick:()=>s&&r(l=>!l),title:s?`${e.title}
|
|
280
|
+
click for the full call and its result`:e.title,"aria-expanded":s?t:void 0,children:[h.jsxDEV("span",{className:`tool-dot ${a}`,"aria-hidden":"true"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1809,columnNumber:11},this),h.jsxDEV("span",{className:"tool-title",children:e.title},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1810,columnNumber:11},this),e.at?h.jsxDEV("span",{className:"msg-at",title:ec(e.at),children:ao(e.at)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1811,columnNumber:19},this):null,s?h.jsxDEV(os,{size:11,className:`tool-chev ${t?"open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1812,columnNumber:22},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1802,columnNumber:9},this),t&&h.jsxDEV("div",{className:"tool-body",children:[h.jsxDEV("div",{className:"lbl",children:"tool"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1816,columnNumber:13},this),h.jsxDEV("pre",{className:"tool-meta",children:e.title},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1817,columnNumber:13},this),h.jsxDEV("div",{className:"lbl",children:"kind · status"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1818,columnNumber:13},this),h.jsxDEV("pre",{className:"tool-meta",children:[e.kind2?`${e.kind2} · `:"",e.status]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1819,columnNumber:13},this),e.input?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"lbl",children:"input"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1822,columnNumber:17},this),h.jsxDEV("pre",{children:e.input},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1823,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1821,columnNumber:15},this):null,e.detail?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"lbl",children:"output"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1828,columnNumber:17},this),h.jsxDEV("pre",{children:e.detail},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1829,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1827,columnNumber:15},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1815,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1801,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1800,columnNumber:5},this)}function SN(e){const t=String(e||"").toLowerCase();return t==="completed"||t==="success"?"ok":t==="failed"||t==="error"||t==="cancelled"?"err":t==="in_progress"||t==="running"||t==="pending"?"running":"idle"}function XU({m:e,live:t}){const[r,s]=R.useState(null),a=r??t,l=R.useRef(null),[c,f]=R.useState(!0),p=24;R.useEffect(()=>{const v=l.current;if(!v||!t)return;const y=()=>v.scrollHeight-v.scrollTop-v.clientHeight<=p,x=()=>f(y()),N=P=>{P.deltaY<0&&f(!1)};let _=0;const k=P=>{var O;_=((O=P.touches[0])==null?void 0:O.clientY)??0},j=P=>{var O;(((O=P.touches[0])==null?void 0:O.clientY)??0)>_+4&&f(!1)},L=P=>{(P.key==="PageUp"||P.key==="ArrowUp"||P.key==="Home")&&f(!1)};return v.addEventListener("scroll",x,{passive:!0}),v.addEventListener("wheel",N,{passive:!0}),v.addEventListener("touchstart",k,{passive:!0}),v.addEventListener("touchmove",j,{passive:!0}),v.addEventListener("keydown",L),()=>{v.removeEventListener("scroll",x),v.removeEventListener("wheel",N),v.removeEventListener("touchstart",k),v.removeEventListener("touchmove",j),v.removeEventListener("keydown",L)}},[t,a]),R.useEffect(()=>{if(!t||!c)return;const v=l.current;v&&(v.scrollTop=v.scrollHeight)},[e.text,t,c]);const m=()=>{f(!0);const v=l.current;v&&(v.scrollTop=v.scrollHeight)};return h.jsxDEV("div",{className:`msg thought${t?" live":""}`,children:[h.jsxDEV("button",{type:"button",className:"role thought-head","aria-expanded":a,"aria-label":`${a?"fold":"open"} the agent's thinking`,onClick:()=>s(!a),children:[h.jsxDEV(os,{size:11,className:`thought-chev${a?" open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1926,columnNumber:9},this),"💭 ",t?"思考中…":"思考",h.jsxDEV("span",{className:"thought-meta",children:[e.at?`${By(e.at)} · `:"",e.text.length," 字"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1928,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1919,columnNumber:7},this),a&&h.jsxDEV("div",{className:`bubble${t?" live":""}`,ref:l,children:[e.text,t?null:h.jsxDEV("div",{className:"bubble-actions",children:h.jsxDEV(wN,{text:e.text,what:"这段思考"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1935,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1934,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1931,columnNumber:9},this),t&&a&&!c&&h.jsxDEV("button",{type:"button",className:"thought-stick",onClick:m,title:"follow the newest thinking again","aria-label":"follow the newest thinking again",children:[h.jsxDEV(oR,{size:11},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1948,columnNumber:11},this)," 回到最新"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1941,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:1918,columnNumber:5},this)}const ay=e=>e.kind==="thought"||e.kind==="tool";function ZU(e){const t=[];let r=0;for(;r<e.length;){const p=e[r];if(!ay(p)){t.push({kind:"msg",m:p}),r++;continue}let m=r;for(;m<e.length&&ay(e[m]);)m++;t.push({kind:"work",items:e.slice(r,m).filter(ay),current:!1}),r=m}const s=t.map(p=>p.kind).lastIndexOf("work");let a=-1;if(t.forEach((p,m)=>{p.kind==="msg"&&p.m.kind==="user"&&(a=m)}),s>a){const p=t[s];p.kind==="work"&&(p.current=!0)}const l=[],c=p=>({kind:"msg",m:p,live:!1,tail:!1});for(const p of t){if(p.kind==="msg"){l.push(c(p.m));continue}const m=p.current?p.items.slice(-5):[],v=p.items.slice(0,p.items.length-m.length);v.length>=(p.current?1:2)?l.push({kind:"work",key:`work-${l.length}`,items:v,tail:!1}):v.forEach(y=>l.push(c(y))),m.forEach(y=>l.push(c(y)))}const f=[...l].reverse().find(p=>p.kind==="msg");f&&f.kind==="msg"&&(f.tail=!0);for(const p of l)p.kind==="msg"&&(p.m.kind==="agent"||p.m.kind==="thought")&&(p.live=!!p.m.open);return l}function QU({items:e}){const[t,r]=R.useState(!1),s=e.filter(_=>_.kind==="tool"),a=e.filter(_=>_.kind==="thought"),l=s.filter(_=>SN(_.status)==="err").length,c=s.some(_=>SN(_.status)==="running"),f=a.reduce((_,k)=>_+k.text.length,0),p=[...new Set(s.map(_=>_.title.replace(/\s+/g," ").trim()))],m=p.slice(0,2).map(_=>_.length>34?`${_.slice(0,33)}…`:_).join(" · "),v=s.length&&a.length?`${s.length} 次工具调用 · ${a.length} 段思考`:s.length?`${s.length} 次工具调用`:`${a.length} 段思考`,y=e.map(_=>_.at).filter(_=>typeof _=="number"),x=y.length?Math.min(...y):null,N=y.length?Math.max(...y):null;return h.jsxDEV("div",{className:"msg",children:h.jsxDEV("div",{className:"work-run",children:[h.jsxDEV("button",{type:"button",className:"work-run-head","aria-expanded":t,title:[`折叠了 ${s.length} 次工具调用、${a.length} 段思考(${f} 字)`,"点开看它们",...s.map(_=>`· ${_.title}`)].join(`
|
|
281
|
+
`),onClick:()=>r(_=>!_),children:[h.jsxDEV(os,{size:11,className:`work-chev${t?" open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2085,columnNumber:11},this),h.jsxDEV("span",{className:"work-run-icon","aria-hidden":"true",children:s.length?"⚙":"💭"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2086,columnNumber:11},this),h.jsxDEV("span",{className:"work-run-count",children:v},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2087,columnNumber:11},this),p.length?h.jsxDEV("span",{className:"work-run-names",children:p.length>2?`${m} +${p.length-2}`:m},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2089,columnNumber:13},this):h.jsxDEV("span",{className:"work-run-chars",children:[f," 字"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2091,columnNumber:13},this),h.jsxDEV("span",{className:`work-run-state ${l?"err":c?"run":"ok"}`,"aria-hidden":"true",children:l?`✗ ${l}`:c?"•••":"✓"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2093,columnNumber:11},this),x?h.jsxDEV("span",{className:"msg-at",title:`${ec(x)}${N&&N!==x?` → ${ec(N)}`:""}`,children:[ao(x),N&&N-x>=6e4?`–${ao(N)}`:""]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2097,columnNumber:13},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2077,columnNumber:9},this),t&&h.jsxDEV("div",{className:"work-run-items",children:e.map(_=>_.kind==="thought"?h.jsxDEV(BA,{m:_,live:!1},_.key,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2107,columnNumber:17},this):h.jsxDEV(PA,{m:_},_.key,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2108,columnNumber:17},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2103,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2076,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2075,columnNumber:5},this)}function eH({sid:e,req:t}){return h.jsxDEV("div",{className:"msg",children:h.jsxDEV("div",{className:"perm-card",children:[h.jsxDEV("div",{className:"q",children:["🔑 agent 要执行:",h.jsxDEV("b",{children:t.toolCallTitle},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2124,columnNumber:41},this),"(",t.kind,")"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2124,columnNumber:9},this),h.jsxDEV(VA,{req:t},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2125,columnNumber:9},this),h.jsxDEV("div",{className:"opts",children:h.jsxDEV(IA,{sid:e,req:t},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2127,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2126,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2123,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2122,columnNumber:5},this)}function VA({req:e}){if(e.diff)return h.jsxDEV(nH,{diff:e.diff},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2137,columnNumber:24},this);const t=e.path??null;return t?h.jsxDEV("div",{className:"perm-file",title:t,children:[h.jsxDEV(Ql,{size:12},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2142,columnNumber:7},this),h.jsxDEV("code",{children:t},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2143,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2141,columnNumber:5},this):null}function IA({sid:e,req:t,onAnswered:r}){const s=(a,l)=>{Qe.send({t:"respond-permission",sessionId:e,requestId:t.requestId,decision:a,...l?{optionKind:l.kind,signature:`${t.kind}:${t.toolCallTitle}`}:{}}),r==null||r()};return h.jsxDEV(h.Fragment,{children:[t.options.map(a=>h.jsxDEV("button",{className:a.kind.startsWith("allow")?"allow":"reject",onClick:()=>s({outcome:"selected",optionId:a.optionId},a),children:a.name},a.optionId,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2168,columnNumber:9},this)),h.jsxDEV("button",{title:"不选任何一项:agent 会收到 cancelled,这一轮就停在这里",onClick:()=>s({outcome:"cancelled"}),children:"取消这次请求"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2176,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2166,columnNumber:5},this)}function tH(e,t){const r=e.length?e.replace(/\n$/,"").split(`
|
|
282
|
+
`):[],s=t.length?t.replace(/\n$/,"").split(`
|
|
283
|
+
`):[];let a=0;for(;a<r.length&&a<s.length&&r[a]===s[a];)a++;let l=0;for(;l<r.length-a&&l<s.length-a&&r[r.length-1-l]===s[s.length-1-l];)l++;const c=[],f=3;a>f&&c.push({kind:"gap",text:`⋯ 上面 ${a-f} 行未变 ⋯`,oldNo:null,newNo:null});for(let k=Math.max(0,a-f);k<a;k++)c.push({kind:"ctx",text:r[k],oldNo:k+1,newNo:k+1});const p=r.slice(a,r.length-l),m=s.slice(a,s.length-l),v=[];if(p.length*m.length>25e4)p.forEach((k,j)=>v.push({kind:"del",text:k,oldNo:a+j+1,newNo:null})),m.forEach((k,j)=>v.push({kind:"add",text:k,oldNo:null,newNo:a+j+1}));else{const k=p.length,j=m.length,L=Array.from({length:k+1},()=>new Array(j+1).fill(0));for(let T=k-1;T>=0;T--)for(let B=j-1;B>=0;B--)L[T][B]=p[T]===m[B]?L[T+1][B+1]+1:Math.max(L[T+1][B],L[T][B+1]);let P=0,O=0;for(;P<k&&O<j;)p[P]===m[O]?(v.push({kind:"ctx",text:p[P],oldNo:a+P+1,newNo:a+O+1}),P++,O++):L[P+1][O]>=L[P][O+1]?(v.push({kind:"del",text:p[P],oldNo:a+P+1,newNo:null}),P++):(v.push({kind:"add",text:m[O],oldNo:null,newNo:a+O+1}),O++);for(;P<k;)v.push({kind:"del",text:p[P],oldNo:a+P+1,newNo:null}),P++;for(;O<j;)v.push({kind:"add",text:m[O],oldNo:null,newNo:a+O+1}),O++}const y=[];for(let k=0;k<Math.min(l,f);k++)y.push({kind:"ctx",text:r[r.length-l+k],oldNo:r.length-l+k+1,newNo:s.length-l+k+1});l>f&&y.push({kind:"gap",text:`⋯ 下面 ${l-f} 行未变 ⋯`,oldNo:null,newNo:null});const x=new Array(v.length).fill(!1);v.forEach((k,j)=>{if(k.kind!=="ctx")for(let L=Math.max(0,j-f);L<=Math.min(v.length-1,j+f);L++)x[L]=!0});const N=[];let _=0;return v.forEach((k,j)=>{if(!x[j]){_++;return}_&&(N.push({kind:"gap",text:`⋯ 中间 ${_} 行未变 ⋯`,oldNo:null,newNo:null}),_=0),N.push(k)}),_&&N.push({kind:"gap",text:`⋯ 中间 ${_} 行未变 ⋯`,oldNo:null,newNo:null}),[...c,...N,...y]}function nH({diff:e}){const[t,r]=R.useState(!1),s=e.oldText??"",a=e.newText??"",l=a.length>0&&s.length===0,c=tH(s,a),f=c.filter(m=>m.kind==="add").length,p=c.filter(m=>m.kind==="del").length;return h.jsxDEV("div",{className:"perm-changes",children:[h.jsxDEV("button",{type:"button",className:"perm-change-row","aria-expanded":t,"aria-label":`${t?"收起":"查看"} ${e.path??"这份文件"} 的变更`,onClick:()=>r(m=>!m),children:[h.jsxDEV(Ql,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2274,columnNumber:9},this),h.jsxDEV("code",{title:e.path??"",children:e.path??"(未命名文件)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2275,columnNumber:9},this),h.jsxDEV("span",{className:"perm-counts",children:l?h.jsxDEV("span",{className:"add",children:["新文件 · ",f," 行"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2278,columnNumber:15},this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV("span",{className:"add",children:["+",f]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2279,columnNumber:17},this),h.jsxDEV("span",{className:"del",children:["−",p]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2279,columnNumber:54},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2279,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2276,columnNumber:9},this),h.jsxDEV("span",{className:"perm-caret","aria-hidden":"true",children:t?"▾":"▸"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2281,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2267,columnNumber:7},this),t?h.jsxDEV("div",{className:"perm-diff",role:"region","aria-label":"变更内容",children:c.map((m,v)=>m.kind==="gap"?h.jsxDEV("div",{className:"perm-diff-gap",children:m.text},v,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2286,columnNumber:13},this):h.jsxDEV("div",{className:`perm-diff-line ${m.kind}`,children:[h.jsxDEV("span",{className:"no",children:m.oldNo??""},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2289,columnNumber:15},this),h.jsxDEV("span",{className:"no",children:m.newNo??""},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2290,columnNumber:15},this),h.jsxDEV("span",{className:"sig",children:m.kind==="add"?"+":m.kind==="del"?"−":" "},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2291,columnNumber:15},this),h.jsxDEV("span",{className:"txt",children:m.text||" "},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2292,columnNumber:15},this)]},v,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2288,columnNumber:13},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2284,columnNumber:9},this):null,e.truncated?h.jsxDEV("div",{className:"perm-cut",children:"agent 发来的是整份文件,这里只保留了改动附近的部分"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2298,columnNumber:9},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2266,columnNumber:5},this)}function iH({req:e,sessionTitle:t,onSkip:r}){Au(!0,r);const[s,a]=R.useState(()=>Date.now());R.useEffect(()=>{const c=window.setInterval(()=>a(Date.now()),1e3);return()=>window.clearInterval(c)},[e.requestId]);const l=Math.max(0,Math.round((s-e.createdAt)/1e3));return h.jsxDEV("div",{className:"modal-bg perm-bg",onClick:r,children:h.jsxDEV("div",{className:"modal perm-dialog",role:"dialog","aria-modal":"true","aria-label":"agent 请求授权","data-request-id":e.requestId,"data-session-id":e.sessionId,onClick:c=>c.stopPropagation(),children:[h.jsxDEV("h3",{children:"Agent 请求授权"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2344,columnNumber:9},this),h.jsxDEV("div",{className:"perm-ask",children:["「",t,"」里的 agent 停在这里等你答复 —— 它要执行 ",h.jsxDEV("b",{children:e.toolCallTitle},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2346,columnNumber:53},this),"(",e.kind,")。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2345,columnNumber:9},this),h.jsxDEV(VA,{req:e},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2348,columnNumber:9},this),h.jsxDEV("div",{className:"opts perm-opts",children:h.jsxDEV(IA,{sid:e.sessionId,req:e},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2350,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2349,columnNumber:9},this),h.jsxDEV("div",{className:"perm-note",children:["已等待 ",l," 秒。一直不答复的话,agent 那边会自己放弃这次请求(等同拒绝),这一轮就停在这里。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2352,columnNumber:9},this),h.jsxDEV("div",{className:"row",children:h.jsxDEV("button",{className:"cancel",onClick:r,children:"稍后处理"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2356,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2355,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2335,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2334,columnNumber:5},this)}function rH({id:e,text:t}){const[r]=Tu(),s=FN();if(!t.trim())return null;const a=s.speaking&&s.speakingId===e;return typeof window<"u"&&!("speechSynthesis"in window)&&!r.serverTts?h.jsxDEV("span",{className:"bubble-note",title:"this browser has no speech synthesis",children:"no voices"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2374,columnNumber:12},this):h.jsxDEV("button",{className:`bubble-btn speak ${a?"on":""}`,title:a?"stop reading":"read this reply aloud","aria-label":a?"stop reading":"read aloud",onClick:()=>{a?kr.stop():kr.speak(t,e,r)},children:a?h.jsxDEV(cR,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2386,columnNumber:18},this):h.jsxDEV(pg,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2386,columnNumber:48},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2377,columnNumber:5},this)}const FA=["image/png","image/jpeg","image/webp","image/gif"],sH=4*1024*1024,aH=256*1024;function oH(e){return FA.includes(e.type)?e.size>sH?Promise.resolve({error:`${e.name}: image larger than 4MB`}):new Promise(r=>{const s=new FileReader;s.onload=()=>{const a=String(s.result??"");r({id:`${e.name}-${e.size}-${Math.random().toString(36).slice(2,7)}`,name:e.name,kind:"image",mimeType:e.type,preview:a,payload:a.slice(a.indexOf(",")+1),bytes:e.size})},s.onerror=()=>r({error:`${e.name}: could not be read`}),s.readAsDataURL(e)}):e.size>aH?Promise.resolve({error:`${e.name}: larger than 256kB — attach it as a path instead`}):new Promise(r=>{const s=new FileReader;s.onload=()=>r({id:`${e.name}-${e.size}-${Math.random().toString(36).slice(2,7)}`,name:e.name,kind:"text",mimeType:e.type||"text/plain",payload:String(s.result??""),bytes:e.size}),s.onerror=()=>r({error:`${e.name}: could not be read`}),s.readAsText(e)})}function lH(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} kB`:`${(e/1048576).toFixed(1)} MB`}function DD(e,t){const r=(e||t||"").trim();if(!r)return"";const s=r.includes("·")?r.split("·").pop().trim():r;return(s.includes(":")?s.split(":").pop().trim():s)||s||r}function RD(e){const t=a=>a.replace(/[•·|,-]?\s*\b(current|active|selected|default)\b\s*$/i,"").replace(/[•·|,\s-]+$/g,"").trim(),r=/^\s*provider:\s*(.+)$/i.exec(e.description??"");if(r){const a=t(r[1]);if(a)return a}const s=e.modelId.includes(":")?e.modelId.split(":")[0]:"";return t(s)||"other"}const Ru=["#7f8c98","#5fb3a1","#7fb069","#d9a441","#e8843c","#f0603f","#ff4d4d"];function cH(e,t){const r=Math.max(1,t.length),s=t.findIndex(c=>String(c.value)===String(e)),a=s<0?0:s+1;return{color:s<0?"var(--text-dim)":Ru[Math.min(s,Ru.length-1)],level:a,total:r}}function uH({level:e,total:t,color:r}){const s=Math.min(7,t),a=Math.max(0,Math.min(s,Math.round(e/t*s)));return h.jsxDEV("span",{className:"tb-pips","aria-hidden":"true",children:Array.from({length:s}).map((l,c)=>h.jsxDEV("i",{style:{background:c<a?r:"var(--line)"}},c,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2492,columnNumber:9},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2490,columnNumber:5},this)}function lg(e,t){const r=t==="effort"?["thought_level","reasoning"]:["model","model_config"],s=t==="effort"?/reason|effort|think|depth/i:/model/i;return e.find(a=>a.type==="select"&&a.category&&r.includes(String(a.category)))??e.find(a=>a.type==="select"&&s.test(a.id))}function hH({label:e,title:t,icon:r,value:s,children:a,open:l,onToggle:c,testId:f}){const p=R.useRef(null);return Fd(l,[p],c),h.jsxDEV("div",{className:"tb-wrap",ref:p,children:[h.jsxDEV("button",{type:"button",className:`tb-btn ${l?"on":""}`,title:t,"aria-label":t,"aria-expanded":l,"data-testid":f,onClick:c,children:[r,h.jsxDEV("span",{className:"tb-label",children:s||e},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2536,columnNumber:9},this),h.jsxDEV(BN,{size:11,className:"tb-chev"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2537,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2526,columnNumber:7},this),l?a:null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2525,columnNumber:5},this)}function AD({items:e,current:t,onPick:r,empty:s}){return e.length?h.jsxDEV("div",{className:"tb-list",role:"listbox",children:e.map(a=>h.jsxDEV("button",{role:"option","aria-selected":a.value===t,className:`tb-opt ${a.value===t?"sel":""}`,title:a.hint?`${a.name} — ${a.hint}`:a.name,onClick:()=>r(a.value),children:[h.jsxDEV("span",{className:"tb-opt-name",children:[a.color?h.jsxDEV("i",{className:"tb-dot",style:{background:a.color}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2564,columnNumber:25},this):null,a.name]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2563,columnNumber:11},this),a.hint?h.jsxDEV("span",{className:"tb-opt-hint",children:a.hint},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2567,columnNumber:22},this):null]},a.value,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2555,columnNumber:9},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2553,columnNumber:5},this):h.jsxDEV("div",{className:"tb-list",children:h.jsxDEV("div",{className:"tb-empty",children:s},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2551,columnNumber:54},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2551,columnNumber:29},this)}function zA(e){return e.category==="_context_window"?!0:/budget|context/i.test(`${e.id} ${e.name??""}`)}function dH({v:e}){var z,X;const t=e.info.usage,r=e.info.configOptions.find(zA),[s,a]=R.useState(!1),l=R.useRef(null),[c,f]=R.useState(!1),[p,m]=R.useState(""),[v,y]=R.useState(!0),[x,N]=R.useState(""),[_,k]=R.useState(""),j=e.trace;if(Fd(s,[l],()=>{a(!1),f(!1)}),!t||!t.used&&!t.size)return null;const L=e.info.contextLimit&&e.info.contextLimit>0?e.info.contextLimit:null,P=e.info.modelContextLimit&&e.info.modelContextLimit>0?e.info.modelContextLimit:null,O=L?"session":P?"model":"agent",T=L??P??t.size,B=T>0?Math.min(100,Math.round(t.used/T*100)):0,U=B>=85?"hot":B>=65?"warn":"ok",ce=$=>$>=1e3?`${($/1e3).toFixed($>=1e4?0:1)}k`:String($),re=T>0?Math.max(0,T-t.used):0,Z=e.info.commands??[],ve=$=>Z.some(xe=>xe.name===$),pe=O==="session"?"你为本会话声明":O==="model"?"你为这个模型记下的":"agent 上报(usage_update)",Q=async($,xe={})=>{N(xe.forgetModel?"forget":"save"),k("");try{await Qe.setContextLimit(e.info.id,$,xe),f(!1)}catch(Me){k(String((Me==null?void 0:Me.message)??Me))}finally{N("")}},C=$=>{Qe.send({t:"prompt",sessionId:e.info.id,text:`/${$}`}),a(!1)},J=($,xe)=>{const Me=xe.trim();Me&&(Qe.send({t:"set-config",sessionId:e.info.id,configId:$,value:Me}),m(""))},Y=String((r==null?void 0:r.currentValue)??"");return h.jsxDEV("div",{className:`usage-row ${U}`,ref:l,children:[h.jsxDEV("button",{className:"usage-text",onClick:()=>a($=>!$),title:"上下文窗口 — 点这里改",children:[h.jsxDEV(dC,{size:12,className:"usage-icon"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2664,columnNumber:9},this),T>0?`${ce(t.used)} / ${ce(T)}`:`${ce(t.used)} / —`,T>0?` · ${B}%`:"",O==="session"?" · 声明":O==="model"?" · 模型记录":""]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2663,columnNumber:7},this),T>0?h.jsxDEV("div",{className:"usage-bar",title:`${t.used} / ${T} tokens (${B}%)`,children:h.jsxDEV("i",{style:{width:`${B}%`}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2674,columnNumber:11},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2673,columnNumber:9},this):null,U==="hot"&&ve("compress")&&!e.busy?h.jsxDEV("button",{className:"usage-act",onClick:()=>C("compress"),title:"发送 /compress:让 agent 压缩上下文(这是它自己公告的命令)",children:[h.jsxDEV(hR,{size:11},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2685,columnNumber:11},this)," 压缩上下文"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2680,columnNumber:9},this):null,s?h.jsxDEV("div",{className:"usage-detail",children:[h.jsxDEV("div",{className:"usage-set",children:[h.jsxDEV("div",{className:"usage-set-head",children:[h.jsxDEV(dC,{size:12},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2697,columnNumber:15},this)," 上下文窗口",h.jsxDEV("span",{className:"usage-set-scope",children:r?String(((z=r.meta)==null?void 0:z.scope)??"")==="model"?"按模型":"":"仅声明"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2698,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2696,columnNumber:13},this),r?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"usage-set-chips",children:(r.options??[]).map($=>h.jsxDEV("button",{className:`usage-chip ${Y===String($.value)?"sel":""}`,onClick:()=>J(r.id,String($.value)),children:String($.value)==="auto"?"自动":$.name},String($.value),!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2706,columnNumber:21},this))},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2704,columnNumber:17},this),h.jsxDEV("div",{className:"usage-edit",children:[h.jsxDEV("input",{value:p,inputMode:"numeric","aria-label":"context window in tokens",placeholder:((X=r.meta)==null?void 0:X.freeform)===!0?"任意 token 数,如 300000":"填一个数",onChange:$=>m($.target.value),onKeyDown:$=>{$.key==="Enter"&&J(r.id,p),$.key==="Escape"&&($.stopPropagation(),a(!1))}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2716,columnNumber:19},this),h.jsxDEV("button",{className:"usage-edit-btn",disabled:!p.trim(),onClick:()=>J(r.id,p),children:"set"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2728,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2715,columnNumber:17},this),h.jsxDEV("div",{className:"settings-note",children:"常用:256k / 512k / 768k / 1m;填 auto 回到模型自己的窗口。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2730,columnNumber:17},this),h.jsxDEV("div",{className:"usage-note",children:["改的是",h.jsxDEV("b",{children:"这个模型"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2732,columnNumber:22},this),":同模型的所有会话(含新开的、别的槽位)都用同一个上限。它只会让 Hermes 更早压缩,不会把窗口撑过模型本身。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2731,columnNumber:17},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2703,columnNumber:15},this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"usage-note",children:["这个后端没公告上下文旋钮,所以下面这个数只是仪表盘的",h.jsxDEV("b",{children:"声明"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2738,columnNumber:45},this),",只影响百分比;真减上下文用压缩命令或换模型。"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2737,columnNumber:17},this),c?h.jsxDEV("div",{className:"usage-edit",children:[h.jsxDEV("input",{autoFocus:!0,value:p,inputMode:"numeric","aria-label":"context window in tokens",placeholder:String(t.size||e.info.contextLimit||2e5),onChange:$=>m($.target.value),onKeyDown:$=>{if($.key==="Enter"){const xe=Number(p.replace(/[^0-9]/g,""));xe>0&&Q(xe,{remember:v})}$.key==="Escape"&&($.stopPropagation(),f(!1))}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2742,columnNumber:21},this),h.jsxDEV("button",{className:"usage-edit-btn",disabled:x!==""||!Number(p.replace(/[^0-9]/g,"")),onClick:()=>void Q(Number(p.replace(/[^0-9]/g,"")),{remember:v}),children:x==="save"?"…":"set"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2757,columnNumber:21},this),h.jsxDEV("label",{className:"usage-check",title:"像 studio 那样按模型记住:下次用这个模型自动带回来",children:[h.jsxDEV("input",{type:"checkbox",checked:v,onChange:$=>y($.target.checked)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2765,columnNumber:23},this),"记到本模型"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2764,columnNumber:21},this),P?h.jsxDEV("button",{className:"usage-edit-btn",disabled:x!=="",onClick:()=>void Q(null,{forgetModel:!0}),children:x==="forget"?"…":"忘掉本模型记录"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2769,columnNumber:23},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2741,columnNumber:19},this):h.jsxDEV("button",{className:"usage-edit-btn",onClick:()=>{m(String(T||2e5)),f(!0)},children:"声明窗口长度"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2779,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2736,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2695,columnNumber:11},this),h.jsxDEV("div",{children:["已用 ",t.used," / ",T||"—"," tokens(",B,"%)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2786,columnNumber:11},this),h.jsxDEV("div",{children:["剩余:",T>0?re:"unknown"," tokens"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2787,columnNumber:11},this),h.jsxDEV("div",{children:["窗口来源:",h.jsxDEV("b",{children:pe},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2788,columnNumber:21},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2788,columnNumber:11},this),t.size>0&&O!=="agent"?h.jsxDEV("div",{children:["agent 上报:",ce(t.size)," tokens (usage_update)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2789,columnNumber:51},this):null,P&&O==="session"?h.jsxDEV("div",{children:["本模型记录:",ce(P)," tokens"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2790,columnNumber:49},this):null,t.cost!=null?h.jsxDEV("div",{children:["本轮花费:$",t.cost.toFixed(6)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2791,columnNumber:33},this):null,j!=null&&j.model?h.jsxDEV("div",{children:["model:",j.model]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2792,columnNumber:27},this):null,j&&(j.effort||j.mode)?h.jsxDEV("div",{children:["本轮:",[j.effort&&`思考强度 ${j.effort}`,j.mode&&`模式 ${j.mode}`].filter(Boolean).join(",")]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2794,columnNumber:15},this):null,ve("compress")||ve("context")?h.jsxDEV("div",{className:"usage-actions",children:[ve("compress")?h.jsxDEV("button",{className:"usage-act",onClick:()=>C("compress"),title:"让 agent 压缩上下文(/compress,它自己公告的命令)",children:"压缩上下文"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2799,columnNumber:17},this):null,ve("context")?h.jsxDEV("button",{className:"usage-act",onClick:()=>C("context"),title:"看消息按角色分布(/context)",children:"消息分布"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2802,columnNumber:17},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2797,columnNumber:13},this):null,_?h.jsxDEV("div",{className:"usage-edit-err",children:_},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2806,columnNumber:18},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2689,columnNumber:9},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2658,columnNumber:5},this)}function fH({o:e,sessionId:t}){var m;const r=e.meta??{},s=r.freeform===!0,[a,l]=R.useState(""),c=String(e.currentValue??""),f=typeof r.unit=="string"?r.unit:"tokens",p=v=>Qe.send({t:"set-config",sessionId:t,configId:e.id,value:v});return h.jsxDEV("div",{className:"settings-group",children:[h.jsxDEV("div",{className:"settings-label",children:[h.jsxDEV(rf,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2829,columnNumber:39},this)," ",e.name||e.id]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2829,columnNumber:7},this),(m=e.options)==null?void 0:m.map(v=>h.jsxDEV("button",{className:`settings-opt ${c===String(v.value)?"sel":""}`,onClick:()=>p(String(v.value)),children:v.name},String(v.value),!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2831,columnNumber:9},this)),s?h.jsxDEV("div",{className:"settings-freeform",children:[h.jsxDEV("input",{className:"settings-input",type:"number",inputMode:"numeric",min:typeof r.min=="number"?r.min:void 0,step:typeof r.step=="number"?r.step:1024,placeholder:`任意 ${f}`,"aria-label":`${e.name||e.id} value`,value:a,onChange:v=>l(v.target.value),onKeyDown:v=>{v.key==="Enter"&&a.trim()&&p(a.trim())}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2841,columnNumber:11},this),h.jsxDEV("button",{className:"settings-opt",disabled:!a.trim(),onClick:()=>p(a.trim()),children:"set"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2853,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2840,columnNumber:9},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2828,columnNumber:5},this)}function pH({v:e,prefs:t,setPrefs:r,onClose:s,panelRef:a}){var x,N;const l=e.info,c=((x=l.modes)==null?void 0:x.availableModes)??[],f=lg(l.configOptions,"effort"),p=lg(l.configOptions,"model"),v=R.useSyncExternalStore(kr.subscribeVoices,()=>kr.voices().length)?kr.voices():[],y=pa();return h.jsxDEV("div",{className:"settings-pop",role:"dialog","aria-label":"chat settings",ref:a,children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{children:"chat settings"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2881,columnNumber:9},this),h.jsxDEV("span",{className:"head-spacer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2882,columnNumber:9},this),h.jsxDEV("button",{className:"icon-btn",title:"close","aria-label":"close",onClick:s,children:h.jsxDEV(va,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2883,columnNumber:89},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2883,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2880,columnNumber:7},this),c.length>0&&h.jsxDEV("div",{className:"settings-group",children:[h.jsxDEV("div",{className:"settings-label",children:[h.jsxDEV(uF,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2887,columnNumber:43},this)," permission mode"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2887,columnNumber:11},this),c.map(_=>{var k;return h.jsxDEV("button",{className:`settings-opt ${((k=l.modes)==null?void 0:k.currentModeId)===_.id?"sel":""}`,onClick:()=>Qe.send({t:"set-mode",sessionId:l.id,modeId:_.id}),children:_.name},_.id,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2889,columnNumber:13},this)})]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2886,columnNumber:9},this),(N=f==null?void 0:f.options)!=null&&N.length?h.jsxDEV("div",{className:"settings-group",children:[h.jsxDEV("div",{className:"settings-label",children:[h.jsxDEV(wF,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2905,columnNumber:43},this)," thinking depth"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2905,columnNumber:11},this),f.options.map((_,k)=>h.jsxDEV("button",{className:`settings-opt ${String(f.currentValue??"")===String(_.value)?"sel":""}`,onClick:()=>Qe.send({t:"set-config",sessionId:l.id,configId:f.id,value:String(_.value)}),children:[h.jsxDEV("i",{className:"settings-dot",style:{"--effort":Ru[Math.min(k,Ru.length-1)]}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2912,columnNumber:15},this),_.name]},String(_.value),!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2907,columnNumber:13},this)),h.jsxDEV("div",{className:"settings-note",children:"只列这个路由真支持的档;改的是本会话。"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2916,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2904,columnNumber:9},this):null,l.configOptions.filter(_=>_.type==="select"&&_.options&&_!==f&&_!==p&&!zA(_)).map(_=>h.jsxDEV(fH,{o:_,sessionId:l.id},_.id,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2925,columnNumber:11},this)),h.jsxDEV("div",{className:"settings-group",children:[h.jsxDEV("div",{className:"settings-label",children:[h.jsxDEV(pg,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2928,columnNumber:41},this)," read replies aloud"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2928,columnNumber:9},this),h.jsxDEV("label",{className:"settings-toggle",children:[h.jsxDEV("input",{type:"checkbox",checked:t.autoRead,onChange:_=>r({autoRead:_.target.checked})},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2930,columnNumber:11},this),h.jsxDEV("span",{children:"speak every finished reply"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2935,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2929,columnNumber:9},this),v.length>0&&h.jsxDEV("select",{className:"settings-select",value:t.voiceURI,onChange:_=>r({voiceURI:_.target.value}),"aria-label":"voice",children:[h.jsxDEV("option",{value:"",children:["auto voice (",t.lang,")"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2944,columnNumber:13},this),v.map(_=>h.jsxDEV("option",{value:_.voiceURI,children:[_.name," — ",_.lang]},_.voiceURI,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2946,columnNumber:15},this))]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2938,columnNumber:11},this),v.length===0?h.jsxDEV("div",{className:"settings-note",children:"this browser exposes no voices"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2950,columnNumber:32},this):null,h.jsxDEV("label",{className:"settings-range",children:[h.jsxDEV("span",{children:["speed ",t.rate.toFixed(2),"×"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2952,columnNumber:11},this),h.jsxDEV("input",{type:"range",min:.5,max:2,step:.05,value:t.rate,onChange:_=>r({rate:Number(_.target.value)})},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2953,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2951,columnNumber:9},this),y.tts.server?h.jsxDEV("label",{className:"settings-toggle",children:[h.jsxDEV("input",{type:"checkbox",checked:t.serverTts,onChange:_=>r({serverTts:_.target.checked})},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2961,columnNumber:13},this),h.jsxDEV("span",{children:["use the server voice (",y.tts.model??"configured",")"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2966,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2960,columnNumber:11},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2927,columnNumber:7},this),h.jsxDEV("div",{className:"settings-group",children:[h.jsxDEV("div",{className:"settings-label",children:[h.jsxDEV(Jd,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2971,columnNumber:41},this)," dictation"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2971,columnNumber:9},this),h.jsxDEV("select",{className:"settings-select",value:t.stt,onChange:_=>r({stt:_.target.value}),"aria-label":"dictation engine",children:[h.jsxDEV("option",{value:"auto",children:"auto — 服务端流式 > 浏览器 > 批量"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2978,columnNumber:11},this),h.jsxDEV("option",{value:"stream",children:["stream",y.stt.streaming?` (${y.stt.model??"百炼"})`:" (not configured)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2979,columnNumber:11},this),h.jsxDEV("option",{value:"browser",children:["browser",Ay()?"":" (unavailable)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2980,columnNumber:11},this),h.jsxDEV("option",{value:"server",children:["server",y.stt.server?` (${y.stt.batchModel??"configured"})`:" (not configured)"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2981,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2972,columnNumber:9},this),h.jsxDEV("input",{className:"settings-input",value:t.lang,onChange:_=>r({lang:_.target.value}),placeholder:"language, e.g. zh-CN","aria-label":"speech language"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2983,columnNumber:9},this),h.jsxDEV("div",{className:"settings-note",children:["browser dictation ",Ay()?"available":"unavailable"," · ",y.provider," STT"," ",y.stt.streaming?"streaming":y.stt.server?"batch":"not configured"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2990,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2970,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:2879,columnNumber:5},this)}const Cm=new Map;function mH({v:e,call:t,onCloseCall:r}){var bt,sn,ft,Se,Le,it,Nt;const[s,a]=R.useState(()=>Cm.get(e.info.id)??""),l=window.innerWidth<720?"message… (/ for commands)":"message… (Enter send, Shift+Enter newline, / for commands)",[c,f]=R.useState(0),[p,m]=R.useState(!1),v=R.useRef(null),y=R.useRef(null),x=R.useRef(null),N=R.useRef(!1),_=R.useRef(e.info.id);R.useEffect(()=>{Cm.set(_.current,s)},[s]),R.useEffect(()=>{_.current!==e.info.id&&(Cm.set(_.current,s),_.current=e.info.id,a(Cm.get(e.info.id)??""),m(!1),f(0))},[e.info.id,s]);const[k,j]=R.useState([]),[L,P]=R.useState(null),[O,T]=R.useState(""),[B,U]=R.useState(!1),[ce,re]=R.useState(!1),[Z,ve]=R.useState(null),[pe,Q]=R.useState("");R.useEffect(()=>{const V=ge.current;V&&(V.style.height="42px",V.style.height=`${Math.min(V.scrollHeight,window.innerHeight*.4)}px`)},[s]);const[C,J]=R.useState(!1),[Y,z]=R.useState(null),[X,$]=R.useState({});R.useEffect(()=>{$({}),z(null)},[e.info.id]);const[xe,Me]=Tu(),Pe=BR(),ze=FN(),ge=R.useRef(null),ye=R.useRef(null),mt=async V=>{const be=Array.from(V);if(!be.length)return;const De=await Promise.all(be.map(le=>oH(le))),gt=[],Wt=[];for(const le of De)"error"in le?Wt.push(le.error):gt.push(le);gt.length&&j(le=>[...le,...gt]),T(Wt.join(" · "))},pt=()=>{const V=s.trim();if(!V&&!k.length)return;const be=k.map(De=>De.kind==="image"?{kind:"image",mimeType:De.mimeType,data:De.payload,name:De.name}:{kind:"text",name:De.name,text:De.payload});if(e.busy||e.info.status!=="ready"){if(!V&&!be.length)return;Qe.enqueuePrompt(e.info.id,V,be)}else Qe.send({t:"prompt",sessionId:e.info.id,text:V,attachments:be});a(""),j([]),T(""),f(0),xN.current()};R.useEffect(()=>{var be;if(t||Pe.status!=="idle"||!Pe.text)return;const V=Dn.consume();V&&(a(De=>De.trim()?`${De.trim()} ${V}`:V),(be=ge.current)==null||be.focus())},[Pe.status,Pe.text,t]);const Ut=/^\/\S*$/.test(s)?s.slice(1).toLowerCase():null,Ht=Ut===null?[]:e.info.commands.filter(V=>V.name.toLowerCase().includes(Ut)).slice(0,8),Tt=Ut!==null&&e.info.status==="ready"&&!p;Fd(Tt,[v],()=>m(!0)),Fd(ce||Z!==null,[y,x],()=>{ve(null),re(!1)}),R.useEffect(()=>{ve(null),re(!1),m(!1)},[e.info.id]);const Xt=V=>{var be;a(`/${V} `),f(0),(be=ge.current)==null||be.focus()},Et=Pe.status==="listening"||Pe.status==="recording"||Pe.status==="requesting",kt=lg(e.info.configOptions,"effort"),$e=lg(e.info.configOptions,"model"),nt=((bt=e.info.models)==null?void 0:bt.availableModels)??[],yt=((sn=e.info.models)==null?void 0:sn.currentModelId)??"",vt=((ft=nt.find(V=>V.modelId===yt))==null?void 0:ft.name)??((Le=(Se=$e==null?void 0:$e.options)==null?void 0:Se.find(V=>String(V.value)===String($e.currentValue??"")))==null?void 0:Le.name)??yt,un=DD(vt,yt),Ye=((Nt=(it=kt==null?void 0:kt.options)==null?void 0:it.find(V=>String(V.value)===String(kt.currentValue??"")))==null?void 0:Nt.name)??"",ee=kt?cH(String(kt.currentValue??""),kt.options??[]):null,[je,ke]=R.useState({}),dt=R.useMemo(()=>{const V=pe.trim().toLowerCase(),be=V?nt.filter(le=>`${le.modelId} ${le.name} ${le.description??""}`.toLowerCase().includes(V)):nt,De=new Map;for(const le of be){const G=RD(le),Ee=De.get(G);Ee?Ee.push(le):De.set(G,[le])}const gt=nt.find(le=>le.modelId===yt),Wt=gt?RD(gt):"";return[...De.entries()].map(([le,G])=>({provider:le,list:G.slice(0,200),truncated:G.length>200,current:le===Wt})).sort((le,G)=>le.current===G.current?le.provider.localeCompare(G.provider):le.current?-1:1)},[nt,pe,yt]);return h.jsxDEV("div",{className:`composer ${B?"drop-active":""}`,onDragOver:V=>{V.preventDefault(),U(!0)},onDragLeave:()=>U(!1),onDrop:V=>{var be,De;V.preventDefault(),U(!1),(De=(be=V.dataTransfer)==null?void 0:be.files)!=null&&De.length&&mt(V.dataTransfer.files)},children:[h.jsxDEV(YU,{v:e},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3208,columnNumber:7},this),h.jsxDEV(dH,{v:e},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3209,columnNumber:7},this),h.jsxDEV("div",{className:"composer-inner",ref:v,children:[Tt&&h.jsxDEV("div",{className:"slash-palette",role:"listbox","aria-label":"slash commands",children:Ht.length?Ht.map((V,be)=>h.jsxDEV("div",{role:"option","aria-selected":be===c,className:`slash-item ${be===c?"sel":""}`,onMouseEnter:()=>f(be),onClick:()=>Xt(V.name),children:[h.jsxDEV("span",{className:"cmd",children:["/",V.name]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3223,columnNumber:19},this),V.description?h.jsxDEV("span",{className:"desc",children:V.description},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3224,columnNumber:36},this):null,h.jsxDEV("span",{className:"src",title:"advertised by the agent over ACP",children:"agent"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3225,columnNumber:19},this)]},V.name,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3215,columnNumber:17},this)):h.jsxDEV("div",{className:"slash-item empty",children:e.info.commands.length?`no command matches “/${Ut}”`:"this agent advertises no slash commands"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3229,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3212,columnNumber:11},this),ce&&h.jsxDEV(pH,{v:e,prefs:xe,setPrefs:Me,onClose:()=>re(!1),panelRef:y},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3238,columnNumber:11},this),k.length>0&&h.jsxDEV("div",{className:"draft-row",children:[k.map(V=>h.jsxDEV("span",{className:`draft ${V.kind}`,title:`${V.name} · ${lH(V.bytes)}`,children:[V.preview?h.jsxDEV("img",{src:V.preview,alt:V.name},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3244,columnNumber:30},this):h.jsxDEV(Ql,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3244,columnNumber:69},this),h.jsxDEV("span",{className:"draft-name",children:V.name},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3245,columnNumber:17},this),h.jsxDEV("button",{className:"draft-x","aria-label":`remove ${V.name}`,onClick:()=>j(be=>be.filter(De=>De.id!==V.id)),children:h.jsxDEV(va,{size:11},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3251,columnNumber:19},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3246,columnNumber:17},this)]},V.id,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3243,columnNumber:15},this)),h.jsxDEV("button",{className:"draft-clear",onClick:()=>j([]),children:"clear"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3255,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3241,columnNumber:11},this),O&&h.jsxDEV("div",{className:"composer-note err",children:O},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3258,columnNumber:23},this),e.queue.length>0&&h.jsxDEV("div",{className:"queue-list","aria-label":"queued messages",children:[h.jsxDEV("div",{className:"queue-head",children:[h.jsxDEV("span",{className:"queue-title",children:["Queued · ",e.queue.length]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3265,columnNumber:15},this),h.jsxDEV("span",{className:"queue-hint",children:e.queue.some(V=>V.inflight)?"sending…":"goes out when this turn ends"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3266,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3264,columnNumber:13},this),e.queue.map((V,be)=>h.jsxDEV("div",{className:`queue-row${V.inflight?" inflight":""}`,"data-queue-id":V.id,children:[h.jsxDEV("span",{className:"queue-idx","aria-hidden":"true",children:be+1},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3272,columnNumber:17},this),(L==null?void 0:L.id)===V.id?h.jsxDEV("textarea",{className:"queue-edit",rows:1,autoFocus:!0,value:L.text,"aria-label":"edit the queued message",onChange:De=>P({id:V.id,text:De.target.value}),onKeyDown:De=>{if(De.key==="Escape"){De.preventDefault(),P(null);return}De.key==="Enter"&&!De.shiftKey&&(De.preventDefault(),Qe.editQueued(e.info.id,V.id,L.text),P(null))},onBlur:()=>{Qe.editQueued(e.info.id,V.id,L.text),P(null)}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3274,columnNumber:19},this):h.jsxDEV("span",{className:"queue-text",title:V.text,children:V.text},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3297,columnNumber:19},this),h.jsxDEV("span",{className:"queue-actions",children:[h.jsxDEV("button",{className:"queue-btn",title:"send now — stops the running turn and takes the floor","aria-label":"send this one now",onClick:()=>Qe.sendQueuedNow(e.info.id,V.id),children:h.jsxDEV(aR,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3306,columnNumber:21},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3300,columnNumber:19},this),h.jsxDEV("button",{className:"queue-btn",title:"edit this message","aria-label":"edit this queued message",onClick:()=>P((L==null?void 0:L.id)===V.id?null:{id:V.id,text:V.text}),children:h.jsxDEV(tR,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3314,columnNumber:21},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3308,columnNumber:19},this),h.jsxDEV("button",{className:"queue-btn danger",title:"drop it — it will not be sent","aria-label":"drop this queued message",onClick:()=>Qe.dropQueued(e.info.id,V.id),children:h.jsxDEV(va,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3322,columnNumber:21},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3316,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3299,columnNumber:17},this)]},V.id,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3271,columnNumber:15},this))]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3263,columnNumber:11},this),ze.note?h.jsxDEV("div",{className:"composer-note",children:ze.note},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3332,columnNumber:24},this):null,ze.error?h.jsxDEV("div",{className:"composer-note err",children:ze.error},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3333,columnNumber:25},this):null,Et||Pe.status==="transcribing"||Pe.error?h.jsxDEV("div",{className:`dict-chip ${Pe.error?"err":""}`,children:[h.jsxDEV(Jd,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3336,columnNumber:13},this),Pe.error?Pe.error:Pe.status==="requesting"?"waiting for the microphone…":Pe.status==="transcribing"?"transcribing…":h.jsxDEV(h.Fragment,{children:[Pe.text," ",h.jsxDEV("span",{className:"interim",children:Pe.interim},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3345,columnNumber:35},this),Pe.engine==="stream"?" · 流式":"",Pe.engine==="server"?` · ${Pe.seconds}s`:""]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3344,columnNumber:21},this),Et?h.jsxDEV("button",{className:"dict-stop",onClick:()=>Dn.stop(),children:"stop"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3351,columnNumber:15},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3335,columnNumber:11},this):null,h.jsxDEV("div",{className:"composer-box",children:[h.jsxDEV("textarea",{ref:ge,rows:1,value:s,onFocus:()=>m(!1),placeholder:e.info.status==="ready"?l:e.info.status,onChange:V=>{a(V.target.value),m(!1),f(0)},onCompositionStart:()=>{N.current=!0},onCompositionEnd:()=>{N.current=!1},onKeyDown:V=>{if(!(N.current||V.nativeEvent.isComposing)){if(Tt&&Ht.length){if(V.key==="ArrowDown"){V.preventDefault(),f(be=>(be+1)%Ht.length);return}if(V.key==="ArrowUp"){V.preventDefault(),f(be=>(be-1+Ht.length)%Ht.length);return}if(V.key==="Tab"||V.key==="Enter"&&!V.shiftKey){V.preventDefault(),Xt(Ht[c].name);return}if(V.key==="Escape"){V.preventDefault(),a("");return}}V.key==="Enter"&&!V.shiftKey&&(V.preventDefault(),pt())}}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3356,columnNumber:11},this),h.jsxDEV("div",{className:"composer-bar",ref:x,children:[h.jsxDEV("input",{ref:ye,type:"file",multiple:!0,hidden:!0,accept:`${FA.join(",")},.txt,.md,.json,.log,.csv,.ts,.tsx,.js,.jsx,.py,.rb,.go,.rs,.java,.c,.cpp,.h,.sh,.yaml,.yml,.toml,.ini,.html,.css`,onChange:V=>{V.target.files&&mt(V.target.files),V.target.value=""}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3387,columnNumber:13},this),h.jsxDEV("button",{className:"icon-btn",title:"attach an image or a text file","aria-label":"attach",onClick:()=>{var V;return(V=ye.current)==null?void 0:V.click()},children:h.jsxDEV(Ny,{size:16},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3404,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3398,columnNumber:13},this),kt&&ee?h.jsxDEV("div",{className:"tb-wrap",style:{"--effort":ee.color},children:[h.jsxDEV("button",{type:"button",className:`tb-btn tb-effort ${Z==="effort"?"on":""}`,style:{color:ee.level?ee.color:void 0},title:`thinking depth — ${Ye||"agent default"}`,"aria-label":`thinking depth: ${Ye||"agent default"}`,"aria-expanded":Z==="effort","data-testid":"tb-effort",onClick:()=>{re(!1),ve(V=>V==="effort"?null:"effort")},children:[h.jsxDEV(uH,{level:ee.level,total:ee.total,color:ee.color},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3420,columnNumber:19},this),h.jsxDEV(BN,{size:11,className:"tb-chev"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3421,columnNumber:19},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3410,columnNumber:17},this),Z==="effort"?h.jsxDEV(AD,{items:(kt.options??[]).map((V,be)=>({value:String(V.value),name:V.name,hint:null,color:Ru[Math.min(be,Ru.length-1)]})),current:String(kt.currentValue??""),empty:"the agent advertises no levels",onPick:V=>{Qe.send({t:"set-config",sessionId:e.info.id,configId:kt.id,value:V}),ve(null)}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3424,columnNumber:19},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3409,columnNumber:15},this):null,h.jsxDEV("button",{className:`icon-btn ${ce?"on":""}`,title:"chat settings — permission mode, voice","aria-label":"chat settings","aria-expanded":ce,onClick:()=>{ve(null),re(V=>!V)},children:h.jsxDEV(rf,{size:16},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3448,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3441,columnNumber:13},this),nt.length>0||$e?h.jsxDEV(hH,{label:"model",title:`model — currently ${un||"unknown"}`,icon:h.jsxDEV(hR,{size:15},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3454,columnNumber:23},this),value:C?`${un} …`:un,testId:"tb-model",open:Z==="model",onToggle:()=>{re(!1),ve(V=>V==="model"?null:"model")},children:nt.length>0?h.jsxDEV("div",{className:"tb-list wide",children:[Y?h.jsxDEV("div",{className:"tb-err",role:"alert","data-model-err":Y.id,children:[h.jsxDEV("span",{className:"tb-err-id",children:Y.id},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3466,columnNumber:25},this),h.jsxDEV("span",{className:"tb-err-text",children:Y.text},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3467,columnNumber:25},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3465,columnNumber:23},this):null,nt.length>12?h.jsxDEV("input",{className:"tb-search",autoFocus:!0,value:pe,placeholder:`filter ${nt.length} models…`,"aria-label":"filter models",onChange:V=>Q(V.target.value)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3471,columnNumber:23},this):null,dt.map(V=>{const be=!!pe.trim()||!je[V.provider];return h.jsxDEV("div",{className:"tb-group",children:[h.jsxDEV("button",{type:"button",className:`tb-group-head ${be?"open":""}`,"aria-expanded":be,title:`${V.provider} · ${V.list.length} model(s)`,"data-provider":V.provider,onClick:()=>ke(De=>({...De,[V.provider]:!De[V.provider]})),children:[h.jsxDEV(os,{size:11,className:`tb-group-chev ${be?"open":""}`},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3492,columnNumber:29},this),h.jsxDEV("span",{className:"tb-group-name",children:V.provider},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3493,columnNumber:29},this),h.jsxDEV("span",{className:"tb-group-count",children:V.list.length},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3494,columnNumber:29},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3484,columnNumber:27},this),be?h.jsxDEV("div",{className:"tb-group-body",children:[V.list.map(De=>h.jsxDEV("button",{className:`tb-opt ${De.modelId===yt?"sel":""} ${(Y==null?void 0:Y.id)===De.modelId||X[De.modelId]?"bad":""}`,title:X[De.modelId]?`${De.modelId} — this agent refused it: ${X[De.modelId]}`:De.description?`${De.modelId} — ${De.description}`:De.modelId,"data-model":De.modelId,"data-model-refused":X[De.modelId]?"1":void 0,onClick:()=>{if(De.modelId===yt){ve(null),Q("");return}J(!0),z(null),Qe.setModel(e.info.id,De.modelId).then(()=>{ve(null),Q(""),z(null),T("")}).catch(gt=>{const Wt=String((gt==null?void 0:gt.message)??gt);z({id:De.modelId,text:Wt}),$(le=>({...le,[De.modelId]:Wt})),T(`model switch failed: ${Wt}`)}).finally(()=>J(!1))},children:h.jsxDEV("span",{className:"tb-opt-name",children:DD(De.name,De.modelId)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3524,columnNumber:35},this)},De.modelId,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3499,columnNumber:33},this)),V.truncated?h.jsxDEV("div",{className:"tb-empty",children:"first 200 of this provider — filter to narrow"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3527,columnNumber:46},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3497,columnNumber:29},this):null]},V.provider,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3483,columnNumber:25},this)}),dt.length?null:h.jsxDEV("div",{className:"tb-empty",children:["no model matches “",pe,"”"]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3533,columnNumber:44},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3461,columnNumber:19},this):h.jsxDEV(AD,{items:(($e==null?void 0:$e.options)??[]).map(V=>({value:String(V.value),name:V.name})),current:String(($e==null?void 0:$e.currentValue)??""),empty:"the agent lists no models",onPick:V=>{$e&&Qe.send({t:"set-config",sessionId:e.info.id,configId:$e.id,value:V}),ve(null)}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3536,columnNumber:19},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3451,columnNumber:15},this):null,h.jsxDEV("span",{className:"head-spacer"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3548,columnNumber:13},this),ze.speaking?h.jsxDEV("button",{className:"icon-btn on",title:"stop reading aloud","aria-label":"stop reading",onClick:()=>kr.stop(),children:h.jsxDEV(_F,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3551,columnNumber:17},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3550,columnNumber:15},this):null,h.jsxDEV("button",{className:`icon-btn ${Et?"on rec":""}`,title:Pe.error?Pe.error:Et?"stop dictation":"dictate a prompt","aria-label":"dictate",onClick:()=>{Dn.cancel(),Dn.start(xe,e.info.id)},children:h.jsxDEV(Jd,{size:16},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3564,columnNumber:15},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3554,columnNumber:13},this),t?h.jsxDEV(tz,{sessionId:e.info.id,onClose:r,onKeyboard:()=>{r(),window.setTimeout(()=>{var V;return(V=ge.current)==null?void 0:V.focus()},30)}},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3567,columnNumber:15},this):null,e.busy?h.jsxDEV("button",{className:"send-btn stop",title:"stop this turn","aria-label":"stop this turn",onClick:()=>Qe.send({t:"cancel",sessionId:e.info.id}),children:h.jsxDEV(sR,{size:14},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3580,columnNumber:17},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3574,columnNumber:15},this):h.jsxDEV("button",{className:"send-btn",onClick:pt,disabled:!s.trim()&&!k.length||e.info.status!=="ready",title:"send (Enter)","aria-label":"send",children:h.jsxDEV(hF,{size:16},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3590,columnNumber:17},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3583,columnNumber:15},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3386,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3355,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3210,columnNumber:7},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3198,columnNumber:5},this)}function gH({cwd:e,onClose:t}){Au(!0,t);const[r,s]=R.useState(""),[a,l]=R.useState(e??""),c=e??"",[f,p]=R.useState(""),[m,v]=R.useState(!1),[y,x]=R.useState(""),[N,_]=R.useState(!0),[k,j]=R.useState([]),L=()=>{_(!0),x(""),Qe.loadBackends().then(O=>{j(O);const T=O[0];s(B=>B||(T==null?void 0:T.id)||"")}).catch(O=>x(`后端列表拉取失败:${String(O.message??O)}`)).finally(()=>_(!1))};R.useEffect(L,[]);const P=async()=>{v(!0),x("");try{const O=await Qe.createSession(r,a.trim(),f.trim());Qe.setActive(O),t()}catch(O){x(String(O.message??O))}finally{v(!1)}};return h.jsxDEV("div",{className:"modal-bg",onClick:t,children:h.jsxDEV("div",{className:"modal",onClick:O=>O.stopPropagation(),children:[h.jsxDEV("h3",{children:"New session"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3648,columnNumber:9},this),h.jsxDEV("label",{children:"backend"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3649,columnNumber:9},this),h.jsxDEV("div",{className:"backend-pick",children:[N&&h.jsxDEV("span",{className:"dim",children:"loading…"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3651,columnNumber:23},this),!N&&!k.length&&h.jsxDEV("span",{className:"dim",children:"no backends"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3652,columnNumber:44},this),k.map(O=>h.jsxDEV("button",{title:O.home?`home: ${O.home}`:void 0,className:r===O.id?"sel":"",onClick:()=>s(O.id),children:O.label},O.id,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3654,columnNumber:13},this)),h.jsxDEV("button",{className:"retry",title:"reload backend list",onClick:L,children:"⟳"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3663,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3650,columnNumber:9},this),(()=>{var T;const O=k.find(B=>B.id===r);return O?h.jsxDEV("div",{className:"hint be-hint",children:[h.jsxDEV("div",{children:["runs: ",h.jsxDEV("code",{children:[O.cmd," ",(O.args??[]).join(" ")]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3673,columnNumber:23},this),O.profile?h.jsxDEV(h.Fragment,{children:[" · profile ",h.jsxDEV("code",{children:O.profile},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3674,columnNumber:45},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3674,columnNumber:32},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3672,columnNumber:15},this),O.home?h.jsxDEV("div",{children:["home: ",h.jsxDEV("code",{children:O.home},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3678,columnNumber:25},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3677,columnNumber:17},this):null,(O.env??[]).length?h.jsxDEV("div",{children:["env: ",h.jsxDEV("code",{children:(O.env??[]).join(", ")},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3681,columnNumber:51},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3681,columnNumber:41},this):null,(T=O.health)!=null&&T.at?h.jsxDEV("div",{className:O.health.status==="online"?"be-dim":"err",children:["上次检查:",O.health.status,O.health.kind?` · ${O.health.kind}`:"",O.health.errorCode?` · ${O.health.errorCode}`:"",O.health.status!=="online"&&O.health.guidance?h.jsxDEV("div",{className:"be-guidance",children:O.health.guidance},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3687,columnNumber:76},this):null]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3683,columnNumber:17},this):null,(O.warnings??[]).map((B,U)=>h.jsxDEV("div",{className:"hint-warn",children:B},U,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3690,columnNumber:51},this))]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3671,columnNumber:13},this):null})(),h.jsxDEV("label",{children:"working directory"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3694,columnNumber:9},this),c?h.jsxDEV("div",{className:"ns-fixed-dir",title:c,children:[h.jsxDEV(Zl,{size:13},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3697,columnNumber:13},this),h.jsxDEV("code",{children:c},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3698,columnNumber:13},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3696,columnNumber:11},this):h.jsxDEV(WN,{value:a,onChange:l},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3701,columnNumber:11},this),h.jsxDEV("label",{children:"title (optional)"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3703,columnNumber:9},this),h.jsxDEV("input",{value:f,onChange:O=>p(O.target.value),placeholder:"e.g. fix flaky tests"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3704,columnNumber:9},this),y&&h.jsxDEV("div",{className:"err",children:y},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3705,columnNumber:17},this),h.jsxDEV("div",{className:"row",children:[h.jsxDEV("button",{className:"cancel",onClick:t,children:"cancel"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3707,columnNumber:11},this),h.jsxDEV("button",{className:"go",disabled:m||!a.trim(),onClick:P,children:m?"spawning…":"launch"},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3708,columnNumber:11},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3706,columnNumber:9},this)]},void 0,!0,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3647,columnNumber:7},this)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/App.tsx",lineNumber:3646,columnNumber:5},this)}WF();window.__cockpit=Qe;window.__voice={dictation:Dn,loadVoiceCaps:Qm,resampleToPcm16:LR,voiceCaps:pa};window.__renderMarkdown=LN;FD(document.getElementById("root")).render(h.jsxDEV(rV.StrictMode,{children:h.jsxDEV(DU,{},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/main.tsx",lineNumber:25,columnNumber:5},void 0)},void 0,!1,{fileName:"/private/tmp/agentus-npm-0.3.0/packages/web/src/main.tsx",lineNumber:24,columnNumber:3},void 0));
|