@aiwg/cockpit 2026.8.2 → 2026.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
var iE=Object.defineProperty;var sE=(N,R,X)=>R in N?iE(N,R,{enumerable:!0,configurable:!0,writable:!0,value:X}):N[R]=X;var Wt=(N,R,X)=>sE(N,typeof R!="symbol"?R+"":R,X);(function(){const R=document.createElement("link").relList;if(R&&R.supports&&R.supports("modulepreload"))return;for(const K of document.querySelectorAll('link[rel="modulepreload"]'))H(K);new MutationObserver(K=>{for(const ie of K)if(ie.type==="childList")for(const I of ie.addedNodes)I.tagName==="LINK"&&I.rel==="modulepreload"&&H(I)}).observe(document,{childList:!0,subtree:!0});function X(K){const ie={};return K.integrity&&(ie.integrity=K.integrity),K.referrerPolicy&&(ie.referrerPolicy=K.referrerPolicy),K.crossOrigin==="use-credentials"?ie.credentials="include":K.crossOrigin==="anonymous"?ie.credentials="omit":ie.credentials="same-origin",ie}function H(K){if(K.ep)return;K.ep=!0;const ie=X(K);fetch(K.href,ie)}})();var Om={exports:{}},Pu={},Lm={exports:{}},Bl={exports:{}};Bl.exports;var Mw;function nE(){return Mw||(Mw=1,(function(N,R){/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.development.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/(function(){function X(O,J){Object.defineProperty(ie.prototype,O,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",J[0],J[1])}})}function H(O){return O===null||typeof O!="object"?null:(O=ye&&O[ye]||O["@@iterator"],typeof O=="function"?O:null)}function K(O,J){O=(O=O.constructor)&&(O.displayName||O.name)||"ReactClass";var we=O+"."+J;be[we]||(console.error("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.",J,O),be[we]=!0)}function ie(O,J,we){this.props=O,this.context=J,this.refs=Le,this.updater=we||Ue}function I(){}function l(O,J,we){this.props=O,this.context=J,this.refs=Le,this.updater=we||Ue}function p(){}function _(O){return""+O}function S(O){try{_(O);var J=!1}catch{J=!0}if(J){J=console;var we=J.error,Se=typeof Symbol=="function"&&Symbol.toStringTag&&O[Symbol.toStringTag]||O.constructor.name||"Object";return we.call(J,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Se),_(O)}}function f(O){if(O==null)return null;if(typeof O=="function")return O.$$typeof===zi?null:O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case L:return"Fragment";case ue:return"Profiler";case q:return"StrictMode";case F:return"Suspense";case V:return"SuspenseList";case ae:return"Activity"}if(typeof O=="object")switch(typeof O.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),O.$$typeof){case U:return"Portal";case ve:return O.displayName||"Context";case pe:return(O._context.displayName||"Context")+".Consumer";case Ce:var J=O.render;return O=O.displayName,O||(O=J.displayName||J.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case me:return J=O.displayName||null,J!==null?J:f(O.type)||"Memo";case oe:J=O._payload,O=O._init;try{return f(O(J))}catch{}}return null}function m(O){if(O===L)return"<>";if(typeof O=="object"&&O!==null&&O.$$typeof===oe)return"<...>";try{var J=f(O);return J?"<"+J+">":"<...>"}catch{return"<...>"}}function w(){var O=De.A;return O===null?null:O.getOwner()}function C(){return Error("react-stack-top-frame")}function g(O){if(Nt.call(O,"key")){var J=Object.getOwnPropertyDescriptor(O,"key").get;if(J&&J.isReactWarning)return!1}return O.key!==void 0}function u(O,J){function we(){Be||(Be=!0,console.error("%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://react.dev/link/special-props)",J))}we.isReactWarning=!0,Object.defineProperty(O,"key",{get:we,configurable:!0})}function h(){var O=f(this.type);return ze[O]||(ze[O]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),O=this.props.ref,O!==void 0?O:null}function o(O,J,we,Se,Re,$e){var Ae=we.ref;return O={$$typeof:B,type:O,key:J,props:we,_owner:Se},(Ae!==void 0?Ae:null)!==null?Object.defineProperty(O,"ref",{enumerable:!1,get:h}):Object.defineProperty(O,"ref",{enumerable:!1,value:null}),O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(O,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(O,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Re}),Object.defineProperty(O,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:$e}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O}function a(O,J){return J=o(O.type,J,O.props,O._owner,O._debugStack,O._debugTask),O._store&&(J._store.validated=O._store.validated),J}function v(O){E(O)?O._store&&(O._store.validated=1):typeof O=="object"&&O!==null&&O.$$typeof===oe&&(O._payload.status==="fulfilled"?E(O._payload.value)&&O._payload.value._store&&(O._payload.value._store.validated=1):O._store&&(O._store.validated=1))}function E(O){return typeof O=="object"&&O!==null&&O.$$typeof===B}function x(O){var J={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(we){return J[we]})}function k(O,J){return typeof O=="object"&&O!==null&&O.key!=null?(S(O.key),x(""+O.key)):J.toString(36)}function y(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(p,p):(O.status="pending",O.then(function(J){O.status==="pending"&&(O.status="fulfilled",O.value=J)},function(J){O.status==="pending"&&(O.status="rejected",O.reason=J)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function T(O,J,we,Se,Re){var $e=typeof O;($e==="undefined"||$e==="boolean")&&(O=null);var Ae=!1;if(O===null)Ae=!0;else switch($e){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(O.$$typeof){case B:case U:Ae=!0;break;case oe:return Ae=O._init,T(Ae(O._payload),J,we,Se,Re)}}if(Ae){Ae=O,Re=Re(Ae);var at=Se===""?"."+k(Ae,0):Se;return jt(Re)?(we="",at!=null&&(we=at.replace(bt,"$&/")+"/"),T(Re,J,we,"",function(hi){return hi})):Re!=null&&(E(Re)&&(Re.key!=null&&(Ae&&Ae.key===Re.key||S(Re.key)),we=a(Re,we+(Re.key==null||Ae&&Ae.key===Re.key?"":(""+Re.key).replace(bt,"$&/")+"/")+at),Se!==""&&Ae!=null&&E(Ae)&&Ae.key==null&&Ae._store&&!Ae._store.validated&&(we._store.validated=2),Re=we),J.push(Re)),1}if(Ae=0,at=Se===""?".":Se+":",jt(O))for(var qe=0;qe<O.length;qe++)Se=O[qe],$e=at+k(Se,qe),Ae+=T(Se,J,we,$e,Re);else if(qe=H(O),typeof qe=="function")for(qe===O.entries&&(ct||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ct=!0),O=qe.call(O),qe=0;!(Se=O.next()).done;)Se=Se.value,$e=at+k(Se,qe++),Ae+=T(Se,J,we,$e,Re);else if($e==="object"){if(typeof O.then=="function")return T(y(O),J,we,Se,Re);throw J=String(O),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Ae}function M(O,J,we){if(O==null)return O;var Se=[],Re=0;return T(O,Se,"","",function($e){return J.call(we,$e,Re++)}),Se}function j(O){if(O._status===-1){var J=O._ioInfo;J!=null&&(J.start=J.end=performance.now()),J=O._result;var we=J();if(we.then(function(Re){if(O._status===0||O._status===-1){O._status=1,O._result=Re;var $e=O._ioInfo;$e!=null&&($e.end=performance.now()),we.status===void 0&&(we.status="fulfilled",we.value=Re)}},function(Re){if(O._status===0||O._status===-1){O._status=2,O._result=Re;var $e=O._ioInfo;$e!=null&&($e.end=performance.now()),we.status===void 0&&(we.status="rejected",we.reason=Re)}}),J=O._ioInfo,J!=null){J.value=we;var Se=we.displayName;typeof Se=="string"&&(J.name=Se)}O._status===-1&&(O._status=0,O._result=we)}if(O._status===1)return J=O._result,J===void 0&&console.error(`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?`,J),"default"in J||console.error(`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'))`,J),J.default;throw O._result}function z(){var O=De.H;return O===null&&console.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:
|
|
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://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),O}function Y(){De.asyncTransitions--}function ee(O){if(ht===null)try{var J=("require"+Math.random()).slice(0,7);ht=(N&&N[J]).call(N,"timers").setImmediate}catch{ht=function(Se){Mt===!1&&(Mt=!0,typeof MessageChannel>"u"&&console.error("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 Re=new MessageChannel;Re.port1.onmessage=Se,Re.port2.postMessage(void 0)}}return ht(O)}function ne(O){return 1<O.length&&typeof AggregateError=="function"?new AggregateError(O):O[0]}function te(O,J){J!==bs-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),bs=J}function de(O,J,we){var Se=De.actQueue;if(Se!==null)if(Se.length!==0)try{ce(Se),ee(function(){return de(O,J,we)});return}catch(Re){De.thrownErrors.push(Re)}else De.actQueue=null;0<De.thrownErrors.length?(Se=ne(De.thrownErrors),De.thrownErrors.length=0,we(Se)):J(O)}function ce(O){if(!Gr){Gr=!0;var J=0;try{for(;J<O.length;J++){var we=O[J];do{De.didUsePromise=!1;var Se=we(!1);if(Se!==null){if(De.didUsePromise){O[J]=we,O.splice(0,J);return}we=Se}else break}while(!0)}O.length=0}catch(Re){O.splice(0,J+1),De.thrownErrors.push(Re)}finally{Gr=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var B=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),pe=Symbol.for("react.consumer"),ve=Symbol.for("react.context"),Ce=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),ye=Symbol.iterator,be={},Ue={isMounted:function(){return!1},enqueueForceUpdate:function(O){K(O,"forceUpdate")},enqueueReplaceState:function(O){K(O,"replaceState")},enqueueSetState:function(O){K(O,"setState")}},Ie=Object.assign,Le={};Object.freeze(Le),ie.prototype.isReactComponent={},ie.prototype.setState=function(O,J){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,J,"setState")},ie.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};var ke={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)."]};for(yn in ke)ke.hasOwnProperty(yn)&&X(yn,ke[yn]);I.prototype=ie.prototype,ke=l.prototype=new I,ke.constructor=l,Ie(ke,ie.prototype),ke.isPureReactComponent=!0;var jt=Array.isArray,zi=Symbol.for("react.client.reference"),De={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Nt=Object.prototype.hasOwnProperty,ge=console.createTask?console.createTask:function(){return null};ke={react_stack_bottom_frame:function(O){return O()}};var Be,Ze,ze={},We=ke.react_stack_bottom_frame.bind(ke,C)(),ut=ge(m(C)),ct=!1,bt=/\/+/g,wt=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},Mt=!1,ht=null,bs=0,cr=!1,Gr=!1,Qr=typeof queueMicrotask=="function"?function(O){queueMicrotask(function(){return queueMicrotask(O)})}:ee;ke=Object.freeze({__proto__:null,c:function(O){return z().useMemoCache(O)}});var yn={map:M,forEach:function(O,J,we){M(O,function(){J.apply(this,arguments)},we)},count:function(O){var J=0;return M(O,function(){J++}),J},toArray:function(O){return M(O,function(J){return J})||[]},only:function(O){if(!E(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};R.Activity=ae,R.Children=yn,R.Component=ie,R.Fragment=L,R.Profiler=ue,R.PureComponent=l,R.StrictMode=q,R.Suspense=F,R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=De,R.__COMPILER_RUNTIME=ke,R.act=function(O){var J=De.actQueue,we=bs;bs++;var Se=De.actQueue=J!==null?J:[],Re=!1;try{var $e=O()}catch(qe){De.thrownErrors.push(qe)}if(0<De.thrownErrors.length)throw te(J,we),O=ne(De.thrownErrors),De.thrownErrors.length=0,O;if($e!==null&&typeof $e=="object"&&typeof $e.then=="function"){var Ae=$e;return Qr(function(){Re||cr||(cr=!0,console.error("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 () => ...);"))}),{then:function(qe,hi){Re=!0,Ae.then(function(gs){if(te(J,we),we===0){try{ce(Se),ee(function(){return de(gs,qe,hi)})}catch(Kr){De.thrownErrors.push(Kr)}if(0<De.thrownErrors.length){var Al=ne(De.thrownErrors);De.thrownErrors.length=0,hi(Al)}}else qe(gs)},function(gs){te(J,we),0<De.thrownErrors.length&&(gs=ne(De.thrownErrors),De.thrownErrors.length=0),hi(gs)})}}}var at=$e;if(te(J,we),we===0&&(ce(Se),Se.length!==0&&Qr(function(){Re||cr||(cr=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),De.actQueue=null),0<De.thrownErrors.length)throw O=ne(De.thrownErrors),De.thrownErrors.length=0,O;return{then:function(qe,hi){Re=!0,we===0?(De.actQueue=Se,ee(function(){return de(at,qe,hi)})):qe(at)}}},R.cache=function(O){return function(){return O.apply(null,arguments)}},R.cacheSignal=function(){return null},R.captureOwnerStack=function(){var O=De.getCurrentStack;return O===null?null:O()},R.cloneElement=function(O,J,we){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var Se=Ie({},O.props),Re=O.key,$e=O._owner;if(J!=null){var Ae;e:{if(Nt.call(J,"ref")&&(Ae=Object.getOwnPropertyDescriptor(J,"ref").get)&&Ae.isReactWarning){Ae=!1;break e}Ae=J.ref!==void 0}Ae&&($e=w()),g(J)&&(S(J.key),Re=""+J.key);for(at in J)!Nt.call(J,at)||at==="key"||at==="__self"||at==="__source"||at==="ref"&&J.ref===void 0||(Se[at]=J[at])}var at=arguments.length-2;if(at===1)Se.children=we;else if(1<at){Ae=Array(at);for(var qe=0;qe<at;qe++)Ae[qe]=arguments[qe+2];Se.children=Ae}for(Se=o(O.type,Re,Se,$e,O._debugStack,O._debugTask),Re=2;Re<arguments.length;Re++)v(arguments[Re]);return Se},R.createContext=function(O){return O={$$typeof:ve,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:pe,_context:O},O._currentRenderer=null,O._currentRenderer2=null,O},R.createElement=function(O,J,we){for(var Se=2;Se<arguments.length;Se++)v(arguments[Se]);Se={};var Re=null;if(J!=null)for(qe in Ze||!("__self"in J)||"key"in J||(Ze=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),g(J)&&(S(J.key),Re=""+J.key),J)Nt.call(J,qe)&&qe!=="key"&&qe!=="__self"&&qe!=="__source"&&(Se[qe]=J[qe]);var $e=arguments.length-2;if($e===1)Se.children=we;else if(1<$e){for(var Ae=Array($e),at=0;at<$e;at++)Ae[at]=arguments[at+2];Object.freeze&&Object.freeze(Ae),Se.children=Ae}if(O&&O.defaultProps)for(qe in $e=O.defaultProps,$e)Se[qe]===void 0&&(Se[qe]=$e[qe]);Re&&u(Se,typeof O=="function"?O.displayName||O.name||"Unknown":O);var qe=1e4>De.recentlyCreatedOwnerStacks++;return o(O,Re,Se,w(),qe?Error("react-stack-top-frame"):We,qe?ge(m(O)):ut)},R.createRef=function(){var O={current:null};return Object.seal(O),O},R.forwardRef=function(O){O!=null&&O.$$typeof===me?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof O!="function"?console.error("forwardRef requires a render function but was given %s.",O===null?"null":typeof O):O.length!==0&&O.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",O.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),O!=null&&O.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var J={$$typeof:Ce,render:O},we;return Object.defineProperty(J,"displayName",{enumerable:!1,configurable:!0,get:function(){return we},set:function(Se){we=Se,O.name||O.displayName||(Object.defineProperty(O,"name",{value:Se}),O.displayName=Se)}}),J},R.isValidElement=E,R.lazy=function(O){O={_status:-1,_result:O};var J={$$typeof:oe,_payload:O,_init:j},we={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return O._ioInfo=we,J._debugInfo=[{awaited:we}],J},R.memo=function(O,J){O==null&&console.error("memo: The first argument must be a component. Instead received: %s",O===null?"null":typeof O),J={$$typeof:me,type:O,compare:J===void 0?null:J};var we;return Object.defineProperty(J,"displayName",{enumerable:!1,configurable:!0,get:function(){return we},set:function(Se){we=Se,O.name||O.displayName||(Object.defineProperty(O,"name",{value:Se}),O.displayName=Se)}}),J},R.startTransition=function(O){var J=De.T,we={};we._updatedFibers=new Set,De.T=we;try{var Se=O(),Re=De.S;Re!==null&&Re(we,Se),typeof Se=="object"&&Se!==null&&typeof Se.then=="function"&&(De.asyncTransitions++,Se.then(Y,Y),Se.then(p,wt))}catch($e){wt($e)}finally{J===null&&we._updatedFibers&&(O=we._updatedFibers.size,we._updatedFibers.clear(),10<O&&console.warn("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.")),J!==null&&we.types!==null&&(J.types!==null&&J.types!==we.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),J.types=we.types),De.T=J}},R.unstable_useCacheRefresh=function(){return z().useCacheRefresh()},R.use=function(O){return z().use(O)},R.useActionState=function(O,J,we){return z().useActionState(O,J,we)},R.useCallback=function(O,J){return z().useCallback(O,J)},R.useContext=function(O){var J=z();return O.$$typeof===pe&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),J.useContext(O)},R.useDebugValue=function(O,J){return z().useDebugValue(O,J)},R.useDeferredValue=function(O,J){return z().useDeferredValue(O,J)},R.useEffect=function(O,J){return O==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),z().useEffect(O,J)},R.useEffectEvent=function(O){return z().useEffectEvent(O)},R.useId=function(){return z().useId()},R.useImperativeHandle=function(O,J,we){return z().useImperativeHandle(O,J,we)},R.useInsertionEffect=function(O,J){return O==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),z().useInsertionEffect(O,J)},R.useLayoutEffect=function(O,J){return O==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),z().useLayoutEffect(O,J)},R.useMemo=function(O,J){return z().useMemo(O,J)},R.useOptimistic=function(O,J){return z().useOptimistic(O,J)},R.useReducer=function(O,J,we){return z().useReducer(O,J,we)},R.useRef=function(O){return z().useRef(O)},R.useState=function(O){return z().useState(O)},R.useSyncExternalStore=function(O,J,we){return z().useSyncExternalStore(O,J,we)},R.useTransition=function(){return z().useTransition()},R.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Bl,Bl.exports)),Bl.exports}var Ow;function Qu(){return Ow||(Ow=1,Lm.exports=nE()),Lm.exports}var Lw;function rE(){if(Lw)return Pu;Lw=1;/**
|
|
22
|
-
* @license React
|
|
23
|
-
* react-jsx-dev-runtime.development.js
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
26
|
-
*
|
|
27
|
-
* This source code is licensed under the MIT license found in the
|
|
28
|
-
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/return(function(){function N(L){if(L==null)return null;if(typeof L=="function")return L.$$typeof===j?null:L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case u:return"Fragment";case o:return"Profiler";case h:return"StrictMode";case x:return"Suspense";case k:return"SuspenseList";case M:return"Activity"}if(typeof L=="object")switch(typeof L.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),L.$$typeof){case g:return"Portal";case v:return L.displayName||"Context";case a:return(L._context.displayName||"Context")+".Consumer";case E:var q=L.render;return L=L.displayName,L||(L=q.displayName||q.name||"",L=L!==""?"ForwardRef("+L+")":"ForwardRef"),L;case y:return q=L.displayName||null,q!==null?q:N(L.type)||"Memo";case T:q=L._payload,L=L._init;try{return N(L(q))}catch{}}return null}function R(L){return""+L}function X(L){try{R(L);var q=!1}catch{q=!0}if(q){q=console;var ue=q.error,pe=typeof Symbol=="function"&&Symbol.toStringTag&&L[Symbol.toStringTag]||L.constructor.name||"Object";return ue.call(q,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",pe),R(L)}}function H(L){if(L===u)return"<>";if(typeof L=="object"&&L!==null&&L.$$typeof===T)return"<...>";try{var q=N(L);return q?"<"+q+">":"<...>"}catch{return"<...>"}}function K(){var L=z.A;return L===null?null:L.getOwner()}function ie(){return Error("react-stack-top-frame")}function I(L){if(Y.call(L,"key")){var q=Object.getOwnPropertyDescriptor(L,"key").get;if(q&&q.isReactWarning)return!1}return L.key!==void 0}function l(L,q){function ue(){te||(te=!0,console.error("%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://react.dev/link/special-props)",q))}ue.isReactWarning=!0,Object.defineProperty(L,"key",{get:ue,configurable:!0})}function p(){var L=N(this.type);return de[L]||(de[L]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),L=this.props.ref,L!==void 0?L:null}function _(L,q,ue,pe,ve,Ce){var F=ue.ref;return L={$$typeof:C,type:L,key:q,props:ue,_owner:pe},(F!==void 0?F:null)!==null?Object.defineProperty(L,"ref",{enumerable:!1,get:p}):Object.defineProperty(L,"ref",{enumerable:!1,value:null}),L._store={},Object.defineProperty(L._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(L,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(L,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ve}),Object.defineProperty(L,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ce}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L}function S(L,q,ue,pe,ve,Ce){var F=q.children;if(F!==void 0)if(pe)if(ee(F)){for(pe=0;pe<F.length;pe++)f(F[pe]);Object.freeze&&Object.freeze(F)}else console.error("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 f(F);if(Y.call(q,"key")){F=N(L);var V=Object.keys(q).filter(function(oe){return oe!=="key"});pe=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",U[F+pe]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
30
|
-
let props = %s;
|
|
31
|
-
<%s {...props} />
|
|
32
|
-
React keys must be passed directly to JSX without using spread:
|
|
33
|
-
let props = %s;
|
|
34
|
-
<%s key={someKey} {...props} />`,pe,F,V,F),U[F+pe]=!0)}if(F=null,ue!==void 0&&(X(ue),F=""+ue),I(q)&&(X(q.key),F=""+q.key),"key"in q){ue={};for(var me in q)me!=="key"&&(ue[me]=q[me])}else ue=q;return F&&l(ue,typeof L=="function"?L.displayName||L.name||"Unknown":L),_(L,F,ue,K(),ve,Ce)}function f(L){m(L)?L._store&&(L._store.validated=1):typeof L=="object"&&L!==null&&L.$$typeof===T&&(L._payload.status==="fulfilled"?m(L._payload.value)&&L._payload.value._store&&(L._payload.value._store.validated=1):L._store&&(L._store.validated=1))}function m(L){return typeof L=="object"&&L!==null&&L.$$typeof===C}var w=Qu(),C=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),v=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),z=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,ee=Array.isArray,ne=console.createTask?console.createTask:function(){return null};w={react_stack_bottom_frame:function(L){return L()}};var te,de={},ce=w.react_stack_bottom_frame.bind(w,ie)(),B=ne(H(ie)),U={};Pu.Fragment=u,Pu.jsxDEV=function(L,q,ue,pe){var ve=1e4>z.recentlyCreatedOwnerStacks++;return S(L,q,ue,pe,ve?Error("react-stack-top-frame"):ce,ve?ne(H(L)):B)}})(),Pu}var jw;function oE(){return jw||(jw=1,Om.exports=rE()),Om.exports}var d=oE(),se=Qu(),jm={exports:{}},Tl={},Ym={exports:{}},Vm={},Yw;function aE(){return Yw||(Yw=1,(function(N){/**
|
|
35
|
-
* @license React
|
|
36
|
-
* scheduler.development.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/(function(){function R(){if(E=!1,T){var te=N.unstable_now();z=te;var de=!0;try{e:{a=!1,v&&(v=!1,k(M),M=-1),o=!0;var ce=h;try{t:{for(I(te),u=H(w);u!==null&&!(u.expirationTime>te&&p());){var B=u.callback;if(typeof B=="function"){u.callback=null,h=u.priorityLevel;var U=B(u.expirationTime<=te);if(te=N.unstable_now(),typeof U=="function"){u.callback=U,I(te),de=!0;break t}u===H(w)&&K(w),I(te)}else K(w);u=H(w)}if(u!==null)de=!0;else{var L=H(C);L!==null&&_(l,L.startTime-te),de=!1}}break e}finally{u=null,h=ce,o=!1}de=void 0}}finally{de?Y():T=!1}}}function X(te,de){var ce=te.length;te.push(de);e:for(;0<ce;){var B=ce-1>>>1,U=te[B];if(0<ie(U,de))te[B]=de,te[ce]=U,ce=B;else break e}}function H(te){return te.length===0?null:te[0]}function K(te){if(te.length===0)return null;var de=te[0],ce=te.pop();if(ce!==de){te[0]=ce;e:for(var B=0,U=te.length,L=U>>>1;B<L;){var q=2*(B+1)-1,ue=te[q],pe=q+1,ve=te[pe];if(0>ie(ue,ce))pe<U&&0>ie(ve,ue)?(te[B]=ve,te[pe]=ce,B=pe):(te[B]=ue,te[q]=ce,B=q);else if(pe<U&&0>ie(ve,ce))te[B]=ve,te[pe]=ce,B=pe;else break e}}return de}function ie(te,de){var ce=te.sortIndex-de.sortIndex;return ce!==0?ce:te.id-de.id}function I(te){for(var de=H(C);de!==null;){if(de.callback===null)K(C);else if(de.startTime<=te)K(C),de.sortIndex=de.expirationTime,X(w,de);else break;de=H(C)}}function l(te){if(v=!1,I(te),!a)if(H(w)!==null)a=!0,T||(T=!0,Y());else{var de=H(C);de!==null&&_(l,de.startTime-te)}}function p(){return E?!0:!(N.unstable_now()-z<j)}function _(te,de){M=x(function(){te(N.unstable_now())},de)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),N.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var S=performance;N.unstable_now=function(){return S.now()}}else{var f=Date,m=f.now();N.unstable_now=function(){return f.now()-m}}var w=[],C=[],g=1,u=null,h=3,o=!1,a=!1,v=!1,E=!1,x=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null,T=!1,M=-1,j=5,z=-1;if(typeof y=="function")var Y=function(){y(R)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ne=ee.port2;ee.port1.onmessage=R,Y=function(){ne.postMessage(null)}}else Y=function(){x(R,0)};N.unstable_IdlePriority=5,N.unstable_ImmediatePriority=1,N.unstable_LowPriority=4,N.unstable_NormalPriority=3,N.unstable_Profiling=null,N.unstable_UserBlockingPriority=2,N.unstable_cancelCallback=function(te){te.callback=null},N.unstable_forceFrameRate=function(te){0>te||125<te?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<te?Math.floor(1e3/te):5},N.unstable_getCurrentPriorityLevel=function(){return h},N.unstable_next=function(te){switch(h){case 1:case 2:case 3:var de=3;break;default:de=h}var ce=h;h=de;try{return te()}finally{h=ce}},N.unstable_requestPaint=function(){E=!0},N.unstable_runWithPriority=function(te,de){switch(te){case 1:case 2:case 3:case 4:case 5:break;default:te=3}var ce=h;h=te;try{return de()}finally{h=ce}},N.unstable_scheduleCallback=function(te,de,ce){var B=N.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?B+ce:B):ce=B,te){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=ce+U,te={id:g++,callback:de,priorityLevel:te,startTime:ce,expirationTime:U,sortIndex:-1},ce>B?(te.sortIndex=ce,X(C,te),H(w)===null&&te===H(C)&&(v?(k(M),M=-1):v=!0,_(l,ce-B))):(te.sortIndex=U,X(w,te),a||o||(a=!0,T||(T=!0,Y()))),te},N.unstable_shouldYield=p,N.unstable_wrapCallback=function(te){var de=h;return function(){var ce=h;h=de;try{return te.apply(this,arguments)}finally{h=ce}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Vm)),Vm}var Vw;function lE(){return Vw||(Vw=1,Ym.exports=aE()),Ym.exports}var Xm={exports:{}},ui={},Xw;function cE(){if(Xw)return ui;Xw=1;/**
|
|
43
|
-
* @license React
|
|
44
|
-
* react-dom.development.js
|
|
45
|
-
*
|
|
46
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the MIT license found in the
|
|
49
|
-
* LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/return(function(){function N(){}function R(f){return""+f}function X(f,m,w){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{R(C);var g=!1}catch{g=!0}return g&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object"),R(C)),{$$typeof:_,key:C==null?null:""+C,children:f,containerInfo:m,implementation:w}}function H(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}function K(f){return f===null?"`null`":f===void 0?"`undefined`":f===""?"an empty string":'something with type "'+typeof f+'"'}function ie(f){return f===null?"`null`":f===void 0?"`undefined`":f===""?"an empty string":typeof f=="string"?JSON.stringify(f):typeof f=="number"?"`"+f+"`":'something with type "'+typeof f+'"'}function I(){var f=S.H;return f===null&&console.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:
|
|
51
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
52
|
-
2. You might be breaking the Rules of Hooks
|
|
53
|
-
3. You might have more than one copy of React in the same app
|
|
54
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),f}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var l=Qu(),p={d:{f:N,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:N,C:N,L:N,m:N,X:N,S:N,M:N},p:0,findDOMNode:null},_=Symbol.for("react.portal"),S=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;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"||console.error("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"),ui.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=p,ui.createPortal=function(f,m){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error("Target container is not a DOM element.");return X(f,m,null,w)},ui.flushSync=function(f){var m=S.T,w=p.p;try{if(S.T=null,p.p=2,f)return f()}finally{S.T=m,p.p=w,p.d.f()&&console.error("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.")}},ui.preconnect=function(f,m){typeof f=="string"&&f?m!=null&&typeof m!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",ie(m)):m!=null&&typeof m.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",K(m.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(f)),typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,p.d.C(f,m))},ui.prefetchDNS=function(f){if(typeof f!="string"||!f)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(f));else if(1<arguments.length){var m=arguments[1];typeof m=="object"&&m.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",ie(m)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",ie(m))}typeof f=="string"&&p.d.D(f)},ui.preinit=function(f,m){if(typeof f=="string"&&f?m==null||typeof m!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",ie(m)):m.as!=="style"&&m.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',ie(m.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(f)),typeof f=="string"&&m&&typeof m.as=="string"){var w=m.as,C=H(w,m.crossOrigin),g=typeof m.integrity=="string"?m.integrity:void 0,u=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;w==="style"?p.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:C,integrity:g,fetchPriority:u}):w==="script"&&p.d.X(f,{crossOrigin:C,integrity:g,fetchPriority:u,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},ui.preinitModule=function(f,m){var w="";if(typeof f=="string"&&f||(w+=" The `href` argument encountered was "+K(f)+"."),m!==void 0&&typeof m!="object"?w+=" The `options` argument encountered was "+K(m)+".":m&&"as"in m&&m.as!=="script"&&(w+=" The `as` option encountered was "+ie(m.as)+"."),w)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",w);else switch(w=m&&typeof m.as=="string"?m.as:"script",w){case"script":break;default:w=ie(w),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',w,f)}typeof f=="string"&&(typeof m=="object"&&m!==null?(m.as==null||m.as==="script")&&(w=H(m.as,m.crossOrigin),p.d.M(f,{crossOrigin:w,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})):m==null&&p.d.M(f))},ui.preload=function(f,m){var w="";if(typeof f=="string"&&f||(w+=" The `href` argument encountered was "+K(f)+"."),m==null||typeof m!="object"?w+=" The `options` argument encountered was "+K(m)+".":typeof m.as=="string"&&m.as||(w+=" The `as` option encountered was "+K(m.as)+"."),w&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',w),typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){w=m.as;var C=H(w,m.crossOrigin);p.d.L(f,w,{crossOrigin:C,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},ui.preloadModule=function(f,m){var w="";typeof f=="string"&&f||(w+=" The `href` argument encountered was "+K(f)+"."),m!==void 0&&typeof m!="object"?w+=" The `options` argument encountered was "+K(m)+".":m&&"as"in m&&typeof m.as!="string"&&(w+=" The `as` option encountered was "+K(m.as)+"."),w&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',w),typeof f=="string"&&(m?(w=H(m.as,m.crossOrigin),p.d.m(f,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:w,integrity:typeof m.integrity=="string"?m.integrity:void 0})):p.d.m(f))},ui.requestFormReset=function(f){p.d.r(f)},ui.unstable_batchedUpdates=function(f,m){return f(m)},ui.useFormState=function(f,m,w){return I().useFormState(f,m,w)},ui.useFormStatus=function(){return I().useHostTransitionStatus()},ui.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),ui}var Hw;function uE(){return Hw||(Hw=1,Xm.exports=cE()),Xm.exports}var Uw;function hE(){if(Uw)return Tl;Uw=1;/**
|
|
55
|
-
* @license React
|
|
56
|
-
* react-dom-client.development.js
|
|
57
|
-
*
|
|
58
|
-
* Copyright (c) Meta Platforms, Inc. and 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
|
-
*/return(function(){function N(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function R(e,t,i,s){if(i>=t.length)return s;var n=t[i],r=Ft(e)?e.slice():et({},e);return r[n]=R(e[n],t,i+1,s),r}function X(e,t,i){if(t.length!==i.length)console.warn("copyWithRename() expects paths of the same length");else{for(var s=0;s<i.length-1;s++)if(t[s]!==i[s]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return H(e,t,i,0)}}function H(e,t,i,s){var n=t[s],r=Ft(e)?e.slice():et({},e);return s+1===t.length?(r[i[s]]=r[n],Ft(r)?r.splice(n,1):delete r[n]):r[n]=H(e[n],t,i,s+1),r}function K(e,t,i){var s=t[i],n=Ft(e)?e.slice():et({},e);return i+1===t.length?(Ft(n)?n.splice(s,1):delete n[s],n):(n[s]=K(e[s],t,i+1),n)}function ie(){return!1}function I(){return null}function l(){console.error("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://react.dev/link/rules-of-hooks")}function p(){console.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().")}function _(){}function S(){}function f(e){var t=[];return e.forEach(function(i){t.push(i)}),t.sort().join(", ")}function m(e,t,i,s){return new Iy(e,t,i,s)}function w(e,t){e.context===Un&&(Zd(e.current,2,t,e,null,null),uo())}function C(e,t){if(Gi!==null){var i=t.staleFamilies;t=t.updatedFamilies,xa(),Xp(e.current,t,i),uo()}}function g(e){Gi=e}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function o(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function a(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(h(e)!==e)throw Error("Unable to find node on an unmounted component.")}function E(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var i=e,s=t;;){var n=i.return;if(n===null)break;var r=n.alternate;if(r===null){if(s=n.return,s!==null){i=s;continue}break}if(n.child===r.child){for(r=n.child;r;){if(r===i)return v(n),e;if(r===s)return v(n),t;r=r.sibling}throw Error("Unable to find node on an unmounted component.")}if(i.return!==s.return)i=n,s=r;else{for(var c=!1,b=n.child;b;){if(b===i){c=!0,i=n,s=r;break}if(b===s){c=!0,s=n,i=r;break}b=b.sibling}if(!c){for(b=r.child;b;){if(b===i){c=!0,i=r,s=n;break}if(b===s){c=!0,s=r,i=n;break}b=b.sibling}if(!c)throw 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(i.alternate!==s)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(i.tag!==3)throw Error("Unable to find node on an unmounted component.");return i.stateNode.current===i?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}function k(e){return e===null||typeof e!="object"?null:(e=Pv&&e[Pv]||e["@@iterator"],typeof e=="function"?e:null)}function y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===h1?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vo:return"Fragment";case of:return"Profiler";case Hc:return"StrictMode";case lf:return"Suspense";case cf:return"SuspenseList";case uf:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case go:return"Portal";case Ls:return e.displayName||"Context";case af:return(e._context.displayName||"Context")+".Consumer";case La:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Uc:return t=e.displayName||null,t!==null?t:y(e.type)||"Memo";case Li:t=e._payload,e=e._init;try{return y(e(t))}catch{}}return null}function T(e){return typeof e.tag=="number"?M(e):typeof e.name=="string"?e.name:null}function M(e){var t=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(t._context.displayName||"Context")+".Consumer";case 10:return t.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return y(t);case 8:return t===Hc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;break;case 29:if(t=e._debugInfo,t!=null){for(var i=t.length-1;0<=i;i--)if(typeof t[i].name=="string")return t[i].name}if(e.return!==null)return M(e.return)}return null}function j(e){return{current:e}}function z(e,t){0>tn?console.error("Unexpected pop."):(t!==df[tn]&&console.error("Unexpected Fiber popped."),e.current=hf[tn],hf[tn]=null,df[tn]=null,tn--)}function Y(e,t,i){tn++,hf[tn]=e.current,df[tn]=i,e.current=t}function ee(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function ne(e,t){Y(Ln,t,e),Y(ja,e,e),Y(On,null,e);var i=t.nodeType;switch(i){case 9:case 11:i=i===9?"#document":"#fragment",t=(t=t.documentElement)&&(t=t.namespaceURI)?bv(t):gn;break;default:if(i=t.tagName,t=t.namespaceURI)t=bv(t),t=gv(t,i);else switch(i){case"svg":t=Zo;break;case"math":t=Xu;break;default:t=gn}}i=i.toLowerCase(),i=up(null,i),i={context:t,ancestorInfo:i},z(On,e),Y(On,i,e)}function te(e){z(On,e),z(ja,e),z(Ln,e)}function de(){return ee(On.current)}function ce(e){e.memoizedState!==null&&Y(zc,e,e);var t=ee(On.current),i=e.type,s=gv(t.context,i);i=up(t.ancestorInfo,i),s={context:s,ancestorInfo:i},t!==s&&(Y(ja,e,e),Y(On,s,e))}function B(e){ja.current===e&&(z(On,e),z(ja,e)),zc.current===e&&(z(zc,e),Dl._currentValue=Fr)}function U(){}function L(){if(Ya===0){Wv=console.log,Fv=console.info,Gv=console.warn,Qv=console.error,Kv=console.group,Zv=console.groupCollapsed,Jv=console.groupEnd;var e={configurable:!0,enumerable:!0,value:U,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Ya++}function q(){if(Ya--,Ya===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:et({},e,{value:Wv}),info:et({},e,{value:Fv}),warn:et({},e,{value:Gv}),error:et({},e,{value:Qv}),group:et({},e,{value:Kv}),groupCollapsed:et({},e,{value:Zv}),groupEnd:et({},e,{value:Jv})})}0>Ya&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function ue(e){var t=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=t,e.startsWith(`Error: react-stack-top-frame
|
|
63
|
-
`)&&(e=e.slice(29)),t=e.indexOf(`
|
|
64
|
-
`),t!==-1&&(e=e.slice(t+1)),t=e.indexOf("react_stack_bottom_frame"),t!==-1&&(t=e.lastIndexOf(`
|
|
65
|
-
`,t)),t!==-1)e=e.slice(0,t);else return"";return e}function pe(e){if(ff===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ff=t&&t[1]||"",e_=-1<i.stack.indexOf(`
|
|
66
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
67
|
-
`+ff+e+e_}function ve(e,t){if(!e||mf)return"";var i=pf.get(e);if(i!==void 0)return i;mf=!0,i=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var s=null;s=he.H,he.H=null,L();try{var n={DetermineComponentFrameRoot:function(){try{if(t){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(Ne){var re=Ne}Reflect.construct(e,[],P)}else{try{P.call()}catch(Ne){re=Ne}e.call(P.prototype)}}else{try{throw Error()}catch(Ne){re=Ne}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(Ne){if(Ne&&re&&typeof Ne.stack=="string")return[Ne.stack,re.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),b=c[0],D=c[1];if(b&&D){var A=b.split(`
|
|
68
|
-
`),Q=D.split(`
|
|
69
|
-
`);for(c=r=0;r<A.length&&!A[r].includes("DetermineComponentFrameRoot");)r++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(r===A.length||c===Q.length)for(r=A.length-1,c=Q.length-1;1<=r&&0<=c&&A[r]!==Q[c];)c--;for(;1<=r&&0<=c;r--,c--)if(A[r]!==Q[c]){if(r!==1||c!==1)do if(r--,c--,0>c||A[r]!==Q[c]){var Z=`
|
|
70
|
-
`+A[r].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),typeof e=="function"&&pf.set(e,Z),Z}while(1<=r&&0<=c);break}}}finally{mf=!1,he.H=s,q(),Error.prepareStackTrace=i}return A=(A=e?e.displayName||e.name:"")?pe(A):"",typeof e=="function"&&pf.set(e,A),A}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe("Lazy");case 13:return e.child!==t&&t!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return pe("Activity");default:return""}}function F(e){try{var t="",i=null;do{t+=Ce(e,i);var s=e._debugInfo;if(s)for(var n=s.length-1;0<=n;n--){var r=s[n];if(typeof r.name=="string"){var c=t;e:{var b=r.name,D=r.env,A=r.debugLocation;if(A!=null){var Q=ue(A),Z=Q.lastIndexOf(`
|
|
71
|
-
`),P=Z===-1?Q:Q.slice(Z+1);if(P.indexOf(b)!==-1){var re=`
|
|
72
|
-
`+P;break e}}re=pe(b+(D?" ["+D+"]":""))}t=c+re}}i=e,e=e.return}while(e);return t}catch(Ne){return`
|
|
73
|
-
Error generating stack: `+Ne.message+`
|
|
74
|
-
`+Ne.stack}}function V(e){return(e=e?e.displayName||e.name:"")?pe(e):""}function me(){if(ji===null)return null;var e=ji._debugOwner;return e!=null?T(e):null}function oe(){if(ji===null)return"";var e=ji;try{var t="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=pe(e.type);break;case 13:t+=pe("Suspense");break;case 19:t+=pe("SuspenseList");break;case 31:t+=pe("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||t!==""||(t+=V(e.type));break;case 11:e._debugOwner||t!==""||(t+=V(e.type.render))}for(;e;)if(typeof e.tag=="number"){var i=e;e=i._debugOwner;var s=i._debugStack;if(e&&s){var n=ue(s);n!==""&&(t+=`
|
|
75
|
-
`+n)}}else if(e.debugStack!=null){var r=e.debugStack;(e=e.owner)&&r&&(t+=`
|
|
76
|
-
`+ue(r))}else break;var c=t}catch(b){c=`
|
|
77
|
-
Error generating stack: `+b.message+`
|
|
78
|
-
`+b.stack}return c}function ae(e,t,i,s,n,r,c){var b=ji;ye(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,i,s,n,r,c)):t(i,s,n,r,c)}finally{ye(b)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function ye(e){he.getCurrentStack=e===null?null:oe,js=!1,ji=e}function be(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function Ue(e){try{return Ie(e),!1}catch{return!0}}function Ie(e){return""+e}function Le(e,t){if(Ue(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",t,be(e)),Ie(e)}function ke(e,t){if(Ue(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",t,be(e)),Ie(e)}function jt(e){if(Ue(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",be(e)),Ie(e)}function zi(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{wo=t.inject(e),li=t}catch(i){console.error("React instrumentation encountered an error: %o.",i)}return!!t.checkDCE}function De(e){if(typeof v1=="function"&&_1(e),li&&typeof li.setStrictMode=="function")try{li.setStrictMode(wo,e)}catch(t){Ys||(Ys=!0,console.error("React instrumentation encountered an error: %o",t))}}function Nt(e){return e>>>=0,e===0?32:31-(w1(e)/y1|0)|0}function ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function Be(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var n=0,r=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~r,s!==0?n=ge(s):(c&=b,c!==0?n=ge(c):i||(i=b&~e,i!==0&&(n=ge(i))))):(b=s&~r,b!==0?n=ge(b):c!==0?n=ge(c):i||(i=s&~e,i!==0&&(n=ge(i)))),n===0?0:t!==0&&t!==n&&(t&r)===0&&(r=n&-n,i=t&-t,r>=i||r===32&&(i&4194048)!==0)?t:n}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function We(){var e=qc;return qc<<=1,(qc&62914560)===0&&(qc=4194304),e}function ut(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bt(e,t,i,s,n,r){var c=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,D=e.expirationTimes,A=e.hiddenUpdates;for(i=c&~i;0<i;){var Q=31-fi(i),Z=1<<Q;b[Q]=0,D[Q]=-1;var P=A[Q];if(P!==null)for(A[Q]=null,Q=0;Q<P.length;Q++){var re=P[Q];re!==null&&(re.lane&=-536870913)}i&=~Z}s!==0&&wt(e,s,0),r!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=r&~(c&~t))}function wt(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-fi(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Mt(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-fi(i),n=1<<s;n&t|e[s]&t&&(e[s]|=t),i&=~n}}function ht(e,t){var i=t&-t;return i=(i&42)!==0?1:bs(i),(i&(e.suspendedLanes|t))!==0?0:i}function bs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function cr(e,t,i){if(Vs)for(e=e.pendingUpdatersLaneMap;0<i;){var s=31-fi(i),n=1<<s;e[s].add(t),i&=~n}}function Gr(e,t){if(Vs)for(var i=e.pendingUpdatersLaneMap,s=e.memoizedUpdaters;0<t;){var n=31-fi(t);e=1<<n,n=i[n],0<n.size&&(n.forEach(function(r){var c=r.alternate;c!==null&&s.has(c)||s.add(r)}),n.clear()),t&=~e}}function Qr(e){return e&=-e,Pi<e?Xs<e?(e&134217727)!==0?sn:Pc:Xs:Pi}function yn(){var e=ft.p;return e!==0?e:(e=window.event,e===void 0?sn:Xv(e.type))}function O(e,t){var i=ft.p;try{return ft.p=e,t()}finally{ft.p=i}}function J(e){delete e[ri],delete e[mi],delete e[wf],delete e[S1],delete e[N1]}function we(e){var t=e[ri];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Yn]||i[ri]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=xv(e);e!==null;){if(i=e[ri])return i;e=xv(e)}return t}e=i,i=e.parentNode}return null}function Se(e){if(e=e[ri]||e[Yn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Re(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function $e(e){var t=e[t_];return t||(t=e[t_]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ae(e){e[Va]=!0}function at(e,t){qe(e,t),qe(e+"Capture",t)}function qe(e,t){xr[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),xr[e]=t;var i=e.toLowerCase();for(yf[i]=e,e==="onDoubleClick"&&(yf.ondblclick=e),e=0;e<t.length;e++)i_.add(t[e])}function hi(e,t){E1[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||console.error(e==="select"?"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 `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||console.error("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 gs(e){return cs.call(n_,e)?!0:cs.call(s_,e)?!1:x1.test(e)?n_[e]=!0:(s_[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function Al(e,t,i){if(gs(t)){if(!e.hasAttribute(t)){switch(typeof i){case"symbol":case"object":return i;case"function":return i;case"boolean":if(i===!1)return i}return i===void 0?void 0:null}return e=e.getAttribute(t),e===""&&i===!0?!0:(Le(i,t),e===""+i?i:e)}}function Kr(e,t,i){if(gs(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}Le(i,t),e.setAttribute(t,""+i)}}function Ml(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}Le(i,t),e.setAttribute(t,""+i)}}function Ps(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}Le(s,i),e.setAttributeNS(t,i,""+s)}}function Ii(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return jt(e),e;default:return""}}function Qm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wy(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var n=s.get,r=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(c){jt(c),i=""+c,r.call(this,c)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(c){jt(c),i=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zu(e){if(!e._valueTracker){var t=Qm(e)?"checked":"value";e._valueTracker=wy(e,t,""+e[t])}}function Km(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Qm(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Ol(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $i(e){return e.replace(C1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zm(e,t){t.checked===void 0||t.defaultChecked===void 0||o_||(console.error("%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://react.dev/link/controlled-components",me()||"A component",t.type),o_=!0),t.value===void 0||t.defaultValue===void 0||r_||(console.error("%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://react.dev/link/controlled-components",me()||"A component",t.type),r_=!0)}function Ju(e,t,i,s,n,r,c,b){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?(Le(c,"type"),e.type=c):e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ii(t)):e.value!==""+Ii(t)&&(e.value=""+Ii(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?eh(e,c,Ii(t)):i!=null?eh(e,c,Ii(i)):s!=null&&e.removeAttribute("value"),n==null&&r!=null&&(e.defaultChecked=!!r),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?(Le(b,"name"),e.name=""+Ii(b)):e.removeAttribute("name")}function Jm(e,t,i,s,n,r,c,b){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(Le(r,"type"),e.type=r),t!=null||i!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){Zu(e);return}i=i!=null?""+Ii(i):"",t=t!=null?""+Ii(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??n,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(Le(c,"name"),e.name=c),Zu(e)}function eh(e,t,i){t==="number"&&Ol(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ep(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?rf.Children.forEach(t.children,function(i){i==null||typeof i=="string"||typeof i=="number"||typeof i=="bigint"||l_||(l_=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):t.dangerouslySetInnerHTML==null||c_||(c_=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||a_||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),a_=!0)}function tp(){var e=me();return e?`
|
|
79
|
-
|
|
80
|
-
Check the render method of \``+e+"`.":""}function Zr(e,t,i,s){if(e=e.options,t){t={};for(var n=0;n<i.length;n++)t["$"+i[n]]=!0;for(i=0;i<e.length;i++)n=t.hasOwnProperty("$"+e[i].value),e[i].selected!==n&&(e[i].selected=n),n&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Ii(i),t=null,n=0;n<e.length;n++){if(e[n].value===i){e[n].selected=!0,s&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function ip(e,t){for(e=0;e<h_.length;e++){var i=h_[e];if(t[i]!=null){var s=Ft(t[i]);t.multiple&&!s?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",i,tp()):!t.multiple&&s&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",i,tp())}}t.value===void 0||t.defaultValue===void 0||u_||(console.error("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://react.dev/link/controlled-components"),u_=!0)}function sp(e,t){t.value===void 0||t.defaultValue===void 0||d_||(console.error("%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://react.dev/link/controlled-components",me()||"A component"),d_=!0),t.children!=null&&t.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function np(e,t,i){if(t!=null&&(t=""+Ii(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ii(i):""}function rp(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Ft(s)){if(1<s.length)throw Error("<textarea> can only have at most one child.");s=s[0]}i=s}i==null&&(i=""),t=i}i=Ii(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Zu(e)}function op(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?op(e.children[0],t):e}function ki(e){return" "+" ".repeat(e)}function Jr(e){return"+ "+" ".repeat(e)}function ur(e){return"- "+" ".repeat(e)}function ap(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function ta(e,t){return f_.test(e)?(e=JSON.stringify(e),e.length>t-2?8>t?'{"..."}':"{"+e.slice(0,t-7)+'..."}':"{"+e+"}"):e.length>t?5>t?'{"..."}':e.slice(0,t-3)+"...":e}function Ll(e,t,i){var s=120-2*i;if(t===null)return Jr(i)+ta(e,s)+`
|
|
81
|
-
`;if(typeof t=="string"){for(var n=0;n<t.length&&n<e.length&&t.charCodeAt(n)===e.charCodeAt(n);n++);return n>s-8&&10<n&&(e="..."+e.slice(n-8),t="..."+t.slice(n-8)),Jr(i)+ta(e,s)+`
|
|
82
|
-
`+ur(i)+ta(t,s)+`
|
|
83
|
-
`}return ki(i)+ta(e,s)+`
|
|
84
|
-
`}function th(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(t,i){return i})}function ia(e,t){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>t?5>t?'"..."':e.slice(0,t-4)+'..."':e;case"object":if(e===null)return"null";if(Ft(e))return"[...]";if(e.$$typeof===Os)return(t=y(e.type))?"<"+t+">":"<...>";var i=th(e);if(i==="Object"){i="",t-=2;for(var s in e)if(e.hasOwnProperty(s)){var n=JSON.stringify(s);if(n!=='"'+s+'"'&&(s=n),t-=s.length-2,n=ia(e[s],15>t?t:15),t-=n.length,0>t){i+=i===""?"...":", ...";break}i+=(i===""?"":",")+s+":"+n}return"{"+i+"}"}return i;case"function":return(t=e.displayName||e.name)?"function "+t:"function";default:return String(e)}}function eo(e,t){return typeof e!="string"||f_.test(e)?"{"+ia(e,t-2)+"}":e.length>t-2?5>t?'"..."':'"'+e.slice(0,t-5)+'..."':'"'+e+'"'}function ih(e,t,i){var s=120-i.length-e.length,n=[],r;for(r in t)if(t.hasOwnProperty(r)&&r!=="children"){var c=eo(t[r],120-i.length-r.length-1);s-=r.length+c.length+2,n.push(r+"="+c)}return n.length===0?i+"<"+e+`>
|
|
85
|
-
`:0<s?i+"<"+e+" "+n.join(" ")+`>
|
|
86
|
-
`:i+"<"+e+`
|
|
87
|
-
`+i+" "+n.join(`
|
|
88
|
-
`+i+" ")+`
|
|
89
|
-
`+i+`>
|
|
90
|
-
`}function yy(e,t,i){var s="",n=et({},t),r;for(r in e)if(e.hasOwnProperty(r)){delete n[r];var c=120-2*i-r.length-2,b=ia(e[r],c);t.hasOwnProperty(r)?(c=ia(t[r],c),s+=Jr(i)+r+": "+b+`
|
|
91
|
-
`,s+=ur(i)+r+": "+c+`
|
|
92
|
-
`):s+=Jr(i)+r+": "+b+`
|
|
93
|
-
`}for(var D in n)n.hasOwnProperty(D)&&(e=ia(n[D],120-2*i-D.length-2),s+=ur(i)+D+": "+e+`
|
|
94
|
-
`);return s}function Sy(e,t,i,s){var n="",r=new Map;for(A in i)i.hasOwnProperty(A)&&r.set(A.toLowerCase(),A);if(r.size===1&&r.has("children"))n+=ih(e,t,ki(s));else{for(var c in t)if(t.hasOwnProperty(c)&&c!=="children"){var b=120-2*(s+1)-c.length-1,D=r.get(c.toLowerCase());if(D!==void 0){r.delete(c.toLowerCase());var A=t[c];D=i[D];var Q=eo(A,b);b=eo(D,b),typeof A=="object"&&A!==null&&typeof D=="object"&&D!==null&&th(A)==="Object"&&th(D)==="Object"&&(2<Object.keys(A).length||2<Object.keys(D).length||-1<Q.indexOf("...")||-1<b.indexOf("..."))?n+=ki(s+1)+c+`={{
|
|
95
|
-
`+yy(A,D,s+2)+ki(s+1)+`}}
|
|
96
|
-
`:(n+=Jr(s+1)+c+"="+Q+`
|
|
97
|
-
`,n+=ur(s+1)+c+"="+b+`
|
|
98
|
-
`)}else n+=ki(s+1)+c+"="+eo(t[c],b)+`
|
|
99
|
-
`}r.forEach(function(Z){if(Z!=="children"){var P=120-2*(s+1)-Z.length-1;n+=ur(s+1)+Z+"="+eo(i[Z],P)+`
|
|
100
|
-
`}}),n=n===""?ki(s)+"<"+e+`>
|
|
101
|
-
`:ki(s)+"<"+e+`
|
|
102
|
-
`+n+ki(s)+`>
|
|
103
|
-
`}return e=i.children,t=t.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(r="",(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(r=""+t),n+=Ll(r,""+e,s+1)):(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(n=e==null?n+Ll(""+t,null,s+1):n+Ll(""+t,void 0,s+1)),n}function lp(e,t){var i=ap(e);if(i===null){for(i="",e=e.child;e;)i+=lp(e,t),e=e.sibling;return i}return ki(t)+"<"+i+`>
|
|
104
|
-
`}function sh(e,t){var i=op(e,t);if(i!==e&&(e.children.length!==1||e.children[0]!==i))return ki(t)+`...
|
|
105
|
-
`+sh(i,t+1);i="";var s=e.fiber._debugInfo;if(s)for(var n=0;n<s.length;n++){var r=s[n].name;typeof r=="string"&&(i+=ki(t)+"<"+r+`>
|
|
106
|
-
`,t++)}if(s="",n=e.fiber.pendingProps,e.fiber.tag===6)s=Ll(n,e.serverProps,t),t++;else if(r=ap(e.fiber),r!==null)if(e.serverProps===void 0){s=t;var c=120-2*s-r.length-2,b="";for(A in n)if(n.hasOwnProperty(A)&&A!=="children"){var D=eo(n[A],15);if(c-=A.length+D.length+2,0>c){b+=" ...";break}b+=" "+A+"="+D}s=ki(s)+"<"+r+b+`>
|
|
107
|
-
`,t++}else e.serverProps===null?(s=ih(r,n,Jr(t)),t++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(s=Sy(r,n,e.serverProps,t),t++);var A="";for(n=e.fiber.child,r=0;n&&r<e.children.length;)c=e.children[r],c.fiber===n?(A+=sh(c,t),r++):A+=lp(n,t),n=n.sibling;for(n&&0<e.children.length&&(A+=ki(t)+`...
|
|
108
|
-
`),n=e.serverTail,e.serverProps===null&&t--,e=0;e<n.length;e++)r=n[e],A=typeof r=="string"?A+(ur(t)+ta(r,120-2*t)+`
|
|
109
|
-
`):A+ih(r.type,r.props,ur(t));return i+s+A}function nh(e){try{return`
|
|
110
|
-
|
|
111
|
-
`+sh(e,0)}catch{return""}}function cp(e,t,i){for(var s=t,n=null,r=0;s;)s===e&&(r=0),n={fiber:s,children:n!==null?[n]:[],serverProps:s===t?i:s===e?null:void 0,serverTail:[],distanceFromLeaf:r},r++,s=s.return;return n!==null?nh(n).replaceAll(/^[+-]/gm,">"):""}function up(e,t){var i=et({},e||p_),s={tag:t};return m_.indexOf(t)!==-1&&(i.aTagInScope=null,i.buttonTagInScope=null,i.nobrTagInScope=null),k1.indexOf(t)!==-1&&(i.pTagInButtonScope=null),D1.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(i.listItemTagAutoclosing=null,i.dlItemTagAutoclosing=null),i.current=s,t==="form"&&(i.formTag=s),t==="a"&&(i.aTagInScope=s),t==="button"&&(i.buttonTagInScope=s),t==="nobr"&&(i.nobrTagInScope=s),t==="p"&&(i.pTagInButtonScope=s),t==="li"&&(i.listItemTagAutoclosing=s),(t==="dd"||t==="dt")&&(i.dlItemTagAutoclosing=s),t==="#document"||t==="html"?i.containerTagInScope=null:i.containerTagInScope||(i.containerTagInScope=s),e!==null||t!=="#document"&&t!=="html"&&t!=="body"?i.implicitRootScope===!0&&(i.implicitRootScope=!1):i.implicitRootScope=!0,i}function hp(e,t,i){switch(t){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":if(i)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!i)return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return R1.indexOf(t)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null;case"head":return i||t===null;case"html":return i&&t==="#document"||t===null;case"body":return i&&(t==="#document"||t==="html")||t===null}return!0}function Ny(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}function dp(e,t){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===t)return e}e=e.return}return null}function rh(e,t){t=t||p_;var i=t.current;if(t=(i=hp(e,i&&i.tag,t.implicitRootScope)?null:i)?null:Ny(e,t),t=i||t,!t)return!0;var s=t.tag;if(t=String(!!i)+"|"+e+"|"+s,Wc[t])return!1;Wc[t]=!0;var n=(t=ji)?dp(t.return,s):null,r=t!==null&&n!==null?cp(n,t,null):"",c="<"+e+">";return i?(i="",s==="table"&&e==="tr"&&(i+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
|
112
|
-
This will cause a hydration error.%s`,c,s,i,r)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
113
|
-
This will cause a hydration error.%s`,c,s,r),t&&(e=t.return,n===null||e===null||n===e&&e._debugOwner===t._debugOwner||ae(n,function(){console.error(`<%s> cannot contain a nested %s.
|
|
114
|
-
See this log for the ancestor stack trace.`,s,c)})),!1}function jl(e,t,i){if(i||hp("#text",t,!1))return!0;if(i="#text|"+t,Wc[i])return!1;Wc[i]=!0;var s=(i=ji)?dp(i,t):null;return i=i!==null&&s!==null?cp(s,i,i.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
115
|
-
This will cause a hydration error.%s`,t,i):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
116
|
-
This will cause a hydration error.%s`,t,i),!1}function sa(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}function Ey(e){return e.replace(A1,function(t,i){return i.toUpperCase()})}function fp(e,t,i){var s=t.indexOf("--")===0;s||(-1<t.indexOf("-")?yo.hasOwnProperty(t)&&yo[t]||(yo[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,Ey(t.replace(B1,"ms-")))):T1.test(t)?yo.hasOwnProperty(t)&&yo[t]||(yo[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!v_.test(i)||Nf.hasOwnProperty(i)&&Nf[i]||(Nf[i]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,i.replace(v_,""))),typeof i=="number"&&(isNaN(i)?__||(__=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(i)||w_||(w_=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",t)))),i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||y_.has(t)?t==="float"?e.cssFloat=i:(ke(i,t),e[t]=(""+i).trim()):e[t]=i+"px"}function mp(e,t,i){if(t!=null&&typeof t!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(t&&Object.freeze(t),e=e.style,i!=null){if(t){var s={};if(i){for(var n in i)if(i.hasOwnProperty(n)&&!t.hasOwnProperty(n))for(var r=Sf[n]||[n],c=0;c<r.length;c++)s[r[c]]=n}for(var b in t)if(t.hasOwnProperty(b)&&(!i||i[b]!==t[b]))for(n=Sf[b]||[b],r=0;r<n.length;r++)s[n[r]]=b;b={};for(var D in t)for(n=Sf[D]||[D],r=0;r<n.length;r++)b[n[r]]=D;D={};for(var A in s)if(n=s[A],(r=b[A])&&n!==r&&(c=n+","+r,!D[c])){D[c]=!0,c=console;var Q=t[n];c.error.call(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.",Q==null||typeof Q=="boolean"||Q===""?"Removing":"Updating",n,r)}}for(var Z in i)!i.hasOwnProperty(Z)||t!=null&&t.hasOwnProperty(Z)||(Z.indexOf("--")===0?e.setProperty(Z,""):Z==="float"?e.cssFloat="":e[Z]="");for(var P in t)A=t[P],t.hasOwnProperty(P)&&i[P]!==A&&fp(e,P,A)}else for(s in t)t.hasOwnProperty(s)&&fp(e,s,t[s])}function na(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function pp(e){return M1.get(e)||e}function xy(e,t){if(cs.call(No,t)&&No[t])return!0;if(L1.test(t)){if(e="aria-"+t.slice(4).toLowerCase(),e=S_.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),No[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),No[t]=!0}if(O1.test(t)){if(e=t.toLowerCase(),e=S_.hasOwnProperty(e)?e:null,e==null)return No[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),No[t]=!0)}return!0}function Cy(e,t){var i=[],s;for(s in t)xy(e,s)||i.push(s);t=i.map(function(n){return"`"+n+"`"}).join(", "),i.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e):1<i.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e)}function Dy(e,t,i,s){if(cs.call(pi,t)&&pi[t])return!0;var n=t.toLowerCase();if(n==="onfocusin"||n==="onfocusout")return console.error("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."),pi[t]=!0;if(typeof i=="function"&&(e==="form"&&t==="action"||e==="input"&&t==="formAction"||e==="button"&&t==="formAction"))return!0;if(s!=null){if(e=s.possibleRegistrationNames,s.registrationNameDependencies.hasOwnProperty(t))return!0;if(s=e.hasOwnProperty(n)?e[n]:null,s!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",t,s),pi[t]=!0;if(E_.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),pi[t]=!0}else if(E_.test(t))return j1.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),pi[t]=!0;if(Y1.test(t)||V1.test(t))return!0;if(n==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),pi[t]=!0;if(n==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),pi[t]=!0;if(n==="is"&&i!==null&&i!==void 0&&typeof i!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof i),pi[t]=!0;if(typeof i=="number"&&isNaN(i))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),pi[t]=!0;if(Gc.hasOwnProperty(n)){if(n=Gc[n],n!==t)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",t,n),pi[t]=!0}else if(t!==n)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,n),pi[t]=!0;switch(t){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof i){case"boolean":switch(t){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return n=t.toLowerCase().slice(0,5),n==="data-"||n==="aria-"?!0:(i?console.error('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()}.',i,t,t,i,t):console.error('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.',i,t,t,i,t,t,t),pi[t]=!0)}case"function":case"symbol":return pi[t]=!0,!1;case"string":if(i==="false"||i==="true"){switch(t){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",i,t,i==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,i),pi[t]=!0}}return!0}function ky(e,t,i){var s=[],n;for(n in t)Dy(e,n,t[n],i)||s.push(n);t=s.map(function(r){return"`"+r+"`"}).join(", "),s.length===1?console.error("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://react.dev/link/attribute-behavior ",t,e):1<s.length&&console.error("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://react.dev/link/attribute-behavior ",t,e)}function ra(e){return X1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ws(){}function oh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function bp(e){var t=Se(e);if(t&&(e=t.stateNode)){var i=e[mi]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ju(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(Le(t,"name"),i=i.querySelectorAll('input[name="'+$i(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var n=s[mi]||null;if(!n)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Ju(s,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Km(s)}break e;case"textarea":np(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Zr(e,!!i.multiple,t,!1)}}}function gp(e,t,i){if(Ef)return e(t,i);Ef=!0;try{var s=e(t);return s}finally{if(Ef=!1,(Eo!==null||xo!==null)&&(uo(),Eo&&(t=Eo,e=xo,xo=Eo=null,bp(t),e)))for(t=0;t<e.length;t++)bp(e[t])}}function oa(e,t){var i=e.stateNode;if(i===null)return null;var s=i[mi]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof i+"` type.");return i}function vp(){if(Qc)return Qc;var e,t=Cf,i=t.length,s,n="value"in Vn?Vn.value:Vn.textContent,r=n.length;for(e=0;e<i&&t[e]===n[e];e++);var c=i-e;for(s=1;s<=c&&t[i-s]===n[r-s];s++);return Qc=n.slice(e,1<s?1-s:void 0)}function Yl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Vl(){return!0}function _p(){return!1}function yi(e){function t(i,s,n,r,c){this._reactName=i,this._targetInst=n,this.type=s,this.nativeEvent=r,this.target=c,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(r):r[b]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Vl:_p,this.isPropagationStopped=_p,this}return et(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Vl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Vl)},persist:function(){},isPersistent:Vl}),t}function Ry(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Z1[e])?!!t[e]:!1}function ah(){return Ry}function wp(e,t){switch(e){case"keyup":return uN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==k_;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function Ty(e,t){switch(e){case"compositionend":return yp(t);case"keypress":return t.which!==T_?null:(A_=!0,B_);case"textInput":return e=t.data,e===B_&&A_?null:e;default:return null}}function By(e,t){if(Co)return e==="compositionend"||!Tf&&wp(e,t)?(e=vp(),Qc=Cf=Vn=null,Co=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return R_&&t.locale!=="ko"?null:t.data;default:return null}}function Sp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dN[e.type]:t==="textarea"}function Ay(e){if(!Hs)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t=typeof t[e]=="function"),t}function Np(e,t,i,s){Eo?xo?xo.push(s):xo=[s]:Eo=s,t=Tc(t,"onChange"),0<t.length&&(i=new Kc("onChange","change",null,i,s),e.push({event:i,listeners:t}))}function My(e){rv(e,0)}function Xl(e){var t=Re(e);if(Km(t))return e}function Ep(e,t){if(e==="change")return t}function xp(){$a&&($a.detachEvent("onpropertychange",Cp),qa=$a=null)}function Cp(e){if(e.propertyName==="value"&&Xl(qa)){var t=[];Np(t,qa,e,oh(e)),gp(My,t)}}function Oy(e,t,i){e==="focusin"?(xp(),$a=t,qa=i,$a.attachEvent("onpropertychange",Cp)):e==="focusout"&&xp()}function Ly(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xl(qa)}function jy(e,t){if(e==="click")return Xl(t)}function Yy(e,t){if(e==="input"||e==="change")return Xl(t)}function Vy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function aa(e,t){if(bi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var n=i[s];if(!cs.call(t,n)||!bi(e[n],t[n]))return!1}return!0}function Dp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kp(e,t){var i=Dp(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Dp(i)}}function Rp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ol(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Ol(e.document)}return t}function lh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Bp(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Af||Do==null||Do!==Ol(s)||(s=Do,"selectionStart"in s&&lh(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Pa&&aa(Pa,s)||(Pa=s,s=Tc(Bf,"onSelect"),0<s.length&&(t=new Kc("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Do)))}function hr(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}function dr(e){if(Mf[e])return Mf[e];if(!ko[e])return e;var t=ko[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in O_)return Mf[e]=t[i];return e}function rs(e,t){X_.set(e,t),at(t,[e])}function Xy(e){for(var t=Jc,i=0;i<e.length;i++){var s=e[i];if(typeof s=="object"&&s!==null)if(Ft(s)&&s.length===2&&typeof s[0]=="string"){if(t!==Jc&&t!==Vf)return jf;t=Vf}else return jf;else{if(typeof s=="function"||typeof s=="string"&&50<s.length||t!==Jc&&t!==Yf)return jf;t=Yf}}return t}function ch(e,t,i,s){for(var n in e)cs.call(e,n)&&n[0]!=="_"&&vs(n,e[n],t,i,s)}function vs(e,t,i,s,n){switch(typeof t){case"object":if(t===null){t="null";break}else{if(t.$$typeof===Os){var r=y(t.type)||"…",c=t.key;t=t.props;var b=Object.keys(t),D=b.length;if(c==null&&D===0){t="<"+r+" />";break}if(3>s||D===1&&b[0]==="children"&&c==null){t="<"+r+" … />";break}i.push([n+" ".repeat(s)+e,"<"+r]),c!==null&&vs("key",c,i,s+1,n),e=!1;for(var A in t)A==="children"?t.children!=null&&(!Ft(t.children)||0<t.children.length)&&(e=!0):cs.call(t,A)&&A[0]!=="_"&&vs(A,t[A],i,s+1,n);i.push(["",e?">…</"+r+">":"/>"]);return}if(r=Object.prototype.toString.call(t),r=r.slice(8,r.length-1),r==="Array"){if(A=Xy(t),A===Yf||A===Jc){t=JSON.stringify(t);break}else if(A===Vf){for(i.push([n+" ".repeat(s)+e,""]),e=0;e<t.length;e++)r=t[e],vs(r[0],r[1],i,s+1,n);return}}if(r==="Promise"){if(t.status==="fulfilled"){if(r=i.length,vs(e,t.value,i,s,n),i.length>r){i=i[r],i[1]="Promise<"+(i[1]||"Object")+">";return}}else if(t.status==="rejected"&&(r=i.length,vs(e,t.reason,i,s,n),i.length>r)){i=i[r],i[1]="Rejected Promise<"+i[1]+">";return}i.push([" ".repeat(s)+e,"Promise"]);return}r==="Object"&&(A=Object.getPrototypeOf(t))&&typeof A.constructor=="function"&&(r=A.constructor.name),i.push([n+" ".repeat(s)+e,r==="Object"?3>s?"":"…":r]),3>s&&ch(t,i,s+1,n);return}case"function":t=t.name===""?"() => {}":t.name+"() {}";break;case"string":t=t===_N?"…":JSON.stringify(t);break;case"undefined":t="undefined";break;case"boolean":t=t?"true":"false";break;default:t=String(t)}i.push([n+" ".repeat(s)+e,t])}function Ap(e,t,i,s){var n=!0;for(c in e)c in t||(i.push([eu+" ".repeat(s)+c,"…"]),n=!1);for(var r in t)if(r in e){var c=e[r],b=t[r];if(c!==b){if(s===0&&r==="children")n=" ".repeat(s)+r,i.push([eu+n,"…"],[tu+n,"…"]);else{if(!(3<=s)){if(typeof c=="object"&&typeof b=="object"&&c!==null&&b!==null&&c.$$typeof===b.$$typeof)if(b.$$typeof===Os){if(c.type===b.type&&c.key===b.key){c=y(b.type)||"…",n=" ".repeat(s)+r,c="<"+c+" … />",i.push([eu+n,c],[tu+n,c]),n=!1;continue}}else{var D=Object.prototype.toString.call(c),A=Object.prototype.toString.call(b);if(D===A&&(A==="[object Object]"||A==="[object Array]")){D=[z_+" ".repeat(s)+r,A==="[object Array]"?"Array":""],i.push(D),A=i.length,Ap(c,b,i,s+1)?A===i.length&&(D[1]="Referentially unequal but deeply equal objects. Consider memoization."):n=!1;continue}}else if(typeof c=="function"&&typeof b=="function"&&c.name===b.name&&c.length===b.length&&(D=Function.prototype.toString.call(c),A=Function.prototype.toString.call(b),D===A)){c=b.name===""?"() => {}":b.name+"() {}",i.push([z_+" ".repeat(s)+r,c+" Referentially unequal function closure. Consider memoization."]);continue}}vs(r,c,i,s,eu),vs(r,b,i,s,tu)}n=!1}}else i.push([tu+" ".repeat(s)+r,"…"]),n=!1;return n}function os(e){ot=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function _s(e,t,i,s){Et&&(Hn.start=t,Hn.end=i,nn.color="warning",nn.tooltipText=s,nn.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,s,Hn)):performance.measure(s,Hn))}function Hl(e,t,i){_s(e,t,i,"Reconnect")}function Ul(e,t,i,s,n){var r=M(e);if(r!==null&&Et){var c=e.alternate,b=e.actualDuration;if(c===null||c.child!==e.child)for(var D=e.child;D!==null;D=D.sibling)b-=D.actualDuration;s=.5>b?s?"tertiary-light":"primary-light":10>b?s?"tertiary":"primary":100>b?s?"tertiary-dark":"primary-dark":"error";var A=e.memoizedProps;b=e._debugTask,A!==null&&c!==null&&c.memoizedProps!==A?(D=[wN],A=Ap(c.memoizedProps,A,D,0),1<D.length&&(A&&!Xn&&(c.lanes&n)===0&&100<e.actualDuration?(Xn=!0,D[0]=yN,nn.color="warning",nn.tooltipText=I_):(nn.color=s,nn.tooltipText=r),nn.properties=D,Hn.start=t,Hn.end=i,b!=null?b.run(performance.measure.bind(performance,""+r,Hn)):performance.measure(""+r,Hn))):b!=null?b.run(console.timeStamp.bind(console,r,t,i,Wi,void 0,s)):console.timeStamp(r,t,i,Wi,void 0,s)}}function uh(e,t,i,s){if(Et){var n=M(e);if(n!==null){for(var r=null,c=[],b=0;b<s.length;b++){var D=s[b];r==null&&D.source!==null&&(r=D.source._debugTask),D=D.value,c.push(["Error",typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D)])}e.key!==null&&vs("key",e.key,c,0,""),e.memoizedProps!==null&&ch(e.memoizedProps,c,0,""),r==null&&(r=e._debugTask),e={start:t,end:i,detail:{devtools:{color:"error",track:Wi,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:c}}},r?r.run(performance.measure.bind(performance,""+n,e)):performance.measure(""+n,e)}}}function ws(e,t,i,s,n){if(n!==null){if(Et){var r=M(e);if(r!==null){s=[];for(var c=0;c<n.length;c++){var b=n[c].value;s.push(["Error",typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b)])}e.key!==null&&vs("key",e.key,s,0,""),e.memoizedProps!==null&&ch(e.memoizedProps,s,0,""),t={start:t,end:i,detail:{devtools:{color:"error",track:Wi,tooltipText:"A lifecycle or effect errored",properties:s}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,""+r,t)):performance.measure(""+r,t)}}}else r=M(e),r!==null&&Et&&(n=1>s?"secondary-light":100>s?"secondary":500>s?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,r,t,i,Wi,void 0,n)):console.timeStamp(r,t,i,Wi,void 0,n))}function Hy(e,t,i,s){if(Et&&!(t<=e)){var n=(i&738197653)===i?"tertiary-dark":"primary-dark";i=(i&536870912)===i?"Prepared":(i&201326741)===i?"Hydrated":"Render",s?s.run(console.timeStamp.bind(console,i,e,t,ot,nt,n)):console.timeStamp(i,e,t,ot,nt,n)}}function Mp(e,t,i,s){!Et||t<=e||(i=(i&738197653)===i?"tertiary-dark":"primary-dark",s?s.run(console.timeStamp.bind(console,"Prewarm",e,t,ot,nt,i)):console.timeStamp("Prewarm",e,t,ot,nt,i))}function Op(e,t,i,s){!Et||t<=e||(i=(i&738197653)===i?"tertiary-dark":"primary-dark",s?s.run(console.timeStamp.bind(console,"Suspended",e,t,ot,nt,i)):console.timeStamp("Suspended",e,t,ot,nt,i))}function Uy(e,t,i,s,n,r){if(Et&&!(t<=e)){i=[];for(var c=0;c<s.length;c++){var b=s[c].value;i.push(["Recoverable Error",typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b)])}e={start:e,end:t,detail:{devtools:{color:"primary-dark",track:ot,trackGroup:nt,tooltipText:n?"Hydration Failed":"Recovered after Error",properties:i}}},r?r.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function hh(e,t,i,s){!Et||t<=e||(s?s.run(console.timeStamp.bind(console,"Errored",e,t,ot,nt,"error")):console.timeStamp("Errored",e,t,ot,nt,"error"))}function zy(e,t,i,s){!Et||t<=e||(s?s.run(console.timeStamp.bind(console,i,e,t,ot,nt,"secondary-light")):console.timeStamp(i,e,t,ot,nt,"secondary-light"))}function Lp(e,t,i,s,n){if(Et&&!(t<=e)){for(var r=[],c=0;c<i.length;c++){var b=i[c].value;r.push(["Error",typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b)])}e={start:e,end:t,detail:{devtools:{color:"error",track:ot,trackGroup:nt,tooltipText:s?"Remaining Effects Errored":"Commit Errored",properties:r}}},n?n.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function dh(e,t,i){!Et||t<=e||console.timeStamp("Animating",e,t,ot,nt,"secondary-dark")}function zl(){for(var e=Ro,t=Xf=Ro=0;t<e;){var i=Fi[t];Fi[t++]=null;var s=Fi[t];Fi[t++]=null;var n=Fi[t];Fi[t++]=null;var r=Fi[t];if(Fi[t++]=null,s!==null&&n!==null){var c=s.pending;c===null?n.next=n:(n.next=c.next,c.next=n),s.pending=n}r!==0&&jp(i,n,r)}}function Il(e,t,i,s){Fi[Ro++]=e,Fi[Ro++]=t,Fi[Ro++]=i,Fi[Ro++]=s,Xf|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function fh(e,t,i,s){return Il(e,t,i,s),$l(e)}function ai(e,t){return Il(e,null,null,t),$l(e)}function jp(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var n=!1,r=e.return;r!==null;)r.childLanes|=i,s=r.alternate,s!==null&&(s.childLanes|=i),r.tag===22&&(e=r.stateNode,e===null||e._visibility&Wa||(n=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,n&&t!==null&&(n=31-fi(i),e=r.hiddenUpdates,s=e[n],s===null?e[n]=[t]:s.push(t),t.lane=i|536870912),r):null}function $l(e){if(wl>YN)throw zr=wl=0,yl=vm=null,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.");zr>VN&&(zr=0,yl=null,console.error("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.")),e.alternate===null&&(e.flags&4098)!==0&&Zg(e);for(var t=e,i=t.return;i!==null;)t.alternate===null&&(t.flags&4098)!==0&&Zg(e),t=i,i=t.return;return t.tag===3?t.stateNode:null}function fr(e){if(Gi===null)return e;var t=Gi(e);return t===void 0?e:t.current}function mh(e){if(Gi===null)return e;var t=Gi(e);return t===void 0?e!=null&&typeof e.render=="function"&&(t=fr(e.render),e.render!==t)?(t={$$typeof:La,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function Yp(e,t){if(Gi===null)return!1;var i=e.elementType;t=t.type;var s=!1,n=typeof t=="object"&&t!==null?t.$$typeof:null;switch(e.tag){case 1:typeof t=="function"&&(s=!0);break;case 0:(typeof t=="function"||n===Li)&&(s=!0);break;case 11:(n===La||n===Li)&&(s=!0);break;case 14:case 15:(n===Uc||n===Li)&&(s=!0);break;default:return!1}return!!(s&&(e=Gi(i),e!==void 0&&e===Gi(t)))}function Vp(e){Gi!==null&&typeof WeakSet=="function"&&(To===null&&(To=new WeakSet),To.add(e))}function Xp(e,t,i){do{var s=e,n=s.alternate,r=s.child,c=s.sibling,b=s.tag;s=s.type;var D=null;switch(b){case 0:case 15:case 1:D=s;break;case 11:D=s.render}if(Gi===null)throw Error("Expected resolveFamily to be set during hot reload.");var A=!1;if(s=!1,D!==null&&(D=Gi(D),D!==void 0&&(i.has(D)?s=!0:t.has(D)&&(b===1?s=!0:A=!0))),To!==null&&(To.has(e)||n!==null&&To.has(n))&&(s=!0),s&&(e._debugNeedsRemount=!0),(s||A)&&(n=ai(e,2),n!==null&&Bt(n,e,2)),r===null||s||Xp(r,t,i),c===null)break;e=c}while(!0)}function Iy(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,$_||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function ph(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fs(e,t){var i=e.alternate;switch(i===null?(i=m(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i._debugOwner=e._debugOwner,i._debugStack=e._debugStack,i._debugTask=e._debugTask,i._debugHookTypes=e._debugHookTypes,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null,i.actualDuration=-0,i.actualStartTime=-1.1),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i.selfBaseDuration=e.selfBaseDuration,i.treeBaseDuration=e.treeBaseDuration,i._debugInfo=e._debugInfo,i._debugNeedsRemount=e._debugNeedsRemount,i.tag){case 0:case 15:i.type=fr(e.type);break;case 1:i.type=fr(e.type);break;case 11:i.type=mh(e.type)}return i}function Hp(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},e.selfBaseDuration=i.selfBaseDuration,e.treeBaseDuration=i.treeBaseDuration),e}function bh(e,t,i,s,n,r){var c=0,b=e;if(typeof e=="function")ph(e)&&(c=1),b=fr(b);else if(typeof e=="string")c=de(),c=ZS(e,i,c)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case uf:return t=m(31,i,t,n),t.elementType=uf,t.lanes=r,t;case vo:return mr(i.children,n,r,t);case Hc:c=8,n|=ci,n|=us;break;case of:return e=i,s=n,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),t=m(12,e,t,s|Fe),t.elementType=of,t.lanes=r,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case lf:return t=m(13,i,t,n),t.elementType=lf,t.lanes=r,t;case cf:return t=m(19,i,t,n),t.elementType=cf,t.lanes=r,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ls:c=10;break e;case af:c=9;break e;case La:c=11,b=mh(b);break e;case Uc:c=14;break e;case Li:c=16,b=null;break e}b="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(b+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?i="null":Ft(e)?i="array":e!==void 0&&e.$$typeof===Os?(i="<"+(y(e.type)||"Unknown")+" />",b=" Did you accidentally export a JSX literal instead of a component?"):i=typeof e,(c=s?T(s):null)&&(b+=`
|
|
117
|
-
|
|
118
|
-
Check the render method of \``+c+"`."),c=29,i=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(i+"."+b)),b=null}return t=m(c,i,t,n),t.elementType=e,t.type=b,t.lanes=r,t._debugOwner=s,t}function ql(e,t,i){return t=bh(e.type,e.key,e.props,e._owner,t,i),t._debugOwner=e._owner,t._debugStack=e._debugStack,t._debugTask=e._debugTask,t}function mr(e,t,i,s){return e=m(7,e,s,t),e.lanes=i,e}function gh(e,t,i){return e=m(6,e,null,t),e.lanes=i,e}function Up(e){var t=m(18,null,null,Ye);return t.stateNode=e,t}function vh(e,t,i){return t=m(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ri(e,t){if(typeof e=="object"&&e!==null){var i=Hf.get(e);return i!==void 0?i:(t={value:e,source:t,stack:F(t)},Hf.set(e,t),t)}return{value:e,source:t,stack:F(t)}}function Gs(e,t){Sn(),Bo[Ao++]=Fa,Bo[Ao++]=iu,iu=e,Fa=t}function zp(e,t,i){Sn(),Qi[Ki++]=on,Qi[Ki++]=an,Qi[Ki++]=Dr,Dr=e;var s=on;e=an;var n=32-fi(s)-1;s&=~(1<<n),i+=1;var r=32-fi(t)+n;if(30<r){var c=n-n%5;r=(s&(1<<c)-1).toString(32),s>>=c,n-=c,on=1<<32-fi(t)+n|i<<n|s,an=r+e}else on=1<<r|i<<n|s,an=e}function _h(e){Sn(),e.return!==null&&(Gs(e,1),zp(e,1,0))}function wh(e){for(;e===iu;)iu=Bo[--Ao],Bo[Ao]=null,Fa=Bo[--Ao],Bo[Ao]=null;for(;e===Dr;)Dr=Qi[--Ki],Qi[Ki]=null,an=Qi[--Ki],Qi[Ki]=null,on=Qi[--Ki],Qi[Ki]=null}function Ip(){return Sn(),Dr!==null?{id:on,overflow:an}:null}function $p(e,t){Sn(),Qi[Ki++]=on,Qi[Ki++]=an,Qi[Ki++]=Dr,on=t.id,an=t.overflow,Dr=e}function Sn(){it||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function pr(e,t){if(e.return===null){if(Yi===null)Yi={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t};else{if(Yi.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Yi.distanceFromLeaf>t&&(Yi.distanceFromLeaf=t)}return Yi}var i=pr(e.return,t+1).children;return 0<i.length&&i[i.length-1].fiber===e?(i=i[i.length-1],i.distanceFromLeaf>t&&(i.distanceFromLeaf=t),i):(t={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t},i.push(t),t)}function qp(){it&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Pl(e,t){Us||(e=pr(e,0),e.serverProps=null,t!==null&&(t=Nv(t),e.serverTail.push(t)))}function Nn(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,i="",s=Yi;throw s!==null&&(Yi=null,i=nh(s)),la(Ri(Error("Hydration failed because the server rendered "+(t?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
119
|
-
|
|
120
|
-
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
121
|
-
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
122
|
-
- Date formatting in a user's locale which doesn't match the server.
|
|
123
|
-
- External changing data without sending a snapshot of it along with the HTML.
|
|
124
|
-
- Invalid HTML tag nesting.
|
|
125
|
-
|
|
126
|
-
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
127
|
-
|
|
128
|
-
https://react.dev/link/hydration-mismatch`+i),e)),Uf}function Pp(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[ri]=e,t[mi]=s,Hd(i,s),i){case"dialog":st("cancel",t),st("close",t);break;case"iframe":case"object":case"embed":st("load",t);break;case"video":case"audio":for(i=0;i<Sl.length;i++)st(Sl[i],t);break;case"source":st("error",t);break;case"img":case"image":case"link":st("error",t),st("load",t);break;case"details":st("toggle",t);break;case"input":hi("input",s),st("invalid",t),Zm(t,s),Jm(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"option":ep(t,s);break;case"select":hi("select",s),st("invalid",t),ip(t,s);break;case"textarea":hi("textarea",s),st("invalid",t),sp(t,s),rp(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||cv(t.textContent,i)?(s.popover!=null&&(st("beforetoggle",t),st("toggle",t)),s.onScroll!=null&&st("scroll",t),s.onScrollEnd!=null&&st("scrollend",t),s.onClick!=null&&(t.onclick=Ws),t=!0):t=!1,t||Nn(e,!0)}function Wp(e){for(oi=e.return;oi;)switch(oi.tag){case 5:case 31:case 13:Zi=!1;return;case 27:case 3:Zi=!0;return;default:oi=oi.return}}function to(e){if(e!==oi)return!1;if(!it)return Wp(e),it=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||qd(e.type,e.memoizedProps)),i=!i),i&&xt){for(i=xt;i;){var s=pr(e,0),n=Nv(i);s.serverTail.push(n),i=n.type==="Suspense"?Gd(i):Oi(i.nextSibling)}Nn(e)}if(Wp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");xt=Gd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");xt=Gd(e)}else t===27?(t=xt,Mn(e.type)?(e=Tm,Tm=null,xt=e):xt=t):xt=oi?Oi(e.stateNode.nextSibling):null;return!0}function br(){xt=oi=null,Us=it=!1}function yh(){var e=zn;return e!==null&&(wi===null?wi=e:wi.push.apply(wi,e),zn=null),e}function la(e){zn===null?zn=[e]:zn.push(e)}function Sh(){var e=Yi;if(e!==null){Yi=null;for(var t=nh(e);0<e.children.length;)e=e.children[0];ae(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
129
|
-
|
|
130
|
-
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
131
|
-
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
132
|
-
- Date formatting in a user's locale which doesn't match the server.
|
|
133
|
-
- External changing data without sending a snapshot of it along with the HTML.
|
|
134
|
-
- Invalid HTML tag nesting.
|
|
135
|
-
|
|
136
|
-
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
137
|
-
|
|
138
|
-
%s%s`,"https://react.dev/link/hydration-mismatch",t)})}}function Wl(){Mo=su=null,Oo=!1}function En(e,t,i){Y(zf,t._currentValue,e),t._currentValue=i,Y(If,t._currentRenderer,e),t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==P_&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=P_}function Qs(e,t){e._currentValue=zf.current;var i=If.current;z(If,t),e._currentRenderer=i,z(zf,t)}function Nh(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}e!==i&&console.error("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 Eh(e,t,i,s){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var r=n.dependencies;if(r!==null){var c=n.child;r=r.firstContext;e:for(;r!==null;){var b=r;r=n;for(var D=0;D<t.length;D++)if(b.context===t[D]){r.lanes|=i,b=r.alternate,b!==null&&(b.lanes|=i),Nh(r.return,i,e),s||(c=null);break e}r=b.next}}else if(n.tag===18){if(c=n.return,c===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");c.lanes|=i,r=c.alternate,r!==null&&(r.lanes|=i),Nh(c,i,e),c=null}else c=n.child;if(c!==null)c.return=n;else for(c=n;c!==null;){if(c===e){c=null;break}if(n=c.sibling,n!==null){n.return=c.return,c=n;break}c=c.return}n=c}}function io(e,t,i,s){e=null;for(var n=t,r=!1;n!==null;){if(!r){if((n.flags&524288)!==0)r=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var c=n.alternate;if(c===null)throw Error("Should have a current fiber. This is a bug in React.");if(c=c.memoizedProps,c!==null){var b=n.type;bi(n.pendingProps.value,c.value)||(e!==null?e.push(b):e=[b])}}else if(n===zc.current){if(c=n.alternate,c===null)throw Error("Should have a current fiber. This is a bug in React.");c.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Dl):e=[Dl])}n=n.return}e!==null&&Eh(t,e,i,s),t.flags|=262144}function Fl(e){for(e=e.firstContext;e!==null;){if(!bi(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gr(e){su=e,Mo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return Oo&&console.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()."),Fp(su,e)}function Gl(e,t){return su===null&&gr(e),Fp(e,t)}function Fp(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Mo===null){if(e===null)throw 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().");Mo=t,e.dependencies={lanes:0,firstContext:t,_debugThenableState:null},e.flags|=524288}else Mo=Mo.next=t;return i}function xh(){return{controller:new EN,data:new Map,refCount:0}}function vr(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function ca(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&xN(CN,function(){e.controller.abort()})}function ys(e,t,i){(e&127)!==0?0>zs&&(zs=Ut(),Qa=nu(t),$f=t,i!=null&&(qf=M(i)),(lt&(Qt|Hi))!==ti&&(At=!0,$n=Ga),e=Ta(),t=Ra(),e!==Lo||t!==Ka?Lo=-1.1:t!==null&&($n=Ga),Tr=e,Ka=t):(e&4194048)!==0&&0>Ji&&(Ji=Ut(),Za=nu(t),W_=t,i!=null&&(F_=M(i)),0>hn)&&(e=Ta(),t=Ra(),(e!==Pn||t!==Br)&&(Pn=-1.1),qn=e,Br=t)}function $y(e){if(0>zs){zs=Ut(),Qa=e._debugTask!=null?e._debugTask:null,(lt&(Qt|Hi))!==ti&&($n=Ga);var t=Ta(),i=Ra();t!==Lo||i!==Ka?Lo=-1.1:i!==null&&($n=Ga),Tr=t,Ka=i}0>Ji&&(Ji=Ut(),Za=e._debugTask!=null?e._debugTask:null,0>hn)&&(e=Ta(),t=Ra(),(e!==Pn||t!==Br)&&(Pn=-1.1),qn=e,Br=t)}function Ks(){var e=kr;return kr=0,e}function Ql(e){var t=kr;return kr=e,t}function ua(e){var t=kr;return kr+=e,t}function Kl(){je=Oe=-1.1}function Ti(){var e=Oe;return Oe=-1.1,e}function Bi(e){0<=e&&(Oe=e)}function Ss(){var e=Rt;return Rt=-0,e}function Ns(e){0<=e&&(Rt=e)}function Es(){var e=kt;return kt=null,e}function xs(){var e=At;return At=!1,e}function Ch(e){gi=Ut(),0>e.actualStartTime&&(e.actualStartTime=gi)}function Dh(e){if(0<=gi){var t=Ut()-gi;e.actualDuration+=t,e.selfBaseDuration=t,gi=-1}}function Gp(e){if(0<=gi){var t=Ut()-gi;e.actualDuration+=t,gi=-1}}function Cs(){if(0<=gi){var e=Ut(),t=e-gi;gi=-1,kr+=t,Rt+=t,je=e}}function Qp(e){kt===null&&(kt=[]),kt.push(e),cn===null&&(cn=[]),cn.push(e)}function Ds(){gi=Ut(),0>Oe&&(Oe=gi)}function ha(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function qy(e,t){if(el===null){var i=el=[];Wf=0,Ar=jd(),jo={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Wf++,t.then(Kp,Kp),t}function Kp(){if(--Wf===0&&(-1<Ji||(hn=-1.1),el!==null)){jo!==null&&(jo.status="fulfilled");var e=el;el=null,Ar=0,jo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Py(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(n){i.push(n)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var n=0;n<i.length;n++)(0,i[n])(t)},function(n){for(s.status="rejected",s.reason=n,n=0;n<i.length;n++)(0,i[n])(void 0)}),s}function kh(){var e=Mr.current;return e!==null?e:_t.pooledCache}function Zl(e,t){t===null?Y(Mr,Mr.current,e):Y(Mr,t.pool,e)}function Zp(){var e=kh();return e===null?null:{parent:Ht._currentValue,pool:e}}function Jp(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function eb(e){return e=e.status,e==="fulfilled"||e==="rejected"}function tb(e,t,i){he.actQueue!==null&&(he.didUsePromise=!0);var s=e.thenables;if(i=s[i],i===void 0?s.push(t):i!==t&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),t.then(Ws,Ws),t=i),t._debugInfo===void 0){e=performance.now(),s=t.displayName;var n={name:typeof s=="string"?s:"Promise",start:e,end:e,value:t};t._debugInfo=[{awaited:n}],t.status!=="fulfilled"&&t.status!=="rejected"&&(e=function(){n.end=performance.now()},t.then(e,e))}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sb(e),e;default:if(typeof t.status=="string")t.then(Ws,Ws);else{if(e=_t,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sb(e),e}throw Lr=t,al=!0,Yo}}function xn(e){try{return BN(e)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(Lr=t,al=!0,Yo):t}}function ib(){if(Lr===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Lr;return Lr=null,al=!1,e}function sb(e){if(e===Yo||e===du)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ii(e){var t=Ge;return e!=null&&(Ge=t===null?e:t.concat(e)),t}function Rh(){var e=Ge;if(e!=null){for(var t=e.length-1;0<=t;t--)if(e[t].name!=null){var i=e[t].debugTask;if(i!=null)return i}}return null}function Jl(e,t,i){for(var s=Object.keys(e.props),n=0;n<s.length;n++){var r=s[n];if(r!=="children"&&r!=="key"){t===null&&(t=ql(e,i.mode,0),t._debugInfo=Ge,t.return=i),ae(t,function(c){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c)},r);break}}}function ec(e){var t=ll;return ll+=1,Vo===null&&(Vo=Jp()),tb(Vo,e,t)}function da(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function nb(e,t){throw t.$$typeof===c1?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
139
|
-
- Multiple copies of the "react" package is used.
|
|
140
|
-
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
141
|
-
- A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function tc(e,t){var i=Rh();i!==null?i.run(nb.bind(null,e,t)):nb(e,t)}function rb(e,t){var i=M(e)||"Component";m0[i]||(m0[i]=!0,t=t.displayName||t.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
142
|
-
root.render(%s)`,t,t,t):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
143
|
-
<%s>{%s}</%s>`,t,t,i,t,i))}function ic(e,t){var i=Rh();i!==null?i.run(rb.bind(null,e,t)):rb(e,t)}function ob(e,t){var i=M(e)||"Component";p0[i]||(p0[i]=!0,t=String(t),e.tag===3?console.error(`Symbols are not valid as a React child.
|
|
144
|
-
root.render(%s)`,t):console.error(`Symbols are not valid as a React child.
|
|
145
|
-
<%s>%s</%s>`,i,t,i))}function sc(e,t){var i=Rh();i!==null?i.run(ob.bind(null,e,t)):ob(e,t)}function ab(e){function t($,W){if(e){var G=$.deletions;G===null?($.deletions=[W],$.flags|=16):G.push(W)}}function i($,W){if(!e)return null;for(;W!==null;)t($,W),W=W.sibling;return null}function s($){for(var W=new Map;$!==null;)$.key!==null?W.set($.key,$):W.set($.index,$),$=$.sibling;return W}function n($,W){return $=Fs($,W),$.index=0,$.sibling=null,$}function r($,W,G){return $.index=G,e?(G=$.alternate,G!==null?(G=G.index,G<W?($.flags|=67108866,W):G):($.flags|=67108866,W)):($.flags|=1048576,W)}function c($){return e&&$.alternate===null&&($.flags|=67108866),$}function b($,W,G,fe){return W===null||W.tag!==6?(W=gh(G,$.mode,fe),W.return=$,W._debugOwner=$,W._debugTask=$._debugTask,W._debugInfo=Ge,W):(W=n(W,G),W.return=$,W._debugInfo=Ge,W)}function D($,W,G,fe){var Ee=G.type;return Ee===vo?(W=Q($,W,G.props.children,fe,G.key),Jl(G,W,$),W):W!==null&&(W.elementType===Ee||Yp(W,G)||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Li&&xn(Ee)===W.type)?(W=n(W,G.props),da(W,G),W.return=$,W._debugOwner=G._owner,W._debugInfo=Ge,W):(W=ql(G,$.mode,fe),da(W,G),W.return=$,W._debugInfo=Ge,W)}function A($,W,G,fe){return W===null||W.tag!==4||W.stateNode.containerInfo!==G.containerInfo||W.stateNode.implementation!==G.implementation?(W=vh(G,$.mode,fe),W.return=$,W._debugInfo=Ge,W):(W=n(W,G.children||[]),W.return=$,W._debugInfo=Ge,W)}function Q($,W,G,fe,Ee){return W===null||W.tag!==7?(W=mr(G,$.mode,fe,Ee),W.return=$,W._debugOwner=$,W._debugTask=$._debugTask,W._debugInfo=Ge,W):(W=n(W,G),W.return=$,W._debugInfo=Ge,W)}function Z($,W,G){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=gh(""+W,$.mode,G),W.return=$,W._debugOwner=$,W._debugTask=$._debugTask,W._debugInfo=Ge,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case Os:return G=ql(W,$.mode,G),da(G,W),G.return=$,$=ii(W._debugInfo),G._debugInfo=Ge,Ge=$,G;case go:return W=vh(W,$.mode,G),W.return=$,W._debugInfo=Ge,W;case Li:var fe=ii(W._debugInfo);return W=xn(W),$=Z($,W,G),Ge=fe,$}if(Ft(W)||k(W))return G=mr(W,$.mode,G,null),G.return=$,G._debugOwner=$,G._debugTask=$._debugTask,$=ii(W._debugInfo),G._debugInfo=Ge,Ge=$,G;if(typeof W.then=="function")return fe=ii(W._debugInfo),$=Z($,ec(W),G),Ge=fe,$;if(W.$$typeof===Ls)return Z($,Gl($,W),G);tc($,W)}return typeof W=="function"&&ic($,W),typeof W=="symbol"&&sc($,W),null}function P($,W,G,fe){var Ee=W!==null?W.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Ee!==null?null:b($,W,""+G,fe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case Os:return G.key===Ee?(Ee=ii(G._debugInfo),$=D($,W,G,fe),Ge=Ee,$):null;case go:return G.key===Ee?A($,W,G,fe):null;case Li:return Ee=ii(G._debugInfo),G=xn(G),$=P($,W,G,fe),Ge=Ee,$}if(Ft(G)||k(G))return Ee!==null?null:(Ee=ii(G._debugInfo),$=Q($,W,G,fe,null),Ge=Ee,$);if(typeof G.then=="function")return Ee=ii(G._debugInfo),$=P($,W,ec(G),fe),Ge=Ee,$;if(G.$$typeof===Ls)return P($,W,Gl($,G),fe);tc($,G)}return typeof G=="function"&&ic($,G),typeof G=="symbol"&&sc($,G),null}function re($,W,G,fe,Ee){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return $=$.get(G)||null,b(W,$,""+fe,Ee);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case Os:return G=$.get(fe.key===null?G:fe.key)||null,$=ii(fe._debugInfo),W=D(W,G,fe,Ee),Ge=$,W;case go:return $=$.get(fe.key===null?G:fe.key)||null,A(W,$,fe,Ee);case Li:var He=ii(fe._debugInfo);return fe=xn(fe),W=re($,W,G,fe,Ee),Ge=He,W}if(Ft(fe)||k(fe))return G=$.get(G)||null,$=ii(fe._debugInfo),W=Q(W,G,fe,Ee,null),Ge=$,W;if(typeof fe.then=="function")return He=ii(fe._debugInfo),W=re($,W,G,ec(fe),Ee),Ge=He,W;if(fe.$$typeof===Ls)return re($,W,G,Gl(W,fe),Ee);tc(W,fe)}return typeof fe=="function"&&ic(W,fe),typeof fe=="symbol"&&sc(W,fe),null}function Ne($,W,G,fe){if(typeof G!="object"||G===null)return fe;switch(G.$$typeof){case Os:case go:S($,W,G);var Ee=G.key;if(typeof Ee!="string")break;if(fe===null){fe=new Set,fe.add(Ee);break}if(!fe.has(Ee)){fe.add(Ee);break}ae(W,function(){console.error("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.",Ee)});break;case Li:G=xn(G),Ne($,W,G,fe)}return fe}function xe($,W,G,fe){for(var Ee=null,He=null,Me=null,Te=W,Pe=W=0,Ct=null;Te!==null&&Pe<G.length;Pe++){Te.index>Pe?(Ct=Te,Te=null):Ct=Te.sibling;var Vt=P($,Te,G[Pe],fe);if(Vt===null){Te===null&&(Te=Ct);break}Ee=Ne($,Vt,G[Pe],Ee),e&&Te&&Vt.alternate===null&&t($,Te),W=r(Vt,W,Pe),Me===null?He=Vt:Me.sibling=Vt,Me=Vt,Te=Ct}if(Pe===G.length)return i($,Te),it&&Gs($,Pe),He;if(Te===null){for(;Pe<G.length;Pe++)Te=Z($,G[Pe],fe),Te!==null&&(Ee=Ne($,Te,G[Pe],Ee),W=r(Te,W,Pe),Me===null?He=Te:Me.sibling=Te,Me=Te);return it&&Gs($,Pe),He}for(Te=s(Te);Pe<G.length;Pe++)Ct=re(Te,$,Pe,G[Pe],fe),Ct!==null&&(Ee=Ne($,Ct,G[Pe],Ee),e&&Ct.alternate!==null&&Te.delete(Ct.key===null?Pe:Ct.key),W=r(Ct,W,Pe),Me===null?He=Ct:Me.sibling=Ct,Me=Ct);return e&&Te.forEach(function(_n){return t($,_n)}),it&&Gs($,Pe),He}function St($,W,G,fe){if(G==null)throw Error("An iterable object provided no iterator.");for(var Ee=null,He=null,Me=W,Te=W=0,Pe=null,Ct=null,Vt=G.next();Me!==null&&!Vt.done;Te++,Vt=G.next()){Me.index>Te?(Pe=Me,Me=null):Pe=Me.sibling;var _n=P($,Me,Vt.value,fe);if(_n===null){Me===null&&(Me=Pe);break}Ct=Ne($,_n,Vt.value,Ct),e&&Me&&_n.alternate===null&&t($,Me),W=r(_n,W,Te),He===null?Ee=_n:He.sibling=_n,He=_n,Me=Pe}if(Vt.done)return i($,Me),it&&Gs($,Te),Ee;if(Me===null){for(;!Vt.done;Te++,Vt=G.next())Me=Z($,Vt.value,fe),Me!==null&&(Ct=Ne($,Me,Vt.value,Ct),W=r(Me,W,Te),He===null?Ee=Me:He.sibling=Me,He=Me);return it&&Gs($,Te),Ee}for(Me=s(Me);!Vt.done;Te++,Vt=G.next())Pe=re(Me,$,Te,Vt.value,fe),Pe!==null&&(Ct=Ne($,Pe,Vt.value,Ct),e&&Pe.alternate!==null&&Me.delete(Pe.key===null?Te:Pe.key),W=r(Pe,W,Te),He===null?Ee=Pe:He.sibling=Pe,He=Pe);return e&&Me.forEach(function(tE){return t($,tE)}),it&&Gs($,Te),Ee}function rt($,W,G,fe){if(typeof G=="object"&&G!==null&&G.type===vo&&G.key===null&&(Jl(G,null,$),G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case Os:var Ee=ii(G._debugInfo);e:{for(var He=G.key;W!==null;){if(W.key===He){if(He=G.type,He===vo){if(W.tag===7){i($,W.sibling),fe=n(W,G.props.children),fe.return=$,fe._debugOwner=G._owner,fe._debugInfo=Ge,Jl(G,fe,$),$=fe;break e}}else if(W.elementType===He||Yp(W,G)||typeof He=="object"&&He!==null&&He.$$typeof===Li&&xn(He)===W.type){i($,W.sibling),fe=n(W,G.props),da(fe,G),fe.return=$,fe._debugOwner=G._owner,fe._debugInfo=Ge,$=fe;break e}i($,W);break}else t($,W);W=W.sibling}G.type===vo?(fe=mr(G.props.children,$.mode,fe,G.key),fe.return=$,fe._debugOwner=$,fe._debugTask=$._debugTask,fe._debugInfo=Ge,Jl(G,fe,$),$=fe):(fe=ql(G,$.mode,fe),da(fe,G),fe.return=$,fe._debugInfo=Ge,$=fe)}return $=c($),Ge=Ee,$;case go:e:{for(Ee=G,G=Ee.key;W!==null;){if(W.key===G)if(W.tag===4&&W.stateNode.containerInfo===Ee.containerInfo&&W.stateNode.implementation===Ee.implementation){i($,W.sibling),fe=n(W,Ee.children||[]),fe.return=$,$=fe;break e}else{i($,W);break}else t($,W);W=W.sibling}fe=vh(Ee,$.mode,fe),fe.return=$,$=fe}return c($);case Li:return Ee=ii(G._debugInfo),G=xn(G),$=rt($,W,G,fe),Ge=Ee,$}if(Ft(G))return Ee=ii(G._debugInfo),$=xe($,W,G,fe),Ge=Ee,$;if(k(G)){if(Ee=ii(G._debugInfo),He=k(G),typeof He!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Me=He.call(G);return Me===G?($.tag!==0||Object.prototype.toString.call($.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Me)!=="[object Generator]")&&(d0||console.error("Using Iterators 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. You can also use an Iterable that can iterate multiple times over the same items."),d0=!0):G.entries!==He||Kf||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Kf=!0),$=St($,W,Me,fe),Ge=Ee,$}if(typeof G.then=="function")return Ee=ii(G._debugInfo),$=rt($,W,ec(G),fe),Ge=Ee,$;if(G.$$typeof===Ls)return rt($,W,Gl($,G),fe);tc($,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(Ee=""+G,W!==null&&W.tag===6?(i($,W.sibling),fe=n(W,Ee),fe.return=$,$=fe):(i($,W),fe=gh(Ee,$.mode,fe),fe.return=$,fe._debugOwner=$,fe._debugTask=$._debugTask,fe._debugInfo=Ge,$=fe),c($)):(typeof G=="function"&&ic($,G),typeof G=="symbol"&&sc($,G),i($,W))}return function($,W,G,fe){var Ee=Ge;Ge=null;try{ll=0;var He=rt($,W,G,fe);return Vo=null,He}catch(Ct){if(Ct===Yo||Ct===du)throw Ct;var Me=m(29,Ct,null,$.mode);Me.lanes=fe,Me.return=$;var Te=Me._debugInfo=Ge;if(Me._debugOwner=$._debugOwner,Me._debugTask=$._debugTask,Te!=null){for(var Pe=Te.length-1;0<=Pe;Pe--)if(typeof Te[Pe].stack=="string"){Me._debugOwner=Te[Pe],Me._debugTask=Te[Pe].debugTask;break}}return Me}finally{Ge=Ee}}}function lb(e,t){var i=Ft(e);return e=!i&&typeof k(e)=="function",i||e?(i=i?"array":"iterable",console.error("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>",i,t,i),!1):!0}function Th(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Cn(e){return{lane:e,tag:g0,payload:null,callback:null,next:null}}function Dn(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Jf===s&&!w0){var n=M(e);console.error(`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.
|
|
146
|
-
|
|
147
|
-
Please update the following component: %s`,n),w0=!0}return(lt&Qt)!==ti?(n=s.pending,n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t,t=$l(e),jp(e,null,i),t):(Il(e,s,t,i),$l(e))}function fa(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Mt(e,i)}}function nc(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var n=null,r=null;if(i=i.firstBaseUpdate,i!==null){do{var c={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};r===null?n=r=c:r=r.next=c,i=i.next}while(i!==null);r===null?n=r=t:r=r.next=t}else n=r=t;i={baseState:s.baseState,firstBaseUpdate:n,lastBaseUpdate:r,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}function ma(){if(em){var e=jo;if(e!==null)throw e}}function pa(e,t,i,s){em=!1;var n=e.updateQueue;Wn=!1,Jf=n.shared;var r=n.firstBaseUpdate,c=n.lastBaseUpdate,b=n.shared.pending;if(b!==null){n.shared.pending=null;var D=b,A=D.next;D.next=null,c===null?r=A:c.next=A,c=D;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,b=Q.lastBaseUpdate,b!==c&&(b===null?Q.firstBaseUpdate=A:b.next=A,Q.lastBaseUpdate=D))}if(r!==null){var Z=n.baseState;c=0,Q=A=D=null,b=r;do{var P=b.lane&-536870913,re=P!==b.lane;if(re?(Qe&P)===P:(s&P)===P){P!==0&&P===Ar&&(em=!0),Q!==null&&(Q=Q.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{P=e;var Ne=b,xe=t,St=i;switch(Ne.tag){case v0:if(Ne=Ne.payload,typeof Ne=="function"){Oo=!0;var rt=Ne.call(St,Z,xe);if(P.mode&ci){De(!0);try{Ne.call(St,Z,xe)}finally{De(!1)}}Oo=!1,Z=rt;break e}Z=Ne;break e;case Zf:P.flags=P.flags&-65537|128;case g0:if(rt=Ne.payload,typeof rt=="function"){if(Oo=!0,Ne=rt.call(St,Z,xe),P.mode&ci){De(!0);try{rt.call(St,Z,xe)}finally{De(!1)}}Oo=!1}else Ne=rt;if(Ne==null)break e;Z=et({},Z,Ne);break e;case _0:Wn=!0}}P=b.callback,P!==null&&(e.flags|=64,re&&(e.flags|=8192),re=n.callbacks,re===null?n.callbacks=[P]:re.push(P))}else re={lane:P,tag:b.tag,payload:b.payload,callback:b.callback,next:null},Q===null?(A=Q=re,D=Z):Q=Q.next=re,c|=P;if(b=b.next,b===null){if(b=n.shared.pending,b===null)break;re=b,b=re.next,re.next=null,n.lastBaseUpdate=re,n.shared.pending=null}}while(!0);Q===null&&(D=Z),n.baseState=D,n.firstBaseUpdate=A,n.lastBaseUpdate=Q,r===null&&(n.shared.lanes=0),Qn|=c,e.lanes=c,e.memoizedState=Z}Jf=null}function cb(e,t){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function Wy(e,t){var i=e.shared.hiddenCallbacks;if(i!==null)for(e.shared.hiddenCallbacks=null,e=0;e<i.length;e++)cb(i[e],t)}function ub(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)cb(i[e],t)}function hb(e,t){var i=$s;Y(mu,i,e),Y(Xo,t,e),$s=i|t.baseLanes}function Ah(e){Y(mu,$s,e),Y(Xo,Xo.current,e)}function Mh(e){$s=mu.current,z(Xo,e),z(mu,e)}function kn(e){var t=e.alternate;Y(Yt,Yt.current&Ho,e),Y(Vi,e,e),es===null&&(t===null||Xo.current!==null||t.memoizedState!==null)&&(es=e)}function Oh(e){Y(Yt,Yt.current,e),Y(Vi,e,e),es===null&&(es=e)}function db(e){e.tag===22?(Y(Yt,Yt.current,e),Y(Vi,e,e),es===null&&(es=e)):Rn(e)}function Rn(e){Y(Yt,Yt.current,e),Y(Vi,Vi.current,e)}function Ai(e){z(Vi,e),es===e&&(es=null),z(Yt,e)}function rc(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Wd(i)||Fd(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Je(){var e=le;is===null?is=[e]:is.push(e)}function _e(){var e=le;if(is!==null&&(mn++,is[mn]!==e)){var t=M(Xe);if(!y0.has(t)&&(y0.add(t),is!==null)){for(var i="",s=0;s<=mn;s++){var n=is[s],r=s===mn?e:n;for(n=s+1+". "+n;30>n.length;)n+=" ";n+=r+`
|
|
148
|
-
`,i+=n}console.error(`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://react.dev/link/rules-of-hooks
|
|
149
|
-
|
|
150
|
-
Previous render Next render
|
|
151
|
-
------------------------------------------------------
|
|
152
|
-
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
153
|
-
`,t,i)}}}function so(e){e==null||Ft(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",le,typeof e)}function oc(){var e=M(Xe);N0.has(e)||(N0.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function Ot(){throw 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:
|
|
154
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
155
|
-
2. You might be breaking the Rules of Hooks
|
|
156
|
-
3. You might have more than one copy of React in the same app
|
|
157
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Lh(e,t){if(hl)return!1;if(t===null)return console.error("%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.",le),!1;e.length!==t.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
158
|
-
|
|
159
|
-
Previous: %s
|
|
160
|
-
Incoming: %s`,le,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var i=0;i<t.length&&i<e.length;i++)if(!bi(e[i],t[i]))return!1;return!0}function jh(e,t,i,s,n,r){dn=r,Xe=t,is=e!==null?e._debugHookTypes:null,mn=-1,hl=e!==null&&e.type!==t.type,(Object.prototype.toString.call(i)==="[object AsyncFunction]"||Object.prototype.toString.call(i)==="[object AsyncGeneratorFunction]")&&(r=M(Xe),tm.has(r)||(tm.add(r),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",r===null?"An unknown Component":"<"+r+">"))),t.memoizedState=null,t.updateQueue=null,t.lanes=0,he.H=e!==null&&e.memoizedState!==null?sm:is!==null?E0:im,Yr=r=(t.mode&ci)!==Ye;var c=Ff(i,s,n);if(Yr=!1,zo&&(c=Yh(t,i,s,n)),r){De(!0);try{c=Yh(t,i,s,n)}finally{De(!1)}}return fb(e,t),c}function fb(e,t){t._debugHookTypes=is,t.dependencies===null?fn!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:fn}):t.dependencies._debugThenableState=fn,he.H=dl;var i=vt!==null&&vt.next!==null;if(dn=0,is=le=zt=vt=Xe=null,mn=-1,e!==null&&(e.flags&65011712)!==(t.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),bu=!1,ul=0,fn=null,i)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||It||(e=e.dependencies,e!==null&&Fl(e)&&(It=!0)),al?(al=!1,e=!0):e=!1,e&&(t=M(t)||"Unknown",S0.has(t)||tm.has(t)||(S0.add(t),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Yh(e,t,i,s){Xe=e;var n=0;do{if(zo&&(fn=null),ul=0,zo=!1,n>=MN)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(n+=1,hl=!1,zt=vt=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}mn=-1,he.H=x0,r=Ff(t,i,s)}while(zo);return r}function Fy(){var e=he.H,t=e.useState()[0];return t=typeof t.then=="function"?ba(t):t,e=e.useState()[0],(vt!==null?vt.memoizedState:null)!==e&&(Xe.flags|=1024),t}function Vh(){var e=gu!==0;return gu=0,e}function Xh(e,t,i){t.updateQueue=e.updateQueue,t.flags=(t.mode&us)!==Ye?t.flags&-402655237:t.flags&-2053,e.lanes&=~i}function Hh(e){if(bu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bu=!1}dn=0,is=zt=vt=Xe=null,mn=-1,le=null,zo=!1,ul=gu=0,fn=null}function di(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Xe.memoizedState=zt=e:zt=zt.next=e,zt}function mt(){if(vt===null){var e=Xe.alternate;e=e!==null?e.memoizedState:null}else e=vt.next;var t=zt===null?Xe.memoizedState:zt.next;if(t!==null)zt=t,vt=e;else{if(e===null)throw Xe.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");vt=e,e={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},zt===null?Xe.memoizedState=zt=e:zt=zt.next=e}return zt}function ac(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ba(e){var t=ul;return ul+=1,fn===null&&(fn=Jp()),e=tb(fn,e,t),t=Xe,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,he.H=t!==null&&t.memoizedState!==null?sm:im),e}function Tn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ba(e);if(e.$$typeof===Ls)return Dt(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function _r(e){var t=null,i=Xe.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Xe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ac(),Xe.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0||hl)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=u1;else i.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",i.length,e);return t.index++,i}function as(e,t){return typeof t=="function"?t(e):t}function Uh(e,t,i){var s=di();if(i!==void 0){var n=i(t);if(Yr){De(!0);try{i(t)}finally{De(!1)}}}else n=t;return s.memoizedState=s.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=Jy.bind(null,Xe,e),[s.memoizedState,e]}function no(e){var t=mt();return zh(t,vt,e)}function zh(e,t,i){var s=e.queue;if(s===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");s.lastRenderedReducer=i;var n=e.baseQueue,r=s.pending;if(r!==null){if(n!==null){var c=n.next;n.next=r.next,r.next=c}t.baseQueue!==n&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),t.baseQueue=n=r,s.pending=null}if(r=e.baseState,n===null)e.memoizedState=r;else{t=n.next;var b=c=null,D=null,A=t,Q=!1;do{var Z=A.lane&-536870913;if(Z!==A.lane?(Qe&Z)===Z:(dn&Z)===Z){var P=A.revertLane;if(P===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),Z===Ar&&(Q=!0);else if((dn&P)===P){A=A.next,P===Ar&&(Q=!0);continue}else Z={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},D===null?(b=D=Z,c=r):D=D.next=Z,Xe.lanes|=P,Qn|=P;Z=A.action,Yr&&i(r,Z),r=A.hasEagerState?A.eagerState:i(r,Z)}else P={lane:Z,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},D===null?(b=D=P,c=r):D=D.next=P,Xe.lanes|=Z,Qn|=Z;A=A.next}while(A!==null&&A!==t);if(D===null?c=r:D.next=b,!bi(r,e.memoizedState)&&(It=!0,Q&&(i=jo,i!==null)))throw i;e.memoizedState=r,e.baseState=c,e.baseQueue=D,s.lastRenderedState=r}return n===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ga(e){var t=mt(),i=t.queue;if(i===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");i.lastRenderedReducer=e;var s=i.dispatch,n=i.pending,r=t.memoizedState;if(n!==null){i.pending=null;var c=n=n.next;do r=e(r,c.action),c=c.next;while(c!==n);bi(r,t.memoizedState)||(It=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),i.lastRenderedState=r}return[r,s]}function Ih(e,t,i){var s=Xe,n=di();if(it){if(i===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var r=i();Uo||r===i()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Uo=!0)}else{if(r=t(),Uo||(i=t(),bi(r,i)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Uo=!0)),_t===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Qe&127)!==0||mb(s,t,r)}return n.memoizedState=r,i={value:r,getSnapshot:t},n.queue=i,hc(bb.bind(null,s,i,e),[e]),s.flags|=2048,oo(ts|_i,{destroy:void 0},pb.bind(null,s,i,r,t),null),r}function lc(e,t,i){var s=Xe,n=mt(),r=it;if(r){if(i===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");i=i()}else if(i=t(),!Uo){var c=t();bi(i,c)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Uo=!0)}(c=!bi((vt||n).memoizedState,i))&&(n.memoizedState=i,It=!0),n=n.queue;var b=bb.bind(null,s,n,e);if(Si(2048,_i,b,[e]),n.getSnapshot!==t||c||zt!==null&&zt.memoizedState.tag&ts){if(s.flags|=2048,oo(ts|_i,{destroy:void 0},pb.bind(null,s,n,i,t),null),_t===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");r||(dn&127)!==0||mb(s,t,i)}return i}function mb(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Xe.updateQueue,t===null?(t=ac(),Xe.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function pb(e,t,i,s){t.value=i,t.getSnapshot=s,gb(t)&&vb(e)}function bb(e,t,i){return i(function(){gb(t)&&(ys(2,"updateSyncExternalStore()",e),vb(e))})}function gb(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!bi(e,i)}catch{return!0}}function vb(e){var t=ai(e,2);t!==null&&Bt(t,e,2)}function $h(e){var t=di();if(typeof e=="function"){var i=e;if(e=i(),Yr){De(!0);try{i()}finally{De(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:e},t}function qh(e){e=$h(e);var t=e.queue,i=Yb.bind(null,Xe,t);return t.dispatch=i,[e.memoizedState,i]}function Ph(e){var t=di();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=od.bind(null,Xe,!0,i),i.dispatch=t,[e,t]}function _b(e,t){var i=mt();return wb(i,vt,e,t)}function wb(e,t,i,s){return e.baseState=i,zh(e,vt,typeof s=="function"?s:as)}function yb(e,t){var i=mt();return vt!==null?wb(i,vt,e,t):(i.baseState=e,[e,i.queue.dispatch])}function Gy(e,t,i,s,n){if(gc(e))throw Error("Cannot update form state while rendering.");if(e=t.action,e!==null){var r={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){r.listeners.push(c)}};he.T!==null?i(!0):r.isTransition=!1,s(r),i=t.pending,i===null?(r.next=t.pending=r,Sb(t,r)):(r.next=i.next,t.pending=i.next=r)}}function Sb(e,t){var i=t.action,s=t.payload,n=e.state;if(t.isTransition){var r=he.T,c={};c._updatedFibers=new Set,he.T=c;try{var b=i(n,s),D=he.S;D!==null&&D(c,b),Nb(e,t,b)}catch(A){Wh(e,t,A)}finally{r!==null&&c.types!==null&&(r.types!==null&&r.types!==c.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),r.types=c.types),he.T=r,r===null&&c._updatedFibers&&(e=c._updatedFibers.size,c._updatedFibers.clear(),10<e&&console.warn("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."))}}else try{c=i(n,s),Nb(e,t,c)}catch(A){Wh(e,t,A)}}function Nb(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?(he.asyncTransitions++,i.then(bc,bc),i.then(function(s){Eb(e,t,s)},function(s){return Wh(e,t,s)}),t.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):Eb(e,t,i)}function Eb(e,t,i){t.status="fulfilled",t.value=i,xb(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Sb(e,i)))}function Wh(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,xb(t),t=t.next;while(t!==s)}e.action=null}function xb(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Cb(e,t){return t}function ro(e,t){if(it){var i=_t.formState;if(i!==null){e:{var s=Xe;if(it){if(xt){t:{for(var n=xt,r=Zi;n.nodeType!==8;){if(!r){n=null;break t}if(n=Oi(n.nextSibling),n===null){n=null;break t}}r=n.data,n=r===Cm||r===uw?n:null}if(n){xt=Oi(n.nextSibling),s=n.data===Cm;break e}}Nn(s)}s=!1}s&&(t=i[0])}}return i=di(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cb,lastRenderedState:t},i.queue=s,i=Yb.bind(null,Xe,s),s.dispatch=i,s=$h(!1),r=od.bind(null,Xe,!1,s.queue),s=di(),n={state:t,dispatch:null,action:e,pending:null},s.queue=n,i=Gy.bind(null,Xe,n,r,i),n.dispatch=i,s.memoizedState=e,[t,i,!1]}function cc(e){var t=mt();return Db(t,vt,e)}function Db(e,t,i){if(t=zh(e,t,Cb)[0],e=no(as)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ba(t)}catch(c){throw c===Yo?du:c}else s=t;t=mt();var n=t.queue,r=n.dispatch;return i!==t.memoizedState&&(Xe.flags|=2048,oo(ts|_i,{destroy:void 0},Qy.bind(null,n,i),null)),[s,r,e]}function Qy(e,t){e.action=t}function uc(e){var t=mt(),i=vt;if(i!==null)return Db(t,i,e);mt(),t=t.memoizedState,i=mt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function oo(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Xe.updateQueue,t===null&&(t=ac(),Xe.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Fh(e){var t=di();return e={current:e},t.memoizedState=e}function wr(e,t,i,s){var n=di();Xe.flags|=e,n.memoizedState=oo(ts|t,{destroy:void 0},i,s===void 0?null:s)}function Si(e,t,i,s){var n=mt();s=s===void 0?null:s;var r=n.memoizedState.inst;vt!==null&&s!==null&&Lh(s,vt.memoizedState.deps)?n.memoizedState=oo(t,r,i,s):(Xe.flags|=e,n.memoizedState=oo(ts|t,r,i,s))}function hc(e,t){(Xe.mode&us)!==Ye?wr(276826112,_i,e,t):wr(8390656,_i,e,t)}function Ky(e){Xe.flags|=4;var t=Xe.updateQueue;if(t===null)t=ac(),Xe.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Gh(e){var t=di(),i={impl:e};return t.memoizedState=i,function(){if((lt&Qt)!==ti)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return i.impl.apply(void 0,arguments)}}function dc(e){var t=mt().memoizedState;return Ky({ref:t,nextImpl:e}),function(){if((lt&Qt)!==ti)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}function Qh(e,t){var i=4194308;return(Xe.mode&us)!==Ye&&(i|=134217728),wr(i,Xi,e,t)}function kb(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return t.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(t).join(", ")+"}"),e=e(),t.current=e,function(){t.current=null}}function Kh(e,t,i){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),i=i!=null?i.concat([e]):null;var s=4194308;(Xe.mode&us)!==Ye&&(s|=134217728),wr(s,Xi,kb.bind(null,t,e),i)}function fc(e,t,i){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),i=i!=null?i.concat([e]):null,Si(4,Xi,kb.bind(null,t,e),i)}function Zh(e,t){return di().memoizedState=[e,t===void 0?null:t],e}function mc(e,t){var i=mt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Lh(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Jh(e,t){var i=di();t=t===void 0?null:t;var s=e();if(Yr){De(!0);try{e()}finally{De(!1)}}return i.memoizedState=[s,t],s}function pc(e,t){var i=mt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Lh(t,s[1]))return s[0];if(s=e(),Yr){De(!0);try{e()}finally{De(!1)}}return i.memoizedState=[s,t],s}function ed(e,t){var i=di();return td(i,e,t)}function Rb(e,t){var i=mt();return Bb(i,vt.memoizedState,e,t)}function Tb(e,t){var i=mt();return vt===null?td(i,e,t):Bb(i,vt.memoizedState,e,t)}function td(e,t,i){return i===void 0||(dn&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Ag(),Xe.lanes|=e,Qn|=e,i)}function Bb(e,t,i,s){return bi(i,t)?i:Xo.current!==null?(e=td(e,i,s),bi(e,t)||(It=!0),e):(dn&42)===0||(dn&1073741824)!==0&&(Qe&261930)===0?(It=!0,e.memoizedState=i):(e=Ag(),Xe.lanes|=e,Qn|=e,t)}function bc(){he.asyncTransitions--}function Ab(e,t,i,s,n){var r=ft.p;ft.p=r!==0&&r<Xs?r:Xs;var c=he.T,b={};b._updatedFibers=new Set,he.T=b,od(e,!1,t,i);try{var D=n(),A=he.S;if(A!==null&&A(b,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){he.asyncTransitions++,D.then(bc,bc);var Q=Py(D,s);va(e,t,Q,Mi(e))}else va(e,t,s,Mi(e))}catch(Z){va(e,t,{then:function(){},status:"rejected",reason:Z},Mi(e))}finally{ft.p=r,c!==null&&b.types!==null&&(c.types!==null&&c.types!==b.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),c.types=b.types),he.T=c,c===null&&b._updatedFibers&&(e=b._updatedFibers.size,b._updatedFibers.clear(),10<e&&console.warn("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."))}}function id(e,t,i,s){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var n=Mb(e).queue;$y(e),Ab(e,n,t,Fr,i===null?_:function(){return Ob(e),i(s)})}function Mb(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fr,baseState:Fr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:Fr},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ob(e){he.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var t=Mb(e);t.next===null&&(t=e.alternate.memoizedState),va(e,t.next.queue,{},Mi(e))}function sd(){var e=$h(!1);return e=Ab.bind(null,Xe,e.queue,!0,!1),di().memoizedState=e,[!1,e]}function Lb(){var e=no(as)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:ba(e),t]}function jb(){var e=ga(as)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:ba(e),t]}function yr(){return Dt(Dl)}function nd(){var e=di(),t=_t.identifierPrefix;if(it){var i=an,s=on;i=(s&~(1<<32-fi(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=gu++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=AN++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t}function rd(){return di().memoizedState=Zy.bind(null,Xe)}function Zy(e,t){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=Mi(i),n=Cn(s),r=Dn(i,n,s);r!==null&&(ys(s,"refresh()",e),Bt(r,i,s),fa(r,i,s)),e=xh(),t!=null&&r!==null&&console.error("The seed argument is not enabled outside experimental channels."),n.payload={cache:e};return}i=i.return}}function Jy(e,t,i){var s=arguments;typeof s[3]=="function"&&console.error("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()."),s=Mi(e);var n={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};gc(e)?Vb(t,n):(n=fh(e,t,n,s),n!==null&&(ys(s,"dispatch()",e),Bt(n,e,s),Xb(n,t,s)))}function Yb(e,t,i){var s=arguments;typeof s[3]=="function"&&console.error("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()."),s=Mi(e),va(e,t,i,s)&&ys(s,"setState()",e)}function va(e,t,i,s){var n={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(gc(e))Vb(t,n);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null)){var c=he.H;he.H=ds;try{var b=t.lastRenderedState,D=r(b,i);if(n.hasEagerState=!0,n.eagerState=D,bi(D,b))return Il(e,t,n,0),_t===null&&zl(),!1}catch{}finally{he.H=c}}if(i=fh(e,t,n,s),i!==null)return Bt(i,e,s),Xb(i,t,s),!0}return!1}function od(e,t,i,s){if(he.T===null&&Ar===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),s={lane:2,revertLane:jd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},gc(e)){if(t)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else t=fh(e,i,s,2),t!==null&&(ys(2,"setOptimistic()",e),Bt(t,e,2))}function gc(e){var t=e.alternate;return e===Xe||t!==null&&t===Xe}function Vb(e,t){zo=bu=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Xb(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Mt(e,i)}}function ad(e){if(e!==null&&typeof e!="function"){var t=String(e);j0.has(t)||(j0.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function ld(e,t,i,s){var n=e.memoizedState,r=i(s,n);if(e.mode&ci){De(!0);try{r=i(s,n)}finally{De(!1)}}r===void 0&&(t=y(t)||"Component",A0.has(t)||(A0.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),n=r==null?n:et({},n,r),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}function Hb(e,t,i,s,n,r,c){var b=e.stateNode;if(typeof b.shouldComponentUpdate=="function"){if(i=b.shouldComponentUpdate(s,r,c),e.mode&ci){De(!0);try{i=b.shouldComponentUpdate(s,r,c)}finally{De(!1)}}return i===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",y(t)||"Component"),i}return t.prototype&&t.prototype.isPureReactComponent?!aa(i,s)||!aa(n,r):!0}function Ub(e,t,i,s){var n=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==n&&(e=M(e)||"Component",D0.has(e)||(D0.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),nm.enqueueReplaceState(t,t.state,null))}function Sr(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=et({},i));for(var n in e)i[n]===void 0&&(i[n]=e[n])}return i}function zb(e){Lf(e),console.warn(`%s
|
|
161
|
-
|
|
162
|
-
%s
|
|
163
|
-
`,Io?"An error occurred in the <"+Io+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
164
|
-
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function Ib(e){var t=Io?"The above error occurred in the <"+Io+"> component.":"The above error occurred in one of your React components.",i="React will try to recreate this component tree from scratch using the error boundary you provided, "+((rm||"Anonymous")+".");if(typeof e=="object"&&e!==null&&typeof e.environmentName=="string"){var s=e.environmentName;e=[`%o
|
|
165
|
-
|
|
166
|
-
%s
|
|
167
|
-
|
|
168
|
-
%s
|
|
169
|
-
`,e,t,i].slice(0),typeof e[0]=="string"?e.splice(0,1,vw+" "+e[0],_w,zu+s+zu,ww):e.splice(0,0,vw,_w,zu+s+zu,ww),e.unshift(console),s=JN.apply(console.error,e),s()}else console.error(`%o
|
|
170
|
-
|
|
171
|
-
%s
|
|
172
|
-
|
|
173
|
-
%s
|
|
174
|
-
`,e,t,i)}function $b(e){Lf(e)}function vc(e,t){try{Io=t.source?M(t.source):null,rm=null;var i=t.value;if(he.actQueue!==null)he.thrownErrors.push(i);else{var s=e.onUncaughtError;s(i,{componentStack:t.stack})}}catch(n){setTimeout(function(){throw n})}}function qb(e,t,i){try{Io=i.source?M(i.source):null,rm=M(t);var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function cd(e,t,i){return i=Cn(i),i.tag=Zf,i.payload={element:null},i.callback=function(){ae(t.source,vc,e,t)},i}function ud(e){return e=Cn(e),e.tag=Zf,e}function hd(e,t,i,s){var n=i.type.getDerivedStateFromError;if(typeof n=="function"){var r=s.value;e.payload=function(){return n(r)},e.callback=function(){Vp(i),ae(s.source,qb,t,i,s)}}var c=i.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){Vp(i),ae(s.source,qb,t,i,s),typeof n!="function"&&(Zn===null?Zn=new Set([this]):Zn.add(this)),kN(this,s),typeof n=="function"||(i.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",M(i)||"Unknown")})}function eS(e,t,i,s,n){if(i.flags|=32768,Vs&&Ca(e,n),s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&io(t,i,n,!0),it&&(Us=!0),i=Vi.current,i!==null){switch(i.tag){case 31:case 13:return es===null?Dc():i.alternate===null&&Tt===bn&&(Tt=wu),i.flags&=-257,i.flags|=65536,i.lanes=n,s===fu?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Ad(e,s,n)),!1;case 22:return i.flags|=65536,s===fu?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Ad(e,s,n)),!1}throw Error("Unexpected Suspense handler tag ("+i.tag+"). This is a bug in React.")}return Ad(e,s,n),Dc(),!1}if(it)return Us=!0,t=Vi.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,s!==Uf&&la(Ri(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:s}),i))):(s!==Uf&&la(Ri(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:s}),i)),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,s=Ri(s,i),n=cd(e.stateNode,s,n),nc(e,n),Tt!==Fn&&(Tt=Vr)),!1;var r=Ri(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:s}),i);if(vl===null?vl=[r]:vl.push(r),Tt!==Fn&&(Tt=Vr),t===null)return!0;s=Ri(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=n&-n,i.lanes|=e,e=cd(i.stateNode,s,e),nc(i,e),!1;case 1:if(t=i.type,r=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Zn===null||!Zn.has(r))))return i.flags|=65536,n&=-n,i.lanes|=n,n=ud(n),hd(n,e,i,s),nc(i,n),!1}i=i.return}while(i!==null);return!1}function si(e,t,i,s){t.child=e===null?b0(t,null,i,s):jr(t,e.child,i,s)}function Pb(e,t,i,s,n){i=i.render;var r=t.ref;if("ref"in s){var c={};for(var b in s)b!=="ref"&&(c[b]=s[b])}else c=s;return gr(t),s=jh(e,t,i,c,r,n),b=Vh(),e!==null&&!It?(Xh(e,t,n),Zs(e,t,n)):(it&&b&&_h(t),t.flags|=1,si(e,t,s,n),t.child)}function Wb(e,t,i,s,n){if(e===null){var r=i.type;return typeof r=="function"&&!ph(r)&&r.defaultProps===void 0&&i.compare===null?(i=fr(r),t.tag=15,t.type=i,fd(t,r),Fb(e,t,i,s,n)):(e=bh(i.type,null,s,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!_d(e,n)){var c=r.memoizedProps;if(i=i.compare,i=i!==null?i:aa,i(c,s)&&e.ref===t.ref)return Zs(e,t,n)}return t.flags|=1,e=Fs(r,s),e.ref=t.ref,e.return=t,t.child=e}function Fb(e,t,i,s,n){if(e!==null){var r=e.memoizedProps;if(aa(r,s)&&e.ref===t.ref&&t.type===e.type)if(It=!1,t.pendingProps=s=r,_d(e,n))(e.flags&131072)!==0&&(It=!0);else return t.lanes=e.lanes,Zs(e,t,n)}return dd(e,t,i,s,n)}function Gb(e,t,i,s){var n=s.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:Wa,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|i:i,e!==null){for(s=t.child=e.child,n=0;s!==null;)n=n|s.lanes|s.childLanes,s=s.sibling;s=n&~r}else s=0,t.child=null;return Qb(e,t,r,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zl(t,r!==null?r.cachePool:null),r!==null?hb(t,r):Ah(t),db(t);else return s=t.lanes=536870912,Qb(e,t,r!==null?r.baseLanes|i:i,i,s)}else r!==null?(Zl(t,r.cachePool),hb(t,r),Rn(t),t.memoizedState=null):(e!==null&&Zl(t,null),Ah(t),Rn(t));return si(e,t,n,i),t.child}function _a(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:Wa,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Qb(e,t,i,s,n){var r=kh();return r=r===null?null:{parent:Ht._currentValue,pool:r},t.memoizedState={baseLanes:i,cachePool:r},e!==null&&Zl(t,null),Ah(t),db(t),e!==null&&io(e,t,s,!0),t.childLanes=n,null}function _c(e,t){var i=t.hidden;return i!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
175
|
-
- <Activity %s>
|
|
176
|
-
+ <Activity %s>`,i===!0?"hidden":i===!1?"hidden={false}":"hidden={...}",i?'mode="hidden"':'mode="visible"'),t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Kb(e,t,i){return jr(t,e.child,null,i),e=_c(t,t.pendingProps),e.flags|=2,Ai(t),t.memoizedState=null,e}function tS(e,t,i){var s=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(it){if(s.mode==="hidden")return e=_c(t,s),t.lanes=536870912,_a(null,e);if(Oh(t),(e=xt)?(i=Sv(e,Zi),i=i!==null&&i.data===$r?i:null,i!==null&&(s={dehydrated:i,treeContext:Ip(),retryLane:536870912,hydrationErrors:null},t.memoizedState=s,s=Up(i),s.return=t,t.child=s,oi=t,xt=null)):i=null,i===null)throw Pl(t,e),Nn(t);return t.lanes=536870912,null}return _c(t,s)}var r=e.memoizedState;if(r!==null){var c=r.dehydrated;if(Oh(t),n)if(t.flags&256)t.flags&=-257,t=Kb(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(qp(),(i&536870912)!==0&&Cc(t),It||io(e,t,i,!1),n=(i&e.childLanes)!==0,It||n){if(s=_t,s!==null&&(c=ht(s,i),c!==0&&c!==r.retryLane))throw r.retryLane=c,ai(e,c),Bt(s,e,c),om;Dc(),t=Kb(e,t,i)}else e=r.treeContext,xt=Oi(c.nextSibling),oi=t,it=!0,zn=null,Us=!1,Yi=null,Zi=!1,e!==null&&$p(t,e),t=_c(t,s),t.flags|=4096;return t}return r=e.child,s={mode:s.mode,children:s.children},(i&536870912)!==0&&(i&e.lanes)!==0&&Cc(t),e=Fs(r,s),e.ref=t.ref,t.child=e,e.return=t,e}function wc(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==i)&&(t.flags|=4194816)}}function dd(e,t,i,s,n){if(i.prototype&&typeof i.prototype.render=="function"){var r=y(i)||"Unknown";Y0[r]||(console.error("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.",r,r),Y0[r]=!0)}return t.mode&ci&&hs.recordLegacyContextWarning(t,null),e===null&&(fd(t,t.type),i.contextTypes&&(r=y(i)||"Unknown",X0[r]||(X0[r]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",r)))),gr(t),i=jh(e,t,i,s,void 0,n),s=Vh(),e!==null&&!It?(Xh(e,t,n),Zs(e,t,n)):(it&&s&&_h(t),t.flags|=1,si(e,t,i,n),t.child)}function Zb(e,t,i,s,n,r){return gr(t),mn=-1,hl=e!==null&&e.type!==t.type,t.updateQueue=null,i=Yh(t,s,i,n),fb(e,t),s=Vh(),e!==null&&!It?(Xh(e,t,r),Zs(e,t,r)):(it&&s&&_h(t),t.flags|=1,si(e,t,i,r),t.child)}function Jb(e,t,i,s,n){switch(I(t)){case!1:var r=t.stateNode,c=new t.type(t.memoizedProps,r.context).state;r.updater.enqueueSetState(r,c,null);break;case!0:t.flags|=128,t.flags|=65536,r=Error("Simulated error coming from DevTools");var b=n&-n;if(t.lanes|=b,c=_t,c===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");b=ud(b),hd(b,c,t,Ri(r,t)),nc(t,b)}if(gr(t),t.stateNode===null){if(c=Un,r=i.contextType,"contextType"in i&&r!==null&&(r===void 0||r.$$typeof!==Ls)&&!L0.has(i)&&(L0.add(i),b=r===void 0?" 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 r!="object"?" However, it is set to a "+typeof r+".":r.$$typeof===af?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(r).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",y(i)||"Component",b)),typeof r=="object"&&r!==null&&(c=Dt(r)),r=new i(s,c),t.mode&ci){De(!0);try{r=new i(s,c)}finally{De(!1)}}if(c=t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=nm,t.stateNode=r,r._reactInternals=t,r._reactInternalInstance=C0,typeof i.getDerivedStateFromProps=="function"&&c===null&&(c=y(i)||"Component",k0.has(c)||(k0.add(c),console.error("`%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.",c,r.state===null?"null":"undefined",c))),typeof i.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"){var D=b=c=null;if(typeof r.componentWillMount=="function"&&r.componentWillMount.__suppressDeprecationWarning!==!0?c="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(c="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps.__suppressDeprecationWarning!==!0?b="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(b="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"&&r.componentWillUpdate.__suppressDeprecationWarning!==!0?D="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(D="UNSAFE_componentWillUpdate"),c!==null||b!==null||D!==null){r=y(i)||"Component";var A=typeof i.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";T0.has(r)||(T0.add(r),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
177
|
-
|
|
178
|
-
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
179
|
-
|
|
180
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
181
|
-
https://react.dev/link/unsafe-component-lifecycles`,r,A,c!==null?`
|
|
182
|
-
`+c:"",b!==null?`
|
|
183
|
-
`+b:"",D!==null?`
|
|
184
|
-
`+D:""))}}r=t.stateNode,c=y(i)||"Component",r.render||(i.prototype&&typeof i.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",c):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",c)),!r.getInitialState||r.getInitialState.isReactClassApproved||r.state||console.error("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?",c),r.getDefaultProps&&!r.getDefaultProps.isReactClassApproved&&console.error("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.",c),r.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",c),i.childContextTypes&&!O0.has(i)&&(O0.add(i),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",c)),i.contextTypes&&!M0.has(i)&&(M0.add(i),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",c)),typeof r.componentShouldUpdate=="function"&&console.error("%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.",c),i.prototype&&i.prototype.isPureReactComponent&&typeof r.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",y(i)||"A pure component"),typeof r.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",c),typeof r.componentDidReceiveProps=="function"&&console.error("%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().",c),typeof r.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",c),typeof r.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",c),b=r.props!==s,r.props!==void 0&&b&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",c),r.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",c,c),typeof r.getSnapshotBeforeUpdate!="function"||typeof r.componentDidUpdate=="function"||R0.has(i)||(R0.add(i),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",y(i))),typeof r.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",c),typeof r.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",c),typeof i.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",c),(b=r.state)&&(typeof b!="object"||Ft(b))&&console.error("%s.state: must be set to an object or null",c),typeof r.getChildContext=="function"&&typeof i.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",c),r=t.stateNode,r.props=s,r.state=t.memoizedState,r.refs={},Th(t),c=i.contextType,r.context=typeof c=="object"&&c!==null?Dt(c):Un,r.state===s&&(c=y(i)||"Component",B0.has(c)||(B0.add(c),console.error("%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.",c))),t.mode&ci&&hs.recordLegacyContextWarning(t,r),hs.recordUnsafeLifecycleWarnings(t,r),r.state=t.memoizedState,c=i.getDerivedStateFromProps,typeof c=="function"&&(ld(t,i,c,s),r.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(c=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),c!==r.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",M(t)||"Component"),nm.enqueueReplaceState(r,r.state,null)),pa(t,s,r,n),ma(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&us)!==Ye&&(t.flags|=134217728),r=!0}else if(e===null){r=t.stateNode;var Q=t.memoizedProps;b=Sr(i,Q),r.props=b;var Z=r.context;D=i.contextType,c=Un,typeof D=="object"&&D!==null&&(c=Dt(D)),A=i.getDerivedStateFromProps,D=typeof A=="function"||typeof r.getSnapshotBeforeUpdate=="function",Q=t.pendingProps!==Q,D||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(Q||Z!==c)&&Ub(t,r,s,c),Wn=!1;var P=t.memoizedState;r.state=P,pa(t,s,r,n),ma(),Z=t.memoizedState,Q||P!==Z||Wn?(typeof A=="function"&&(ld(t,i,A,s),Z=t.memoizedState),(b=Wn||Hb(t,i,b,s,P,Z,c))?(D||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&us)!==Ye&&(t.flags|=134217728)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&us)!==Ye&&(t.flags|=134217728),t.memoizedProps=s,t.memoizedState=Z),r.props=s,r.state=Z,r.context=c,r=b):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&us)!==Ye&&(t.flags|=134217728),r=!1)}else{r=t.stateNode,Bh(e,t),c=t.memoizedProps,D=Sr(i,c),r.props=D,A=t.pendingProps,P=r.context,Z=i.contextType,b=Un,typeof Z=="object"&&Z!==null&&(b=Dt(Z)),Q=i.getDerivedStateFromProps,(Z=typeof Q=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(c!==A||P!==b)&&Ub(t,r,s,b),Wn=!1,P=t.memoizedState,r.state=P,pa(t,s,r,n),ma();var re=t.memoizedState;c!==A||P!==re||Wn||e!==null&&e.dependencies!==null&&Fl(e.dependencies)?(typeof Q=="function"&&(ld(t,i,Q,s),re=t.memoizedState),(D=Wn||Hb(t,i,D,s,P,re,b)||e!==null&&e.dependencies!==null&&Fl(e.dependencies))?(Z||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(s,re,b),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(s,re,b)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||c===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=re),r.props=s,r.state=re,r.context=b,r=D):(typeof r.componentDidUpdate!="function"||c===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),r=!1)}if(b=r,wc(e,t),c=(t.flags&128)!==0,b||c){if(b=t.stateNode,ye(t),c&&typeof i.getDerivedStateFromError!="function")i=null,gi=-1;else if(i=i0(b),t.mode&ci){De(!0);try{i0(b)}finally{De(!1)}}t.flags|=1,e!==null&&c?(t.child=jr(t,e.child,null,n),t.child=jr(t,null,i,n)):si(e,t,i,n),t.memoizedState=b.state,e=t.child}else e=Zs(e,t,n);return n=t.stateNode,r&&n.props!==s&&($o||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",M(t)||"a component"),$o=!0),e}function eg(e,t,i,s){return br(),t.flags|=256,si(e,t,i,s),t.child}function fd(e,t){t&&t.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
185
|
-
%s.childContextTypes = ...`,t.displayName||t.name||"Component"),typeof t.getDerivedStateFromProps=="function"&&(e=y(t)||"Unknown",H0[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),H0[e]=!0)),typeof t.contextType=="object"&&t.contextType!==null&&(t=y(t)||"Unknown",V0[t]||(console.error("%s: Function components do not support contextType.",t),V0[t]=!0))}function md(e){return{baseLanes:e,cachePool:Zp()}}function pd(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Di),e}function tg(e,t,i){var s,n=t.pendingProps;ie(t)&&(t.flags|=128);var r=!1,c=(t.flags&128)!==0;if((s=c)||(s=e!==null&&e.memoizedState===null?!1:(Yt.current&cl)!==0),s&&(r=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(it){if(r?kn(t):Rn(t),(e=xt)?(i=Sv(e,Zi),i=i!==null&&i.data!==$r?i:null,i!==null&&(s={dehydrated:i,treeContext:Ip(),retryLane:536870912,hydrationErrors:null},t.memoizedState=s,s=Up(i),s.return=t,t.child=s,oi=t,xt=null)):i=null,i===null)throw Pl(t,e),Nn(t);return Fd(i)?t.lanes=32:t.lanes=536870912,null}var b=n.children;if(n=n.fallback,r){Rn(t);var D=t.mode;return b=yc({mode:"hidden",children:b},D),n=mr(n,D,i,null),b.return=t,n.return=t,b.sibling=n,t.child=b,n=t.child,n.memoizedState=md(i),n.childLanes=pd(e,s,i),t.memoizedState=am,_a(null,n)}return kn(t),bd(t,b)}var A=e.memoizedState;if(A!==null){var Q=A.dehydrated;if(Q!==null){if(c)t.flags&256?(kn(t),t.flags&=-257,t=gd(e,t,i)):t.memoizedState!==null?(Rn(t),t.child=e.child,t.flags|=128,t=null):(Rn(t),b=n.fallback,D=t.mode,n=yc({mode:"visible",children:n.children},D),b=mr(b,D,i,null),b.flags|=2,n.return=t,b.return=t,n.sibling=b,t.child=n,jr(t,e.child,null,i),n=t.child,n.memoizedState=md(i),n.childLanes=pd(e,s,i),t.memoizedState=am,t=_a(null,n));else if(kn(t),qp(),(i&536870912)!==0&&Cc(t),Fd(Q)){if(s=Q.nextSibling&&Q.nextSibling.dataset,s){b=s.dgst;var Z=s.msg;D=s.stck;var P=s.cstck}r=Z,s=b,n=D,Q=P,b=r,D=Q,b=Error(b||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),b.stack=n||"",b.digest=s,s=D===void 0?null:D,n={value:b,source:null,stack:s},typeof s=="string"&&Hf.set(b,n),la(n),t=gd(e,t,i)}else if(It||io(e,t,i,!1),s=(i&e.childLanes)!==0,It||s){if(s=_t,s!==null&&(n=ht(s,i),n!==0&&n!==A.retryLane))throw A.retryLane=n,ai(e,n),Bt(s,e,n),om;Wd(Q)||Dc(),t=gd(e,t,i)}else Wd(Q)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,xt=Oi(Q.nextSibling),oi=t,it=!0,zn=null,Us=!1,Yi=null,Zi=!1,e!==null&&$p(t,e),t=bd(t,n.children),t.flags|=4096);return t}}return r?(Rn(t),b=n.fallback,D=t.mode,P=e.child,Q=P.sibling,n=Fs(P,{mode:"hidden",children:n.children}),n.subtreeFlags=P.subtreeFlags&65011712,Q!==null?b=Fs(Q,b):(b=mr(b,D,i,null),b.flags|=2),b.return=t,n.return=t,n.sibling=b,t.child=n,_a(null,n),n=t.child,b=e.child.memoizedState,b===null?b=md(i):(D=b.cachePool,D!==null?(P=Ht._currentValue,D=D.parent!==P?{parent:P,pool:P}:D):D=Zp(),b={baseLanes:b.baseLanes|i,cachePool:D}),n.memoizedState=b,n.childLanes=pd(e,s,i),t.memoizedState=am,_a(e.child,n)):(A!==null&&(i&62914560)===i&&(i&e.lanes)!==0&&Cc(t),kn(t),i=e.child,e=i.sibling,i=Fs(i,{mode:"visible",children:n.children}),i.return=t,i.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=i,t.memoizedState=null,i)}function bd(e,t){return t=yc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=m(22,e,null,t),e.lanes=0,e}function gd(e,t,i){return jr(t,e.child,null,i),e=bd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ig(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Nh(e.return,t,i)}function vd(e,t,i,s,n,r){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:n,treeForkCount:r}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=s,c.tail=i,c.tailMode=n,c.treeForkCount=r)}function sg(e,t,i){var s=t.pendingProps,n=s.revealOrder,r=s.tail,c=s.children,b=Yt.current;if((s=(b&cl)!==0)?(b=b&Ho|cl,t.flags|=128):b&=Ho,Y(Yt,b,t),b=n??"null",n!=="forwards"&&n!=="unstable_legacy-backwards"&&n!=="together"&&n!=="independent"&&!U0[b])if(U0[b]=!0,n==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(n==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof n=="string")switch(n.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',n,n.toLowerCase());break;case"forward":case"backward":console.error('"%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:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',n)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',n);b=r??"null",_u[b]||(r==null?(n==="forwards"||n==="backwards"||n==="unstable_legacy-backwards")&&(_u[b]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):r!=="visible"&&r!=="collapsed"&&r!=="hidden"?(_u[b]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',r)):n!=="forwards"&&n!=="backwards"&&n!=="unstable_legacy-backwards"&&(_u[b]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',r)));e:if((n==="forwards"||n==="backwards"||n==="unstable_legacy-backwards")&&c!==void 0&&c!==null&&c!==!1)if(Ft(c)){for(b=0;b<c.length;b++)if(!lb(c[b],b))break e}else if(b=k(c),typeof b=="function"){if(b=b.call(c))for(var D=b.next(),A=0;!D.done;D=b.next()){if(!lb(D.value,A))break e;A++}}else console.error('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?',n);if(si(e,t,c,i),it?(Sn(),c=Fa):c=0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ig(e,i,t);else if(e.tag===19)ig(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(i=t.child,n=null;i!==null;)e=i.alternate,e!==null&&rc(e)===null&&(n=i),i=i.sibling;i=n,i===null?(n=t.child,t.child=null):(n=i.sibling,i.sibling=null),vd(t,!1,n,i,r,c);break;case"backwards":case"unstable_legacy-backwards":for(i=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&rc(e)===null){t.child=n;break}e=n.sibling,n.sibling=i,i=n,n=e}vd(t,!0,i,null,r,c);break;case"together":vd(t,!1,null,null,void 0,c);break;default:t.memoizedState=null}return t.child}function Zs(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),gi=-1,Qn|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(io(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(t.child!==null){for(e=t.child,i=Fs(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Fs(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function _d(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Fl(e)))}function iS(e,t,i){switch(t.tag){case 3:ne(t,t.stateNode.containerInfo),En(t,Ht,e.memoizedState.cache),br();break;case 27:case 5:ce(t);break;case 4:ne(t,t.stateNode.containerInfo);break;case 10:En(t,t.type,t.memoizedProps.value);break;case 12:(i&t.childLanes)!==0&&(t.flags|=4),t.flags|=2048;var s=t.stateNode;s.effectDuration=-0,s.passiveEffectDuration=-0;break;case 31:if(t.memoizedState!==null)return t.flags|=128,Oh(t),null;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(kn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?tg(e,t,i):(kn(t),e=Zs(e,t,i),e!==null?e.sibling:null);kn(t);break;case 19:var n=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(io(e,t,i,!1),s=(i&t.childLanes)!==0),n){if(s)return sg(e,t,i);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Y(Yt,Yt.current,t),s)break;return null;case 22:return t.lanes=0,Gb(e,t,i,t.pendingProps);case 24:En(t,Ht,e.memoizedState.cache)}return Zs(e,t,i)}function wd(e,t,i){if(t._debugNeedsRemount&&e!==null){i=bh(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes),i._debugStack=t._debugStack,i._debugTask=t._debugTask;var s=t.return;if(s===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,i.index=t.index,i.sibling=t.sibling,i.return=t.return,i.ref=t.ref,i._debugInfo=t._debugInfo,t===s.child)s.child=i;else{var n=s.child;if(n===null)throw Error("Expected parent to have a child.");for(;n.sibling!==t;)if(n=n.sibling,n===null)throw Error("Expected to find the previous sibling.");n.sibling=i}return t=s.deletions,t===null?(s.deletions=[e],s.flags|=16):t.push(e),i.flags|=2,i}if(e!==null)if(e.memoizedProps!==t.pendingProps||t.type!==e.type)It=!0;else{if(!_d(e,i)&&(t.flags&128)===0)return It=!1,iS(e,t,i);It=(e.flags&131072)!==0}else It=!1,(s=it)&&(Sn(),s=(t.flags&1048576)!==0),s&&(s=t.index,Sn(),zp(t,Fa,s));switch(t.lanes=0,t.tag){case 16:e:if(s=t.pendingProps,e=xn(t.elementType),t.type=e,typeof e=="function")ph(e)?(s=Sr(e,s),t.tag=1,t.type=e=fr(e),t=Jb(null,t,e,s,i)):(t.tag=0,fd(t,e),t.type=e=fr(e),t=dd(null,t,e,s,i));else{if(e!=null){if(n=e.$$typeof,n===La){t.tag=11,t.type=e=mh(e),t=Pb(null,t,e,s,i);break e}else if(n===Uc){t.tag=14,t=Wb(null,t,e,s,i);break e}}throw t="",e!==null&&typeof e=="object"&&e.$$typeof===Li&&(t=" Did you wrap a component in React.lazy() more than once?"),i=y(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+i+". Lazy element type must resolve to a class or function."+t)}return t;case 0:return dd(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,n=Sr(s,t.pendingProps),Jb(e,t,s,n,i);case 3:e:{if(ne(t,t.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");s=t.pendingProps;var r=t.memoizedState;n=r.element,Bh(e,t),pa(t,s,null,i);var c=t.memoizedState;if(s=c.cache,En(t,Ht,s),s!==r.cache&&Eh(t,[Ht],i,!0),ma(),s=c.element,r.isDehydrated)if(r={element:s,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=eg(e,t,s,i);break e}else if(s!==n){n=Ri(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t),la(n),t=eg(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(xt=Oi(e.firstChild),oi=t,it=!0,zn=null,Us=!1,Yi=null,Zi=!0,i=b0(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(br(),s===n){t=Zs(e,t,i);break e}si(e,t,s,i)}t=t.child}return t;case 26:return wc(e,t),e===null?(i=kv(t.type,null,t.pendingProps,null))?t.memoizedState=i:it||(i=t.type,e=t.pendingProps,s=ee(Ln.current),s=Bc(s).createElement(i),s[ri]=t,s[mi]=e,ni(s,i,e),Ae(s),t.stateNode=s):t.memoizedState=kv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ce(t),e===null&&it&&(s=ee(Ln.current),n=de(),s=t.stateNode=Cv(t.type,t.pendingProps,s,n,!1),Us||(n=mv(s,t.type,t.pendingProps,n),n!==null&&(pr(t,0).serverProps=n)),oi=t,Zi=!0,n=xt,Mn(t.type)?(Tm=n,xt=Oi(s.firstChild)):xt=n),si(e,t,t.pendingProps.children,i),wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&it&&(r=de(),s=rh(t.type,r.ancestorInfo),n=xt,(c=!n)||(c=$S(n,t.type,t.pendingProps,Zi),c!==null?(t.stateNode=c,Us||(r=mv(c,t.type,t.pendingProps,r),r!==null&&(pr(t,0).serverProps=r)),oi=t,xt=Oi(c.firstChild),Zi=!1,r=!0):r=!1,c=!r),c&&(s&&Pl(t,n),Nn(t))),ce(t),n=t.type,r=t.pendingProps,c=e!==null?e.memoizedProps:null,s=r.children,qd(n,r)?s=null:c!==null&&qd(n,c)&&(t.flags|=32),t.memoizedState!==null&&(n=jh(e,t,Fy,null,null,i),Dl._currentValue=n),wc(e,t),si(e,t,s,i),t.child;case 6:return e===null&&it&&(i=t.pendingProps,e=de(),s=e.ancestorInfo.current,i=s!=null?jl(i,s.tag,e.ancestorInfo.implicitRootScope):!0,e=xt,(s=!e)||(s=qS(e,t.pendingProps,Zi),s!==null?(t.stateNode=s,oi=t,xt=null,s=!0):s=!1,s=!s),s&&(i&&Pl(t,e),Nn(t))),null;case 13:return tg(e,t,i);case 4:return ne(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=jr(t,null,s,i):si(e,t,s,i),t.child;case 11:return Pb(e,t,t.type,t.pendingProps,i);case 7:return si(e,t,t.pendingProps,i),t.child;case 8:return si(e,t,t.pendingProps.children,i),t.child;case 12:return t.flags|=4,t.flags|=2048,s=t.stateNode,s.effectDuration=-0,s.passiveEffectDuration=-0,si(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.type,n=t.pendingProps,r=n.value,"value"in n||z0||(z0=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),En(t,s,r),si(e,t,n.children,i),t.child;case 9:return n=t.type._context,s=t.pendingProps.children,typeof s!="function"&&console.error("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."),gr(t),n=Dt(n),s=Ff(s,n,void 0),t.flags|=1,si(e,t,s,i),t.child;case 14:return Wb(e,t,t.type,t.pendingProps,i);case 15:return Fb(e,t,t.type,t.pendingProps,i);case 19:return sg(e,t,i);case 31:return tS(e,t,i);case 22:return Gb(e,t,i,t.pendingProps);case 24:return gr(t),s=Dt(Ht),e===null?(n=kh(),n===null&&(n=_t,r=xh(),n.pooledCache=r,vr(r),r!==null&&(n.pooledCacheLanes|=i),n=r),t.memoizedState={parent:s,cache:n},Th(t),En(t,Ht,n)):((e.lanes&i)!==0&&(Bh(e,t),pa(t,null,null,i),ma()),n=e.memoizedState,r=t.memoizedState,n.parent!==s?(n={parent:s,cache:s},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),En(t,Ht,s)):(s=r.cache,En(t,Ht,s),s!==n.cache&&Eh(t,[Ht],i,!0))),si(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Js(e){e.flags|=4}function yd(e,t,i,s,n){if((t=(e.mode&NN)!==Ye)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(jg())e.flags|=8192;else throw Lr=fu,Qf}else e.flags&=-16777217}function ng(e,t){if(t.type!=="stylesheet"||(t.state.loading&ss)!==Wr)e.flags&=-16777217;else if(e.flags|=16777216,!Mv(t))if(jg())e.flags|=8192;else throw Lr=fu,Qf}function Sc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?We():536870912,e.lanes|=t,Ur|=t)}function wa(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)if((e.mode&Fe)!==Ye){for(var n=e.selfBaseDuration,r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,n+=r.treeBaseDuration,r=r.sibling;e.treeBaseDuration=n}else for(n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags&65011712,s|=n.flags&65011712,n.return=e,n=n.sibling;else if((e.mode&Fe)!==Ye){n=e.actualDuration,r=e.selfBaseDuration;for(var c=e.child;c!==null;)i|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,n+=c.actualDuration,r+=c.treeBaseDuration,c=c.sibling;e.actualDuration=n,e.treeBaseDuration=r}else for(n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags,s|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function sS(e,t,i){var s=t.pendingProps;switch(wh(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return yt(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Qs(Ht,t),te(t),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(to(t)?(Sh(),Js(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,yh())),yt(t),null;case 26:var n=t.type,r=t.memoizedState;return e===null?(Js(t),r!==null?(yt(t),ng(t,r)):(yt(t),yd(t,n,null,s,i))):r?r!==e.memoizedState?(Js(t),yt(t),ng(t,r)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Js(t),yt(t),yd(t,n,e,s,i)),null;case 27:if(B(t),i=ee(Ln.current),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Js(t);else{if(!s){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return yt(t),null}e=de(),to(t)?Pp(t):(e=Cv(n,s,i,e,!0),t.stateNode=e,Js(t))}return yt(t),null;case 5:if(B(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Js(t);else{if(!s){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return yt(t),null}var c=de();if(to(t))Pp(t);else{switch(r=ee(Ln.current),rh(n,c.ancestorInfo),c=c.context,r=Bc(r),c){case Zo:r=r.createElementNS(So,n);break;case Xu:r=r.createElementNS(Fc,n);break;default:switch(n){case"svg":r=r.createElementNS(So,n);break;case"math":r=r.createElementNS(Fc,n);break;case"script":r=r.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof s.is=="string"?r.createElement("select",{is:s.is}):r.createElement("select"),s.multiple?r.multiple=!0:s.size&&(r.size=s.size);break;default:r=typeof s.is=="string"?r.createElement(n,{is:s.is}):r.createElement(n),n.indexOf("-")===-1&&(n!==n.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",n),Object.prototype.toString.call(r)!=="[object HTMLUnknownElement]"||cs.call(dw,n)||(dw[n]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",n)))}}r[ri]=t,r[mi]=s;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)r.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=r;e:switch(ni(r,n,s),n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Js(t)}}return yt(t),yd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Js(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=ee(Ln.current),i=de(),to(t)){if(e=t.stateNode,i=t.memoizedProps,n=!Us,s=null,r=oi,r!==null)switch(r.tag){case 3:n&&(n=Ev(e,i,s),n!==null&&(pr(t,0).serverProps=n));break;case 27:case 5:s=r.memoizedProps,n&&(n=Ev(e,i,s),n!==null&&(pr(t,0).serverProps=n))}e[ri]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||cv(e.nodeValue,i)),e||Nn(t,!0)}else n=i.ancestorInfo.current,n!=null&&jl(s,n.tag,i.ancestorInfo.implicitRootScope),e=Bc(e).createTextNode(s),e[ri]=t,t.stateNode=e}return yt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=to(t),i!==null){if(e===null){if(!s)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");e[ri]=t,yt(t),(t.mode&Fe)!==Ye&&i!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else Sh(),br(),(t.flags&128)===0&&(i=t.memoizedState=null),t.flags|=4,yt(t),(t.mode&Fe)!==Ye&&i!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else i=yh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Ai(t),t):(Ai(t),null);if((t.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return yt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=s,r=to(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");r[ri]=t,yt(t),(t.mode&Fe)!==Ye&&n!==null&&(n=t.child,n!==null&&(t.treeBaseDuration-=n.treeBaseDuration))}else Sh(),br(),(t.flags&128)===0&&(n=t.memoizedState=null),t.flags|=4,yt(t),(t.mode&Fe)!==Ye&&n!==null&&(n=t.child,n!==null&&(t.treeBaseDuration-=n.treeBaseDuration));n=!1}else n=yh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Ai(t),t):(Ai(t),null)}return Ai(t),(t.flags&128)!==0?(t.lanes=i,(t.mode&Fe)!==Ye&&ha(t),t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,n=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(n=s.alternate.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==n&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Sc(t,t.updateQueue),yt(t),(t.mode&Fe)!==Ye&&i&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return te(t),e===null&&Vd(t.stateNode.containerInfo),yt(t),null;case 10:return Qs(t.type,t),yt(t),null;case 19:if(z(Yt,t),s=t.memoizedState,s===null)return yt(t),null;if(n=(t.flags&128)!==0,r=s.rendering,r===null)if(n)wa(s,!1);else{if(Tt!==bn||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=rc(e),r!==null){for(t.flags|=128,wa(s,!1),e=r.updateQueue,t.updateQueue=e,Sc(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Hp(i,e),i=i.sibling;return Y(Yt,Yt.current&Ho|cl,t),it&&Gs(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Zt()>Cu&&(t.flags|=128,n=!0,wa(s,!1),t.lanes=4194304)}else{if(!n)if(e=rc(r),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Sc(t,e),wa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!r.alternate&&!it)return yt(t),null}else 2*Zt()-s.renderingStartTime>Cu&&i!==536870912&&(t.flags|=128,n=!0,wa(s,!1),t.lanes=4194304);s.isBackwards?(r.sibling=t.child,t.child=r):(e=s.last,e!==null?e.sibling=r:t.child=r,s.last=r)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Zt(),e.sibling=null,i=Yt.current,i=n?i&Ho|cl:i&Ho,Y(Yt,i,t),it&&Gs(t,s.treeForkCount),e):(yt(t),null);case 22:case 23:return Ai(t),Mh(t),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),i=t.updateQueue,i!==null&&Sc(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&z(Mr,t),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Qs(Ht,t),yt(t),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function nS(e,t){switch(wh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Fe)!==Ye&&ha(t),t):null;case 3:return Qs(Ht,t),te(t),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return B(t),null;case 31:if(t.memoizedState!==null){if(Ai(t),t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Fe)!==Ye&&ha(t),t):null;case 13:if(Ai(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Fe)!==Ye&&ha(t),t):null;case 19:return z(Yt,t),null;case 4:return te(t),null;case 10:return Qs(t.type,t),null;case 22:case 23:return Ai(t),Mh(t),e!==null&&z(Mr,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Fe)!==Ye&&ha(t),t):null;case 24:return Qs(Ht,t),null;case 25:return null;default:return null}}function rg(e,t){switch(wh(t),t.tag){case 3:Qs(Ht,t),te(t);break;case 26:case 27:case 5:B(t);break;case 4:te(t);break;case 31:t.memoizedState!==null&&Ai(t);break;case 13:Ai(t);break;case 19:z(Yt,t);break;case 10:Qs(t.type,t);break;case 22:case 23:Ai(t),Mh(t),e!==null&&z(Mr,t);break;case 24:Qs(Ht,t)}}function ks(e){return(e.mode&Fe)!==Ye}function og(e,t){ks(e)?(Ds(),ya(t,e),Cs()):ya(t,e)}function Sd(e,t,i){ks(e)?(Ds(),ao(i,e,t),Cs()):ao(i,e,t)}function ya(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var n=s.next;i=n;do{if((i.tag&e)===e&&(s=void 0,(e&vi)!==pu&&(Go=!0),s=ae(t,RN,i),(e&vi)!==pu&&(Go=!1),s!==void 0&&typeof s!="function")){var r=void 0;r=(i.tag&Xi)!==0?"useLayoutEffect":(i.tag&vi)!==0?"useInsertionEffect":"useEffect";var c=void 0;c=s===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof s.then=="function"?`
|
|
186
|
-
|
|
187
|
-
It looks like you wrote `+r+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
188
|
-
|
|
189
|
-
`+r+`(() => {
|
|
190
|
-
async function fetchData() {
|
|
191
|
-
// You can await here
|
|
192
|
-
const response = await MyAPI.getData(someId);
|
|
193
|
-
// ...
|
|
194
|
-
}
|
|
195
|
-
fetchData();
|
|
196
|
-
}, [someId]); // Or [] if effect doesn't need props or state
|
|
197
|
-
|
|
198
|
-
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+s,ae(t,function(b,D){console.error("%s must not return anything besides a function, which is used for clean-up.%s",b,D)},r,c)}i=i.next}while(i!==n)}}catch(b){dt(t,t.return,b)}}function ao(e,t,i){try{var s=t.updateQueue,n=s!==null?s.lastEffect:null;if(n!==null){var r=n.next;s=r;do{if((s.tag&e)===e){var c=s.inst,b=c.destroy;b!==void 0&&(c.destroy=void 0,(e&vi)!==pu&&(Go=!0),n=t,ae(n,TN,n,i,b),(e&vi)!==pu&&(Go=!1))}s=s.next}while(s!==r)}}catch(D){dt(t,t.return,D)}}function ag(e,t){ks(e)?(Ds(),ya(t,e),Cs()):ya(t,e)}function Nd(e,t,i){ks(e)?(Ds(),ao(i,e,t),Cs()):ao(i,e,t)}function lg(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||$o||(i.props!==e.memoizedProps&&console.error("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.",M(e)||"instance"),i.state!==e.memoizedState&&console.error("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.",M(e)||"instance"));try{ae(e,ub,t,i)}catch(s){dt(e,e.return,s)}}}function rS(e,t,i){return e.getSnapshotBeforeUpdate(t,i)}function oS(e,t){var i=t.memoizedProps,s=t.memoizedState;t=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||$o||(t.props!==e.memoizedProps&&console.error("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.",M(e)||"instance"),t.state!==e.memoizedState&&console.error("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.",M(e)||"instance"));try{var n=Sr(e.type,i),r=ae(e,rS,t,n,s);i=I0,r!==void 0||i.has(e.type)||(i.add(e.type),ae(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",M(e))})),t.__reactInternalSnapshotBeforeUpdate=r}catch(c){dt(e,e.return,c)}}function cg(e,t,i){i.props=Sr(e.type,e.memoizedProps),i.state=e.memoizedState,ks(e)?(Ds(),ae(e,l0,e,t,i),Cs()):ae(e,l0,e,t,i)}function aS(e){var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}if(typeof t=="function")if(ks(e))try{Ds(),e.refCleanup=t(i)}finally{Cs()}else e.refCleanup=t(i);else typeof t=="string"?console.error("String refs are no longer supported."):t.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",M(e)),t.current=i}}function Sa(e,t){try{ae(e,aS,e)}catch(i){dt(e,t,i)}}function Rs(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{if(ks(e))try{Ds(),ae(e,s)}finally{Cs(e)}else ae(e,s)}catch(n){dt(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{if(ks(e))try{Ds(),ae(e,i,null)}finally{Cs(e)}else ae(e,i,null)}catch(n){dt(e,t,n)}else i.current=null}function ug(e,t,i,s){var n=e.memoizedProps,r=n.id,c=n.onCommit;n=n.onRender,t=t===null?"mount":"update",cu&&(t="nested-update"),typeof n=="function"&&n(r,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,i),typeof c=="function"&&c(r,t,s,i)}function lS(e,t,i,s){var n=e.memoizedProps;e=n.id,n=n.onPostCommit,t=t===null?"mount":"update",cu&&(t="nested-update"),typeof n=="function"&&n(e,t,s,i)}function hg(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{ae(e,AS,s,t,i,e)}catch(n){dt(e,e.return,n)}}function Ed(e,t,i){try{ae(e,OS,e.stateNode,e.type,i,t,e)}catch(s){dt(e,e.return,s)}}function dg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mn(e.type)||e.tag===4}function xd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Mn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cd(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(_v(i),(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t)):(_v(i),t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Ws));else if(s!==4&&(s===27&&Mn(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Cd(e,t,i),e=e.sibling;e!==null;)Cd(e,t,i),e=e.sibling}function Nc(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&Mn(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Nc(e,t,i),e=e.sibling;e!==null;)Nc(e,t,i),e=e.sibling}function cS(e){for(var t,i=e.return;i!==null;){if(dg(i)){t=i;break}i=i.return}if(t==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(t.tag){case 27:t=t.stateNode,i=xd(e),Nc(e,i,t);break;case 5:i=t.stateNode,t.flags&32&&(vv(i),t.flags&=-33),t=xd(e),Nc(e,t,i);break;case 3:case 4:t=t.stateNode.containerInfo,i=xd(e),Cd(e,i,t);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function fg(e){var t=e.stateNode,i=e.memoizedProps;try{ae(e,QS,e.type,i,t,e)}catch(s){dt(e,e.return,s)}}function mg(e,t){return t.tag===31?(t=t.memoizedState,e.memoizedState!==null&&t===null):t.tag===13?(e=e.memoizedState,t=t.memoizedState,e!==null&&e.dehydrated!==null&&(t===null||t.dehydrated===null)):t.tag===3?e.memoizedState.isDehydrated&&(t.flags&256)===0:!1}function uS(e,t){if(e=e.containerInfo,Dm=Iu,e=Tp(e),lh(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var n=s.anchorOffset,r=s.focusNode;s=s.focusOffset;try{i.nodeType,r.nodeType}catch{i=null;break e}var c=0,b=-1,D=-1,A=0,Q=0,Z=e,P=null;t:for(;;){for(var re;Z!==i||n!==0&&Z.nodeType!==3||(b=c+n),Z!==r||s!==0&&Z.nodeType!==3||(D=c+s),Z.nodeType===3&&(c+=Z.nodeValue.length),(re=Z.firstChild)!==null;)P=Z,Z=re;for(;;){if(Z===e)break t;if(P===i&&++A===n&&(b=c),P===r&&++Q===s&&(D=c),(re=Z.nextSibling)!==null)break;Z=P,P=Z.parentNode}Z=re}i=b===-1||D===-1?null:{start:b,end:D}}else i=null}i=i||{start:0,end:0}}else i=null;for(km={focusedElem:e,selectionRange:i},Iu=!1,ei=t;ei!==null;)if(t=ei,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ei=e;else for(;ei!==null;){switch(e=t=ei,i=e.alternate,n=e.flags,e.tag){case 0:if((n&4)!==0&&(e=e.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)n=e[i],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:(n&1024)!==0&&i!==null&&oS(e,i);break;case 3:if((n&1024)!==0){if(e=e.stateNode.containerInfo,i=e.nodeType,i===9)Pd(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw 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.")}if(e=t.sibling,e!==null){e.return=t.return,ei=e;break}ei=t.return}}function pg(e,t,i){var s=Ti(),n=Ss(),r=Es(),c=xs(),b=i.flags;switch(i.tag){case 0:case 11:case 15:Ts(e,i),b&4&&og(i,Xi|ts);break;case 1:if(Ts(e,i),b&4)if(e=i.stateNode,t===null)i.type.defaultProps||"ref"in i.memoizedProps||$o||(e.props!==i.memoizedProps&&console.error("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.",M(i)||"instance"),e.state!==i.memoizedState&&console.error("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.",M(i)||"instance")),ks(i)?(Ds(),ae(i,Gf,i,e),Cs()):ae(i,Gf,i,e);else{var D=Sr(i.type,t.memoizedProps);t=t.memoizedState,i.type.defaultProps||"ref"in i.memoizedProps||$o||(e.props!==i.memoizedProps&&console.error("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.",M(i)||"instance"),e.state!==i.memoizedState&&console.error("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.",M(i)||"instance")),ks(i)?(Ds(),ae(i,r0,i,e,D,t,e.__reactInternalSnapshotBeforeUpdate),Cs()):ae(i,r0,i,e,D,t,e.__reactInternalSnapshotBeforeUpdate)}b&64&&lg(i),b&512&&Sa(i,i.return);break;case 3:if(t=Ks(),Ts(e,i),b&64&&(b=i.updateQueue,b!==null)){if(D=null,i.child!==null)switch(i.child.tag){case 27:case 5:D=i.child.stateNode;break;case 1:D=i.child.stateNode}try{ae(i,ub,b,D)}catch(Q){dt(i,i.return,Q)}}e.effectDuration+=Ql(t);break;case 27:t===null&&b&4&&fg(i);case 26:case 5:if(Ts(e,i),t===null){if(b&4)hg(i);else if(b&64){e=i.type,t=i.memoizedProps,D=i.stateNode;try{ae(i,MS,D,e,t,i)}catch(Q){dt(i,i.return,Q)}}}b&512&&Sa(i,i.return);break;case 12:if(b&4){b=Ks(),Ts(e,i),e=i.stateNode,e.effectDuration+=ua(b);try{ae(i,ug,i,t,In,e.effectDuration)}catch(Q){dt(i,i.return,Q)}}else Ts(e,i);break;case 31:Ts(e,i),b&4&&vg(e,i);break;case 13:Ts(e,i),b&4&&_g(e,i),b&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(b=_S.bind(null,i),PS(e,b))));break;case 22:if(b=i.memoizedState!==null||pn,!b){t=t!==null&&t.memoizedState!==null||$t,D=pn;var A=$t;pn=b,($t=t)&&!A?(Bs(e,i,(i.subtreeFlags&8772)!==0),(i.mode&Fe)!==Ye&&0<=Oe&&0<=je&&.05<je-Oe&&Hl(i,Oe,je)):Ts(e,i),pn=D,$t=A}break;case 30:break;default:Ts(e,i)}(i.mode&Fe)!==Ye&&0<=Oe&&0<=je&&((At||.05<Rt)&&ws(i,Oe,je,Rt,kt),i.alternate===null&&i.return!==null&&i.return.alternate!==null&&.05<je-Oe&&(mg(i.return.alternate,i.return)||_s(i,Oe,je,"Mount"))),Bi(s),Ns(n),kt=r,At=c}function bg(e){var t=e.alternate;t!==null&&(e.alternate=null,bg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&J(t)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function en(e,t,i){for(i=i.child;i!==null;)gg(e,t,i),i=i.sibling}function gg(e,t,i){if(li&&typeof li.onCommitFiberUnmount=="function")try{li.onCommitFiberUnmount(wo,i)}catch(A){Ys||(Ys=!0,console.error("React instrumentation encountered an error: %o",A))}var s=Ti(),n=Ss(),r=Es(),c=xs();switch(i.tag){case 26:$t||Rs(i,t),en(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(e=i.stateNode,e.parentNode.removeChild(e));break;case 27:$t||Rs(i,t);var b=qt,D=xi;Mn(i.type)&&(qt=i.stateNode,xi=!1),en(e,t,i),ae(i,Ba,i.stateNode),qt=b,xi=D;break;case 5:$t||Rs(i,t);case 6:if(b=qt,D=xi,qt=null,en(e,t,i),qt=b,xi=D,qt!==null)if(xi)try{ae(i,YS,qt,i.stateNode)}catch(A){dt(i,t,A)}else try{ae(i,jS,qt,i.stateNode)}catch(A){dt(i,t,A)}break;case 18:qt!==null&&(xi?(e=qt,wv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),bo(e)):wv(qt,i.stateNode));break;case 4:b=qt,D=xi,qt=i.stateNode.containerInfo,xi=!0,en(e,t,i),qt=b,xi=D;break;case 0:case 11:case 14:case 15:ao(vi,i,t),$t||Sd(i,t,Xi),en(e,t,i);break;case 1:$t||(Rs(i,t),b=i.stateNode,typeof b.componentWillUnmount=="function"&&cg(i,t,b)),en(e,t,i);break;case 21:en(e,t,i);break;case 22:$t=(b=$t)||i.memoizedState!==null,en(e,t,i),$t=b;break;default:en(e,t,i)}(i.mode&Fe)!==Ye&&0<=Oe&&0<=je&&(At||.05<Rt)&&ws(i,Oe,je,Rt,kt),Bi(s),Ns(n),kt=r,At=c}function vg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ae(t,FS,e)}catch(i){dt(t,t.return,i)}}}function _g(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ae(t,GS,e)}catch(i){dt(t,t.return,i)}}function hS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $0),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function Ec(e,t){var i=hS(e);t.forEach(function(s){if(!i.has(s)){if(i.add(s),Vs)if(qo!==null&&Po!==null)Ca(Po,qo);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var n=wS.bind(null,e,s);s.then(n,n)}})}function Ni(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var n=e,r=t,c=i[s],b=Ti(),D=r;e:for(;D!==null;){switch(D.tag){case 27:if(Mn(D.type)){qt=D.stateNode,xi=!1;break e}break;case 5:qt=D.stateNode,xi=!1;break e;case 3:case 4:qt=D.stateNode.containerInfo,xi=!0;break e}D=D.return}if(qt===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");gg(n,r,c),qt=null,xi=!1,(c.mode&Fe)!==Ye&&0<=Oe&&0<=je&&.05<je-Oe&&_s(c,Oe,je,"Unmount"),Bi(b),n=c,r=n.alternate,r!==null&&(r.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wg(t,e),t=t.sibling}function wg(e,t){var i=Ti(),s=Ss(),n=Es(),r=xs(),c=e.alternate,b=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ni(t,e),Ei(e),b&4&&(ao(vi|ts,e,e.return),ya(vi|ts,e),Sd(e,e.return,Xi|ts));break;case 1:if(Ni(t,e),Ei(e),b&512&&($t||c===null||Rs(c,c.return)),b&64&&pn&&(b=e.updateQueue,b!==null&&(c=b.callbacks,c!==null))){var D=b.shared.hiddenCallbacks;b.shared.hiddenCallbacks=D===null?c:D.concat(c)}break;case 26:if(D=fs,Ni(t,e),Ei(e),b&512&&($t||c===null||Rs(c,c.return)),b&4){var A=c!==null?c.memoizedState:null;if(b=e.memoizedState,c===null)if(b===null)if(e.stateNode===null){e:{b=e.type,c=e.memoizedProps,D=D.ownerDocument||D;t:switch(b){case"title":A=D.getElementsByTagName("title")[0],(!A||A[Va]||A[ri]||A.namespaceURI===So||A.hasAttribute("itemprop"))&&(A=D.createElement(b),D.head.insertBefore(A,D.querySelector("head > title"))),ni(A,b,c),A[ri]=e,Ae(A),b=A;break e;case"link":var Q=Bv("link","href",D).get(b+(c.href||""));if(Q){for(var Z=0;Z<Q.length;Z++)if(A=Q[Z],A.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&A.getAttribute("rel")===(c.rel==null?null:c.rel)&&A.getAttribute("title")===(c.title==null?null:c.title)&&A.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){Q.splice(Z,1);break t}}A=D.createElement(b),ni(A,b,c),D.head.appendChild(A);break;case"meta":if(Q=Bv("meta","content",D).get(b+(c.content||""))){for(Z=0;Z<Q.length;Z++)if(A=Q[Z],Le(c.content,"content"),A.getAttribute("content")===(c.content==null?null:""+c.content)&&A.getAttribute("name")===(c.name==null?null:c.name)&&A.getAttribute("property")===(c.property==null?null:c.property)&&A.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&A.getAttribute("charset")===(c.charSet==null?null:c.charSet)){Q.splice(Z,1);break t}}A=D.createElement(b),ni(A,b,c),D.head.appendChild(A);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+b+'". This is a bug in React.')}A[ri]=e,Ae(A),b=A}e.stateNode=b}else Av(D,e.type,e.stateNode);else e.stateNode=Tv(D,b,e.memoizedProps);else A!==b?(A===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):A.count--,b===null?Av(D,e.type,e.stateNode):Tv(D,b,e.memoizedProps)):b===null&&e.stateNode!==null&&Ed(e,e.memoizedProps,c.memoizedProps)}break;case 27:Ni(t,e),Ei(e),b&512&&($t||c===null||Rs(c,c.return)),c!==null&&b&4&&Ed(e,e.memoizedProps,c.memoizedProps);break;case 5:if(Ni(t,e),Ei(e),b&512&&($t||c===null||Rs(c,c.return)),e.flags&32){D=e.stateNode;try{ae(e,vv,D)}catch(xe){dt(e,e.return,xe)}}b&4&&e.stateNode!=null&&(D=e.memoizedProps,Ed(e,D,c!==null?c.memoizedProps:D)),b&1024&&(lm=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Ni(t,e),Ei(e),b&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");b=e.memoizedProps,c=c!==null?c.memoizedProps:b,D=e.stateNode;try{ae(e,LS,D,c,b)}catch(xe){dt(e,e.return,xe)}}break;case 3:if(D=Ks(),Hu=null,A=fs,fs=Ac(t.containerInfo),Ni(t,e),fs=A,Ei(e),b&4&&c!==null&&c.memoizedState.isDehydrated)try{ae(e,WS,t.containerInfo)}catch(xe){dt(e,e.return,xe)}lm&&(lm=!1,yg(e)),t.effectDuration+=Ql(D);break;case 4:b=fs,fs=Ac(e.stateNode.containerInfo),Ni(t,e),Ei(e),fs=b;break;case 12:b=Ks(),Ni(t,e),Ei(e),e.stateNode.effectDuration+=ua(b);break;case 31:Ni(t,e),Ei(e),b&4&&(b=e.updateQueue,b!==null&&(e.updateQueue=null,Ec(e,b)));break;case 13:Ni(t,e),Ei(e),e.child.flags&8192&&e.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(xu=Zt()),b&4&&(b=e.updateQueue,b!==null&&(e.updateQueue=null,Ec(e,b)));break;case 22:D=e.memoizedState!==null;var P=c!==null&&c.memoizedState!==null,re=pn,Ne=$t;if(pn=re||D,$t=Ne||P,Ni(t,e),$t=Ne,pn=re,P&&!D&&!re&&!Ne&&(e.mode&Fe)!==Ye&&0<=Oe&&0<=je&&.05<je-Oe&&Hl(e,Oe,je),Ei(e),b&8192)e:for(t=e.stateNode,t._visibility=D?t._visibility&~Wa:t._visibility|Wa,!D||c===null||P||pn||$t||(Nr(e),(e.mode&Fe)!==Ye&&0<=Oe&&0<=je&&.05<je-Oe&&_s(e,Oe,je,"Disconnect")),c=null,t=e;;){if(t.tag===5||t.tag===26){if(c===null){P=c=t;try{A=P.stateNode,D?ae(P,XS,A):ae(P,zS,P.stateNode,P.memoizedProps)}catch(xe){dt(P,P.return,xe)}}}else if(t.tag===6){if(c===null){P=t;try{Q=P.stateNode,D?ae(P,HS,Q):ae(P,IS,Q,P.memoizedProps)}catch(xe){dt(P,P.return,xe)}}}else if(t.tag===18){if(c===null){P=t;try{Z=P.stateNode,D?ae(P,VS,Z):ae(P,US,P.stateNode)}catch(xe){dt(P,P.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;c===t&&(c=null),t=t.return}c===t&&(c=null),t.sibling.return=t.return,t=t.sibling}b&4&&(b=e.updateQueue,b!==null&&(c=b.retryQueue,c!==null&&(b.retryQueue=null,Ec(e,c))));break;case 19:Ni(t,e),Ei(e),b&4&&(b=e.updateQueue,b!==null&&(e.updateQueue=null,Ec(e,b)));break;case 30:break;case 21:break;default:Ni(t,e),Ei(e)}(e.mode&Fe)!==Ye&&0<=Oe&&0<=je&&((At||.05<Rt)&&ws(e,Oe,je,Rt,kt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<je-Oe&&(mg(e.return.alternate,e.return)||_s(e,Oe,je,"Mount"))),Bi(i),Ns(s),kt=n,At=r}function Ei(e){var t=e.flags;if(t&2){try{ae(e,cS,e)}catch(i){dt(e,e.return,i)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ts(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pg(e,t.alternate,t),t=t.sibling}function Sg(e){var t=Ti(),i=Ss(),s=Es(),n=xs();switch(e.tag){case 0:case 11:case 14:case 15:Sd(e,e.return,Xi),Nr(e);break;case 1:Rs(e,e.return);var r=e.stateNode;typeof r.componentWillUnmount=="function"&&cg(e,e.return,r),Nr(e);break;case 27:ae(e,Ba,e.stateNode);case 26:case 5:Rs(e,e.return),Nr(e);break;case 22:e.memoizedState===null&&Nr(e);break;case 30:Nr(e);break;default:Nr(e)}(e.mode&Fe)!==Ye&&0<=Oe&&0<=je&&(At||.05<Rt)&&ws(e,Oe,je,Rt,kt),Bi(t),Ns(i),kt=s,At=n}function Nr(e){for(e=e.child;e!==null;)Sg(e),e=e.sibling}function Ng(e,t,i,s){var n=Ti(),r=Ss(),c=Es(),b=xs(),D=i.flags;switch(i.tag){case 0:case 11:case 15:Bs(e,i,s),og(i,Xi);break;case 1:if(Bs(e,i,s),t=i.stateNode,typeof t.componentDidMount=="function"&&ae(i,Gf,i,t),t=i.updateQueue,t!==null){e=i.stateNode;try{ae(i,Wy,t,e)}catch(A){dt(i,i.return,A)}}s&&D&64&&lg(i),Sa(i,i.return);break;case 27:fg(i);case 26:case 5:Bs(e,i,s),s&&t===null&&D&4&&hg(i),Sa(i,i.return);break;case 12:if(s&&D&4){D=Ks(),Bs(e,i,s),s=i.stateNode,s.effectDuration+=ua(D);try{ae(i,ug,i,t,In,s.effectDuration)}catch(A){dt(i,i.return,A)}}else Bs(e,i,s);break;case 31:Bs(e,i,s),s&&D&4&&vg(e,i);break;case 13:Bs(e,i,s),s&&D&4&&_g(e,i);break;case 22:i.memoizedState===null&&Bs(e,i,s),Sa(i,i.return);break;case 30:break;default:Bs(e,i,s)}(i.mode&Fe)!==Ye&&0<=Oe&&0<=je&&(At||.05<Rt)&&ws(i,Oe,je,Rt,kt),Bi(n),Ns(r),kt=c,At=b}function Bs(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;)Ng(e,t.alternate,t,i),t=t.sibling}function Dd(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&vr(e),i!=null&&ca(i))}function kd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(vr(t),e!=null&&ca(e))}function ls(e,t,i,s,n){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(t=t.child;t!==null;){var r=t.sibling;Eg(e,t,i,s,r!==null?r.actualStartTime:n),t=r}}function Eg(e,t,i,s,n){var r=Ti(),c=Ss(),b=Es(),D=xs(),A=Xn,Q=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&Fe)!==Ye&&0<t.actualStartTime&&(t.flags&1)!==0&&Ul(t,t.actualStartTime,n,Gt,i),ls(e,t,i,s,n),Q&2048&&ag(t,_i|ts);break;case 1:(t.mode&Fe)!==Ye&&0<t.actualStartTime&&((t.flags&128)!==0?uh(t,t.actualStartTime,n,[]):(t.flags&1)!==0&&Ul(t,t.actualStartTime,n,Gt,i)),ls(e,t,i,s,n);break;case 3:var Z=Ks(),P=Gt;Gt=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)===0,ls(e,t,i,s,n),Gt=P,Q&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),s=t.memoizedState.cache,s!==i&&(vr(s),i!=null&&ca(i))),e.passiveEffectDuration+=Ql(Z);break;case 12:if(Q&2048){Q=Ks(),ls(e,t,i,s,n),e=t.stateNode,e.passiveEffectDuration+=ua(Q);try{ae(t,lS,t,t.alternate,In,e.passiveEffectDuration)}catch(re){dt(t,t.return,re)}}else ls(e,t,i,s,n);break;case 31:Q=Gt,Z=t.alternate!==null?t.alternate.memoizedState:null,P=t.memoizedState,Z!==null&&P===null?(P=t.deletions,P!==null&&0<P.length&&P[0].tag===18?(Gt=!1,Z=Z.hydrationErrors,Z!==null&&uh(t,t.actualStartTime,n,Z)):Gt=!0):Gt=!1,ls(e,t,i,s,n),Gt=Q;break;case 13:Q=Gt,Z=t.alternate!==null?t.alternate.memoizedState:null,P=t.memoizedState,Z===null||Z.dehydrated===null||P!==null&&P.dehydrated!==null?Gt=!1:(P=t.deletions,P!==null&&0<P.length&&P[0].tag===18?(Gt=!1,Z=Z.hydrationErrors,Z!==null&&uh(t,t.actualStartTime,n,Z)):Gt=!0),ls(e,t,i,s,n),Gt=Q;break;case 23:break;case 22:P=t.stateNode,Z=t.alternate,t.memoizedState!==null?P._visibility&rn?ls(e,t,i,s,n):Na(e,t,i,s,n):P._visibility&rn?ls(e,t,i,s,n):(P._visibility|=rn,lo(e,t,i,s,(t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),n),(t.mode&Fe)===Ye||Gt||(e=t.actualStartTime,0<=e&&.05<n-e&&Hl(t,e,n),0<=Oe&&0<=je&&.05<je-Oe&&Hl(t,Oe,je))),Q&2048&&Dd(Z,t);break;case 24:ls(e,t,i,s,n),Q&2048&&kd(t.alternate,t);break;default:ls(e,t,i,s,n)}(t.mode&Fe)!==Ye&&((e=!Gt&&t.alternate===null&&t.return!==null&&t.return.alternate!==null)&&(i=t.actualStartTime,0<=i&&.05<n-i&&_s(t,i,n,"Mount")),0<=Oe&&0<=je&&((At||.05<Rt)&&ws(t,Oe,je,Rt,kt),e&&.05<je-Oe&&_s(t,Oe,je,"Mount"))),Bi(r),Ns(c),kt=b,At=D,Xn=A}function lo(e,t,i,s,n,r){for(n=n&&((t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child)),t=t.child;t!==null;){var c=t.sibling;xg(e,t,i,s,n,c!==null?c.actualStartTime:r),t=c}}function xg(e,t,i,s,n,r){var c=Ti(),b=Ss(),D=Es(),A=xs(),Q=Xn;n&&(t.mode&Fe)!==Ye&&0<t.actualStartTime&&(t.flags&1)!==0&&Ul(t,t.actualStartTime,r,Gt,i);var Z=t.flags;switch(t.tag){case 0:case 11:case 15:lo(e,t,i,s,n,r),ag(t,_i);break;case 23:break;case 22:var P=t.stateNode;t.memoizedState!==null?P._visibility&rn?lo(e,t,i,s,n,r):Na(e,t,i,s,r):(P._visibility|=rn,lo(e,t,i,s,n,r)),n&&Z&2048&&Dd(t.alternate,t);break;case 24:lo(e,t,i,s,n,r),n&&Z&2048&&kd(t.alternate,t);break;default:lo(e,t,i,s,n,r)}(t.mode&Fe)!==Ye&&0<=Oe&&0<=je&&(At||.05<Rt)&&ws(t,Oe,je,Rt,kt),Bi(c),Ns(b),kt=D,At=A,Xn=Q}function Na(e,t,i,s,n){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(var r=t.child;r!==null;){t=r.sibling;var c=e,b=i,D=s,A=t!==null?t.actualStartTime:n,Q=Xn;(r.mode&Fe)!==Ye&&0<r.actualStartTime&&(r.flags&1)!==0&&Ul(r,r.actualStartTime,A,Gt,b);var Z=r.flags;switch(r.tag){case 22:Na(c,r,b,D,A),Z&2048&&Dd(r.alternate,r);break;case 24:Na(c,r,b,D,A),Z&2048&&kd(r.alternate,r);break;default:Na(c,r,b,D,A)}Xn=Q,r=t}}function co(e,t,i){if(e.subtreeFlags&fl)for(e=e.child;e!==null;)Cg(e,t,i),e=e.sibling}function Cg(e,t,i){switch(e.tag){case 26:co(e,t,i),e.flags&fl&&e.memoizedState!==null&&JS(i,fs,e.memoizedState,e.memoizedProps);break;case 5:co(e,t,i);break;case 3:case 4:var s=fs;fs=Ac(e.stateNode.containerInfo),co(e,t,i),fs=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=fl,fl=16777216,co(e,t,i),fl=s):co(e,t,i));break;default:co(e,t,i)}}function Dg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ea(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i],n=Ti();ei=s,Tg(s,e),(s.mode&Fe)!==Ye&&0<=Oe&&0<=je&&.05<je-Oe&&_s(s,Oe,je,"Unmount"),Bi(n)}Dg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kg(e),e=e.sibling}function kg(e){var t=Ti(),i=Ss(),s=Es(),n=xs();switch(e.tag){case 0:case 11:case 15:Ea(e),e.flags&2048&&Nd(e,e.return,_i|ts);break;case 3:var r=Ks();Ea(e),e.stateNode.passiveEffectDuration+=Ql(r);break;case 12:r=Ks(),Ea(e),e.stateNode.passiveEffectDuration+=ua(r);break;case 22:r=e.stateNode,e.memoizedState!==null&&r._visibility&rn&&(e.return===null||e.return.tag!==13)?(r._visibility&=~rn,xc(e),(e.mode&Fe)!==Ye&&0<=Oe&&0<=je&&.05<je-Oe&&_s(e,Oe,je,"Disconnect")):Ea(e);break;default:Ea(e)}(e.mode&Fe)!==Ye&&0<=Oe&&0<=je&&(At||.05<Rt)&&ws(e,Oe,je,Rt,kt),Bi(t),Ns(i),At=n,kt=s}function xc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i],n=Ti();ei=s,Tg(s,e),(s.mode&Fe)!==Ye&&0<=Oe&&0<=je&&.05<je-Oe&&_s(s,Oe,je,"Unmount"),Bi(n)}Dg(e)}for(e=e.child;e!==null;)Rg(e),e=e.sibling}function Rg(e){var t=Ti(),i=Ss(),s=Es(),n=xs();switch(e.tag){case 0:case 11:case 15:Nd(e,e.return,_i),xc(e);break;case 22:var r=e.stateNode;r._visibility&rn&&(r._visibility&=~rn,xc(e));break;default:xc(e)}(e.mode&Fe)!==Ye&&0<=Oe&&0<=je&&(At||.05<Rt)&&ws(e,Oe,je,Rt,kt),Bi(t),Ns(i),At=n,kt=s}function Tg(e,t){for(;ei!==null;){var i=ei,s=i,n=t,r=Ti(),c=Ss(),b=Es(),D=xs();switch(s.tag){case 0:case 11:case 15:Nd(s,n,_i);break;case 23:case 22:s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool,n!=null&&vr(n));break;case 24:ca(s.memoizedState.cache)}if((s.mode&Fe)!==Ye&&0<=Oe&&0<=je&&(At||.05<Rt)&&ws(s,Oe,je,Rt,kt),Bi(r),Ns(c),At=D,kt=b,s=i.child,s!==null)s.return=i,ei=s;else e:for(i=e;ei!==null;){if(s=ei,r=s.sibling,c=s.return,bg(s),s===i){ei=null;break e}if(r!==null){r.return=c,ei=r;break e}ei=c}}}function dS(){LN.forEach(function(e){return e()})}function Bg(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||he.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Mi(e){if((lt&Qt)!==ti&&Qe!==0)return Qe&-Qe;var t=he.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),jd()):yn()}function Ag(){if(Di===0)if((Qe&536870912)===0||it){var e=$c;$c<<=1,($c&3932160)===0&&($c=262144),Di=e}else Di=536870912;return e=Vi.current,e!==null&&(e.flags|=32),Di}function Bt(e,t,i){if(Go&&console.error("useInsertionEffect must not schedule updates."),_m&&(Ru=!0),(e===_t&&(pt===Xr||pt===Hr)||e.cancelPendingCommit!==null)&&(ho(e,0),Bn(e,Qe,Di,!1)),ct(e,i),(lt&Qt)!==ti&&e===_t){if(js)switch(t.tag){case 0:case 11:case 15:e=Ke&&M(Ke)||"Unknown",rw.has(e)||(rw.add(e),t=M(t)||"Unknown",console.error("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://react.dev/link/setstate-in-render",t,e,e));break;case 1:nw||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),nw=!0)}}else Vs&&cr(e,t,i),SS(t),e===_t&&((lt&Qt)===ti&&(Kn|=i),Tt===Fn&&Bn(e,Qe,Di,!1)),As(e)}function Mg(e,t,i){if((lt&(Qt|Hi))!==ti)throw Error("Should not already be working.");if(Qe!==0&&Ke!==null){var s=Ke,n=Zt();switch(K_){case bl:case Xr:var r=Ja;Et&&((s=s._debugTask)?s.run(console.timeStamp.bind(console,"Suspended",r,n,Wi,void 0,"primary-light")):console.timeStamp("Suspended",r,n,Wi,void 0,"primary-light"));break;case Hr:r=Ja,Et&&((s=s._debugTask)?s.run(console.timeStamp.bind(console,"Action",r,n,Wi,void 0,"primary-light")):console.timeStamp("Action",r,n,Wi,void 0,"primary-light"));break;default:Et&&(s=n-Ja,3>s||console.timeStamp("Blocked",Ja,n,Wi,void 0,5>s?"primary-light":10>s?"primary":100>s?"primary-dark":"error"))}}r=(i=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ze(e,t))?mS(e,t):Td(e,t,!0);var c=i;do{if(r===bn){Wo&&!i&&Bn(e,t,0,!1),t=pt,Ja=Ut(),K_=t;break}else{if(s=Zt(),n=e.current.alternate,c&&!fS(n)){os(t),n=Jt,r=s,!Et||r<=n||(Lt?Lt.run(console.timeStamp.bind(console,"Teared Render",n,r,ot,nt,"error")):console.timeStamp("Teared Render",n,r,ot,nt,"error")),Er(t,s),r=Td(e,t,!1),c=!1;continue}if(r===Vr){if(c=t,e.errorRecoveryDisabledLanes&c)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){os(t),hh(Jt,s,t,Lt),Er(t,s),t=b;e:{s=e,r=c,c=vl;var D=s.current.memoizedState.isDehydrated;if(D&&(ho(s,b).flags|=256),b=Td(s,b,!1),b!==Vr){if(hm&&!D){s.errorRecoveryDisabledLanes|=r,Kn|=r,r=Fn;break e}s=wi,wi=c,s!==null&&(wi===null?wi=s:wi.push.apply(wi,s))}r=b}if(c=!1,r!==Vr)continue;s=Zt()}}if(r===pl){os(t),hh(Jt,s,t,Lt),Er(t,s),ho(e,0),Bn(e,t,0,!0);break}e:{switch(i=e,r){case bn:case pl:throw Error("Root did not complete. This is a bug in React.");case Fn:if((t&4194048)!==t)break;case yu:os(t),Mp(Jt,s,t,Lt),Er(t,s),n=t,(n&127)!==0?ou=s:(n&4194048)!==0&&(au=s),Bn(i,t,Di,!Gn);break e;case Vr:wi=null;break;case wu:case q0:break;default:throw Error("Unknown root exit status.")}if(he.actQueue!==null)Bd(i,n,t,wi,_l,Eu,Di,Kn,Ur,r,null,null,Jt,s);else{if((t&62914560)===t&&(c=xu+F0-Zt(),10<c)){if(Bn(i,t,Di,!Gn),Be(i,0,!0)!==0)break e;ms=t,i.timeoutHandle=fw(Og.bind(null,i,n,wi,_l,Eu,t,Di,Kn,Ur,Gn,r,"Throttled",Jt,s),c);break e}Og(i,n,wi,_l,Eu,t,Di,Kn,Ur,Gn,r,null,Jt,s)}}}break}while(!0);As(e)}function Og(e,t,i,s,n,r,c,b,D,A,Q,Z,P,re){e.timeoutHandle=Pr;var Ne=t.subtreeFlags,xe=null;if((Ne&8192||(Ne&16785408)===16785408)&&(xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ws},Cg(t,r,xe),Ne=(r&62914560)===r?xu-Zt():(r&4194048)===r?W0-Zt():0,Ne=e1(xe,Ne),Ne!==null)){ms=r,e.cancelPendingCommit=Ne(Bd.bind(null,e,t,r,i,s,n,c,b,D,Q,xe,xe.waitingForViewTransition?"Waiting for the previous Animation":0<xe.count?0<xe.imgCount?"Suspended on CSS and Images":"Suspended on CSS":xe.imgCount===1?"Suspended on an Image":0<xe.imgCount?"Suspended on Images":null,P,re)),Bn(e,r,c,!A);return}Bd(e,t,r,i,s,n,c,b,D,Q,xe,Z,P,re)}function fS(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var n=i[s],r=n.getSnapshot;n=n.value;try{if(!bi(r(),n))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bn(e,t,i,s){t&=~dm,t&=~Kn,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var n=t;0<n;){var r=31-fi(n),c=1<<r;s[r]=-1,n&=~c}i!==0&&wt(e,i,t)}function uo(){return(lt&(Qt|Hi))===ti?(Da(0),!1):!0}function Rd(){if(Ke!==null){if(pt===Ci)var e=Ke.return;else e=Ke,Wl(),Hh(e),Vo=null,ll=0,e=Ke;for(;e!==null;)rg(e.alternate,e),e=e.return;Ke=null}}function Er(e,t){(e&127)!==0&&(Rr=t),(e&4194048)!==0&&(un=t),(e&62914560)!==0&&(G_=t),(e&2080374784)!==0&&(Q_=t)}function ho(e,t){Et&&(console.timeStamp("Blocking Track",.003,.003,"Blocking",nt,"primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition",nt,"primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense",nt,"primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle",nt,"primary-light"));var i=Jt;if(Jt=Ut(),Qe!==0&&0<i){if(os(Qe),Tt===wu||Tt===Fn)Mp(i,Jt,t,Lt);else{var s=Jt,n=Lt;if(Et&&!(s<=i)){var r=(t&738197653)===t?"tertiary-dark":"primary-dark",c=(t&536870912)===t?"Prewarm":(t&201326741)===t?"Interrupted Hydration":"Interrupted Render";n?n.run(console.timeStamp.bind(console,c,i,s,ot,nt,r)):console.timeStamp(c,i,s,ot,nt,r)}}Er(Qe,Jt)}if(i=Lt,Lt=null,(t&127)!==0){Lt=Qa,n=0<=zs&&zs<Rr?Rr:zs,s=0<=Tr&&Tr<Rr?Rr:Tr,r=0<=s?s:0<=n?n:Jt,0<=ou?(os(2),Op(ou,r,t,i)):lu&127,i=n;var b=s,D=Ka,A=0<Lo,Q=$n===Ga,Z=$n===ru;if(n=Jt,s=Qa,r=$f,c=qf,Et){if(ot="Blocking",0<i?i>n&&(i=n):i=n,0<b?b>i&&(b=i):b=i,D!==null&&i>b){var P=A?"secondary-light":"warning";s?s.run(console.timeStamp.bind(console,A?"Consecutive":"Event: "+D,b,i,ot,nt,P)):console.timeStamp(A?"Consecutive":"Event: "+D,b,i,ot,nt,P)}n>i&&(b=Q?"error":(t&738197653)===t?"tertiary-light":"primary-light",Q=Z?"Promise Resolved":Q?"Cascading Update":5<n-i?"Update Blocked":"Update",Z=[],c!=null&&Z.push(["Component name",c]),r!=null&&Z.push(["Method name",r]),i={start:i,end:n,detail:{devtools:{properties:Z,track:ot,trackGroup:nt,color:b}}},s?s.run(performance.measure.bind(performance,Q,i)):performance.measure(Q,i))}zs=-1.1,$n=0,qf=$f=null,ou=-1.1,Lo=Tr,Tr=-1.1,Rr=Ut()}if((t&4194048)!==0&&(Lt=Za,n=0<=hn&&hn<un?un:hn,i=0<=Ji&&Ji<un?un:Ji,s=0<=qn&&qn<un?un:qn,r=0<=s?s:0<=i?i:Jt,0<=au?(os(256),Op(au,r,t,Lt)):lu&4194048,Z=s,b=Br,D=0<Pn,A=Pf===ru,r=Jt,s=Za,c=W_,Q=F_,Et&&(ot="Transition",0<i?i>r&&(i=r):i=r,0<n?n>i&&(n=i):n=i,0<Z?Z>n&&(Z=n):Z=n,n>Z&&b!==null&&(P=D?"secondary-light":"warning",s?s.run(console.timeStamp.bind(console,D?"Consecutive":"Event: "+b,Z,n,ot,nt,P)):console.timeStamp(D?"Consecutive":"Event: "+b,Z,n,ot,nt,P)),i>n&&(s?s.run(console.timeStamp.bind(console,"Action",n,i,ot,nt,"primary-dark")):console.timeStamp("Action",n,i,ot,nt,"primary-dark")),r>i&&(n=A?"Promise Resolved":5<r-i?"Update Blocked":"Update",Z=[],Q!=null&&Z.push(["Component name",Q]),c!=null&&Z.push(["Method name",c]),i={start:i,end:r,detail:{devtools:{properties:Z,track:ot,trackGroup:nt,color:"primary-light"}}},s?s.run(performance.measure.bind(performance,n,i)):performance.measure(n,i))),Ji=hn=-1.1,Pf=0,au=-1.1,Pn=qn,qn=-1.1,un=Ut()),(t&62914560)!==0&&(lu&62914560)!==0&&(os(4194304),dh(G_,Jt)),(t&2080374784)!==0&&(lu&2080374784)!==0&&(os(268435456),dh(Q_,Jt)),i=e.timeoutHandle,i!==Pr&&(e.timeoutHandle=Pr,FN(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ms=0,Rd(),_t=e,Ke=i=Fs(e.current,null),Qe=t,pt=Ci,Ui=null,Gn=!1,Wo=Ze(e,t),hm=!1,Tt=bn,Ur=Di=dm=Kn=Qn=0,wi=vl=null,Eu=!1,(t&8)!==0&&(t|=t&32),s=e.entangledLanes,s!==0)for(e=e.entanglements,s&=t;0<s;)n=31-fi(s),r=1<<n,t|=e[n],s&=~r;return $s=t,zl(),e=U_(),1e3<e-H_&&(he.recentlyCreatedOwnerStacks=0,H_=e),hs.discardPendingWarnings(),i}function Lg(e,t){Xe=null,he.H=dl,he.getCurrentStack=null,js=!1,ji=null,t===Yo||t===du?(t=ib(),pt=bl):t===Qf?(t=ib(),pt=P0):pt=t===om?um:t!==null&&typeof t=="object"&&typeof t.then=="function"?gl:Su,Ui=t;var i=Ke;i===null?(Tt=pl,vc(e,Ri(t,e.current))):i.mode&Fe&&Dh(i)}function jg(){var e=Vi.current;return e===null?!0:(Qe&4194048)===Qe?es===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===es:!1}function Yg(){var e=he.H;return he.H=dl,e===null?dl:e}function Vg(){var e=he.A;return he.A=ON,e}function Cc(e){Lt===null&&(Lt=e._debugTask==null?null:e._debugTask)}function Dc(){Tt=Fn,Gn||(Qe&4194048)!==Qe&&Vi.current!==null||(Wo=!0),(Qn&134217727)===0&&(Kn&134217727)===0||_t===null||Bn(_t,Qe,Di,!1)}function Td(e,t,i){var s=lt;lt|=Qt;var n=Yg(),r=Vg();if(_t!==e||Qe!==t){if(Vs){var c=e.memoizedUpdaters;0<c.size&&(Ca(e,Qe),c.clear()),Gr(e,t)}_l=null,ho(e,t)}t=!1,c=Tt;e:do try{if(pt!==Ci&&Ke!==null){var b=Ke,D=Ui;switch(pt){case um:Rd(),c=yu;break e;case bl:case Xr:case Hr:case gl:Vi.current===null&&(t=!0);var A=pt;if(pt=Ci,Ui=null,fo(e,b,D,A),i&&Wo){c=bn;break e}break;default:A=pt,pt=Ci,Ui=null,fo(e,b,D,A)}}Xg(),c=Tt;break}catch(Q){Lg(e,Q)}while(!0);return t&&e.shellSuspendCounter++,Wl(),lt=s,he.H=n,he.A=r,Ke===null&&(_t=null,Qe=0,zl()),c}function Xg(){for(;Ke!==null;)Hg(Ke)}function mS(e,t){var i=lt;lt|=Qt;var s=Yg(),n=Vg();if(_t!==e||Qe!==t){if(Vs){var r=e.memoizedUpdaters;0<r.size&&(Ca(e,Qe),r.clear()),Gr(e,t)}_l=null,Cu=Zt()+G0,ho(e,t)}else Wo=Ze(e,t);e:do try{if(pt!==Ci&&Ke!==null)t:switch(t=Ke,r=Ui,pt){case Su:pt=Ci,Ui=null,fo(e,t,r,Su);break;case Xr:case Hr:if(eb(r)){pt=Ci,Ui=null,Ug(t);break}t=function(){pt!==Xr&&pt!==Hr||_t!==e||(pt=Nu),As(e)},r.then(t,t);break e;case bl:pt=Nu;break e;case P0:pt=cm;break e;case Nu:eb(r)?(pt=Ci,Ui=null,Ug(t)):(pt=Ci,Ui=null,fo(e,t,r,Nu));break;case cm:var c=null;switch(Ke.tag){case 26:c=Ke.memoizedState;case 5:case 27:var b=Ke;if(c?Mv(c):b.stateNode.complete){pt=Ci,Ui=null;var D=b.sibling;if(D!==null)Ke=D;else{var A=b.return;A!==null?(Ke=A,kc(A)):Ke=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}pt=Ci,Ui=null,fo(e,t,r,cm);break;case gl:pt=Ci,Ui=null,fo(e,t,r,gl);break;case um:Rd(),Tt=yu;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}he.actQueue!==null?Xg():pS();break}catch(Q){Lg(e,Q)}while(!0);return Wl(),he.H=s,he.A=n,lt=i,Ke!==null?bn:(_t=null,Qe=0,zl(),Tt)}function pS(){for(;Ke!==null&&!m1();)Hg(Ke)}function Hg(e){var t=e.alternate;(e.mode&Fe)!==Ye?(Ch(e),t=ae(e,wd,t,e,$s),Dh(e)):t=ae(e,wd,t,e,$s),e.memoizedProps=e.pendingProps,t===null?kc(e):Ke=t}function Ug(e){var t=ae(e,bS,e);e.memoizedProps=e.pendingProps,t===null?kc(e):Ke=t}function bS(e){var t=e.alternate,i=(e.mode&Fe)!==Ye;switch(i&&Ch(e),e.tag){case 15:case 0:t=Zb(t,e,e.pendingProps,e.type,void 0,Qe);break;case 11:t=Zb(t,e,e.pendingProps,e.type.render,e.ref,Qe);break;case 5:Hh(e);default:rg(t,e),e=Ke=Hp(e,$s),t=wd(t,e,$s)}return i&&Dh(e),t}function fo(e,t,i,s){Wl(),Hh(t),Vo=null,ll=0;var n=t.return;try{if(eS(e,n,t,i,Qe)){Tt=pl,vc(e,Ri(i,e.current)),Ke=null;return}}catch(r){if(n!==null)throw Ke=n,r;Tt=pl,vc(e,Ri(i,e.current)),Ke=null;return}t.flags&32768?(it||s===Su?e=!0:Wo||(Qe&536870912)!==0?e=!1:(Gn=e=!0,(s===Xr||s===Hr||s===bl||s===gl)&&(s=Vi.current,s!==null&&s.tag===13&&(s.flags|=16384))),zg(t,e)):kc(t)}function kc(e){var t=e;do{if((t.flags&32768)!==0){zg(t,Gn);return}var i=t.alternate;if(e=t.return,Ch(t),i=ae(t,sS,i,t,$s),(t.mode&Fe)!==Ye&&Gp(t),i!==null){Ke=i;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);Tt===bn&&(Tt=q0)}function zg(e,t){do{var i=nS(e.alternate,e);if(i!==null){i.flags&=32767,Ke=i;return}if((e.mode&Fe)!==Ye){Gp(e),i=e.actualDuration;for(var s=e.child;s!==null;)i+=s.actualDuration,s=s.sibling;e.actualDuration=i}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Ke=e;return}Ke=e=i}while(e!==null);Tt=yu,Ke=null}function Bd(e,t,i,s,n,r,c,b,D,A,Q,Z,P,re){e.cancelPendingCommit=null;do xa();while(Pt!==Jn);if(hs.flushLegacyContextWarning(),hs.flushPendingUnsafeLifecycleWarnings(),(lt&(Qt|Hi))!==ti)throw Error("Should not already be working.");if(os(i),A===Vr?hh(P,re,i,Lt):s!==null?Uy(P,re,i,s,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,Lt):Hy(P,re,i,Lt),t!==null){if(i===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),t===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(r=t.lanes|t.childLanes,r|=Xf,bt(e,i,r,c,b,D),e===_t&&(Ke=_t=null,Qe=0),Fo=t,er=e,ms=i,pm=r,gm=n,tw=s,bm=re,iw=Z,ps=Du,sw=null,t.actualDuration!==0||(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,yS(_o,function(){return xl=window.event,ps===Du&&(ps=mm),Wg(),null})):(e.callbackNode=null,e.callbackPriority=0),cn=null,In=Ut(),Z!==null&&zy(re,In,Z,Lt),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=he.T,he.T=null,n=ft.p,ft.p=Pi,c=lt,lt|=Hi;try{uS(e,t,i)}finally{lt=c,ft.p=n,he.T=s}}Pt=K0,Ig(),$g(),qg()}}function Ig(){if(Pt===K0){Pt=Jn;var e=er,t=Fo,i=ms,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=he.T,he.T=null;var n=ft.p;ft.p=Pi;var r=lt;lt|=Hi;try{qo=i,Po=e,Kl(),wg(t,e),Po=qo=null,i=km;var c=Tp(e.containerInfo),b=i.focusedElem,D=i.selectionRange;if(c!==b&&b&&b.ownerDocument&&Rp(b.ownerDocument.documentElement,b)){if(D!==null&&lh(b)){var A=D.start,Q=D.end;if(Q===void 0&&(Q=A),"selectionStart"in b)b.selectionStart=A,b.selectionEnd=Math.min(Q,b.value.length);else{var Z=b.ownerDocument||document,P=Z&&Z.defaultView||window;if(P.getSelection){var re=P.getSelection(),Ne=b.textContent.length,xe=Math.min(D.start,Ne),St=D.end===void 0?xe:Math.min(D.end,Ne);!re.extend&&xe>St&&(c=St,St=xe,xe=c);var rt=kp(b,xe),$=kp(b,St);if(rt&&$&&(re.rangeCount!==1||re.anchorNode!==rt.node||re.anchorOffset!==rt.offset||re.focusNode!==$.node||re.focusOffset!==$.offset)){var W=Z.createRange();W.setStart(rt.node,rt.offset),re.removeAllRanges(),xe>St?(re.addRange(W),re.extend($.node,$.offset)):(W.setEnd($.node,$.offset),re.addRange(W))}}}}for(Z=[],re=b;re=re.parentNode;)re.nodeType===1&&Z.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Z.length;b++){var G=Z[b];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Iu=!!Dm,km=Dm=null}finally{lt=r,ft.p=n,he.T=s}}e.current=t,Pt=Z0}}function $g(){if(Pt===Z0){Pt=Jn;var e=sw;if(e!==null){In=Ut();var t=ln,i=In;!Et||i<=t||console.timeStamp(e,t,i,ot,nt,"secondary-light")}e=er,t=Fo,i=ms;var s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=he.T,he.T=null;var n=ft.p;ft.p=Pi;var r=lt;lt|=Hi;try{qo=i,Po=e,Kl(),pg(e,t.alternate,t),Po=qo=null}finally{lt=r,ft.p=n,he.T=s}}e=bm,t=iw,ln=Ut(),e=t===null?e:In,t=ln,i=ps===fm,s=Lt,cn!==null?Lp(e,t,cn,!1,s):!Et||t<=e||(s?s.run(console.timeStamp.bind(console,i?"Commit Interrupted View Transition":"Commit",e,t,ot,nt,i?"error":"secondary-dark")):console.timeStamp(i?"Commit Interrupted View Transition":"Commit",e,t,ot,nt,i?"error":"secondary-dark")),Pt=J0}}function qg(){if(Pt===ew||Pt===J0){if(Pt===ew){var e=ln;ln=Ut();var t=ln,i=ps===fm;!Et||t<=e||console.timeStamp(i?"Interrupted View Transition":"Starting Animation",e,t,ot,nt,i?" error":"secondary-light"),ps!==fm&&(ps=Q0)}Pt=Jn,p1(),e=er;var s=Fo;t=ms,i=tw;var n=s.actualDuration!==0||(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0;n?Pt=ku:(Pt=Jn,Fo=er=null,Pg(e,e.pendingLanes),zr=0,yl=null);var r=e.pendingLanes;if(r===0&&(Zn=null),n||Kg(e),r=Qr(t),s=s.stateNode,li&&typeof li.onCommitFiberRoot=="function")try{var c=(s.current.flags&128)===128;switch(r){case Pi:var b=gf;break;case Xs:b=vf;break;case sn:b=_o;break;case Pc:b=_f;break;default:b=_o}li.onCommitFiberRoot(wo,s,b,c)}catch(Z){Ys||(Ys=!0,console.error("React instrumentation encountered an error: %o",Z))}if(Vs&&e.memoizedUpdaters.clear(),dS(),i!==null){c=he.T,b=ft.p,ft.p=Pi,he.T=null;try{var D=e.onRecoverableError;for(s=0;s<i.length;s++){var A=i[s],Q=gS(A.stack);ae(A.source,D,A.value,Q)}}finally{he.T=c,ft.p=b}}(ms&3)!==0&&xa(),As(e),r=e.pendingLanes,(t&261930)!==0&&(r&42)!==0?(uu=!0,e===vm?wl++:(wl=0,vm=e)):wl=0,n||Er(t,ln),Da(0)}}function gS(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function Pg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function xa(){return Ig(),$g(),qg(),Wg()}function Wg(){if(Pt!==ku)return!1;var e=er,t=pm;pm=0;var i=Qr(ms),s=sn>i?sn:i;i=he.T;var n=ft.p;try{ft.p=s,he.T=null;var r=gm;gm=null,s=er;var c=ms;if(Pt=Jn,Fo=er=null,ms=0,(lt&(Qt|Hi))!==ti)throw Error("Cannot flush passive effects while already rendering.");os(c),_m=!0,Ru=!1;var b=0;if(cn=null,b=Zt(),ps===Q0)dh(ln,b,DN);else{var D=ln,A=b,Q=ps===mm;!Et||A<=D||(Lt?Lt.run(console.timeStamp.bind(console,Q?"Waiting for Paint":"Waiting",D,A,ot,nt,"secondary-light")):console.timeStamp(Q?"Waiting for Paint":"Waiting",D,A,ot,nt,"secondary-light"))}D=lt,lt|=Hi;var Z=s.current;Kl(),kg(Z);var P=s.current;Z=bm,Kl(),Eg(s,P,c,r,Z),Kg(s),lt=D;var re=Zt();if(P=b,Z=Lt,cn!==null?Lp(P,re,cn,!0,Z):!Et||re<=P||(Z?Z.run(console.timeStamp.bind(console,"Remaining Effects",P,re,ot,nt,"secondary-dark")):console.timeStamp("Remaining Effects",P,re,ot,nt,"secondary-dark")),Er(c,re),Da(0,!1),Ru?s===yl?zr++:(zr=0,yl=s):zr=0,Ru=_m=!1,li&&typeof li.onPostCommitFiberRoot=="function")try{li.onPostCommitFiberRoot(wo,s)}catch(xe){Ys||(Ys=!0,console.error("React instrumentation encountered an error: %o",xe))}var Ne=s.current.stateNode;return Ne.effectDuration=0,Ne.passiveEffectDuration=0,!0}finally{ft.p=n,he.T=i,Pg(e,t)}}function Fg(e,t,i){t=Ri(i,t),Qp(t),t=cd(e.stateNode,t,2),e=Dn(e,t,2),e!==null&&(ct(e,2),As(e))}function dt(e,t,i){if(Go=!1,e.tag===3)Fg(e,e,i);else{for(;t!==null;){if(t.tag===3){Fg(t,e,i);return}if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Zn===null||!Zn.has(s))){e=Ri(i,e),Qp(e),i=ud(2),s=Dn(t,i,2),s!==null&&(hd(i,s,t,e),ct(s,2),As(s));return}}t=t.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
199
|
-
|
|
200
|
-
Error message:
|
|
201
|
-
|
|
202
|
-
%s`,i)}}function Ad(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new jN;var n=new Set;s.set(t,n)}else n=s.get(t),n===void 0&&(n=new Set,s.set(t,n));n.has(i)||(hm=!0,n.add(i),s=vS.bind(null,e,t,i),Vs&&Ca(e,i),t.then(s,s))}function vS(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,(i&127)!==0?0>zs&&(Rr=zs=Ut(),Qa=nu("Promise Resolved"),$n=ru):(i&4194048)!==0&&0>Ji&&(un=Ji=Ut(),Za=nu("Promise Resolved"),Pf=ru),Bg()&&he.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
203
|
-
|
|
204
|
-
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
205
|
-
|
|
206
|
-
act(() => {
|
|
207
|
-
/* finish loading suspended data */
|
|
208
|
-
});
|
|
209
|
-
/* assert on the output */
|
|
210
|
-
|
|
211
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),_t===e&&(Qe&i)===i&&(Tt===Fn||Tt===wu&&(Qe&62914560)===Qe&&Zt()-xu<F0?(lt&Qt)===ti&&ho(e,0):dm|=i,Ur===Qe&&(Ur=0)),As(e)}function Gg(e,t){t===0&&(t=We()),e=ai(e,t),e!==null&&(ct(e,t),As(e))}function _S(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Gg(e,i)}function wS(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,n=e.memoizedState;n!==null&&(i=n.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}s!==null&&s.delete(t),Gg(e,i)}function Md(e,t,i){if((t.subtreeFlags&67117056)!==0)for(t=t.child;t!==null;){var s=e,n=t,r=n.type===Hc;r=i||r,n.tag!==22?n.flags&67108864?r&&ae(n,Qg,s,n):Md(s,n,r):n.memoizedState===null&&(r&&n.flags&8192?ae(n,Qg,s,n):n.subtreeFlags&67108864&&ae(n,Md,s,n,r)),t=t.sibling}}function Qg(e,t){De(!0);try{Sg(t),Rg(t),Ng(e,t.alternate,t,!1),xg(e,t,0,null,!1,0)}finally{De(!1)}}function Kg(e){var t=!0;e.current.mode&(ci|us)||(t=!1),Md(e,e.current,t)}function Zg(e){if((lt&Qt)===ti){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=M(e)||"ReactComponent",Tu!==null){if(Tu.has(t))return;Tu.add(t)}else Tu=new Set([t]);ae(e,function(){console.error("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 tries to update the component. Move this work to useEffect instead.")})}}}function Ca(e,t){Vs&&e.memoizedUpdaters.forEach(function(i){cr(e,i,t)})}function yS(e,t){var i=he.actQueue;return i!==null?(i.push(t),XN):bf(e,t)}function SS(e){Bg()&&he.actQueue===null&&ae(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
212
|
-
|
|
213
|
-
When testing, code that causes React state updates should be wrapped into act(...):
|
|
214
|
-
|
|
215
|
-
act(() => {
|
|
216
|
-
/* fire events that update state */
|
|
217
|
-
});
|
|
218
|
-
/* assert on the output */
|
|
219
|
-
|
|
220
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,M(e))})}function As(e){e!==Qo&&e.next===null&&(Qo===null?Bu=Qo=e:Qo=Qo.next=e),Au=!0,he.actQueue!==null?ym||(ym=!0,iv()):wm||(wm=!0,iv())}function Da(e,t){if(!Sm&&Au){Sm=!0;do for(var i=!1,s=Bu;s!==null;){if(e!==0){var n=s.pendingLanes;if(n===0)var r=0;else{var c=s.suspendedLanes,b=s.pingedLanes;r=(1<<31-fi(42|e)+1)-1,r&=n&~(c&~b),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(i=!0,tv(s,r))}else r=Qe,r=Be(s,s===_t?r:0,s.cancelPendingCommit!==null||s.timeoutHandle!==Pr),(r&3)===0||Ze(s,r)||(i=!0,tv(s,r));s=s.next}while(i);Sm=!1}}function NS(){xl=window.event,Od()}function Od(){Au=ym=wm=!1;var e=0;tr!==0&&TS()&&(e=tr);for(var t=Zt(),i=null,s=Bu;s!==null;){var n=s.next,r=Jg(s,t);r===0?(s.next=null,i===null?Bu=n:i.next=n,n===null&&(Qo=i)):(i=s,(e!==0||(r&3)!==0)&&(Au=!0)),s=n}Pt!==Jn&&Pt!==ku||Da(e),tr!==0&&(tr=0)}function Jg(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,n=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var c=31-fi(r),b=1<<c,D=n[c];D===-1?((b&i)===0||(b&s)!==0)&&(n[c]=ze(b,t)):D<=t&&(e.expiredLanes|=b),r&=~b}if(t=_t,i=Qe,i=Be(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Pr),s=e.callbackNode,i===0||e===t&&(pt===Xr||pt===Hr)||e.cancelPendingCommit!==null)return s!==null&&Ld(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ze(e,i)){if(t=i&-i,t!==e.callbackPriority||he.actQueue!==null&&s!==Nm)Ld(s);else return t;switch(Qr(i)){case Pi:case Xs:i=vf;break;case sn:i=_o;break;case Pc:i=_f;break;default:i=_o}return s=ev.bind(null,e),he.actQueue!==null?(he.actQueue.push(s),i=Nm):i=bf(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&Ld(s),e.callbackPriority=2,e.callbackNode=null,2}function ev(e,t){if(uu=cu=!1,xl=window.event,Pt!==Jn&&Pt!==ku)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ps===Du&&(ps=mm),xa()&&e.callbackNode!==i)return null;var s=Qe;return s=Be(e,e===_t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Pr),s===0?null:(Mg(e,s,t),Jg(e,Zt()),e.callbackNode!=null&&e.callbackNode===i?ev.bind(null,e):null)}function tv(e,t){if(xa())return null;cu=uu,uu=!1,Mg(e,t,!0)}function Ld(e){e!==Nm&&e!==null&&f1(e)}function iv(){he.actQueue!==null&&he.actQueue.push(function(){return Od(),null}),GN(function(){(lt&(Qt|Hi))!==ti?bf(gf,NS):Od()})}function jd(){if(tr===0){var e=Ar;e===0&&(e=Ic,Ic<<=1,(Ic&261888)===0&&(Ic=256)),tr=e}return tr}function sv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(Le(e,"action"),ra(""+e))}function nv(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function ES(e,t,i,s,n){if(t==="submit"&&i&&i.stateNode===n){var r=sv((n[mi]||null).action),c=s.submitter;c&&(t=(t=c[mi]||null)?sv(t.formAction):c.getAttribute("formAction"),t!==null&&(r=t,c=null));var b=new Kc("action","action",null,s,n);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(tr!==0){var D=c?nv(n,c):new FormData(n),A={pending:!0,data:D,method:n.method,action:r};Object.freeze(A),id(i,A,null,D)}}else typeof r=="function"&&(b.preventDefault(),D=c?nv(n,c):new FormData(n),A={pending:!0,data:D,method:n.method,action:r},Object.freeze(A),id(i,A,r,D))},currentTarget:n}]})}}function Rc(e,t,i){e.currentTarget=i;try{t(e)}catch(s){Lf(s)}e.currentTarget=null}function rv(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i];e:{var n=void 0,r=s.event;if(s=s.listeners,t)for(var c=s.length-1;0<=c;c--){var b=s[c],D=b.instance,A=b.currentTarget;if(b=b.listener,D!==n&&r.isPropagationStopped())break e;D!==null?ae(D,Rc,r,b,A):Rc(r,b,A),n=D}else for(c=0;c<s.length;c++){if(b=s[c],D=b.instance,A=b.currentTarget,b=b.listener,D!==n&&r.isPropagationStopped())break e;D!==null?ae(D,Rc,r,b,A):Rc(r,b,A),n=D}}}}function st(e,t){Em.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var i=t[wf];i===void 0&&(i=t[wf]=new Set);var s=e+"__bubble";i.has(s)||(ov(t,e,2,!1),i.add(s))}function Yd(e,t,i){Em.has(e)&&!t&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var s=0;t&&(s|=4),ov(i,e,s,t)}function Vd(e){if(!e[Mu]){e[Mu]=!0,i_.forEach(function(i){i!=="selectionchange"&&(Em.has(i)||Yd(i,!1,e),Yd(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Mu]||(t[Mu]=!0,Yd("selectionchange",!1,t))}}function ov(e,t,i,s){switch(Xv(t)){case Pi:var n=n1;break;case Xs:n=r1;break;default:n=ef}i=n.bind(null,t,i,e),n=void 0,!xf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),s?n!==void 0?e.addEventListener(t,i,{capture:!0,passive:n}):e.addEventListener(t,i,!0):n!==void 0?e.addEventListener(t,i,{passive:n}):e.addEventListener(t,i,!1)}function Xd(e,t,i,s,n){var r=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var c=s.tag;if(c===3||c===4){var b=s.stateNode.containerInfo;if(b===n)break;if(c===4)for(c=s.return;c!==null;){var D=c.tag;if((D===3||D===4)&&c.stateNode.containerInfo===n)return;c=c.return}for(;b!==null;){if(c=we(b),c===null)return;if(D=c.tag,D===5||D===6||D===26||D===27){s=r=c;continue e}b=b.parentNode}}s=s.return}gp(function(){var A=r,Q=oh(i),Z=[];e:{var P=X_.get(e);if(P!==void 0){var re=Kc,Ne=e;switch(e){case"keypress":if(Yl(i)===0)break e;case"keydown":case"keyup":re=eN;break;case"focusin":Ne="focus",re=Rf;break;case"focusout":Ne="blur",re=Rf;break;case"beforeblur":case"afterblur":re=Rf;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=x_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=z1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=sN;break;case L_:case j_:case Y_:re=q1;break;case V_:re=rN;break;case"scroll":case"scrollend":re=H1;break;case"wheel":re=aN;break;case"copy":case"cut":case"paste":re=W1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=D_;break;case"toggle":case"beforetoggle":re=cN}var xe=(t&4)!==0,St=!xe&&(e==="scroll"||e==="scrollend"),rt=xe?P!==null?P+"Capture":null:P;xe=[];for(var $=A,W;$!==null;){var G=$;if(W=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||W===null||rt===null||(G=oa($,rt),G!=null&&xe.push(ka($,G,W))),St)break;$=$.return}0<xe.length&&(P=new re(P,Ne,null,i,Q),Z.push({event:P,listeners:xe}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",re=e==="mouseout"||e==="pointerout",P&&i!==Xa&&(Ne=i.relatedTarget||i.fromElement)&&(we(Ne)||Ne[Yn]))break e;if((re||P)&&(P=Q.window===Q?Q:(P=Q.ownerDocument)?P.defaultView||P.parentWindow:window,re?(Ne=i.relatedTarget||i.toElement,re=A,Ne=Ne?we(Ne):null,Ne!==null&&(St=h(Ne),xe=Ne.tag,Ne!==St||xe!==5&&xe!==27&&xe!==6)&&(Ne=null)):(re=null,Ne=A),re!==Ne)){if(xe=x_,G="onMouseLeave",rt="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(xe=D_,G="onPointerLeave",rt="onPointerEnter",$="pointer"),St=re==null?P:Re(re),W=Ne==null?P:Re(Ne),P=new xe(G,$+"leave",re,i,Q),P.target=St,P.relatedTarget=W,G=null,we(Q)===A&&(xe=new xe(rt,$+"enter",Ne,i,Q),xe.target=W,xe.relatedTarget=St,G=xe),St=G,re&&Ne)t:{for(xe=xS,rt=re,$=Ne,W=0,G=rt;G;G=xe(G))W++;G=0;for(var fe=$;fe;fe=xe(fe))G++;for(;0<W-G;)rt=xe(rt),W--;for(;0<G-W;)$=xe($),G--;for(;W--;){if(rt===$||$!==null&&rt===$.alternate){xe=rt;break t}rt=xe(rt),$=xe($)}xe=null}else xe=null;re!==null&&av(Z,P,re,xe,!1),Ne!==null&&St!==null&&av(Z,St,Ne,xe,!0)}}e:{if(P=A?Re(A):window,re=P.nodeName&&P.nodeName.toLowerCase(),re==="select"||re==="input"&&P.type==="file")var Ee=Ep;else if(Sp(P))if(M_)Ee=Yy;else{Ee=Ly;var He=Oy}else re=P.nodeName,!re||re.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?A&&na(A.elementType)&&(Ee=Ep):Ee=jy;if(Ee&&(Ee=Ee(e,A))){Np(Z,Ee,i,Q);break e}He&&He(e,P,A),e==="focusout"&&A&&P.type==="number"&&A.memoizedProps.value!=null&&eh(P,"number",P.value)}switch(He=A?Re(A):window,e){case"focusin":(Sp(He)||He.contentEditable==="true")&&(Do=He,Bf=A,Pa=null);break;case"focusout":Pa=Bf=Do=null;break;case"mousedown":Af=!0;break;case"contextmenu":case"mouseup":case"dragend":Af=!1,Bp(Z,i,Q);break;case"selectionchange":if(fN)break;case"keydown":case"keyup":Bp(Z,i,Q)}var Me;if(Tf)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Co?wp(e,i)&&(Te="onCompositionEnd"):e==="keydown"&&i.keyCode===k_&&(Te="onCompositionStart");Te&&(R_&&i.locale!=="ko"&&(Co||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Co&&(Me=vp()):(Vn=Q,Cf="value"in Vn?Vn.value:Vn.textContent,Co=!0)),He=Tc(A,Te),0<He.length&&(Te=new C_(Te,e,null,i,Q),Z.push({event:Te,listeners:He}),Me?Te.data=Me:(Me=yp(i),Me!==null&&(Te.data=Me)))),(Me=hN?Ty(e,i):By(e,i))&&(Te=Tc(A,"onBeforeInput"),0<Te.length&&(He=new G1("onBeforeInput","beforeinput",null,i,Q),Z.push({event:He,listeners:Te}),He.data=Me)),ES(Z,e,A,i,Q)}rv(Z,t)})}function ka(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Tc(e,t){for(var i=t+"Capture",s=[];e!==null;){var n=e,r=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||r===null||(n=oa(e,i),n!=null&&s.unshift(ka(e,n,r)),n=oa(e,t),n!=null&&s.push(ka(e,n,r))),e.tag===3)return s;e=e.return}return[]}function xS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function av(e,t,i,s,n){for(var r=t._reactName,c=[];i!==null&&i!==s;){var b=i,D=b.alternate,A=b.stateNode;if(b=b.tag,D!==null&&D===s)break;b!==5&&b!==26&&b!==27||A===null||(D=A,n?(A=oa(i,r),A!=null&&c.unshift(ka(i,A,D))):n||(A=oa(i,r),A!=null&&c.push(ka(i,A,D)))),i=i.return}c.length!==0&&e.push({event:t,listeners:c})}function Hd(e,t){Cy(e,t),e!=="input"&&e!=="textarea"&&e!=="select"||t==null||t.value!==null||N_||(N_=!0,e==="select"&&t.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var i={registrationNameDependencies:xr,possibleRegistrationNames:yf};na(e)||typeof t.is=="string"||ky(e,t,i),t.contentEditable&&!t.suppressContentEditableWarning&&t.children!=null&&console.error("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.")}function Kt(e,t,i,s){t!==i&&(i=An(i),An(t)!==i&&(s[e]=t))}function CS(e,t,i){t.forEach(function(s){i[uv(s)]=s==="style"?zd(e):e.getAttribute(s)})}function Ms(e,t){t===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)}function lv(e,t){return e=e.namespaceURI===Fc||e.namespaceURI===So?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function An(e){return Ue(e)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",be(e)),Ie(e)),(typeof e=="string"?e:""+e).replace(HN,`
|
|
221
|
-
`).replace(UN,"")}function cv(e,t){return t=An(t),An(e)===t}function gt(e,t,i,s,n,r){switch(i){case"children":typeof s=="string"?(jl(s,t,!1),t==="body"||t==="textarea"&&s===""||sa(e,s)):(typeof s=="number"||typeof s=="bigint")&&(jl(""+s,t,!1),t!=="body"&&sa(e,""+s));break;case"className":Ml(e,"class",s);break;case"tabIndex":Ml(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ml(e,i,s);break;case"style":mp(e,s,r);break;case"data":if(t!=="object"){Ml(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){console.error(i==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',i,i),e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}Le(s,i),s=ra(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(s!=null&&(t==="form"?i==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof s=="function"&&(n.encType==null&&n.method==null||ju||(ju=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),n.target==null||Lu||(Lu=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):t==="input"||t==="button"?i==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):t!=="input"||n.type==="submit"||n.type==="image"||Ou?t!=="button"||n.type==null||n.type==="submit"||Ou?typeof s=="function"&&(n.name==null||lw||(lw=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),n.formEncType==null&&n.formMethod==null||ju||(ju=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),n.formTarget==null||Lu||(Lu=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Ou=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Ou=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(i==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof s=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof r=="function"&&(i==="formAction"?(t!=="input"&>(e,t,"name",n.name,n,null),gt(e,t,"formEncType",n.formEncType,n,null),gt(e,t,"formMethod",n.formMethod,n,null),gt(e,t,"formTarget",n.formTarget,n,null)):(gt(e,t,"encType",n.encType,n,null),gt(e,t,"method",n.method,n,null),gt(e,t,"target",n.target,n,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}Le(s,i),s=ra(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(typeof s!="function"&&Ms(i,s),e.onclick=Ws);break;case"onScroll":s!=null&&(typeof s!="function"&&Ms(i,s),st("scroll",e));break;case"onScrollEnd":s!=null&&(typeof s!="function"&&Ms(i,s),st("scrollend",e));break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(i=s.__html,i!=null){if(n.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}Le(s,i),i=ra(""+s),e.setAttributeNS(Ir,"xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?(Le(s,i),e.setAttribute(i,""+s)):e.removeAttribute(i);break;case"inert":s!==""||Yu[i]||(Yu[i]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",i));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?(Le(s,i),e.setAttribute(i,s)):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?(Le(s,i),e.setAttribute(i,s)):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):(Le(s,i),e.setAttribute(i,s));break;case"popover":st("beforetoggle",e),st("toggle",e),Kr(e,"popover",s);break;case"xlinkActuate":Ps(e,Ir,"xlink:actuate",s);break;case"xlinkArcrole":Ps(e,Ir,"xlink:arcrole",s);break;case"xlinkRole":Ps(e,Ir,"xlink:role",s);break;case"xlinkShow":Ps(e,Ir,"xlink:show",s);break;case"xlinkTitle":Ps(e,Ir,"xlink:title",s);break;case"xlinkType":Ps(e,Ir,"xlink:type",s);break;case"xmlBase":Ps(e,xm,"xml:base",s);break;case"xmlLang":Ps(e,xm,"xml:lang",s);break;case"xmlSpace":Ps(e,xm,"xml:space",s);break;case"is":r!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),Kr(e,"is",s);break;case"innerText":case"textContent":break;case"popoverTarget":cw||s==null||typeof s!="object"||(cw=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",s));default:!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N"?(i=pp(i),Kr(e,i,s)):xr.hasOwnProperty(i)&&s!=null&&typeof s!="function"&&Ms(i,s)}}function Ud(e,t,i,s,n,r){switch(i){case"style":mp(e,s,r);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(i=s.__html,i!=null){if(n.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=i}}break;case"children":typeof s=="string"?sa(e,s):(typeof s=="number"||typeof s=="bigint")&&sa(e,""+s);break;case"onScroll":s!=null&&(typeof s!="function"&&Ms(i,s),st("scroll",e));break;case"onScrollEnd":s!=null&&(typeof s!="function"&&Ms(i,s),st("scrollend",e));break;case"onClick":s!=null&&(typeof s!="function"&&Ms(i,s),e.onclick=Ws);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(xr.hasOwnProperty(i))s!=null&&typeof s!="function"&&Ms(i,s);else e:{if(i[0]==="o"&&i[1]==="n"&&(n=i.endsWith("Capture"),t=i.slice(2,n?i.length-7:void 0),r=e[mi]||null,r=r!=null?r[i]:null,typeof r=="function"&&e.removeEventListener(t,r,n),typeof s=="function")){typeof r!="function"&&r!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,n);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Kr(e,i,s)}}}function ni(e,t,i){switch(Hd(t,i),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":st("error",e),st("load",e);var s=!1,n=!1,r;for(r in i)if(i.hasOwnProperty(r)){var c=i[r];if(c!=null)switch(r){case"src":s=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:gt(e,t,r,c,i,null)}}n&>(e,t,"srcSet",i.srcSet,i,null),s&>(e,t,"src",i.src,i,null);return;case"input":hi("input",i),st("invalid",e);var b=r=c=n=null,D=null,A=null;for(s in i)if(i.hasOwnProperty(s)){var Q=i[s];if(Q!=null)switch(s){case"name":n=Q;break;case"type":c=Q;break;case"checked":D=Q;break;case"defaultChecked":A=Q;break;case"value":r=Q;break;case"defaultValue":b=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:gt(e,t,s,Q,i,null)}}Zm(e,i),Jm(e,r,b,D,A,c,n,!1);return;case"select":hi("select",i),st("invalid",e),s=c=r=null;for(n in i)if(i.hasOwnProperty(n)&&(b=i[n],b!=null))switch(n){case"value":r=b;break;case"defaultValue":c=b;break;case"multiple":s=b;default:gt(e,t,n,b,i,null)}ip(e,i),t=r,i=c,e.multiple=!!s,t!=null?Zr(e,!!s,t,!1):i!=null&&Zr(e,!!s,i,!0);return;case"textarea":hi("textarea",i),st("invalid",e),r=n=s=null;for(c in i)if(i.hasOwnProperty(c)&&(b=i[c],b!=null))switch(c){case"value":s=b;break;case"defaultValue":n=b;break;case"children":r=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:gt(e,t,c,b,i,null)}sp(e,i),rp(e,s,n,r);return;case"option":ep(e,i);for(D in i)if(i.hasOwnProperty(D)&&(s=i[D],s!=null))switch(D){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:gt(e,t,D,s,i,null)}return;case"dialog":st("beforetoggle",e),st("toggle",e),st("cancel",e),st("close",e);break;case"iframe":case"object":st("load",e);break;case"video":case"audio":for(s=0;s<Sl.length;s++)st(Sl[s],e);break;case"image":st("error",e),st("load",e);break;case"details":st("toggle",e);break;case"embed":case"source":case"link":st("error",e),st("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in i)if(i.hasOwnProperty(A)&&(s=i[A],s!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:gt(e,t,A,s,i,null)}return;default:if(na(t)){for(Q in i)i.hasOwnProperty(Q)&&(s=i[Q],s!==void 0&&Ud(e,t,Q,s,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(s=i[b],s!=null&>(e,t,b,s,i,null))}function DS(e,t,i,s){switch(Hd(t,s),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,r=null,c=null,b=null,D=null,A=null,Q=null;for(re in i){var Z=i[re];if(i.hasOwnProperty(re)&&Z!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":D=Z;default:s.hasOwnProperty(re)||gt(e,t,re,null,s,Z)}}for(var P in s){var re=s[P];if(Z=i[P],s.hasOwnProperty(P)&&(re!=null||Z!=null))switch(P){case"type":r=re;break;case"name":n=re;break;case"checked":A=re;break;case"defaultChecked":Q=re;break;case"value":c=re;break;case"defaultValue":b=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:re!==Z&>(e,t,P,re,s,Z)}}t=i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null,s=s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null,t||!s||aw||(console.error("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://react.dev/link/controlled-components"),aw=!0),!t||s||ow||(console.error("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://react.dev/link/controlled-components"),ow=!0),Ju(e,c,b,D,A,Q,r,n);return;case"select":re=c=b=P=null;for(r in i)if(D=i[r],i.hasOwnProperty(r)&&D!=null)switch(r){case"value":break;case"multiple":re=D;default:s.hasOwnProperty(r)||gt(e,t,r,null,s,D)}for(n in s)if(r=s[n],D=i[n],s.hasOwnProperty(n)&&(r!=null||D!=null))switch(n){case"value":P=r;break;case"defaultValue":b=r;break;case"multiple":c=r;default:r!==D&>(e,t,n,r,s,D)}s=b,t=c,i=re,P!=null?Zr(e,!!t,P,!1):!!i!=!!t&&(s!=null?Zr(e,!!t,s,!0):Zr(e,!!t,t?[]:"",!1));return;case"textarea":re=P=null;for(b in i)if(n=i[b],i.hasOwnProperty(b)&&n!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:gt(e,t,b,null,s,n)}for(c in s)if(n=s[c],r=i[c],s.hasOwnProperty(c)&&(n!=null||r!=null))switch(c){case"value":P=n;break;case"defaultValue":re=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:n!==r&>(e,t,c,n,s,r)}np(e,P,re);return;case"option":for(var Ne in i)if(P=i[Ne],i.hasOwnProperty(Ne)&&P!=null&&!s.hasOwnProperty(Ne))switch(Ne){case"selected":e.selected=!1;break;default:gt(e,t,Ne,null,s,P)}for(D in s)if(P=s[D],re=i[D],s.hasOwnProperty(D)&&P!==re&&(P!=null||re!=null))switch(D){case"selected":e.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:gt(e,t,D,P,s,re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var xe in i)P=i[xe],i.hasOwnProperty(xe)&&P!=null&&!s.hasOwnProperty(xe)&>(e,t,xe,null,s,P);for(A in s)if(P=s[A],re=i[A],s.hasOwnProperty(A)&&P!==re&&(P!=null||re!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:gt(e,t,A,P,s,re)}return;default:if(na(t)){for(var St in i)P=i[St],i.hasOwnProperty(St)&&P!==void 0&&!s.hasOwnProperty(St)&&Ud(e,t,St,void 0,s,P);for(Q in s)P=s[Q],re=i[Q],!s.hasOwnProperty(Q)||P===re||P===void 0&&re===void 0||Ud(e,t,Q,P,s,re);return}}for(var rt in i)P=i[rt],i.hasOwnProperty(rt)&&P!=null&&!s.hasOwnProperty(rt)&>(e,t,rt,null,s,P);for(Z in s)P=s[Z],re=i[Z],!s.hasOwnProperty(Z)||P===re||P==null&&re==null||gt(e,t,Z,P,s,re)}function uv(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function zd(e){var t={};e=e.style;for(var i=0;i<e.length;i++){var s=e[i];t[s]=e.getPropertyValue(s)}return t}function hv(e,t,i){if(t!=null&&typeof t!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var s,n=s="",r;for(r in t)if(t.hasOwnProperty(r)){var c=t[r];c!=null&&typeof c!="boolean"&&c!==""&&(r.indexOf("--")===0?(ke(c,r),s+=n+r+":"+(""+c).trim()):typeof c!="number"||c===0||y_.has(r)?(ke(c,r),s+=n+r.replace(b_,"-$1").toLowerCase().replace(g_,"-ms-")+":"+(""+c).trim()):s+=n+r.replace(b_,"-$1").toLowerCase().replace(g_,"-ms-")+":"+c+"px",n=";")}s=s||null,t=e.getAttribute("style"),t!==s&&(s=An(s),An(t)!==s&&(i.style=zd(e)))}}function qi(e,t,i,s,n,r){if(n.delete(i),e=e.getAttribute(i),e===null)switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":return}else if(s!=null)switch(typeof s){case"function":case"symbol":case"boolean":break;default:if(Le(s,t),e===""+s)return}Kt(t,e,s,r)}function dv(e,t,i,s,n,r){if(n.delete(i),e=e.getAttribute(i),e===null){switch(typeof s){case"function":case"symbol":return}if(!s)return}else switch(typeof s){case"function":case"symbol":break;default:if(s)return}Kt(t,e,s,r)}function Id(e,t,i,s,n,r){if(n.delete(i),e=e.getAttribute(i),e===null)switch(typeof s){case"undefined":case"function":case"symbol":return}else if(s!=null)switch(typeof s){case"function":case"symbol":break;default:if(Le(s,i),e===""+s)return}Kt(t,e,s,r)}function fv(e,t,i,s,n,r){if(n.delete(i),e=e.getAttribute(i),e===null)switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(s))return}else if(s!=null)switch(typeof s){case"function":case"symbol":case"boolean":break;default:if(!isNaN(s)&&(Le(s,t),e===""+s))return}Kt(t,e,s,r)}function $d(e,t,i,s,n,r){if(n.delete(i),e=e.getAttribute(i),e===null)switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":return}else if(s!=null)switch(typeof s){case"function":case"symbol":case"boolean":break;default:if(Le(s,t),i=ra(""+s),e===i)return}Kt(t,e,s,r)}function mv(e,t,i,s){for(var n={},r=new Set,c=e.attributes,b=0;b<c.length;b++)switch(c[b].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:r.add(c[b].name)}if(na(t)){for(var D in i)if(i.hasOwnProperty(D)){var A=i[D];if(A!=null){if(xr.hasOwnProperty(D))typeof A!="function"&&Ms(D,A);else if(i.suppressHydrationWarning!==!0)switch(D){case"children":typeof A!="string"&&typeof A!="number"||Kt("children",e.textContent,A,n);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":c=e.innerHTML,A=A?A.__html:void 0,A!=null&&(A=lv(e,A),Kt(D,c,A,n));continue;case"style":r.delete(D),hv(e,A,n);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":r.delete(D.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",D);continue;case"className":r.delete("class"),c=Al(e,"class",A),Kt("className",c,A,n);continue;default:s.context===gn&&t!=="svg"&&t!=="math"?r.delete(D.toLowerCase()):r.delete(D),c=Al(e,D,A),Kt(D,c,A,n)}}}}else for(A in i)if(i.hasOwnProperty(A)&&(D=i[A],D!=null)){if(xr.hasOwnProperty(A))typeof D!="function"&&Ms(A,D);else if(i.suppressHydrationWarning!==!0)switch(A){case"children":typeof D!="string"&&typeof D!="number"||Kt("children",e.textContent,D,n);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":c=e.innerHTML,D=D?D.__html:void 0,D!=null&&(D=lv(e,D),c!==D&&(n[A]={__html:c}));continue;case"className":qi(e,A,"class",D,r,n);continue;case"tabIndex":qi(e,A,"tabindex",D,r,n);continue;case"style":r.delete(A),hv(e,D,n);continue;case"multiple":r.delete(A),Kt(A,e.multiple,D,n);continue;case"muted":r.delete(A),Kt(A,e.muted,D,n);continue;case"autoFocus":r.delete("autofocus"),Kt(A,e.autofocus,D,n);continue;case"data":if(t!=="object"){r.delete(A),c=e.getAttribute("data"),Kt(A,c,D,n);continue}case"src":case"href":if(!(D!==""||t==="a"&&A==="href"||t==="object"&&A==="data")){console.error(A==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',A,A);continue}$d(e,A,A,D,r,n);continue;case"action":case"formAction":if(c=e.getAttribute(A),typeof D=="function"){r.delete(A.toLowerCase()),A==="formAction"?(r.delete("name"),r.delete("formenctype"),r.delete("formmethod"),r.delete("formtarget")):(r.delete("enctype"),r.delete("method"),r.delete("target"));continue}else if(c===zN){r.delete(A.toLowerCase()),Kt(A,"function",D,n);continue}$d(e,A,A.toLowerCase(),D,r,n);continue;case"xlinkHref":$d(e,A,"xlink:href",D,r,n);continue;case"contentEditable":Id(e,A,"contenteditable",D,r,n);continue;case"spellCheck":Id(e,A,"spellcheck",D,r,n);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Id(e,A,A,D,r,n);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":dv(e,A,A.toLowerCase(),D,r,n);continue;case"capture":case"download":e:{b=e;var Q=c=A,Z=n;if(r.delete(Q),b=b.getAttribute(Q),b===null)switch(typeof D){case"undefined":case"function":case"symbol":break e;default:if(D===!1)break e}else if(D!=null)switch(typeof D){case"function":case"symbol":break;case"boolean":if(D===!0&&b==="")break e;break;default:if(Le(D,c),b===""+D)break e}Kt(c,b,D,Z)}continue;case"cols":case"rows":case"size":case"span":e:{if(b=e,Q=c=A,Z=n,r.delete(Q),b=b.getAttribute(Q),b===null)switch(typeof D){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(D)||1>D)break e}else if(D!=null)switch(typeof D){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(D)||1>D)&&(Le(D,c),b===""+D))break e}Kt(c,b,D,Z)}continue;case"rowSpan":fv(e,A,"rowspan",D,r,n);continue;case"start":fv(e,A,A,D,r,n);continue;case"xHeight":qi(e,A,"x-height",D,r,n);continue;case"xlinkActuate":qi(e,A,"xlink:actuate",D,r,n);continue;case"xlinkArcrole":qi(e,A,"xlink:arcrole",D,r,n);continue;case"xlinkRole":qi(e,A,"xlink:role",D,r,n);continue;case"xlinkShow":qi(e,A,"xlink:show",D,r,n);continue;case"xlinkTitle":qi(e,A,"xlink:title",D,r,n);continue;case"xlinkType":qi(e,A,"xlink:type",D,r,n);continue;case"xmlBase":qi(e,A,"xml:base",D,r,n);continue;case"xmlLang":qi(e,A,"xml:lang",D,r,n);continue;case"xmlSpace":qi(e,A,"xml:space",D,r,n);continue;case"inert":D!==""||Yu[A]||(Yu[A]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",A)),dv(e,A,A,D,r,n);continue;default:if(!(2<A.length)||A[0]!=="o"&&A[0]!=="O"||A[1]!=="n"&&A[1]!=="N"){b=pp(A),c=!1,s.context===gn&&t!=="svg"&&t!=="math"?r.delete(b.toLowerCase()):(Q=A.toLowerCase(),Q=Gc.hasOwnProperty(Q)&&Gc[Q]||null,Q!==null&&Q!==A&&(c=!0,r.delete(Q)),r.delete(b));e:if(Q=e,Z=b,b=D,gs(Z))if(Q.hasAttribute(Z))Q=Q.getAttribute(Z),Le(b,Z),b=Q===""+b?b:Q;else{switch(typeof b){case"function":case"symbol":break e;case"boolean":if(Q=Z.toLowerCase().slice(0,5),Q!=="data-"&&Q!=="aria-")break e}b=b===void 0?void 0:null}else b=void 0;c||Kt(A,b,D,n)}}}return 0<r.size&&i.suppressHydrationWarning!==!0&&CS(e,r,n),Object.keys(n).length===0?null:n}function kS(e,t){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+t+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+t+" "+e[e.length-1]}}function pv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function RS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var n=i[s],r=n.transferSize,c=n.initiatorType,b=n.duration;if(r&&b&&pv(c)){for(c=0,b=n.responseEnd,s+=1;s<i.length;s++){var D=i[s],A=D.startTime;if(A>b)break;var Q=D.transferSize,Z=D.initiatorType;Q&&pv(Z)&&(D=D.responseEnd,c+=Q*(D<b?1:(b-A)/(D-A)))}if(--s,t+=8*(r+c)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}function Bc(e){return e.nodeType===9?e:e.ownerDocument}function bv(e){switch(e){case So:return Zo;case Fc:return Xu;default:return gn}}function gv(e,t){if(e===gn)switch(t){case"svg":return Zo;case"math":return Xu;default:return gn}return e===Zo&&t==="foreignObject"?gn:e}function qd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function TS(){var e=window.event;return e&&e.type==="popstate"?e===Rm?!1:(Rm=e,!0):(Rm=null,!1)}function Ra(){var e=window.event;return e&&e!==xl?e.type:null}function Ta(){var e=window.event;return e&&e!==xl?e.timeStamp:-1.1}function BS(e){setTimeout(function(){throw e})}function AS(e,t,i){switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&e.focus();break;case"img":i.src?e.src=i.src:i.srcSet&&(e.srcset=i.srcSet)}}function MS(){}function OS(e,t,i,s){DS(e,t,i,s),e[mi]=s}function vv(e){sa(e,"")}function LS(e,t,i){e.nodeValue=i}function _v(e){if(!e.__reactWarnedAboutChildrenConflict){var t=e[mi]||null;if(t!==null){var i=Se(e);i!==null&&(typeof t.children=="string"||typeof t.children=="number"?(e.__reactWarnedAboutChildrenConflict=!0,ae(i,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):t.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,ae(i,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Mn(e){return e==="head"}function jS(e,t){e.removeChild(t)}function YS(e,t){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(t)}function wv(e,t){var i=t,s=0;do{var n=i.nextSibling;if(e.removeChild(i),n&&n.nodeType===8)if(i=n.data,i===El||i===Vu){if(s===0){e.removeChild(n),bo(t);return}s--}else if(i===Nl||i===ir||i===qr||i===Ko||i===$r)s++;else if(i===$N)Ba(e.ownerDocument.documentElement);else if(i===PN){i=e.ownerDocument.head,Ba(i);for(var r=i.firstChild;r;){var c=r.nextSibling,b=r.nodeName;r[Va]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&r.rel.toLowerCase()==="stylesheet"||i.removeChild(r),r=c}}else i===qN&&Ba(e.ownerDocument.body);i=n}while(i);bo(t)}function yv(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i===El){if(e===0)break;e--}else i!==Nl&&i!==ir&&i!==qr&&i!==Ko||e++;i=s}while(i)}function VS(e){yv(e,!0)}function XS(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function HS(e){e.nodeValue=""}function US(e){yv(e,!1)}function zS(e,t){t=t[WN],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function IS(e,t){e.nodeValue=t}function Pd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Pd(i),J(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function $S(e,t,i,s){for(;e.nodeType===1;){var n=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Va])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){Le(n.name,"name");var r=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=Oi(e.nextSibling),e===null)break}return null}function qS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Oi(e.nextSibling),e===null))return null;return e}function Sv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Oi(e.nextSibling),e===null))return null;return e}function Wd(e){return e.data===ir||e.data===qr}function Fd(e){return e.data===Ko||e.data===ir&&e.ownerDocument.readyState!==hw}function PS(e,t){var i=e.ownerDocument;if(e.data===qr)e._reactRetry=t;else if(e.data!==ir||i.readyState!==hw)t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Oi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===Nl||t===Ko||t===ir||t===qr||t===$r||t===Cm||t===uw)break;if(t===El||t===Vu)return null}}return e}function Nv(e){if(e.nodeType===1){for(var t=e.nodeName.toLowerCase(),i={},s=e.attributes,n=0;n<s.length;n++){var r=s[n];i[uv(r.name)]=r.name.toLowerCase()==="style"?zd(e):r.value}return{type:t,props:i}}return e.nodeType===8?e.data===$r?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function Ev(e,t,i){return i===null||i[IN]!==!0?(e.nodeValue===t?e=null:(t=An(t),e=An(e.nodeValue)===t?null:e.nodeValue),e):null}function Gd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i===El||i===Vu){if(t===0)return Oi(e.nextSibling);t--}else i!==Nl&&i!==Ko&&i!==ir&&i!==qr&&i!==$r||t++}e=e.nextSibling}return null}function xv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i===Nl||i===Ko||i===ir||i===qr||i===$r){if(t===0)return e;t--}else i!==El&&i!==Vu||t++}e=e.previousSibling}return null}function WS(e){bo(e)}function FS(e){bo(e)}function GS(e){bo(e)}function Cv(e,t,i,s,n){switch(n&&rh(e,s.ancestorInfo),t=Bc(i),e){case"html":if(e=t.documentElement,!e)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"head":if(e=t.head,!e)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"body":if(e=t.body,!e)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function QS(e,t,i,s){if(!i[Yn]&&Se(i)){var n=i.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",n,n,n)}switch(e){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(n=i.attributes;n.length;)i.removeAttributeNode(n[0]);ni(i,e,t),i[ri]=s,i[mi]=t}function Ba(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);J(e)}function Ac(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function Dv(e,t,i){var s=Jo;if(s&&typeof t=="string"&&t){var n=$i(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof i=="string"&&(n+='[crossorigin="'+i+'"]'),gw.has(n)||(gw.add(n),e={rel:e,crossOrigin:i,href:t},s.querySelector(n)===null&&(t=s.createElement("link"),ni(t,"link",e),Ae(t),s.head.appendChild(t)))}}function kv(e,t,i,s){var n=(n=Ln.current)?Ac(n):null;if(!n)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=mo(i.href),t=$e(n).hoistableStyles,s=t.get(i),s||(s={type:"style",instance:null,count:0,state:null},t.set(i,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=mo(i.href);var r=$e(n).hoistableStyles,c=r.get(e);if(!c&&(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:Wr,preload:null}},r.set(e,c),(r=n.querySelector(Aa(e)))&&!r._p&&(c.instance=r,c.state.loading=Cl|ss),!ns.has(e))){var b={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy};ns.set(e,b),r||KS(n,e,b,c.state)}if(t&&s===null)throw i=`
|
|
222
|
-
|
|
223
|
-
- `+Mc(t)+`
|
|
224
|
-
+ `+Mc(i),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+i);return c}if(t&&s!==null)throw i=`
|
|
225
|
-
|
|
226
|
-
- `+Mc(t)+`
|
|
227
|
-
+ `+Mc(i),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+i);return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(i=po(i),t=$e(n).hoistableScripts,s=t.get(i),s||(s={type:"script",instance:null,count:0,state:null},t.set(i,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function Mc(e){var t=0,i="<link";return typeof e.rel=="string"?(t++,i+=' rel="'+e.rel+'"'):cs.call(e,"rel")&&(t++,i+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(t++,i+=' href="'+e.href+'"'):cs.call(e,"href")&&(t++,i+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(t++,i+=' precedence="'+e.precedence+'"'):cs.call(e,"precedence")&&(t++,i+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>t&&(i+=" ..."),i+" />"}function mo(e){return'href="'+$i(e)+'"'}function Aa(e){return'link[rel="stylesheet"]['+e+"]"}function Rv(e){return et({},e,{"data-precedence":e.precedence,precedence:null})}function KS(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=Cl:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=Cl}),t.addEventListener("error",function(){return s.loading|=pw}),ni(t,"link",i),Ae(t),e.head.appendChild(t))}function po(e){return'[src="'+$i(e)+'"]'}function Ma(e){return"script[async]"+e}function Tv(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+$i(i.href)+'"]');if(s)return t.instance=s,Ae(s),s;var n=et({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Ae(s),ni(s,"style",n),Oc(s,i.precedence,e),t.instance=s;case"stylesheet":n=mo(i.href);var r=e.querySelector(Aa(n));if(r)return t.state.loading|=ss,t.instance=r,Ae(r),r;s=Rv(i),(n=ns.get(n))&&Qd(s,n),r=(e.ownerDocument||e).createElement("link"),Ae(r);var c=r;return c._p=new Promise(function(b,D){c.onload=b,c.onerror=D}),ni(r,"link",s),t.state.loading|=ss,Oc(r,i.precedence,e),t.instance=r;case"script":return r=po(i.src),(n=e.querySelector(Ma(r)))?(t.instance=n,Ae(n),n):(s=i,(n=ns.get(r))&&(s=et({},i),Kd(s,n)),e=e.ownerDocument||e,n=e.createElement("script"),Ae(n),ni(n,"link",s),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+t.type+'". this is a bug in React.')}else t.type==="stylesheet"&&(t.state.loading&ss)===Wr&&(s=t.instance,t.state.loading|=ss,Oc(s,i.precedence,e));return t.instance}function Oc(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=s.length?s[s.length-1]:null,r=n,c=0;c<s.length;c++){var b=s[c];if(b.dataset.precedence===t)r=b;else if(r!==n)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Qd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}function Bv(e,t,i){if(Hu===null){var s=new Map,n=Hu=new Map;n.set(i,s)}else n=Hu,s=n.get(i),s||(s=new Map,n.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),n=0;n<i.length;n++){var r=i[n];if(!(r[Va]||r[ri]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!==So){var c=r.getAttribute(t)||"";c=e+c;var b=s.get(c);b?b.push(r):s.set(c,[r])}}return s}function Av(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function ZS(e,t,i){var s=!i.ancestorInfo.containerTagInScope;if(i.context===Zo||t.itemProp!=null)return!s||t.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href===""){s&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError){if(t.rel==="stylesheet"&&typeof t.precedence=="string"){e=t.href;var n=t.onError,r=t.disabled;i=[],t.onLoad&&i.push("`onLoad`"),n&&i.push("`onError`"),r!=null&&i.push("`disabled`"),n=kS(i,"and"),n+=i.length===1?" prop":" props",r=i.length===1?"an "+n:"the "+n,i.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,r,n)}s&&(typeof t.rel!="string"||typeof t.href!="string"||t.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(t.onError||t.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(t.rel){case"stylesheet":return e=t.precedence,t=t.disabled,typeof e!="string"&&s&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof e=="string"&&t==null;default:return!0}case"script":if(e=t.async&&typeof t.async!="function"&&typeof t.async!="symbol",!e||t.onLoad||t.onError||!t.src||typeof t.src!="string"){s&&(e?t.onLoad||t.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":s&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function Mv(e){return!(e.type==="stylesheet"&&(e.state.loading&bw)===Wr)}function JS(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&ss)===Wr){if(i.instance===null){var n=mo(s.href),r=t.querySelector(Aa(n));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Lc.bind(e),t.then(e,e)),i.state.loading|=ss,i.instance=r,Ae(r);return}r=t.ownerDocument||t,s=Rv(s),(n=ns.get(n))&&Qd(s,n),r=r.createElement("link"),Ae(r);var c=r;c._p=new Promise(function(b,D){c.onload=b,c.onerror=D}),ni(r,"link",s),i.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&bw)===Wr&&(e.count++,i=Lc.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}function e1(e,t){return e.stylesheets&&e.count===0&&jc(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&jc(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},QN+t);0<e.imgBytes&&Bm===0&&(Bm=125*RS()*ZN);var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&jc(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Bm?50:KN)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(n)}}:null}function Lc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function jc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Uu=new Map,t.forEach(t1,e),Uu=null,Lc.call(e))}function t1(e,t){if(!(t.state.loading&ss)){var i=Uu.get(e);if(i)var s=i.get(Am);else{i=new Map,Uu.set(e,i);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<n.length;r++){var c=n[r];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(i.set(c.dataset.precedence,c),s=c)}s&&i.set(Am,s)}n=t.instance,c=n.getAttribute("data-precedence"),r=i.get(c)||s,r===s&&i.set(Am,n),i.set(c,n),this.count++,s=Lc.bind(this),n.addEventListener("load",s),n.addEventListener("error",s),r?r.parentNode.insertBefore(n,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=ss}}function i1(e,t,i,s,n,r,c,b,D){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Pr,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=s,this.onUncaughtError=n,this.onCaughtError=r,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],t=0;31>t;t++)e.push(new Set);this._debugRootType=i?"hydrateRoot()":"createRoot()"}function Ov(e,t,i,s,n,r,c,b,D,A,Q,Z){return e=new i1(e,t,i,c,D,A,Q,Z,b),t=SN,r===!0&&(t|=ci|us),t|=Fe,r=m(3,null,null,t),e.current=r,r.stateNode=e,t=xh(),vr(t),e.pooledCache=t,vr(t),r.memoizedState={element:s,isDehydrated:i,cache:t},Th(r),e}function Lv(e){return e?(e=Un,e):Un}function Zd(e,t,i,s,n,r){if(li&&typeof li.onScheduleFiberRoot=="function")try{li.onScheduleFiberRoot(wo,s,i)}catch(c){Ys||(Ys=!0,console.error("React instrumentation encountered an error: %o",c))}n=Lv(n),s.context===null?s.context=n:s.pendingContext=n,js&&ji!==null&&!yw&&(yw=!0,console.error(`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.
|
|
228
|
-
|
|
229
|
-
Check the render method of %s.`,M(ji)||"Unknown")),s=Cn(t),s.payload={element:i},r=r===void 0?null:r,r!==null&&(typeof r!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",r),s.callback=r),i=Dn(e,s,t),i!==null&&(ys(t,"root.render()",null),Bt(i,e,t),fa(i,e,t))}function jv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Jd(e,t){jv(e,t),(e=e.alternate)&&jv(e,t)}function Yv(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&Bt(t,e,67108864),Jd(e,67108864)}}function Vv(e){if(e.tag===13||e.tag===31){var t=Mi(e);t=bs(t);var i=ai(e,t);i!==null&&Bt(i,e,t),Jd(e,t)}}function s1(){return ji}function n1(e,t,i,s){var n=he.T;he.T=null;var r=ft.p;try{ft.p=Pi,ef(e,t,i,s)}finally{ft.p=r,he.T=n}}function r1(e,t,i,s){var n=he.T;he.T=null;var r=ft.p;try{ft.p=Xs,ef(e,t,i,s)}finally{ft.p=r,he.T=n}}function ef(e,t,i,s){if(Iu){var n=tf(s);if(n===null)Xd(e,t,s,$u,i),Hv(e,s);else if(o1(n,e,t,i,s))s.stopPropagation();else if(Hv(e,s),t&4&&-1<eE.indexOf(e)){for(;n!==null;){var r=Se(n);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var c=ge(r.pendingLanes);if(c!==0){var b=r;for(b.pendingLanes|=2,b.entangledLanes|=2;c;){var D=1<<31-fi(c);b.entanglements[1]|=D,c&=~D}As(r),(lt&(Qt|Hi))===ti&&(Cu=Zt()+G0,Da(0))}}break;case 31:case 13:b=ai(r,2),b!==null&&Bt(b,r,2),uo(),Jd(r,2)}if(r=tf(s),r===null&&Xd(e,t,s,$u,i),r===n)break;n=r}n!==null&&s.stopPropagation()}else Xd(e,t,s,null,i)}}function tf(e){return e=oh(e),sf(e)}function sf(e){if($u=null,e=we(e),e!==null){var t=h(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=o(t),e!==null)return e;e=null}else if(i===31){if(e=a(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return $u=e,null}function Xv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return Pi;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Xs;case"message":switch(b1()){case gf:return Pi;case vf:return Xs;case _o:case g1:return sn;case _f:return Pc;default:return sn}default:return sn}}function Hv(e,t){switch(e){case"focusin":case"focusout":sr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":kl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rl.delete(t.pointerId)}}function Oa(e,t,i,s,n,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:r,targetContainers:[n]},t!==null&&(t=Se(t),t!==null&&Yv(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function o1(e,t,i,s,n){switch(t){case"focusin":return sr=Oa(sr,e,t,i,s,n),!0;case"dragenter":return nr=Oa(nr,e,t,i,s,n),!0;case"mouseover":return rr=Oa(rr,e,t,i,s,n),!0;case"pointerover":var r=n.pointerId;return kl.set(r,Oa(kl.get(r)||null,e,t,i,s,n)),!0;case"gotpointercapture":return r=n.pointerId,Rl.set(r,Oa(Rl.get(r)||null,e,t,i,s,n)),!0}return!1}function Uv(e){var t=we(e.target);if(t!==null){var i=h(t);if(i!==null){if(t=i.tag,t===13){if(t=o(i),t!==null){e.blockedOn=t,O(e.priority,function(){Vv(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,O(e.priority,function(){Vv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=tf(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i),n=s;Xa!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Xa=n,i.target.dispatchEvent(s),Xa===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),Xa=null}else return t=Se(i),t!==null&&Yv(t),e.blockedOn=i,!1;t.shift()}return!0}function zv(e,t,i){Yc(e)&&i.delete(t)}function a1(){Mm=!1,sr!==null&&Yc(sr)&&(sr=null),nr!==null&&Yc(nr)&&(nr=null),rr!==null&&Yc(rr)&&(rr=null),kl.forEach(zv),Rl.forEach(zv)}function Vc(e,t){e.blockedOn===t&&(e.blockedOn=null,Mm||(Mm=!0,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,a1)))}function Iv(e){qu!==e&&(qu=e,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,function(){qu===e&&(qu=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],n=e[t+2];if(typeof s!="function"){if(sf(s||i)===null)continue;break}var r=Se(i);r!==null&&(e.splice(t,3),t-=3,i={pending:!0,data:n,method:i.method,action:s},Object.freeze(i),id(r,i,s,n))}}))}function bo(e){function t(D){return Vc(D,e)}sr!==null&&Vc(sr,e),nr!==null&&Vc(nr,e),rr!==null&&Vc(rr,e),kl.forEach(t),Rl.forEach(t);for(var i=0;i<or.length;i++){var s=or[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<or.length&&(i=or[0],i.blockedOn===null);)Uv(i),i.blockedOn===null&&or.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var n=i[s],r=i[s+1],c=n[mi]||null;if(typeof r=="function")c||Iv(i);else if(c){var b=null;if(r&&r.hasAttribute("formAction")){if(n=r,c=r[mi]||null)b=c.formAction;else if(sf(n)!==null)continue}else b=c.action;typeof b=="function"?i[s+1]=b:(i.splice(s,3),s-=3),Iv(i)}}}function $v(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(c){return n=c})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function nf(e){this._internalRoot=e}function Xc(e){this._internalRoot=e}function qv(e){e[Yn]&&(e._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("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."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Xt=lE(),rf=Qu(),l1=uE(),et=Object.assign,c1=Symbol.for("react.element"),Os=Symbol.for("react.transitional.element"),go=Symbol.for("react.portal"),vo=Symbol.for("react.fragment"),Hc=Symbol.for("react.strict_mode"),of=Symbol.for("react.profiler"),af=Symbol.for("react.consumer"),Ls=Symbol.for("react.context"),La=Symbol.for("react.forward_ref"),lf=Symbol.for("react.suspense"),cf=Symbol.for("react.suspense_list"),Uc=Symbol.for("react.memo"),Li=Symbol.for("react.lazy"),uf=Symbol.for("react.activity"),u1=Symbol.for("react.memo_cache_sentinel"),Pv=Symbol.iterator,h1=Symbol.for("react.client.reference"),Ft=Array.isArray,he=rf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ft=l1.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,d1=Object.freeze({pending:!1,data:null,method:null,action:null}),hf=[],df=[],tn=-1,On=j(null),ja=j(null),Ln=j(null),zc=j(null),Ya=0,Wv,Fv,Gv,Qv,Kv,Zv,Jv;U.__reactDisabledLog=!0;var ff,e_,mf=!1,pf=new(typeof WeakMap=="function"?WeakMap:Map),ji=null,js=!1,cs=Object.prototype.hasOwnProperty,bf=Xt.unstable_scheduleCallback,f1=Xt.unstable_cancelCallback,m1=Xt.unstable_shouldYield,p1=Xt.unstable_requestPaint,Zt=Xt.unstable_now,b1=Xt.unstable_getCurrentPriorityLevel,gf=Xt.unstable_ImmediatePriority,vf=Xt.unstable_UserBlockingPriority,_o=Xt.unstable_NormalPriority,g1=Xt.unstable_LowPriority,_f=Xt.unstable_IdlePriority,v1=Xt.log,_1=Xt.unstable_setDisableYieldValue,wo=null,li=null,Ys=!1,Vs=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",fi=Math.clz32?Math.clz32:Nt,w1=Math.log,y1=Math.LN2,Ic=256,$c=262144,qc=4194304,Pi=2,Xs=8,sn=32,Pc=268435456,jn=Math.random().toString(36).slice(2),ri="__reactFiber$"+jn,mi="__reactProps$"+jn,Yn="__reactContainer$"+jn,wf="__reactEvents$"+jn,S1="__reactListeners$"+jn,N1="__reactHandles$"+jn,t_="__reactResources$"+jn,Va="__reactMarker$"+jn,i_=new Set,xr={},yf={},E1={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},x1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),s_={},n_={},C1=/[\n"\\]/g,r_=!1,o_=!1,a_=!1,l_=!1,c_=!1,u_=!1,h_=["value","defaultValue"],d_=!1,f_=/["'&<>\n\t]|^\s|\s$/,D1="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".split(" "),m_="applet caption html table td th marquee object template foreignObject desc title".split(" "),k1=m_.concat(["button"]),R1="dd dt li option optgroup p rp rt".split(" "),p_={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Wc={},Sf={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),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".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),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".split(" "),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"]},b_=/([A-Z])/g,g_=/^ms-/,T1=/^(?:webkit|moz|o)[A-Z]/,B1=/^-ms-/,A1=/-(.)/g,v_=/;\s*$/,yo={},Nf={},__=!1,w_=!1,y_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Fc="http://www.w3.org/1998/Math/MathML",So="http://www.w3.org/2000/svg",M1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Gc={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",fetchpriority:"fetchPriority",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",inert:"inert",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",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",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",transformorigin:"transformOrigin","transform-origin":"transformOrigin",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"},S_={"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,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},No={},O1=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),L1=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),N_=!1,pi={},E_=/^on./,j1=/^on[^A-Z]/,Y1=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),V1=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),X1=/^[\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,Xa=null,Eo=null,xo=null,Ef=!1,Hs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xf=!1;if(Hs)try{var Ha={};Object.defineProperty(Ha,"passive",{get:function(){xf=!0}}),window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch{xf=!1}var Vn=null,Cf=null,Qc=null,Cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kc=yi(Cr),Ua=et({},Cr,{view:0,detail:0}),H1=yi(Ua),Df,kf,za,Zc=et({},Ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ah,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==za&&(za&&e.type==="mousemove"?(Df=e.screenX-za.screenX,kf=e.screenY-za.screenY):kf=Df=0,za=e),Df)},movementY:function(e){return"movementY"in e?e.movementY:kf}}),x_=yi(Zc),U1=et({},Zc,{dataTransfer:0}),z1=yi(U1),I1=et({},Ua,{relatedTarget:0}),Rf=yi(I1),$1=et({},Cr,{animationName:0,elapsedTime:0,pseudoElement:0}),q1=yi($1),P1=et({},Cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),W1=yi(P1),F1=et({},Cr,{data:0}),C_=yi(F1),G1=C_,Q1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K1={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"},Z1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},J1=et({},Ua,{key:function(e){if(e.key){var t=Q1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?K1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ah,charCode:function(e){return e.type==="keypress"?Yl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eN=yi(J1),tN=et({},Zc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),D_=yi(tN),iN=et({},Ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ah}),sN=yi(iN),nN=et({},Cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rN=yi(nN),oN=et({},Zc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),aN=yi(oN),lN=et({},Cr,{newState:0,oldState:0}),cN=yi(lN),uN=[9,13,27,32],k_=229,Tf=Hs&&"CompositionEvent"in window,Ia=null;Hs&&"documentMode"in document&&(Ia=document.documentMode);var hN=Hs&&"TextEvent"in window&&!Ia,R_=Hs&&(!Tf||Ia&&8<Ia&&11>=Ia),T_=32,B_=String.fromCharCode(T_),A_=!1,Co=!1,dN={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},$a=null,qa=null,M_=!1;Hs&&(M_=Ay("input")&&(!document.documentMode||9<document.documentMode));var bi=typeof Object.is=="function"?Object.is:Vy,fN=Hs&&"documentMode"in document&&11>=document.documentMode,Do=null,Bf=null,Pa=null,Af=!1,ko={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionrun:hr("Transition","TransitionRun"),transitionstart:hr("Transition","TransitionStart"),transitioncancel:hr("Transition","TransitionCancel"),transitionend:hr("Transition","TransitionEnd")},Mf={},O_={};Hs&&(O_=document.createElement("div").style,"AnimationEvent"in window||(delete ko.animationend.animation,delete ko.animationiteration.animation,delete ko.animationstart.animation),"TransitionEvent"in window||delete ko.transitionend.transition);var L_=dr("animationend"),j_=dr("animationiteration"),Y_=dr("animationstart"),mN=dr("transitionrun"),pN=dr("transitionstart"),bN=dr("transitioncancel"),V_=dr("transitionend"),X_=new Map,Of="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Of.push("scrollEnd");var H_=0;if(typeof performance=="object"&&typeof performance.now=="function")var gN=performance,U_=function(){return gN.now()};else{var vN=Date;U_=function(){return vN.now()}}var Lf=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},_N="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",Jc=0,jf=1,Yf=2,Vf=3,eu="– ",tu="+ ",z_=" ",Et=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",Wi="Components ⚛",nt="Scheduler ⚛",ot="Blocking",Xn=!1,nn={color:"primary",properties:null,tooltipText:"",track:Wi},Hn={start:-0,end:-0,detail:{devtools:nn}},wN=["Changed Props",""],I_="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",yN=["Changed Props",I_],Wa=1,rn=2,Fi=[],Ro=0,Xf=0,Un={};Object.freeze(Un);var Gi=null,To=null,Ye=0,SN=1,Fe=2,ci=8,us=16,NN=32,$_=!1;try{var q_=Object.preventExtensions({})}catch{$_=!0}var Hf=new WeakMap,Bo=[],Ao=0,iu=null,Fa=0,Qi=[],Ki=0,Dr=null,on=1,an="",oi=null,xt=null,it=!1,Us=!1,Yi=null,zn=null,Zi=!1,Uf=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),zf=j(null),If=j(null),P_={},su=null,Mo=null,Oo=!1,EN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},xN=Xt.unstable_scheduleCallback,CN=Xt.unstable_NormalPriority,Ht={$$typeof:Ls,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Ut=Xt.unstable_now,nu=console.createTask?console.createTask:function(){return null},Ga=1,ru=2,Jt=-0,In=-0,ln=-0,cn=null,gi=-1.1,kr=-0,Rt=-0,Oe=-1.1,je=-1.1,kt=null,At=!1,Rr=-0,zs=-1.1,Qa=null,$n=0,$f=null,qf=null,Tr=-1.1,Ka=null,Lo=-1.1,ou=-1.1,un=-0,hn=-1.1,Ji=-1.1,Pf=0,Za=null,W_=null,F_=null,qn=-1.1,Br=null,Pn=-1.1,au=-1.1,G_=-0,Q_=-0,lu=0,DN=null,K_=0,Ja=-1.1,cu=!1,uu=!1,el=null,Wf=0,Ar=0,jo=null,Z_=he.S;he.S=function(e,t){if(W0=Zt(),typeof t=="object"&&t!==null&&typeof t.then=="function"){if(0>hn&&0>Ji){hn=Ut();var i=Ta(),s=Ra();(i!==Pn||s!==Br)&&(Pn=-1.1),qn=i,Br=s}qy(e,t)}Z_!==null&&Z_(e,t)};var Mr=j(null),hs={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},tl=[],il=[],sl=[],nl=[],rl=[],ol=[],Or=new Set;hs.recordUnsafeLifecycleWarnings=function(e,t){Or.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&tl.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillMount=="function"&&il.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&sl.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&nl.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&rl.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillUpdate=="function"&&ol.push(e))},hs.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<tl.length&&(tl.forEach(function(b){e.add(M(b)||"Component"),Or.add(b.type)}),tl=[]);var t=new Set;0<il.length&&(il.forEach(function(b){t.add(M(b)||"Component"),Or.add(b.type)}),il=[]);var i=new Set;0<sl.length&&(sl.forEach(function(b){i.add(M(b)||"Component"),Or.add(b.type)}),sl=[]);var s=new Set;0<nl.length&&(nl.forEach(function(b){s.add(M(b)||"Component"),Or.add(b.type)}),nl=[]);var n=new Set;0<rl.length&&(rl.forEach(function(b){n.add(M(b)||"Component"),Or.add(b.type)}),rl=[]);var r=new Set;if(0<ol.length&&(ol.forEach(function(b){r.add(M(b)||"Component"),Or.add(b.type)}),ol=[]),0<t.size){var c=f(t);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
230
|
-
|
|
231
|
-
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
232
|
-
|
|
233
|
-
Please update the following components: %s`,c)}0<s.size&&(c=f(s),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
234
|
-
|
|
235
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
236
|
-
* 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://react.dev/link/derived-state
|
|
237
|
-
|
|
238
|
-
Please update the following components: %s`,c)),0<r.size&&(c=f(r),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
239
|
-
|
|
240
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
241
|
-
|
|
242
|
-
Please update the following components: %s`,c)),0<e.size&&(c=f(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
243
|
-
|
|
244
|
-
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
245
|
-
* 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.
|
|
246
|
-
|
|
247
|
-
Please update the following components: %s`,c)),0<i.size&&(c=f(i),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
248
|
-
|
|
249
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
250
|
-
* 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://react.dev/link/derived-state
|
|
251
|
-
* 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.
|
|
252
|
-
|
|
253
|
-
Please update the following components: %s`,c)),0<n.size&&(c=f(n),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
254
|
-
|
|
255
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
256
|
-
* 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.
|
|
257
|
-
|
|
258
|
-
Please update the following components: %s`,c))};var hu=new Map,J_=new Set;hs.recordLegacyContextWarning=function(e,t){for(var i=null,s=e;s!==null;)s.mode&ci&&(i=s),s=s.return;i===null?console.error("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."):!J_.has(e.type)&&(s=hu.get(i),e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(s===void 0&&(s=[],hu.set(i,s)),s.push(e))},hs.flushLegacyContextWarning=function(){hu.forEach(function(e){if(e.length!==0){var t=e[0],i=new Set;e.forEach(function(n){i.add(M(n)||"Component"),J_.add(n.type)});var s=f(i);ae(t,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
259
|
-
|
|
260
|
-
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
261
|
-
|
|
262
|
-
Please update the following components: %s
|
|
263
|
-
|
|
264
|
-
Learn more about this warning here: https://react.dev/link/legacy-context`,s)})}})},hs.discardPendingWarnings=function(){tl=[],il=[],sl=[],nl=[],rl=[],ol=[],hu=new Map};var e0={react_stack_bottom_frame:function(e,t,i){var s=js;js=!0;try{return e(t,i)}finally{js=s}}},Ff=e0.react_stack_bottom_frame.bind(e0),t0={react_stack_bottom_frame:function(e){var t=js;js=!0;try{return e.render()}finally{js=t}}},i0=t0.react_stack_bottom_frame.bind(t0),s0={react_stack_bottom_frame:function(e,t){try{t.componentDidMount()}catch(i){dt(e,e.return,i)}}},Gf=s0.react_stack_bottom_frame.bind(s0),n0={react_stack_bottom_frame:function(e,t,i,s,n){try{t.componentDidUpdate(i,s,n)}catch(r){dt(e,e.return,r)}}},r0=n0.react_stack_bottom_frame.bind(n0),o0={react_stack_bottom_frame:function(e,t){var i=t.stack;e.componentDidCatch(t.value,{componentStack:i!==null?i:""})}},kN=o0.react_stack_bottom_frame.bind(o0),a0={react_stack_bottom_frame:function(e,t,i){try{i.componentWillUnmount()}catch(s){dt(e,t,s)}}},l0=a0.react_stack_bottom_frame.bind(a0),c0={react_stack_bottom_frame:function(e){var t=e.create;return e=e.inst,t=t(),e.destroy=t}},RN=c0.react_stack_bottom_frame.bind(c0),u0={react_stack_bottom_frame:function(e,t,i){try{i()}catch(s){dt(e,t,s)}}},TN=u0.react_stack_bottom_frame.bind(u0),h0={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},BN=h0.react_stack_bottom_frame.bind(h0),Yo=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),Qf=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),du=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),fu={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Lr=null,al=!1,Vo=null,ll=0,Ge=null,Kf,d0=Kf=!1,f0={},m0={},p0={};S=function(e,t,i){if(i!==null&&typeof i=="object"&&i._store&&(!i._store.validated&&i.key==null||i._store.validated===2)){if(typeof i._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");i._store.validated=1;var s=M(e),n=s||"null";if(!f0[n]){f0[n]=!0,i=i._owner,e=e._debugOwner;var r="";e&&typeof e.tag=="number"&&(n=M(e))&&(r=`
|
|
265
|
-
|
|
266
|
-
Check the render method of \``+n+"`."),r||s&&(r=`
|
|
267
|
-
|
|
268
|
-
Check the top-level render call using <`+s+">.");var c="";i!=null&&e!==i&&(s=null,typeof i.tag=="number"?s=M(i):typeof i.name=="string"&&(s=i.name),s&&(c=" It was passed a child from "+s+".")),ae(t,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,c)})}}};var jr=ab(!0),b0=ab(!1),g0=0,v0=1,_0=2,Zf=3,Wn=!1,w0=!1,Jf=null,em=!1,Xo=j(null),mu=j(0),Vi=j(null),es=null,Ho=1,cl=2,Yt=j(0),pu=0,ts=1,vi=2,Xi=4,_i=8,Uo,y0=new Set,S0=new Set,tm=new Set,N0=new Set,dn=0,Xe=null,vt=null,zt=null,bu=!1,zo=!1,Yr=!1,gu=0,ul=0,fn=null,AN=0,MN=25,le=null,is=null,mn=-1,hl=!1,dl={readContext:Dt,use:Tn,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useLayoutEffect:Ot,useInsertionEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useSyncExternalStore:Ot,useId:Ot,useHostTransitionStatus:Ot,useFormState:Ot,useActionState:Ot,useOptimistic:Ot,useMemoCache:Ot,useCacheRefresh:Ot};dl.useEffectEvent=Ot;var im=null,E0=null,sm=null,x0=null,Is=null,ds=null,vu=null;im={readContext:function(e){return Dt(e)},use:Tn,useCallback:function(e,t){return le="useCallback",Je(),so(t),Zh(e,t)},useContext:function(e){return le="useContext",Je(),Dt(e)},useEffect:function(e,t){return le="useEffect",Je(),so(t),hc(e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",Je(),so(i),Kh(e,t,i)},useInsertionEffect:function(e,t){le="useInsertionEffect",Je(),so(t),wr(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",Je(),so(t),Qh(e,t)},useMemo:function(e,t){le="useMemo",Je(),so(t);var i=he.H;he.H=Is;try{return Jh(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",Je();var s=he.H;he.H=Is;try{return Uh(e,t,i)}finally{he.H=s}},useRef:function(e){return le="useRef",Je(),Fh(e)},useState:function(e){le="useState",Je();var t=he.H;he.H=Is;try{return qh(e)}finally{he.H=t}},useDebugValue:function(){le="useDebugValue",Je()},useDeferredValue:function(e,t){return le="useDeferredValue",Je(),ed(e,t)},useTransition:function(){return le="useTransition",Je(),sd()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",Je(),Ih(e,t,i)},useId:function(){return le="useId",Je(),nd()},useFormState:function(e,t){return le="useFormState",Je(),oc(),ro(e,t)},useActionState:function(e,t){return le="useActionState",Je(),ro(e,t)},useOptimistic:function(e){return le="useOptimistic",Je(),Ph(e)},useHostTransitionStatus:yr,useMemoCache:_r,useCacheRefresh:function(){return le="useCacheRefresh",Je(),rd()},useEffectEvent:function(e){return le="useEffectEvent",Je(),Gh(e)}},E0={readContext:function(e){return Dt(e)},use:Tn,useCallback:function(e,t){return le="useCallback",_e(),Zh(e,t)},useContext:function(e){return le="useContext",_e(),Dt(e)},useEffect:function(e,t){return le="useEffect",_e(),hc(e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",_e(),Kh(e,t,i)},useInsertionEffect:function(e,t){le="useInsertionEffect",_e(),wr(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",_e(),Qh(e,t)},useMemo:function(e,t){le="useMemo",_e();var i=he.H;he.H=Is;try{return Jh(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",_e();var s=he.H;he.H=Is;try{return Uh(e,t,i)}finally{he.H=s}},useRef:function(e){return le="useRef",_e(),Fh(e)},useState:function(e){le="useState",_e();var t=he.H;he.H=Is;try{return qh(e)}finally{he.H=t}},useDebugValue:function(){le="useDebugValue",_e()},useDeferredValue:function(e,t){return le="useDeferredValue",_e(),ed(e,t)},useTransition:function(){return le="useTransition",_e(),sd()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",_e(),Ih(e,t,i)},useId:function(){return le="useId",_e(),nd()},useActionState:function(e,t){return le="useActionState",_e(),ro(e,t)},useFormState:function(e,t){return le="useFormState",_e(),oc(),ro(e,t)},useOptimistic:function(e){return le="useOptimistic",_e(),Ph(e)},useHostTransitionStatus:yr,useMemoCache:_r,useCacheRefresh:function(){return le="useCacheRefresh",_e(),rd()},useEffectEvent:function(e){return le="useEffectEvent",_e(),Gh(e)}},sm={readContext:function(e){return Dt(e)},use:Tn,useCallback:function(e,t){return le="useCallback",_e(),mc(e,t)},useContext:function(e){return le="useContext",_e(),Dt(e)},useEffect:function(e,t){le="useEffect",_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",_e(),fc(e,t,i)},useInsertionEffect:function(e,t){return le="useInsertionEffect",_e(),Si(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",_e(),Si(4,Xi,e,t)},useMemo:function(e,t){le="useMemo",_e();var i=he.H;he.H=ds;try{return pc(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",_e();var s=he.H;he.H=ds;try{return no(e,t,i)}finally{he.H=s}},useRef:function(){return le="useRef",_e(),mt().memoizedState},useState:function(){le="useState",_e();var e=he.H;he.H=ds;try{return no(as)}finally{he.H=e}},useDebugValue:function(){le="useDebugValue",_e()},useDeferredValue:function(e,t){return le="useDeferredValue",_e(),Rb(e,t)},useTransition:function(){return le="useTransition",_e(),Lb()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",_e(),lc(e,t,i)},useId:function(){return le="useId",_e(),mt().memoizedState},useFormState:function(e){return le="useFormState",_e(),oc(),cc(e)},useActionState:function(e){return le="useActionState",_e(),cc(e)},useOptimistic:function(e,t){return le="useOptimistic",_e(),_b(e,t)},useHostTransitionStatus:yr,useMemoCache:_r,useCacheRefresh:function(){return le="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return le="useEffectEvent",_e(),dc(e)}},x0={readContext:function(e){return Dt(e)},use:Tn,useCallback:function(e,t){return le="useCallback",_e(),mc(e,t)},useContext:function(e){return le="useContext",_e(),Dt(e)},useEffect:function(e,t){le="useEffect",_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",_e(),fc(e,t,i)},useInsertionEffect:function(e,t){return le="useInsertionEffect",_e(),Si(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",_e(),Si(4,Xi,e,t)},useMemo:function(e,t){le="useMemo",_e();var i=he.H;he.H=vu;try{return pc(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",_e();var s=he.H;he.H=vu;try{return ga(e,t,i)}finally{he.H=s}},useRef:function(){return le="useRef",_e(),mt().memoizedState},useState:function(){le="useState",_e();var e=he.H;he.H=vu;try{return ga(as)}finally{he.H=e}},useDebugValue:function(){le="useDebugValue",_e()},useDeferredValue:function(e,t){return le="useDeferredValue",_e(),Tb(e,t)},useTransition:function(){return le="useTransition",_e(),jb()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",_e(),lc(e,t,i)},useId:function(){return le="useId",_e(),mt().memoizedState},useFormState:function(e){return le="useFormState",_e(),oc(),uc(e)},useActionState:function(e){return le="useActionState",_e(),uc(e)},useOptimistic:function(e,t){return le="useOptimistic",_e(),yb(e,t)},useHostTransitionStatus:yr,useMemoCache:_r,useCacheRefresh:function(){return le="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return le="useEffectEvent",_e(),dc(e)}},Is={readContext:function(e){return p(),Dt(e)},use:function(e){return l(),Tn(e)},useCallback:function(e,t){return le="useCallback",l(),Je(),Zh(e,t)},useContext:function(e){return le="useContext",l(),Je(),Dt(e)},useEffect:function(e,t){return le="useEffect",l(),Je(),hc(e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",l(),Je(),Kh(e,t,i)},useInsertionEffect:function(e,t){le="useInsertionEffect",l(),Je(),wr(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",l(),Je(),Qh(e,t)},useMemo:function(e,t){le="useMemo",l(),Je();var i=he.H;he.H=Is;try{return Jh(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",l(),Je();var s=he.H;he.H=Is;try{return Uh(e,t,i)}finally{he.H=s}},useRef:function(e){return le="useRef",l(),Je(),Fh(e)},useState:function(e){le="useState",l(),Je();var t=he.H;he.H=Is;try{return qh(e)}finally{he.H=t}},useDebugValue:function(){le="useDebugValue",l(),Je()},useDeferredValue:function(e,t){return le="useDeferredValue",l(),Je(),ed(e,t)},useTransition:function(){return le="useTransition",l(),Je(),sd()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",l(),Je(),Ih(e,t,i)},useId:function(){return le="useId",l(),Je(),nd()},useFormState:function(e,t){return le="useFormState",l(),Je(),ro(e,t)},useActionState:function(e,t){return le="useActionState",l(),Je(),ro(e,t)},useOptimistic:function(e){return le="useOptimistic",l(),Je(),Ph(e)},useMemoCache:function(e){return l(),_r(e)},useHostTransitionStatus:yr,useCacheRefresh:function(){return le="useCacheRefresh",Je(),rd()},useEffectEvent:function(e){return le="useEffectEvent",l(),Je(),Gh(e)}},ds={readContext:function(e){return p(),Dt(e)},use:function(e){return l(),Tn(e)},useCallback:function(e,t){return le="useCallback",l(),_e(),mc(e,t)},useContext:function(e){return le="useContext",l(),_e(),Dt(e)},useEffect:function(e,t){le="useEffect",l(),_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",l(),_e(),fc(e,t,i)},useInsertionEffect:function(e,t){return le="useInsertionEffect",l(),_e(),Si(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",l(),_e(),Si(4,Xi,e,t)},useMemo:function(e,t){le="useMemo",l(),_e();var i=he.H;he.H=ds;try{return pc(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",l(),_e();var s=he.H;he.H=ds;try{return no(e,t,i)}finally{he.H=s}},useRef:function(){return le="useRef",l(),_e(),mt().memoizedState},useState:function(){le="useState",l(),_e();var e=he.H;he.H=ds;try{return no(as)}finally{he.H=e}},useDebugValue:function(){le="useDebugValue",l(),_e()},useDeferredValue:function(e,t){return le="useDeferredValue",l(),_e(),Rb(e,t)},useTransition:function(){return le="useTransition",l(),_e(),Lb()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",l(),_e(),lc(e,t,i)},useId:function(){return le="useId",l(),_e(),mt().memoizedState},useFormState:function(e){return le="useFormState",l(),_e(),cc(e)},useActionState:function(e){return le="useActionState",l(),_e(),cc(e)},useOptimistic:function(e,t){return le="useOptimistic",l(),_e(),_b(e,t)},useMemoCache:function(e){return l(),_r(e)},useHostTransitionStatus:yr,useCacheRefresh:function(){return le="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return le="useEffectEvent",l(),_e(),dc(e)}},vu={readContext:function(e){return p(),Dt(e)},use:function(e){return l(),Tn(e)},useCallback:function(e,t){return le="useCallback",l(),_e(),mc(e,t)},useContext:function(e){return le="useContext",l(),_e(),Dt(e)},useEffect:function(e,t){le="useEffect",l(),_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",l(),_e(),fc(e,t,i)},useInsertionEffect:function(e,t){return le="useInsertionEffect",l(),_e(),Si(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",l(),_e(),Si(4,Xi,e,t)},useMemo:function(e,t){le="useMemo",l(),_e();var i=he.H;he.H=ds;try{return pc(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",l(),_e();var s=he.H;he.H=ds;try{return ga(e,t,i)}finally{he.H=s}},useRef:function(){return le="useRef",l(),_e(),mt().memoizedState},useState:function(){le="useState",l(),_e();var e=he.H;he.H=ds;try{return ga(as)}finally{he.H=e}},useDebugValue:function(){le="useDebugValue",l(),_e()},useDeferredValue:function(e,t){return le="useDeferredValue",l(),_e(),Tb(e,t)},useTransition:function(){return le="useTransition",l(),_e(),jb()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",l(),_e(),lc(e,t,i)},useId:function(){return le="useId",l(),_e(),mt().memoizedState},useFormState:function(e){return le="useFormState",l(),_e(),uc(e)},useActionState:function(e){return le="useActionState",l(),_e(),uc(e)},useOptimistic:function(e,t){return le="useOptimistic",l(),_e(),yb(e,t)},useMemoCache:function(e){return l(),_r(e)},useHostTransitionStatus:yr,useCacheRefresh:function(){return le="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return le="useEffectEvent",l(),_e(),dc(e)}};var C0={},D0=new Set,k0=new Set,R0=new Set,T0=new Set,B0=new Set,A0=new Set,M0=new Set,O0=new Set,L0=new Set,j0=new Set;Object.freeze(C0);var nm={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Mi(e),n=Cn(s);n.payload=t,i!=null&&(ad(i),n.callback=i),t=Dn(e,n,s),t!==null&&(ys(s,"this.setState()",e),Bt(t,e,s),fa(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Mi(e),n=Cn(s);n.tag=v0,n.payload=t,i!=null&&(ad(i),n.callback=i),t=Dn(e,n,s),t!==null&&(ys(s,"this.replaceState()",e),Bt(t,e,s),fa(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Mi(e),s=Cn(i);s.tag=_0,t!=null&&(ad(t),s.callback=t),t=Dn(e,s,i),t!==null&&(ys(i,"this.forceUpdate()",e),Bt(t,e,i),fa(t,e,i))}},Io=null,rm=null,om=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),It=!1,Y0={},V0={},X0={},H0={},$o=!1,U0={},_u={},am={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},z0=!1,I0=null;I0=new Set;var pn=!1,$t=!1,lm=!1,$0=typeof WeakSet=="function"?WeakSet:Set,ei=null,qo=null,Po=null,qt=null,xi=!1,fs=null,Gt=!1,fl=8192,ON={getCacheForType:function(e){var t=Dt(Ht),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Dt(Ht).controller.signal},getOwner:function(){return ji}};if(typeof Symbol=="function"&&Symbol.for){var ml=Symbol.for;ml("selector.component"),ml("selector.has_pseudo_class"),ml("selector.role"),ml("selector.test_id"),ml("selector.text")}var LN=[],jN=typeof WeakMap=="function"?WeakMap:Map,ti=0,Qt=2,Hi=4,bn=0,pl=1,Vr=2,wu=3,Fn=4,yu=6,q0=5,lt=ti,_t=null,Ke=null,Qe=0,Ci=0,Su=1,Xr=2,bl=3,P0=4,cm=5,gl=6,Nu=7,um=8,Hr=9,pt=Ci,Ui=null,Gn=!1,Wo=!1,hm=!1,$s=0,Tt=bn,Qn=0,Kn=0,dm=0,Di=0,Ur=0,vl=null,wi=null,Eu=!1,xu=0,W0=0,F0=300,Cu=1/0,G0=500,_l=null,Lt=null,Zn=null,Du=0,fm=1,mm=2,Q0=3,Jn=0,K0=1,Z0=2,J0=3,ew=4,ku=5,Pt=0,er=null,Fo=null,ms=0,pm=0,bm=-0,gm=null,tw=null,iw=null,ps=Du,sw=null,YN=50,wl=0,vm=null,_m=!1,Ru=!1,VN=50,zr=0,yl=null,Go=!1,Tu=null,nw=!1,rw=new Set,XN={},Bu=null,Qo=null,wm=!1,ym=!1,Au=!1,Sm=!1,tr=0,Nm={};(function(){for(var e=0;e<Of.length;e++){var t=Of[e],i=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),rs(i,"on"+t)}rs(L_,"onAnimationEnd"),rs(j_,"onAnimationIteration"),rs(Y_,"onAnimationStart"),rs("dblclick","onDoubleClick"),rs("focusin","onFocus"),rs("focusout","onBlur"),rs(mN,"onTransitionRun"),rs(pN,"onTransitionStart"),rs(bN,"onTransitionCancel"),rs(V_,"onTransitionEnd")})(),qe("onMouseEnter",["mouseout","mouseover"]),qe("onMouseLeave",["mouseout","mouseover"]),qe("onPointerEnter",["pointerout","pointerover"]),qe("onPointerLeave",["pointerout","pointerover"]),at("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),at("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),at("onBeforeInput",["compositionend","keypress","textInput","paste"]),at("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),at("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),at("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Em=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sl)),Mu="_reactListening"+Math.random().toString(36).slice(2),ow=!1,aw=!1,Ou=!1,lw=!1,Lu=!1,ju=!1,cw=!1,Yu={},HN=/\r\n?/g,UN=/\u0000|\uFFFD/g,Ir="http://www.w3.org/1999/xlink",xm="http://www.w3.org/XML/1998/namespace",zN="javascript:throw new Error('React form unexpectedly submitted.')",IN="suppressHydrationWarning",$r="&",Vu="/&",Nl="$",El="/$",ir="$?",qr="$~",Ko="$!",$N="html",qN="body",PN="head",Cm="F!",uw="F",hw="loading",WN="style",gn=0,Zo=1,Xu=2,Dm=null,km=null,dw={dialog:!0,webview:!0},Rm=null,xl=void 0,fw=typeof setTimeout=="function"?setTimeout:void 0,FN=typeof clearTimeout=="function"?clearTimeout:void 0,Pr=-1,mw=typeof Promise=="function"?Promise:void 0,GN=typeof queueMicrotask=="function"?queueMicrotask:typeof mw<"u"?function(e){return mw.resolve(null).then(e).catch(BS)}:fw,Tm=null,Wr=0,Cl=1,pw=2,bw=3,ss=4,ns=new Map,gw=new Set,vn=ft.d;ft.d={f:function(){var e=vn.f(),t=uo();return e||t},r:function(e){var t=Se(e);t!==null&&t.tag===5&&t.type==="form"?Ob(t):vn.r(e)},D:function(e){vn.D(e),Dv("dns-prefetch",e,null)},C:function(e,t){vn.C(e,t),Dv("preconnect",e,t)},L:function(e,t,i){vn.L(e,t,i);var s=Jo;if(s&&e&&t){var n='link[rel="preload"][as="'+$i(t)+'"]';t==="image"&&i&&i.imageSrcSet?(n+='[imagesrcset="'+$i(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(n+='[imagesizes="'+$i(i.imageSizes)+'"]')):n+='[href="'+$i(e)+'"]';var r=n;switch(t){case"style":r=mo(e);break;case"script":r=po(e)}ns.has(r)||(e=et({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),ns.set(r,e),s.querySelector(n)!==null||t==="style"&&s.querySelector(Aa(r))||t==="script"&&s.querySelector(Ma(r))||(t=s.createElement("link"),ni(t,"link",e),Ae(t),s.head.appendChild(t)))}},m:function(e,t){vn.m(e,t);var i=Jo;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+$i(s)+'"][href="'+$i(e)+'"]',r=n;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=po(e)}if(!ns.has(r)&&(e=et({rel:"modulepreload",href:e},t),ns.set(r,e),i.querySelector(n)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ma(r)))return}s=i.createElement("link"),ni(s,"link",e),Ae(s),i.head.appendChild(s)}}},X:function(e,t){vn.X(e,t);var i=Jo;if(i&&e){var s=$e(i).hoistableScripts,n=po(e),r=s.get(n);r||(r=i.querySelector(Ma(n)),r||(e=et({src:e,async:!0},t),(t=ns.get(n))&&Kd(e,t),r=i.createElement("script"),Ae(r),ni(r,"link",e),i.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},s.set(n,r))}},S:function(e,t,i){vn.S(e,t,i);var s=Jo;if(s&&e){var n=$e(s).hoistableStyles,r=mo(e);t=t||"default";var c=n.get(r);if(!c){var b={loading:Wr,preload:null};if(c=s.querySelector(Aa(r)))b.loading=Cl|ss;else{e=et({rel:"stylesheet",href:e,"data-precedence":t},i),(i=ns.get(r))&&Qd(e,i);var D=c=s.createElement("link");Ae(D),ni(D,"link",e),D._p=new Promise(function(A,Q){D.onload=A,D.onerror=Q}),D.addEventListener("load",function(){b.loading|=Cl}),D.addEventListener("error",function(){b.loading|=pw}),b.loading|=ss,Oc(c,t,s)}c={type:"stylesheet",instance:c,count:1,state:b},n.set(r,c)}}},M:function(e,t){vn.M(e,t);var i=Jo;if(i&&e){var s=$e(i).hoistableScripts,n=po(e),r=s.get(n);r||(r=i.querySelector(Ma(n)),r||(e=et({src:e,async:!0,type:"module"},t),(t=ns.get(n))&&Kd(e,t),r=i.createElement("script"),Ae(r),ni(r,"link",e),i.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},s.set(n,r))}}};var Jo=typeof document>"u"?null:document,Hu=null,QN=6e4,KN=800,ZN=500,Bm=0,Am=null,Uu=null,Fr=d1,Dl={$$typeof:Ls,Provider:null,Consumer:null,_currentValue:Fr,_currentValue2:Fr,_threadCount:0},vw="%c%s%c",_w="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",ww="",zu=" ",JN=Function.prototype.bind,yw=!1,Sw=null,Nw=null,Ew=null,xw=null,Cw=null,Dw=null,kw=null,Rw=null,Tw=null,Bw=null;Sw=function(e,t,i,s){t=N(e,t),t!==null&&(i=R(t.memoizedState,i,0,s),t.memoizedState=i,t.baseState=i,e.memoizedProps=et({},e.memoizedProps),i=ai(e,2),i!==null&&Bt(i,e,2))},Nw=function(e,t,i){t=N(e,t),t!==null&&(i=K(t.memoizedState,i,0),t.memoizedState=i,t.baseState=i,e.memoizedProps=et({},e.memoizedProps),i=ai(e,2),i!==null&&Bt(i,e,2))},Ew=function(e,t,i,s){t=N(e,t),t!==null&&(i=X(t.memoizedState,i,s),t.memoizedState=i,t.baseState=i,e.memoizedProps=et({},e.memoizedProps),i=ai(e,2),i!==null&&Bt(i,e,2))},xw=function(e,t,i){e.pendingProps=R(e.memoizedProps,t,0,i),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ai(e,2),t!==null&&Bt(t,e,2)},Cw=function(e,t){e.pendingProps=K(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ai(e,2),t!==null&&Bt(t,e,2)},Dw=function(e,t,i){e.pendingProps=X(e.memoizedProps,t,i),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ai(e,2),t!==null&&Bt(t,e,2)},kw=function(e){var t=ai(e,2);t!==null&&Bt(t,e,2)},Rw=function(e){var t=We(),i=ai(e,t);i!==null&&Bt(i,e,t)},Tw=function(e){I=e},Bw=function(e){ie=e};var Iu=!0,$u=null,Mm=!1,sr=null,nr=null,rr=null,kl=new Map,Rl=new Map,or=[],eE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),qu=null;if(Xc.prototype.render=nf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error("Cannot update an unmounted root.");var i=arguments;typeof i[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):u(i[1])?console.error("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 i[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),i=e;var s=t.current,n=Mi(s);Zd(s,n,i,t,null,null)},Xc.prototype.unmount=nf.prototype.unmount=function(){var e=arguments;if(typeof e[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),e=this._internalRoot,e!==null){this._internalRoot=null;var t=e.containerInfo;(lt&(Qt|Hi))!==ti&&console.error("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."),Zd(e.current,2,null,e,null,null),uo(),t[Yn]=null}},Xc.prototype.unstable_scheduleHydration=function(e){if(e){var t=yn();e={blockedOn:null,target:e,priority:t};for(var i=0;i<or.length&&t!==0&&t<or[i].priority;i++);or.splice(i,0,e),i===0&&Uv(e)}},(function(){var e=rf.version;if(e!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
269
|
-
- react: `+(e+`
|
|
270
|
-
- react-dom: 19.2.7
|
|
271
|
-
Learn more: https://react.dev/warnings/version-mismatch`))})(),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"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),ft.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=E(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e},!(function(){var e={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:he,reconcilerVersion:"19.2.7"};return e.overrideHookState=Sw,e.overrideHookStateDeletePath=Nw,e.overrideHookStateRenamePath=Ew,e.overrideProps=xw,e.overridePropsDeletePath=Cw,e.overridePropsRenamePath=Dw,e.scheduleUpdate=kw,e.scheduleRetry=Rw,e.setErrorHandler=Tw,e.setSuspenseHandler=Bw,e.scheduleRefresh=C,e.scheduleRoot=w,e.setRefreshHandler=g,e.getCurrentFiber=s1,zi(e)})()&&Hs&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Aw=window.location.protocol;/^(https?|file):$/.test(Aw)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Aw==="file:"?`
|
|
272
|
-
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Tl.createRoot=function(e,t){if(!u(e))throw Error("Target container is not a DOM element.");qv(e);var i=!1,s="",n=zb,r=Ib,c=$b;return t!=null&&(t.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Os&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
273
|
-
|
|
274
|
-
let root = createRoot(domContainer);
|
|
275
|
-
root.render(<App />);`),t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Ov(e,1,!1,null,null,i,s,null,n,r,c,$v),e[Yn]=t.current,Vd(e),new nf(t)},Tl.hydrateRoot=function(e,t,i){if(!u(e))throw Error("Target container is not a DOM element.");qv(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var s=!1,n="",r=zb,c=Ib,b=$b,D=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(n=i.identifierPrefix),i.onUncaughtError!==void 0&&(r=i.onUncaughtError),i.onCaughtError!==void 0&&(c=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(D=i.formState)),t=Ov(e,1,!0,t,i??null,s,n,D,r,c,b,$v),t.context=Lv(null),i=t.current,s=Mi(i),s=bs(s),n=Cn(s),n.callback=null,Dn(i,n,s),ys(s,"hydrateRoot()",null),i=s,t.current.lanes=i,ct(t,i),As(t),e[Yn]=t.current,Vd(e),new Xc(t)},Tl.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),Tl}var zw;function dE(){return zw||(zw=1,jm.exports=hE()),jm.exports}var fE=dE(),Hm={exports:{}},Iw;function mE(){return Iw||(Iw=1,(function(N,R){(function(X,H){N.exports=H()})(globalThis,(()=>(()=>{var X={4567:function(I,l,p){var _=this&&this.__decorate||function(o,a,v,E){var x,k=arguments.length,y=k<3?a:E===null?E=Object.getOwnPropertyDescriptor(a,v):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,a,v,E);else for(var T=o.length-1;T>=0;T--)(x=o[T])&&(y=(k<3?x(y):k>3?x(a,v,y):x(a,v))||y);return k>3&&y&&Object.defineProperty(a,v,y),y},S=this&&this.__param||function(o,a){return function(v,E){a(v,E,o)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=p(9042),m=p(9924),w=p(844),C=p(4725),g=p(2585),u=p(3656);let h=l.AccessibilityManager=class extends w.Disposable{constructor(o,a,v,E){super(),this._terminal=o,this._coreBrowserService=v,this._renderService=E,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let x=0;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);if(this._topBoundaryFocusListener=x=>this._handleBoundaryFocus(x,0),this._bottomBoundaryFocusListener=x=>this._handleBoundaryFocus(x,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new m.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((x=>this._handleResize(x.rows)))),this.register(this._terminal.onRender((x=>this._refreshRows(x.start,x.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((x=>this._handleChar(x)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
276
|
-
`)))),this.register(this._terminal.onA11yTab((x=>this._handleTab(x)))),this.register(this._terminal.onKey((x=>this._handleKey(x.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,u.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let a=0;a<o;a++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
277
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,a){this._liveRegionDebouncer.refresh(o,a,this._terminal.rows)}_renderRows(o,a){const v=this._terminal.buffer,E=v.lines.length.toString();for(let x=o;x<=a;x++){const k=v.lines.get(v.ydisp+x),y=[],T=(k==null?void 0:k.translateToString(!0,void 0,void 0,y))||"",M=(v.ydisp+x+1).toString(),j=this._rowElements[x];j&&(T.length===0?(j.innerText=" ",this._rowColumns.set(j,[0,1])):(j.textContent=T,this._rowColumns.set(j,y)),j.setAttribute("aria-posinset",M),j.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,a){const v=o.target,E=this._rowElements[a===0?1:this._rowElements.length-2];if(v.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==E)return;let x,k;if(a===0?(x=v,k=this._rowElements.pop(),this._rowContainer.removeChild(k)):(x=this._rowElements.shift(),k=v,this._rowContainer.removeChild(x)),x.removeEventListener("focus",this._topBoundaryFocusListener),k.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const y=this._createAccessibilityTreeNode();this._rowElements.unshift(y),this._rowContainer.insertAdjacentElement("afterbegin",y)}else{const y=this._createAccessibilityTreeNode();this._rowElements.push(y),this._rowContainer.appendChild(y)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var T;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let a={node:o.anchorNode,offset:o.anchorOffset},v={node:o.focusNode,offset:o.focusOffset};if((a.node.compareDocumentPosition(v.node)&Node.DOCUMENT_POSITION_PRECEDING||a.node===v.node&&a.offset>v.offset)&&([a,v]=[v,a]),a.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(a={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(a.node))return;const E=this._rowElements.slice(-1)[0];if(v.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(v={node:E,offset:((T=E.textContent)==null?void 0:T.length)??0}),!this._rowContainer.contains(v.node))return;const x=({node:M,offset:j})=>{const z=M instanceof Text?M.parentNode:M;let Y=parseInt(z==null?void 0:z.getAttribute("aria-posinset"),10)-1;if(isNaN(Y))return console.warn("row is invalid. Race condition?"),null;const ee=this._rowColumns.get(z);if(!ee)return console.warn("columns is null. Race condition?"),null;let ne=j<ee.length?ee[j]:ee.slice(-1)[0]+1;return ne>=this._terminal.cols&&(++Y,ne=0),{row:Y,column:ne}},k=x(a),y=x(v);if(k&&y){if(k.row>y.row||k.row===y.row&&k.column>=y.column)throw new Error("invalid range");this._terminal.select(k.column,k.row,(y.row-k.row)*this._terminal.cols-k.column+y.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};l.AccessibilityManager=h=_([S(1,g.IInstantiationService),S(2,C.ICoreBrowserService),S(3,C.IRenderService)],h)},3614:(I,l)=>{function p(m){return m.replace(/\r?\n/g,"\r")}function _(m,w){return w?"\x1B[200~"+m+"\x1B[201~":m}function S(m,w,C,g){m=_(m=p(m),C.decPrivateModes.bracketedPasteMode&&g.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(m,!0),w.value=""}function f(m,w,C){const g=C.getBoundingClientRect(),u=m.clientX-g.left-10,h=m.clientY-g.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${u}px`,w.style.top=`${h}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(l,"__esModule",{value:!0}),l.rightClickHandler=l.moveTextAreaUnderMouseCursor=l.paste=l.handlePasteEvent=l.copyHandler=l.bracketTextForPaste=l.prepareTextForTerminal=void 0,l.prepareTextForTerminal=p,l.bracketTextForPaste=_,l.copyHandler=function(m,w){m.clipboardData&&m.clipboardData.setData("text/plain",w.selectionText),m.preventDefault()},l.handlePasteEvent=function(m,w,C,g){m.stopPropagation(),m.clipboardData&&S(m.clipboardData.getData("text/plain"),w,C,g)},l.paste=S,l.moveTextAreaUnderMouseCursor=f,l.rightClickHandler=function(m,w,C,g,u){f(m,w,C),u&&g.rightClickSelect(m),w.value=g.selectionText,w.select()}},7239:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorContrastCache=void 0;const _=p(1505);l.ColorContrastCache=class{constructor(){this._color=new _.TwoKeyMap,this._css=new _.TwoKeyMap}setCss(S,f,m){this._css.set(S,f,m)}getCss(S,f){return this._css.get(S,f)}setColor(S,f,m){this._color.set(S,f,m)}getColor(S,f){return this._color.get(S,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.addDisposableDomListener=void 0,l.addDisposableDomListener=function(p,_,S,f){p.addEventListener(_,S,f);let m=!1;return{dispose:()=>{m||(m=!0,p.removeEventListener(_,S,f))}}}},3551:function(I,l,p){var _=this&&this.__decorate||function(h,o,a,v){var E,x=arguments.length,k=x<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,a):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(h,o,a,v);else for(var y=h.length-1;y>=0;y--)(E=h[y])&&(k=(x<3?E(k):x>3?E(o,a,k):E(o,a))||k);return x>3&&k&&Object.defineProperty(o,a,k),k},S=this&&this.__param||function(h,o){return function(a,v){o(a,v,h)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Linkifier=void 0;const f=p(3656),m=p(8460),w=p(844),C=p(2585),g=p(4725);let u=l.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(h,o,a,v,E){super(),this._element=h,this._mouseService=o,this._renderService=a,this._bufferService=v,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var x;this._lastMouseEvent=void 0,(x=this._activeProviderReplies)==null||x.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const a=h.composedPath();for(let v=0;v<a.length;v++){const E=a[v];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,o){var v,E;this._activeProviderReplies&&o||((v=this._activeProviderReplies)==null||v.forEach((x=>{x==null||x.forEach((k=>{k.link.dispose&&k.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let a=!1;for(const[x,k]of this._linkProviderService.linkProviders.entries())o?(E=this._activeProviderReplies)!=null&&E.get(x)&&(a=this._checkLinkProviderResult(x,h,a)):k.provideLinks(h.y,(y=>{var M,j;if(this._isMouseOut)return;const T=y==null?void 0:y.map((z=>({link:z})));(M=this._activeProviderReplies)==null||M.set(x,T),a=this._checkLinkProviderResult(x,h,a),((j=this._activeProviderReplies)==null?void 0:j.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,o){const a=new Set;for(let v=0;v<o.size;v++){const E=o.get(v);if(E)for(let x=0;x<E.length;x++){const k=E[x],y=k.link.range.start.y<h?0:k.link.range.start.x,T=k.link.range.end.y>h?this._bufferService.cols:k.link.range.end.x;for(let M=y;M<=T;M++){if(a.has(M)){E.splice(x--,1);break}a.add(M)}}}}_checkLinkProviderResult(h,o,a){var x;if(!this._activeProviderReplies)return a;const v=this._activeProviderReplies.get(h);let E=!1;for(let k=0;k<h;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(E=!0);if(!E&&v){const k=v.find((y=>this._linkAtPosition(y.link,o)));k&&(a=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!a)for(let k=0;k<this._activeProviderReplies.size;k++){const y=(x=this._activeProviderReplies.get(k))==null?void 0:x.find((T=>this._linkAtPosition(T.link,o)));if(y){a=!0,this._handleNewLink(y);break}}return a}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,o){this._currentLink&&this._lastMouseEvent&&(!h||!o||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(h.link,o)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var a,v;return(v=(a=this._currentLink)==null?void 0:a.state)==null?void 0:v.decorations.pointerCursor},set:a=>{var v;(v=this._currentLink)!=null&&v.state&&this._currentLink.state.decorations.pointerCursor!==a&&(this._currentLink.state.decorations.pointerCursor=a,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",a))}},underline:{get:()=>{var a,v;return(v=(a=this._currentLink)==null?void 0:a.state)==null?void 0:v.decorations.underline},set:a=>{var v,E,x;(v=this._currentLink)!=null&&v.state&&((x=(E=this._currentLink)==null?void 0:E.state)==null?void 0:x.decorations.underline)!==a&&(this._currentLink.state.decorations.underline=a,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,a))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((a=>{if(!this._currentLink)return;const v=a.start===0?0:a.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+a.end;if(this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(v,E),this._lastMouseEvent)){const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._askForLink(x,!1)}}))))}_linkHover(h,o,a){var v;(v=this._currentLink)!=null&&v.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(a,o.text)}_fireUnderlineEvent(h,o){const a=h.range,v=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-v-1,a.end.x,a.end.y-v-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(h,o,a){var v;(v=this._currentLink)!=null&&v.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(a,o.text)}_linkAtPosition(h,o){const a=h.range.start.y*this._bufferService.cols+h.range.start.x,v=h.range.end.y*this._bufferService.cols+h.range.end.x,E=o.y*this._bufferService.cols+o.x;return a<=E&&E<=v}_positionFromMouseEvent(h,o,a){const v=a.getCoords(h,o,this._bufferService.cols,this._bufferService.rows);if(v)return{x:v[0],y:v[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,o,a,v,E){return{x1:h,y1:o,x2:a,y2:v,cols:this._bufferService.cols,fg:E}}};l.Linkifier=u=_([S(1,g.IMouseService),S(2,g.IRenderService),S(3,C.IBufferService),S(4,g.ILinkProviderService)],u)},9042:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.tooMuchOutput=l.promptLabel=void 0,l.promptLabel="Terminal input",l.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(I,l,p){var _=this&&this.__decorate||function(g,u,h,o){var a,v=arguments.length,E=v<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,u,h,o);else for(var x=g.length-1;x>=0;x--)(a=g[x])&&(E=(v<3?a(E):v>3?a(u,h,E):a(u,h))||E);return v>3&&E&&Object.defineProperty(u,h,E),E},S=this&&this.__param||function(g,u){return function(h,o){u(h,o,g)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkProvider=void 0;const f=p(511),m=p(2585);let w=l.OscLinkProvider=class{constructor(g,u,h){this._bufferService=g,this._optionsService=u,this._oscLinkService=h}provideLinks(g,u){var T;const h=this._bufferService.buffer.lines.get(g-1);if(!h)return void u(void 0);const o=[],a=this._optionsService.rawOptions.linkHandler,v=new f.CellData,E=h.getTrimmedLength();let x=-1,k=-1,y=!1;for(let M=0;M<E;M++)if(k!==-1||h.hasContent(M)){if(h.loadCell(M,v),v.hasExtendedAttrs()&&v.extended.urlId){if(k===-1){k=M,x=v.extended.urlId;continue}y=v.extended.urlId!==x}else k!==-1&&(y=!0);if(y||k!==-1&&M===E-1){const j=(T=this._oscLinkService.getLinkData(x))==null?void 0:T.uri;if(j){const z={start:{x:k+1,y:g},end:{x:M+(y||M!==E-1?0:1),y:g}};let Y=!1;if(!(a!=null&&a.allowNonHttpProtocols))try{const ee=new URL(j);["http:","https:"].includes(ee.protocol)||(Y=!0)}catch{Y=!0}Y||o.push({text:j,range:z,activate:(ee,ne)=>a?a.activate(ee,ne,z):C(0,ne),hover:(ee,ne)=>{var te;return(te=a==null?void 0:a.hover)==null?void 0:te.call(a,ee,ne,z)},leave:(ee,ne)=>{var te;return(te=a==null?void 0:a.leave)==null?void 0:te.call(a,ee,ne,z)}})}y=!1,v.hasExtendedAttrs()&&v.extended.urlId?(k=M,x=v.extended.urlId):(k=-1,x=-1)}}u(o)}};function C(g,u){if(confirm(`Do you want to navigate to ${u}?
|
|
278
|
-
|
|
279
|
-
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}}l.OscLinkProvider=w=_([S(0,m.IBufferService),S(1,m.IOptionsService),S(2,m.IOscLinkService)],w)},6193:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.RenderDebouncer=void 0,l.RenderDebouncer=class{constructor(p,_){this._renderCallback=p,this._coreBrowserService=_,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(p){return this._refreshCallbacks.push(p),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(p,_,S){this._rowCount=S,p=p!==void 0?p:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,p):p,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const p=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(p,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const p of this._refreshCallbacks)p(0);this._refreshCallbacks=[]}}},3236:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Terminal=void 0;const _=p(3614),S=p(3656),f=p(3551),m=p(9042),w=p(3730),C=p(1680),g=p(3107),u=p(5744),h=p(2950),o=p(1296),a=p(428),v=p(4269),E=p(5114),x=p(8934),k=p(3230),y=p(9312),T=p(4725),M=p(6731),j=p(8055),z=p(8969),Y=p(8460),ee=p(844),ne=p(6114),te=p(8437),de=p(2584),ce=p(7399),B=p(5941),U=p(9074),L=p(2585),q=p(5435),ue=p(4567),pe=p(779);class ve extends z.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(F={}){super(F),this.browser=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ee.MutableDisposable),this._onCursorMove=this.register(new Y.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new Y.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new Y.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new Y.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new Y.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new Y.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new Y.EventEmitter),this._onBlur=this.register(new Y.EventEmitter),this._onA11yCharEmitter=this.register(new Y.EventEmitter),this._onA11yTabEmitter=this.register(new Y.EventEmitter),this._onWillOpen=this.register(new Y.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(U.DecorationService),this._instantiationService.setService(L.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(pe.LinkProviderService),this._instantiationService.setService(T.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((V,me)=>this.refresh(V,me)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((V=>this._reportWindowsOptions(V)))),this.register(this._inputHandler.onColor((V=>this._handleColorEvent(V)))),this.register((0,Y.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,Y.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,Y.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,Y.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((V=>this._afterResize(V.cols,V.rows)))),this.register((0,ee.toDisposable)((()=>{var V,me;this._customKeyEventHandler=void 0,(me=(V=this.element)==null?void 0:V.parentNode)==null||me.removeChild(this.element)})))}_handleColorEvent(F){if(this._themeService)for(const V of F){let me,oe="";switch(V.index){case 256:me="foreground",oe="10";break;case 257:me="background",oe="11";break;case 258:me="cursor",oe="12";break;default:me="ansi",oe="4;"+V.index}switch(V.type){case 0:const ae=j.color.toColorRGB(me==="ansi"?this._themeService.colors.ansi[V.index]:this._themeService.colors[me]);this.coreService.triggerDataEvent(`${de.C0.ESC}]${oe};${(0,B.toRgbString)(ae)}${de.C1_ESCAPED.ST}`);break;case 1:if(me==="ansi")this._themeService.modifyColors((ye=>ye.ansi[V.index]=j.channels.toColor(...V.color)));else{const ye=me;this._themeService.modifyColors((be=>be[ye]=j.channels.toColor(...V.color)))}break;case 2:this._themeService.restoreColor(V.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(F){F?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ue.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(F){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(de.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var F;return(F=this.textarea)==null?void 0:F.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(de.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const F=this.buffer.ybase+this.buffer.y,V=this.buffer.lines.get(F);if(!V)return;const me=Math.min(this.buffer.x,this.cols-1),oe=this._renderService.dimensions.css.cell.height,ae=V.getWidth(me),ye=this._renderService.dimensions.css.cell.width*ae,be=this.buffer.y*this._renderService.dimensions.css.cell.height,Ue=me*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ue+"px",this.textarea.style.top=be+"px",this.textarea.style.width=ye+"px",this.textarea.style.height=oe+"px",this.textarea.style.lineHeight=oe+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,S.addDisposableDomListener)(this.element,"copy",(V=>{this.hasSelection()&&(0,_.copyHandler)(V,this._selectionService)})));const F=V=>(0,_.handlePasteEvent)(V,this.textarea,this.coreService,this.optionsService);this.register((0,S.addDisposableDomListener)(this.textarea,"paste",F)),this.register((0,S.addDisposableDomListener)(this.element,"paste",F)),ne.isFirefox?this.register((0,S.addDisposableDomListener)(this.element,"mousedown",(V=>{V.button===2&&(0,_.rightClickHandler)(V,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,S.addDisposableDomListener)(this.element,"contextmenu",(V=>{(0,_.rightClickHandler)(V,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ne.isLinux&&this.register((0,S.addDisposableDomListener)(this.element,"auxclick",(V=>{V.button===1&&(0,_.moveTextAreaUnderMouseCursor)(V,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,S.addDisposableDomListener)(this.textarea,"keyup",(F=>this._keyUp(F)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keydown",(F=>this._keyDown(F)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keypress",(F=>this._keyPress(F)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionupdate",(F=>this._compositionHelper.compositionupdate(F)))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,S.addDisposableDomListener)(this.textarea,"input",(F=>this._inputEvent(F)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(F){var me;if(!F)throw new Error("Terminal requires a parent element.");if(F.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((me=this.element)==null?void 0:me.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=F.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"),F.appendChild(this.element);const V=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),V.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,S.addDisposableDomListener)(this.screenElement,"mousemove",(oe=>this.updateCursorStyle(oe)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),V.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),ne.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(E.CoreBrowserService,this.textarea,F.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(T.ICoreBrowserService,this._coreBrowserService),this.register((0,S.addDisposableDomListener)(this.textarea,"focus",(oe=>this._handleTextAreaFocus(oe)))),this.register((0,S.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(a.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(T.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(M.ThemeService),this._instantiationService.setService(T.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(v.CharacterJoinerService),this._instantiationService.setService(T.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(T.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((oe=>this._onRender.fire(oe)))),this.onResize((oe=>this._renderService.resize(oe.cols,oe.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(x.MouseService),this._instantiationService.setService(T.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(V);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(C.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((oe=>this.scrollLines(oe.amount,oe.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(y.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(T.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((oe=>this.scrollLines(oe.amount,oe.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((oe=>this._renderService.handleSelectionChanged(oe.start,oe.end,oe.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((oe=>{this.textarea.value=oe,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((oe=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,S.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(g.BufferDecorationRenderer,this.screenElement)),this.register((0,S.addDisposableDomListener)(this.element,"mousedown",(oe=>this._selectionService.handleMouseDown(oe)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(ue.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(oe=>this._handleScreenReaderModeOptionChange(oe)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(oe=>{!this._overviewRulerRenderer&&oe&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const F=this,V=this.element;function me(ye){const be=F._mouseService.getMouseReportCoords(ye,F.screenElement);if(!be)return!1;let Ue,Ie;switch(ye.overrideType||ye.type){case"mousemove":Ie=32,ye.buttons===void 0?(Ue=3,ye.button!==void 0&&(Ue=ye.button<3?ye.button:3)):Ue=1&ye.buttons?0:4&ye.buttons?1:2&ye.buttons?2:3;break;case"mouseup":Ie=0,Ue=ye.button<3?ye.button:3;break;case"mousedown":Ie=1,Ue=ye.button<3?ye.button:3;break;case"wheel":if(F._customWheelEventHandler&&F._customWheelEventHandler(ye)===!1||F.viewport.getLinesScrolled(ye)===0)return!1;Ie=ye.deltaY<0?0:1,Ue=4;break;default:return!1}return!(Ie===void 0||Ue===void 0||Ue>4)&&F.coreMouseService.triggerMouseEvent({col:be.col,row:be.row,x:be.x,y:be.y,button:Ue,action:Ie,ctrl:ye.ctrlKey,alt:ye.altKey,shift:ye.shiftKey})}const oe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ae={mouseup:ye=>(me(ye),ye.buttons||(this._document.removeEventListener("mouseup",oe.mouseup),oe.mousedrag&&this._document.removeEventListener("mousemove",oe.mousedrag)),this.cancel(ye)),wheel:ye=>(me(ye),this.cancel(ye,!0)),mousedrag:ye=>{ye.buttons&&me(ye)},mousemove:ye=>{ye.buttons||me(ye)}};this.register(this.coreMouseService.onProtocolChange((ye=>{ye?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ye)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&ye?oe.mousemove||(V.addEventListener("mousemove",ae.mousemove),oe.mousemove=ae.mousemove):(V.removeEventListener("mousemove",oe.mousemove),oe.mousemove=null),16&ye?oe.wheel||(V.addEventListener("wheel",ae.wheel,{passive:!1}),oe.wheel=ae.wheel):(V.removeEventListener("wheel",oe.wheel),oe.wheel=null),2&ye?oe.mouseup||(oe.mouseup=ae.mouseup):(this._document.removeEventListener("mouseup",oe.mouseup),oe.mouseup=null),4&ye?oe.mousedrag||(oe.mousedrag=ae.mousedrag):(this._document.removeEventListener("mousemove",oe.mousedrag),oe.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,S.addDisposableDomListener)(V,"mousedown",(ye=>{if(ye.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ye))return me(ye),oe.mouseup&&this._document.addEventListener("mouseup",oe.mouseup),oe.mousedrag&&this._document.addEventListener("mousemove",oe.mousedrag),this.cancel(ye)}))),this.register((0,S.addDisposableDomListener)(V,"wheel",(ye=>{if(!oe.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ye)===!1)return!1;if(!this.buffer.hasScrollback){const be=this.viewport.getLinesScrolled(ye);if(be===0)return;const Ue=de.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ye.deltaY<0?"A":"B");let Ie="";for(let Le=0;Le<Math.abs(be);Le++)Ie+=Ue;return this.coreService.triggerDataEvent(Ie,!0),this.cancel(ye,!0)}return this.viewport.handleWheel(ye)?this.cancel(ye):void 0}}),{passive:!1})),this.register((0,S.addDisposableDomListener)(V,"touchstart",(ye=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ye),this.cancel(ye)}),{passive:!0})),this.register((0,S.addDisposableDomListener)(V,"touchmove",(ye=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ye)?void 0:this.cancel(ye)}),{passive:!1}))}refresh(F,V){var me;(me=this._renderService)==null||me.refreshRows(F,V)}updateCursorStyle(F){var V;(V=this._selectionService)!=null&&V.shouldColumnSelect(F)?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(F,V,me=0){var oe;me===1?(super.scrollLines(F,V,me),this.refresh(0,this.rows-1)):(oe=this.viewport)==null||oe.scrollLines(F)}paste(F){(0,_.paste)(F,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(F){this._customKeyEventHandler=F}attachCustomWheelEventHandler(F){this._customWheelEventHandler=F}registerLinkProvider(F){return this._linkProviderService.registerLinkProvider(F)}registerCharacterJoiner(F){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const V=this._characterJoinerService.register(F);return this.refresh(0,this.rows-1),V}deregisterCharacterJoiner(F){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(F)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(F){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+F)}registerDecoration(F){return this._decorationService.registerDecoration(F)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(F,V,me){this._selectionService.setSelection(F,V,me)}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 F;(F=this._selectionService)==null||F.clearSelection()}selectAll(){var F;(F=this._selectionService)==null||F.selectAll()}selectLines(F,V){var me;(me=this._selectionService)==null||me.selectLines(F,V)}_keyDown(F){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;const V=this.browser.isMac&&this.options.macOptionIsMeta&&F.altKey;if(!V&&!this._compositionHelper.keydown(F))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;V||F.key!=="Dead"&&F.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const me=(0,ce.evaluateKeyboardEvent)(F,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(F),me.type===3||me.type===2){const oe=this.rows-1;return this.scrollLines(me.type===2?-oe:oe),this.cancel(F,!0)}return me.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,F)||(me.cancel&&this.cancel(F,!0),!me.key||!!(F.key&&!F.ctrlKey&&!F.altKey&&!F.metaKey&&F.key.length===1&&F.key.charCodeAt(0)>=65&&F.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(me.key!==de.C0.ETX&&me.key!==de.C0.CR||(this.textarea.value=""),this._onKey.fire({key:me.key,domEvent:F}),this._showCursor(),this.coreService.triggerDataEvent(me.key,!0),!this.optionsService.rawOptions.screenReaderMode||F.altKey||F.ctrlKey?this.cancel(F,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(F,V){const me=F.isMac&&!this.options.macOptionIsMeta&&V.altKey&&!V.ctrlKey&&!V.metaKey||F.isWindows&&V.altKey&&V.ctrlKey&&!V.metaKey||F.isWindows&&V.getModifierState("AltGraph");return V.type==="keypress"?me:me&&(!V.keyCode||V.keyCode>47)}_keyUp(F){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1||((function(V){return V.keyCode===16||V.keyCode===17||V.keyCode===18})(F)||this.focus(),this.updateCursorStyle(F),this._keyPressHandled=!1)}_keyPress(F){let V;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;if(this.cancel(F),F.charCode)V=F.charCode;else if(F.which===null||F.which===void 0)V=F.keyCode;else{if(F.which===0||F.charCode===0)return!1;V=F.which}return!(!V||(F.altKey||F.ctrlKey||F.metaKey)&&!this._isThirdLevelShift(this.browser,F)||(V=String.fromCharCode(V),this._onKey.fire({key:V,domEvent:F}),this._showCursor(),this.coreService.triggerDataEvent(V,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(F){if(F.data&&F.inputType==="insertText"&&(!F.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const V=F.data;return this.coreService.triggerDataEvent(V,!0),this.cancel(F),!0}return!1}resize(F,V){F!==this.cols||V!==this.rows?super.resize(F,V):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(F,V){var me,oe;(me=this._charSizeService)==null||me.measure(),(oe=this.viewport)==null||oe.syncScrollArea(!0)}clear(){var F;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 V=1;V<this.rows;V++)this.buffer.lines.push(this.buffer.getBlankLine(te.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(F=this.viewport)==null||F.reset(),this.refresh(0,this.rows-1)}}reset(){var V,me;this.options.rows=this.rows,this.options.cols=this.cols;const F=this._customKeyEventHandler;this._setup(),super.reset(),(V=this._selectionService)==null||V.reset(),this._decorationService.reset(),(me=this.viewport)==null||me.reset(),this._customKeyEventHandler=F,this.refresh(0,this.rows-1)}clearTextureAtlas(){var F;(F=this._renderService)==null||F.clearTextureAtlas()}_reportFocus(){var F;(F=this.element)!=null&&F.classList.contains("focus")?this.coreService.triggerDataEvent(de.C0.ESC+"[I"):this.coreService.triggerDataEvent(de.C0.ESC+"[O")}_reportWindowsOptions(F){if(this._renderService)switch(F){case q.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const V=this._renderService.dimensions.css.canvas.width.toFixed(0),me=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${de.C0.ESC}[4;${me};${V}t`);break;case q.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const oe=this._renderService.dimensions.css.cell.width.toFixed(0),ae=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${de.C0.ESC}[6;${ae};${oe}t`)}}cancel(F,V){if(this.options.cancelEvents||V)return F.preventDefault(),F.stopPropagation(),!1}}l.Terminal=ve},9924:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.TimeBasedDebouncer=void 0,l.TimeBasedDebouncer=class{constructor(p,_=1e3){this._renderCallback=p,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(p,_,S){this._rowCount=S,p=p!==void 0?p:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,p):p,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=f-this._lastRefreshMs,w=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const p=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(p,_)}}},1680:function(I,l,p){var _=this&&this.__decorate||function(h,o,a,v){var E,x=arguments.length,k=x<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,a):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(h,o,a,v);else for(var y=h.length-1;y>=0;y--)(E=h[y])&&(k=(x<3?E(k):x>3?E(o,a,k):E(o,a))||k);return x>3&&k&&Object.defineProperty(o,a,k),k},S=this&&this.__param||function(h,o){return function(a,v){o(a,v,h)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Viewport=void 0;const f=p(3656),m=p(4725),w=p(8460),C=p(844),g=p(2585);let u=l.Viewport=class extends C.Disposable{constructor(h,o,a,v,E,x,k,y){super(),this._viewportElement=h,this._scrollArea=o,this._bufferService=a,this._optionsService=v,this._charSizeService=E,this._renderService=x,this._coreBrowserService=k,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((T=>this._activeBuffer=T.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((T=>this._renderDimensions=T))),this._handleThemeChange(y.colors),this.register(y.onChangeColors((T=>this._handleThemeChange(T)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(h){if(h)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(h,o){const a=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&a<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const o=this._getPixelsScrolled(h);return o!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(h,o){var y;let a,v="";const E=[],x=o??this._bufferService.buffer.lines.length,k=this._bufferService.buffer.lines;for(let T=h;T<x;T++){const M=k.get(T);if(!M)continue;const j=(y=k.get(T+1))==null?void 0:y.isWrapped;if(v+=M.translateToString(!j),!j||T===k.length-1){const z=document.createElement("div");z.textContent=v,E.push(z),v.length>0&&(a=z),v=""}}return{bufferElements:E,cursorElement:a}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(h,o){const a=this._optionsService.rawOptions.fastScrollModifier;return a==="alt"&&o.altKey||a==="ctrl"&&o.ctrlKey||a==="shift"&&o.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const o=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}};l.Viewport=u=_([S(2,g.IBufferService),S(3,g.IOptionsService),S(4,m.ICharSizeService),S(5,m.IRenderService),S(6,m.ICoreBrowserService),S(7,m.IThemeService)],u)},3107:function(I,l,p){var _=this&&this.__decorate||function(g,u,h,o){var a,v=arguments.length,E=v<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,u,h,o);else for(var x=g.length-1;x>=0;x--)(a=g[x])&&(E=(v<3?a(E):v>3?a(u,h,E):a(u,h))||E);return v>3&&E&&Object.defineProperty(u,h,E),E},S=this&&this.__param||function(g,u){return function(h,o){u(h,o,g)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferDecorationRenderer=void 0;const f=p(4725),m=p(844),w=p(2585);let C=l.BufferDecorationRenderer=class extends m.Disposable{constructor(g,u,h,o,a){super(),this._screenElement=g,this._bufferService=u,this._coreBrowserService=h,this._decorationService=o,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((v=>this._removeDecoration(v)))),this.register((0,m.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const g of this._decorationService.decorations)this._renderDecoration(g);this._dimensionsChanged=!1}_renderDecoration(g){this._refreshStyle(g),this._dimensionsChanged&&this._refreshXPosition(g)}_createElement(g){var o;const u=this._coreBrowserService.mainDocument.createElement("div");u.classList.add("xterm-decoration"),u.classList.toggle("xterm-decoration-top-layer",((o=g==null?void 0:g.options)==null?void 0:o.layer)==="top"),u.style.width=`${Math.round((g.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,u.style.height=(g.options.height||1)*this._renderService.dimensions.css.cell.height+"px",u.style.top=(g.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",u.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=g.options.x??0;return h&&h>this._bufferService.cols&&(u.style.display="none"),this._refreshXPosition(g,u),u}_refreshStyle(g){const u=g.marker.line-this._bufferService.buffers.active.ydisp;if(u<0||u>=this._bufferService.rows)g.element&&(g.element.style.display="none",g.onRenderEmitter.fire(g.element));else{let h=this._decorationElements.get(g);h||(h=this._createElement(g),g.element=h,this._decorationElements.set(g,h),this._container.appendChild(h),g.onDispose((()=>{this._decorationElements.delete(g),h.remove()}))),h.style.top=u*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",g.onRenderEmitter.fire(h)}}_refreshXPosition(g,u=g.element){if(!u)return;const h=g.options.x??0;(g.options.anchor||"left")==="right"?u.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":u.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(g){var u;(u=this._decorationElements.get(g))==null||u.remove(),this._decorationElements.delete(g),g.dispose()}};l.BufferDecorationRenderer=C=_([S(1,w.IBufferService),S(2,f.ICoreBrowserService),S(3,w.IDecorationService),S(4,f.IRenderService)],C)},5871:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorZoneStore=void 0,l.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(p){if(p.options.overviewRulerOptions){for(const _ of this._zones)if(_.color===p.options.overviewRulerOptions.color&&_.position===p.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,p.marker.line))return;if(this._lineAdjacentToZone(_,p.marker.line,p.options.overviewRulerOptions.position))return void this._addLineToZone(_,p.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=p.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=p.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=p.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=p.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:p.options.overviewRulerOptions.color,position:p.options.overviewRulerOptions.position,startBufferLine:p.marker.line,endBufferLine:p.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(p){this._linePadding=p}_lineIntersectsZone(p,_){return _>=p.startBufferLine&&_<=p.endBufferLine}_lineAdjacentToZone(p,_,S){return _>=p.startBufferLine-this._linePadding[S||"full"]&&_<=p.endBufferLine+this._linePadding[S||"full"]}_addLineToZone(p,_){p.startBufferLine=Math.min(p.startBufferLine,_),p.endBufferLine=Math.max(p.endBufferLine,_)}}},5744:function(I,l,p){var _=this&&this.__decorate||function(a,v,E,x){var k,y=arguments.length,T=y<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,E):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(a,v,E,x);else for(var M=a.length-1;M>=0;M--)(k=a[M])&&(T=(y<3?k(T):y>3?k(v,E,T):k(v,E))||T);return y>3&&T&&Object.defineProperty(v,E,T),T},S=this&&this.__param||function(a,v){return function(E,x){v(E,x,a)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OverviewRulerRenderer=void 0;const f=p(5871),m=p(4725),w=p(844),C=p(2585),g={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let o=l.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(a,v,E,x,k,y,T){var j;super(),this._viewportElement=a,this._screenElement=v,this._bufferService=E,this._decorationService=x,this._renderService=k,this._optionsService=y,this._coreBrowserService=T,this._colorZoneStore=new f.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(j=this._viewportElement.parentElement)==null||j.insertBefore(this._canvas,this._viewportElement);const M=this._canvas.getContext("2d");if(!M)throw new Error("Ctx cannot be null");this._ctx=M,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var z;(z=this._canvas)==null||z.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const a=Math.floor(this._canvas.width/3),v=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=a,u.center=v,u.right=a,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=u.left,h.right=u.left+u.center}_refreshDrawHeightConstants(){g.full=Math.round(2*this._coreBrowserService.dpr);const a=this._canvas.height/this._bufferService.buffer.lines.length,v=Math.round(Math.max(Math.min(a,12),6)*this._coreBrowserService.dpr);g.left=v,g.center=v,g.right=v}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const v of this._decorationService.decorations)this._colorZoneStore.addDecoration(v);this._ctx.lineWidth=1;const a=this._colorZoneStore.zones;for(const v of a)v.position!=="full"&&this._renderColorZone(v);for(const v of a)v.position==="full"&&this._renderColorZone(v);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(a){this._ctx.fillStyle=a.color,this._ctx.fillRect(h[a.position||"full"],Math.round((this._canvas.height-1)*(a.startBufferLine/this._bufferService.buffers.active.lines.length)-g[a.position||"full"]/2),u[a.position||"full"],Math.round((this._canvas.height-1)*((a.endBufferLine-a.startBufferLine)/this._bufferService.buffers.active.lines.length)+g[a.position||"full"]))}_queueRefresh(a,v){this._shouldUpdateDimensions=a||this._shouldUpdateDimensions,this._shouldUpdateAnchor=v||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};l.OverviewRulerRenderer=o=_([S(2,C.IBufferService),S(3,C.IDecorationService),S(4,m.IRenderService),S(5,C.IOptionsService),S(6,m.ICoreBrowserService)],o)},2950:function(I,l,p){var _=this&&this.__decorate||function(g,u,h,o){var a,v=arguments.length,E=v<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,u,h,o);else for(var x=g.length-1;x>=0;x--)(a=g[x])&&(E=(v<3?a(E):v>3?a(u,h,E):a(u,h))||E);return v>3&&E&&Object.defineProperty(u,h,E),E},S=this&&this.__param||function(g,u){return function(h,o){u(h,o,g)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CompositionHelper=void 0;const f=p(4725),m=p(2585),w=p(2584);let C=l.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(g,u,h,o,a,v){this._textarea=g,this._compositionView=u,this._bufferService=h,this._optionsService=o,this._coreService=a,this._renderService=v,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(g){this._compositionView.textContent=g.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(g){if(this._isComposing||this._isSendingComposition){if(g.keyCode===229||g.keyCode===16||g.keyCode===17||g.keyCode===18)return!1;this._finalizeComposition(!1)}return g.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(g){if(this._compositionView.classList.remove("active"),this._isComposing=!1,g){const u={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,u.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(u.start,u.end):this._textarea.value.substring(u.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const u=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(u,!0)}}_handleAnyTextareaChanges(){const g=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const u=this._textarea.value,h=u.replace(g,"");this._dataAlreadySent=h,u.length>g.length?this._coreService.triggerDataEvent(h,!0):u.length<g.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):u.length===g.length&&u!==g&&this._coreService.triggerDataEvent(u,!0)}}),0)}updateCompositionElements(g){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const u=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,a=u*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=a+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const v=this._compositionView.getBoundingClientRect();this._textarea.style.left=a+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(v.width,1)+"px",this._textarea.style.height=Math.max(v.height,1)+"px",this._textarea.style.lineHeight=v.height+"px"}g||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};l.CompositionHelper=C=_([S(2,m.IBufferService),S(3,m.IOptionsService),S(4,m.ICoreService),S(5,f.IRenderService)],C)},9806:(I,l)=>{function p(_,S,f){const m=f.getBoundingClientRect(),w=_.getComputedStyle(f),C=parseInt(w.getPropertyValue("padding-left")),g=parseInt(w.getPropertyValue("padding-top"));return[S.clientX-m.left-C,S.clientY-m.top-g]}Object.defineProperty(l,"__esModule",{value:!0}),l.getCoords=l.getCoordsRelativeToElement=void 0,l.getCoordsRelativeToElement=p,l.getCoords=function(_,S,f,m,w,C,g,u,h){if(!C)return;const o=p(_,S,f);return o?(o[0]=Math.ceil((o[0]+(h?g/2:0))/g),o[1]=Math.ceil(o[1]/u),o[0]=Math.min(Math.max(o[0],1),m+(h?1:0)),o[1]=Math.min(Math.max(o[1],1),w),o):void 0}},9504:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.moveToCellSequence=void 0;const _=p(2584);function S(u,h,o,a){const v=u-f(u,o),E=h-f(h,o),x=Math.abs(v-E)-(function(k,y,T){let M=0;const j=k-f(k,T),z=y-f(y,T);for(let Y=0;Y<Math.abs(j-z);Y++){const ee=m(k,y)==="A"?-1:1,ne=T.buffer.lines.get(j+ee*Y);ne!=null&&ne.isWrapped&&M++}return M})(u,h,o);return g(x,C(m(u,h),a))}function f(u,h){let o=0,a=h.buffer.lines.get(u),v=a==null?void 0:a.isWrapped;for(;v&&u>=0&&u<h.rows;)o++,a=h.buffer.lines.get(--u),v=a==null?void 0:a.isWrapped;return o}function m(u,h){return u>h?"A":"B"}function w(u,h,o,a,v,E){let x=u,k=h,y="";for(;x!==o||k!==a;)x+=v?1:-1,v&&x>E.cols-1?(y+=E.buffer.translateBufferLineToString(k,!1,u,x),x=0,u=0,k++):!v&&x<0&&(y+=E.buffer.translateBufferLineToString(k,!1,0,u+1),x=E.cols-1,u=x,k--);return y+E.buffer.translateBufferLineToString(k,!1,u,x)}function C(u,h){const o=h?"O":"[";return _.C0.ESC+o+u}function g(u,h){u=Math.floor(u);let o="";for(let a=0;a<u;a++)o+=h;return o}l.moveToCellSequence=function(u,h,o,a){const v=o.buffer.x,E=o.buffer.y;if(!o.buffer.hasScrollback)return(function(y,T,M,j,z,Y){return S(T,j,z,Y).length===0?"":g(w(y,T,y,T-f(T,z),!1,z).length,C("D",Y))})(v,E,0,h,o,a)+S(E,h,o,a)+(function(y,T,M,j,z,Y){let ee;ee=S(T,j,z,Y).length>0?j-f(j,z):T;const ne=j,te=(function(de,ce,B,U,L,q){let ue;return ue=S(B,U,L,q).length>0?U-f(U,L):ce,de<B&&ue<=U||de>=B&&ue<U?"C":"D"})(y,T,M,j,z,Y);return g(w(y,ee,M,ne,te==="C",z).length,C(te,Y))})(v,E,u,h,o,a);let x;if(E===h)return x=v>u?"D":"C",g(Math.abs(v-u),C(x,a));x=E>h?"D":"C";const k=Math.abs(E-h);return g((function(y,T){return T.cols-y})(E>h?u:v,o)+(k-1)*o.cols+1+((E>h?v:u)-1),C(x,a))}},1296:function(I,l,p){var _=this&&this.__decorate||function(Y,ee,ne,te){var de,ce=arguments.length,B=ce<3?ee:te===null?te=Object.getOwnPropertyDescriptor(ee,ne):te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(Y,ee,ne,te);else for(var U=Y.length-1;U>=0;U--)(de=Y[U])&&(B=(ce<3?de(B):ce>3?de(ee,ne,B):de(ee,ne))||B);return ce>3&&B&&Object.defineProperty(ee,ne,B),B},S=this&&this.__param||function(Y,ee){return function(ne,te){ee(ne,te,Y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRenderer=void 0;const f=p(3787),m=p(2550),w=p(2223),C=p(6171),g=p(6052),u=p(4725),h=p(8055),o=p(8460),a=p(844),v=p(2585),E="xterm-dom-renderer-owner-",x="xterm-rows",k="xterm-fg-",y="xterm-bg-",T="xterm-focus",M="xterm-selection";let j=1,z=l.DomRenderer=class extends a.Disposable{constructor(Y,ee,ne,te,de,ce,B,U,L,q,ue,pe,ve){super(),this._terminal=Y,this._document=ee,this._element=ne,this._screenElement=te,this._viewportElement=de,this._helperContainer=ce,this._linkifier2=B,this._charSizeService=L,this._optionsService=q,this._bufferService=ue,this._coreBrowserService=pe,this._themeService=ve,this._terminalClass=j++,this._rowElements=[],this._selectionRenderModel=(0,g.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(x),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(M),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,C.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Ce=>this._injectCss(Ce)))),this._injectCss(this._themeService.colors),this._rowFactory=U.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((Ce=>this._handleLinkHover(Ce)))),this.register(this._linkifier2.onHideLinkUnderline((Ce=>this._handleLinkLeave(Ce)))),this.register((0,a.toDisposable)((()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const Y=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*Y,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*Y),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/Y),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/Y),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const ne of this._rowElements)ne.style.width=`${this.dimensions.css.canvas.width}px`,ne.style.height=`${this.dimensions.css.cell.height}px`,ne.style.lineHeight=`${this.dimensions.css.cell.height}px`,ne.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const ee=`${this._terminalSelector} .${x} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=ee,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(Y){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let ee=`${this._terminalSelector} .${x} { color: ${Y.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;ee+=`${this._terminalSelector} .${x} .xterm-dim { color: ${h.color.multiplyOpacity(Y.foreground,.5).css};}`,ee+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const ne=`blink_underline_${this._terminalClass}`,te=`blink_bar_${this._terminalClass}`,de=`blink_block_${this._terminalClass}`;ee+=`@keyframes ${ne} { 50% { border-bottom-style: hidden; }}`,ee+=`@keyframes ${te} { 50% { box-shadow: none; }}`,ee+=`@keyframes ${de} { 0% { background-color: ${Y.cursor.css}; color: ${Y.cursorAccent.css}; } 50% { background-color: inherit; color: ${Y.cursor.css}; }}`,ee+=`${this._terminalSelector} .${x}.${T} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${x}.${T} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${te} 1s step-end infinite;}${this._terminalSelector} .${x}.${T} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${de} 1s step-end infinite;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block { background-color: ${Y.cursor.css}; color: ${Y.cursorAccent.css};}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${Y.cursor.css} !important; color: ${Y.cursorAccent.css} !important;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${Y.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${Y.cursor.css} inset;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${Y.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,ee+=`${this._terminalSelector} .${M} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${M} div { position: absolute; background-color: ${Y.selectionBackgroundOpaque.css};}${this._terminalSelector} .${M} div { position: absolute; background-color: ${Y.selectionInactiveBackgroundOpaque.css};}`;for(const[ce,B]of Y.ansi.entries())ee+=`${this._terminalSelector} .${k}${ce} { color: ${B.css}; }${this._terminalSelector} .${k}${ce}.xterm-dim { color: ${h.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${y}${ce} { background-color: ${B.css}; }`;ee+=`${this._terminalSelector} .${k}${w.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(Y.background).css}; }${this._terminalSelector} .${k}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(Y.background),.5).css}; }${this._terminalSelector} .${y}${w.INVERTED_DEFAULT_COLOR} { background-color: ${Y.foreground.css}; }`,this._themeStyleElement.textContent=ee}_setDefaultSpacing(){const Y=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${Y}px`,this._rowFactory.defaultSpacing=Y}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(Y,ee){for(let ne=this._rowElements.length;ne<=ee;ne++){const te=this._document.createElement("div");this._rowContainer.appendChild(te),this._rowElements.push(te)}for(;this._rowElements.length>ee;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(Y,ee){this._refreshRowElements(Y,ee),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(T),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(T),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(Y,ee,ne){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(Y,ee,ne),this.renderRows(0,this._bufferService.rows-1),!Y||!ee)return;this._selectionRenderModel.update(this._terminal,Y,ee,ne);const te=this._selectionRenderModel.viewportStartRow,de=this._selectionRenderModel.viewportEndRow,ce=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(ce>=this._bufferService.rows||B<0)return;const U=this._document.createDocumentFragment();if(ne){const L=Y[0]>ee[0];U.appendChild(this._createSelectionElement(ce,L?ee[0]:Y[0],L?Y[0]:ee[0],B-ce+1))}else{const L=te===ce?Y[0]:0,q=ce===de?ee[0]:this._bufferService.cols;U.appendChild(this._createSelectionElement(ce,L,q));const ue=B-ce-1;if(U.appendChild(this._createSelectionElement(ce+1,0,this._bufferService.cols,ue)),ce!==B){const pe=de===B?ee[0]:this._bufferService.cols;U.appendChild(this._createSelectionElement(B,0,pe))}}this._selectionContainer.appendChild(U)}_createSelectionElement(Y,ee,ne,te=1){const de=this._document.createElement("div"),ce=ee*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(ne-ee);return ce+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-ce),de.style.height=te*this.dimensions.css.cell.height+"px",de.style.top=Y*this.dimensions.css.cell.height+"px",de.style.left=`${ce}px`,de.style.width=`${B}px`,de}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const Y of this._rowElements)Y.replaceChildren()}renderRows(Y,ee){const ne=this._bufferService.buffer,te=ne.ybase+ne.y,de=Math.min(ne.x,this._bufferService.cols-1),ce=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,U=this._optionsService.rawOptions.cursorInactiveStyle;for(let L=Y;L<=ee;L++){const q=L+ne.ydisp,ue=this._rowElements[L],pe=ne.lines.get(q);if(!ue||!pe)break;ue.replaceChildren(...this._rowFactory.createRow(pe,q,q===te,B,U,de,ce,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(Y){this._setCellUnderline(Y.x1,Y.x2,Y.y1,Y.y2,Y.cols,!0)}_handleLinkLeave(Y){this._setCellUnderline(Y.x1,Y.x2,Y.y1,Y.y2,Y.cols,!1)}_setCellUnderline(Y,ee,ne,te,de,ce){ne<0&&(Y=0),te<0&&(ee=0);const B=this._bufferService.rows-1;ne=Math.max(Math.min(ne,B),0),te=Math.max(Math.min(te,B),0),de=Math.min(de,this._bufferService.cols);const U=this._bufferService.buffer,L=U.ybase+U.y,q=Math.min(U.x,de-1),ue=this._optionsService.rawOptions.cursorBlink,pe=this._optionsService.rawOptions.cursorStyle,ve=this._optionsService.rawOptions.cursorInactiveStyle;for(let Ce=ne;Ce<=te;++Ce){const F=Ce+U.ydisp,V=this._rowElements[Ce],me=U.lines.get(F);if(!V||!me)break;V.replaceChildren(...this._rowFactory.createRow(me,F,F===L,pe,ve,q,ue,this.dimensions.css.cell.width,this._widthCache,ce?Ce===ne?Y:0:-1,ce?(Ce===te?ee:de)-1:-1))}}};l.DomRenderer=z=_([S(7,v.IInstantiationService),S(8,u.ICharSizeService),S(9,v.IOptionsService),S(10,v.IBufferService),S(11,u.ICoreBrowserService),S(12,u.IThemeService)],z)},3787:function(I,l,p){var _=this&&this.__decorate||function(x,k,y,T){var M,j=arguments.length,z=j<3?k:T===null?T=Object.getOwnPropertyDescriptor(k,y):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,k,y,T);else for(var Y=x.length-1;Y>=0;Y--)(M=x[Y])&&(z=(j<3?M(z):j>3?M(k,y,z):M(k,y))||z);return j>3&&z&&Object.defineProperty(k,y,z),z},S=this&&this.__param||function(x,k){return function(y,T){k(y,T,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRendererRowFactory=void 0;const f=p(2223),m=p(643),w=p(511),C=p(2585),g=p(8055),u=p(4725),h=p(4269),o=p(6171),a=p(3734);let v=l.DomRendererRowFactory=class{constructor(x,k,y,T,M,j,z){this._document=x,this._characterJoinerService=k,this._optionsService=y,this._coreBrowserService=T,this._coreService=M,this._decorationService=j,this._themeService=z,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(x,k,y){this._selectionStart=x,this._selectionEnd=k,this._columnSelectMode=y}createRow(x,k,y,T,M,j,z,Y,ee,ne,te){const de=[],ce=this._characterJoinerService.getJoinedCharacters(k),B=this._themeService.colors;let U,L=x.getNoBgTrimmedLength();y&&L<j+1&&(L=j+1);let q=0,ue="",pe=0,ve=0,Ce=0,F=!1,V=0,me=!1,oe=0;const ae=[],ye=ne!==-1&&te!==-1;for(let be=0;be<L;be++){x.loadCell(be,this._workCell);let Ue=this._workCell.getWidth();if(Ue===0)continue;let Ie=!1,Le=be,ke=this._workCell;if(ce.length>0&&be===ce[0][0]){Ie=!0;const ht=ce.shift();ke=new h.JoinedCellData(this._workCell,x.translateToString(!0,ht[0],ht[1]),ht[1]-ht[0]),Le=ht[1]-1,Ue=ke.getWidth()}const jt=this._isCellInSelection(be,k),zi=y&&be===j,De=ye&&be>=ne&&be<=te;let Nt=!1;this._decorationService.forEachDecorationAtCell(be,k,void 0,(ht=>{Nt=!0}));let ge=ke.getChars()||m.WHITESPACE_CELL_CHAR;if(ge===" "&&(ke.isUnderline()||ke.isOverline())&&(ge=" "),oe=Ue*Y-ee.get(ge,ke.isBold(),ke.isItalic()),U){if(q&&(jt&&me||!jt&&!me&&ke.bg===pe)&&(jt&&me&&B.selectionForeground||ke.fg===ve)&&ke.extended.ext===Ce&&De===F&&oe===V&&!zi&&!Ie&&!Nt){ke.isInvisible()?ue+=m.WHITESPACE_CELL_CHAR:ue+=ge,q++;continue}q&&(U.textContent=ue),U=this._document.createElement("span"),q=0,ue=""}else U=this._document.createElement("span");if(pe=ke.bg,ve=ke.fg,Ce=ke.extended.ext,F=De,V=oe,me=jt,Ie&&j>=be&&j<=Le&&(j=be),!this._coreService.isCursorHidden&&zi&&this._coreService.isCursorInitialized){if(ae.push("xterm-cursor"),this._coreBrowserService.isFocused)z&&ae.push("xterm-cursor-blink"),ae.push(T==="bar"?"xterm-cursor-bar":T==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(M)switch(M){case"outline":ae.push("xterm-cursor-outline");break;case"block":ae.push("xterm-cursor-block");break;case"bar":ae.push("xterm-cursor-bar");break;case"underline":ae.push("xterm-cursor-underline")}}if(ke.isBold()&&ae.push("xterm-bold"),ke.isItalic()&&ae.push("xterm-italic"),ke.isDim()&&ae.push("xterm-dim"),ue=ke.isInvisible()?m.WHITESPACE_CELL_CHAR:ke.getChars()||m.WHITESPACE_CELL_CHAR,ke.isUnderline()&&(ae.push(`xterm-underline-${ke.extended.underlineStyle}`),ue===" "&&(ue=" "),!ke.isUnderlineColorDefault()))if(ke.isUnderlineColorRGB())U.style.textDecorationColor=`rgb(${a.AttributeData.toColorRGB(ke.getUnderlineColor()).join(",")})`;else{let ht=ke.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ke.isBold()&&ht<8&&(ht+=8),U.style.textDecorationColor=B.ansi[ht].css}ke.isOverline()&&(ae.push("xterm-overline"),ue===" "&&(ue=" ")),ke.isStrikethrough()&&ae.push("xterm-strikethrough"),De&&(U.style.textDecoration="underline");let Be=ke.getFgColor(),Ze=ke.getFgColorMode(),ze=ke.getBgColor(),We=ke.getBgColorMode();const ut=!!ke.isInverse();if(ut){const ht=Be;Be=ze,ze=ht;const bs=Ze;Ze=We,We=bs}let ct,bt,wt,Mt=!1;switch(this._decorationService.forEachDecorationAtCell(be,k,void 0,(ht=>{ht.options.layer!=="top"&&Mt||(ht.backgroundColorRGB&&(We=50331648,ze=ht.backgroundColorRGB.rgba>>8&16777215,ct=ht.backgroundColorRGB),ht.foregroundColorRGB&&(Ze=50331648,Be=ht.foregroundColorRGB.rgba>>8&16777215,bt=ht.foregroundColorRGB),Mt=ht.options.layer==="top")})),!Mt&&jt&&(ct=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,ze=ct.rgba>>8&16777215,We=50331648,Mt=!0,B.selectionForeground&&(Ze=50331648,Be=B.selectionForeground.rgba>>8&16777215,bt=B.selectionForeground)),Mt&&ae.push("xterm-decoration-top"),We){case 16777216:case 33554432:wt=B.ansi[ze],ae.push(`xterm-bg-${ze}`);break;case 50331648:wt=g.channels.toColor(ze>>16,ze>>8&255,255&ze),this._addStyle(U,`background-color:#${E((ze>>>0).toString(16),"0",6)}`);break;default:ut?(wt=B.foreground,ae.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):wt=B.background}switch(ct||ke.isDim()&&(ct=g.color.multiplyOpacity(wt,.5)),Ze){case 16777216:case 33554432:ke.isBold()&&Be<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Be+=8),this._applyMinimumContrast(U,wt,B.ansi[Be],ke,ct,void 0)||ae.push(`xterm-fg-${Be}`);break;case 50331648:const ht=g.channels.toColor(Be>>16&255,Be>>8&255,255&Be);this._applyMinimumContrast(U,wt,ht,ke,ct,bt)||this._addStyle(U,`color:#${E(Be.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(U,wt,B.foreground,ke,ct,bt)||ut&&ae.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ae.length&&(U.className=ae.join(" "),ae.length=0),zi||Ie||Nt?U.textContent=ue:q++,oe!==this.defaultSpacing&&(U.style.letterSpacing=`${oe}px`),de.push(U),be=Le}return U&&q&&(U.textContent=ue),de}_applyMinimumContrast(x,k,y,T,M,j){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(T.getCode()))return!1;const z=this._getContrastCache(T);let Y;if(M||j||(Y=z.getColor(k.rgba,y.rgba)),Y===void 0){const ee=this._optionsService.rawOptions.minimumContrastRatio/(T.isDim()?2:1);Y=g.color.ensureContrastRatio(M||k,j||y,ee),z.setColor((M||k).rgba,(j||y).rgba,Y??null)}return!!Y&&(this._addStyle(x,`color:${Y.css}`),!0)}_getContrastCache(x){return x.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(x,k){x.setAttribute("style",`${x.getAttribute("style")||""}${k};`)}_isCellInSelection(x,k){const y=this._selectionStart,T=this._selectionEnd;return!(!y||!T)&&(this._columnSelectMode?y[0]<=T[0]?x>=y[0]&&k>=y[1]&&x<T[0]&&k<=T[1]:x<y[0]&&k>=y[1]&&x>=T[0]&&k<=T[1]:k>y[1]&&k<T[1]||y[1]===T[1]&&k===y[1]&&x>=y[0]&&x<T[0]||y[1]<T[1]&&k===T[1]&&x<T[0]||y[1]<T[1]&&k===y[1]&&x>=y[0])}};function E(x,k,y){for(;x.length<y;)x=k+x;return x}l.DomRendererRowFactory=v=_([S(1,u.ICharacterJoinerService),S(2,C.IOptionsService),S(3,u.ICoreBrowserService),S(4,C.ICoreService),S(5,C.IDecorationService),S(6,u.IThemeService)],v)},2550:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WidthCache=void 0,l.WidthCache=class{constructor(p,_){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=p.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const S=p.createElement("span");S.classList.add("xterm-char-measure-element");const f=p.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const m=p.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const w=p.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[S,f,m,w],this._container.appendChild(S),this._container.appendChild(f),this._container.appendChild(m),this._container.appendChild(w),_.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(p,_,S,f){p===this._font&&_===this._fontSize&&S===this._weight&&f===this._weightBold||(this._font=p,this._fontSize=_,this._weight=S,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${S}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${S}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(p,_,S){let f=0;if(!_&&!S&&p.length===1&&(f=p.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const C=this._measure(p,0);return C>0&&(this._flat[f]=C),C}let m=p;_&&(m+="B"),S&&(m+="I");let w=this._holey.get(m);if(w===void 0){let C=0;_&&(C|=1),S&&(C|=2),w=this._measure(p,C),w>0&&this._holey.set(m,w)}return w}_measure(p,_){const S=this._measureElements[_];return S.textContent=p.repeat(32),S.offsetWidth/32}}},2223:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.TEXT_BASELINE=l.DIM_OPACITY=l.INVERTED_DEFAULT_COLOR=void 0;const _=p(6114);l.INVERTED_DEFAULT_COLOR=257,l.DIM_OPACITY=.5,l.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:(I,l)=>{function p(S){return 57508<=S&&S<=57558}function _(S){return S>=128512&&S<=128591||S>=127744&&S<=128511||S>=128640&&S<=128767||S>=9728&&S<=9983||S>=9984&&S<=10175||S>=65024&&S<=65039||S>=129280&&S<=129535||S>=127462&&S<=127487}Object.defineProperty(l,"__esModule",{value:!0}),l.computeNextVariantOffset=l.createRenderDimensions=l.treatGlyphAsBackgroundColor=l.allowRescaling=l.isEmoji=l.isRestrictedPowerlineGlyph=l.isPowerlineGlyph=l.throwIfFalsy=void 0,l.throwIfFalsy=function(S){if(!S)throw new Error("value must not be falsy");return S},l.isPowerlineGlyph=p,l.isRestrictedPowerlineGlyph=function(S){return 57520<=S&&S<=57527},l.isEmoji=_,l.allowRescaling=function(S,f,m,w){return f===1&&m>Math.ceil(1.5*w)&&S!==void 0&&S>255&&!_(S)&&!p(S)&&!(function(C){return 57344<=C&&C<=63743})(S)},l.treatGlyphAsBackgroundColor=function(S){return p(S)||(function(f){return 9472<=f&&f<=9631})(S)},l.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},l.computeNextVariantOffset=function(S,f,m=0){return(S-(2*Math.round(f)-m))%(2*Math.round(f))}},6052:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.createSelectionRenderModel=void 0;class p{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(S,f,m,w=!1){if(this.selectionStart=f,this.selectionEnd=m,!f||!m||f[0]===m[0]&&f[1]===m[1])return void this.clear();const C=S.buffers.active.ydisp,g=f[1]-C,u=m[1]-C,h=Math.max(g,0),o=Math.min(u,S.rows-1);h>=S.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=g,this.viewportEndRow=u,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=f[0],this.endCol=m[0])}isCellSelected(S,f,m){return!!this.hasSelection&&(m-=S.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&m>=this.viewportCappedStartRow&&f<this.endCol&&m<=this.viewportCappedEndRow:f<this.startCol&&m>=this.viewportCappedStartRow&&f>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&f>=this.startCol)}}l.createSelectionRenderModel=function(){return new p}},456:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionModel=void 0,l.SelectionModel=class{constructor(p){this._bufferService=p,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const p=this.selectionStart[0]+this.selectionStartLength;return p>this._bufferService.cols?p%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(p/this._bufferService.cols)-1]:[p%this._bufferService.cols,this.selectionStart[1]+Math.floor(p/this._bufferService.cols)]:[p,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const p=this.selectionStart[0]+this.selectionStartLength;return p>this._bufferService.cols?[p%this._bufferService.cols,this.selectionStart[1]+Math.floor(p/this._bufferService.cols)]:[Math.max(p,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const p=this.selectionStart,_=this.selectionEnd;return!(!p||!_)&&(p[1]>_[1]||p[1]===_[1]&&p[0]>_[0])}handleTrim(p){return this.selectionStart&&(this.selectionStart[1]-=p),this.selectionEnd&&(this.selectionEnd[1]-=p),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(I,l,p){var _=this&&this.__decorate||function(o,a,v,E){var x,k=arguments.length,y=k<3?a:E===null?E=Object.getOwnPropertyDescriptor(a,v):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,a,v,E);else for(var T=o.length-1;T>=0;T--)(x=o[T])&&(y=(k<3?x(y):k>3?x(a,v,y):x(a,v))||y);return k>3&&y&&Object.defineProperty(a,v,y),y},S=this&&this.__param||function(o,a){return function(v,E){a(v,E,o)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharSizeService=void 0;const f=p(2585),m=p(8460),w=p(844);let C=l.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,a,v){super(),this._optionsService=v,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new u(o,a,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};l.CharSizeService=C=_([S(2,f.IOptionsService)],C);class g extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(a,v){a!==void 0&&a>0&&v!==void 0&&v>0&&(this._result.width=a,this._result.height=v)}}class u extends g{constructor(a,v,E){super(),this._document=a,this._parentElement=v,this._optionsService=E,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class h extends g{constructor(a){super(),this._optionsService=a,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const v=this._ctx.measureText("W");if(!("width"in v&&"fontBoundingBoxAscent"in v&&"fontBoundingBoxDescent"in v))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const a=this._ctx.measureText("W");return this._validateAndSet(a.width,a.fontBoundingBoxAscent+a.fontBoundingBoxDescent),this._result}}},4269:function(I,l,p){var _=this&&this.__decorate||function(h,o,a,v){var E,x=arguments.length,k=x<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,a):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(h,o,a,v);else for(var y=h.length-1;y>=0;y--)(E=h[y])&&(k=(x<3?E(k):x>3?E(o,a,k):E(o,a))||k);return x>3&&k&&Object.defineProperty(o,a,k),k},S=this&&this.__param||function(h,o){return function(a,v){o(a,v,h)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharacterJoinerService=l.JoinedCellData=void 0;const f=p(3734),m=p(643),w=p(511),C=p(2585);class g extends f.AttributeData{constructor(o,a,v){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=a,this._width=v}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.JoinedCellData=g;let u=l.CharacterJoinerService=class ly{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(o){const a={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(a),a.id}deregister(o){for(let a=0;a<this._characterJoiners.length;a++)if(this._characterJoiners[a].id===o)return this._characterJoiners.splice(a,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const a=this._bufferService.buffer.lines.get(o);if(!a||a.length===0)return[];const v=[],E=a.translateToString(!0);let x=0,k=0,y=0,T=a.getFg(0),M=a.getBg(0);for(let j=0;j<a.getTrimmedLength();j++)if(a.loadCell(j,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==T||this._workCell.bg!==M){if(j-x>1){const z=this._getJoinedRanges(E,y,k,a,x);for(let Y=0;Y<z.length;Y++)v.push(z[Y])}x=j,y=k,T=this._workCell.fg,M=this._workCell.bg}k+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-x>1){const j=this._getJoinedRanges(E,y,k,a,x);for(let z=0;z<j.length;z++)v.push(j[z])}return v}_getJoinedRanges(o,a,v,E,x){const k=o.substring(a,v);let y=[];try{y=this._characterJoiners[0].handler(k)}catch(T){console.error(T)}for(let T=1;T<this._characterJoiners.length;T++)try{const M=this._characterJoiners[T].handler(k);for(let j=0;j<M.length;j++)ly._mergeRanges(y,M[j])}catch(M){console.error(M)}return this._stringRangesToCellRanges(y,E,x),y}_stringRangesToCellRanges(o,a,v){let E=0,x=!1,k=0,y=o[E];if(y){for(let T=v;T<this._bufferService.cols;T++){const M=a.getWidth(T),j=a.getString(T).length||m.WHITESPACE_CELL_CHAR.length;if(M!==0){if(!x&&y[0]<=k&&(y[0]=T,x=!0),y[1]<=k){if(y[1]=T,y=o[++E],!y)break;y[0]<=k?(y[0]=T,x=!0):x=!1}k+=j}}y&&(y[1]=this._bufferService.cols)}}static _mergeRanges(o,a){let v=!1;for(let E=0;E<o.length;E++){const x=o[E];if(v){if(a[1]<=x[0])return o[E-1][1]=a[1],o;if(a[1]<=x[1])return o[E-1][1]=Math.max(a[1],x[1]),o.splice(E,1),o;o.splice(E,1),E--}else{if(a[1]<=x[0])return o.splice(E,0,a),o;if(a[1]<=x[1])return x[0]=Math.min(a[0],x[0]),o;a[0]<x[1]&&(x[0]=Math.min(a[0],x[0]),v=!0)}}return v?o[o.length-1][1]=a[1]:o.push(a),o}};l.CharacterJoinerService=u=_([S(0,C.IBufferService)],u)},5114:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreBrowserService=void 0;const _=p(844),S=p(8460),f=p(3656);class m extends _.Disposable{constructor(g,u,h){super(),this._textarea=g,this._window=u,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new S.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new S.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,S.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(g){this._window!==g&&(this._window=g,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}}l.CoreBrowserService=m;class w extends _.Disposable{constructor(g){super(),this._parentWindow=g,this._windowResizeListener=this.register(new _.MutableDisposable),this._onDprChange=this.register(new S.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,_.toDisposable)((()=>this.clearListener())))}setWindow(g){this._parentWindow=g,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)==null||g.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.LinkProviderService=void 0;const _=p(844);class S extends _.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,_.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const w=this.linkProviders.indexOf(m);w!==-1&&this.linkProviders.splice(w,1)}}}}l.LinkProviderService=S},8934:function(I,l,p){var _=this&&this.__decorate||function(C,g,u,h){var o,a=arguments.length,v=a<3?g:h===null?h=Object.getOwnPropertyDescriptor(g,u):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(C,g,u,h);else for(var E=C.length-1;E>=0;E--)(o=C[E])&&(v=(a<3?o(v):a>3?o(g,u,v):o(g,u))||v);return a>3&&v&&Object.defineProperty(g,u,v),v},S=this&&this.__param||function(C,g){return function(u,h){g(u,h,C)}};Object.defineProperty(l,"__esModule",{value:!0}),l.MouseService=void 0;const f=p(4725),m=p(9806);let w=l.MouseService=class{constructor(C,g){this._renderService=C,this._charSizeService=g}getCoords(C,g,u,h,o){return(0,m.getCoords)(window,C,g,u,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(C,g){const u=(0,m.getCoordsRelativeToElement)(window,C,g);if(this._charSizeService.hasValidSize)return u[0]=Math.min(Math.max(u[0],0),this._renderService.dimensions.css.canvas.width-1),u[1]=Math.min(Math.max(u[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(u[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(u[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(u[0]),y:Math.floor(u[1])}}};l.MouseService=w=_([S(0,f.IRenderService),S(1,f.ICharSizeService)],w)},3230:function(I,l,p){var _=this&&this.__decorate||function(o,a,v,E){var x,k=arguments.length,y=k<3?a:E===null?E=Object.getOwnPropertyDescriptor(a,v):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,a,v,E);else for(var T=o.length-1;T>=0;T--)(x=o[T])&&(y=(k<3?x(y):k>3?x(a,v,y):x(a,v))||y);return k>3&&y&&Object.defineProperty(a,v,y),y},S=this&&this.__param||function(o,a){return function(v,E){a(v,E,o)}};Object.defineProperty(l,"__esModule",{value:!0}),l.RenderService=void 0;const f=p(6193),m=p(4725),w=p(8460),C=p(844),g=p(7226),u=p(2585);let h=l.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,a,v,E,x,k,y,T){super(),this._rowCount=o,this._charSizeService=E,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new g.DebouncedIdleTask,this._observerDisposable=this.register(new C.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((M,j)=>this._renderRows(M,j)),y),this.register(this._renderDebouncer),this.register(y.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(k.onResize((()=>this._fullRefresh()))),this.register(k.buffers.onBufferActivate((()=>{var M;return(M=this._renderer.value)==null?void 0:M.clear()}))),this.register(v.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(x.onDecorationRegistered((()=>this._fullRefresh()))),this.register(x.onDecorationRemoved((()=>this._fullRefresh()))),this.register(v.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(k.cols,k.rows),this._fullRefresh()}))),this.register(v.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(k.buffer.y,k.buffer.y,!0)))),this.register(T.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(y.window,a),this.register(y.onWindowChange((M=>this._registerIntersectionObserver(M,a))))}_registerIntersectionObserver(o,a){if("IntersectionObserver"in o){const v=new o.IntersectionObserver((E=>this._handleIntersectionChange(E[E.length-1])),{threshold:0});v.observe(a),this._observerDisposable.value=(0,C.toDisposable)((()=>v.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,a,v=!1){this._isPaused?this._needsFullRefresh=!0:(v||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,a,this._rowCount))}_renderRows(o,a){this._renderer.value&&(o=Math.min(o,this._rowCount-1),a=Math.min(a,this._rowCount-1),this._renderer.value.renderRows(o,a),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:a}),this._onRender.fire({start:o,end:a}),this._isNextRenderRedrawOnly=!0)}resize(o,a){this._rowCount=a,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((a=>this.refreshRows(a.start,a.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,a;this._renderer.value&&((a=(o=this._renderer.value).clearTextureAtlas)==null||a.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,a){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var v;return(v=this._renderer.value)==null?void 0:v.handleResize(o,a)})):this._renderer.value.handleResize(o,a),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,a,v){var E;this._selectionState.start=o,this._selectionState.end=a,this._selectionState.columnSelectMode=v,(E=this._renderer.value)==null||E.handleSelectionChanged(o,a,v)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};l.RenderService=h=_([S(2,u.IOptionsService),S(3,m.ICharSizeService),S(4,u.IDecorationService),S(5,u.IBufferService),S(6,m.ICoreBrowserService),S(7,m.IThemeService)],h)},9312:function(I,l,p){var _=this&&this.__decorate||function(y,T,M,j){var z,Y=arguments.length,ee=Y<3?T:j===null?j=Object.getOwnPropertyDescriptor(T,M):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(y,T,M,j);else for(var ne=y.length-1;ne>=0;ne--)(z=y[ne])&&(ee=(Y<3?z(ee):Y>3?z(T,M,ee):z(T,M))||ee);return Y>3&&ee&&Object.defineProperty(T,M,ee),ee},S=this&&this.__param||function(y,T){return function(M,j){T(M,j,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionService=void 0;const f=p(9806),m=p(9504),w=p(456),C=p(4725),g=p(8460),u=p(844),h=p(6114),o=p(4841),a=p(511),v=p(2585),E=" ",x=new RegExp(E,"g");let k=l.SelectionService=class extends u.Disposable{constructor(y,T,M,j,z,Y,ee,ne,te){super(),this._element=y,this._screenElement=T,this._linkifier=M,this._bufferService=j,this._coreService=z,this._mouseService=Y,this._optionsService=ee,this._renderService=ne,this._coreBrowserService=te,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new a.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new g.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new g.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=de=>this._handleMouseMove(de),this._mouseUpListener=de=>this._handleMouseUp(de),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((de=>this._handleTrim(de))),this.register(this._bufferService.buffers.onBufferActivate((de=>this._handleBufferActivate(de)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,u.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const y=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!(!y||!T||y[0]===T[0]&&y[1]===T[1])}get selectionText(){const y=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;if(!y||!T)return"";const M=this._bufferService.buffer,j=[];if(this._activeSelectionMode===3){if(y[0]===T[0])return"";const z=y[0]<T[0]?y[0]:T[0],Y=y[0]<T[0]?T[0]:y[0];for(let ee=y[1];ee<=T[1];ee++){const ne=M.translateBufferLineToString(ee,!0,z,Y);j.push(ne)}}else{const z=y[1]===T[1]?T[0]:void 0;j.push(M.translateBufferLineToString(y[1],!0,y[0],z));for(let Y=y[1]+1;Y<=T[1]-1;Y++){const ee=M.lines.get(Y),ne=M.translateBufferLineToString(Y,!0);ee!=null&&ee.isWrapped?j[j.length-1]+=ne:j.push(ne)}if(y[1]!==T[1]){const Y=M.lines.get(T[1]),ee=M.translateBufferLineToString(T[1],!0,0,T[0]);Y&&Y.isWrapped?j[j.length-1]+=ee:j.push(ee)}}return j.map((z=>z.replace(x," "))).join(h.isWindows?`\r
|
|
280
|
-
`:`
|
|
281
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(y){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&y&&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(y){const T=this._getMouseBufferCoords(y),M=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!!(M&&j&&T)&&this._areCoordsInSelection(T,M,j)}isCellInSelection(y,T){const M=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!M||!j)&&this._areCoordsInSelection([y,T],M,j)}_areCoordsInSelection(y,T,M){return y[1]>T[1]&&y[1]<M[1]||T[1]===M[1]&&y[1]===T[1]&&y[0]>=T[0]&&y[0]<M[0]||T[1]<M[1]&&y[1]===M[1]&&y[0]<M[0]||T[1]<M[1]&&y[1]===T[1]&&y[0]>=T[0]}_selectWordAtCursor(y,T){var z,Y;const M=(Y=(z=this._linkifier.currentLink)==null?void 0:z.link)==null?void 0:Y.range;if(M)return this._model.selectionStart=[M.start.x-1,M.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(M,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const j=this._getMouseBufferCoords(y);return!!j&&(this._selectWordAt(j,T),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(y,T){this._model.clearSelection(),y=Math.max(y,0),T=Math.min(T,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,y],this._model.selectionEnd=[this._bufferService.cols,T],this.refresh(),this._onSelectionChange.fire()}_handleTrim(y){this._model.handleTrim(y)&&this.refresh()}_getMouseBufferCoords(y){const T=this._mouseService.getCoords(y,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(T)return T[0]--,T[1]--,T[1]+=this._bufferService.buffer.ydisp,T}_getMouseEventScrollAmount(y){let T=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,y,this._screenElement)[1];const M=this._renderService.dimensions.css.canvas.height;return T>=0&&T<=M?0:(T>M&&(T-=M),T=Math.min(Math.max(T,-50),50),T/=50,T/Math.abs(T)+Math.round(14*T))}shouldForceSelection(y){return h.isMac?y.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:y.shiftKey}handleMouseDown(y){if(this._mouseDownTimeStamp=y.timeStamp,(y.button!==2||!this.hasSelection)&&y.button===0){if(!this._enabled){if(!this.shouldForceSelection(y))return;y.stopPropagation()}y.preventDefault(),this._dragScrollAmount=0,this._enabled&&y.shiftKey?this._handleIncrementalClick(y):y.detail===1?this._handleSingleClick(y):y.detail===2?this._handleDoubleClick(y):y.detail===3&&this._handleTripleClick(y),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(y){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(y))}_handleSingleClick(y){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(y)?3:0,this._model.selectionStart=this._getMouseBufferCoords(y),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const 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(y){this._selectWordAtCursor(y,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(y){const T=this._getMouseBufferCoords(y);T&&(this._activeSelectionMode=2,this._selectLineAt(T[1]))}shouldColumnSelect(y){return y.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(y){if(y.stopImmediatePropagation(),!this._model.selectionStart)return;const T=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(y),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(y),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const M=this._bufferService.buffer;if(this._model.selectionEnd[1]<M.lines.length){const j=M.lines.get(this._model.selectionEnd[1]);j&&j.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});const y=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(y.ydisp+this._bufferService.rows,y.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=y.ydisp),this.refresh()}}_handleMouseUp(y){const T=y.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&T<500&&y.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const M=this._mouseService.getCoords(y,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(M&&M[0]!==void 0&&M[1]!==void 0){const j=(0,m.moveToCellSequence)(M[0]-1,M[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(j,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const y=this._model.finalSelectionStart,T=this._model.finalSelectionEnd,M=!(!y||!T||y[0]===T[0]&&y[1]===T[1]);M?y&&T&&(this._oldSelectionStart&&this._oldSelectionEnd&&y[0]===this._oldSelectionStart[0]&&y[1]===this._oldSelectionStart[1]&&T[0]===this._oldSelectionEnd[0]&&T[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(y,T,M)):this._oldHasSelection&&this._fireOnSelectionChange(y,T,M)}_fireOnSelectionChange(y,T,M){this._oldSelectionStart=y,this._oldSelectionEnd=T,this._oldHasSelection=M,this._onSelectionChange.fire()}_handleBufferActivate(y){this.clearSelection(),this._trimListener.dispose(),this._trimListener=y.activeBuffer.lines.onTrim((T=>this._handleTrim(T)))}_convertViewportColToCharacterIndex(y,T){let M=T;for(let j=0;T>=j;j++){const z=y.loadCell(j,this._workCell).getChars().length;this._workCell.getWidth()===0?M--:z>1&&T!==j&&(M+=z-1)}return M}setSelection(y,T,M){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[y,T],this._model.selectionStartLength=M,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(y){this._isClickInSelection(y)||(this._selectWordAtCursor(y,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(y,T,M=!0,j=!0){if(y[0]>=this._bufferService.cols)return;const z=this._bufferService.buffer,Y=z.lines.get(y[1]);if(!Y)return;const ee=z.translateBufferLineToString(y[1],!1);let ne=this._convertViewportColToCharacterIndex(Y,y[0]),te=ne;const de=y[0]-ne;let ce=0,B=0,U=0,L=0;if(ee.charAt(ne)===" "){for(;ne>0&&ee.charAt(ne-1)===" ";)ne--;for(;te<ee.length&&ee.charAt(te+1)===" ";)te++}else{let pe=y[0],ve=y[0];Y.getWidth(pe)===0&&(ce++,pe--),Y.getWidth(ve)===2&&(B++,ve++);const Ce=Y.getString(ve).length;for(Ce>1&&(L+=Ce-1,te+=Ce-1);pe>0&&ne>0&&!this._isCharWordSeparator(Y.loadCell(pe-1,this._workCell));){Y.loadCell(pe-1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===0?(ce++,pe--):F>1&&(U+=F-1,ne-=F-1),ne--,pe--}for(;ve<Y.length&&te+1<ee.length&&!this._isCharWordSeparator(Y.loadCell(ve+1,this._workCell));){Y.loadCell(ve+1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===2?(B++,ve++):F>1&&(L+=F-1,te+=F-1),te++,ve++}}te++;let q=ne+de-ce+U,ue=Math.min(this._bufferService.cols,te-ne+ce+B-U-L);if(T||ee.slice(ne,te).trim()!==""){if(M&&q===0&&Y.getCodePoint(0)!==32){const pe=z.lines.get(y[1]-1);if(pe&&Y.isWrapped&&pe.getCodePoint(this._bufferService.cols-1)!==32){const ve=this._getWordAt([this._bufferService.cols-1,y[1]-1],!1,!0,!1);if(ve){const Ce=this._bufferService.cols-ve.start;q-=Ce,ue+=Ce}}}if(j&&q+ue===this._bufferService.cols&&Y.getCodePoint(this._bufferService.cols-1)!==32){const pe=z.lines.get(y[1]+1);if(pe!=null&&pe.isWrapped&&pe.getCodePoint(0)!==32){const ve=this._getWordAt([0,y[1]+1],!1,!1,!0);ve&&(ue+=ve.length)}}return{start:q,length:ue}}}_selectWordAt(y,T){const M=this._getWordAt(y,T);if(M){for(;M.start<0;)M.start+=this._bufferService.cols,y[1]--;this._model.selectionStart=[M.start,y[1]],this._model.selectionStartLength=M.length}}_selectToWordAt(y){const T=this._getWordAt(y,!0);if(T){let M=y[1];for(;T.start<0;)T.start+=this._bufferService.cols,M--;if(!this._model.areSelectionValuesReversed())for(;T.start+T.length>this._bufferService.cols;)T.length-=this._bufferService.cols,M++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?T.start:T.start+T.length,M]}}_isCharWordSeparator(y){return y.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(y.getChars())>=0}_selectLineAt(y){const T=this._bufferService.buffer.getWrappedRangeForLine(y),M={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=(0,o.getRangeLength)(M,this._bufferService.cols)}};l.SelectionService=k=_([S(3,v.IBufferService),S(4,v.ICoreService),S(5,C.IMouseService),S(6,v.IOptionsService),S(7,C.IRenderService),S(8,C.ICoreBrowserService)],k)},4725:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ILinkProviderService=l.IThemeService=l.ICharacterJoinerService=l.ISelectionService=l.IRenderService=l.IMouseService=l.ICoreBrowserService=l.ICharSizeService=void 0;const _=p(8343);l.ICharSizeService=(0,_.createDecorator)("CharSizeService"),l.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),l.IMouseService=(0,_.createDecorator)("MouseService"),l.IRenderService=(0,_.createDecorator)("RenderService"),l.ISelectionService=(0,_.createDecorator)("SelectionService"),l.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),l.IThemeService=(0,_.createDecorator)("ThemeService"),l.ILinkProviderService=(0,_.createDecorator)("LinkProviderService")},6731:function(I,l,p){var _=this&&this.__decorate||function(k,y,T,M){var j,z=arguments.length,Y=z<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,T):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(k,y,T,M);else for(var ee=k.length-1;ee>=0;ee--)(j=k[ee])&&(Y=(z<3?j(Y):z>3?j(y,T,Y):j(y,T))||Y);return z>3&&Y&&Object.defineProperty(y,T,Y),Y},S=this&&this.__param||function(k,y){return function(T,M){y(T,M,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.ThemeService=l.DEFAULT_ANSI_COLORS=void 0;const f=p(7239),m=p(8055),w=p(8460),C=p(844),g=p(2585),u=m.css.toColor("#ffffff"),h=m.css.toColor("#000000"),o=m.css.toColor("#ffffff"),a=m.css.toColor("#000000"),v={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};l.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const k=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],y=[0,95,135,175,215,255];for(let T=0;T<216;T++){const M=y[T/36%6|0],j=y[T/6%6|0],z=y[T%6];k.push({css:m.channels.toCss(M,j,z),rgba:m.channels.toRgba(M,j,z)})}for(let T=0;T<24;T++){const M=8+10*T;k.push({css:m.channels.toCss(M,M,M),rgba:m.channels.toRgba(M,M,M)})}return k})());let E=l.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:u,background:h,cursor:o,cursorAccent:a,selectionForeground:void 0,selectionBackgroundTransparent:v,selectionBackgroundOpaque:m.color.blend(h,v),selectionInactiveBackgroundTransparent:v,selectionInactiveBackgroundOpaque:m.color.blend(h,v),ansi:l.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(k={}){const y=this._colors;if(y.foreground=x(k.foreground,u),y.background=x(k.background,h),y.cursor=x(k.cursor,o),y.cursorAccent=x(k.cursorAccent,a),y.selectionBackgroundTransparent=x(k.selectionBackground,v),y.selectionBackgroundOpaque=m.color.blend(y.background,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundTransparent=x(k.selectionInactiveBackground,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundOpaque=m.color.blend(y.background,y.selectionInactiveBackgroundTransparent),y.selectionForeground=k.selectionForeground?x(k.selectionForeground,m.NULL_COLOR):void 0,y.selectionForeground===m.NULL_COLOR&&(y.selectionForeground=void 0),m.color.isOpaque(y.selectionBackgroundTransparent)&&(y.selectionBackgroundTransparent=m.color.opacity(y.selectionBackgroundTransparent,.3)),m.color.isOpaque(y.selectionInactiveBackgroundTransparent)&&(y.selectionInactiveBackgroundTransparent=m.color.opacity(y.selectionInactiveBackgroundTransparent,.3)),y.ansi=l.DEFAULT_ANSI_COLORS.slice(),y.ansi[0]=x(k.black,l.DEFAULT_ANSI_COLORS[0]),y.ansi[1]=x(k.red,l.DEFAULT_ANSI_COLORS[1]),y.ansi[2]=x(k.green,l.DEFAULT_ANSI_COLORS[2]),y.ansi[3]=x(k.yellow,l.DEFAULT_ANSI_COLORS[3]),y.ansi[4]=x(k.blue,l.DEFAULT_ANSI_COLORS[4]),y.ansi[5]=x(k.magenta,l.DEFAULT_ANSI_COLORS[5]),y.ansi[6]=x(k.cyan,l.DEFAULT_ANSI_COLORS[6]),y.ansi[7]=x(k.white,l.DEFAULT_ANSI_COLORS[7]),y.ansi[8]=x(k.brightBlack,l.DEFAULT_ANSI_COLORS[8]),y.ansi[9]=x(k.brightRed,l.DEFAULT_ANSI_COLORS[9]),y.ansi[10]=x(k.brightGreen,l.DEFAULT_ANSI_COLORS[10]),y.ansi[11]=x(k.brightYellow,l.DEFAULT_ANSI_COLORS[11]),y.ansi[12]=x(k.brightBlue,l.DEFAULT_ANSI_COLORS[12]),y.ansi[13]=x(k.brightMagenta,l.DEFAULT_ANSI_COLORS[13]),y.ansi[14]=x(k.brightCyan,l.DEFAULT_ANSI_COLORS[14]),y.ansi[15]=x(k.brightWhite,l.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const T=Math.min(y.ansi.length-16,k.extendedAnsi.length);for(let M=0;M<T;M++)y.ansi[M+16]=x(k.extendedAnsi[M],l.DEFAULT_ANSI_COLORS[M+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(k){this._restoreColor(k),this._onChangeColors.fire(this.colors)}_restoreColor(k){if(k!==void 0)switch(k){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[k]=this._restoreColors.ansi[k]}else for(let y=0;y<this._restoreColors.ansi.length;++y)this._colors.ansi[y]=this._restoreColors.ansi[y]}modifyColors(k){k(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function x(k,y){if(k!==void 0)try{return m.css.toColor(k)}catch{}return y}l.ThemeService=E=_([S(0,g.IOptionsService)],E)},6349:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CircularList=void 0;const _=p(8460),S=p(844);class f extends S.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(w){if(this._maxLength===w)return;const C=new Array(w);for(let g=0;g<Math.min(w,this.length);g++)C[g]=this._array[this._getCyclicIndex(g)];this._array=C,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let C=this._length;C<w;C++)this._array[C]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,C){this._array[this._getCyclicIndex(w)]=C}push(w){this._array[this._getCyclicIndex(this._length)]=w,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(w,C,...g){if(C){for(let u=w;u<this._length-C;u++)this._array[this._getCyclicIndex(u)]=this._array[this._getCyclicIndex(u+C)];this._length-=C,this.onDeleteEmitter.fire({index:w,amount:C})}for(let u=this._length-1;u>=w;u--)this._array[this._getCyclicIndex(u+g.length)]=this._array[this._getCyclicIndex(u)];for(let u=0;u<g.length;u++)this._array[this._getCyclicIndex(w+u)]=g[u];if(g.length&&this.onInsertEmitter.fire({index:w,amount:g.length}),this._length+g.length>this._maxLength){const u=this._length+g.length-this._maxLength;this._startIndex+=u,this._length=this._maxLength,this.onTrimEmitter.fire(u)}else this._length+=g.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,C,g){if(!(C<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(let h=C-1;h>=0;h--)this.set(w+h+g,this.get(w+h));const u=w+C+g-this._length;if(u>0)for(this._length+=u;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let u=0;u<C;u++)this.set(w+u+g,this.get(w+u))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}l.CircularList=f},1439:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.clone=void 0,l.clone=function p(_,S=5){if(typeof _!="object")return _;const f=Array.isArray(_)?[]:{};for(const m in _)f[m]=S<=1?_[m]:_[m]&&p(_[m],S-1);return f}},8055:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.contrastRatio=l.toPaddedHex=l.rgba=l.rgb=l.css=l.color=l.channels=l.NULL_COLOR=void 0;let p=0,_=0,S=0,f=0;var m,w,C,g,u;function h(a){const v=a.toString(16);return v.length<2?"0"+v:v}function o(a,v){return a<v?(v+.05)/(a+.05):(a+.05)/(v+.05)}l.NULL_COLOR={css:"#00000000",rgba:0},(function(a){a.toCss=function(v,E,x,k){return k!==void 0?`#${h(v)}${h(E)}${h(x)}${h(k)}`:`#${h(v)}${h(E)}${h(x)}`},a.toRgba=function(v,E,x,k=255){return(v<<24|E<<16|x<<8|k)>>>0},a.toColor=function(v,E,x,k){return{css:a.toCss(v,E,x,k),rgba:a.toRgba(v,E,x,k)}}})(m||(l.channels=m={})),(function(a){function v(E,x){return f=Math.round(255*x),[p,_,S]=u.toChannels(E.rgba),{css:m.toCss(p,_,S,f),rgba:m.toRgba(p,_,S,f)}}a.blend=function(E,x){if(f=(255&x.rgba)/255,f===1)return{css:x.css,rgba:x.rgba};const k=x.rgba>>24&255,y=x.rgba>>16&255,T=x.rgba>>8&255,M=E.rgba>>24&255,j=E.rgba>>16&255,z=E.rgba>>8&255;return p=M+Math.round((k-M)*f),_=j+Math.round((y-j)*f),S=z+Math.round((T-z)*f),{css:m.toCss(p,_,S),rgba:m.toRgba(p,_,S)}},a.isOpaque=function(E){return(255&E.rgba)==255},a.ensureContrastRatio=function(E,x,k){const y=u.ensureContrastRatio(E.rgba,x.rgba,k);if(y)return m.toColor(y>>24&255,y>>16&255,y>>8&255)},a.opaque=function(E){const x=(255|E.rgba)>>>0;return[p,_,S]=u.toChannels(x),{css:m.toCss(p,_,S),rgba:x}},a.opacity=v,a.multiplyOpacity=function(E,x){return f=255&E.rgba,v(E,f*x/255)},a.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}})(w||(l.color=w={})),(function(a){let v,E;try{const x=document.createElement("canvas");x.width=1,x.height=1;const k=x.getContext("2d",{willReadFrequently:!0});k&&(v=k,v.globalCompositeOperation="copy",E=v.createLinearGradient(0,0,1,1))}catch{}a.toColor=function(x){if(x.match(/#[\da-f]{3,8}/i))switch(x.length){case 4:return p=parseInt(x.slice(1,2).repeat(2),16),_=parseInt(x.slice(2,3).repeat(2),16),S=parseInt(x.slice(3,4).repeat(2),16),m.toColor(p,_,S);case 5:return p=parseInt(x.slice(1,2).repeat(2),16),_=parseInt(x.slice(2,3).repeat(2),16),S=parseInt(x.slice(3,4).repeat(2),16),f=parseInt(x.slice(4,5).repeat(2),16),m.toColor(p,_,S,f);case 7:return{css:x,rgba:(parseInt(x.slice(1),16)<<8|255)>>>0};case 9:return{css:x,rgba:parseInt(x.slice(1),16)>>>0}}const k=x.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return p=parseInt(k[1]),_=parseInt(k[2]),S=parseInt(k[3]),f=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),m.toColor(p,_,S,f);if(!v||!E)throw new Error("css.toColor: Unsupported css format");if(v.fillStyle=E,v.fillStyle=x,typeof v.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(v.fillRect(0,0,1,1),[p,_,S,f]=v.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(p,_,S,f),css:x}}})(C||(l.css=C={})),(function(a){function v(E,x,k){const y=E/255,T=x/255,M=k/255;return .2126*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.7152*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.0722*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))}a.relativeLuminance=function(E){return v(E>>16&255,E>>8&255,255&E)},a.relativeLuminance2=v})(g||(l.rgb=g={})),(function(a){function v(x,k,y){const T=x>>24&255,M=x>>16&255,j=x>>8&255;let z=k>>24&255,Y=k>>16&255,ee=k>>8&255,ne=o(g.relativeLuminance2(z,Y,ee),g.relativeLuminance2(T,M,j));for(;ne<y&&(z>0||Y>0||ee>0);)z-=Math.max(0,Math.ceil(.1*z)),Y-=Math.max(0,Math.ceil(.1*Y)),ee-=Math.max(0,Math.ceil(.1*ee)),ne=o(g.relativeLuminance2(z,Y,ee),g.relativeLuminance2(T,M,j));return(z<<24|Y<<16|ee<<8|255)>>>0}function E(x,k,y){const T=x>>24&255,M=x>>16&255,j=x>>8&255;let z=k>>24&255,Y=k>>16&255,ee=k>>8&255,ne=o(g.relativeLuminance2(z,Y,ee),g.relativeLuminance2(T,M,j));for(;ne<y&&(z<255||Y<255||ee<255);)z=Math.min(255,z+Math.ceil(.1*(255-z))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),ee=Math.min(255,ee+Math.ceil(.1*(255-ee))),ne=o(g.relativeLuminance2(z,Y,ee),g.relativeLuminance2(T,M,j));return(z<<24|Y<<16|ee<<8|255)>>>0}a.blend=function(x,k){if(f=(255&k)/255,f===1)return k;const y=k>>24&255,T=k>>16&255,M=k>>8&255,j=x>>24&255,z=x>>16&255,Y=x>>8&255;return p=j+Math.round((y-j)*f),_=z+Math.round((T-z)*f),S=Y+Math.round((M-Y)*f),m.toRgba(p,_,S)},a.ensureContrastRatio=function(x,k,y){const T=g.relativeLuminance(x>>8),M=g.relativeLuminance(k>>8);if(o(T,M)<y){if(M<T){const Y=v(x,k,y),ee=o(T,g.relativeLuminance(Y>>8));if(ee<y){const ne=E(x,k,y);return ee>o(T,g.relativeLuminance(ne>>8))?Y:ne}return Y}const j=E(x,k,y),z=o(T,g.relativeLuminance(j>>8));if(z<y){const Y=v(x,k,y);return z>o(T,g.relativeLuminance(Y>>8))?j:Y}return j}},a.reduceLuminance=v,a.increaseLuminance=E,a.toChannels=function(x){return[x>>24&255,x>>16&255,x>>8&255,255&x]}})(u||(l.rgba=u={})),l.toPaddedHex=h,l.contrastRatio=o},8969:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreTerminal=void 0;const _=p(844),S=p(2585),f=p(4348),m=p(7866),w=p(744),C=p(7302),g=p(6975),u=p(8460),h=p(1753),o=p(1480),a=p(7994),v=p(9282),E=p(5435),x=p(5981),k=p(2660);let y=!1;class T extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new u.EventEmitter),this._onScroll.event((j=>{var z;(z=this._onScrollApi)==null||z.fire(j.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(j){for(const z in j)this.optionsService.options[z]=j[z]}constructor(j){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new u.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new u.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new u.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new u.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new C.OptionsService(j)),this._instantiationService.setService(S.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(S.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(S.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(g.CoreService)),this._instantiationService.setService(S.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(S.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(S.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(a.CharsetService),this._instantiationService.setService(S.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(S.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,u.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,u.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,u.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,u.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((z=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((z=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new x.WriteBuffer(((z,Y)=>this._inputHandler.parse(z,Y)))),this.register((0,u.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(j,z){this._writeBuffer.write(j,z)}writeSync(j,z){this._logService.logLevel<=S.LogLevelEnum.WARN&&!y&&(this._logService.warn("writeSync is unreliable and will be removed soon."),y=!0),this._writeBuffer.writeSync(j,z)}input(j,z=!0){this.coreService.triggerDataEvent(j,z)}resize(j,z){isNaN(j)||isNaN(z)||(j=Math.max(j,w.MINIMUM_COLS),z=Math.max(z,w.MINIMUM_ROWS),this._bufferService.resize(j,z))}scroll(j,z=!1){this._bufferService.scroll(j,z)}scrollLines(j,z,Y){this._bufferService.scrollLines(j,z,Y)}scrollPages(j){this.scrollLines(j*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(j){const z=j-this._bufferService.buffer.ydisp;z!==0&&this.scrollLines(z)}registerEscHandler(j,z){return this._inputHandler.registerEscHandler(j,z)}registerDcsHandler(j,z){return this._inputHandler.registerDcsHandler(j,z)}registerCsiHandler(j,z){return this._inputHandler.registerCsiHandler(j,z)}registerOscHandler(j,z){return this._inputHandler.registerOscHandler(j,z)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let j=!1;const z=this.optionsService.rawOptions.windowsPty;z&&z.buildNumber!==void 0&&z.buildNumber!==void 0?j=z.backend==="conpty"&&z.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(j=!0),j?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const j=[];j.push(this.onLineFeed(v.updateWindowsModeWrappedState.bind(null,this._bufferService))),j.push(this.registerCsiHandler({final:"H"},(()=>((0,v.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const z of j)z.dispose()}))}}}l.CoreTerminal=T},8460:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.runAndSubscribe=l.forwardEvent=l.EventEmitter=void 0,l.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=p=>(this._listeners.push(p),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===p)return void this._listeners.splice(_,1)}}})),this._event}fire(p,_){const S=[];for(let f=0;f<this._listeners.length;f++)S.push(this._listeners[f]);for(let f=0;f<S.length;f++)S[f].call(void 0,p,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},l.forwardEvent=function(p,_){return p((S=>_.fire(S)))},l.runAndSubscribe=function(p,_){return _(void 0),p((S=>_(S)))}},5435:function(I,l,p){var _=this&&this.__decorate||function(ce,B,U,L){var q,ue=arguments.length,pe=ue<3?B:L===null?L=Object.getOwnPropertyDescriptor(B,U):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(ce,B,U,L);else for(var ve=ce.length-1;ve>=0;ve--)(q=ce[ve])&&(pe=(ue<3?q(pe):ue>3?q(B,U,pe):q(B,U))||pe);return ue>3&&pe&&Object.defineProperty(B,U,pe),pe},S=this&&this.__param||function(ce,B){return function(U,L){B(U,L,ce)}};Object.defineProperty(l,"__esModule",{value:!0}),l.InputHandler=l.WindowsOptionsReportType=void 0;const f=p(2584),m=p(7116),w=p(2015),C=p(844),g=p(482),u=p(8437),h=p(8460),o=p(643),a=p(511),v=p(3734),E=p(2585),x=p(1480),k=p(6242),y=p(6351),T=p(5941),M={"(":0,")":1,"*":2,"+":3,"-":1,".":2},j=131072;function z(ce,B){if(ce>24)return B.setWinLines||!1;switch(ce){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var Y;(function(ce){ce[ce.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ce[ce.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(Y||(l.WindowsOptionsReportType=Y={}));let ee=0;class ne extends C.Disposable{getAttrData(){return this._curAttrData}constructor(B,U,L,q,ue,pe,ve,Ce,F=new w.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=U,this._coreService=L,this._logService=q,this._optionsService=ue,this._oscLinkService=pe,this._coreMouseService=ve,this._unicodeService=Ce,this._parser=F,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new g.StringToUtf32,this._utf8Decoder=new g.Utf8ToUtf32,this._workCell=new a.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new te(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((V=>this._activeBuffer=V.activeBuffer))),this._parser.setCsiHandlerFallback(((V,me)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(V),params:me.toArray()})})),this._parser.setEscHandlerFallback((V=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(V)})})),this._parser.setExecuteHandlerFallback((V=>{this._logService.debug("Unknown EXECUTE code: ",{code:V})})),this._parser.setOscHandlerFallback(((V,me,oe)=>{this._logService.debug("Unknown OSC code: ",{identifier:V,action:me,data:oe})})),this._parser.setDcsHandlerFallback(((V,me,oe)=>{me==="HOOK"&&(oe=oe.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(V),action:me,payload:oe})})),this._parser.setPrintHandler(((V,me,oe)=>this.print(V,me,oe))),this._parser.registerCsiHandler({final:"@"},(V=>this.insertChars(V))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(V=>this.scrollLeft(V))),this._parser.registerCsiHandler({final:"A"},(V=>this.cursorUp(V))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(V=>this.scrollRight(V))),this._parser.registerCsiHandler({final:"B"},(V=>this.cursorDown(V))),this._parser.registerCsiHandler({final:"C"},(V=>this.cursorForward(V))),this._parser.registerCsiHandler({final:"D"},(V=>this.cursorBackward(V))),this._parser.registerCsiHandler({final:"E"},(V=>this.cursorNextLine(V))),this._parser.registerCsiHandler({final:"F"},(V=>this.cursorPrecedingLine(V))),this._parser.registerCsiHandler({final:"G"},(V=>this.cursorCharAbsolute(V))),this._parser.registerCsiHandler({final:"H"},(V=>this.cursorPosition(V))),this._parser.registerCsiHandler({final:"I"},(V=>this.cursorForwardTab(V))),this._parser.registerCsiHandler({final:"J"},(V=>this.eraseInDisplay(V,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(V=>this.eraseInDisplay(V,!0))),this._parser.registerCsiHandler({final:"K"},(V=>this.eraseInLine(V,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(V=>this.eraseInLine(V,!0))),this._parser.registerCsiHandler({final:"L"},(V=>this.insertLines(V))),this._parser.registerCsiHandler({final:"M"},(V=>this.deleteLines(V))),this._parser.registerCsiHandler({final:"P"},(V=>this.deleteChars(V))),this._parser.registerCsiHandler({final:"S"},(V=>this.scrollUp(V))),this._parser.registerCsiHandler({final:"T"},(V=>this.scrollDown(V))),this._parser.registerCsiHandler({final:"X"},(V=>this.eraseChars(V))),this._parser.registerCsiHandler({final:"Z"},(V=>this.cursorBackwardTab(V))),this._parser.registerCsiHandler({final:"`"},(V=>this.charPosAbsolute(V))),this._parser.registerCsiHandler({final:"a"},(V=>this.hPositionRelative(V))),this._parser.registerCsiHandler({final:"b"},(V=>this.repeatPrecedingCharacter(V))),this._parser.registerCsiHandler({final:"c"},(V=>this.sendDeviceAttributesPrimary(V))),this._parser.registerCsiHandler({prefix:">",final:"c"},(V=>this.sendDeviceAttributesSecondary(V))),this._parser.registerCsiHandler({final:"d"},(V=>this.linePosAbsolute(V))),this._parser.registerCsiHandler({final:"e"},(V=>this.vPositionRelative(V))),this._parser.registerCsiHandler({final:"f"},(V=>this.hVPosition(V))),this._parser.registerCsiHandler({final:"g"},(V=>this.tabClear(V))),this._parser.registerCsiHandler({final:"h"},(V=>this.setMode(V))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(V=>this.setModePrivate(V))),this._parser.registerCsiHandler({final:"l"},(V=>this.resetMode(V))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(V=>this.resetModePrivate(V))),this._parser.registerCsiHandler({final:"m"},(V=>this.charAttributes(V))),this._parser.registerCsiHandler({final:"n"},(V=>this.deviceStatus(V))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(V=>this.deviceStatusPrivate(V))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(V=>this.softReset(V))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(V=>this.setCursorStyle(V))),this._parser.registerCsiHandler({final:"r"},(V=>this.setScrollRegion(V))),this._parser.registerCsiHandler({final:"s"},(V=>this.saveCursor(V))),this._parser.registerCsiHandler({final:"t"},(V=>this.windowOptions(V))),this._parser.registerCsiHandler({final:"u"},(V=>this.restoreCursor(V))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(V=>this.insertColumns(V))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(V=>this.deleteColumns(V))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(V=>this.selectProtected(V))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(V=>this.requestMode(V,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(V=>this.requestMode(V,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new k.OscHandler((V=>(this.setTitle(V),this.setIconName(V),!0)))),this._parser.registerOscHandler(1,new k.OscHandler((V=>this.setIconName(V)))),this._parser.registerOscHandler(2,new k.OscHandler((V=>this.setTitle(V)))),this._parser.registerOscHandler(4,new k.OscHandler((V=>this.setOrReportIndexedColor(V)))),this._parser.registerOscHandler(8,new k.OscHandler((V=>this.setHyperlink(V)))),this._parser.registerOscHandler(10,new k.OscHandler((V=>this.setOrReportFgColor(V)))),this._parser.registerOscHandler(11,new k.OscHandler((V=>this.setOrReportBgColor(V)))),this._parser.registerOscHandler(12,new k.OscHandler((V=>this.setOrReportCursorColor(V)))),this._parser.registerOscHandler(104,new k.OscHandler((V=>this.restoreIndexedColor(V)))),this._parser.registerOscHandler(110,new k.OscHandler((V=>this.restoreFgColor(V)))),this._parser.registerOscHandler(111,new k.OscHandler((V=>this.restoreBgColor(V)))),this._parser.registerOscHandler(112,new k.OscHandler((V=>this.restoreCursorColor(V)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const V in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:V},(()=>this.selectCharset("("+V))),this._parser.registerEscHandler({intermediates:")",final:V},(()=>this.selectCharset(")"+V))),this._parser.registerEscHandler({intermediates:"*",final:V},(()=>this.selectCharset("*"+V))),this._parser.registerEscHandler({intermediates:"+",final:V},(()=>this.selectCharset("+"+V))),this._parser.registerEscHandler({intermediates:"-",final:V},(()=>this.selectCharset("-"+V))),this._parser.registerEscHandler({intermediates:".",final:V},(()=>this.selectCharset("."+V))),this._parser.registerEscHandler({intermediates:"/",final:V},(()=>this.selectCharset("/"+V)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((V=>(this._logService.error("Parsing error: ",V),V))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new y.DcsHandler(((V,me)=>this.requestStatusString(V,me))))}_preserveStack(B,U,L,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=U,this._parseStack.decodedLength=L,this._parseStack.position=q}_logSlowResolvingAsync(B){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([B,new Promise(((U,L)=>setTimeout((()=>L("#SLOW_TIMEOUT")),5e3)))]).catch((U=>{if(U!=="#SLOW_TIMEOUT")throw U;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(B,U){let L,q=this._activeBuffer.x,ue=this._activeBuffer.y,pe=0;const ve=this._parseStack.paused;if(ve){if(L=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,U))return this._logSlowResolvingAsync(L),L;q=this._parseStack.cursorStartX,ue=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>j&&(pe=this._parseStack.position+j)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,(V=>String.fromCharCode(V))).join("")}"`),typeof B=="string"?B.split("").map((V=>V.charCodeAt(0))):B),this._parseBuffer.length<B.length&&this._parseBuffer.length<j&&(this._parseBuffer=new Uint32Array(Math.min(B.length,j))),ve||this._dirtyRowTracker.clearRange(),B.length>j)for(let V=pe;V<B.length;V+=j){const me=V+j<B.length?V+j:B.length,oe=typeof B=="string"?this._stringDecoder.decode(B.substring(V,me),this._parseBuffer):this._utf8Decoder.decode(B.subarray(V,me),this._parseBuffer);if(L=this._parser.parse(this._parseBuffer,oe))return this._preserveStack(q,ue,oe,V),this._logSlowResolvingAsync(L),L}else if(!ve){const V=typeof B=="string"?this._stringDecoder.decode(B,this._parseBuffer):this._utf8Decoder.decode(B,this._parseBuffer);if(L=this._parser.parse(this._parseBuffer,V))return this._preserveStack(q,ue,V,0),this._logSlowResolvingAsync(L),L}this._activeBuffer.x===q&&this._activeBuffer.y===ue||this._onCursorMove.fire();const Ce=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),F=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);F<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(F,this._bufferService.rows-1),Math.min(Ce,this._bufferService.rows-1))}print(B,U,L){let q,ue;const pe=this._charsetService.charset,ve=this._optionsService.rawOptions.screenReaderMode,Ce=this._bufferService.cols,F=this._coreService.decPrivateModes.wraparound,V=this._coreService.modes.insertMode,me=this._curAttrData;let oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&L-U>0&&oe.getWidth(this._activeBuffer.x-1)===2&&oe.setCellFromCodepoint(this._activeBuffer.x-1,0,1,me);let ae=this._parser.precedingJoinState;for(let ye=U;ye<L;++ye){if(q=B[ye],q<127&&pe){const Le=pe[String.fromCharCode(q)];Le&&(q=Le.charCodeAt(0))}const be=this._unicodeService.charProperties(q,ae);ue=x.UnicodeService.extractWidth(be);const Ue=x.UnicodeService.extractShouldJoin(be),Ie=Ue?x.UnicodeService.extractWidth(ae):0;if(ae=be,ve&&this._onA11yChar.fire((0,g.stringFromCodePoint)(q)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+ue-Ie>Ce){if(F){const Le=oe;let ke=this._activeBuffer.x-Ie;for(this._activeBuffer.x=Ie,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),oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ie>0&&oe instanceof u.BufferLine&&oe.copyCellsFrom(Le,ke,0,Ie,!1);ke<Ce;)Le.setCellFromCodepoint(ke++,0,1,me)}else if(this._activeBuffer.x=Ce-1,ue===2)continue}if(Ue&&this._activeBuffer.x){const Le=oe.getWidth(this._activeBuffer.x-1)?1:2;oe.addCodepointToCell(this._activeBuffer.x-Le,q,ue);for(let ke=ue-Ie;--ke>=0;)oe.setCellFromCodepoint(this._activeBuffer.x++,0,0,me)}else if(V&&(oe.insertCells(this._activeBuffer.x,ue-Ie,this._activeBuffer.getNullCell(me)),oe.getWidth(Ce-1)===2&&oe.setCellFromCodepoint(Ce-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,me)),oe.setCellFromCodepoint(this._activeBuffer.x++,q,ue,me),ue>0)for(;--ue;)oe.setCellFromCodepoint(this._activeBuffer.x++,0,0,me)}this._parser.precedingJoinState=ae,this._activeBuffer.x<Ce&&L-U>0&&oe.getWidth(this._activeBuffer.x)===0&&!oe.hasContent(this._activeBuffer.x)&&oe.setCellFromCodepoint(this._activeBuffer.x,0,1,me),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,U){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,U):this._parser.registerCsiHandler(B,(L=>!z(L.params[0],this._optionsService.rawOptions.windowOptions)||U(L)))}registerDcsHandler(B,U){return this._parser.registerDcsHandler(B,new y.DcsHandler(U))}registerEscHandler(B,U){return this._parser.registerEscHandler(B,U)}registerOscHandler(B,U){return this._parser.registerOscHandler(B,new k.OscHandler(U))}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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);U.hasWidth(this._activeBuffer.x)&&!U.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,U){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+U):(this._activeBuffer.x=B,this._activeBuffer.y=U),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,U){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+U)}cursorUp(B){const U=this._activeBuffer.y-this._activeBuffer.scrollTop;return U>=0?this._moveCursor(0,-Math.min(U,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const U=this._activeBuffer.scrollBottom-this._activeBuffer.y;return U>=0?this._moveCursor(0,Math.min(U,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const U=B.params[0];return U===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:U===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let U=B.params[0]||1;for(;U--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let U=B.params[0]||1;for(;U--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const U=B.params[0];return U===1&&(this._curAttrData.bg|=536870912),U!==2&&U!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,U,L,q=!1,ue=!1){const pe=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);pe.replaceCells(U,L,this._activeBuffer.getNullCell(this._eraseAttrData()),ue),q&&(pe.isWrapped=!1)}_resetBufferLine(B,U=!1){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);L&&(L.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),U),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),L.isWrapped=!1)}eraseInDisplay(B,U=!1){let L;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(L=this._activeBuffer.y,this._dirtyRowTracker.markDirty(L),this._eraseInBufferLine(L++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,U);L<this._bufferService.rows;L++)this._resetBufferLine(L,U);this._dirtyRowTracker.markDirty(L);break;case 1:for(L=this._activeBuffer.y,this._dirtyRowTracker.markDirty(L),this._eraseInBufferLine(L,0,this._activeBuffer.x+1,!0,U),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(L+1).isWrapped=!1);L--;)this._resetBufferLine(L,U);this._dirtyRowTracker.markDirty(0);break;case 2:for(L=this._bufferService.rows,this._dirtyRowTracker.markDirty(L-1);L--;)this._resetBufferLine(L,U);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine(B,U=!1){switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,U);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,U);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,U)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(B){this._restrictCursor();let U=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=this._activeBuffer.ybase+this._activeBuffer.y,q=this._bufferService.rows-1-this._activeBuffer.scrollBottom,ue=this._bufferService.rows-1+this._activeBuffer.ybase-q+1;for(;U--;)this._activeBuffer.lines.splice(ue-1,1),this._activeBuffer.lines.splice(L,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(B){this._restrictCursor();let U=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=this._activeBuffer.ybase+this._activeBuffer.y;let q;for(q=this._bufferService.rows-1-this._activeBuffer.scrollBottom,q=this._bufferService.rows-1+this._activeBuffer.ybase-q;U--;)this._activeBuffer.lines.splice(L,1),this._activeBuffer.lines.splice(q,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(B){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.insertCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(B){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.deleteCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(B){let U=B.params[0]||1;for(;U--;)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(B){let U=B.params[0]||1;for(;U--;)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(u.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=B.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);q.deleteCells(0,U,this._activeBuffer.getNullCell(this._eraseAttrData())),q.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=B.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);q.insertCells(0,U,this._activeBuffer.getNullCell(this._eraseAttrData())),q.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=B.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);q.insertCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(this._eraseAttrData())),q.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=B.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);q.deleteCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(this._eraseAttrData())),q.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(B){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(B.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(B){const U=this._parser.precedingJoinState;if(!U)return!0;const L=B.params[0]||1,q=x.UnicodeService.extractWidth(U),ue=this._activeBuffer.x-q,pe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(ue),ve=new Uint32Array(pe.length*L);let Ce=0;for(let V=0;V<pe.length;){const me=pe.codePointAt(V)||0;ve[Ce++]=me,V+=me>65535?2:1}let F=Ce;for(let V=1;V<L;++V)ve.copyWithin(F,0,Ce),F+=Ce;return this.print(ve,0,F),!0}sendDeviceAttributesPrimary(B){return B.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let U=0;U<B.length;U++)switch(B.params[U]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(B){for(let U=0;U<B.length;U++)switch(B.params[U]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(B){for(let U=0;U<B.length;U++)switch(B.params[U]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(B){for(let U=0;U<B.length;U++)switch(B.params[U]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),B.params[U]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(B,U){const L=this._coreService.decPrivateModes,{activeProtocol:q,activeEncoding:ue}=this._coreMouseService,pe=this._coreService,{buffers:ve,cols:Ce}=this._bufferService,{active:F,alt:V}=ve,me=this._optionsService.rawOptions,oe=Ue=>Ue?1:2,ae=B.params[0];return ye=ae,be=U?ae===2?4:ae===4?oe(pe.modes.insertMode):ae===12?3:ae===20?oe(me.convertEol):0:ae===1?oe(L.applicationCursorKeys):ae===3?me.windowOptions.setWinLines?Ce===80?2:Ce===132?1:0:0:ae===6?oe(L.origin):ae===7?oe(L.wraparound):ae===8?3:ae===9?oe(q==="X10"):ae===12?oe(me.cursorBlink):ae===25?oe(!pe.isCursorHidden):ae===45?oe(L.reverseWraparound):ae===66?oe(L.applicationKeypad):ae===67?4:ae===1e3?oe(q==="VT200"):ae===1002?oe(q==="DRAG"):ae===1003?oe(q==="ANY"):ae===1004?oe(L.sendFocus):ae===1005?4:ae===1006?oe(ue==="SGR"):ae===1015?4:ae===1016?oe(ue==="SGR_PIXELS"):ae===1048?1:ae===47||ae===1047||ae===1049?oe(F===V):ae===2004?oe(L.bracketedPasteMode):0,pe.triggerDataEvent(`${f.C0.ESC}[${U?"":"?"}${ye};${be}$y`),!0;var ye,be}_updateAttrColor(B,U,L,q,ue){return U===2?(B|=50331648,B&=-16777216,B|=v.AttributeData.fromColorRGB([L,q,ue])):U===5&&(B&=-50331904,B|=33554432|255&L),B}_extractColor(B,U,L){const q=[0,0,-1,0,0,0];let ue=0,pe=0;do{if(q[pe+ue]=B.params[U+pe],B.hasSubParams(U+pe)){const ve=B.getSubParams(U+pe);let Ce=0;do q[1]===5&&(ue=1),q[pe+Ce+1+ue]=ve[Ce];while(++Ce<ve.length&&Ce+pe+1+ue<q.length);break}if(q[1]===5&&pe+ue>=2||q[1]===2&&pe+ue>=5)break;q[1]&&(ue=1)}while(++pe+U<B.length&&pe+ue<q.length);for(let ve=2;ve<q.length;++ve)q[ve]===-1&&(q[ve]=0);switch(q[0]){case 38:L.fg=this._updateAttrColor(L.fg,q[1],q[3],q[4],q[5]);break;case 48:L.bg=this._updateAttrColor(L.bg,q[1],q[3],q[4],q[5]);break;case 58:L.extended=L.extended.clone(),L.extended.underlineColor=this._updateAttrColor(L.extended.underlineColor,q[1],q[3],q[4],q[5])}return pe}_processUnderline(B,U){U.extended=U.extended.clone(),(!~B||B>5)&&(B=1),U.extended.underlineStyle=B,U.fg|=268435456,B===0&&(U.fg&=-268435457),U.updateExtended()}_processSGR0(B){B.fg=u.DEFAULT_ATTR_DATA.fg,B.bg=u.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const U=B.length;let L;const q=this._curAttrData;for(let ue=0;ue<U;ue++)L=B.params[ue],L>=30&&L<=37?(q.fg&=-50331904,q.fg|=16777216|L-30):L>=40&&L<=47?(q.bg&=-50331904,q.bg|=16777216|L-40):L>=90&&L<=97?(q.fg&=-50331904,q.fg|=16777224|L-90):L>=100&&L<=107?(q.bg&=-50331904,q.bg|=16777224|L-100):L===0?this._processSGR0(q):L===1?q.fg|=134217728:L===3?q.bg|=67108864:L===4?(q.fg|=268435456,this._processUnderline(B.hasSubParams(ue)?B.getSubParams(ue)[0]:1,q)):L===5?q.fg|=536870912:L===7?q.fg|=67108864:L===8?q.fg|=1073741824:L===9?q.fg|=2147483648:L===2?q.bg|=134217728:L===21?this._processUnderline(2,q):L===22?(q.fg&=-134217729,q.bg&=-134217729):L===23?q.bg&=-67108865:L===24?(q.fg&=-268435457,this._processUnderline(0,q)):L===25?q.fg&=-536870913:L===27?q.fg&=-67108865:L===28?q.fg&=-1073741825:L===29?q.fg&=2147483647:L===39?(q.fg&=-67108864,q.fg|=16777215&u.DEFAULT_ATTR_DATA.fg):L===49?(q.bg&=-67108864,q.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):L===38||L===48||L===58?ue+=this._extractColor(B,ue,q):L===53?q.bg|=1073741824:L===55?q.bg&=-1073741825:L===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):L===100?(q.fg&=-67108864,q.fg|=16777215&u.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",L);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const U=this._activeBuffer.y+1,L=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${U};${L}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const U=this._activeBuffer.y+1,L=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${U};${L}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(B){const U=B.params[0]||1;switch(U){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const L=U%2==1;return this._optionsService.options.cursorBlink=L,!0}setScrollRegion(B){const U=B.params[0]||1;let L;return(B.length<2||(L=B.params[1])>this._bufferService.rows||L===0)&&(L=this._bufferService.rows),L>U&&(this._activeBuffer.scrollTop=U-1,this._activeBuffer.scrollBottom=L-1,this._setCursor(0,0)),!0}windowOptions(B){if(!z(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const U=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:U!==2&&this._onRequestWindowsOptionsReport.fire(Y.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(Y.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:U!==0&&U!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),U!==0&&U!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:U!==0&&U!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),U!==0&&U!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const U=[],L=B.split(";");for(;L.length>1;){const q=L.shift(),ue=L.shift();if(/^\d+$/.exec(q)){const pe=parseInt(q);if(de(pe))if(ue==="?")U.push({type:0,index:pe});else{const ve=(0,T.parseColor)(ue);ve&&U.push({type:1,index:pe,color:ve})}}}return U.length&&this._onColor.fire(U),!0}setHyperlink(B){const U=B.split(";");return!(U.length<2)&&(U[1]?this._createHyperlink(U[0],U[1]):!U[0]&&this._finishHyperlink())}_createHyperlink(B,U){this._getCurrentLinkId()&&this._finishHyperlink();const L=B.split(":");let q;const ue=L.findIndex((pe=>pe.startsWith("id=")));return ue!==-1&&(q=L[ue].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:U}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(B,U){const L=B.split(";");for(let q=0;q<L.length&&!(U>=this._specialColors.length);++q,++U)if(L[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[U]}]);else{const ue=(0,T.parseColor)(L[q]);ue&&this._onColor.fire([{type:1,index:this._specialColors[U],color:ue}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const U=[],L=B.split(";");for(let q=0;q<L.length;++q)if(/^\d+$/.exec(L[q])){const ue=parseInt(L[q]);de(ue)&&U.push({type:2,index:ue})}return U.length&&this._onColor.fire(U),!0}restoreFgColor(B){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(B){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(B){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),!0}selectCharset(B){return B.length!==2?(this.selectDefaultCharset(),!0):(B[0]==="/"||this._charsetService.setgCharset(M[B[0]],m.CHARSETS[B[1]]||m.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,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=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new a.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let U=0;U<this._bufferService.rows;++U){const L=this._activeBuffer.ybase+this._activeBuffer.y+U,q=this._activeBuffer.lines.get(L);q&&(q.fill(B),q.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(B,U){const L=this._bufferService.buffer,q=this._optionsService.rawOptions;return(ue=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${ue}${f.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${L.scrollTop+1};${L.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,U){this._dirtyRowTracker.markRangeDirty(B,U)}}l.InputHandler=ne;let te=class{constructor(ce){this._bufferService=ce,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ce){ce<this.start?this.start=ce:ce>this.end&&(this.end=ce)}markRangeDirty(ce,B){ce>B&&(ee=ce,ce=B,B=ee),ce<this.start&&(this.start=ce),B>this.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function de(ce){return 0<=ce&&ce<256}te=_([S(0,E.IBufferService)],te)},844:(I,l)=>{function p(_){for(const S of _)S.dispose();_.length=0}Object.defineProperty(l,"__esModule",{value:!0}),l.getDisposeArrayDisposable=l.disposeArray=l.toDisposable=l.MutableDisposable=l.Disposable=void 0,l.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const S=this._disposables.indexOf(_);S!==-1&&this._disposables.splice(S,1)}},l.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var S;this._isDisposed||_===this._value||((S=this._value)==null||S.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},l.toDisposable=function(_){return{dispose:_}},l.disposeArray=p,l.getDisposeArrayDisposable=function(_){return{dispose:()=>p(_)}}},1505:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.FourKeyMap=l.TwoKeyMap=void 0;class p{constructor(){this._data={}}set(S,f,m){this._data[S]||(this._data[S]={}),this._data[S][f]=m}get(S,f){return this._data[S]?this._data[S][f]:void 0}clear(){this._data={}}}l.TwoKeyMap=p,l.FourKeyMap=class{constructor(){this._data=new p}set(_,S,f,m,w){this._data.get(_,S)||this._data.set(_,S,new p),this._data.get(_,S).set(f,m,w)}get(_,S,f,m){var w;return(w=this._data.get(_,S))==null?void 0:w.get(f,m)}clear(){this._data.clear()}}},6114:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.isChromeOS=l.isLinux=l.isWindows=l.isIphone=l.isIpad=l.isMac=l.getSafariVersion=l.isSafari=l.isLegacyEdge=l.isFirefox=l.isNode=void 0,l.isNode=typeof process<"u"&&"title"in process;const p=l.isNode?"node":navigator.userAgent,_=l.isNode?"node":navigator.platform;l.isFirefox=p.includes("Firefox"),l.isLegacyEdge=p.includes("Edge"),l.isSafari=/^((?!chrome|android).)*safari/i.test(p),l.getSafariVersion=function(){if(!l.isSafari)return 0;const S=p.match(/Version\/(\d+)/);return S===null||S.length<2?0:parseInt(S[1])},l.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),l.isIpad=_==="iPad",l.isIphone=_==="iPhone",l.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),l.isLinux=_.indexOf("Linux")>=0,l.isChromeOS=/\bCrOS\b/.test(p)},6106:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SortedList=void 0;let p=0;l.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(p=this._search(this._getKey(_)),this._array.splice(p,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const S=this._getKey(_);if(S===void 0||(p=this._search(S),p===-1)||this._getKey(this._array[p])!==S)return!1;do if(this._array[p]===_)return this._array.splice(p,1),!0;while(++p<this._array.length&&this._getKey(this._array[p])===S);return!1}*getKeyIterator(_){if(this._array.length!==0&&(p=this._search(_),!(p<0||p>=this._array.length)&&this._getKey(this._array[p])===_))do yield this._array[p];while(++p<this._array.length&&this._getKey(this._array[p])===_)}forEachByKey(_,S){if(this._array.length!==0&&(p=this._search(_),!(p<0||p>=this._array.length)&&this._getKey(this._array[p])===_))do S(this._array[p]);while(++p<this._array.length&&this._getKey(this._array[p])===_)}values(){return[...this._array].values()}_search(_){let S=0,f=this._array.length-1;for(;f>=S;){let m=S+f>>1;const w=this._getKey(this._array[m]);if(w>_)f=m-1;else{if(!(w<_)){for(;m>0&&this._getKey(this._array[m-1])===_;)m--;return m}S=m+1}}return S}}},7226:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DebouncedIdleTask=l.IdleTaskQueue=l.PriorityTaskQueue=void 0;const _=p(6114);class S{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(w){this._idleCallback=void 0;let C=0,g=0,u=w.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),g=Math.max(C,g),h=w.timeRemaining(),1.5*g>h)return u-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(u-C))}ms`),void this._start();u=h}this.clear()}}class f extends S{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const C=Date.now()+w;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}l.PriorityTaskQueue=f,l.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends S{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:f,l.DebouncedIdleTask=class{constructor(){this._queue=new l.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.updateWindowsModeWrappedState=void 0;const _=p(643);l.updateWindowsModeWrappedState=function(S){const f=S.buffer.lines.get(S.buffer.ybase+S.buffer.y-1),m=f==null?void 0:f.get(S.cols-1),w=S.buffer.lines.get(S.buffer.ybase+S.buffer.y);w&&m&&(w.isWrapped=m[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&m[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ExtendedAttrs=l.AttributeData=void 0;class p{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new p;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}l.AttributeData=p;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,m=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=m}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}l.ExtendedAttrs=_},9092:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Buffer=l.MAX_BUFFER_SIZE=void 0;const _=p(6349),S=p(7226),f=p(3734),m=p(8437),w=p(4634),C=p(511),g=p(643),u=p(4863),h=p(7116);l.MAX_BUFFER_SIZE=4294967295,l.Buffer=class{constructor(o,a,v){this._hasScrollback=o,this._optionsService=a,this._bufferService=v,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new S.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,a){return new m.BufferLine(this._bufferService.cols,this.getNullCell(o),a)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const a=o+this._optionsService.rawOptions.scrollback;return a>l.MAX_BUFFER_SIZE?l.MAX_BUFFER_SIZE:a}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=m.DEFAULT_ATTR_DATA);let a=this._rows;for(;a--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,a){const v=this.getNullCell(m.DEFAULT_ATTR_DATA);let E=0;const x=this._getCorrectBufferLength(a);if(x>this.lines.maxLength&&(this.lines.maxLength=x),this.lines.length>0){if(this._cols<o)for(let y=0;y<this.lines.length;y++)E+=+this.lines.get(y).resize(o,v);let k=0;if(this._rows<a)for(let y=this._rows;y<a;y++)this.lines.length<a+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new m.BufferLine(o,v)):this.ybase>0&&this.lines.length<=this.ybase+this.y+k+1?(this.ybase--,k++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(o,v)));else for(let y=this._rows;y>a;y--)this.lines.length>a+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(x<this.lines.maxLength){const y=this.lines.length-x;y>0&&(this.lines.trimStart(y),this.ybase=Math.max(this.ybase-y,0),this.ydisp=Math.max(this.ydisp-y,0),this.savedY=Math.max(this.savedY-y,0)),this.lines.maxLength=x}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,a-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=a-1,this._isReflowEnabled&&(this._reflow(o,a),this._cols>o))for(let k=0;k<this.lines.length;k++)E+=+this.lines.get(k).resize(o,v);this._cols=o,this._rows=a,this._memoryCleanupQueue.clear(),E>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let a=0;for(;this._memoryCleanupPosition<this.lines.length;)if(a+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),a>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,a){this._cols!==o&&(o>this._cols?this._reflowLarger(o,a):this._reflowSmaller(o,a))}_reflowLarger(o,a){const v=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(v.length>0){const E=(0,w.reflowLargerCreateNewLayout)(this.lines,v);(0,w.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(o,a,E.countRemoved)}}_reflowLargerAdjustViewport(o,a,v){const E=this.getNullCell(m.DEFAULT_ATTR_DATA);let x=v;for(;x-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<a&&this.lines.push(new m.BufferLine(o,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-v,0)}_reflowSmaller(o,a){const v=this.getNullCell(m.DEFAULT_ATTR_DATA),E=[];let x=0;for(let k=this.lines.length-1;k>=0;k--){let y=this.lines.get(k);if(!y||!y.isWrapped&&y.getTrimmedLength()<=o)continue;const T=[y];for(;y.isWrapped&&k>0;)y=this.lines.get(--k),T.unshift(y);const M=this.ybase+this.y;if(M>=k&&M<k+T.length)continue;const j=T[T.length-1].getTrimmedLength(),z=(0,w.reflowSmallerGetNewLineLengths)(T,this._cols,o),Y=z.length-T.length;let ee;ee=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Y):Math.max(0,this.lines.length-this.lines.maxLength+Y);const ne=[];for(let L=0;L<Y;L++){const q=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);ne.push(q)}ne.length>0&&(E.push({start:k+T.length+x,newLines:ne}),x+=ne.length),T.push(...ne);let te=z.length-1,de=z[te];de===0&&(te--,de=z[te]);let ce=T.length-Y-1,B=j;for(;ce>=0;){const L=Math.min(B,de);if(T[te]===void 0)break;if(T[te].copyCellsFrom(T[ce],B-L,de-L,L,!0),de-=L,de===0&&(te--,de=z[te]),B-=L,B===0){ce--;const q=Math.max(ce,0);B=(0,w.getWrappedLineTrimmedLength)(T,q,this._cols)}}for(let L=0;L<T.length;L++)z[L]<o&&T[L].setCell(z[L],v);let U=Y-ee;for(;U-- >0;)this.ybase===0?this.y<a-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+x)-a&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Y,this.ybase+a-1)}if(E.length>0){const k=[],y=[];for(let te=0;te<this.lines.length;te++)y.push(this.lines.get(te));const T=this.lines.length;let M=T-1,j=0,z=E[j];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+x);let Y=0;for(let te=Math.min(this.lines.maxLength-1,T+x-1);te>=0;te--)if(z&&z.start>M+Y){for(let de=z.newLines.length-1;de>=0;de--)this.lines.set(te--,z.newLines[de]);te++,k.push({index:M+1,amount:z.newLines.length}),Y+=z.newLines.length,z=E[++j]}else this.lines.set(te,y[M--]);let ee=0;for(let te=k.length-1;te>=0;te--)k[te].index+=ee,this.lines.onInsertEmitter.fire(k[te]),ee+=k[te].amount;const ne=Math.max(0,T+x-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(o,a,v=0,E){const x=this.lines.get(o);return x?x.translateToString(a,v,E):""}getWrappedRangeForLine(o){let a=o,v=o;for(;a>0&&this.lines.get(a).isWrapped;)a--;for(;v+1<this.lines.length&&this.lines.get(v+1).isWrapped;)v++;return{first:a,last:v}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].line===o&&(this.markers[a].dispose(),this.markers.splice(a--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const a=new u.Marker(o);return this.markers.push(a),a.register(this.lines.onTrim((v=>{a.line-=v,a.line<0&&a.dispose()}))),a.register(this.lines.onInsert((v=>{a.line>=v.index&&(a.line+=v.amount)}))),a.register(this.lines.onDelete((v=>{a.line>=v.index&&a.line<v.index+v.amount&&a.dispose(),a.line>v.index&&(a.line-=v.amount)}))),a.register(a.onDispose((()=>this._removeMarker(a)))),a}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLine=l.DEFAULT_ATTR_DATA=void 0;const _=p(3734),S=p(511),f=p(643),m=p(482);l.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let w=0;class C{constructor(u,h,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*u);const a=h||S.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let v=0;v<u;++v)this.setCell(v,a);this.length=u}get(u){const h=this._data[3*u+0],o=2097151&h;return[this._data[3*u+1],2097152&h?this._combined[u]:o?(0,m.stringFromCodePoint)(o):"",h>>22,2097152&h?this._combined[u].charCodeAt(this._combined[u].length-1):o]}set(u,h){this._data[3*u+1]=h[f.CHAR_DATA_ATTR_INDEX],h[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[u]=h[1],this._data[3*u+0]=2097152|u|h[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*u+0]=h[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(u){return this._data[3*u+0]>>22}hasWidth(u){return 12582912&this._data[3*u+0]}getFg(u){return this._data[3*u+1]}getBg(u){return this._data[3*u+2]}hasContent(u){return 4194303&this._data[3*u+0]}getCodePoint(u){const h=this._data[3*u+0];return 2097152&h?this._combined[u].charCodeAt(this._combined[u].length-1):2097151&h}isCombined(u){return 2097152&this._data[3*u+0]}getString(u){const h=this._data[3*u+0];return 2097152&h?this._combined[u]:2097151&h?(0,m.stringFromCodePoint)(2097151&h):""}isProtected(u){return 536870912&this._data[3*u+2]}loadCell(u,h){return w=3*u,h.content=this._data[w+0],h.fg=this._data[w+1],h.bg=this._data[w+2],2097152&h.content&&(h.combinedData=this._combined[u]),268435456&h.bg&&(h.extended=this._extendedAttrs[u]),h}setCell(u,h){2097152&h.content&&(this._combined[u]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[u]=h.extended),this._data[3*u+0]=h.content,this._data[3*u+1]=h.fg,this._data[3*u+2]=h.bg}setCellFromCodepoint(u,h,o,a){268435456&a.bg&&(this._extendedAttrs[u]=a.extended),this._data[3*u+0]=h|o<<22,this._data[3*u+1]=a.fg,this._data[3*u+2]=a.bg}addCodepointToCell(u,h,o){let a=this._data[3*u+0];2097152&a?this._combined[u]+=(0,m.stringFromCodePoint)(h):2097151&a?(this._combined[u]=(0,m.stringFromCodePoint)(2097151&a)+(0,m.stringFromCodePoint)(h),a&=-2097152,a|=2097152):a=h|4194304,o&&(a&=-12582913,a|=o<<22),this._data[3*u+0]=a}insertCells(u,h,o){if((u%=this.length)&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,o),h<this.length-u){const a=new S.CellData;for(let v=this.length-u-h-1;v>=0;--v)this.setCell(u+h+v,this.loadCell(u+v,a));for(let v=0;v<h;++v)this.setCell(u+v,o)}else for(let a=u;a<this.length;++a)this.setCell(a,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(u,h,o){if(u%=this.length,h<this.length-u){const a=new S.CellData;for(let v=0;v<this.length-u-h;++v)this.setCell(u+v,this.loadCell(u+h+v,a));for(let v=this.length-h;v<this.length;++v)this.setCell(v,o)}else for(let a=u;a<this.length;++a)this.setCell(a,o);u&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,o),this.getWidth(u)!==0||this.hasContent(u)||this.setCellFromCodepoint(u,0,1,o)}replaceCells(u,h,o,a=!1){if(a)for(u&&this.getWidth(u-1)===2&&!this.isProtected(u-1)&&this.setCellFromCodepoint(u-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,o);u<h&&u<this.length;)this.isProtected(u)||this.setCell(u,o),u++;else for(u&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,o);u<h&&u<this.length;)this.setCell(u++,o)}resize(u,h){if(u===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*u;if(u>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const a=new Uint32Array(o);a.set(this._data),this._data=a}for(let a=this.length;a<u;++a)this.setCell(a,h)}else{this._data=this._data.subarray(0,o);const a=Object.keys(this._combined);for(let E=0;E<a.length;E++){const x=parseInt(a[E],10);x>=u&&delete this._combined[x]}const v=Object.keys(this._extendedAttrs);for(let E=0;E<v.length;E++){const x=parseInt(v[E],10);x>=u&&delete this._extendedAttrs[x]}}return this.length=u,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const u=new Uint32Array(this._data.length);return u.set(this._data),this._data=u,1}return 0}fill(u,h=!1){if(h)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,u);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,u)}}copyFrom(u){this.length!==u.length?this._data=new Uint32Array(u._data):this._data.set(u._data),this.length=u.length,this._combined={};for(const h in u._combined)this._combined[h]=u._combined[h];this._extendedAttrs={};for(const h in u._extendedAttrs)this._extendedAttrs[h]=u._extendedAttrs[h];this.isWrapped=u.isWrapped}clone(){const u=new C(0);u._data=new Uint32Array(this._data),u.length=this.length;for(const h in this._combined)u._combined[h]=this._combined[h];for(const h in this._extendedAttrs)u._extendedAttrs[h]=this._extendedAttrs[h];return u.isWrapped=this.isWrapped,u}getTrimmedLength(){for(let u=this.length-1;u>=0;--u)if(4194303&this._data[3*u+0])return u+(this._data[3*u+0]>>22);return 0}getNoBgTrimmedLength(){for(let u=this.length-1;u>=0;--u)if(4194303&this._data[3*u+0]||50331648&this._data[3*u+2])return u+(this._data[3*u+0]>>22);return 0}copyCellsFrom(u,h,o,a,v){const E=u._data;if(v)for(let k=a-1;k>=0;k--){for(let y=0;y<3;y++)this._data[3*(o+k)+y]=E[3*(h+k)+y];268435456&E[3*(h+k)+2]&&(this._extendedAttrs[o+k]=u._extendedAttrs[h+k])}else for(let k=0;k<a;k++){for(let y=0;y<3;y++)this._data[3*(o+k)+y]=E[3*(h+k)+y];268435456&E[3*(h+k)+2]&&(this._extendedAttrs[o+k]=u._extendedAttrs[h+k])}const x=Object.keys(u._combined);for(let k=0;k<x.length;k++){const y=parseInt(x[k],10);y>=h&&(this._combined[y-h+o]=u._combined[y])}}translateToString(u,h,o,a){h=h??0,o=o??this.length,u&&(o=Math.min(o,this.getTrimmedLength())),a&&(a.length=0);let v="";for(;h<o;){const E=this._data[3*h+0],x=2097151&E,k=2097152&E?this._combined[h]:x?(0,m.stringFromCodePoint)(x):f.WHITESPACE_CELL_CHAR;if(v+=k,a)for(let y=0;y<k.length;++y)a.push(h);h+=E>>22||1}return a&&a.push(h),v}}l.BufferLine=C},4841:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.getRangeLength=void 0,l.getRangeLength=function(p,_){if(p.start.y>p.end.y)throw new Error(`Buffer range end (${p.end.x}, ${p.end.y}) cannot be before start (${p.start.x}, ${p.start.y})`);return _*(p.end.y-p.start.y)+(p.end.x-p.start.x+1)}},4634:(I,l)=>{function p(_,S,f){if(S===_.length-1)return _[S].getTrimmedLength();const m=!_[S].hasContent(f-1)&&_[S].getWidth(f-1)===1,w=_[S+1].getWidth(0)===2;return m&&w?f-1:f}Object.defineProperty(l,"__esModule",{value:!0}),l.getWrappedLineTrimmedLength=l.reflowSmallerGetNewLineLengths=l.reflowLargerApplyNewLayout=l.reflowLargerCreateNewLayout=l.reflowLargerGetLinesToRemove=void 0,l.reflowLargerGetLinesToRemove=function(_,S,f,m,w){const C=[];for(let g=0;g<_.length-1;g++){let u=g,h=_.get(++u);if(!h.isWrapped)continue;const o=[_.get(g)];for(;u<_.length&&h.isWrapped;)o.push(h),h=_.get(++u);if(m>=g&&m<u){g+=o.length-1;continue}let a=0,v=p(o,a,S),E=1,x=0;for(;E<o.length;){const y=p(o,E,S),T=y-x,M=f-v,j=Math.min(T,M);o[a].copyCellsFrom(o[E],x,v,j,!1),v+=j,v===f&&(a++,v=0),x+=j,x===y&&(E++,x=0),v===0&&a!==0&&o[a-1].getWidth(f-1)===2&&(o[a].copyCellsFrom(o[a-1],f-1,v++,1,!1),o[a-1].setCell(f-1,w))}o[a].replaceCells(v,f,w);let k=0;for(let y=o.length-1;y>0&&(y>a||o[y].getTrimmedLength()===0);y--)k++;k>0&&(C.push(g+o.length-k),C.push(k)),g+=o.length-1}return C},l.reflowLargerCreateNewLayout=function(_,S){const f=[];let m=0,w=S[m],C=0;for(let g=0;g<_.length;g++)if(w===g){const u=S[++m];_.onDeleteEmitter.fire({index:g-C,amount:u}),g+=u-1,C+=u,w=S[++m]}else f.push(g);return{layout:f,countRemoved:C}},l.reflowLargerApplyNewLayout=function(_,S){const f=[];for(let m=0;m<S.length;m++)f.push(_.get(S[m]));for(let m=0;m<f.length;m++)_.set(m,f[m]);_.length=S.length},l.reflowSmallerGetNewLineLengths=function(_,S,f){const m=[],w=_.map(((h,o)=>p(_,o,S))).reduce(((h,o)=>h+o));let C=0,g=0,u=0;for(;u<w;){if(w-u<f){m.push(w-u);break}C+=f;const h=p(_,g,S);C>h&&(C-=h,g++);const o=_[g].getWidth(C-1)===2;o&&C--;const a=o?f-1:f;m.push(a),u+=a}return m},l.getWrappedLineTrimmedLength=p},5295:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferSet=void 0;const _=p(8460),S=p(844),f=p(9092);class m extends S.Disposable{constructor(C,g){super(),this._optionsService=C,this._bufferService=g,this._onBufferActivate=this.register(new _.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(C){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(C),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(C,g){this._normal.resize(C,g),this._alt.resize(C,g),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}l.BufferSet=m},511:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CellData=void 0;const _=p(482),S=p(643),f=p(3734);class m extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const g=new m;return g.setFromCharData(C),g}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[S.CHAR_DATA_ATTR_INDEX],this.bg=0;let g=!1;if(C[S.CHAR_DATA_CHAR_INDEX].length>2)g=!0;else if(C[S.CHAR_DATA_CHAR_INDEX].length===2){const u=C[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=u&&u<=56319){const h=C[S.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(u-55296)+h-56320+65536|C[S.CHAR_DATA_WIDTH_INDEX]<<22:g=!0}else g=!0}else this.content=C[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[S.CHAR_DATA_WIDTH_INDEX]<<22;g&&(this.combinedData=C[S.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[S.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.CellData=m},643:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WHITESPACE_CELL_CODE=l.WHITESPACE_CELL_WIDTH=l.WHITESPACE_CELL_CHAR=l.NULL_CELL_CODE=l.NULL_CELL_WIDTH=l.NULL_CELL_CHAR=l.CHAR_DATA_CODE_INDEX=l.CHAR_DATA_WIDTH_INDEX=l.CHAR_DATA_CHAR_INDEX=l.CHAR_DATA_ATTR_INDEX=l.DEFAULT_EXT=l.DEFAULT_ATTR=l.DEFAULT_COLOR=void 0,l.DEFAULT_COLOR=0,l.DEFAULT_ATTR=256|l.DEFAULT_COLOR<<9,l.DEFAULT_EXT=0,l.CHAR_DATA_ATTR_INDEX=0,l.CHAR_DATA_CHAR_INDEX=1,l.CHAR_DATA_WIDTH_INDEX=2,l.CHAR_DATA_CODE_INDEX=3,l.NULL_CELL_CHAR="",l.NULL_CELL_WIDTH=1,l.NULL_CELL_CODE=0,l.WHITESPACE_CELL_CHAR=" ",l.WHITESPACE_CELL_WIDTH=1,l.WHITESPACE_CELL_CODE=32},4863:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Marker=void 0;const _=p(8460),S=p(844);class f{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,S.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}l.Marker=f,f._nextId=1},7116:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DEFAULT_CHARSET=l.CHARSETS=void 0,l.CHARSETS={},l.DEFAULT_CHARSET=l.CHARSETS.B,l.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},l.CHARSETS.A={"#":"£"},l.CHARSETS.B=void 0,l.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},l.CHARSETS.C=l.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},l.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},l.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},l.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},l.CHARSETS.E=l.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},l.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},l.CHARSETS.H=l.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(I,l)=>{var p,_,S;Object.defineProperty(l,"__esModule",{value:!0}),l.C1_ESCAPED=l.C1=l.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
|
|
282
|
-
`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(p||(l.C0=p={})),(function(f){f.PAD="",f.HOP="",f.BPH="",f.NBH="",f.IND="",f.NEL="
",f.SSA="",f.ESA="",f.HTS="",f.HTJ="",f.VTS="",f.PLD="",f.PLU="",f.RI="",f.SS2="",f.SS3="",f.DCS="",f.PU1="",f.PU2="",f.STS="",f.CCH="",f.MW="",f.SPA="",f.EPA="",f.SOS="",f.SGCI="",f.SCI="",f.CSI="",f.ST="",f.OSC="",f.PM="",f.APC=""})(_||(l.C1=_={})),(function(f){f.ST=`${p.ESC}\\`})(S||(l.C1_ESCAPED=S={}))},7399:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.evaluateKeyboardEvent=void 0;const _=p(2584),S={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:["'",'"']};l.evaluateKeyboardEvent=function(f,m,w,C){const g={type:0,cancel:!1,key:void 0},u=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?g.key=m?_.C0.ESC+"OA":_.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?g.key=m?_.C0.ESC+"OD":_.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?g.key=m?_.C0.ESC+"OC":_.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(g.key=m?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:g.key=f.ctrlKey?"\b":_.C0.DEL,f.altKey&&(g.key=_.C0.ESC+g.key);break;case 9:if(f.shiftKey){g.key=_.C0.ESC+"[Z";break}g.key=_.C0.HT,g.cancel=!0;break;case 13:g.key=f.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,g.cancel=!0;break;case 27:g.key=_.C0.ESC,f.altKey&&(g.key=_.C0.ESC+_.C0.ESC),g.cancel=!0;break;case 37:if(f.metaKey)break;u?(g.key=_.C0.ESC+"[1;"+(u+1)+"D",g.key===_.C0.ESC+"[1;3D"&&(g.key=_.C0.ESC+(w?"b":"[1;5D"))):g.key=m?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(f.metaKey)break;u?(g.key=_.C0.ESC+"[1;"+(u+1)+"C",g.key===_.C0.ESC+"[1;3C"&&(g.key=_.C0.ESC+(w?"f":"[1;5C"))):g.key=m?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(f.metaKey)break;u?(g.key=_.C0.ESC+"[1;"+(u+1)+"A",w||g.key!==_.C0.ESC+"[1;3A"||(g.key=_.C0.ESC+"[1;5A")):g.key=m?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(f.metaKey)break;u?(g.key=_.C0.ESC+"[1;"+(u+1)+"B",w||g.key!==_.C0.ESC+"[1;3B"||(g.key=_.C0.ESC+"[1;5B")):g.key=m?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(g.key=_.C0.ESC+"[2~");break;case 46:g.key=u?_.C0.ESC+"[3;"+(u+1)+"~":_.C0.ESC+"[3~";break;case 36:g.key=u?_.C0.ESC+"[1;"+(u+1)+"H":m?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:g.key=u?_.C0.ESC+"[1;"+(u+1)+"F":m?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:f.shiftKey?g.type=2:f.ctrlKey?g.key=_.C0.ESC+"[5;"+(u+1)+"~":g.key=_.C0.ESC+"[5~";break;case 34:f.shiftKey?g.type=3:f.ctrlKey?g.key=_.C0.ESC+"[6;"+(u+1)+"~":g.key=_.C0.ESC+"[6~";break;case 112:g.key=u?_.C0.ESC+"[1;"+(u+1)+"P":_.C0.ESC+"OP";break;case 113:g.key=u?_.C0.ESC+"[1;"+(u+1)+"Q":_.C0.ESC+"OQ";break;case 114:g.key=u?_.C0.ESC+"[1;"+(u+1)+"R":_.C0.ESC+"OR";break;case 115:g.key=u?_.C0.ESC+"[1;"+(u+1)+"S":_.C0.ESC+"OS";break;case 116:g.key=u?_.C0.ESC+"[15;"+(u+1)+"~":_.C0.ESC+"[15~";break;case 117:g.key=u?_.C0.ESC+"[17;"+(u+1)+"~":_.C0.ESC+"[17~";break;case 118:g.key=u?_.C0.ESC+"[18;"+(u+1)+"~":_.C0.ESC+"[18~";break;case 119:g.key=u?_.C0.ESC+"[19;"+(u+1)+"~":_.C0.ESC+"[19~";break;case 120:g.key=u?_.C0.ESC+"[20;"+(u+1)+"~":_.C0.ESC+"[20~";break;case 121:g.key=u?_.C0.ESC+"[21;"+(u+1)+"~":_.C0.ESC+"[21~";break;case 122:g.key=u?_.C0.ESC+"[23;"+(u+1)+"~":_.C0.ESC+"[23~";break;case 123:g.key=u?_.C0.ESC+"[24;"+(u+1)+"~":_.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(w&&!C||!f.altKey||f.metaKey)!w||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?g.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(g.key=_.C0.US),f.key==="@"&&(g.key=_.C0.NUL)):f.keyCode===65&&(g.type=1);else{const h=S[f.keyCode],o=h==null?void 0:h[f.shiftKey?1:0];if(o)g.key=_.C0.ESC+o;else if(f.keyCode>=65&&f.keyCode<=90){const a=f.ctrlKey?f.keyCode-64:f.keyCode+32;let v=String.fromCharCode(a);f.shiftKey&&(v=v.toUpperCase()),g.key=_.C0.ESC+v}else if(f.keyCode===32)g.key=_.C0.ESC+(f.ctrlKey?_.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let a=f.code.slice(3,4);f.shiftKey||(a=a.toLowerCase()),g.key=_.C0.ESC+a,g.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?g.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?g.key=_.C0.NUL:f.keyCode>=51&&f.keyCode<=55?g.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?g.key=_.C0.DEL:f.keyCode===219?g.key=_.C0.ESC:f.keyCode===220?g.key=_.C0.FS:f.keyCode===221&&(g.key=_.C0.GS)}return g}},482:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Utf8ToUtf32=l.StringToUtf32=l.utf32ToString=l.stringFromCodePoint=void 0,l.stringFromCodePoint=function(p){return p>65535?(p-=65536,String.fromCharCode(55296+(p>>10))+String.fromCharCode(p%1024+56320)):String.fromCharCode(p)},l.utf32ToString=function(p,_=0,S=p.length){let f="";for(let m=_;m<S;++m){let w=p[m];w>65535?(w-=65536,f+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):f+=String.fromCharCode(w)}return f},l.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(p,_){const S=p.length;if(!S)return 0;let f=0,m=0;if(this._interim){const w=p.charCodeAt(m++);56320<=w&&w<=57343?_[f++]=1024*(this._interim-55296)+w-56320+65536:(_[f++]=this._interim,_[f++]=w),this._interim=0}for(let w=m;w<S;++w){const C=p.charCodeAt(w);if(55296<=C&&C<=56319){if(++w>=S)return this._interim=C,f;const g=p.charCodeAt(w);56320<=g&&g<=57343?_[f++]=1024*(C-55296)+g-56320+65536:(_[f++]=C,_[f++]=g)}else C!==65279&&(_[f++]=C)}return f}},l.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(p,_){const S=p.length;if(!S)return 0;let f,m,w,C,g=0,u=0,h=0;if(this.interim[0]){let v=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let x,k=0;for(;(x=63&this.interim[++k])&&k<4;)E<<=6,E|=x;const y=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,T=y-k;for(;h<T;){if(h>=S)return 0;if(x=p[h++],(192&x)!=128){h--,v=!0;break}this.interim[k++]=x,E<<=6,E|=63&x}v||(y===2?E<128?h--:_[g++]=E:y===3?E<2048||E>=55296&&E<=57343||E===65279||(_[g++]=E):E<65536||E>1114111||(_[g++]=E)),this.interim.fill(0)}const o=S-4;let a=h;for(;a<S;){for(;!(!(a<o)||128&(f=p[a])||128&(m=p[a+1])||128&(w=p[a+2])||128&(C=p[a+3]));)_[g++]=f,_[g++]=m,_[g++]=w,_[g++]=C,a+=4;if(f=p[a++],f<128)_[g++]=f;else if((224&f)==192){if(a>=S)return this.interim[0]=f,g;if(m=p[a++],(192&m)!=128){a--;continue}if(u=(31&f)<<6|63&m,u<128){a--;continue}_[g++]=u}else if((240&f)==224){if(a>=S)return this.interim[0]=f,g;if(m=p[a++],(192&m)!=128){a--;continue}if(a>=S)return this.interim[0]=f,this.interim[1]=m,g;if(w=p[a++],(192&w)!=128){a--;continue}if(u=(15&f)<<12|(63&m)<<6|63&w,u<2048||u>=55296&&u<=57343||u===65279)continue;_[g++]=u}else if((248&f)==240){if(a>=S)return this.interim[0]=f,g;if(m=p[a++],(192&m)!=128){a--;continue}if(a>=S)return this.interim[0]=f,this.interim[1]=m,g;if(w=p[a++],(192&w)!=128){a--;continue}if(a>=S)return this.interim[0]=f,this.interim[1]=m,this.interim[2]=w,g;if(C=p[a++],(192&C)!=128){a--;continue}if(u=(7&f)<<18|(63&m)<<12|(63&w)<<6|63&C,u<65536||u>1114111)continue;_[g++]=u}}return g}}},225:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeV6=void 0;const _=p(1480),S=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],f=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let m;l.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let w=0;w<S.length;++w)m.fill(0,S[w][0],S[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?m[w]:(function(C,g){let u,h=0,o=g.length-1;if(C<g[0][0]||C>g[o][1])return!1;for(;o>=h;)if(u=h+o>>1,C>g[u][1])h=u+1;else{if(!(C<g[u][0]))return!0;o=u-1}return!1})(w,f)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,C){let g=this.wcwidth(w),u=g===0&&C!==0;if(u){const h=_.UnicodeService.extractWidth(C);h===0?u=!1:h>g&&(g=h)}return _.UnicodeService.createPropertyValue(0,g,u)}}},5981:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WriteBuffer=void 0;const _=p(8460),S=p(844);class f extends S.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,C){if(C!==void 0&&this._syncCalls>C)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);const u=this._callbacks.shift();u&&u()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,C){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(C),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(C)}_innerWrite(w=0,C=!0){const g=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const u=this._writeBuffer[this._bufferOffset],h=this._action(u,C);if(h){const a=v=>Date.now()-g>=12?setTimeout((()=>this._innerWrite(0,v))):this._innerWrite(g,v);return void h.catch((v=>(queueMicrotask((()=>{throw v})),Promise.resolve(!1)))).then(a)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=u.length,Date.now()-g>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}l.WriteBuffer=f},5941:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.toRgbString=l.parseColor=void 0;const p=/^([\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 S(f,m){const w=f.toString(16),C=w.length<2?"0"+w:w;switch(m){case 4:return w[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}l.parseColor=function(f){if(!f)return;let m=f.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const w=p.exec(m);if(w){const C=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/C*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/C*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/C*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),_.exec(m)&&[3,6,9,12].includes(m.length))){const w=m.length/3,C=[0,0,0];for(let g=0;g<3;++g){const u=parseInt(m.slice(w*g,w*g+w),16);C[g]=w===1?u<<4:w===2?u:w===3?u>>4:u>>8}return C}},l.toRgbString=function(f,m=16){const[w,C,g]=f;return`rgb:${S(w,m)}/${S(C,m)}/${S(g,m)}`}},5770:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.PAYLOAD_LIMIT=void 0,l.PAYLOAD_LIMIT=1e7},6351:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DcsHandler=l.DcsParser=void 0;const _=p(482),S=p(8742),f=p(5770),m=[];l.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(C,g){this._handlers[C]===void 0&&(this._handlers[C]=[]);const u=this._handlers[C];return u.push(g),{dispose:()=>{const h=u.indexOf(g);h!==-1&&u.splice(h,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}reset(){if(this._active.length)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(C,g){if(this.reset(),this._ident=C,this._active=this._handlers[C]||m,this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].hook(g);else this._handlerFb(this._ident,"HOOK",g)}put(C,g,u){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(C,g,u);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(C,g,u))}unhook(C,g=!0){if(this._active.length){let u=!1,h=this._active.length-1,o=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,u=g,o=this._stack.fallThrough,this._stack.paused=!1),!o&&u===!1){for(;h>=0&&(u=this._active[h].unhook(C),u!==!0);h--)if(u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,u;h--}for(;h>=0;h--)if(u=this._active[h].unhook(!1),u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,u}else this._handlerFb(this._ident,"UNHOOK",C);this._active=m,this._ident=0}};const w=new S.Params;w.addParam(0),l.DcsHandler=class{constructor(C){this._handler=C,this._data="",this._params=w,this._hitLimit=!1}hook(C){this._params=C.length>1||C.params[0]?C.clone():w,this._data="",this._hitLimit=!1}put(C,g,u){this._hitLimit||(this._data+=(0,_.utf32ToString)(C,g,u),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let g=!1;if(this._hitLimit)g=!1;else if(C&&(g=this._handler(this._data,this._params),g instanceof Promise))return g.then((u=>(this._params=w,this._data="",this._hitLimit=!1,u)));return this._params=w,this._data="",this._hitLimit=!1,g}}},2015:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.EscapeSequenceParser=l.VT500_TRANSITION_TABLE=l.TransitionTable=void 0;const _=p(844),S=p(8742),f=p(6242),m=p(6351);class w{constructor(h){this.table=new Uint8Array(h)}setDefault(h,o){this.table.fill(h<<4|o)}add(h,o,a,v){this.table[o<<8|h]=a<<4|v}addMany(h,o,a,v){for(let E=0;E<h.length;E++)this.table[o<<8|h[E]]=a<<4|v}}l.TransitionTable=w;const C=160;l.VT500_TRANSITION_TABLE=(function(){const u=new w(4095),h=Array.apply(null,Array(256)).map(((k,y)=>y)),o=(k,y)=>h.slice(k,y),a=o(32,127),v=o(0,24);v.push(25),v.push.apply(v,o(28,32));const E=o(0,14);let x;for(x in u.setDefault(1,0),u.addMany(a,0,2,0),E)u.addMany([24,26,153,154],x,3,0),u.addMany(o(128,144),x,3,0),u.addMany(o(144,152),x,3,0),u.add(156,x,0,0),u.add(27,x,11,1),u.add(157,x,4,8),u.addMany([152,158,159],x,0,7),u.add(155,x,11,3),u.add(144,x,11,9);return u.addMany(v,0,3,0),u.addMany(v,1,3,1),u.add(127,1,0,1),u.addMany(v,8,0,8),u.addMany(v,3,3,3),u.add(127,3,0,3),u.addMany(v,4,3,4),u.add(127,4,0,4),u.addMany(v,6,3,6),u.addMany(v,5,3,5),u.add(127,5,0,5),u.addMany(v,2,3,2),u.add(127,2,0,2),u.add(93,1,4,8),u.addMany(a,8,5,8),u.add(127,8,5,8),u.addMany([156,27,24,26,7],8,6,0),u.addMany(o(28,32),8,0,8),u.addMany([88,94,95],1,0,7),u.addMany(a,7,0,7),u.addMany(v,7,0,7),u.add(156,7,0,0),u.add(127,7,0,7),u.add(91,1,11,3),u.addMany(o(64,127),3,7,0),u.addMany(o(48,60),3,8,4),u.addMany([60,61,62,63],3,9,4),u.addMany(o(48,60),4,8,4),u.addMany(o(64,127),4,7,0),u.addMany([60,61,62,63],4,0,6),u.addMany(o(32,64),6,0,6),u.add(127,6,0,6),u.addMany(o(64,127),6,0,0),u.addMany(o(32,48),3,9,5),u.addMany(o(32,48),5,9,5),u.addMany(o(48,64),5,0,6),u.addMany(o(64,127),5,7,0),u.addMany(o(32,48),4,9,5),u.addMany(o(32,48),1,9,2),u.addMany(o(32,48),2,9,2),u.addMany(o(48,127),2,10,0),u.addMany(o(48,80),1,10,0),u.addMany(o(81,88),1,10,0),u.addMany([89,90,92],1,10,0),u.addMany(o(96,127),1,10,0),u.add(80,1,11,9),u.addMany(v,9,0,9),u.add(127,9,0,9),u.addMany(o(28,32),9,0,9),u.addMany(o(32,48),9,9,12),u.addMany(o(48,60),9,8,10),u.addMany([60,61,62,63],9,9,10),u.addMany(v,11,0,11),u.addMany(o(32,128),11,0,11),u.addMany(o(28,32),11,0,11),u.addMany(v,10,0,10),u.add(127,10,0,10),u.addMany(o(28,32),10,0,10),u.addMany(o(48,60),10,8,10),u.addMany([60,61,62,63],10,0,11),u.addMany(o(32,48),10,9,12),u.addMany(v,12,0,12),u.add(127,12,0,12),u.addMany(o(28,32),12,0,12),u.addMany(o(32,48),12,9,12),u.addMany(o(48,64),12,0,11),u.addMany(o(64,127),12,12,13),u.addMany(o(64,127),10,12,13),u.addMany(o(64,127),9,12,13),u.addMany(v,13,13,13),u.addMany(a,13,13,13),u.add(127,13,0,13),u.addMany([27,156,24,26],13,14,0),u.add(C,0,2,0),u.add(C,8,5,8),u.add(C,6,0,6),u.add(C,11,0,11),u.add(C,13,13,13),u})();class g extends _.Disposable{constructor(h=l.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new S.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,a,v)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,a)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,_.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,o=[64,126]){let a=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(a=h.prefix.charCodeAt(0),a&&60>a||a>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;E<h.intermediates.length;++E){const x=h.intermediates.charCodeAt(E);if(32>x||x>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");a<<=8,a|=x}}if(h.final.length!==1)throw new Error("final must be a single byte");const v=h.final.charCodeAt(0);if(o[0]>v||v>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return a<<=8,a|=v,a}identToString(h){const o=[];for(;h;)o.push(String.fromCharCode(255&h)),h>>=8;return o.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,o){const a=this._identifier(h,[48,126]);this._escHandlers[a]===void 0&&(this._escHandlers[a]=[]);const v=this._escHandlers[a];return v.push(o),{dispose:()=>{const E=v.indexOf(o);E!==-1&&v.splice(E,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,o){this._executeHandlers[h.charCodeAt(0)]=o}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,o){const a=this._identifier(h);this._csiHandlers[a]===void 0&&(this._csiHandlers[a]=[]);const v=this._csiHandlers[a];return v.push(o),{dispose:()=>{const E=v.indexOf(o);E!==-1&&v.splice(E,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,o){return this._dcsParser.registerHandler(this._identifier(h),o)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,o){return this._oscParser.registerHandler(h,o)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,o,a,v,E){this._parseStack.state=h,this._parseStack.handlers=o,this._parseStack.handlerPos=a,this._parseStack.transition=v,this._parseStack.chunkPos=E}parse(h,o,a){let v,E=0,x=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(a===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const y=this._parseStack.handlers;let T=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(a===!1&&T>-1){for(;T>=0&&(v=y[T](this._params),v!==!0);T--)if(v instanceof Promise)return this._parseStack.handlerPos=T,v}this._parseStack.handlers=[];break;case 4:if(a===!1&&T>-1){for(;T>=0&&(v=y[T](),v!==!0);T--)if(v instanceof Promise)return this._parseStack.handlerPos=T,v}this._parseStack.handlers=[];break;case 6:if(E=h[this._parseStack.chunkPos],v=this._dcsParser.unhook(E!==24&&E!==26,a),v)return v;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=h[this._parseStack.chunkPos],v=this._oscParser.end(E!==24&&E!==26,a),v)return v;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,k=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let y=k;y<o;++y){switch(E=h[y],x=this._transitions.table[this.currentState<<8|(E<160?E:C)],x>>4){case 2:for(let Y=y+1;;++Y){if(Y>=o||(E=h[Y])<32||E>126&&E<C){this._printHandler(h,y,Y),y=Y-1;break}if(++Y>=o||(E=h[Y])<32||E>126&&E<C){this._printHandler(h,y,Y),y=Y-1;break}if(++Y>=o||(E=h[Y])<32||E>126&&E<C){this._printHandler(h,y,Y),y=Y-1;break}if(++Y>=o||(E=h[Y])<32||E>126&&E<C){this._printHandler(h,y,Y),y=Y-1;break}}break;case 3:this._executeHandlers[E]?this._executeHandlers[E]():this._executeHandlerFb(E),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:y,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const T=this._csiHandlers[this._collect<<8|E];let M=T?T.length-1:-1;for(;M>=0&&(v=T[M](this._params),v!==!0);M--)if(v instanceof Promise)return this._preserveStack(3,T,M,x,y),v;M<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++y<o&&(E=h[y])>47&&E<60);y--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const j=this._escHandlers[this._collect<<8|E];let z=j?j.length-1:-1;for(;z>=0&&(v=j[z](),v!==!0);z--)if(v instanceof Promise)return this._preserveStack(4,j,z,x,y),v;z<0&&this._escHandlerFb(this._collect<<8|E),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|E,this._params);break;case 13:for(let Y=y+1;;++Y)if(Y>=o||(E=h[Y])===24||E===26||E===27||E>127&&E<C){this._dcsParser.put(h,y,Y),y=Y-1;break}break;case 14:if(v=this._dcsParser.unhook(E!==24&&E!==26),v)return this._preserveStack(6,[],0,x,y),v;E===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let Y=y+1;;Y++)if(Y>=o||(E=h[Y])<32||E>127&&E<C){this._oscParser.put(h,y,Y),y=Y-1;break}break;case 6:if(v=this._oscParser.end(E!==24&&E!==26),v)return this._preserveStack(5,[],0,x,y),v;E===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&x}}}l.EscapeSequenceParser=g},6242:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.OscHandler=l.OscParser=void 0;const _=p(5770),S=p(482),f=[];l.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,w){this._handlers[m]===void 0&&(this._handlers[m]=[]);const C=this._handlers[m];return C.push(w),{dispose:()=>{const g=C.indexOf(w);g!==-1&&C.splice(g,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,w,C){if(this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].put(m,w,C);else this._handlerFb(this._id,"PUT",(0,S.utf32ToString)(m,w,C))}start(){this.reset(),this._state=1}put(m,w,C){if(this._state!==3){if(this._state===1)for(;w<C;){const g=m[w++];if(g===59){this._state=2,this._start();break}if(g<48||57<g)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+g-48}this._state===2&&C-w>0&&this._put(m,w,C)}}end(m,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,g=this._active.length-1,u=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,C=w,u=this._stack.fallThrough,this._stack.paused=!1),!u&&C===!1){for(;g>=0&&(C=this._active[g].end(m),C!==!0);g--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,C;g--}for(;g>=0;g--)if(C=this._active[g].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",m);this._active=f,this._id=-1,this._state=0}}},l.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,w,C){this._hitLimit||(this._data+=(0,S.utf32ToString)(m,w,C),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let w=!1;if(this._hitLimit)w=!1;else if(m&&(w=this._handler(this._data),w instanceof Promise))return w.then((C=>(this._data="",this._hitLimit=!1,C)));return this._data="",this._hitLimit=!1,w}}},8742:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Params=void 0;const p=2147483647;class _{static fromArray(f){const m=new _;if(!f.length)return m;for(let w=Array.isArray(f[0])?1:0;w<f.length;++w){const C=f[w];if(Array.isArray(C))for(let g=0;g<C.length;++g)m.addSubParam(C[g]);else m.addParam(C)}return m}constructor(f=32,m=32){if(this.maxLength=f,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new _(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let m=0;m<this.length;++m){f.push(this.params[m]);const w=this._subParamsIdx[m]>>8,C=255&this._subParamsIdx[m];C-w>0&&f.push(Array.prototype.slice.call(this._subParams,w,C))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>p?p:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>p?p:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const m=this._subParamsIdx[f]>>8,w=255&this._subParamsIdx[f];return w-m>0?this._subParams.subarray(m,w):null}getSubParamsAll(){const f={};for(let m=0;m<this.length;++m){const w=this._subParamsIdx[m]>>8,C=255&this._subParamsIdx[m];C-w>0&&(f[m]=this._subParams.slice(w,C))}return f}addDigit(f){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,C=w[m-1];w[m-1]=~C?Math.min(10*C+f,p):f}}l.Params=_},5741:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.AddonManager=void 0,l.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let p=this._addons.length-1;p>=0;p--)this._addons[p].instance.dispose()}loadAddon(p,_){const S={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(S),_.dispose=()=>this._wrappedAddonDispose(S),_.activate(p)}_wrappedAddonDispose(p){if(p.isDisposed)return;let _=-1;for(let S=0;S<this._addons.length;S++)if(this._addons[S]===p){_=S;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");p.isDisposed=!0,p.dispose.apply(p.instance),this._addons.splice(_,1)}}},8771:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferApiView=void 0;const _=p(3785),S=p(511);l.BufferApiView=class{constructor(f,m){this._buffer=f,this.type=m}init(f){return this._buffer=f,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(f){const m=this._buffer.lines.get(f);if(m)return new _.BufferLineApiView(m)}getNullCell(){return new S.CellData}}},3785:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLineApiView=void 0;const _=p(511);l.BufferLineApiView=class{constructor(S){this._line=S}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(S,f){if(!(S<0||S>=this._line.length))return f?(this._line.loadCell(S,f),f):this._line.loadCell(S,new _.CellData)}translateToString(S,f,m){return this._line.translateToString(S,f,m)}}},8285:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferNamespaceApi=void 0;const _=p(8771),S=p(8460),f=p(844);class m extends f.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new S.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}l.BufferNamespaceApi=m},7975:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ParserApi=void 0,l.ParserApi=class{constructor(p){this._core=p}registerCsiHandler(p,_){return this._core.registerCsiHandler(p,(S=>_(S.toArray())))}addCsiHandler(p,_){return this.registerCsiHandler(p,_)}registerDcsHandler(p,_){return this._core.registerDcsHandler(p,((S,f)=>_(S,f.toArray())))}addDcsHandler(p,_){return this.registerDcsHandler(p,_)}registerEscHandler(p,_){return this._core.registerEscHandler(p,_)}addEscHandler(p,_){return this.registerEscHandler(p,_)}registerOscHandler(p,_){return this._core.registerOscHandler(p,_)}addOscHandler(p,_){return this.registerOscHandler(p,_)}}},7090:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeApi=void 0,l.UnicodeApi=class{constructor(p){this._core=p}register(p){this._core.unicodeService.register(p)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(p){this._core.unicodeService.activeVersion=p}}},744:function(I,l,p){var _=this&&this.__decorate||function(u,h,o,a){var v,E=arguments.length,x=E<3?h:a===null?a=Object.getOwnPropertyDescriptor(h,o):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(u,h,o,a);else for(var k=u.length-1;k>=0;k--)(v=u[k])&&(x=(E<3?v(x):E>3?v(h,o,x):v(h,o))||x);return E>3&&x&&Object.defineProperty(h,o,x),x},S=this&&this.__param||function(u,h){return function(o,a){h(o,a,u)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferService=l.MINIMUM_ROWS=l.MINIMUM_COLS=void 0;const f=p(8460),m=p(844),w=p(5295),C=p(2585);l.MINIMUM_COLS=2,l.MINIMUM_ROWS=1;let g=l.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(u){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(u.rawOptions.cols||0,l.MINIMUM_COLS),this.rows=Math.max(u.rawOptions.rows||0,l.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(u,this))}resize(u,h){this.cols=u,this.rows=h,this.buffers.resize(u,h),this._onResize.fire({cols:u,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(u,h=!1){const o=this.buffer;let a;a=this._cachedBlankLine,a&&a.length===this.cols&&a.getFg(0)===u.fg&&a.getBg(0)===u.bg||(a=o.getBlankLine(u,h),this._cachedBlankLine=a),a.isWrapped=h;const v=o.ybase+o.scrollTop,E=o.ybase+o.scrollBottom;if(o.scrollTop===0){const x=o.lines.isFull;E===o.lines.length-1?x?o.lines.recycle().copyFrom(a):o.lines.push(a.clone()):o.lines.splice(E+1,0,a.clone()),x?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const x=E-v+1;o.lines.shiftElements(v+1,x-1,-1),o.lines.set(E,a.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(u,h,o){const a=this.buffer;if(u<0){if(a.ydisp===0)return;this.isUserScrolling=!0}else u+a.ydisp>=a.ybase&&(this.isUserScrolling=!1);const v=a.ydisp;a.ydisp=Math.max(Math.min(a.ydisp+u,a.ybase),0),v!==a.ydisp&&(h||this._onScroll.fire(a.ydisp))}};l.BufferService=g=_([S(0,C.IOptionsService)],g)},7994:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CharsetService=void 0,l.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(p){this.glevel=p,this.charset=this._charsets[p]}setgCharset(p,_){this._charsets[p]=_,this.glevel===p&&(this.charset=_)}}},1753:function(I,l,p){var _=this&&this.__decorate||function(a,v,E,x){var k,y=arguments.length,T=y<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,E):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(a,v,E,x);else for(var M=a.length-1;M>=0;M--)(k=a[M])&&(T=(y<3?k(T):y>3?k(v,E,T):k(v,E))||T);return y>3&&T&&Object.defineProperty(v,E,T),T},S=this&&this.__param||function(a,v){return function(E,x){v(E,x,a)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreMouseService=void 0;const f=p(2585),m=p(8460),w=p(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:a=>a.button!==4&&a.action===1&&(a.ctrl=!1,a.alt=!1,a.shift=!1,!0)},VT200:{events:19,restrict:a=>a.action!==32},DRAG:{events:23,restrict:a=>a.action!==32||a.button!==3},ANY:{events:31,restrict:a=>!0}};function g(a,v){let E=(a.ctrl?16:0)|(a.shift?4:0)|(a.alt?8:0);return a.button===4?(E|=64,E|=a.action):(E|=3&a.button,4&a.button&&(E|=64),8&a.button&&(E|=128),a.action===32?E|=32:a.action!==0||v||(E|=3)),E}const u=String.fromCharCode,h={DEFAULT:a=>{const v=[g(a,!1)+32,a.col+32,a.row+32];return v[0]>255||v[1]>255||v[2]>255?"":`\x1B[M${u(v[0])}${u(v[1])}${u(v[2])}`},SGR:a=>{const v=a.action===0&&a.button!==4?"m":"M";return`\x1B[<${g(a,!0)};${a.col};${a.row}${v}`},SGR_PIXELS:a=>{const v=a.action===0&&a.button!==4?"m":"M";return`\x1B[<${g(a,!0)};${a.x};${a.y}${v}`}};let o=l.CoreMouseService=class extends w.Disposable{constructor(a,v){super(),this._bufferService=a,this._coreService=v,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(C))this.addProtocol(E,C[E]);for(const E of Object.keys(h))this.addEncoding(E,h[E]);this.reset()}addProtocol(a,v){this._protocols[a]=v}addEncoding(a,v){this._encodings[a]=v}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(a){if(!this._protocols[a])throw new Error(`unknown protocol "${a}"`);this._activeProtocol=a,this._onProtocolChange.fire(this._protocols[a].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(a){if(!this._encodings[a])throw new Error(`unknown encoding "${a}"`);this._activeEncoding=a}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(a){if(a.col<0||a.col>=this._bufferService.cols||a.row<0||a.row>=this._bufferService.rows||a.button===4&&a.action===32||a.button===3&&a.action!==32||a.button!==4&&(a.action===2||a.action===3)||(a.col++,a.row++,a.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,a,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(a))return!1;const v=this._encodings[this._activeEncoding](a);return v&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(v):this._coreService.triggerDataEvent(v,!0)),this._lastEvent=a,!0}explainEvents(a){return{down:!!(1&a),up:!!(2&a),drag:!!(4&a),move:!!(8&a),wheel:!!(16&a)}}_equalEvents(a,v,E){if(E){if(a.x!==v.x||a.y!==v.y)return!1}else if(a.col!==v.col||a.row!==v.row)return!1;return a.button===v.button&&a.action===v.action&&a.ctrl===v.ctrl&&a.alt===v.alt&&a.shift===v.shift}};l.CoreMouseService=o=_([S(0,f.IBufferService),S(1,f.ICoreService)],o)},6975:function(I,l,p){var _=this&&this.__decorate||function(o,a,v,E){var x,k=arguments.length,y=k<3?a:E===null?E=Object.getOwnPropertyDescriptor(a,v):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,a,v,E);else for(var T=o.length-1;T>=0;T--)(x=o[T])&&(y=(k<3?x(y):k>3?x(a,v,y):x(a,v))||y);return k>3&&y&&Object.defineProperty(a,v,y),y},S=this&&this.__param||function(o,a){return function(v,E){a(v,E,o)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreService=void 0;const f=p(1439),m=p(8460),w=p(844),C=p(2585),g=Object.freeze({insertMode:!1}),u=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=l.CoreService=class extends w.Disposable{constructor(o,a,v){super(),this._bufferService=o,this._logService=a,this._optionsService=v,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(g),this.decPrivateModes=(0,f.clone)(u)}reset(){this.modes=(0,f.clone)(g),this.decPrivateModes=(0,f.clone)(u)}triggerDataEvent(o,a=!1){if(this._optionsService.rawOptions.disableStdin)return;const v=this._bufferService.buffer;a&&this._optionsService.rawOptions.scrollOnUserInput&&v.ybase!==v.ydisp&&this._onRequestScrollToBottom.fire(),a&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((E=>E.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((a=>a.charCodeAt(0))))),this._onBinary.fire(o))}};l.CoreService=h=_([S(0,C.IBufferService),S(1,C.ILogService),S(2,C.IOptionsService)],h)},9074:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DecorationService=void 0;const _=p(8055),S=p(8460),f=p(844),m=p(6106);let w=0,C=0;class g extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new S.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new S.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const a=new u(o);if(a){const v=a.marker.onDispose((()=>a.dispose()));a.onDispose((()=>{a&&(this._decorations.delete(a)&&this._onDecorationRemoved.fire(a),v.dispose())})),this._decorations.insert(a),this._onDecorationRegistered.fire(a)}return a}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,a,v){let E=0,x=0;for(const k of this._decorations.getKeyIterator(a))E=k.options.x??0,x=E+(k.options.width??1),o>=E&&o<x&&(!v||(k.options.layer??"bottom")===v)&&(yield k)}forEachDecorationAtCell(o,a,v,E){this._decorations.forEachByKey(a,(x=>{w=x.options.x??0,C=w+(x.options.width??1),o>=w&&o<C&&(!v||(x.options.layer??"bottom")===v)&&E(x)}))}}l.DecorationService=g;class u extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=_.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=_.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new S.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new S.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.InstantiationService=l.ServiceCollection=void 0;const _=p(2585),S=p(8343);class f{constructor(...w){this._entries=new Map;for(const[C,g]of w)this.set(C,g)}set(w,C){const g=this._entries.get(w);return this._entries.set(w,C),g}forEach(w){for(const[C,g]of this._entries.entries())w(C,g)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}l.ServiceCollection=f,l.InstantiationService=class{constructor(){this._services=new f,this._services.set(_.IInstantiationService,this)}setService(m,w){this._services.set(m,w)}getService(m){return this._services.get(m)}createInstance(m,...w){const C=(0,S.getServiceDependencies)(m).sort(((h,o)=>h.index-o.index)),g=[];for(const h of C){const o=this._services.get(h.id);if(!o)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${h.id}.`);g.push(o)}const u=C.length>0?C[0].index:w.length;if(w.length!==u)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${u+1} conflicts with ${w.length} static arguments`);return new m(...w,...g)}}},7866:function(I,l,p){var _=this&&this.__decorate||function(u,h,o,a){var v,E=arguments.length,x=E<3?h:a===null?a=Object.getOwnPropertyDescriptor(h,o):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(u,h,o,a);else for(var k=u.length-1;k>=0;k--)(v=u[k])&&(x=(E<3?v(x):E>3?v(h,o,x):v(h,o))||x);return E>3&&x&&Object.defineProperty(h,o,x),x},S=this&&this.__param||function(u,h){return function(o,a){h(o,a,u)}};Object.defineProperty(l,"__esModule",{value:!0}),l.traceCall=l.setTraceLogger=l.LogService=void 0;const f=p(844),m=p(2585),w={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let C,g=l.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(u){super(),this._optionsService=u,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(u){for(let h=0;h<u.length;h++)typeof u[h]=="function"&&(u[h]=u[h]())}_log(u,h,o){this._evalLazyOptionalParams(o),u.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(u,...h){var o;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,u,h)}debug(u,...h){var o;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,u,h)}info(u,...h){var o;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,u,h)}warn(u,...h){var o;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,u,h)}error(u,...h){var o;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,u,h)}};l.LogService=g=_([S(0,m.IOptionsService)],g),l.setTraceLogger=function(u){C=u},l.traceCall=function(u,h,o){if(typeof o.value!="function")throw new Error("not supported");const a=o.value;o.value=function(...v){if(C.logLevel!==m.LogLevelEnum.TRACE)return a.apply(this,v);C.trace(`GlyphRenderer#${a.name}(${v.map((x=>JSON.stringify(x))).join(", ")})`);const E=a.apply(this,v);return C.trace(`GlyphRenderer#${a.name} return`,E),E}}},7302:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.OptionsService=l.DEFAULT_OPTIONS=void 0;const _=p(8460),S=p(844),f=p(6114);l.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends S.Disposable{constructor(g){super(),this._onOptionChange=this.register(new _.EventEmitter),this.onOptionChange=this._onOptionChange.event;const u={...l.DEFAULT_OPTIONS};for(const h in g)if(h in u)try{const o=g[h];u[h]=this._sanitizeAndValidateOption(h,o)}catch(o){console.error(o)}this.rawOptions=u,this.options={...u},this._setupOptions(),this.register((0,S.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(g,u){return this.onOptionChange((h=>{h===g&&u(this.rawOptions[g])}))}onMultipleOptionChange(g,u){return this.onOptionChange((h=>{g.indexOf(h)!==-1&&u()}))}_setupOptions(){const g=h=>{if(!(h in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},u=(h,o)=>{if(!(h in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);o=this._sanitizeAndValidateOption(h,o),this.rawOptions[h]!==o&&(this.rawOptions[h]=o,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const o={get:g.bind(this,h),set:u.bind(this,h)};Object.defineProperty(this.options,h,o)}}_sanitizeAndValidateOption(g,u){switch(g){case"cursorStyle":if(u||(u=l.DEFAULT_OPTIONS[g]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(u))throw new Error(`"${u}" is not a valid value for ${g}`);break;case"wordSeparator":u||(u=l.DEFAULT_OPTIONS[g]);break;case"fontWeight":case"fontWeightBold":if(typeof u=="number"&&1<=u&&u<=1e3)break;u=m.includes(u)?u:l.DEFAULT_OPTIONS[g];break;case"cursorWidth":u=Math.floor(u);case"lineHeight":case"tabStopWidth":if(u<1)throw new Error(`${g} cannot be less than 1, value: ${u}`);break;case"minimumContrastRatio":u=Math.max(1,Math.min(21,Math.round(10*u)/10));break;case"scrollback":if((u=Math.min(u,4294967295))<0)throw new Error(`${g} cannot be less than 0, value: ${u}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(u<=0)throw new Error(`${g} cannot be less than or equal to 0, value: ${u}`);break;case"rows":case"cols":if(!u&&u!==0)throw new Error(`${g} must be numeric, value: ${u}`);break;case"windowsPty":u=u??{}}return u}}l.OptionsService=w},2660:function(I,l,p){var _=this&&this.__decorate||function(w,C,g,u){var h,o=arguments.length,a=o<3?C:u===null?u=Object.getOwnPropertyDescriptor(C,g):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(w,C,g,u);else for(var v=w.length-1;v>=0;v--)(h=w[v])&&(a=(o<3?h(a):o>3?h(C,g,a):h(C,g))||a);return o>3&&a&&Object.defineProperty(C,g,a),a},S=this&&this.__param||function(w,C){return function(g,u){C(g,u,w)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkService=void 0;const f=p(2585);let m=l.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const C=this._bufferService.buffer;if(w.id===void 0){const v=C.addMarker(C.ybase+C.y),E={data:w,id:this._nextId++,lines:[v]};return v.onDispose((()=>this._removeMarkerFromLink(E,v))),this._dataByLinkId.set(E.id,E),E.id}const g=w,u=this._getEntryIdKey(g),h=this._entriesWithId.get(u);if(h)return this.addLineToLink(h.id,C.ybase+C.y),h.id;const o=C.addMarker(C.ybase+C.y),a={id:this._nextId++,key:this._getEntryIdKey(g),data:g,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(a,o))),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(w,C){const g=this._dataByLinkId.get(w);if(g&&g.lines.every((u=>u.line!==C))){const u=this._bufferService.buffer.addMarker(C);g.lines.push(u),u.onDispose((()=>this._removeMarkerFromLink(g,u)))}}getLinkData(w){var C;return(C=this._dataByLinkId.get(w))==null?void 0:C.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,C){const g=w.lines.indexOf(C);g!==-1&&(w.lines.splice(g,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};l.OscLinkService=m=_([S(0,f.IBufferService)],m)},8343:(I,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.createDecorator=l.getServiceDependencies=l.serviceRegistry=void 0;const p="di$target",_="di$dependencies";l.serviceRegistry=new Map,l.getServiceDependencies=function(S){return S[_]||[]},l.createDecorator=function(S){if(l.serviceRegistry.has(S))return l.serviceRegistry.get(S);const f=function(m,w,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,u,h){u[p]===u?u[_].push({id:g,index:h}):(u[_]=[{id:g,index:h}],u[p]=u)})(f,m,C)};return f.toString=()=>S,l.serviceRegistry.set(S,f),f}},2585:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.IDecorationService=l.IUnicodeService=l.IOscLinkService=l.IOptionsService=l.ILogService=l.LogLevelEnum=l.IInstantiationService=l.ICharsetService=l.ICoreService=l.ICoreMouseService=l.IBufferService=void 0;const _=p(8343);var S;l.IBufferService=(0,_.createDecorator)("BufferService"),l.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),l.ICoreService=(0,_.createDecorator)("CoreService"),l.ICharsetService=(0,_.createDecorator)("CharsetService"),l.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(S||(l.LogLevelEnum=S={})),l.ILogService=(0,_.createDecorator)("LogService"),l.IOptionsService=(0,_.createDecorator)("OptionsService"),l.IOscLinkService=(0,_.createDecorator)("OscLinkService"),l.IUnicodeService=(0,_.createDecorator)("UnicodeService"),l.IDecorationService=(0,_.createDecorator)("DecorationService")},1480:(I,l,p)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeService=void 0;const _=p(8460),S=p(225);class f{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,C,g=!1){return(16777215&w)<<3|(3&C)<<1|(g?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter,this.onChange=this._onChange.event;const w=new S.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let C=0,g=0;const u=w.length;for(let h=0;h<u;++h){let o=w.charCodeAt(h);if(55296<=o&&o<=56319){if(++h>=u)return C+this.wcwidth(o);const E=w.charCodeAt(h);56320<=E&&E<=57343?o=1024*(o-55296)+E-56320+65536:C+=this.wcwidth(E)}const a=this.charProperties(o,g);let v=f.extractWidth(a);f.extractShouldJoin(a)&&(v-=f.extractWidth(g)),C+=v,g=a}return C}charProperties(w,C){return this._activeProvider.charProperties(w,C)}}l.UnicodeService=f}},H={};function K(I){var l=H[I];if(l!==void 0)return l.exports;var p=H[I]={exports:{}};return X[I].call(p.exports,p,p.exports,K),p.exports}var ie={};return(()=>{var I=ie;Object.defineProperty(I,"__esModule",{value:!0}),I.Terminal=void 0;const l=K(9042),p=K(3236),_=K(844),S=K(5741),f=K(8285),m=K(7975),w=K(7090),C=["cols","rows"];class g extends _.Disposable{constructor(h){super(),this._core=this.register(new p.Terminal(h)),this._addonManager=this.register(new S.AddonManager),this._publicOptions={...this._core.options};const o=v=>this._core.options[v],a=(v,E)=>{this._checkReadonlyOptions(v),this._core.options[v]=E};for(const v in this._core.options){const E={get:o.bind(this,v),set:a.bind(this,v)};Object.defineProperty(this._publicOptions,v,E)}}_checkReadonlyOptions(h){if(C.includes(h))throw new Error(`Option "${h}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const o in h)this._publicOptions[o]=h[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,o=!0){this._core.input(h,o)}resize(h,o){this._verifyIntegers(h,o),this._core.resize(h,o)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,o,a){this._verifyIntegers(h,o,a),this._core.select(h,o,a)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,o){this._verifyIntegers(h,o),this._core.selectLines(h,o)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,o){this._core.write(h,o)}writeln(h,o){this._core.write(h),this._core.write(`\r
|
|
283
|
-
`,o)}paste(h){this._core.paste(h)}refresh(h,o){this._verifyIntegers(h,o),this._core.refresh(h,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return l}_verifyIntegers(...h){for(const o of h)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const o of h)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}I.Terminal=g})(),ie})()))})(Hm)),Hm.exports}var pE=mE(),Um={exports:{}},$w;function bE(){return $w||($w=1,(function(N,R){(function(X,H){N.exports=H()})(self,(()=>(()=>{var X={};return(()=>{var H=X;Object.defineProperty(H,"__esModule",{value:!0}),H.FitAddon=void 0,H.FitAddon=class{activate(K){this._terminal=K}dispose(){}fit(){const K=this.proposeDimensions();if(!K||!this._terminal||isNaN(K.cols)||isNaN(K.rows))return;const ie=this._terminal._core;this._terminal.rows===K.rows&&this._terminal.cols===K.cols||(ie._renderService.clear(),this._terminal.resize(K.cols,K.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const K=this._terminal._core,ie=K._renderService.dimensions;if(ie.css.cell.width===0||ie.css.cell.height===0)return;const I=this._terminal.options.scrollback===0?0:K.viewport.scrollBarWidth,l=window.getComputedStyle(this._terminal.element.parentElement),p=parseInt(l.getPropertyValue("height")),_=Math.max(0,parseInt(l.getPropertyValue("width"))),S=window.getComputedStyle(this._terminal.element),f=p-(parseInt(S.getPropertyValue("padding-top"))+parseInt(S.getPropertyValue("padding-bottom"))),m=_-(parseInt(S.getPropertyValue("padding-right"))+parseInt(S.getPropertyValue("padding-left")))-I;return{cols:Math.max(2,Math.floor(m/ie.css.cell.width)),rows:Math.max(1,Math.floor(f/ie.css.cell.height))}}}})(),X})()))})(Um)),Um.exports}var gE=bE();const qw=20,Pw=5,Ww=6,vE=1200,_E=2e3,Wu=4e3,wn=new TextEncoder,wE=new TextDecoder;function yE(N){return/\/api\/pty\/agents\//.test(N)?["pty-ws.v1"]:void 0}const Fw=N=>{try{const R=atob(N),X=new Uint8Array(R.length);for(let H=0;H<R.length;H++)X[H]=R.charCodeAt(H);return X}catch{return new Uint8Array(0)}},Gw=N=>{const R=wn.encode(N);let X="";for(let H=0;H<R.length;H++)X+=String.fromCharCode(R[H]);return btoa(X)};function Qw(N){if(!N)return null;const R=/\/agents\/([^/]+)\/sessions\/([^/]+)\/attach/;try{const H=new URL(N).pathname.match(R);return H?{instanceId:decodeURIComponent(H[1]),sessionId:decodeURIComponent(H[2])}:null}catch{const X=N.match(R);return X?{instanceId:decodeURIComponent(X[1]),sessionId:decodeURIComponent(X[2])}:null}}function SE(N){return N.replace(/\x1b\][\s\S]*?(?:\x07|\x1b\\)/g,"").replace(/\x1b\[\?[0-9;]*[cnhl]/g,"").replace(/\x1b\[[0-9;]*[Rn]/g,"")}function NE(N){return N.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"").replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[()][A-Za-z0-9]/g,"")}function EE(N){const X=NE(N).replace(/\r/g,`
|
|
284
|
-
`).split(`
|
|
285
|
-
`).map(ie=>ie.trim()).filter(Boolean).slice(-24),H=X.join(`
|
|
286
|
-
`);return[/Enter to select\b/i,/(?:↑|up)\/(?:↓|down)|arrow keys|navigate/i,/\bEsc to cancel\b/i,/\b(?:y\/n|Y\/n|y\/N|\[y\/N\]|\[Y\/n\])\b/,/\b(?:choose|select|pick) (?:one|an option|a number)\b/i,/\?$/].some(ie=>ie.test(H))?X.slice(-10).join(`
|
|
287
|
-
`).slice(0,900):""}function Kw(N,R){return N?`${N.instanceId}:${N.sessionId}`:`url:${R}`}class xE{constructor(R,X,H,K,ie){Wt(this,"term");Wt(this,"fit");Wt(this,"wrapper");Wt(this,"url");Wt(this,"target");Wt(this,"role",null);Wt(this,"attached",!1);Wt(this,"ws",null);Wt(this,"lastSeq",0);Wt(this,"connId",0);Wt(this,"closedByUser",!1);Wt(this,"gotFrame",!1);Wt(this,"retries",0);Wt(this,"outputTail","");Wt(this,"ro",null);Wt(this,"retryTimer",null);Wt(this,"noticeTimer",null);Wt(this,"deadlineTimer",null);Wt(this,"disposed",!1);this.onChange=H,this.onPrompt=K,this.isActive=ie,this.url=R,this.target=X,this.term=new pE.Terminal({convertEol:!1,scrollback:5e3,cursorBlink:!1,disableStdin:!0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:13,theme:{background:"#0a0c10",foreground:"#cdd3de"}}),this.fit=new gE.FitAddon,this.term.loadAddon(this.fit),this.wrapper=document.createElement("div"),this.wrapper.className="pty-surface",this.wrapper.style.width="100%",this.wrapper.style.height="100%";try{this.term.open(this.wrapper)}catch{}this.term.onData(I=>{if(this.role!=="controller")return;const l=SE(I);l&&(this.isActive()&&this.onPrompt(null),this.send("pty.session_input",{data:Gw(l)}))}),this.term.onResize(({cols:I,rows:l})=>{this.role==="controller"&&(I<qw||l<Pw||this.send("pty.session_resize",{cols:I,rows:l}))})}fitSafe(){try{this.fit.fit()}catch{}}write(R){const X=wE.decode(R,{stream:!0});if(X){this.outputTail=(this.outputTail+X).slice(-6e3);const H=EE(this.outputTail);H&&this.isActive()&&this.onPrompt({needed:!0,prompt:H,since:new Date().toISOString(),source:"pty"})}try{this.term.write(R)}catch{}}send(R,X){var H;try{(H=this.ws)==null||H.send(JSON.stringify(X===void 0?{op:R}:{op:R,payload:X}))}catch{}}sendOn(R,X,H){try{R.send(JSON.stringify(H===void 0?{op:X}:{op:X,payload:H}))}catch{}}clearTimers(){this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=null),this.noticeTimer&&(clearTimeout(this.noticeTimer),this.noticeTimer=null),this.deadlineTimer&&(clearTimeout(this.deadlineTimer),this.deadlineTimer=null)}clearFrameTimers(){this.noticeTimer&&(clearTimeout(this.noticeTimer),this.noticeTimer=null),this.deadlineTimer&&(clearTimeout(this.deadlineTimer),this.deadlineTimer=null)}setVisible(R){this.wrapper.style.display=R?"block":"none",R&&(this.fitSafe(),requestAnimationFrame(()=>this.fitSafe()))}onContainerResize(){this.wrapper.style.display!=="none"&&this.fitSafe()}connect(R,X,H){var I;this.clearTimers();const K=++this.connId;if(this.closedByUser=!1,this.retries=0,this.gotFrame=!1,(I=this.ws)==null||I.close(),!X){this.lastSeq=0,this.outputTail="";try{this.term.reset()}catch{}}this.role=null,this.term.options.disableStdin=!0,this.attached=!1,this.isActive()&&this.onPrompt(null),this.onChange();const ie=()=>{if(this.connId!==K||this.closedByUser||this.disposed)return;const l=new WebSocket(this.url,yE(this.url));this.ws=l;let p=!1;l.addEventListener("open",()=>{this.connId!==K||this.ws!==l||(this.attached=!0,this.onChange(),this.clearFrameTimers(),this.noticeTimer=setTimeout(()=>{this.connId!==K||this.ws!==l||this.closedByUser||this.gotFrame||this.write(wn.encode(`\r
|
|
288
|
-
[attached — no output yet]\r
|
|
289
|
-
`))},_E),this.deadlineTimer=setTimeout(()=>{if(!(this.connId!==K||this.ws!==l||this.closedByUser||this.gotFrame)){if(this.role==="controller"){this.write(wn.encode(`\r
|
|
290
|
-
[attached — no output after ${Math.round(Wu/1e3)}s; requesting repaint]\r
|
|
291
|
-
`)),this.sendOn(l,"pty.request_keyframe");return}if(this.retries>=Ww){this.write(wn.encode(`\r
|
|
292
|
-
[attached — no output after ${Math.round(Wu/1e3)}s]\r
|
|
293
|
-
`));return}this.retries+=1,this.write(wn.encode(`\r
|
|
294
|
-
[attached — no output after ${Math.round(Wu/1e3)}s; requesting repaint]\r
|
|
295
|
-
`));try{l.close()}catch{}ie()}},Wu))});const _=()=>{if(!(this.connId!==K||this.ws!==l||p)&&(p=!0,this.clearFrameTimers(),this.role=null,this.attached=!1,this.onChange(),!(this.closedByUser||this.gotFrame))){if(this.retries<Ww){this.retries+=1,this.retries===1&&this.write(wn.encode(`\r
|
|
296
|
-
[waiting for session…]\r
|
|
297
|
-
`)),this.retryTimer=setTimeout(ie,vE);return}this.write(wn.encode(`\r
|
|
298
|
-
[connection error — session did not become ready]\r
|
|
299
|
-
`))}};l.addEventListener("close",_),l.addEventListener("error",_),l.addEventListener("message",S=>{var m,w,C,g;if(this.connId!==K||this.ws!==l)return;let f;try{f=JSON.parse(S.data)}catch{return}switch(f.op){case"binding_hello":{const u=H??(X?this.lastSeq:0);this.sendOn(l,"pty.join_session",{role:R,replay_from:u}),R==="controller"&&this.term.cols>=qw&&this.term.rows>=Pw&&this.sendOn(l,"pty.session_resize",{cols:this.term.cols,rows:this.term.rows});break}case"role_assigned":{const u=((m=f.payload)==null?void 0:m.role)??null;this.role=u,this.term.options.disableStdin=u!=="controller",this.onChange(),requestAnimationFrame(()=>this.fitSafe());break}case"output":this.clearFrameTimers(),this.gotFrame=!0,this.retries=0,f.seq&&(this.lastSeq=Math.max(this.lastSeq,f.seq)),this.write(Fw(((w=f.payload)==null?void 0:w.data)??""));break;case"keyframe":this.clearFrameTimers(),this.gotFrame=!0,this.retries=0;for(const u of((C=f.payload)==null?void 0:C.frames)??[])u.seq&&(this.lastSeq=Math.max(this.lastSeq,u.seq)),this.write(Fw(u.payload.data));break;case"error":this.write(wn.encode(`\r
|
|
300
|
-
[${((g=f.payload)==null?void 0:g.code)??"error"}]\r
|
|
301
|
-
`));break}})};ie()}requestKeyframe(){this.send("pty.request_keyframe")}sendInput(R){return!this.ws||this.role!=="controller"||!R?!1:(this.isActive()&&this.onPrompt(null),this.send("pty.session_input",{data:Gw(R+`\r
|
|
302
|
-
`)}),!0)}close(){var R;this.closedByUser=!0,this.connId+=1,this.role=null,this.attached=!1,this.term.options.disableStdin=!0,this.clearTimers(),(R=this.ws)==null||R.close(),this.ws=null,this.onChange()}dispose(){var R;this.disposed=!0,this.close();try{(R=this.ro)==null||R.disconnect()}catch{}try{this.term.dispose()}catch{}try{this.wrapper.remove()}catch{}}observe(R){this.ro||typeof ResizeObserver>"u"||(this.ro=new ResizeObserver(()=>this.onContainerResize()),this.ro.observe(R))}}function CE(){const N=se.useRef(new Map),R=se.useRef(""),X=se.useRef(null),[H,K]=se.useState({attached:!1,role:null,url:null,target:null}),[ie,I]=se.useState({needed:!1,prompt:"",since:null,source:"pty"}),l=()=>N.current.get(R.current)??null,p=se.useCallback(()=>{const o=N.current.get(R.current);if(!o){K({attached:!1,role:null,url:null,target:null});return}K({attached:o.attached,role:o.role,url:o.url,target:o.target})},[]),_=se.useCallback(o=>{I(o??{needed:!1,prompt:"",since:null,source:"pty"})},[]),S=se.useCallback(o=>{R.current=o;for(const[a,v]of N.current)v.setVisible(a===o);_(null),p()},[_,p]),f=se.useCallback((o,a=!1,v="observer",E)=>{const x=E??Qw(o),k=Kw(x,o);let y=N.current.get(k);y?(y.url=o,(a||v==="controller"&&y.role!=="controller")&&y.connect(v,a)):(y=new xE(o,x,p,_,()=>R.current===k),N.current.set(k,y),X.current&&(X.current.appendChild(y.wrapper),y.observe(X.current)),y.connect(v,a)),S(k)},[S,_,p]),m=se.useCallback(()=>{const o=l();if(!o)return;const a=R.current;o.dispose(),N.current.delete(a);const v=N.current.keys().next();v.done?(R.current="",_(null),p()):S(v.value)},[S,_,p]),w=se.useCallback((o,a,v)=>{const E=v??Qw(o),x=N.current.get(Kw(E,o)),k=a??(x==null?void 0:x.role)??"observer";f(o,!0,k,E)},[f]),C=se.useCallback(()=>{var o;(o=l())==null||o.requestKeyframe()},[]),g=se.useCallback((o,a)=>{const v=l();if(!v)return!1;if(a&&(!v.target||v.target.instanceId!==a.instanceId||v.target.sessionId!==a.sessionId)){try{v.term.write(wn.encode(`\r
|
|
303
|
-
[inject refused: target ${a.instanceId}:${a.sessionId} does not match attached session ${v.target?`${v.target.instanceId}:${v.target.sessionId}`:"none"}]\r
|
|
304
|
-
`))}catch{}return!1}return v.sendInput(o)},[]),u=se.useCallback(o=>{if(!o){X.current=null;return}X.current=o;for(const[a,v]of N.current)v.wrapper.parentElement!==o&&o.appendChild(v.wrapper),v.observe(o),v.setVisible(a===R.current)},[]);se.useEffect(()=>{const o=()=>{for(const a of N.current.values())a.onContainerResize()};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]);const h=N.current;return se.useEffect(()=>()=>{for(const o of h.values())o.dispose();h.clear()},[h]),{state:H,responseNeeded:ie,attach:f,detach:m,replay:w,requestKeyframe:C,sendInput:g,openTerminal:u,isController:H.role==="controller"}}let cy="";function DE(){if(typeof window>"u")return null;const N=new URLSearchParams(window.location.hash.replace(/^#/,"")),R=N.get("bootstrap")||"";return R?{nonce:R,audience:N.get("audience")||"browser",next:N.get("next")||""}:null}async function kE(){const N=DE(),R=N?await fetch("/bootstrap/session",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({nonce:N.nonce,audience:N.audience})}):await fetch("/bootstrap/session",{credentials:"same-origin"});if(!R.ok)throw new Error(`Cockpit session bootstrap failed (${R.status})`);const X=await R.json();if(!X.csrf)throw new Error("Cockpit session bootstrap returned no CSRF binding");cy=X.csrf,N&&typeof window<"u"&&window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}${N.next?`#${N.next}`:""}`)}let Zw;function uy(){return Zw??(Zw=kE()),Zw}async function hy(N,R={}){await uy();const X=String(R.method||"GET").toUpperCase(),H=new Headers(R.headers);return["GET","HEAD","OPTIONS"].includes(X)||H.set("x-cockpit-csrf",cy),fetch(N,{...R,credentials:"same-origin",headers:H})}async function Ve(N,R={}){const X=await hy(N,R);if(!X.ok)throw new Error(`${N} → ${X.status}`);return X.status===204?{}:X.json()}const tt=N=>N&&N.length>12?N.slice(0,8)+"…":N;function lr(N){const R=String(N??"").toLowerCase();return R==="host"?"host":R==="container"||R==="docker"?"container":R==="vm"||R==="qemu"||R==="kvm"?"vm":"other"}function dy(N,R){return N==="agent"?`@${R}`:N==="command"?`/${R}`:R}const Jw=[[50,10],[72,16],[88,34],[84,58],[68,72],[50,72],[32,72],[16,58],[12,34],[28,16],[50,30]];function RE({onStartSession:N,onLaunchInstance:R,goTo:X}){var y,T;const[H,K]=se.useState(null),[ie]=se.useState(()=>!localStorage.getItem("cockpit.welcomed")),[I,l]=se.useState(""),[p,_]=se.useState("auto"),[S,f]=se.useState("observe"),[m,w]=se.useState(()=>OE());se.useEffect(()=>{localStorage.setItem("cockpit.welcomed","1")},[]),se.useEffect(()=>{(async()=>{try{const[M,j]=await Promise.all([Ve("/api/inventory"),Ve("/api/health")]),[z,Y,ee]=await Promise.all([Ve("/api/running").catch(()=>({running:[]})),Ve("/api/approvals?status=pending").catch(()=>({approvals:[]})),Ve("/api/cost").catch(()=>null)]);K({instances:M.instances,running:z.running??[],approvals:Y.approvals??[],cost:ee,executor:j.executor_url,connected:M.instances.length>0,inventoryWarning:TE(M)})}catch{K({instances:[],running:[],approvals:[],cost:null,executor:"",connected:!1})}})()},[]);const C=(H==null?void 0:H.instances.filter(M=>M.state==="running"))??[],g={host:(H==null?void 0:H.instances.some(M=>{var j;return lr(((j=M.runtime_posture)==null?void 0:j.kind)??M.runtime)==="host"}))??!1,container:(H==null?void 0:H.instances.some(M=>{var j;return lr(((j=M.runtime_posture)==null?void 0:j.kind)??M.runtime)==="container"}))??!1,vm:(H==null?void 0:H.instances.some(M=>{var j;return lr(((j=M.runtime_posture)==null?void 0:j.kind)??M.runtime)==="vm"}))??!1},u=async()=>{var M;await((M=navigator.clipboard)==null?void 0:M.writeText("aiwg cockpit"))},h=LE(H),o=((H==null?void 0:H.approvals.length)??0)+(g.host&&g.container&&g.vm?0:1),a=C.find(M=>M.id===I)??C[0]??(H==null?void 0:H.instances[0]),v=a?(y=H==null?void 0:H.cost)==null?void 0:y.per_instance.find(M=>M.instance_id===a.id):void 0,E=((T=H==null?void 0:H.cost)==null?void 0:T.total.usd)??0,x=H!=null&&H.cost?Math.min(100,Math.max(6,E*12)):0,k=[a?a.loadout:"no stack",p==="auto"?"auto runtime":p,S].join(" / ");return d.jsxDEV("div",{className:"welcome operator-wall",children:[d.jsxDEV("section",{className:`wall-hero ${H!=null&&H.connected?"wall-hero-compact":""}`,"aria-labelledby":"cockpit-wall-title",children:[d.jsxDEV("div",{children:[d.jsxDEV("p",{className:"eyebrow",children:"Operator wall"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:108,columnNumber:11},this),d.jsxDEV("h2",{id:"cockpit-wall-title",children:"Work alongside your agents"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:109,columnNumber:11},this),d.jsxDEV("p",{className:"lead",children:"Observe live stacks, take control when a session allows it, and keep approvals, cost, runtime posture, and handoff context visible in one control plane."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:110,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:107,columnNumber:9},this),d.jsxDEV("div",{className:"hero-actions","aria-label":"Primary Cockpit actions",children:[d.jsxDEV("button",{className:"cta",onClick:R,children:"+ New instance + session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:116,columnNumber:11},this),d.jsxDEV("button",{className:"cta",onClick:N,children:"▸ Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:117,columnNumber:11},this),d.jsxDEV("button",{onClick:()=>X("running"),children:"View board"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:118,columnNumber:11},this),d.jsxDEV("button",{onClick:u,children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:119,columnNumber:11},this),(H==null?void 0:H.connected)&&d.jsxDEV("div",{className:"segmented",role:"group","aria-label":"Wall review mode",children:[d.jsxDEV("button",{"aria-pressed":m==="topology",onClick:()=>w("topology"),children:"Topology"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:122,columnNumber:15},this),d.jsxDEV("button",{"aria-pressed":m==="handoff",onClick:()=>w("handoff"),children:"Handoff"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:123,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:121,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:115,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:106,columnNumber:7},this),H?H.connected?d.jsxDEV(d.Fragment,{children:[d.jsxDEV("section",{className:"radial-wall","aria-labelledby":"operator-wall-map-title",children:d.jsxDEV("div",{className:`radial-map mode-${m}`,"aria-label":"Operator wall topology",children:[d.jsxDEV("svg",{className:"radial-links",viewBox:"0 0 100 100","aria-hidden":"true",focusable:"false",children:[d.jsxDEV("circle",{className:"link-ring",cx:"50",cy:"50",r:"37"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:154,columnNumber:19},this),d.jsxDEV("circle",{className:"link-ring link-ring-inner",cx:"50",cy:"50",r:"22"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:155,columnNumber:19},this),h.map(M=>d.jsxDEV("line",{className:`link-line link-${M.state}`,x1:"50",y1:"50",x2:M.x,y2:M.y},M.key,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:157,columnNumber:21},this)),d.jsxDEV("path",{className:"handoff-arc",d:"M 17 58 C 29 19, 70 13, 87 42"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:159,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:153,columnNumber:17},this),d.jsxDEV("button",{className:"central-hub",onClick:N,"aria-label":"Start from Cockpit command hub",children:[d.jsxDEV("span",{className:"hub-core","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:162,columnNumber:19},this),d.jsxDEV("strong",{children:"Cockpit"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:163,columnNumber:19},this),d.jsxDEV("span",{children:[C.length," running · ",H.approvals.length," approvals"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:164,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:161,columnNumber:17},this),h.map((M,j)=>d.jsxDEV("button",{className:`orbit-node node-${M.family} node-${M.state}`,style:ME(M),onClick:()=>X(M.tab),"aria-label":`${M.label}: ${M.meta}`,children:[d.jsxDEV("span",{className:`node-glyph glyph-${M.family}`,"aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:174,columnNumber:21},this),d.jsxDEV("span",{className:"node-copy",children:[d.jsxDEV("strong",{children:M.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:176,columnNumber:23},this),d.jsxDEV("span",{children:M.meta},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:177,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:175,columnNumber:21},this),j===3&&d.jsxDEV("span",{className:"handoff-marker","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:179,columnNumber:37},this)]},M.key,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:167,columnNumber:19},this)),m==="handoff"&&d.jsxDEV(d.Fragment,{children:[d.jsxDEV("div",{className:"handoff-callout handoff-source",children:[d.jsxDEV("span",{children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:185,columnNumber:23},this),d.jsxDEV("strong",{children:H.running[0]?tt(H.running[0].instance_id):"ready"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:186,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:184,columnNumber:21},this),d.jsxDEV("div",{className:"handoff-callout handoff-destination",children:[d.jsxDEV("span",{children:"Destination"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:189,columnNumber:23},this),d.jsxDEV("strong",{children:C[1]?tt(C[1].id):"next stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:190,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:188,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:183,columnNumber:19},this),d.jsxDEV("div",{className:"radial-overlay","aria-labelledby":"operator-wall-map-title",children:[d.jsxDEV("div",{className:"radial-overlay-head",children:[d.jsxDEV("div",{children:[d.jsxDEV("p",{className:"eyebrow",children:m==="handoff"?"Mission route":"Live topology"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:197,columnNumber:23},this),d.jsxDEV("h3",{id:"operator-wall-map-title",children:m==="handoff"?"Mission-handoff operator wall":"Eleven-stack operator wall"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:198,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:196,columnNumber:21},this),d.jsxDEV("div",{className:"mission-route","aria-label":"Mission handoff state",children:[d.jsxDEV("span",{children:"Mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:201,columnNumber:23},this),d.jsxDEV("strong",{children:H.running[0]?tt(H.running[0].task_id):"ready"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:202,columnNumber:23},this),d.jsxDEV("span",{className:o>0?"route-attention":"route-ready",children:o>0?`${o} gate(s)`:"clear"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:203,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:200,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:195,columnNumber:19},this),d.jsxDEV("dl",{className:"wall-readout",children:[d.jsxDEV("div",{children:[d.jsxDEV("dt",{children:"Coverage"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:26},this),d.jsxDEV("dd",{children:[[g.host,g.container,g.vm].filter(Boolean).length,"/3"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:43},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:21},this),d.jsxDEV("div",{children:[d.jsxDEV("dt",{children:"Executor"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:26},this),d.jsxDEV("dd",{children:H.executor||"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:43},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:21},this),d.jsxDEV("div",{children:[d.jsxDEV("dt",{children:"Control"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:26},this),d.jsxDEV("dd",{children:C.some(M=>M.session_backends.some(j=>j.available&&j.drive))?"drive available":"observe first"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:42},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:21},this),d.jsxDEV("div",{children:[d.jsxDEV("dt",{children:"Quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:26},this),d.jsxDEV("dd",{children:H.cost?`$${H.cost.total.usd.toFixed(2)}`:"n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:21},this),d.jsxDEV("div",{children:[d.jsxDEV("dt",{children:"Gates"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:26},this),d.jsxDEV("dd",{children:o>0?`${o} attention`:"clear"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:208,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:194,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:152,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:151,columnNumber:13},this),d.jsxDEV("section",{className:"stack-board","aria-label":"Running stack board",children:C.slice(0,6).map(M=>{var ee;const j=H.running.find(ne=>ne.instance_id===M.id),z=(ee=H.cost)==null?void 0:ee.per_instance.find(ne=>ne.instance_id===M.id),Y=M.session_backends.some(ne=>ne.available&&ne.drive);return d.jsxDEV("article",{className:`stack-card accent-${AE(M.id)}`,children:[d.jsxDEV("div",{className:"stack-head",children:[d.jsxDEV("span",{className:`topology topology-${BE(M)}`,"aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:227,columnNumber:23},this),d.jsxDEV("div",{children:[d.jsxDEV("h3",{children:M.loadout},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:229,columnNumber:25},this),d.jsxDEV("p",{children:[tt(M.id)," · ",M.runtime_posture.label]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:230,columnNumber:25},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:228,columnNumber:23},this),d.jsxDEV("span",{className:`badge isolation-${M.runtime_posture.isolation}`,children:M.state},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:232,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:226,columnNumber:21},this),d.jsxDEV("div",{className:"stack-log",role:"img","aria-label":`Recent activity for ${M.loadout}`,children:[d.jsxDEV("span",{children:j?`task ${tt(j.task_id)} · ${j.state}`:"idle · ready for session attach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:235,columnNumber:23},this),d.jsxDEV("span",{children:[M.transport.label," · ",M.transport.mode]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:236,columnNumber:23},this),d.jsxDEV("span",{children:Y?"Drive enabled":"Observe only"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:237,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:234,columnNumber:21},this),d.jsxDEV("div",{className:"segment-progress","aria-label":"Session progress",children:d.jsxDEV("span",{style:{width:j?"68%":"28%"}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:240,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:239,columnNumber:21},this),d.jsxDEV("div",{className:"transport-bar",children:[d.jsxDEV("button",{onClick:()=>X("sessions"),children:"Attach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:243,columnNumber:23},this),d.jsxDEV("button",{onClick:()=>X("running"),children:"Details"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:244,columnNumber:23},this),d.jsxDEV("span",{children:z?`$${z.usd.toFixed(2)}`:"cost n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:245,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:242,columnNumber:21},this)]},M.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:225,columnNumber:19},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:219,columnNumber:13},this),d.jsxDEV("section",{className:"telemetry-strip","aria-label":"Fleet telemetry",children:[d.jsxDEV("button",{onClick:()=>X("inventory"),children:[d.jsxDEV("strong",{children:H.instances.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:254,columnNumber:17},this),d.jsxDEV("span",{children:["instances · ",C.length," running"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:255,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:253,columnNumber:15},this),d.jsxDEV("button",{onClick:()=>X("running"),children:[d.jsxDEV("strong",{children:H.running.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:258,columnNumber:17},this),d.jsxDEV("span",{children:"active tasks"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:259,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:257,columnNumber:15},this),d.jsxDEV("button",{onClick:()=>X("approvals"),children:[d.jsxDEV("strong",{children:H.approvals.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:262,columnNumber:17},this),d.jsxDEV("span",{children:"pending approvals"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:263,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:261,columnNumber:15},this),d.jsxDEV("button",{onClick:()=>X("running"),children:[d.jsxDEV("strong",{children:H.cost?`$${H.cost.total.usd.toFixed(2)}`:"--"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:266,columnNumber:17},this),d.jsxDEV("span",{children:"cost · quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:267,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:265,columnNumber:15},this),d.jsxDEV("button",{onClick:()=>X("inventory"),children:[d.jsxDEV("strong",{children:g.host&&g.container&&g.vm?"3/3":`${[g.host,g.container,g.vm].filter(Boolean).length}/3`},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:270,columnNumber:17},this),d.jsxDEV("span",{children:"host · docker · vm"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:271,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:269,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:252,columnNumber:13},this),d.jsxDEV("section",{className:"control-planner","aria-label":"Guided start and cost quota",children:[d.jsxDEV("div",{className:"guided-start","aria-label":"Guided start",children:[d.jsxDEV("div",{children:[d.jsxDEV("p",{className:"eyebrow",children:"Guided start"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:278,columnNumber:19},this),d.jsxDEV("h3",{children:"Pick stack, runtime, and task posture."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:279,columnNumber:19},this),d.jsxDEV("p",{className:"hint",children:["Plan: ",k]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:280,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:277,columnNumber:17},this),d.jsxDEV("div",{className:"planner-grid",children:[d.jsxDEV("label",{children:[d.jsxDEV("span",{children:"Stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:284,columnNumber:21},this),d.jsxDEV("select",{value:(a==null?void 0:a.id)??"",onChange:M=>l(M.target.value),children:C.map(M=>d.jsxDEV("option",{value:M.id,children:[M.loadout," · ",M.runtime_posture.kind]},M.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:286,columnNumber:52},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:285,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:283,columnNumber:19},this),d.jsxDEV("label",{children:[d.jsxDEV("span",{children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:290,columnNumber:21},this),d.jsxDEV("select",{value:p,onChange:M=>_(M.target.value),children:[d.jsxDEV("option",{value:"auto",children:"Auto from selected stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:292,columnNumber:23},this),d.jsxDEV("option",{value:"host",children:"Host"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:293,columnNumber:23},this),d.jsxDEV("option",{value:"container",children:"Docker/container"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:294,columnNumber:23},this),d.jsxDEV("option",{value:"vm",children:"VM"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:295,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:291,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:289,columnNumber:19},this),d.jsxDEV("label",{children:[d.jsxDEV("span",{children:"Task"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:299,columnNumber:21},this),d.jsxDEV("select",{value:S,onChange:M=>f(M.target.value),children:[d.jsxDEV("option",{value:"observe",children:"Observe first"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:301,columnNumber:23},this),d.jsxDEV("option",{value:"drive",children:"Drive when granted"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:302,columnNumber:23},this),d.jsxDEV("option",{value:"handoff",children:"Mission handoff"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:303,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:300,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:298,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:282,columnNumber:17},this),d.jsxDEV("div",{className:"cta-row",children:[d.jsxDEV("button",{className:"cta",onClick:N,children:"▸ Start planned session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:308,columnNumber:19},this),d.jsxDEV("button",{onClick:()=>X("explore"),children:"Browse capabilities"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:309,columnNumber:19},this),H.approvals.length>0&&d.jsxDEV("button",{onClick:()=>X("approvals"),children:["Review ",H.approvals.length," approval(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:310,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:307,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:276,columnNumber:15},this),d.jsxDEV("aside",{className:"quota-panel","aria-label":"Cost and quota",children:[d.jsxDEV("p",{className:"eyebrow",children:"Cost & quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:315,columnNumber:17},this),d.jsxDEV("div",{className:"quota-donut",style:{"--quota":`${x}%`},children:[d.jsxDEV("strong",{children:H.cost?`$${E.toFixed(2)}`:"--"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:317,columnNumber:19},this),d.jsxDEV("span",{children:H.cost?`${H.cost.total.input_tokens+H.cost.total.output_tokens} tokens`:"metrics unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:318,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:316,columnNumber:17},this),d.jsxDEV("dl",{className:"quota-readout",children:[d.jsxDEV("div",{children:[d.jsxDEV("dt",{children:"Selected stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:24},this),d.jsxDEV("dd",{children:v?`$${v.usd.toFixed(2)}`:"n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:19},this),d.jsxDEV("div",{children:[d.jsxDEV("dt",{children:"Headroom"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:24},this),d.jsxDEV("dd",{children:H.cost?x>80?"near limit":"clear":"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:41},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:19},this),d.jsxDEV("div",{children:[d.jsxDEV("dt",{children:"Approval load"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:24},this),d.jsxDEV("dd",{children:[H.approvals.length," pending"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:46},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:320,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:314,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:275,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:150,columnNumber:11},this):d.jsxDEV("div",{className:"card warn-card",children:[d.jsxDEV("h3",{children:"No stack connected"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:132,columnNumber:13},this),H.executor?d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{children:["Bridge is connected to a real executor at ",d.jsxDEV("code",{children:H.executor},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:135,columnNumber:62},this),", but that executor is not reporting any registered instances or agents."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:135,columnNumber:17},this),H.inventoryWarning&&d.jsxDEV("p",{className:"warn",children:["Inventory note: ",H.inventoryWarning]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:136,columnNumber:41},this),d.jsxDEV("div",{className:"cta-row",children:[d.jsxDEV("button",{className:"cta",onClick:R,children:"+ Launch instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:138,columnNumber:19},this),d.jsxDEV("button",{onClick:()=>X("inventory"),children:"Open inventory"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:139,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:137,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:134,columnNumber:15},this):d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{children:"Cockpit talks to a real agentic-sandbox executor. Start the executor, then point the Bridge at it:"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:144,columnNumber:17},this),d.jsxDEV("pre",{className:"terminal",children:"AIWG_COCKPIT_EXECUTOR_URL=http://127.0.0.1:<executor-port> node apps/cockpit/bridge/src/server.mjs"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:145,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:143,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:131,columnNumber:11},this):d.jsxDEV("p",{className:"empty",children:"Checking your stacks…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:129,columnNumber:14},this),ie&&d.jsxDEV("div",{className:"card tour",children:[d.jsxDEV("h3",{children:"Three things to know"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:332,columnNumber:11},this),d.jsxDEV("ol",{children:[d.jsxDEV("li",{children:[d.jsxDEV("strong",{children:"Sessions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:334,columnNumber:17},this)," are where work happens — attach to observe, take the wheel to drive. Output mirrors to every viewer."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:334,columnNumber:13},this),d.jsxDEV("li",{children:[d.jsxDEV("strong",{children:"Actions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:335,columnNumber:17},this)," and the ",d.jsxDEV("strong",{children:"+ capability picker"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:335,columnNumber:50},this)," drop a command into a session; the agent runs it. The Cockpit never runs the CLI."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:335,columnNumber:13},this),d.jsxDEV("li",{children:[d.jsxDEV("strong",{children:"Explore"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:336,columnNumber:17},this)," browses the read-only AIWG catalog. Your own copied/imported assets live in your library — AIWG files are never overwritten."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:336,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:333,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:331,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Welcome.tsx",lineNumber:105,columnNumber:5},this)}function TE(N){const R=N.admin_error;return[N.degraded_admin_inventory,R==null?void 0:R.code,R==null?void 0:R.title,R==null?void 0:R.detail].filter(Boolean).join(" · ")||void 0}function BE(N){var X;const R=lr(((X=N.runtime_posture)==null?void 0:X.kind)??N.runtime);return R==="host"?"terminal":R==="vm"||R==="container"?"cube":"window"}function AE(N){let R=0;for(const X of N)R+=X.charCodeAt(0);return R%4+1}function ME(N){return{"--x":`${N.x}%`,"--y":`${N.y}%`}}function OE(){return new URLSearchParams(window.location.search).get("wall")==="handoff"?"handoff":"topology"}function LE(N){var _,S;const R=(N==null?void 0:N.instances.filter(f=>f.state==="running"))??[],X=N==null?void 0:N.instances.find(f=>{var m;return lr(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="host"}),H=N==null?void 0:N.instances.find(f=>{var m;return lr(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="container"}),K=N==null?void 0:N.instances.find(f=>{var m;return lr(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="vm"}),ie=(N==null?void 0:N.instances.some(f=>f.session_backends.some(m=>m.available&&m.drive)))??!1,I=(N==null?void 0:N.approvals.length)??0,l=(S=(_=N==null?void 0:N.cost)==null?void 0:_.total)==null?void 0:S.usd;return[{key:"host",label:(X==null?void 0:X.loadout)||"Host CLI",meta:X?`${tt(X.id)} · ${X.state}`:"not connected",family:"host",tab:"inventory",state:X?"running":"blocked"},{key:"vm",label:(K==null?void 0:K.loadout)||"VM sandbox",meta:K?`${tt(K.id)} · ${K.state}`:"not connected",family:"vm",tab:"inventory",state:K?"running":"blocked"},{key:"container",label:(H==null?void 0:H.loadout)||"Docker runtime",meta:H?`${tt(H.id)} · ${H.state}`:"not connected",family:"container",tab:"inventory",state:H?"running":"blocked"},{key:"mission",label:"Mission handoff",meta:N!=null&&N.running[0]?`${tt(N.running[0].task_id)} · ${N.running[0].state}`:"ready",family:"mission",tab:"running",state:N!=null&&N.running.length?"running":"ready"},{key:"approvals",label:"Approvals",meta:I?`${I} pending`:"clear",family:"approval",tab:"approvals",state:I?"attention":"ready"},{key:"cost",label:"Cost & quota",meta:l===void 0?"metrics n/a":`$${l.toFixed(2)}`,family:"cost",tab:"running",state:l===void 0?"idle":"ready"},{key:"capabilities",label:"Capability search",meta:"catalog ready",family:"capability",tab:"explore",state:"ready"},{key:"library",label:"Library",meta:"workspace assets",family:"library",tab:"library",state:"ready"},{key:"actions",label:"Actions",meta:ie?"drive available":"observe first",family:"action",tab:"actions",state:ie?"ready":"idle"},{key:"sessions",label:"Sessions",meta:R.length?`${R.length} attachable`:"none active",family:"session",tab:"sessions",state:R.length?"running":"idle"},{key:"inventory",label:"Inventory",meta:`${(N==null?void 0:N.instances.length)??0} registered`,family:"inventory",tab:"inventory",state:N!=null&&N.instances.length?"ready":"idle"}].map((f,m)=>({...f,x:Jw[m][0],y:Jw[m][1]}))}function jE({onStartSession:N,onLaunchInstance:R,refreshTick:X=0,refreshMs:H=5e3}){const[K,ie]=se.useState(null),[I,l]=se.useState(""),[p,_]=se.useState(""),[S,f]=se.useState(""),m=se.useCallback(()=>{Ve("/api/inventory").then(g=>{ie(g),l("")}).catch(g=>l(g.message))},[]);se.useEffect(()=>{m();const g=window.setInterval(m,H);return()=>window.clearInterval(g)},[m,H,X]);const w=(g,u,h="")=>Ve(g,{method:u}).then(o=>{_(""),f(o.message??(o.already_gone?"Instance already removed; inventory refreshed.":h)),m()}).catch(o=>{f(""),_(o.message)}),C=async(g,u)=>{var E,x;if(u.disabled)return;const h=ty(((E=g.launch_context)==null?void 0:E.name)??tt(g.id)),o=`${h}-${u.id==="snapshot"?"snapshot":u.id}`,a=window.prompt(`${u.label} asset id`,o);if(a===null)return;const v={asset_ref:a.trim()};if(u.id!=="snapshot"){const k=window.prompt("New instance name",`${h}-${u.id==="warm-pool"?"warm":u.id}`);if(k===null)return;v.name=ty(k)}_(""),f(`${u.label} requested; waiting for operation...`);try{const k=await Ve(`/api/instances/${encodeURIComponent(g.id)}/${u.id}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(v)}),y=k.id??((x=k.operation)==null?void 0:x.id);if(!y){f(`${u.label} accepted.`),m();return}const T=await $E(y);await Ve("/api/audit/intent",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({event:"instance.fast_start.terminal",detail:{instance_id:g.id,provider:g.provider,action:u.id,operation_id:y,state:T.state,result:T.result,error:T.error??T.failure}})}).catch(()=>{}),f(`${u.label} ${T.state??"completed"}: ${y}`),m()}catch(k){f(""),_(k.message)}};return I?d.jsxDEV("p",{className:"err",children:["Could not load inventory: ",I]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:106,columnNumber:19},this):K?K.instances.length?d.jsxDEV(d.Fragment,{children:[d.jsxDEV("div",{className:"section-toolbar",children:[d.jsxDEV("div",{children:[d.jsxDEV("h2",{children:"Agent instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:122,columnNumber:11},this),d.jsxDEV("p",{className:"hint",children:[K.count," ",K.count===1?"target":"targets"," · ",new Date(K.fetched_at).toLocaleTimeString()]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:123,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:121,columnNumber:9},this),R&&d.jsxDEV("button",{className:"cta",onClick:R,children:"New instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:125,columnNumber:30},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:120,columnNumber:7},this),p&&d.jsxDEV("p",{className:"err",children:["Action failed: ",p]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:127,columnNumber:21},this),S&&d.jsxDEV("p",{className:"hint",role:"status",children:S},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:128,columnNumber:21},this),K.bootstrap_trust&&d.jsxDEV(YE,{posture:K.bootstrap_trust},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:129,columnNumber:32},this),d.jsxDEV("table",{className:"inventory-table",children:[d.jsxDEV("caption",{children:"Available instance deployments"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:131,columnNumber:9},this),d.jsxDEV("thead",{children:d.jsxDEV("tr",{children:[d.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:134,columnNumber:13},this),d.jsxDEV("th",{scope:"col",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:134,columnNumber:42},this),d.jsxDEV("th",{scope:"col",children:"Loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:134,columnNumber:70},this),d.jsxDEV("th",{scope:"col",children:"Transport"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:13},this),d.jsxDEV("th",{scope:"col",children:"Host daemon"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:43},this),d.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:75},this),d.jsxDEV("th",{scope:"col",children:"Tenant"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:101},this),d.jsxDEV("th",{scope:"col",children:"Manage"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:128},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:133,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:132,columnNumber:9},this),d.jsxDEV("tbody",{children:K.instances.map(g=>d.jsxDEV("tr",{children:(()=>{var v,E,x,k,y,T,M,j,z;const u=(v=g.session_backends)==null?void 0:v.some(Y=>Y.available),h=(x=(E=g.session_backends)==null?void 0:E.find(Y=>!Y.available))==null?void 0:x.reason,o=HE(g),a=UE(g);return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("td",{className:"instance-cell",children:[d.jsxDEV("code",{title:g.id,children:((k=g.launch_context)==null?void 0:k.name)??tt(g.id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:153,columnNumber:17},this),((y=g.launch_context)==null?void 0:y.name)&&d.jsxDEV("div",{className:"cell-note",children:tt(g.id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:154,columnNumber:44},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:152,columnNumber:15},this),d.jsxDEV("td",{className:"runtime-cell",children:[d.jsxDEV("span",{className:`badge isolation-${g.runtime_posture.isolation}`,title:g.runtime_posture.warning||g.runtime_posture.label,children:g.runtime_posture.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:157,columnNumber:17},this),g.provider&&d.jsxDEV("div",{className:"cell-note",children:g.provider},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:160,columnNumber:32},this),zE(g)&&d.jsxDEV("div",{className:"cell-note",children:["VFIO",ey(g).length?` · ${ey(g).join(", ")}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:162,columnNumber:19},this),((T=g.gpu)==null?void 0:T.reason)&&d.jsxDEV("div",{className:"cell-note",children:g.gpu.reason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:166,columnNumber:35},this),g.runtime_posture.warning&&d.jsxDEV("div",{className:"cell-note",children:g.runtime_posture.warning},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:167,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:156,columnNumber:15},this),d.jsxDEV("td",{children:[g.loadout,((M=g.launch_context)==null?void 0:M.image_ref)&&d.jsxDEV("div",{className:"cell-note",children:g.launch_context.image_ref},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:171,columnNumber:49},this),((j=g.launch_context)==null?void 0:j.source)&&d.jsxDEV("div",{className:"cell-note",children:g.launch_context.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:172,columnNumber:46},this),g.storage&&d.jsxDEV("div",{className:"cell-note",children:["Storage: ",g.storage.persistent?"persistent":"ephemeral",g.storage.delete_on_destroy?" · delete on destroy":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:174,columnNumber:19},this),((z=g.storage)==null?void 0:z.reason)&&d.jsxDEV("div",{className:"cell-note",children:g.storage.reason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:178,columnNumber:39},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:169,columnNumber:15},this),d.jsxDEV("td",{children:[d.jsxDEV("span",{className:`badge trust-${g.transport.trust}`,title:`${g.transport.source}${g.transport.evidence?`: ${g.transport.evidence}`:""}`,children:g.transport.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:181,columnNumber:17},this),d.jsxDEV("div",{className:"cell-note",children:[g.transport.mode,g.transport.stale?" · stale":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:184,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:180,columnNumber:15},this),d.jsxDEV("td",{className:"daemon-cell",children:[d.jsxDEV("span",{className:`badge daemon-${g.host_daemon.status}`,children:g.host_daemon.status.replace("_"," ")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:187,columnNumber:17},this),g.host_daemon.detail&&d.jsxDEV("div",{className:"cell-note",children:g.host_daemon.detail},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:188,columnNumber:42},this),g.host_daemon.operator_command&&d.jsxDEV("code",{title:"Operator start command",children:g.host_daemon.operator_command},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:189,columnNumber:52},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:186,columnNumber:15},this),d.jsxDEV("td",{children:[d.jsxDEV("span",{className:`state ${a.kind==="stale-agent"?"degraded":g.state}`,title:a.detail,children:[d.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:193,columnNumber:19},this),a.label]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:192,columnNumber:17},this),a.detail&&a.kind!=="healthy"&&d.jsxDEV("div",{className:"cell-note",children:a.detail},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:195,columnNumber:64},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:191,columnNumber:15},this),d.jsxDEV("td",{children:g.tenant},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:197,columnNumber:15},this),d.jsxDEV("td",{className:"manage-actions",children:[g.state==="running"&&N&&d.jsxDEV("button",{className:"cta","aria-label":`Start session on ${tt(g.id)}`,disabled:!u,title:u?void 0:h,onClick:()=>N(g.id),children:"Session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:200,columnNumber:19},this)," ",o&&d.jsxDEV("button",{"aria-label":`Reconnect agent for ${tt(g.id)}`,title:h??"Ask the running agent to re-register without restarting the instance.",onClick:()=>w(`/api/instances/${encodeURIComponent(g.id)}/reconnect`,"POST","Reconnect requested; inventory will refresh shortly."),children:"Reconnect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:211,columnNumber:19},this)," ",IE(g).map(Y=>d.jsxDEV("button",{"aria-label":`${Y.label} ${tt(g.id)}`,disabled:Y.disabled,title:Y.reason,onClick:()=>C(g,Y),children:Y.label},Y.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:220,columnNumber:19},this))," ",g.state==="running"?d.jsxDEV("button",{"aria-label":`Stop instance ${tt(g.id)}`,onClick:()=>w(`/api/instances/${encodeURIComponent(g.id)}/stop`,"POST"),children:"Stop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:231,columnNumber:21},this):d.jsxDEV("button",{"aria-label":`Start instance ${tt(g.id)}`,onClick:()=>w(`/api/instances/${encodeURIComponent(g.id)}/start`,"POST"),children:"Start"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:232,columnNumber:21},this)," ",d.jsxDEV("button",{"aria-label":`Destroy instance ${tt(g.id)}`,title:g.state!=="running"&&g.runtime==="docker"?"Stopped Docker row — Destroy asks the sandbox management API to remove it.":void 0,onClick:()=>{confirm(`Destroy ${tt(g.id)}? This cannot be undone.`)&&w(`/api/instances/${encodeURIComponent(g.id)}`,"DELETE")},children:"Destroy"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:233,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:198,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:151,columnNumber:13},this)})()},g.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:140,columnNumber:13},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:138,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:130,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:119,columnNumber:5},this):d.jsxDEV("section",{className:"empty-state",children:[d.jsxDEV("h2",{children:"No instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:111,columnNumber:9},this),d.jsxDEV("p",{className:"hint",children:"Bridge is connected, but no host, Docker, or VM targets are registered."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:112,columnNumber:9},this),R&&d.jsxDEV("button",{className:"cta",onClick:R,children:"+ New instance + session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:113,columnNumber:30},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:110,columnNumber:7},this):d.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:107,columnNumber:21},this)}function YE({posture:N}){const R=[N.ca_provider_ref,N.trust_bundle_ref,N.rotation_state,N.expires_at?`expires ${new Date(N.expires_at).toLocaleDateString()}`:void 0].filter(Boolean).join(" · ");return d.jsxDEV("p",{className:`trust-banner trust-${N.status}`,role:N.status==="secure"?"status":"alert",children:[d.jsxDEV("span",{children:N.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:261,columnNumber:7},this),R&&d.jsxDEV("span",{className:"trust-detail",children:R},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:262,columnNumber:18},this),N.status!=="secure"&&d.jsxDEV("span",{className:"trust-detail",children:N.recovery},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:263,columnNumber:39},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Inventory.tsx",lineNumber:260,columnNumber:5},this)}const VE=["docker","container","vm","qemu","kvm"],XE=[{id:"snapshot",label:"Snapshot",capabilities:["instance.snapshot","instance.checkpoint"]},{id:"restore",label:"Restore",capabilities:["instance.restore"]},{id:"fork",label:"Fork",capabilities:["instance.fork"]},{id:"warm-pool",label:"Warm pool",capabilities:["warm_pool.manage"]}];function HE(N){var K,ie;const R=String(((K=N.runtime_posture)==null?void 0:K.kind)??N.runtime).toLowerCase(),X=String(N.state).toLowerCase()==="running",H=N.agent_ready===!1||((ie=N.session_backends)==null?void 0:ie.some(I=>I.available===!1));return X&&VE.includes(R)&&!!H}function UE(N){var K,ie;const R=String(N.state).toLowerCase()==="running",X=(ie=(K=N.session_backends)==null?void 0:K.find(I=>I.available===!1))==null?void 0:ie.reason,H=N.agent_ready===!1||!!X;return R&&H?{kind:"stale-agent",label:"agent unreachable",detail:X??"Runtime is still running, but the agent is not registered."}:{kind:"healthy",label:N.state}}function zE(N){var R,X,H,K,ie,I;return((R=N.capabilities)==null?void 0:R.some(l=>l.id==="device.vfio"))||((X=N.capability_constraints)==null?void 0:X.some(l=>l.capability==="device.vfio"))||!!((H=N.gpu)!=null&&H.assigned||(K=N.gpu)!=null&&K.available||(I=(ie=N.gpu)==null?void 0:ie.devices)!=null&&I.length)}function ey(N){var R,X;return((X=(R=N.gpu)==null?void 0:R.devices)==null?void 0:X.filter(Boolean))??[]}function IE(N){var ie;const R=String(((ie=N.runtime_posture)==null?void 0:ie.kind)??N.runtime).toLowerCase();if(!["vm","qemu","kvm"].includes(R))return[];const X=new Set((N.capabilities??[]).map(I=>I.id)),H=N.capability_constraints??[],K=String(N.provider??"").toLowerCase();return XE.flatMap(I=>{const l=I.capabilities.some(S=>X.has(S)),p=H.find(S=>{var f;return((f=S.excludes)==null?void 0:f.some(m=>I.capabilities.includes(m)))||I.capabilities.includes(S.capability)});if(!l&&!p)return[];const _=I.id==="snapshot"&&K==="libvirt"?"Checkpoint":I.label;return[{id:I.id,label:_,disabled:!!p,reason:p==null?void 0:p.reason}]})}function ty(N){const R=String(N||"cockpit-vm").toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+$/g,"").slice(0,63),X=/^[a-z]/.test(R)?R:`a-${R.replace(/^-+/,"")}`;return X.length>=2?X:"cockpit-vm"}async function $E(N){let R={id:N,state:"unknown"};for(let X=0;X<60;X+=1){R=await Ve(`/api/operations/${encodeURIComponent(N)}`);const H=String(R.state??"").toLowerCase();if(["succeeded","failed","canceled","cancelled"].includes(H))return R;await new Promise(K=>window.setTimeout(K,1e3))}return R}function qE({refreshTick:N=0}){const[R,X]=se.useState(null),[H,K]=se.useState(null),[ie,I]=se.useState(""),l=se.useCallback(()=>{Ve("/api/running").then(_=>{X(_),I("")}).catch(_=>I(_.message)),Ve("/api/cost").then(K).catch(()=>K(null))},[]);se.useEffect(()=>{l()},[l,N]);const p=_=>Ve(`/api/tasks/${encodeURIComponent(_.instance_id)}/${encodeURIComponent(_.task_id)}/cancel`,{method:"POST"}).then(l).catch(S=>alert(S.message));return ie?d.jsxDEV("p",{className:"err",children:["Could not load running: ",ie]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:23,columnNumber:19},this):R?d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:[d.jsxDEV("strong",{children:"Fleet overview."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:29,columnNumber:9},this)," Every task running across all stacks — a read-only board. To attach to one and observe or drive it, open it in ",d.jsxDEV("strong",{children:"Sessions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:30,columnNumber:59},this)," (the attached workspace)."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:28,columnNumber:7},this),H&&d.jsxDEV("p",{className:"hint",children:["Spend across stacks: ",d.jsxDEV("strong",{children:["$",H.total.usd.toFixed(2)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:33,columnNumber:50},this)," · ",(H.total.input_tokens+H.total.output_tokens).toLocaleString()," tokens"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:33,columnNumber:9},this),R.running.length?d.jsxDEV("table",{children:[d.jsxDEV("caption",{children:["Running across all stacks — ",R.count," task(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:39,columnNumber:13},this),d.jsxDEV("thead",{children:d.jsxDEV("tr",{children:[d.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:41,columnNumber:19},this),d.jsxDEV("th",{scope:"col",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:41,columnNumber:48},this),d.jsxDEV("th",{scope:"col",children:"Transport"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:41,columnNumber:76},this),d.jsxDEV("th",{scope:"col",children:"Task"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:41,columnNumber:106},this),d.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:41,columnNumber:131},this),d.jsxDEV("th",{scope:"col",children:"Tenant"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:41,columnNumber:157},this),d.jsxDEV("th",{scope:"col",children:"Control"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:41,columnNumber:184},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:41,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:40,columnNumber:13},this),d.jsxDEV("tbody",{children:R.running.map(_=>d.jsxDEV("tr",{children:[d.jsxDEV("td",{children:d.jsxDEV("code",{title:_.instance_id,children:tt(_.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:46,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:46,columnNumber:19},this),d.jsxDEV("td",{children:_.runtime_posture?d.jsxDEV("span",{className:`badge isolation-${_.runtime_posture.isolation}`,title:_.runtime_posture.warning||_.runtime_posture.label,children:_.runtime_posture.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:47,columnNumber:44},this):d.jsxDEV("span",{className:"badge",children:"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:47,columnNumber:207},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:47,columnNumber:19},this),d.jsxDEV("td",{children:_.transport?d.jsxDEV("span",{className:`badge trust-${_.transport.trust}`,children:_.transport.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:48,columnNumber:38},this):d.jsxDEV("span",{className:"badge",children:"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:48,columnNumber:120},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:48,columnNumber:19},this),d.jsxDEV("td",{children:d.jsxDEV("code",{title:_.task_id,children:tt(_.task_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:49,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:49,columnNumber:19},this),d.jsxDEV("td",{children:d.jsxDEV("span",{className:`state ${_.state}`,children:[d.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:50,columnNumber:60},this),_.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:50,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:50,columnNumber:19},this),d.jsxDEV("td",{children:_.tenant},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:51,columnNumber:19},this),d.jsxDEV("td",{children:d.jsxDEV("button",{"aria-label":`Stop task ${tt(_.task_id)}`,onClick:()=>p(_),children:"Stop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:52,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:52,columnNumber:19},this)]},_.task_id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:45,columnNumber:17},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:43,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:38,columnNumber:11},this):d.jsxDEV("p",{className:"empty",children:"Nothing running yet — use “Start a session” (top right or Home) to put an agent to work."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:36,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:27,columnNumber:5},this):d.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Running.tsx",lineNumber:24,columnNumber:20},this)}function PE({refreshTick:N=0}){const[R,X]=se.useState(null),[H,K]=se.useState(""),[ie,I]=se.useState(null),l=se.useCallback(()=>{Ve("/api/missions").then(S=>{X(S),K(""),I(f=>{var m;return f??((m=S.sessions[0])==null?void 0:m.id)??null})}).catch(S=>K(S.message))},[]);if(se.useEffect(()=>{l()},[l,N]),H)return d.jsxDEV("p",{className:"err",children:["Could not load Missions: ",H]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:23,columnNumber:19},this);if(!R)return d.jsxDEV("p",{className:"empty",children:"Loading..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:24,columnNumber:21},this);const p=R.sessions.find(S=>S.id===ie)??R.sessions[0]??null,_=ZE(R.missions);return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:"Durable AIWG Mission Control state and Agentic Sandbox fleet work share one projection. Cockpit observes the parent mission and its independently managed child workloads; the conductor remains the owner of policy and durability."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:31,columnNumber:7},this),d.jsxDEV("div",{className:"mission-summary","aria-label":"Mission status summary",children:[d.jsxDEV("span",{children:[d.jsxDEV("strong",{children:R.count},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:37,columnNumber:15},this)," total"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:37,columnNumber:9},this),d.jsxDEV("span",{children:[d.jsxDEV("strong",{children:_.active},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:38,columnNumber:15},this)," active"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:38,columnNumber:9},this),d.jsxDEV("span",{children:[d.jsxDEV("strong",{children:_.awaiting},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:39,columnNumber:15},this)," awaiting approval"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:39,columnNumber:9},this),d.jsxDEV("span",{children:[d.jsxDEV("strong",{children:_.terminal},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:40,columnNumber:15},this)," terminal"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:40,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:36,columnNumber:7},this),R.sessions.length?d.jsxDEV("div",{className:"missions-layout",children:[d.jsxDEV("aside",{className:"mission-sessions","aria-label":"Mission sessions",children:R.sessions.map(S=>d.jsxDEV("button",{className:S.id===(p==null?void 0:p.id)?"selected":"",onClick:()=>I(S.id),"aria-pressed":S.id===(p==null?void 0:p.id),children:[d.jsxDEV("span",{children:S.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:52,columnNumber:17},this),d.jsxDEV("small",{children:[S.source," · ",S.missions.length]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:53,columnNumber:17},this)]},S.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:46,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:44,columnNumber:11},this),p&&d.jsxDEV(WE,{session:p},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:57,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:43,columnNumber:9},this):d.jsxDEV("p",{className:"empty",children:"No Mission Control sessions or live executor tasks are visible yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:42,columnNumber:32},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:30,columnNumber:5},this)}function WE({session:N}){const R=N.source==="agentic-sandbox-fleet";return d.jsxDEV("section",{className:"mission-detail","aria-label":`${N.name} missions`,children:[d.jsxDEV("div",{className:"mission-detail-head",children:[d.jsxDEV("div",{children:[d.jsxDEV("h2",{children:N.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:70,columnNumber:11},this),d.jsxDEV("p",{children:[R&&N.parent_mission_id?`Parent mission ${N.parent_mission_id} · `:"",N.source," · ",N.state,N.inventory_revision!==void 0?` · inventory r${N.inventory_revision}`:"",N.updated_at?` · updated ${new Date(N.updated_at).toLocaleString()}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:71,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:69,columnNumber:9},this),d.jsxDEV("span",{className:"badge",children:[N.audit_count," audit events"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:68,columnNumber:7},this),N.missions.length?d.jsxDEV("table",{className:R?"fleet-missions":void 0,children:[d.jsxDEV("caption",{children:[N.missions.length," mission projection(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:82,columnNumber:11},this),d.jsxDEV("thead",{children:R?d.jsxDEV("tr",{children:[d.jsxDEV("th",{scope:"col",children:"Child workload"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:85,columnNumber:21},this),d.jsxDEV("th",{scope:"col",children:"Status"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:85,columnNumber:56},this),d.jsxDEV("th",{scope:"col",children:"Target / runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:85,columnNumber:83},this),d.jsxDEV("th",{scope:"col",children:"Binding"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:85,columnNumber:120},this),d.jsxDEV("th",{scope:"col",children:"Evidence"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:85,columnNumber:148},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:85,columnNumber:17},this):d.jsxDEV("tr",{children:[d.jsxDEV("th",{scope:"col",children:"Mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:86,columnNumber:21},this),d.jsxDEV("th",{scope:"col",children:"Status"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:86,columnNumber:49},this),d.jsxDEV("th",{scope:"col",children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:86,columnNumber:76},this),d.jsxDEV("th",{scope:"col",children:"Loop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:86,columnNumber:103},this),d.jsxDEV("th",{scope:"col",children:"Backing"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:86,columnNumber:128},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:86,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:83,columnNumber:11},this),d.jsxDEV("tbody",{children:N.missions.map(X=>d.jsxDEV("tr",{children:[d.jsxDEV("td",{children:[d.jsxDEV("strong",{children:X.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:92,columnNumber:19},this),R&&d.jsxDEV("small",{className:"block",children:FE(X)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:93,columnNumber:29},this),X.completion&&d.jsxDEV("small",{className:"block",children:["Done when: ",X.completion]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:94,columnNumber:36},this),X.error&&d.jsxDEV("small",{className:"block err",children:X.error},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:95,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:91,columnNumber:17},this),d.jsxDEV("td",{children:[d.jsxDEV("span",{className:`state ${JE(X.status)}`,children:[d.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:98,columnNumber:70},this),X.status]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:98,columnNumber:19},this),X.health&&d.jsxDEV("small",{className:"block",children:["health: ",X.health]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:99,columnNumber:32},this),X.backpressure&&d.jsxDEV("small",{className:"block fleet-warning",children:["backpressure: ",X.backpressure.reason,X.backpressure.retryable?" · retryable":" · operator action"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:100,columnNumber:38},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:97,columnNumber:17},this),R?d.jsxDEV(d.Fragment,{children:[d.jsxDEV("td",{children:[d.jsxDEV("strong",{children:X.target_id??"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:103,columnNumber:23},this),d.jsxDEV("small",{className:"block",children:[X.executor_id??"-"," / ",X.runtime_id??"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:103,columnNumber:60},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:103,columnNumber:19},this),d.jsxDEV("td",{children:[GE(X),d.jsxDEV("small",{className:"block",children:["revision ",X.revision??0,X.last_seen?` · ${new Date(X.last_seen).toLocaleString()}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:104,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:104,columnNumber:19},this),d.jsxDEV("td",{children:QE(X)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:105,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:102,columnNumber:26},this):d.jsxDEV(d.Fragment,{children:[d.jsxDEV("td",{children:X.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:107,columnNumber:19},this),d.jsxDEV("td",{children:ex(X)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:108,columnNumber:19},this),d.jsxDEV("td",{children:tx(X)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:109,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:106,columnNumber:23},this)]},X.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:90,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:88,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:81,columnNumber:9},this):d.jsxDEV("p",{className:"empty",children:"This session has no missions."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:80,columnNumber:35},this),N.audit_tail.length>0&&d.jsxDEV("section",{className:"audit-tail","aria-label":"Mission audit tail",children:[d.jsxDEV("h3",{children:"Audit Tail"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:118,columnNumber:11},this),N.audit_tail.map((X,H)=>d.jsxDEV("p",{children:[d.jsxDEV("code",{children:X.ts?new Date(X.ts).toLocaleTimeString():"event"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:121,columnNumber:15},this)," ",String(X.event??"mission_event"),X.missionId||X.mission_id?d.jsxDEV(d.Fragment,{children:[" · ",d.jsxDEV("code",{children:tt(String(X.missionId??X.mission_id))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:123,columnNumber:59},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:123,columnNumber:54},this):null]},`${X.ts??"event"}-${H}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:120,columnNumber:13},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:117,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:67,columnNumber:5},this)}function FE(N){return N.workload_kind==="daemon"?`daemon health · desired ${N.desired_state??"unknown"}`:N.workload_kind==="persistent-agent"?`persistent retention · desired ${N.desired_state??"unknown"}`:N.workload_kind==="scheduled-collector"?`scheduled collection${N.schedule?` · ${N.schedule}`:""}`:N.workload_kind==="one-shot-command"?`one-shot terminal result · desired ${N.desired_state??"unknown"}`:N.workload_kind??"fleet workload"}function GE(N){const R=[N.runtime_session_id&&`session ${tt(N.runtime_session_id)}`,N.task_id&&`task ${tt(N.task_id)}`,N.command_id&&`command ${tt(N.command_id)}`].filter(Boolean);return R.length?R.join(" · "):"binding pending"}function QE(N){var R;return(R=N.artifacts)!=null&&R.length?d.jsxDEV("ul",{className:"fleet-artifacts",children:N.artifacts.map(X=>d.jsxDEV("li",{children:[KE(X.uri)?d.jsxDEV("a",{href:X.uri,children:X.kind},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:153,columnNumber:41},this):d.jsxDEV("span",{children:X.kind},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:153,columnNumber:86},this),d.jsxDEV("small",{className:"block",children:[d.jsxDEV("code",{children:X.sha256.slice(0,12)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:154,columnNumber:32},this)," · ",X.uri]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:154,columnNumber:7},this)]},`${X.kind}:${X.uri}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:152,columnNumber:5},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:151,columnNumber:10},this):d.jsxDEV("span",{className:"muted",children:"No artifacts yet"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Missions.tsx",lineNumber:150,columnNumber:42},this)}function KE(N){try{return["http:","https:"].includes(new URL(N).protocol)}catch{return!1}}function ZE(N){return N.reduce((R,X)=>{var H;return(X.status==="awaiting-approval"||X.status==="input-required"||((H=X.backpressure)==null?void 0:H.reason)==="approval")&&(R.awaiting+=1),X.terminal?R.terminal+=1:R.active+=1,R},{active:0,awaiting:0,terminal:0})}function JE(N){return N.replace(/[^a-z0-9_-]/gi,"-")}function ex(N){return N.loop===void 0&&!N.max_iterations?"-":`${N.loop??0}/${N.max_iterations??"?"}`}function tx(N){return N.ralph_loop_id?`Ralph ${tt(N.ralph_loop_id)}`:N.task_id&&N.instance_id?`${tt(N.instance_id)} / ${tt(N.task_id)}`:N.target_agent?tt(N.target_agent):"-"}function ix(N,R=300){const[X,H]=se.useState(N);return se.useEffect(()=>{const K=setTimeout(()=>H(N),R);return()=>clearTimeout(K)},[N,R]),X}const sx=["all","skill","agent","command","rule","flow"];function Wm({onPick:N,autoFocus:R,compact:X}){const[H,K]=se.useState(""),[ie,I]=se.useState("all"),[l,p]=se.useState(null),[_,S]=se.useState(""),f=ix(H,300),m=se.useRef(null);return se.useEffect(()=>{var w;R&&((w=m.current)==null||w.focus())},[R]),se.useEffect(()=>{const w=C=>{var g;(C.ctrlKey||C.metaKey)&&C.key==="k"&&(C.preventDefault(),(g=m.current)==null||g.focus())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[]),se.useEffect(()=>{const w=f.trim();if(!w){p(null);return}let C=!0;return Ve(`/api/capabilities?q=${encodeURIComponent(w)}&type=${encodeURIComponent(ie)}&limit=12`).then(g=>{C&&(p(g.results),S(""))}).catch(g=>{C&&S(g.message)}),()=>{C=!1}},[f,ie]),d.jsxDEV("div",{children:[d.jsxDEV("div",{className:"controls",children:[d.jsxDEV("input",{ref:m,type:"search",value:H,onChange:w=>K(w.target.value),placeholder:"Search capabilities… (Ctrl/⌘-K)","aria-label":"Search capabilities",style:{minWidth:X?220:300}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:44,columnNumber:9},this),d.jsxDEV("select",{value:ie,onChange:w=>I(w.target.value),"aria-label":"Capability type filter",children:sx.map(w=>d.jsxDEV("option",{value:w,children:w},w,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:47,columnNumber:29},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:46,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:43,columnNumber:7},this),_&&d.jsxDEV("p",{className:"err",children:_},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:50,columnNumber:15},this),l===null?d.jsxDEV("p",{className:"hint",children:"Type to search skills, agents, commands, rules, flows."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:52,columnNumber:11},this):l.length?d.jsxDEV("div",{className:"capgrid",role:"listbox","aria-label":"Capability results",children:l.map(w=>{var C;return d.jsxDEV("button",{className:"capcard",role:"option","aria-selected":!1,onClick:()=>N(w),children:[d.jsxDEV("div",{className:"capcard-head",children:[d.jsxDEV("span",{className:"badge",children:w.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:60,columnNumber:21},this)," ",d.jsxDEV("strong",{children:w.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:60,columnNumber:61},this),d.jsxDEV("span",{className:"capcard-score",children:(w.score??0).toFixed(2)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:61,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:59,columnNumber:19},this),d.jsxDEV("div",{className:"capcard-cap",children:(w.capability||w.title||"").slice(0,110)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:63,columnNumber:19},this),(C=w.triggers)!=null&&C.length?d.jsxDEV("div",{className:"capcard-tags",children:w.triggers.slice(0,3).map(g=>d.jsxDEV("span",{className:"tag",children:g},g,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:65,columnNumber:88},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:65,columnNumber:23},this):null]},w.path,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:58,columnNumber:17},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:56,columnNumber:13},this):d.jsxDEV("p",{className:"empty",children:"No matches."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:54,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/CapabilitySearch.tsx",lineNumber:42,columnNumber:5},this)}const fy={needed:!1,prompt:"",since:null,source:"snapshot"};let Gu={activeKey:null,entries:{}};const qm=new Set;function Ku(N,R){return`${N}:${R}`}function my(N){return Ku(N.instance_id,N.id)}function nx(N){return qm.add(N),()=>qm.delete(N)}function Pm(){return Gu}function Fm(){return se.useSyncExternalStore(nx,Pm,Pm)}function rx(N){return Object.values(N.entries).filter(R=>R.responseNeeded.needed).map(R=>({id:`pty:${R.key}`,instance_id:R.instanceId,prompt:R.responseNeeded.prompt,source:R.responseNeeded.source,status:"response-needed",attach_url:R.metadata.attach_url}))}function ox(N,R=new Date().toISOString()){N.length&&Gm(X=>{const H={...X.entries};for(const K of N){const ie=my(K),I=H[ie];H[ie]={key:ie,instanceId:K.instance_id,sessionId:K.id,metadata:{...(I==null?void 0:I.metadata)??{},...K},lastOutputAt:(I==null?void 0:I.lastOutputAt)??null,unread:(I==null?void 0:I.unread)??!1,responseNeeded:(I==null?void 0:I.responseNeeded)??fy,snapshot:(I==null?void 0:I.snapshot)??null,attached:(I==null?void 0:I.attached)??!1,updatedAt:R}}return{...X,entries:H}})}function zm(N,R,X=new Date().toISOString()){const H=N&&R?Ku(N,R):null;Gm(K=>{const ie={...K.entries};for(const[I,l]of Object.entries(ie))l.attached!==(I===H)&&(ie[I]={...l,attached:I===H,updatedAt:X});return{activeKey:H,entries:ie}})}function ax(N,R,X=new Date().toISOString()){const H=Ku(N,R);py(H,K=>({...K,unread:!1,updatedAt:X}))}function lx(N,R,X,H={}){const K=Ku(N,R),ie=H.now??new Date().toISOString();py(K,I=>{var f;const l=((f=I.snapshot)==null?void 0:f.text)??"",p=X,_=p!==l,S=dx(p);return{...I,lastOutputAt:_?ie:I.lastOutputAt,unread:I.attached?!1:I.unread||_,responseNeeded:S?{needed:!0,prompt:S,since:I.responseNeeded.prompt===S?I.responseNeeded.since:ie,source:H.source??"snapshot"}:{...fy,source:H.source??"snapshot"},snapshot:{text:p,lines:ux(p),fetchedAt:ie,seq:H.seq},updatedAt:ie}})}function py(N,R){Gm(X=>{const H=X.entries[N];return H?{...X,entries:{...X.entries,[N]:R(H)}}:X})}function Gm(N){const R=N(Gu);R!==Gu&&(Gu=R,cx())}function cx(){for(const N of qm)N()}function ux(N,R=24){return N.replace(/\r/g,`
|
|
305
|
-
`).split(`
|
|
306
|
-
`).filter(Boolean).slice(-R)}function hx(N){return N.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"").replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[()][A-Za-z0-9]/g,"")}function dx(N){const X=hx(N).replace(/\r/g,`
|
|
307
|
-
`).split(`
|
|
308
|
-
`).map(ie=>ie.trim()).filter(Boolean).slice(-24),H=X.join(`
|
|
309
|
-
`);return[/Enter to select\b/i,/(?:↑|up)\/(?:↓|down)|arrow keys|navigate/i,/\bEsc to cancel\b/i,/\b(?:y\/n|Y\/n|y\/N|\[y\/N\]|\[Y\/n\])\b/,/\b(?:choose|select|pick) (?:one|an option|a number)\b/i,/\?$/].some(ie=>ie.test(H))?X.slice(-10).join(`
|
|
310
|
-
`).slice(0,900):""}function fx(N=12e3){Fm();const R=se.useRef(new Set);se.useEffect(()=>{let X=!1,H;const K=(I=N)=>{H=window.setTimeout(ie,I)},ie=async()=>{if(X)return;if(document.hidden){K(N);return}const I=Object.values(Pm().entries).filter(l=>!l.attached).filter(l=>l.metadata.has_screen!==!1).filter(l=>!R.current.has(`${l.instanceId}:${l.sessionId}`));await Promise.all(I.map(async l=>{const p=`${l.instanceId}:${l.sessionId}`;try{const _=await hy(`/api/instances/${encodeURIComponent(l.instanceId)}/sessions/${encodeURIComponent(l.sessionId)}/screen`);if(!_.ok){_.status===404&&R.current.add(p);return}const S=await _.json(),f=String(S.text??S.snapshot??S.screen??S.content??""),m=S.seq??S.sequence??S.anchor_sequence??S.anchorSequence;lx(l.instanceId,l.sessionId,f,{seq:typeof m=="number"?m:void 0})}catch{}})),X||K(N)};return K(0),()=>{X=!0,H!==void 0&&window.clearTimeout(H)}},[N])}function mx({session:N,composer:R,setComposer:X,onRequestStart:H,refreshMs:K=5e3,refreshTick:ie=0}){var Nt;const[I,l]=se.useState([]),[p,_]=se.useState([]),[S,f]=se.useState(""),[m,w]=se.useState(""),[C,g]=se.useState(""),[u,h]=se.useState(!1),[o,a]=se.useState(""),[v,E]=se.useState(""),[x,k]=se.useState(""),[y,T]=se.useState(""),[M,j]=se.useState(""),z=se.useRef(""),Y=se.useRef(!1),ee=se.useRef(""),ne=se.useRef(0),te=se.useRef(0),de=se.useRef(0),ce=se.useRef(null),B=Fm();fx(),se.useEffect(()=>{z.current=S},[S]),se.useEffect(()=>{Y.current=N.state.attached},[N.state.attached]);const U=ge=>{var Ze;const Be=R&&!R.endsWith(" ")?" ":"";X(R+Be+dy(ge.type,ge.name)),h(!1),(Ze=ce.current)==null||Ze.focus()},L=se.useCallback(async()=>{var ut;const ge=ne.current+1;ne.current=ge;const Be=await Ve("/api/inventory");if(ge!==ne.current)return;const Ze=vx(Be.instances).filter(ct=>{var bt;return ct.state==="running"&&((bt=ct.session_backends)==null?void 0:bt.length)});l(Ze);const ze=z.current;let We=((ut=Ze[0])==null?void 0:ut.id)??"";(ze&&Ze.some(ct=>ct.id===ze)||Y.current&&ze)&&(We=ze),z.current=We,f(We),g(ct=>{const bt=Ze.find(Mt=>Mt.id===We)??Ze[0];if(ct&&(bt!=null&&bt.session_backends.some(Mt=>`${Mt.mode}:${Mt.backend}`===ct&&Mt.available!==!1))||Y.current&&ct)return ct;const wt=(bt==null?void 0:bt.session_backends.find(Mt=>Mt.available!==!1))??(bt==null?void 0:bt.session_backends[0]);return wt?`${wt.mode}:${wt.backend}`:""})},[]);se.useEffect(()=>{ee.current=y||iy(N.state.url)},[y,N.state.url]);const q=se.useCallback(async ge=>{if(!ge)return;const Be=te.current+1;te.current=Be;const Ze=await Ve(`/api/sessions?instance=${encodeURIComponent(ge)}`);if(Be!==te.current||ge!==z.current)return;const ze=Ze.sessions??[];ox(ze),_(ze),k(""),w(We=>We&&ze.some(ut=>ar(ut)===We)||Y.current&&ee.current===ge&&We?We:ze[0]?ar(ze[0]):"")},[]);se.useEffect(()=>{let ge=!1,Be,Ze=K;const ze=ut=>{Be=window.setTimeout(We,ut)},We=async()=>{if(!ge){if(o){ze(K);return}try{const ut=z.current;await L(),ut&&ut===z.current&&await q(z.current),Ze=K}catch(ut){ge||k(ut.message),Ze=Math.min(Math.max(K,Ze*2),3e4)}ge||ze(Ze)}};return We(),()=>{ge=!0,Be!==void 0&&window.clearTimeout(Be)}},[o,q,L,K,ie]),se.useEffect(()=>{S&&(_([]),k(""),q(S).catch(ge=>k(ge.message)))},[S,q]);const ue=N.state.attached,pe=N.state.role==="controller"?"controller":"observer",ve=I.find(ge=>ge.id===S),Ce=(ve==null?void 0:ve.session_backends)??[],F=Ce.find(ge=>`${ge.mode}:${ge.backend}`===C)??Ce.find(ge=>ge.available!==!1)??Ce[0],V=(Nt=Ce.find(ge=>ge.available===!1))==null?void 0:Nt.reason,me=ve?sy(ve):!1,oe=p.find(ge=>ar(ge)===m),ae=y||iy(N.state.url),ye=ae&&M?`${ae}:${M}`:gx(N.state.url),be=N.state.target??(ae&&M?{instanceId:ae,sessionId:M}:null),Ue=ue&&ae===S&&M&&!p.some(ge=>ar(ge)===ye)?[...p,{id:M,instance_id:S,attach_url:N.state.url??"",session_name:"attached session",session_backend:F==null?void 0:F.backend,session_class:F==null?void 0:F.mode}]:p,Ie=()=>{N.sendInput(R,be)&&X("")},Le=(ge,Be)=>{T(ge.instance_id||S),j(String(ge.id)),zm(ge.instance_id||S,String(ge.id)),N.attach(ge.attach_url,!1,Be,{instanceId:ge.instance_id||S,sessionId:String(ge.id)})},ke=(ge,Be)=>{T(ge.instance_id||S),j(String(ge.id)),zm(ge.instance_id||S,String(ge.id)),N.replay(ge.attach_url,Be,{instanceId:ge.instance_id||S,sessionId:String(ge.id)})},jt=()=>{T(""),j(""),zm(null,null),N.detach()};se.useEffect(()=>{const ge=p.find(Be=>ar(Be)===m);ge&&ax(ge.instance_id,String(ge.id))},[m,p]),se.useEffect(()=>{if(!N.state.url||!ae||ae!==S)return;if(p.some(Be=>ar(Be)===ye)){de.current=0;return}p.length&&(de.current+=1,de.current>=2&&jt())},[ye,ae,S,N.state.url,p]),se.useEffect(()=>{if(!ve)return;if(!ve.session_backends.some(Be=>`${Be.mode}:${Be.backend}`===C)){const Be=ve.session_backends.find(Ze=>Ze.available)??ve.session_backends[0];g(Be?`${Be.mode}:${Be.backend}`:"")}},[C,ve]);const zi=async ge=>{const Be=ge??oe;if(!ve||!Be)return;const Ze=Be.session_name??Be.id;if(confirm(`End session ${Ze}? This closes the PTY and detaches connected views.`)){a(Be.id),k("");try{await Ve(`/api/instances/${encodeURIComponent(ve.id)}/sessions/${encodeURIComponent(Be.id)}`,{method:"DELETE"}),ar(Be)===ye&&jt(),await q(ve.id)}catch(ze){k(ze.message)}finally{a("")}}},De=async()=>{if(ve){E(ve.id),k("");try{await Ve(`/api/instances/${encodeURIComponent(ve.id)}/reconnect`,{method:"POST"}),await L(),await q(ve.id)}catch(ge){k(ge.message)}finally{E("")}}};return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:[d.jsxDEV("strong",{children:"Workspace."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:242,columnNumber:9},this)," Pick an instance on the left, then a session under it to observe or drive. Start a new session per instance, or open a live task from the ",d.jsxDEV("strong",{children:"Running"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:243,columnNumber:72},this)," fleet board."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:241,columnNumber:7},this),d.jsxDEV("div",{className:"session-workspace",children:[d.jsxDEV("aside",{className:"session-nav","aria-label":"Instances and sessions",children:[d.jsxDEV("div",{className:"session-nav-head",children:[d.jsxDEV("h2",{children:"Instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:249,columnNumber:13},this),d.jsxDEV("span",{className:"hint",children:I.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:250,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:248,columnNumber:11},this),!I.length&&d.jsxDEV("p",{className:"empty",children:"No running instances with session metadata."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:252,columnNumber:33},this),d.jsxDEV("ul",{className:"nav-list",children:I.map(ge=>{var ze;const Be=ge.id===S,Ze=((ze=ge.launch_context)==null?void 0:ze.name)??tt(ge.id);return d.jsxDEV("li",{className:`nav-instance${Be?" selected":""}`,children:[d.jsxDEV("button",{className:"nav-instance-row","aria-expanded":Be,onClick:()=>f(ge.id),title:ge.id,children:[d.jsxDEV("span",{className:`badge isolation-${ge.runtime_posture.isolation}`,children:ge.runtime},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:260,columnNumber:21},this),d.jsxDEV("span",{className:"nav-instance-name",children:Ze},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:261,columnNumber:21},this),d.jsxDEV("span",{className:`state ${ge.state}`,children:[d.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:262,columnNumber:58},this),ge.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:262,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:259,columnNumber:19},this),Be&&d.jsxDEV("div",{className:"nav-sessions",children:[Ue.length===0&&d.jsxDEV("p",{className:"empty nav-empty",children:sy(ge)?"Agent unreachable; reconnect to recover existing sessions.":"No sessions yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:267,columnNumber:25},this),d.jsxDEV("ul",{children:Ue.map(We=>{const ut=ar(We),ct=ut===m,bt=ut===ye&&ue,wt=B.entries[my(We)];return d.jsxDEV("li",{children:[d.jsxDEV("button",{className:`nav-session${ct?" selected":""}${bt?" live":""}`,onClick:()=>{const Mt=N.state.role==="controller"&&(F==null?void 0:F.drive)!==!1?"controller":"observer";w(ut),ut===ye&&ue?ke(We,Mt):Le(We,Mt)},title:We.id,children:[d.jsxDEV("span",{className:"nav-session-name",children:Im(We)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:296,columnNumber:33},this),d.jsxDEV("span",{className:"nav-session-meta",children:px(We)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:297,columnNumber:33},this),bx(We)&&d.jsxDEV("span",{className:"badge controller",title:"A controller is connected",children:"ctrl"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:298,columnNumber:63},this),(wt==null?void 0:wt.unread)&&d.jsxDEV("span",{className:"badge unread",title:"Unread output",children:"unread"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:299,columnNumber:59},this),(wt==null?void 0:wt.responseNeeded.needed)&&d.jsxDEV("span",{className:"badge response",title:"Response needed",children:"response"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:300,columnNumber:74},this),bt&&d.jsxDEV("span",{className:"badge live-dot",title:"Attached here",children:"●"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:301,columnNumber:42},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:279,columnNumber:31},this),d.jsxDEV("button",{className:"nav-session-end","aria-label":`End session ${Im(We)}`,title:"End this PTY session",disabled:o===We.id,onClick:()=>zi(We),children:o===We.id?"…":"×"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:303,columnNumber:31},this)]},We.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:278,columnNumber:29},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:271,columnNumber:23},this),d.jsxDEV("button",{className:"cta-sm nav-new-session",disabled:Ce.length>0&&(F==null?void 0:F.available)===!1,onClick:()=>H(ge.id),children:"+ New session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:316,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:265,columnNumber:21},this)]},ge.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:258,columnNumber:17},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:253,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:247,columnNumber:9},this),d.jsxDEV("section",{className:"session-main",children:[d.jsxDEV("div",{className:"controls",children:[Ce.length>1&&d.jsxDEV(d.Fragment,{children:[d.jsxDEV("label",{htmlFor:"sel-backend",children:"Mode"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:329,columnNumber:17},this),d.jsxDEV("select",{id:"sel-backend",value:C,onChange:ge=>g(ge.target.value),children:Ce.map(ge=>d.jsxDEV("option",{value:`${ge.mode}:${ge.backend}`,disabled:!ge.available,children:[ge.mode," · ",ge.backend,ge.available?"":` — ${ge.reason??"unsupported"}`]},`${ge.mode}:${ge.backend}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:331,columnNumber:40},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:330,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:328,columnNumber:15},this),d.jsxDEV("span",{className:"controls-active",title:oe==null?void 0:oe.id,children:oe?Im(oe):"— no session selected —"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:335,columnNumber:13},this),d.jsxDEV("button",{disabled:!oe||ue&&N.state.role==="observer",onClick:()=>oe&&Le(oe,"observer"),children:"Observe"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:336,columnNumber:13},this),d.jsxDEV("button",{disabled:!oe||(F==null?void 0:F.drive)===!1||ue&&N.state.role==="controller",onClick:()=>oe&&Le(oe,"controller"),children:ue&&N.state.role==="observer"?"Take Control":"Drive"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:337,columnNumber:13},this),d.jsxDEV("button",{disabled:!ue||(F==null?void 0:F.keyframe)===!1,onClick:N.requestKeyframe,children:"Keyframe"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:340,columnNumber:13},this),d.jsxDEV("button",{disabled:!ue,onClick:()=>oe&&ke(oe,pe),children:"Reattach + replay"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:341,columnNumber:13},this),d.jsxDEV("button",{disabled:!ue,onClick:jt,children:"Detach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:342,columnNumber:13},this),me&&d.jsxDEV("button",{disabled:v===(ve==null?void 0:ve.id),onClick:De,children:v===(ve==null?void 0:ve.id)?"Reconnecting…":"Reconnect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:344,columnNumber:15},this),N.state.role&&d.jsxDEV("span",{className:`badge ${N.state.role}`,children:N.state.role},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:348,columnNumber:36},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:326,columnNumber:11},this),x&&d.jsxDEV("p",{className:"err",children:["Session action failed: ",x]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:350,columnNumber:26},this),ve&&d.jsxDEV("p",{className:"hint",children:[ve.runtime_posture.label," · ",ve.transport.label," (",ve.transport.mode,") · attach starts as observe unless control is explicitly granted.",ue&&N.state.role==="observer"?" Click Take Control to re-attach with write access.":"",F&&!F.available?` ${F.reason??"Selected backend is unavailable."}`:"",me?` Agent is unreachable while the runtime is still running. ${V??"Reconnect can re-register the agent without restarting the instance."}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:352,columnNumber:13},this),d.jsxDEV("div",{className:"terminal",ref:N.openTerminal,role:"log","aria-label":"Session output"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:359,columnNumber:11},this),u&&d.jsxDEV("div",{className:"picker",children:[d.jsxDEV("p",{className:"hint",style:{marginTop:0},children:"Pick a capability to insert into the command — then Send to inject it. (Lookup is UI; the agent runs it.)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:362,columnNumber:15},this),d.jsxDEV(Wm,{compact:!0,autoFocus:!0,onPick:U},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:363,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:361,columnNumber:13},this),d.jsxDEV("div",{className:"inputrow",children:[d.jsxDEV("button",{"aria-label":"Insert a capability",title:"Insert a capability (search)",onClick:()=>h(ge=>!ge),children:"+"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:367,columnNumber:13},this),d.jsxDEV("input",{ref:ce,value:R,onChange:ge=>X(ge.target.value),onKeyDown:ge=>{ge.key==="Enter"&&Ie()},placeholder:N.isController?"Type to drive the session…":"Observing — input is read-only",disabled:!N.isController,"aria-label":"Session input"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:368,columnNumber:13},this),d.jsxDEV("button",{disabled:!N.isController,onClick:Ie,children:"Send"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:377,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:366,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:325,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:245,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Sessions.tsx",lineNumber:240,columnNumber:5},this)}function Im(N){return N.session_name??tt(N.id)}function px(N){const R=`${N.session_class??"managed"}/${N.session_backend??"tmux"}`;if(!N.membership)return R;const X=N.membership.attachment_count;return`${R} · ${X} viewer${X===1?"":"s"}`}function bx(N){var R;return(((R=N.membership)==null?void 0:R.controllers.length)??0)>0}function ar(N){return`${N.instance_id}:${N.id}`}function gx(N){const R=by(N);return R?`${R.instanceId}:${R.sessionId}`:""}function by(N){if(!N)return null;const R=/\/agents\/([^/]+)\/sessions\/([^/]+)\/attach/;try{const H=new URL(N).pathname.match(R);return H?{instanceId:decodeURIComponent(H[1]),sessionId:decodeURIComponent(H[2])}:null}catch{const X=N.match(R);return X?{instanceId:decodeURIComponent(X[1]),sessionId:decodeURIComponent(X[2])}:null}}function iy(N){var R;return((R=by(N))==null?void 0:R.instanceId)??""}function vx(N){const R=new Set;return N.filter(X=>R.has(X.id)?!1:(R.add(X.id),!0))}const _x=["docker","container","vm","qemu","kvm"];function sy(N){var K,ie;const R=String(((K=N.runtime_posture)==null?void 0:K.kind)??N.runtime).toLowerCase(),X=String(N.state).toLowerCase()==="running",H=N.agent_ready===!1||((ie=N.session_backends)==null?void 0:ie.some(I=>I.available===!1));return X&&_x.includes(R)&&!!H}function wx({refreshTick:N=0,responses:R=[],goSessions:X}){const[H,K]=se.useState(null),[ie,I]=se.useState(""),l=se.useCallback(()=>{Ve("/api/approvals?status=pending").then(_=>{K(_.approvals),I("")}).catch(_=>I(_.message))},[]);se.useEffect(()=>{l()},[l,N]);const p=(_,S)=>Ve(`/api/approvals/${encodeURIComponent(_)}?decision=${S}`,{method:"POST"}).then(l).catch(f=>alert(f.message));return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:["Unified response-needed inbox — formal ",d.jsxDEV("code",{children:"hitl-prompt/v1"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:22,columnNumber:66},this)," approvals, provider prompts, and agent sessions waiting for human input."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:22,columnNumber:7},this),ie&&d.jsxDEV("p",{className:"err",children:ie},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:23,columnNumber:15},this),R.length>0&&d.jsxDEV("section",{className:"response-needed","aria-label":"Sessions waiting for response",children:[d.jsxDEV("h2",{children:"Response Needed"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:26,columnNumber:11},this),R.map(_=>d.jsxDEV("article",{className:"response-item",children:[d.jsxDEV("div",{children:[d.jsxDEV("strong",{children:_.source==="pty"?"Interactive session prompt":_.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:30,columnNumber:17},this),d.jsxDEV("p",{children:_.prompt},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:31,columnNumber:17},this),d.jsxDEV("span",{children:[d.jsxDEV("code",{children:tt(_.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:32,columnNumber:23},this)," · ",_.status]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:32,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:29,columnNumber:15},this),X&&d.jsxDEV("button",{onClick:X,children:"Open Session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:34,columnNumber:30},this)]},_.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:28,columnNumber:13},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:25,columnNumber:9},this),H?!H.length&&!R.length?d.jsxDEV("p",{className:"empty",children:"No pending approvals or responses."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:40,columnNumber:48},this):H.length?d.jsxDEV("table",{children:[d.jsxDEV("caption",{children:[H.length," approval request(s) awaiting your decision"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:43,columnNumber:15},this),d.jsxDEV("thead",{children:d.jsxDEV("tr",{children:[d.jsxDEV("th",{scope:"col",children:"Request"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:26},this),d.jsxDEV("th",{scope:"col",children:"Risk"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:54},this),d.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:79},this),d.jsxDEV("th",{scope:"col",children:"Decision"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:108},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:22},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:15},this),d.jsxDEV("tbody",{children:H.map(_=>d.jsxDEV("tr",{children:[d.jsxDEV("td",{children:_.prompt},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:48,columnNumber:21},this),d.jsxDEV("td",{children:d.jsxDEV("span",{className:`badge ${_.risk==="high"?"high":""}`,children:_.risk},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:49,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:49,columnNumber:21},this),d.jsxDEV("td",{children:d.jsxDEV("code",{title:_.instance_id,children:tt(_.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:50,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:50,columnNumber:21},this),d.jsxDEV("td",{style:{whiteSpace:"nowrap"},children:[d.jsxDEV("button",{onClick:()=>p(_.id,"approve"),children:"Approve"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:52,columnNumber:23},this)," ",d.jsxDEV("button",{onClick:()=>p(_.id,"deny"),children:"Deny"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:53,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:51,columnNumber:21},this)]},_.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:47,columnNumber:19},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:45,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:42,columnNumber:13},this):null:d.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:39,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Approvals.tsx",lineNumber:21,columnNumber:5},this)}function yx(){const[N,R]=se.useState(null),[X,H]=se.useState(null),[K,ie]=se.useState("requirements"),[I,l]=se.useState(null),[p,_]=se.useState(""),[S,f]=se.useState(""),m=()=>{Ve("/api/index/status").then(H).catch(o=>f(o.message))};se.useEffect(()=>{m()},[]);const w=o=>{R(null),f("");const a=`type=${encodeURIComponent(o.type)}&name=${encodeURIComponent(o.name)}&path=${encodeURIComponent(o.path)}`;Ve(`/api/show?${a}`).then(R).catch(v=>f(v.message))},C=async()=>{const o=K.trim();if(o){_("query"),f("");try{l(await Ve(`/api/index/query?q=${encodeURIComponent(o)}&limit=8`))}catch(a){f(a.message)}finally{_("")}}},g=async()=>{_("rebuild"),f("");try{const o=await Ve("/api/index/rebuild",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({all:!0})});H(o.status),l(null)}catch(o){f(o.message)}finally{_("")}},u=(X==null?void 0:X.graphs)??[],h=(I==null?void 0:I.results)??[];return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:["Read-only catalog from the AIWG registry — display, not execution. To ",d.jsxDEV("em",{children:"run"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:65,columnNumber:79},this)," a capability, inject it into a session (Actions/Sessions). Search modeled on the fortemi-react patterns."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:64,columnNumber:7},this),S&&d.jsxDEV("p",{className:"err",children:S},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:68,columnNumber:15},this),d.jsxDEV("section",{className:"index-live","aria-label":"Live index status",children:[d.jsxDEV("div",{className:"section-toolbar",children:[d.jsxDEV("div",{children:[d.jsxDEV("h2",{children:"Live Index"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:72,columnNumber:13},this),d.jsxDEV("p",{className:"hint",children:X?`${X.summary.built}/${X.summary.total} graphs built, ${X.summary.missing} missing, ${X.summary.orphans} orphan dirs.`:"Loading index status."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:73,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:71,columnNumber:11},this),d.jsxDEV("div",{className:"manage-actions",children:[d.jsxDEV("button",{onClick:m,disabled:p==="rebuild",children:"Refresh"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:80,columnNumber:13},this),d.jsxDEV("button",{onClick:g,disabled:p==="rebuild",children:p==="rebuild"?"Rebuilding...":"Rebuild all"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:81,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:79,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:70,columnNumber:9},this),d.jsxDEV("div",{className:"index-grid",children:u.map(o=>d.jsxDEV("article",{className:o.missing?"index-graph missing":"index-graph",children:[d.jsxDEV("div",{children:[d.jsxDEV("strong",{children:o.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:87,columnNumber:20},this)," ",d.jsxDEV("span",{className:"badge",children:o.origin},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:87,columnNumber:46},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:87,columnNumber:15},this),d.jsxDEV("p",{children:[o.built?`${o.entries??0} entries`:"not built",o.ageHours!==null?` · ${o.ageHours}h old`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:88,columnNumber:15},this)]},o.name,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:86,columnNumber:13},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:84,columnNumber:9},this),d.jsxDEV("div",{className:"index-query",children:[d.jsxDEV("label",{children:["Index query",d.jsxDEV("input",{value:K,onChange:o=>ie(o.target.value),onKeyDown:o=>{o.key==="Enter"&&C()}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:95,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:93,columnNumber:11},this),d.jsxDEV("button",{onClick:C,disabled:p==="query",children:p==="query"?"Searching...":"Search index"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:97,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:92,columnNumber:9},this),I&&d.jsxDEV("div",{className:"index-results","aria-label":"Index query results",children:h.length?h.map(o=>d.jsxDEV("article",{children:[d.jsxDEV("strong",{children:o.title||o.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:104,columnNumber:19},this),d.jsxDEV("p",{children:o.summary||o.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:105,columnNumber:19},this),d.jsxDEV("small",{children:[o.type||"artifact",o.phase?` · ${o.phase}`:"",typeof o.score=="number"?` · ${o.score.toFixed(2)}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:106,columnNumber:19},this)]},o.path,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:103,columnNumber:17},this)):d.jsxDEV("p",{className:"empty",children:"No index hits."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:109,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:100,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:69,columnNumber:7},this),d.jsxDEV("div",{className:"grid2",children:[d.jsxDEV(Wm,{onPick:w,autoFocus:!0},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:114,columnNumber:9},this),d.jsxDEV("div",{role:"region","aria-label":"Capability detail",children:N?d.jsxDEV(d.Fragment,{children:[d.jsxDEV("div",{style:{marginBottom:8},children:[d.jsxDEV("span",{className:"badge",children:N.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:120,columnNumber:50},this)," ",d.jsxDEV("strong",{children:N.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:120,columnNumber:93},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:120,columnNumber:17},this),d.jsxDEV("div",{className:"terminal",style:{maxHeight:"52vh"},children:N.body},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:121,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:119,columnNumber:15},this):d.jsxDEV("p",{className:"empty",children:"Select a capability to inspect its definition."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:117,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:115,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:113,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Explore.tsx",lineNumber:63,columnNumber:5},this)}function Sx({session:N,setComposer:R,goSessions:X}){const[H,K]=se.useState(null),[ie,I]=se.useState(!1),[l,p]=se.useState(""),_=se.useCallback(()=>{Ve("/api/library").then(w=>{K(w.library),p("")}).catch(w=>p(w.message))},[]);se.useEffect(()=>{_()},[_]);const S=async w=>{try{await Ve(`/api/library/clone?type=${encodeURIComponent(w.type)}&name=${encodeURIComponent(w.name)}&path=${encodeURIComponent(w.path)}`,{method:"POST"}),I(!1),_()}catch(C){p(C.message)}},f=w=>{confirm(`Remove "${w.name}" from your library? (Your copy only — AIWG is untouched.)`)&&Ve(`/api/library/${encodeURIComponent(w.name)}`,{method:"DELETE"}).then(_).catch(C=>alert(C.message))},m=w=>{const C=dy(w.type,w.name.replace(/\.(md|markdown|ya?ml|json)$/i,""));N.isController&&N.state.target&&N.sendInput(C,N.state.target)||R(C),X()};return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:["Your ",d.jsxDEV("strong",{children:"own"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:39,columnNumber:14},this)," assets — copied, cloned, or imported. Edit them freely; ",d.jsxDEV("strong",{children:"AIWG install files are never touched"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:39,columnNumber:91},this),". Stored on disk under ",d.jsxDEV("code",{children:"~/.aiwg/cockpit/library"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:40,columnNumber:48},this),". Deploying one into a project is an agent action (Use → inject into a session)."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:38,columnNumber:7},this),l&&d.jsxDEV("p",{className:"err",children:l},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:43,columnNumber:15},this),d.jsxDEV("div",{className:"controls",children:d.jsxDEV("button",{onClick:()=>I(w=>!w),children:ie?"Close":"+ Clone from catalog"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:45,columnNumber:9},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:44,columnNumber:7},this),ie&&d.jsxDEV("div",{className:"picker",children:[d.jsxDEV("p",{className:"hint",style:{marginTop:0},children:"Search the AIWG catalog and clone a copy into your library."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:49,columnNumber:11},this),d.jsxDEV(Wm,{compact:!0,autoFocus:!0,onPick:S},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:48,columnNumber:9},this),H?H.length?d.jsxDEV("table",{children:[d.jsxDEV("caption",{children:[H.length," asset(s) in your library"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:57,columnNumber:15},this),d.jsxDEV("thead",{children:d.jsxDEV("tr",{children:[d.jsxDEV("th",{scope:"col",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:58,columnNumber:26},this),d.jsxDEV("th",{scope:"col",children:"Type"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:58,columnNumber:51},this),d.jsxDEV("th",{scope:"col",children:"Origin"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:58,columnNumber:76},this),d.jsxDEV("th",{scope:"col",children:"Actions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:58,columnNumber:103},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:58,columnNumber:22},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:58,columnNumber:15},this),d.jsxDEV("tbody",{children:H.map(w=>d.jsxDEV("tr",{children:[d.jsxDEV("td",{children:d.jsxDEV("strong",{children:w.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:62,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:62,columnNumber:21},this),d.jsxDEV("td",{children:d.jsxDEV("span",{className:"badge",children:w.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:63,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:63,columnNumber:21},this),d.jsxDEV("td",{children:w.origin},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:64,columnNumber:21},this),d.jsxDEV("td",{style:{whiteSpace:"nowrap"},children:[d.jsxDEV("button",{onClick:()=>m(w),children:"Use"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:66,columnNumber:23},this)," ",d.jsxDEV("button",{onClick:()=>f(w),"aria-label":`Remove ${w.name}`,children:"Remove"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:67,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:65,columnNumber:21},this)]},w.name,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:61,columnNumber:19},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:59,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:56,columnNumber:13},this):d.jsxDEV("p",{className:"empty",children:"Your library is empty. Clone a capability from the catalog to get a copy you can modify."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:54,columnNumber:27},this):d.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:53,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Library.tsx",lineNumber:37,columnNumber:5},this)}function Nx({refreshTick:N=0,session:R,setComposer:X,goSessions:H}){const[K,ie]=se.useState([]),[I,l]=se.useState([]),[p,_]=se.useState([]),[S,f]=se.useState(""),[m,w]=se.useState("");se.useEffect(()=>{Ve("/api/contributions").then(o=>{ie(o.actions??[]),l(o.screens??[]),_(o.workflows??[])}).catch(o=>f(o.message))},[N]);const C=async o=>{let a=o.inject.command;if(o.inject.needs_args){const v=prompt(`Arguments for ${o.title}${o.inject.args_hint?` (${o.inject.args_hint})`:""}:`,"");if(v===null)return;v.trim()&&(a+=" "+v.trim())}await Ve("/api/audit/intent",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({event:"action.inject.requested",detail:{action_id:o.id,source:o.source,target:o.inject.target??"focused",command:a,controller_attached:R.isController}})}).catch(()=>{}),R.isController&&R.state.target&&R.sendInput(a,R.state.target)?w(`Injected "${a}" into the attached session — the agent runs it.`):(X(a),w(`Ready to inject "${a}". Attach to a session (drive) or start one, then Send.`)),H()},g=async o=>{var a;await((a=navigator.clipboard)==null?void 0:a.writeText(o.inject.command)),w(`Copied "${o.inject.command}" to the clipboard.`)},u=new Map(K.map(o=>[o.id,o])),h=o=>{if(o.source==="cockpit://index/live"){window.location.hash="#explore",w("Opened the contributed Live Index screen.");return}if(o.source==="cockpit://issues/workbench"){window.location.hash="#actions",w("Issue Workbench is available here through the contributed issue actions and workflows.");return}w(`Unsupported contributed screen source: ${o.source}`)};return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:["Actions are ",d.jsxDEV("strong",{children:"contributed declaratively"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:73,columnNumber:21},this),". Clicking one ",d.jsxDEV("strong",{children:"injects a command into an agentic session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:73,columnNumber:78},this)," ","(focused, else it offers a new one); the agent runs it. The Cockpit never runs the CLI — agents do."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:72,columnNumber:7},this),S&&d.jsxDEV("p",{className:"err",children:S},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:76,columnNumber:15},this),d.jsxDEV("div",{className:"controls",role:"group","aria-label":"Contributed actions",children:K.length?K.map(o=>d.jsxDEV("span",{className:"action-cluster",children:[d.jsxDEV("button",{className:"act",title:`injects: ${o.inject.command}`,onClick:()=>C(o),children:[o.icon?o.icon+" ":"",o.title]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:81,columnNumber:15},this),d.jsxDEV("button",{className:"copy-command","aria-label":`Copy CLI command for ${o.title}`,title:o.inject.command,onClick:()=>g(o),children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:84,columnNumber:15},this)]},o.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:80,columnNumber:13},this)):d.jsxDEV("p",{className:"empty",children:"No contributed actions."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:89,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:77,columnNumber:7},this),d.jsxDEV("div",{className:"contrib-layout",children:[d.jsxDEV("section",{"aria-label":"Contributed screens",children:[d.jsxDEV("div",{className:"section-toolbar",children:d.jsxDEV("h2",{children:"Screens"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:94,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:93,columnNumber:11},this),d.jsxDEV("div",{className:"contrib-grid",children:I.length?I.map(o=>d.jsxDEV("article",{className:"contrib-item",children:[d.jsxDEV("strong",{children:o.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:100,columnNumber:19},this),d.jsxDEV("p",{children:o.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:101,columnNumber:19},this),d.jsxDEV("button",{onClick:()=>h(o),children:"Open"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:102,columnNumber:19},this)]},o.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:99,columnNumber:17},this)):d.jsxDEV("p",{className:"empty",children:"No contributed screens."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:105,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:96,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:92,columnNumber:9},this),d.jsxDEV("section",{"aria-label":"Contributed workflows",children:[d.jsxDEV("div",{className:"section-toolbar",children:d.jsxDEV("h2",{children:"Workflows"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:110,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:109,columnNumber:11},this),d.jsxDEV("div",{className:"contrib-grid",children:p.length?p.map(o=>d.jsxDEV("article",{className:"contrib-item",children:[d.jsxDEV("strong",{children:o.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:116,columnNumber:19},this),o.description&&d.jsxDEV("p",{children:o.description},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:117,columnNumber:37},this),d.jsxDEV("div",{className:"workflow-steps",children:o.steps.map((a,v)=>{const E=u.get(a.action);return d.jsxDEV("button",{disabled:!E,onClick:()=>E&&C(E),children:a.label||(E==null?void 0:E.title)||a.action},`${o.id}-${v}-${a.action}`,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:122,columnNumber:25},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:118,columnNumber:19},this)]},o.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:115,columnNumber:17},this)):d.jsxDEV("p",{className:"empty",children:"No contributed workflows."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:130,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:112,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:108,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:91,columnNumber:7},this),d.jsxDEV("p",{className:"empty",children:m||"Output appears in the session terminal — actions drop a command into a session and the agent executes it."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:134,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Actions.tsx",lineNumber:71,columnNumber:5},this)}function Ex({refreshTick:N=0}){const[R,X]=se.useState(null),[H,K]=se.useState(null),[ie,I]=se.useState(null),[l,p]=se.useState(null),[_,S]=se.useState("all"),[f,m]=se.useState(""),w=se.useCallback(()=>{Promise.all([Ve("/api/events/snapshot"),Ve("/api/missions").catch(()=>null),Ve("/api/cost").catch(()=>null),Ve("/api/mcp/discovery").catch(()=>null)]).then(([h,o,a,v])=>{X(h),K(o),I(a),p(v),m("")}).catch(h=>m(h.message))},[]);if(se.useEffect(()=>{w()},[w,N]),f)return d.jsxDEV("p",{className:"err",children:["Could not load telemetry: ",f]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:33,columnNumber:19},this);if(!R)return d.jsxDEV("p",{className:"empty",children:"Loading..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:34,columnNumber:23},this);const C=_==="all"?R.events:R.events.filter(h=>h.type.startsWith(_)),g=xx(H),u=ie?ie.total.input_tokens+ie.total.output_tokens:0;return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:"Live Cockpit telemetry from the unified event model. This replaces the legacy dashboard feed with Bridge-backed inventory, session, task, approval, Mission, and cost posture."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:42,columnNumber:7},this),d.jsxDEV("section",{className:"telemetry-kpis","aria-label":"Telemetry key performance indicators",children:[d.jsxDEV("article",{children:[d.jsxDEV("span",{children:"Events"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:18},this),d.jsxDEV("strong",{children:R.count},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:37},this),d.jsxDEV("small",{children:R.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:68},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:9},this),d.jsxDEV("article",{children:[d.jsxDEV("span",{children:"Active Missions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:18},this),d.jsxDEV("strong",{children:g.active},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:46},this),d.jsxDEV("small",{children:[g.terminal," terminal"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:85},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:9},this),d.jsxDEV("article",{children:[d.jsxDEV("span",{children:"Approvals"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:18},this),d.jsxDEV("strong",{children:g.awaiting},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:40},this),d.jsxDEV("small",{children:"awaiting operator input"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:81},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:9},this),d.jsxDEV("article",{children:[d.jsxDEV("span",{children:"Spend"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:18},this),d.jsxDEV("strong",{children:ie?`$${ie.total.usd.toFixed(2)}`:"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:36},this),d.jsxDEV("small",{children:u?`${u.toLocaleString()} tokens`:"cost route unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:99},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:9},this),d.jsxDEV("article",{children:[d.jsxDEV("span",{children:"MCP"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:18},this),d.jsxDEV("strong",{children:(l==null?void 0:l.status)??"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:34},this),d.jsxDEV("small",{children:l?`${l.tools.length} tools · ${l.auth.scopes.length} scopes`:"discovery unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:71},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:46,columnNumber:7},this),l&&d.jsxDEV("section",{className:"audit-tail","aria-label":"MCP management posture",children:[d.jsxDEV("h3",{children:"MCP Management"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:56,columnNumber:11},this),d.jsxDEV("p",{children:[d.jsxDEV("strong",{children:l.endpoint.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:57,columnNumber:14},this)," · ",l.endpoint.transport," · ",l.endpoint.stateless?"stateless":"stateful"," · session id ",l.endpoint.mcp_session_id?"expected":"not expected"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:57,columnNumber:11},this),d.jsxDEV("p",{children:[l.auth.principals.length," principal(s): ",l.auth.principals.map(h=>h.client_id).join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:58,columnNumber:11},this),d.jsxDEV("p",{children:["Tools: ",l.tools.map(h=>h.name).join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:59,columnNumber:11},this),d.jsxDEV("p",{children:["Resources: ",[...l.resources.map(h=>h.uri),...l.resource_templates.map(h=>h.uriTemplate)].join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:60,columnNumber:11},this),l.reason_code&&d.jsxDEV("p",{children:l.reason_code},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:61,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:55,columnNumber:9},this),d.jsxDEV("div",{className:"controls",role:"group","aria-label":"Filter telemetry events",children:["all","mission","task","approval","session","inventory"].map(h=>d.jsxDEV("button",{"aria-pressed":_===h,onClick:()=>S(h),children:h},h,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:67,columnNumber:11},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:65,columnNumber:7},this),C.length?d.jsxDEV("table",{children:[d.jsxDEV("caption",{children:[C.length," event(s), fetched ",new Date(R.fetched_at).toLocaleTimeString()]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:73,columnNumber:11},this),d.jsxDEV("thead",{children:d.jsxDEV("tr",{children:[d.jsxDEV("th",{scope:"col",children:"Time"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:22},this),d.jsxDEV("th",{scope:"col",children:"Type"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:47},this),d.jsxDEV("th",{scope:"col",children:"Subject"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:72},this),d.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:100},this),d.jsxDEV("th",{scope:"col",children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:126},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:18},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:11},this),d.jsxDEV("tbody",{children:C.map(h=>d.jsxDEV("tr",{children:[d.jsxDEV("td",{children:d.jsxDEV("time",{dateTime:h.ts,children:new Date(h.ts).toLocaleTimeString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:78,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:78,columnNumber:17},this),d.jsxDEV("td",{children:d.jsxDEV("span",{className:"badge",children:h.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:79,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:79,columnNumber:17},this),d.jsxDEV("td",{children:d.jsxDEV("code",{title:h.subject,children:tt(h.subject)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:80,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:80,columnNumber:17},this),d.jsxDEV("td",{children:h.state?d.jsxDEV("span",{className:`state ${h.state}`,children:[d.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:69},this),h.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:32},this):"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:17},this),d.jsxDEV("td",{children:h.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:82,columnNumber:17},this)]},h.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:77,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:75,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:72,columnNumber:9},this):d.jsxDEV("p",{className:"empty",children:"No events match this filter."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:71,columnNumber:26},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Telemetry.tsx",lineNumber:41,columnNumber:5},this)}function xx(N){const R={active:0,terminal:0,awaiting:0};for(const X of(N==null?void 0:N.missions)??[])(X.status==="awaiting-approval"||X.status==="input-required")&&(R.awaiting+=1),X.terminal?R.terminal+=1:R.active+=1;return R}const gy="aiwg.cockpit.memory.notes.v1";function Cx({refreshTick:N=0}){const[R,X]=se.useState(()=>Dx()),[H,K]=se.useState([]),[ie,I]=se.useState(""),[l,p]=se.useState(""),[_,S]=se.useState(""),[f,m]=se.useState(""),[w,C]=se.useState(""),g=se.useCallback(a=>{X(a),localStorage.setItem(gy,JSON.stringify(a))},[]);se.useEffect(()=>{Ve("/api/missions").then(a=>{K(a.missions),C("");const v=kx(R,a.missions);v!==R&&g(v)}).catch(a=>C(a.message))},[N]);const u=se.useMemo(()=>{const a=ie.trim().toLowerCase();return a?R.filter(v=>[v.title,v.body,v.source,v.mission_id??"",...v.tags].some(E=>E.toLowerCase().includes(a))):R},[R,ie]),h=()=>{l.trim()&&(g([{id:`note-${Date.now()}`,title:l.trim(),body:_.trim(),tags:f.split(",").map(a=>a.trim()).filter(Boolean),created_at:new Date().toISOString(),source:"operator"},...R]),p(""),S(""),m(""))},o=a=>g(R.filter(v=>v.id!==a));return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("p",{className:"hint",children:"Operator memory for Cockpit: local notes plus automatic Mission completion notes from durable Mission Control state. Notes stay in this browser profile; AIWG source files are not modified."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:73,columnNumber:7},this),w&&d.jsxDEV("p",{className:"err",children:["Mission memory sync failed: ",w]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:77,columnNumber:15},this),d.jsxDEV("section",{className:"memory-layout",children:[d.jsxDEV("form",{className:"memory-form",onSubmit:a=>{a.preventDefault(),h()},"aria-label":"Add memory note",children:[d.jsxDEV("h2",{children:"Add Note"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:80,columnNumber:11},this),d.jsxDEV("label",{children:["Title",d.jsxDEV("input",{value:l,onChange:a=>p(a.target.value),placeholder:"Note title"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:81,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:81,columnNumber:11},this),d.jsxDEV("label",{children:["Body",d.jsxDEV("textarea",{value:_,onChange:a=>S(a.target.value),placeholder:"What should future you remember?",rows:4},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:82,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:82,columnNumber:11},this),d.jsxDEV("label",{children:["Tags",d.jsxDEV("input",{value:f,onChange:a=>m(a.target.value),placeholder:"cockpit, release, risk"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:83,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:83,columnNumber:11},this),d.jsxDEV("button",{type:"submit",disabled:!l.trim(),children:"Save Note"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:84,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:79,columnNumber:9},this),d.jsxDEV("section",{className:"memory-list","aria-label":"Memory notes",children:[d.jsxDEV("div",{className:"section-toolbar",children:[d.jsxDEV("div",{children:[d.jsxDEV("h2",{children:"Notes"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:89,columnNumber:15},this),d.jsxDEV("p",{className:"hint",children:[R.length," saved · ",H.filter(a=>a.terminal).length," terminal mission(s) observed"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:90,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:88,columnNumber:13},this),d.jsxDEV("input",{"aria-label":"Search memory notes",value:ie,onChange:a=>I(a.target.value),placeholder:"Search notes"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:92,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:87,columnNumber:11},this),u.length?d.jsxDEV("div",{className:"note-grid",children:u.map(a=>d.jsxDEV("article",{className:"note-card",children:[d.jsxDEV("header",{children:[d.jsxDEV("h3",{children:a.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:99,columnNumber:21},this),d.jsxDEV("button",{"aria-label":`Delete note ${a.title}`,onClick:()=>o(a.id),children:"Remove"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:100,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:98,columnNumber:19},this),a.body&&d.jsxDEV("p",{children:a.body},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:102,columnNumber:33},this),d.jsxDEV("footer",{children:[d.jsxDEV("time",{dateTime:a.created_at,children:new Date(a.created_at).toLocaleString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:104,columnNumber:21},this),a.mission_id&&d.jsxDEV("code",{children:tt(a.mission_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:105,columnNumber:41},this),a.tags.map(v=>d.jsxDEV("span",{className:"tag",children:v},v,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:106,columnNumber:45},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:103,columnNumber:19},this)]},a.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:97,columnNumber:17},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:95,columnNumber:13},this):d.jsxDEV("p",{className:"empty",children:ie?"No notes match your search.":"No notes yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:94,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:86,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/Memory.tsx",lineNumber:72,columnNumber:5},this)}function Dx(){try{const N=JSON.parse(localStorage.getItem(gy)||"[]");return Array.isArray(N)?N:[]}catch{return[]}}function kx(N,R){const X=new Set(N.map(K=>K.mission_id).filter(Boolean)),H=R.filter(K=>K.terminal&&!X.has(K.id)).map(K=>({id:`mission-note-${K.id}`,title:K.title.slice(0,96),body:[`Status: ${K.status}`,K.completion?`Completion: ${K.completion}`:"",K.error?`Error: ${K.error}`:""].filter(Boolean).join(`
|
|
311
|
-
`),tags:["mission",K.status,K.source].filter(Boolean),created_at:K.completed_at??new Date().toISOString(),mission_id:K.id,source:"mission"}));return H.length?[...H,...N]:N}const Rx=15e3;function Tx({open:N,onClose:R,session:X,onStarted:H,initialInstanceId:K,startTimeoutMs:ie=Rx}){var M;const[I,l]=se.useState([]),[p,_]=se.useState(""),[S,f]=se.useState(""),[m,w]=se.useState(""),[C,g]=se.useState("observer"),[u,h]=se.useState(!1),[o,a]=se.useState("");se.useEffect(()=>{if(!N)return;a(""),h(!1);let j=!1;return(async()=>{var z,Y,ee;try{const ne=await Ve("/api/inventory");if(j)return;const te=Bx(ne.instances).filter(ce=>ce.state==="running");l(te);const de=te.find(ce=>ce.id===K)??te.find(ce=>{var B;return(B=ce.session_backends)==null?void 0:B.some(U=>U.available)})??te[0];if(de){_(de.id),f(((z=de.launch_context)==null?void 0:z.loadout)??de.loadout??"");const ce=((Y=de.session_backends)==null?void 0:Y.find(B=>B.available))??((ee=de.session_backends)==null?void 0:ee[0]);w(ce?`${ce.mode}:${ce.backend}`:"")}else a("No stack connected — start an executor first.")}catch(ne){j||a(ne.message)}})(),()=>{j=!0}},[N,K]);const v=I.find(j=>j.id===p),E=(v==null?void 0:v.session_backends)??[],x=E.find(j=>`${j.mode}:${j.backend}`===m)??E.find(j=>j.available)??E[0];if(se.useEffect(()=>{var z,Y,ee;if(!v)return;f(((z=v.launch_context)==null?void 0:z.loadout)??v.loadout??"");const j=((Y=v.session_backends)==null?void 0:Y.find(ne=>ne.available))??((ee=v.session_backends)==null?void 0:ee[0]);w(j?`${j.mode}:${j.backend}`:"")},[p]),!N)return null;const k=X.state.attached,y=!u&&!!v&&!!(x!=null&&x.available),T=async()=>{if(!v||!x)return;h(!0),a("");const j=new AbortController,z=window.setTimeout(()=>j.abort(),ie);try{const Y=new URLSearchParams({mode:x.mode,backend:x.backend}),ee=await Ve(`/api/instances/${encodeURIComponent(v.id)}/sessions?${Y}`,{method:"POST",signal:j.signal});if(!ee.attach_url)throw new Error("Session started but no attach URL was returned.");X.attach(ee.attach_url,!1,C,{instanceId:v.id,sessionId:ee.id}),H(),R(),h(!1)}catch(Y){const ee=Y instanceof DOMException&&Y.name==="AbortError"?"Starting the session timed out. The instance may still be preparing PTY support; refresh sessions and try again.":Y.message;a(ee),h(!1)}finally{window.clearTimeout(z)}};return d.jsxDEV("div",{className:"modal-backdrop",role:"presentation",onClick:R,children:d.jsxDEV("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"start-session-title",onClick:j=>j.stopPropagation(),onKeyDown:j=>{j.key==="Escape"&&R()},children:[d.jsxDEV("h2",{id:"start-session-title",children:"Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:122,columnNumber:9},this),o&&d.jsxDEV("p",{className:"err",children:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:124,columnNumber:17},this),k&&d.jsxDEV("p",{className:"hint warn",children:"You have an attached view. Starting creates another managed session and switches Cockpit to it; existing sessions keep running."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:126,columnNumber:11},this),d.jsxDEV("div",{className:"form-grid",children:[d.jsxDEV("label",{htmlFor:"ss-instance",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:130,columnNumber:11},this),d.jsxDEV("select",{id:"ss-instance",value:p,onChange:j=>_(j.target.value),children:I.map(j=>d.jsxDEV("option",{value:j.id,children:[tt(j.id)," · ",j.runtime," · ",j.state]},j.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:133,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:131,columnNumber:11},this),d.jsxDEV("label",{children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:137,columnNumber:11},this),d.jsxDEV("span",{className:"ro",children:v?`${v.runtime_posture.label} (${v.runtime})`:"—"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:138,columnNumber:11},this),d.jsxDEV("label",{children:"Instance loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:140,columnNumber:11},this),d.jsxDEV("span",{className:"ro",children:[S||"unknown",(M=v==null?void 0:v.launch_context)!=null&&M.image_ref?` · ${v.launch_context.image_ref}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:141,columnNumber:11},this),d.jsxDEV("label",{htmlFor:"ss-backend",children:"Backend"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:143,columnNumber:11},this),d.jsxDEV("select",{id:"ss-backend",value:m,onChange:j=>w(j.target.value),children:E.length?E.map(j=>d.jsxDEV("option",{value:`${j.mode}:${j.backend}`,disabled:!j.available,children:[j.mode," · ",j.backend,j.available?"":` — ${j.reason??"unsupported"}`]},`${j.mode}:${j.backend}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:147,columnNumber:17},this)):d.jsxDEV("option",{value:"",children:"— not advertised —"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:150,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:144,columnNumber:11},this),d.jsxDEV("label",{htmlFor:"ss-posture",children:"Posture"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:153,columnNumber:11},this),d.jsxDEV("select",{id:"ss-posture",value:C,onChange:j=>g(j.target.value),children:[d.jsxDEV("option",{value:"observer",children:"Observe (read-only)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:159,columnNumber:13},this),d.jsxDEV("option",{value:"controller",disabled:(x==null?void 0:x.drive)===!1,children:"Drive (control)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:160,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:154,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:129,columnNumber:9},this),x&&!x.available&&d.jsxDEV("p",{className:"hint",children:x.reason??"Selected backend is unavailable on this instance."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:165,columnNumber:11},this),d.jsxDEV("div",{className:"modal-actions",children:[d.jsxDEV("button",{onClick:R,disabled:u,children:"Cancel"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:169,columnNumber:11},this),d.jsxDEV("button",{className:"cta",onClick:T,disabled:!y,children:u?"Starting…":k?"Start another session":"Start session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:170,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:168,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:114,columnNumber:7},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/StartSessionModal.tsx",lineNumber:113,columnNumber:5},this)}function Bx(N){const R=new Set;return N.filter(X=>R.has(X.id)?!1:(R.add(X.id),!0))}const Ax=[{value:"agentic/codex:latest",label:"Codex"},{value:"agentic/claude:latest",label:"Claude"},{value:"agentic/opencode:latest",label:"OpenCode"},{value:"agentic/automation-control:latest",label:"Automation control"},{value:"agentic/agent:dev",label:"Agent dev base"}],ny=[{id:"host-tools",label:"host-tools",description:"Host tools",runtimes:["host"]},{id:"agentic-dev",label:"agentic-dev",description:"Full development environment",runtimes:["docker","container","qemu","vm"]},{id:"claude-only",label:"claude-only",description:"Claude provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"codex-only",label:"codex-only",description:"Codex provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"opencode-only",label:"opencode-only",description:"OpenCode provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"full-suite",label:"full-suite",description:"Multi-provider tool suite",runtimes:["qemu","vm"]}],Fu=()=>`cockpit-${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`.slice(0,32),vy=["instance.snapshot","instance.restore","instance.fork","warm_pool.manage"];function Mx({open:N,onClose:R,onLaunched:X}){var ye;const[H,K]=se.useState("host"),[ie,I]=se.useState(Fu),[l,p]=se.useState("host-tools"),[_,S]=se.useState([]),[f,m]=se.useState([]),[w,C]=se.useState(""),[g,u]=se.useState(null),[h,o]=se.useState(""),[a,v]=se.useState(!1),[E,x]=se.useState("agentic/codex:latest"),[k,y]=se.useState(""),[T,M]=se.useState(""),[j,z]=se.useState(""),[Y,ee]=se.useState(""),[ne,te]=se.useState(!0),[de,ce]=se.useState(!1),[B,U]=se.useState(""),[L,q]=se.useState("");if(se.useEffect(()=>{if(!N)return;I(Fu());let be=!1;return Promise.all([Ve("/api/loadouts").catch(()=>({loadouts:[]})),Ve("/api/inventory").catch(()=>({instances:[]})),Ve("/api/executor/capabilities").catch(()=>null)]).then(([Ue,Ie,Le])=>{if(be)return;S(Ue.loadouts??[]),m(Ie.instances??[]),u(Le);const ke=(Ie.instances??[]).find(_y);C(jt=>jt||(ke==null?void 0:ke.id)||"")}),()=>{be=!0}},[N]),se.useEffect(()=>{if(!N||H!=="qemu")return;const be=oy(_,H).find(Ie=>Ie.id===l),Ue=ry(g,be);Ue.length&&!Ue.some(Ie=>Ie.provider===h)&&o(Ue[0].provider)},[g,l,_,N,H,h]),!N)return null;const ue=oy(_,H),pe=ue.find(be=>be.id===l),ve=ry(g,pe),Ce=H==="qemu"&&(h||((ye=ve[0])==null?void 0:ye.provider))||"",F=ve.find(be=>be.provider===Ce),V=Ce?Yx(pe,Ce):void 0,me=Vx(pe,V,F,Ce,a),oe=be=>{K(be),be==="host"?p("host-tools"):be==="docker"?(p("agentic-dev"),x(Ue=>Ue||"agentic/codex:latest")):(p("profiles/basic.yaml"),v(!1))},ae=async()=>{var be,Ue,Ie,Le,ke,jt,zi,De;ce(!0),U(""),q("");try{if(H==="host"){const ze=ea(f).find(wt=>wt.id===w)??ea(f)[0];if(ze){q(ne?`Using host target ${((be=ze.launch_context)==null?void 0:be.name)??tt(ze.id)}; starting session...`:`Using host target ${((Ue=ze.launch_context)==null?void 0:Ue.name)??tt(ze.id)}`),await X(ze.id,ne),ne&&R();return}if(!(g!=null&&g.host_runtime_enabled))throw new Error("Host runtime is not enabled on this executor. Enable the host supervisor or choose Docker container.");const We={name:ie.replace(/[^a-z0-9-]/g,"-").replace(/^-+/,"a-").slice(0,63),runtime:"host",loadout:"host-tools",start:!0},ut=await Ve("/api/instances",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(We)}),ct=ut.instance_id??ut.instanceId??((Ie=ut.result)==null?void 0:Ie.instance_id)??((Le=ut.result)==null?void 0:Le.instanceId),bt=ut.id??((ke=ut.operation)==null?void 0:ke.id);q(ne?`Host launch accepted: ${ct??bt??"operation pending"}; waiting for session...`:`Host launch accepted: ${ct??bt??"operation pending"}`),await X(ct,ne,bt),ne?R():I(Fu());return}const Nt={name:ie.replace(/[^a-z0-9-]/g,"-").replace(/^-+/,"a-").slice(0,63),runtime:H,start:!0};if(l&&(Nt.loadout=l),T&&(Nt.profile=T),H==="docker"&&(Nt.image=E==="__custom__"?k.trim():E,Nt.agentshare=!0),H==="qemu"){Nt.agentshare=!0,Ce&&(Nt.provider=Ce);const ze=Xx(Ce,me);ze&&(Nt.runtime_options=ze),j.trim()&&(Nt.ssh_key=j.trim())}H==="docker"&&Y.trim()&&(Nt.mounts=Y.split(`
|
|
312
|
-
`).map(ze=>ze.trim()).filter(Boolean));const ge=await Ve("/api/instances",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Nt)}),Be=ge.instance_id??ge.instanceId??((jt=ge.result)==null?void 0:jt.instance_id)??((zi=ge.result)==null?void 0:zi.instanceId),Ze=ge.id??((De=ge.operation)==null?void 0:De.id);q(ne?`Launch accepted: ${Be??Ze??"operation pending"}; waiting for session...`:`Launch accepted: ${Be??Ze??"operation pending"}`),await X(Be,ne,Ze),ne?R():I(Fu())}catch(Nt){U(Nt.message)}finally{ce(!1)}};return d.jsxDEV("div",{className:"modal-backdrop",role:"presentation",onClick:R,children:d.jsxDEV("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"launch-instance-title",onClick:be=>be.stopPropagation(),children:[d.jsxDEV("h2",{id:"launch-instance-title",children:"New instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:213,columnNumber:9},this),d.jsxDEV("p",{className:"hint",children:"Create a runtime target. Existing instances and sessions keep running."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:214,columnNumber:9},this),B&&d.jsxDEV("p",{className:"err",children:B},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:215,columnNumber:17},this),L&&d.jsxDEV("p",{className:"hint ok-text",children:L},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:216,columnNumber:20},this),d.jsxDEV("div",{className:"form-grid",children:[d.jsxDEV("label",{htmlFor:"li-runtime",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:218,columnNumber:11},this),d.jsxDEV("select",{id:"li-runtime",value:H,onChange:be=>oe(be.target.value),children:[d.jsxDEV("option",{value:"host",children:"Host"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:220,columnNumber:13},this),d.jsxDEV("option",{value:"docker",children:"Docker container"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:221,columnNumber:13},this),d.jsxDEV("option",{value:"qemu",children:"VM / QEMU"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:222,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:219,columnNumber:11},this),H==="host"?d.jsxDEV(d.Fragment,{children:[d.jsxDEV("label",{htmlFor:"li-host-target",children:"Host target"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:226,columnNumber:15},this),d.jsxDEV("select",{id:"li-host-target",value:w,onChange:be=>C(be.target.value),children:[ea(f).map(be=>{var Ue;return d.jsxDEV("option",{value:be.id,children:[((Ue=be.launch_context)==null?void 0:Ue.name)??tt(be.id)," - ",be.loadout]},be.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:228,columnNumber:52},this)}),!ea(f).length&&(g==null?void 0:g.host_runtime_enabled)&&d.jsxDEV("option",{value:"",children:"Local host runtime - create new"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:229,columnNumber:90},this),!ea(f).length&&!(g!=null&&g.host_runtime_enabled)&&d.jsxDEV("option",{value:"",children:"Host runtime not enabled"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:230,columnNumber:91},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:227,columnNumber:15},this),!ea(f).length&&(g==null?void 0:g.host_runtime_enabled)&&d.jsxDEV(d.Fragment,{children:[d.jsxDEV("label",{htmlFor:"li-name",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:234,columnNumber:19},this),d.jsxDEV("input",{id:"li-name",value:ie,onChange:be=>I(be.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:235,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:233,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:225,columnNumber:13},this):d.jsxDEV(d.Fragment,{children:[d.jsxDEV("label",{htmlFor:"li-name",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:241,columnNumber:15},this),d.jsxDEV("input",{id:"li-name",value:ie,onChange:be=>I(be.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:242,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:240,columnNumber:13},this),d.jsxDEV("label",{htmlFor:"li-loadout",children:"Instance loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:245,columnNumber:11},this),H==="host"?d.jsxDEV("span",{className:"ro",children:"host-tools"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:247,columnNumber:13},this):d.jsxDEV("select",{id:"li-loadout",value:l,onChange:be=>p(be.target.value),children:ue.map(be=>d.jsxDEV("option",{value:be.id,children:[be.label,be.description?` - ${be.description}`:""]},be.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:250,columnNumber:43},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:249,columnNumber:13},this),H==="qemu"&&d.jsxDEV(d.Fragment,{children:[d.jsxDEV("label",{htmlFor:"li-vm-provider",children:"VM provider"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:255,columnNumber:15},this),d.jsxDEV("select",{id:"li-vm-provider",value:Ce,onChange:be=>o(be.target.value),disabled:!ve.length,children:[!ve.length&&d.jsxDEV("option",{value:"",children:"Provider discovery unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:262,columnNumber:45},this),ve.map(be=>d.jsxDEV("option",{value:be.provider,children:[be.label??be.provider,be.default?" (default)":""]},be.provider,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:264,columnNumber:19},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:256,columnNumber:15},this),d.jsxDEV("label",{htmlFor:"li-gpu-vfio",children:"GPU / VFIO"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:269,columnNumber:15},this),d.jsxDEV("div",{className:"field-stack",children:[d.jsxDEV("label",{className:"check-row",children:[d.jsxDEV("input",{id:"li-gpu-vfio",type:"checkbox",checked:me.required||a,disabled:me.required||!me.selectable,onChange:be=>v(be.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:272,columnNumber:19},this),"Request GPU passthrough"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:271,columnNumber:17},this),d.jsxDEV("div",{className:`posture-line ${me.blocked?"warn":me.effective?"ok-text":""}`,children:me.message},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:281,columnNumber:17},this),me.fastStartReason&&d.jsxDEV("div",{className:"cell-note",children:me.fastStartReason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:284,columnNumber:41},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:270,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:254,columnNumber:13},this),H!=="host"&&d.jsxDEV(d.Fragment,{children:[d.jsxDEV("label",{htmlFor:"li-profile",children:"Profile"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:290,columnNumber:15},this),d.jsxDEV("input",{id:"li-profile",value:T,onChange:be=>M(be.target.value),placeholder:"optional"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:291,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:289,columnNumber:13},this),H==="qemu"&&d.jsxDEV(d.Fragment,{children:[d.jsxDEV("label",{htmlFor:"li-ssh-key",children:"SSH public key"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:296,columnNumber:15},this),d.jsxDEV("input",{id:"li-ssh-key",value:j,onChange:be=>z(be.target.value),placeholder:"auto-detect, or ~/.ssh/agentic_ed25519.pub"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:297,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:295,columnNumber:13},this),H==="docker"&&d.jsxDEV(d.Fragment,{children:[d.jsxDEV("label",{htmlFor:"li-image",children:"Container image"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:307,columnNumber:15},this),d.jsxDEV("div",{className:"field-stack",children:[d.jsxDEV("select",{id:"li-image",value:E,onChange:be=>x(be.target.value),children:[Ax.map(be=>d.jsxDEV("option",{value:be.value,children:[be.label," - ",be.value]},be.value,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:310,columnNumber:57},this)),d.jsxDEV("option",{value:"__custom__",children:"Custom image..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:311,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:309,columnNumber:17},this),E==="__custom__"&&d.jsxDEV("input",{"aria-label":"Custom container image",value:k,onChange:be=>y(be.target.value),placeholder:"registry.example.com/team/agent:tag"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:314,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:308,columnNumber:15},this),d.jsxDEV("label",{htmlFor:"li-mounts",children:"Mounts"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:322,columnNumber:15},this),d.jsxDEV("textarea",{id:"li-mounts",value:Y,onChange:be=>ee(be.target.value),placeholder:"/host/path:/container/path"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:323,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:306,columnNumber:13},this),d.jsxDEV("label",{htmlFor:"li-open-session",children:"After launch"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:326,columnNumber:11},this),d.jsxDEV("label",{className:"check-row",children:[d.jsxDEV("input",{id:"li-open-session",type:"checkbox",checked:ne,onChange:be=>te(be.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:328,columnNumber:13},this),"Start a session automatically when the instance is ready"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:327,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:217,columnNumber:9},this),d.jsxDEV("div",{className:"modal-actions",children:[d.jsxDEV("button",{onClick:R,disabled:de,children:"Close"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:333,columnNumber:11},this),d.jsxDEV("button",{className:"cta",onClick:ae,disabled:de||H==="host"&&!w&&!(g!=null&&g.host_runtime_enabled)||H==="host"&&!w&&!ie.trim()||H!=="host"&&!ie.trim()||H==="docker"&&E==="__custom__"&&!k.trim()||H==="qemu"&&me.effective&&me.blocked,children:de?"Working...":H==="host"?ne?"Start host session":"Use host":ne?"Create + start session":"Create instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:334,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:332,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:212,columnNumber:7},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/components/LaunchInstanceModal.tsx",lineNumber:211,columnNumber:5},this)}function Ox(N){return new Set(((N==null?void 0:N.capabilities)??[]).map(R=>R.id))}function Lx(N,R){var X;return new Set([...((X=N==null?void 0:N.runtime_options)==null?void 0:X.required_capabilities)??[],...(R==null?void 0:R.required_capabilities)??[]])}function jx(N,R){var X;return new Set([...((X=N==null?void 0:N.runtime_options)==null?void 0:X.excluded_capabilities)??[],...(R==null?void 0:R.excluded_capabilities)??[]])}function ry(N,R){var ie,I;const X=((I=(ie=N==null?void 0:N.runtime_providers)==null?void 0:ie.providers)==null?void 0:I.filter(l=>l.kind==="vm"))??[],H=new Set(((R==null?void 0:R.compatibility)??[]).filter(l=>["vm","qemu"].includes(String(l.runtime_kind).toLowerCase())).map(l=>l.provider)),K=H.size?X.filter(l=>H.has(l.provider)):X;return K.length?K:[...H].map(l=>({provider:l,kind:"vm",capabilities:[]}))}function Yx(N,R){var X;return(X=N==null?void 0:N.compatibility)==null?void 0:X.find(H=>H.provider===R&&["vm","qemu"].includes(String(H.runtime_kind).toLowerCase()))}function Vx(N,R,X,H,K){var w;const ie=Lx(N,R).has("device.vfio"),I=jx(N,R),l=ie||K,p=Ox(X).has("device.vfio"),_=[...I].filter(C=>vy.includes(C)),S=(w=[...(R==null?void 0:R.constraints)??[],...(X==null?void 0:X.capability_constraints)??[]].find(C=>C.capability==="device.vfio"))==null?void 0:w.reason;let f=!1,m="No GPU requested";return H?R&&!R.eligible?(f=l||ie,m=R.reason??"Loadout is not eligible for this provider"):!R&&l?(f=!0,m="Loadout compatibility does not advertise VFIO"):!p&&l?(f=!0,m="Selected provider does not advertise VFIO"):p?R?I.has("device.vfio")&&l?(f=!0,m="Selected loadout excludes GPU passthrough"):ie?m=f?m:"GPU passthrough required by loadout":K?m=f?m:"GPU passthrough requested":p&&!I.has("device.vfio")?m="GPU passthrough available":I.has("device.vfio")&&(m="GPU passthrough unavailable for this loadout"):m="GPU passthrough requires loadout compatibility":m="GPU passthrough unavailable":(f=l,m="Provider discovery unavailable"),{required:ie,effective:l,blocked:f,selectable:!!(H&&p&&R&&!I.has("device.vfio")&&R.eligible!==!1),message:m,fastStartReason:l&&_.length?`${S??"VFIO-backed VMs cannot safely reuse memory state"} Disabled: ${_.join(", ")}.`:S}}function Xx(N,R){if(!N&&!R.effective)return;const X={kind:"vm",launch_strategy:{mode:"cold"}};return N&&(X.provider=N),R.effective&&(X.required_capabilities=["device.vfio"],X.excluded_capabilities=vy,X.constraints={allow_vfio_fast_start:!1,fallback_mode:"fail"}),X}function oy(N,R){if(R==="host")return ny.filter(ie=>ie.id==="host-tools");const X=R==="docker"?["docker","container"]:R==="qemu"?["qemu","vm"]:[R],H=[...N,...ny].reduce((ie,I)=>(ie.some(l=>l.id===I.id)||ie.push(I),ie),[]),K=H.filter(ie=>{var I;return!((I=ie.runtimes)!=null&&I.length)||ie.runtimes.some(l=>X.includes(String(l).toLowerCase()))});return K.length?K:H}function ea(N){return N.filter(_y)}function _y(N){var R,X;return N.state==="running"&&((R=N.runtime_posture)==null?void 0:R.kind)==="host"&&((X=N.session_backends)==null?void 0:X.some(H=>H.available!==!1))}const $m=[{id:"welcome",label:"Home"},{id:"inventory",label:"Inventory"},{id:"running",label:"Running"},{id:"missions",label:"Missions"},{id:"sessions",label:"Sessions"},{id:"approvals",label:"Approvals"},{id:"explore",label:"Explore"},{id:"library",label:"Library"},{id:"telemetry",label:"Telemetry"},{id:"memory",label:"Memory"},{id:"actions",label:"Actions"}],Hx=N=>new Promise(R=>window.setTimeout(R,N));function Ux(){const[N,R]=se.useState(()=>{const y=window.location.hash.replace(/^#/,"");return $m.some(T=>T.id===y)?y:"welcome"}),X=CE(),H=Fm(),K=rx(H).filter(y=>y.id!==`pty:${H.activeKey}`),[ie,I]=se.useState(""),[l,p]=se.useState(null),[_,S]=se.useState("checking"),f=se.useRef(!1),m=se.useRef(!1),[w,C]=se.useState(!1),[g,u]=se.useState(void 0),[h,o]=se.useState(!1),[a,v]=se.useState(0);se.useEffect(()=>{let y=!1,T,M=1e3;const j=Y=>{T=window.setTimeout(z,Y)},z=async()=>{try{const[Y,ee]=await Promise.all([Ve("/api/health"),Ve("/api/inventory")]);if(y)return;const[ne,te]=await Promise.all([Ve("/api/running").catch(()=>({count:0})),Ve("/api/approvals?status=pending").catch(()=>({approvals:[]}))]);if(y)return;const de=ee.instances.map(B=>{var U;return lr(((U=B.runtime_posture)==null?void 0:U.kind)??B.runtime)}),ce=X.responseNeeded.needed?1:0;if(p({executor:Y.executor_url,instances:ee.instances.length,running:ne.count,responses:te.approvals.length+K.length+ce,host:de.includes("host"),container:de.includes("container"),vm:de.includes("vm")}),!m.current){const B=f.current;f.current=!1,S("live"),B&&v(U=>U+1)}M=1e3,y||j(15e3)}catch{y||(f.current=!0,S("reconnecting"),j(M),M=Math.min(M*2,15e3))}};return z(),()=>{y=!0,T!==void 0&&window.clearTimeout(T)}},[X.responseNeeded.needed,a,K.length]),se.useEffect(()=>{if(typeof EventSource>"u")return;let y,T=!1;const M=()=>{m.current=!1,v(j=>j+1)};return uy().then(()=>{T||(y=new EventSource("/api/events"),y.onopen=M,y.addEventListener("cockpit.refresh",M),y.onerror=()=>{m.current=!0,f.current=!0,S("reconnecting"),v(j=>j+1)})}).catch(()=>{m.current=!0,S("reconnecting")}),()=>{T=!0,y==null||y.close()}},[]),se.useEffect(()=>{const y=()=>{const T=window.location.hash.replace(/^#/,"");$m.some(M=>M.id===T)&&R(T)};return window.addEventListener("hashchange",y),()=>window.removeEventListener("hashchange",y)},[]);const E=y=>{u(y),C(!0)},x=async(y,T,M)=>{if(v(j=>j+1),!T){R("inventory"),v(j=>j+1);return}R("sessions"),(async()=>{try{const j=await zx(y,M),z=j.session_backends.find(ne=>ne.available!==!1&&ne.drive!==!1)??j.session_backends.find(ne=>ne.available!==!1)??j.session_backends[0];if(!z||z.available===!1)throw new Error((z==null?void 0:z.reason)??"No available session backend for the new instance.");const Y=new URLSearchParams({mode:z.mode,backend:z.backend}),ee=await Ve(`/api/instances/${encodeURIComponent(j.id)}/sessions?${Y}`,{method:"POST"});X.attach(ee.attach_url,!1,z.drive===!1?"observer":"controller",{instanceId:j.id,sessionId:ee.id})}catch(j){console.warn("auto-session after launch did not complete:",j.message)}finally{v(j=>j+1)}})()},k=async()=>{var y;await((y=navigator.clipboard)==null?void 0:y.writeText("aiwg cockpit"))};return d.jsxDEV(d.Fragment,{children:[d.jsxDEV("header",{children:[d.jsxDEV("div",{className:"brand-lockup",children:[d.jsxDEV("span",{className:"mark","aria-hidden":"true",children:"◆"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:215,columnNumber:11},this),d.jsxDEV("h1",{children:"AIWG Cockpit"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:216,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:214,columnNumber:9},this),d.jsxDEV("div",{className:"top-status","aria-label":"Cockpit status","aria-live":"polite",children:[d.jsxDEV("span",{className:`health-pill ${_==="live"?"ok":"warn"}`,title:_==="reconnecting"&&l?"Connection interrupted; showing last-known status while Cockpit retries.":void 0,children:_==="live"?"Bridge live":_==="reconnecting"?"Reconnecting…":"Bridge checking"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:219,columnNumber:11},this),l&&d.jsxDEV(d.Fragment,{children:[d.jsxDEV("span",{className:"executor-pill",title:l.executor,children:l.executor},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:227,columnNumber:15},this),d.jsxDEV("span",{children:[l.instances," stacks"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:228,columnNumber:15},this),d.jsxDEV("span",{children:[l.running," running"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:229,columnNumber:15},this),d.jsxDEV("span",{children:[l.responses," responses needed"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:230,columnNumber:15},this),d.jsxDEV("span",{className:"matrix-mini",title:"Runtime target coverage",children:["host ",l.host?"✓":"-"," · docker ",l.container?"✓":"-"," · vm ",l.vm?"✓":"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:231,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:226,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:218,columnNumber:9},this),d.jsxDEV("button",{className:"meta",onClick:()=>o(!0),children:"+ Launch instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:235,columnNumber:9},this),d.jsxDEV("button",{className:"meta",onClick:()=>E(),children:"▸ Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:236,columnNumber:9},this),d.jsxDEV("button",{className:"meta",onClick:k,children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:237,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:213,columnNumber:7},this),d.jsxDEV("div",{role:"tablist","aria-label":"Cockpit views",children:$m.map(y=>d.jsxDEV("button",{role:"tab",id:`tab-${y.id}`,"aria-controls":`panel-${y.id}`,"aria-selected":N===y.id,tabIndex:N===y.id?0:-1,onClick:()=>R(y.id),children:y.label},y.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:241,columnNumber:11},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:239,columnNumber:7},this),d.jsxDEV("main",{children:[d.jsxDEV(qs,{id:"welcome",tab:N,children:d.jsxDEV(RE,{onStartSession:()=>E(),onLaunchInstance:()=>o(!0),goTo:y=>R(y)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:248,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:248,columnNumber:9},this),d.jsxDEV(qs,{id:"inventory",tab:N,children:d.jsxDEV(jE,{onStartSession:E,onLaunchInstance:()=>o(!0),refreshTick:a},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:249,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:249,columnNumber:9},this),d.jsxDEV(qs,{id:"running",tab:N,children:d.jsxDEV(qE,{refreshTick:a},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:250,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:250,columnNumber:9},this),d.jsxDEV(qs,{id:"missions",tab:N,children:d.jsxDEV(PE,{refreshTick:a},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:251,columnNumber:40},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:251,columnNumber:9},this),d.jsxDEV("section",{id:"panel-sessions",role:"tabpanel","aria-labelledby":"tab-sessions",hidden:N!=="sessions",children:d.jsxDEV(mx,{session:X,composer:ie,setComposer:I,onRequestStart:E,refreshTick:a},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:254,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:253,columnNumber:9},this),d.jsxDEV(qs,{id:"approvals",tab:N,children:d.jsxDEV(wx,{refreshTick:a,responses:[...K,...X.responseNeeded.needed?[qx(X)]:[]],goSessions:()=>R("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:256,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:256,columnNumber:9},this),d.jsxDEV(qs,{id:"explore",tab:N,children:d.jsxDEV(yx,{},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:257,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:257,columnNumber:9},this),d.jsxDEV(qs,{id:"library",tab:N,children:d.jsxDEV(Sx,{session:X,setComposer:I,goSessions:()=>R("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:259,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:258,columnNumber:9},this),d.jsxDEV(qs,{id:"telemetry",tab:N,children:d.jsxDEV(Ex,{refreshTick:a},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:261,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:261,columnNumber:9},this),d.jsxDEV(qs,{id:"memory",tab:N,children:d.jsxDEV(Cx,{refreshTick:a},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:262,columnNumber:38},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:262,columnNumber:9},this),d.jsxDEV(qs,{id:"actions",tab:N,children:d.jsxDEV(Nx,{refreshTick:a,session:X,setComposer:I,goSessions:()=>R("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:264,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:263,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:247,columnNumber:7},this),d.jsxDEV(Tx,{open:w,onClose:()=>C(!1),session:X,onStarted:()=>R("sessions"),initialInstanceId:g},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:267,columnNumber:7},this),d.jsxDEV(Mx,{open:h,onClose:()=>o(!1),onLaunched:x},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:274,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:212,columnNumber:5},this)}const ay=(()=>{const N=Number(window.AIWG_COCKPIT_SESSION_WAIT_S);return Number.isFinite(N)&&N>0?Math.floor(N):150})();async function zx(N,R){var ie,I;let X="",H="";for(let l=0;l<ay;l+=1){if(R){const w=await Ve(`/api/operations/${encodeURIComponent(R)}`),C=String(w.state??"").toLowerCase(),g=((ie=w.result)==null?void 0:ie.instance_id)??((I=w.result)==null?void 0:I.instanceId);if(g&&!N&&(N=g),C==="failed")throw new Error(Ix(w));C&&(H=$x(w),X=H)}const p=await Ve("/api/inventory"),_=new Set(["stopped","failed","error","terminated","destroyed","exited","dead"]),S=N?p.instances.find(w=>w.id===N):null;if(S&&l>3&&_.has(String(S.state).toLowerCase()))throw new Error(`Instance ${S.id} did not come online — it settled to '${S.state}' instead of running`+(H?` (${H})`:"")+". Its agent likely failed to register; check the runtime and try again.");const f=p.instances.filter(w=>String(w.state).toLowerCase()==="running"),m=N?f.find(w=>w.id===N):null;if(m){const w=m.session_backends.find(C=>C.available!==!1)??m.session_backends[0];if(w&&w.available!==!1)return m;X=(w==null?void 0:w.reason)??`instance ${m.id} has no available backend yet`}else X=[H,N?`instance ${N} not visible in inventory yet`:"waiting for launch operation to report instance id"].filter(Boolean).join("; ");await Hx(1e3)}const K=N?`Instance ${N}`:"The instance";throw new Error(`${K} launched and is still installing its loadout — its agent had not registered after ${ay}s (${X}). This is not a failure: heavy loadouts (e.g. full-suite) can take longer. It will appear under Inventory once its agent enrolls; open a session from there when it shows as running.`)}function Ix(N){var R,X,H,K,ie,I;return typeof N.error=="string"?N.error:((R=N.failure)==null?void 0:R.message)??((X=N.failure)==null?void 0:X.detail)??((H=N.failure)==null?void 0:H.code)??((K=N.error)==null?void 0:K.message)??((ie=N.error)==null?void 0:ie.detail)??((I=N.error)==null?void 0:I.code)??`operation ${N.id??""} failed`}function $x(N){var X,H,K,ie,I;const R=[`operation ${N.id??""} is ${N.state??"unknown"}`];return(X=N.result)!=null&&X.runtime&&R.push(`runtime ${N.result.runtime}`),(H=N.result)!=null&&H.container_id&&R.push(`container ${N.result.container_id.slice(0,12)}`),(((K=N.result)==null?void 0:K.instance_id)??((ie=N.result)==null?void 0:ie.instanceId))&&R.push(`instance ${N.result.instance_id??N.result.instanceId}`),String(N.state??"").toLowerCase()==="succeeded"&&((I=N.result)!=null&&I.container_id)&&R.push("container was created, but no agent registered; see agentic-sandbox #501"),R.join("; ")}function qx(N){return{id:`pty:${N.state.url??"attached"}`,instance_id:"attached session",prompt:N.responseNeeded.prompt,source:N.responseNeeded.source,status:"response-needed",attach_url:N.state.url}}function qs({id:N,tab:R,children:X}){return d.jsxDEV("section",{id:`panel-${N}`,role:"tabpanel","aria-labelledby":`tab-${N}`,hidden:R!==N,children:R===N?X:null},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/App.tsx",lineNumber:385,columnNumber:5},this)}fE.createRoot(document.getElementById("root")).render(d.jsxDEV(se.StrictMode,{children:d.jsxDEV(Ux,{},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/main.tsx",lineNumber:9,columnNumber:5},void 0)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-XB6Yb6/web/src/main.tsx",lineNumber:8,columnNumber:3},void 0));
|