@aiwg/cockpit 2026.10.3 → 2026.10.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,312 +0,0 @@
1
- var kE=Object.defineProperty;var VE=(p,x,L)=>x in p?kE(p,x,{enumerable:!0,configurable:!0,writable:!0,value:L}):p[x]=L;var Ft=(p,x,L)=>VE(p,typeof x!="symbol"?x+"":x,L);(function(){const x=document.createElement("link").relList;if(x&&x.supports&&x.supports("modulepreload"))return;for(const q of document.querySelectorAll('link[rel="modulepreload"]'))j(q);new MutationObserver(q=>{for(const ee of q)if(ee.type==="childList")for(const I of ee.addedNodes)I.tagName==="LINK"&&I.rel==="modulepreload"&&j(I)}).observe(document,{childList:!0,subtree:!0});function L(q){const ee={};return q.integrity&&(ee.integrity=q.integrity),q.referrerPolicy&&(ee.referrerPolicy=q.referrerPolicy),q.crossOrigin==="use-credentials"?ee.credentials="include":q.crossOrigin==="anonymous"?ee.credentials="omit":ee.credentials="same-origin",ee}function j(q){if(q.ep)return;q.ep=!0;const ee=L(q);fetch(q.href,ee)}})();var qm={exports:{}},Zu={},Pm={exports:{}},Ll={exports:{}};Ll.exports;var F0;function RE(){return F0||(F0=1,(function(p,x){/**
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 L(O,se){Object.defineProperty(ee.prototype,O,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",se[0],se[1])}})}function j(O){return O===null||typeof O!="object"?null:(O=ye&&O[ye]||O["@@iterator"],typeof O=="function"?O:null)}function q(O,se){O=(O=O.constructor)&&(O.displayName||O.name)||"ReactClass";var we=O+"."+se;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.",se,O),be[we]=!0)}function ee(O,se,we){this.props=O,this.context=se,this.refs=je,this.updater=we||Ie}function I(){}function c(O,se,we){this.props=O,this.context=se,this.refs=je,this.updater=we||Ie}function b(){}function g(O){return""+O}function N(O){try{g(O);var se=!1}catch{se=!0}if(se){se=console;var we=se.error,Se=typeof Symbol=="function"&&Symbol.toStringTag&&O[Symbol.toStringTag]||O.constructor.name||"Object";return we.call(se,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Se),g(O)}}function f(O){if(O==null)return null;if(typeof O=="function")return O.$$typeof===$i?null:O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case B:return"Fragment";case he:return"Profiler";case P:return"StrictMode";case Y:return"Suspense";case U:return"SuspenseList";case ce: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 z:return"Portal";case ge:return O.displayName||"Context";case fe:return(O._context.displayName||"Context")+".Consumer";case xe:var se=O.render;return O=O.displayName,O||(O=se.displayName||se.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case pe:return se=O.displayName||null,se!==null?se:f(O.type)||"Memo";case le:se=O._payload,O=O._init;try{return f(O(se))}catch{}}return null}function m(O){if(O===B)return"<>";if(typeof O=="object"&&O!==null&&O.$$typeof===le)return"<...>";try{var se=f(O);return se?"<"+se+">":"<...>"}catch{return"<...>"}}function w(){var O=Ae.A;return O===null?null:O.getOwner()}function C(){return Error("react-stack-top-frame")}function y(O){if(Nt.call(O,"key")){var se=Object.getOwnPropertyDescriptor(O,"key").get;if(se&&se.isReactWarning)return!1}return O.key!==void 0}function h(O,se){function we(){Re||(Re=!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)",se))}we.isReactWarning=!0,Object.defineProperty(O,"key",{get:we,configurable:!0})}function u(){var O=f(this.type);return $e[O]||($e[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,se,we,Se,ke,Pe){var Te=we.ref;return O={$$typeof:T,type:O,key:se,props:we,_owner:Se},(Te!==void 0?Te:null)!==null?Object.defineProperty(O,"ref",{enumerable:!1,get:u}):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:ke}),Object.defineProperty(O,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Pe}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O}function l(O,se){return se=o(O.type,se,O.props,O._owner,O._debugStack,O._debugTask),O._store&&(se._store.validated=O._store.validated),se}function v(O){S(O)?O._store&&(O._store.validated=1):typeof O=="object"&&O!==null&&O.$$typeof===le&&(O._payload.status==="fulfilled"?S(O._payload.value)&&O._payload.value._store&&(O._payload.value._store.validated=1):O._store&&(O._store.validated=1))}function S(O){return typeof O=="object"&&O!==null&&O.$$typeof===T}function A(O){var se={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(we){return se[we]})}function k(O,se){return typeof O=="object"&&O!==null&&O.key!=null?(N(O.key),A(""+O.key)):se.toString(36)}function E(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(b,b):(O.status="pending",O.then(function(se){O.status==="pending"&&(O.status="fulfilled",O.value=se)},function(se){O.status==="pending"&&(O.status="rejected",O.reason=se)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function R(O,se,we,Se,ke){var Pe=typeof O;(Pe==="undefined"||Pe==="boolean")&&(O=null);var Te=!1;if(O===null)Te=!0;else switch(Pe){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(O.$$typeof){case T:case z:Te=!0;break;case le:return Te=O._init,R(Te(O._payload),se,we,Se,ke)}}if(Te){Te=O,ke=ke(Te);var at=Se===""?"."+k(Te,0):Se;return Lt(ke)?(we="",at!=null&&(we=at.replace(bt,"$&/")+"/"),R(ke,se,we,"",function(hi){return hi})):ke!=null&&(S(ke)&&(ke.key!=null&&(Te&&Te.key===ke.key||N(ke.key)),we=l(ke,we+(ke.key==null||Te&&Te.key===ke.key?"":(""+ke.key).replace(bt,"$&/")+"/")+at),Se!==""&&Te!=null&&S(Te)&&Te.key==null&&Te._store&&!Te._store.validated&&(we._store.validated=2),ke=we),se.push(ke)),1}if(Te=0,at=Se===""?".":Se+":",Lt(O))for(var We=0;We<O.length;We++)Se=O[We],Pe=at+k(Se,We),Te+=R(Se,se,we,Pe,ke);else if(We=j(O),typeof We=="function")for(We===O.entries&&(ct||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ct=!0),O=We.call(O),We=0;!(Se=O.next()).done;)Se=Se.value,Pe=at+k(Se,We++),Te+=R(Se,se,we,Pe,ke);else if(Pe==="object"){if(typeof O.then=="function")return R(E(O),se,we,Se,ke);throw se=String(O),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Te}function V(O,se,we){if(O==null)return O;var Se=[],ke=0;return R(O,Se,"","",function(Pe){return se.call(we,Pe,ke++)}),Se}function J(O){if(O._status===-1){var se=O._ioInfo;se!=null&&(se.start=se.end=performance.now()),se=O._result;var we=se();if(we.then(function(ke){if(O._status===0||O._status===-1){O._status=1,O._result=ke;var Pe=O._ioInfo;Pe!=null&&(Pe.end=performance.now()),we.status===void 0&&(we.status="fulfilled",we.value=ke)}},function(ke){if(O._status===0||O._status===-1){O._status=2,O._result=ke;var Pe=O._ioInfo;Pe!=null&&(Pe.end=performance.now()),we.status===void 0&&(we.status="rejected",we.reason=ke)}}),se=O._ioInfo,se!=null){se.value=we;var Se=we.displayName;typeof Se=="string"&&(se.name=Se)}O._status===-1&&(O._status=0,O._result=we)}if(O._status===1)return se=O._result,se===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?`,se),"default"in se||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'))`,se),se.default;throw O._result}function $(){var O=Ae.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 H(){Ae.asyncTransitions--}function X(O){if(ht===null)try{var se=("require"+Math.random()).slice(0,7);ht=(p&&p[se]).call(p,"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 ke=new MessageChannel;ke.port1.onmessage=Se,ke.port2.postMessage(void 0)}}return ht(O)}function ne(O){return 1<O.length&&typeof AggregateError=="function"?new AggregateError(O):O[0]}function ie(O,se){se!==gs-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. "),gs=se}function re(O,se,we){var Se=Ae.actQueue;if(Se!==null)if(Se.length!==0)try{oe(Se),X(function(){return re(O,se,we)});return}catch(ke){Ae.thrownErrors.push(ke)}else Ae.actQueue=null;0<Ae.thrownErrors.length?(Se=ne(Ae.thrownErrors),Ae.thrownErrors.length=0,we(Se)):se(O)}function oe(O){if(!Kr){Kr=!0;var se=0;try{for(;se<O.length;se++){var we=O[se];do{Ae.didUsePromise=!1;var Se=we(!1);if(Se!==null){if(Ae.didUsePromise){O[se]=we,O.splice(0,se);return}we=Se}else break}while(!0)}O.length=0}catch(ke){O.splice(0,se+1),Ae.thrownErrors.push(ke)}finally{Kr=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var T=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),he=Symbol.for("react.profiler"),fe=Symbol.for("react.consumer"),ge=Symbol.for("react.context"),xe=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ye=Symbol.iterator,be={},Ie={isMounted:function(){return!1},enqueueForceUpdate:function(O){q(O,"forceUpdate")},enqueueReplaceState:function(O){q(O,"replaceState")},enqueueSetState:function(O){q(O,"setState")}},qe=Object.assign,je={};Object.freeze(je),ee.prototype.isReactComponent={},ee.prototype.setState=function(O,se){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,se,"setState")},ee.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};var De={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(Nn in De)De.hasOwnProperty(Nn)&&L(Nn,De[Nn]);I.prototype=ee.prototype,De=c.prototype=new I,De.constructor=c,qe(De,ee.prototype),De.isPureReactComponent=!0;var Lt=Array.isArray,$i=Symbol.for("react.client.reference"),Ae={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,ve=console.createTask?console.createTask:function(){return null};De={react_stack_bottom_frame:function(O){return O()}};var Re,Ze,$e={},Ge=De.react_stack_bottom_frame.bind(De,C)(),ut=ve(m(C)),ct=!1,bt=/\/+/g,wt=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=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(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},Mt=!1,ht=null,gs=0,hr=!1,Kr=!1,Zr=typeof queueMicrotask=="function"?function(O){queueMicrotask(function(){return queueMicrotask(O)})}:X;De=Object.freeze({__proto__:null,c:function(O){return $().useMemoCache(O)}});var Nn={map:V,forEach:function(O,se,we){V(O,function(){se.apply(this,arguments)},we)},count:function(O){var se=0;return V(O,function(){se++}),se},toArray:function(O){return V(O,function(se){return se})||[]},only:function(O){if(!S(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};x.Activity=ce,x.Children=Nn,x.Component=ee,x.Fragment=B,x.Profiler=he,x.PureComponent=c,x.StrictMode=P,x.Suspense=Y,x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ae,x.__COMPILER_RUNTIME=De,x.act=function(O){var se=Ae.actQueue,we=gs;gs++;var Se=Ae.actQueue=se!==null?se:[],ke=!1;try{var Pe=O()}catch(We){Ae.thrownErrors.push(We)}if(0<Ae.thrownErrors.length)throw ie(se,we),O=ne(Ae.thrownErrors),Ae.thrownErrors.length=0,O;if(Pe!==null&&typeof Pe=="object"&&typeof Pe.then=="function"){var Te=Pe;return Zr(function(){ke||hr||(hr=!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(We,hi){ke=!0,Te.then(function(_s){if(ie(se,we),we===0){try{oe(Se),X(function(){return re(_s,We,hi)})}catch(eo){Ae.thrownErrors.push(eo)}if(0<Ae.thrownErrors.length){var Hl=ne(Ae.thrownErrors);Ae.thrownErrors.length=0,hi(Hl)}}else We(_s)},function(_s){ie(se,we),0<Ae.thrownErrors.length&&(_s=ne(Ae.thrownErrors),Ae.thrownErrors.length=0),hi(_s)})}}}var at=Pe;if(ie(se,we),we===0&&(oe(Se),Se.length!==0&&Zr(function(){ke||hr||(hr=!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(() => ...)"))}),Ae.actQueue=null),0<Ae.thrownErrors.length)throw O=ne(Ae.thrownErrors),Ae.thrownErrors.length=0,O;return{then:function(We,hi){ke=!0,we===0?(Ae.actQueue=Se,X(function(){return re(at,We,hi)})):We(at)}}},x.cache=function(O){return function(){return O.apply(null,arguments)}},x.cacheSignal=function(){return null},x.captureOwnerStack=function(){var O=Ae.getCurrentStack;return O===null?null:O()},x.cloneElement=function(O,se,we){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var Se=qe({},O.props),ke=O.key,Pe=O._owner;if(se!=null){var Te;e:{if(Nt.call(se,"ref")&&(Te=Object.getOwnPropertyDescriptor(se,"ref").get)&&Te.isReactWarning){Te=!1;break e}Te=se.ref!==void 0}Te&&(Pe=w()),y(se)&&(N(se.key),ke=""+se.key);for(at in se)!Nt.call(se,at)||at==="key"||at==="__self"||at==="__source"||at==="ref"&&se.ref===void 0||(Se[at]=se[at])}var at=arguments.length-2;if(at===1)Se.children=we;else if(1<at){Te=Array(at);for(var We=0;We<at;We++)Te[We]=arguments[We+2];Se.children=Te}for(Se=o(O.type,ke,Se,Pe,O._debugStack,O._debugTask),ke=2;ke<arguments.length;ke++)v(arguments[ke]);return Se},x.createContext=function(O){return O={$$typeof:ge,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:fe,_context:O},O._currentRenderer=null,O._currentRenderer2=null,O},x.createElement=function(O,se,we){for(var Se=2;Se<arguments.length;Se++)v(arguments[Se]);Se={};var ke=null;if(se!=null)for(We in Ze||!("__self"in se)||"key"in se||(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")),y(se)&&(N(se.key),ke=""+se.key),se)Nt.call(se,We)&&We!=="key"&&We!=="__self"&&We!=="__source"&&(Se[We]=se[We]);var Pe=arguments.length-2;if(Pe===1)Se.children=we;else if(1<Pe){for(var Te=Array(Pe),at=0;at<Pe;at++)Te[at]=arguments[at+2];Object.freeze&&Object.freeze(Te),Se.children=Te}if(O&&O.defaultProps)for(We in Pe=O.defaultProps,Pe)Se[We]===void 0&&(Se[We]=Pe[We]);ke&&h(Se,typeof O=="function"?O.displayName||O.name||"Unknown":O);var We=1e4>Ae.recentlyCreatedOwnerStacks++;return o(O,ke,Se,w(),We?Error("react-stack-top-frame"):Ge,We?ve(m(O)):ut)},x.createRef=function(){var O={current:null};return Object.seal(O),O},x.forwardRef=function(O){O!=null&&O.$$typeof===pe?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 se={$$typeof:xe,render:O},we;return Object.defineProperty(se,"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)}}),se},x.isValidElement=S,x.lazy=function(O){O={_status:-1,_result:O};var se={$$typeof:le,_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,se._debugInfo=[{awaited:we}],se},x.memo=function(O,se){O==null&&console.error("memo: The first argument must be a component. Instead received: %s",O===null?"null":typeof O),se={$$typeof:pe,type:O,compare:se===void 0?null:se};var we;return Object.defineProperty(se,"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)}}),se},x.startTransition=function(O){var se=Ae.T,we={};we._updatedFibers=new Set,Ae.T=we;try{var Se=O(),ke=Ae.S;ke!==null&&ke(we,Se),typeof Se=="object"&&Se!==null&&typeof Se.then=="function"&&(Ae.asyncTransitions++,Se.then(H,H),Se.then(b,wt))}catch(Pe){wt(Pe)}finally{se===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.")),se!==null&&we.types!==null&&(se.types!==null&&se.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."),se.types=we.types),Ae.T=se}},x.unstable_useCacheRefresh=function(){return $().useCacheRefresh()},x.use=function(O){return $().use(O)},x.useActionState=function(O,se,we){return $().useActionState(O,se,we)},x.useCallback=function(O,se){return $().useCallback(O,se)},x.useContext=function(O){var se=$();return O.$$typeof===fe&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),se.useContext(O)},x.useDebugValue=function(O,se){return $().useDebugValue(O,se)},x.useDeferredValue=function(O,se){return $().useDeferredValue(O,se)},x.useEffect=function(O,se){return O==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),$().useEffect(O,se)},x.useEffectEvent=function(O){return $().useEffectEvent(O)},x.useId=function(){return $().useId()},x.useImperativeHandle=function(O,se,we){return $().useImperativeHandle(O,se,we)},x.useInsertionEffect=function(O,se){return O==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),$().useInsertionEffect(O,se)},x.useLayoutEffect=function(O,se){return O==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),$().useLayoutEffect(O,se)},x.useMemo=function(O,se){return $().useMemo(O,se)},x.useOptimistic=function(O,se){return $().useOptimistic(O,se)},x.useReducer=function(O,se,we){return $().useReducer(O,se,we)},x.useRef=function(O){return $().useRef(O)},x.useState=function(O){return $().useState(O)},x.useSyncExternalStore=function(O,se,we){return $().useSyncExternalStore(O,se,we)},x.useTransition=function(){return $().useTransition()},x.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Ll,Ll.exports)),Ll.exports}var G0;function sh(){return G0||(G0=1,Pm.exports=RE()),Pm.exports}var Y0;function TE(){if(Y0)return Zu;Y0=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 p(B){if(B==null)return null;if(typeof B=="function")return B.$$typeof===J?null:B.displayName||B.name||null;if(typeof B=="string")return B;switch(B){case h:return"Fragment";case o:return"Profiler";case u:return"StrictMode";case A:return"Suspense";case k:return"SuspenseList";case V:return"Activity"}if(typeof B=="object")switch(typeof B.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),B.$$typeof){case y:return"Portal";case v:return B.displayName||"Context";case l:return(B._context.displayName||"Context")+".Consumer";case S:var P=B.render;return B=B.displayName,B||(B=P.displayName||P.name||"",B=B!==""?"ForwardRef("+B+")":"ForwardRef"),B;case E:return P=B.displayName||null,P!==null?P:p(B.type)||"Memo";case R:P=B._payload,B=B._init;try{return p(B(P))}catch{}}return null}function x(B){return""+B}function L(B){try{x(B);var P=!1}catch{P=!0}if(P){P=console;var he=P.error,fe=typeof Symbol=="function"&&Symbol.toStringTag&&B[Symbol.toStringTag]||B.constructor.name||"Object";return he.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",fe),x(B)}}function j(B){if(B===h)return"<>";if(typeof B=="object"&&B!==null&&B.$$typeof===R)return"<...>";try{var P=p(B);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function q(){var B=$.A;return B===null?null:B.getOwner()}function ee(){return Error("react-stack-top-frame")}function I(B){if(H.call(B,"key")){var P=Object.getOwnPropertyDescriptor(B,"key").get;if(P&&P.isReactWarning)return!1}return B.key!==void 0}function c(B,P){function he(){ie||(ie=!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)",P))}he.isReactWarning=!0,Object.defineProperty(B,"key",{get:he,configurable:!0})}function b(){var B=p(this.type);return re[B]||(re[B]=!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.")),B=this.props.ref,B!==void 0?B:null}function g(B,P,he,fe,ge,xe){var Y=he.ref;return B={$$typeof:C,type:B,key:P,props:he,_owner:fe},(Y!==void 0?Y:null)!==null?Object.defineProperty(B,"ref",{enumerable:!1,get:b}):Object.defineProperty(B,"ref",{enumerable:!1,value:null}),B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(B,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(B,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ge}),Object.defineProperty(B,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:xe}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B}function N(B,P,he,fe,ge,xe){var Y=P.children;if(Y!==void 0)if(fe)if(X(Y)){for(fe=0;fe<Y.length;fe++)f(Y[fe]);Object.freeze&&Object.freeze(Y)}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(Y);if(H.call(P,"key")){Y=p(B);var U=Object.keys(P).filter(function(le){return le!=="key"});fe=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",z[Y+fe]||(U=0<U.length?"{"+U.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} />`,fe,Y,U,Y),z[Y+fe]=!0)}if(Y=null,he!==void 0&&(L(he),Y=""+he),I(P)&&(L(P.key),Y=""+P.key),"key"in P){he={};for(var pe in P)pe!=="key"&&(he[pe]=P[pe])}else he=P;return Y&&c(he,typeof B=="function"?B.displayName||B.name||"Unknown":B),g(B,Y,he,q(),ge,xe)}function f(B){m(B)?B._store&&(B._store.validated=1):typeof B=="object"&&B!==null&&B.$$typeof===R&&(B._payload.status==="fulfilled"?m(B._payload.value)&&B._payload.value._store&&(B._payload.value._store.validated=1):B._store&&(B._store.validated=1))}function m(B){return typeof B=="object"&&B!==null&&B.$$typeof===C}var w=sh(),C=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),v=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),$=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,X=Array.isArray,ne=console.createTask?console.createTask:function(){return null};w={react_stack_bottom_frame:function(B){return B()}};var ie,re={},oe=w.react_stack_bottom_frame.bind(w,ee)(),T=ne(j(ee)),z={};Zu.Fragment=h,Zu.jsxDEV=function(B,P,he,fe){var ge=1e4>$.recentlyCreatedOwnerStacks++;return N(B,P,he,fe,ge?Error("react-stack-top-frame"):oe,ge?ne(j(B)):T)}})(),Zu}var X0;function ME(){return X0||(X0=1,qm.exports=TE()),qm.exports}var a=ME(),Z=sh(),Wm={exports:{}},jl={},Fm={exports:{}},Gm={},Q0;function OE(){return Q0||(Q0=1,(function(p){/**
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 x(){if(S=!1,R){var ie=p.unstable_now();$=ie;var re=!0;try{e:{l=!1,v&&(v=!1,k(V),V=-1),o=!0;var oe=u;try{t:{for(I(ie),h=j(w);h!==null&&!(h.expirationTime>ie&&b());){var T=h.callback;if(typeof T=="function"){h.callback=null,u=h.priorityLevel;var z=T(h.expirationTime<=ie);if(ie=p.unstable_now(),typeof z=="function"){h.callback=z,I(ie),re=!0;break t}h===j(w)&&q(w),I(ie)}else q(w);h=j(w)}if(h!==null)re=!0;else{var B=j(C);B!==null&&g(c,B.startTime-ie),re=!1}}break e}finally{h=null,u=oe,o=!1}re=void 0}}finally{re?H():R=!1}}}function L(ie,re){var oe=ie.length;ie.push(re);e:for(;0<oe;){var T=oe-1>>>1,z=ie[T];if(0<ee(z,re))ie[T]=re,ie[oe]=z,oe=T;else break e}}function j(ie){return ie.length===0?null:ie[0]}function q(ie){if(ie.length===0)return null;var re=ie[0],oe=ie.pop();if(oe!==re){ie[0]=oe;e:for(var T=0,z=ie.length,B=z>>>1;T<B;){var P=2*(T+1)-1,he=ie[P],fe=P+1,ge=ie[fe];if(0>ee(he,oe))fe<z&&0>ee(ge,he)?(ie[T]=ge,ie[fe]=oe,T=fe):(ie[T]=he,ie[P]=oe,T=P);else if(fe<z&&0>ee(ge,oe))ie[T]=ge,ie[fe]=oe,T=fe;else break e}}return re}function ee(ie,re){var oe=ie.sortIndex-re.sortIndex;return oe!==0?oe:ie.id-re.id}function I(ie){for(var re=j(C);re!==null;){if(re.callback===null)q(C);else if(re.startTime<=ie)q(C),re.sortIndex=re.expirationTime,L(w,re);else break;re=j(C)}}function c(ie){if(v=!1,I(ie),!l)if(j(w)!==null)l=!0,R||(R=!0,H());else{var re=j(C);re!==null&&g(c,re.startTime-ie)}}function b(){return S?!0:!(p.unstable_now()-$<J)}function g(ie,re){V=A(function(){ie(p.unstable_now())},re)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),p.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var N=performance;p.unstable_now=function(){return N.now()}}else{var f=Date,m=f.now();p.unstable_now=function(){return f.now()-m}}var w=[],C=[],y=1,h=null,u=3,o=!1,l=!1,v=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null,R=!1,V=-1,J=5,$=-1;if(typeof E=="function")var H=function(){E(x)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,ne=X.port2;X.port1.onmessage=x,H=function(){ne.postMessage(null)}}else H=function(){A(x,0)};p.unstable_IdlePriority=5,p.unstable_ImmediatePriority=1,p.unstable_LowPriority=4,p.unstable_NormalPriority=3,p.unstable_Profiling=null,p.unstable_UserBlockingPriority=2,p.unstable_cancelCallback=function(ie){ie.callback=null},p.unstable_forceFrameRate=function(ie){0>ie||125<ie?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<ie?Math.floor(1e3/ie):5},p.unstable_getCurrentPriorityLevel=function(){return u},p.unstable_next=function(ie){switch(u){case 1:case 2:case 3:var re=3;break;default:re=u}var oe=u;u=re;try{return ie()}finally{u=oe}},p.unstable_requestPaint=function(){S=!0},p.unstable_runWithPriority=function(ie,re){switch(ie){case 1:case 2:case 3:case 4:case 5:break;default:ie=3}var oe=u;u=ie;try{return re()}finally{u=oe}},p.unstable_scheduleCallback=function(ie,re,oe){var T=p.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?T+oe:T):oe=T,ie){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=oe+z,ie={id:y++,callback:re,priorityLevel:ie,startTime:oe,expirationTime:z,sortIndex:-1},oe>T?(ie.sortIndex=oe,L(C,ie),j(w)===null&&ie===j(C)&&(v?(k(V),V=-1):v=!0,g(c,oe-T))):(ie.sortIndex=z,L(w,ie),l||o||(l=!0,R||(R=!0,H()))),ie},p.unstable_shouldYield=b,p.unstable_wrapCallback=function(ie){var re=u;return function(){var oe=u;u=re;try{return ie.apply(this,arguments)}finally{u=oe}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Gm)),Gm}var K0;function jE(){return K0||(K0=1,Fm.exports=OE()),Fm.exports}var Ym={exports:{}},ui={},Z0;function LE(){if(Z0)return ui;Z0=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 p(){}function x(f){return""+f}function L(f,m,w){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{x(C);var y=!1}catch{y=!0}return y&&(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"),x(C)),{$$typeof:g,key:C==null?null:""+C,children:f,containerInfo:m,implementation:w}}function j(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}function q(f){return f===null?"`null`":f===void 0?"`undefined`":f===""?"an empty string":'something with type "'+typeof f+'"'}function ee(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=N.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 c=sh(),b={d:{f:p,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:p,C:p,L:p,m:p,X:p,S:p,M:p},p:0,findDOMNode:null},g=Symbol.for("react.portal"),N=c.__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=b,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 L(f,m,null,w)},ui.flushSync=function(f){var m=N.T,w=b.p;try{if(N.T=null,b.p=2,f)return f()}finally{N.T=m,b.p=w,b.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.",ee(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.",q(m.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",q(f)),typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,b.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.",q(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`.",ee(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`.",ee(m))}typeof f=="string"&&b.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.",ee(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".',ee(m.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",q(f)),typeof f=="string"&&m&&typeof m.as=="string"){var w=m.as,C=j(w,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,h=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;w==="style"?b.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:C,integrity:y,fetchPriority:h}):w==="script"&&b.d.X(f,{crossOrigin:C,integrity:y,fetchPriority:h,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 "+q(f)+"."),m!==void 0&&typeof m!="object"?w+=" The `options` argument encountered was "+q(m)+".":m&&"as"in m&&m.as!=="script"&&(w+=" The `as` option encountered was "+ee(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=ee(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=j(m.as,m.crossOrigin),b.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&&b.d.M(f))},ui.preload=function(f,m){var w="";if(typeof f=="string"&&f||(w+=" The `href` argument encountered was "+q(f)+"."),m==null||typeof m!="object"?w+=" The `options` argument encountered was "+q(m)+".":typeof m.as=="string"&&m.as||(w+=" The `as` option encountered was "+q(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=j(w,m.crossOrigin);b.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 "+q(f)+"."),m!==void 0&&typeof m!="object"?w+=" The `options` argument encountered was "+q(m)+".":m&&"as"in m&&typeof m.as!="string"&&(w+=" The `as` option encountered was "+q(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=j(m.as,m.crossOrigin),b.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})):b.d.m(f))},ui.requestFormReset=function(f){b.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 e1;function BE(){return e1||(e1=1,Ym.exports=LE()),Ym.exports}var t1;function JE(){if(t1)return jl;t1=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 p(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function x(e,t,i,s){if(i>=t.length)return s;var n=t[i],r=Gt(e)?e.slice():tt({},e);return r[n]=x(e[n],t,i+1,s),r}function L(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 j(e,t,i,0)}}function j(e,t,i,s){var n=t[s],r=Gt(e)?e.slice():tt({},e);return s+1===t.length?(r[i[s]]=r[n],Gt(r)?r.splice(n,1):delete r[n]):r[n]=j(e[n],t,i,s+1),r}function q(e,t,i){var s=t[i],n=Gt(e)?e.slice():tt({},e);return i+1===t.length?(Gt(n)?n.splice(s,1):delete n[s],n):(n[s]=q(e[s],t,i+1),n)}function ee(){return!1}function I(){return null}function c(){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 b(){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 g(){}function N(){}function f(e){var t=[];return e.forEach(function(i){t.push(i)}),t.sort().join(", ")}function m(e,t,i,s){return new by(e,t,i,s)}function w(e,t){e.context===$n&&(cf(e.current,2,t,e,null,null),mo())}function C(e,t){if(Xi!==null){var i=t.staleFamilies;t=t.updatedFamilies,Va(),Zp(e.current,t,i),mo()}}function y(e){Xi=e}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(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 l(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(u(e)!==e)throw Error("Unable to find node on an unmounted component.")}function S(e){var t=e.alternate;if(!t){if(t=u(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 d=!1,_=n.child;_;){if(_===i){d=!0,i=n,s=r;break}if(_===s){d=!0,s=n,i=r;break}_=_.sibling}if(!d){for(_=r.child;_;){if(_===i){d=!0,i=r,s=n;break}if(_===s){d=!0,s=r,i=n;break}_=_.sibling}if(!d)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 A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}function k(e){return e===null||typeof e!="object"?null:(e=o_&&e[o_]||e["@@iterator"],typeof e=="function"?e:null)}function E(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===JS?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yo:return"Fragment";case bf:return"Profiler";case Fc:return"StrictMode";case gf:return"Suspense";case _f:return"SuspenseList";case wf: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 wo:return"Portal";case Bs:return e.displayName||"Context";case vf:return(e._context.displayName||"Context")+".Consumer";case Ua:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gc:return t=e.displayName||null,t!==null?t:E(e.type)||"Memo";case Li:t=e._payload,e=e._init;try{return E(e(t))}catch{}}return null}function R(e){return typeof e.tag=="number"?V(e):typeof e.name=="string"?e.name:null}function V(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 E(t);case 8:return t===Fc?"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 V(e.return)}return null}function J(e){return{current:e}}function $(e,t){0>sn?console.error("Unexpected pop."):(t!==Sf[sn]&&console.error("Unexpected Fiber popped."),e.current=yf[sn],yf[sn]=null,Sf[sn]=null,sn--)}function H(e,t,i){sn++,yf[sn]=e.current,Sf[sn]=i,e.current=t}function X(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){H(Bn,t,e),H(za,e,e),H(Ln,null,e);var i=t.nodeType;switch(i){case 9:case 11:i=i===9?"#document":"#fragment",t=(t=t.documentElement)&&(t=t.namespaceURI)?Vg(t):gn;break;default:if(i=t.tagName,t=t.namespaceURI)t=Vg(t),t=Rg(t,i);else switch(i){case"svg":t=ta;break;case"math":t=Wu;break;default:t=gn}}i=i.toLowerCase(),i=Ep(null,i),i={context:t,ancestorInfo:i},$(Ln,e),H(Ln,i,e)}function ie(e){$(Ln,e),$(za,e),$(Bn,e)}function re(){return X(Ln.current)}function oe(e){e.memoizedState!==null&&H(Yc,e,e);var t=X(Ln.current),i=e.type,s=Rg(t.context,i);i=Ep(t.ancestorInfo,i),s={context:s,ancestorInfo:i},t!==s&&(H(za,e,e),H(Ln,s,e))}function T(e){za.current===e&&($(Ln,e),$(za,e)),Yc.current===e&&($(Yc,e),Tl._currentValue=Xr)}function z(){}function B(){if(Ia===0){a_=console.log,l_=console.info,c_=console.warn,u_=console.error,h_=console.group,d_=console.groupCollapsed,f_=console.groupEnd;var e={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Ia++}function P(){if(Ia--,Ia===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:tt({},e,{value:a_}),info:tt({},e,{value:l_}),warn:tt({},e,{value:c_}),error:tt({},e,{value:u_}),group:tt({},e,{value:h_}),groupCollapsed:tt({},e,{value:d_}),groupEnd:tt({},e,{value:f_})})}0>Ia&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function he(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 fe(e){if(Nf===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Nf=t&&t[1]||"",m_=-1<i.stack.indexOf(`
66
- at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
67
- `+Nf+e+m_}function ge(e,t){if(!e||Ef)return"";var i=xf.get(e);if(i!==void 0)return i;Ef=!0,i=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var s=null;s=de.H,de.H=null,B();try{var n={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(Ne){var ae=Ne}Reflect.construct(e,[],F)}else{try{F.call()}catch(Ne){ae=Ne}e.call(F.prototype)}}else{try{throw Error()}catch(Ne){ae=Ne}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(Ne){if(Ne&&ae&&typeof Ne.stack=="string")return[Ne.stack,ae.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 d=n.DetermineComponentFrameRoot(),_=d[0],D=d[1];if(_&&D){var M=_.split(`
68
- `),K=D.split(`
69
- `);for(d=r=0;r<M.length&&!M[r].includes("DetermineComponentFrameRoot");)r++;for(;d<K.length&&!K[d].includes("DetermineComponentFrameRoot");)d++;if(r===M.length||d===K.length)for(r=M.length-1,d=K.length-1;1<=r&&0<=d&&M[r]!==K[d];)d--;for(;1<=r&&0<=d;r--,d--)if(M[r]!==K[d]){if(r!==1||d!==1)do if(r--,d--,0>d||M[r]!==K[d]){var te=`
70
- `+M[r].replace(" at new "," at ");return e.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",e.displayName)),typeof e=="function"&&xf.set(e,te),te}while(1<=r&&0<=d);break}}}finally{Ef=!1,de.H=s,P(),Error.prepareStackTrace=i}return M=(M=e?e.displayName||e.name:"")?fe(M):"",typeof e=="function"&&xf.set(e,M),M}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return fe(e.type);case 16:return fe("Lazy");case 13:return e.child!==t&&t!==null?fe("Suspense Fallback"):fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return fe("Activity");default:return""}}function Y(e){try{var t="",i=null;do{t+=xe(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 d=t;e:{var _=r.name,D=r.env,M=r.debugLocation;if(M!=null){var K=he(M),te=K.lastIndexOf(`
71
- `),F=te===-1?K:K.slice(te+1);if(F.indexOf(_)!==-1){var ae=`
72
- `+F;break e}}ae=fe(_+(D?" ["+D+"]":""))}t=d+ae}}i=e,e=e.return}while(e);return t}catch(Ne){return`
73
- Error generating stack: `+Ne.message+`
74
- `+Ne.stack}}function U(e){return(e=e?e.displayName||e.name:"")?fe(e):""}function pe(){if(Bi===null)return null;var e=Bi._debugOwner;return e!=null?R(e):null}function le(){if(Bi===null)return"";var e=Bi;try{var t="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=fe(e.type);break;case 13:t+=fe("Suspense");break;case 19:t+=fe("SuspenseList");break;case 31:t+=fe("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||t!==""||(t+=U(e.type));break;case 11:e._debugOwner||t!==""||(t+=U(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=he(s);n!==""&&(t+=`
75
- `+n)}}else if(e.debugStack!=null){var r=e.debugStack;(e=e.owner)&&r&&(t+=`
76
- `+he(r))}else break;var d=t}catch(_){d=`
77
- Error generating stack: `+_.message+`
78
- `+_.stack}return d}function ce(e,t,i,s,n,r,d){var _=Bi;ye(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,i,s,n,r,d)):t(i,s,n,r,d)}finally{ye(_)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function ye(e){de.getCurrentStack=e===null?null:le,Js=!1,Bi=e}function be(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function Ie(e){try{return qe(e),!1}catch{return!0}}function qe(e){return""+e}function je(e,t){if(Ie(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)),qe(e)}function De(e,t){if(Ie(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)),qe(e)}function Lt(e){if(Ie(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)),qe(e)}function $i(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{No=t.inject(e),li=t}catch(i){console.error("React instrumentation encountered an error: %o.",i)}return!!t.checkDCE}function Ae(e){if(typeof PS=="function"&&WS(e),li&&typeof li.setStrictMode=="function")try{li.setStrictMode(No,e)}catch(t){Hs||(Hs=!0,console.error("React instrumentation encountered an error: %o",t))}}function Nt(e){return e>>>=0,e===0?32:31-(FS(e)/GS|0)|0}function ve(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 Re(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var n=0,r=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var _=s&134217727;return _!==0?(s=_&~r,s!==0?n=ve(s):(d&=_,d!==0?n=ve(d):i||(i=_&~e,i!==0&&(n=ve(i))))):(_=s&~r,_!==0?n=ve(_):d!==0?n=ve(d):i||(i=s&~e,i!==0&&(n=ve(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 $e(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 Ge(){var e=Kc;return Kc<<=1,(Kc&62914560)===0&&(Kc=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 d=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 _=e.entanglements,D=e.expirationTimes,M=e.hiddenUpdates;for(i=d&~i;0<i;){var K=31-fi(i),te=1<<K;_[K]=0,D[K]=-1;var F=M[K];if(F!==null)for(M[K]=null,K=0;K<F.length;K++){var ae=F[K];ae!==null&&(ae.lane&=-536870913)}i&=~te}s!==0&&wt(e,s,0),r!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=r&~(d&~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:gs(i),(i&(e.suspendedLanes|t))!==0?0:i}function gs(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 hr(e,t,i){if(Us)for(e=e.pendingUpdatersLaneMap;0<i;){var s=31-fi(i),n=1<<s;e[s].add(t),i&=~n}}function Kr(e,t){if(Us)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 d=r.alternate;d!==null&&s.has(d)||s.add(r)}),n.clear()),t&=~e}}function Zr(e){return e&=-e,Fi<e?zs<e?(e&134217727)!==0?nn:Zc:zs:Fi}function Nn(){var e=ft.p;return e!==0?e:(e=window.event,e===void 0?nn:Zg(e.type))}function O(e,t){var i=ft.p;try{return ft.p=e,t()}finally{ft.p=i}}function se(e){delete e[ri],delete e[mi],delete e[Vf],delete e[YS],delete e[XS]}function we(e){var t=e[ri];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Hn]||i[ri]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Hg(e);e!==null;){if(i=e[ri])return i;e=Hg(e)}return t}e=i,i=e.parentNode}return null}function Se(e){if(e=e[ri]||e[Hn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ke(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Pe(e){var t=e[p_];return t||(t=e[p_]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Te(e){e[$a]=!0}function at(e,t){We(e,t),We(e+"Capture",t)}function We(e,t){Ar[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Ar[e]=t;var i=e.toLowerCase();for(Rf[i]=e,e==="onDoubleClick"&&(Rf.ondblclick=e),e=0;e<t.length;e++)b_.add(t[e])}function hi(e,t){QS[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 _s(e){return hs.call(g_,e)?!0:hs.call(v_,e)?!1:KS.test(e)?g_[e]=!0:(v_[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function Hl(e,t,i){if(_s(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:(je(i,t),e===""+i?i:e)}}function eo(e,t,i){if(_s(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}}je(i,t),e.setAttribute(t,""+i)}}function Ul(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}je(i,t),e.setAttribute(t,""+i)}}function Fs(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}je(s,i),e.setAttributeNS(t,i,""+s)}}function qi(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Lt(e),e;default:return""}}function up(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function F1(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(d){Lt(d),i=""+d,r.call(this,d)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(d){Lt(d),i=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lh(e){if(!e._valueTracker){var t=up(e)?"checked":"value";e._valueTracker=F1(e,t,""+e[t])}}function hp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=up(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function zl(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 Pi(e){return e.replace(ZS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function dp(e,t){t.checked===void 0||t.defaultChecked===void 0||w_||(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",pe()||"A component",t.type),w_=!0),t.value===void 0||t.defaultValue===void 0||__||(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",pe()||"A component",t.type),__=!0)}function ch(e,t,i,s,n,r,d,_){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?(je(d,"type"),e.type=d):e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+qi(t)):e.value!==""+qi(t)&&(e.value=""+qi(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?uh(e,d,qi(t)):i!=null?uh(e,d,qi(i)):s!=null&&e.removeAttribute("value"),n==null&&r!=null&&(e.defaultChecked=!!r),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?(je(_,"name"),e.name=""+qi(_)):e.removeAttribute("name")}function fp(e,t,i,s,n,r,d,_){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(je(r,"type"),e.type=r),t!=null||i!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){lh(e);return}i=i!=null?""+qi(i):"",t=t!=null?""+qi(t):i,_||t===e.value||(e.value=t),e.defaultValue=t}s=s??n,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=_?e.checked:!!s,e.defaultChecked=!!s,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(je(d,"name"),e.name=d),lh(e)}function uh(e,t,i){t==="number"&&zl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function mp(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?pf.Children.forEach(t.children,function(i){i==null||typeof i=="string"||typeof i=="number"||typeof i=="bigint"||S_||(S_=!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||N_||(N_=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||y_||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),y_=!0)}function pp(){var e=pe();return e?`
79
-
80
- Check the render method of \``+e+"`.":""}function to(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=""+qi(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 bp(e,t){for(e=0;e<x_.length;e++){var i=x_[e];if(t[i]!=null){var s=Gt(t[i]);t.multiple&&!s?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",i,pp()):!t.multiple&&s&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",i,pp())}}t.value===void 0||t.defaultValue===void 0||E_||(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"),E_=!0)}function vp(e,t){t.value===void 0||t.defaultValue===void 0||C_||(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",pe()||"A component"),C_=!0),t.children!=null&&t.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function gp(e,t,i){if(t!=null&&(t=""+qi(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+qi(i):""}function _p(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(Gt(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=qi(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),lh(e)}function wp(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?wp(e.children[0],t):e}function ki(e){return" "+" ".repeat(e)}function io(e){return"+ "+" ".repeat(e)}function dr(e){return"- "+" ".repeat(e)}function yp(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 oa(e,t){return A_.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 Il(e,t,i){var s=120-2*i;if(t===null)return io(i)+oa(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)),io(i)+oa(e,s)+`
82
- `+dr(i)+oa(t,s)+`
83
- `}return ki(i)+oa(e,s)+`
84
- `}function hh(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(t,i){return i})}function aa(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(Gt(e))return"[...]";if(e.$$typeof===Ls)return(t=E(e.type))?"<"+t+">":"<...>";var i=hh(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=aa(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 so(e,t){return typeof e!="string"||A_.test(e)?"{"+aa(e,t-2)+"}":e.length>t-2?5>t?'"..."':'"'+e.slice(0,t-5)+'..."':'"'+e+'"'}function dh(e,t,i){var s=120-i.length-e.length,n=[],r;for(r in t)if(t.hasOwnProperty(r)&&r!=="children"){var d=so(t[r],120-i.length-r.length-1);s-=r.length+d.length+2,n.push(r+"="+d)}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 G1(e,t,i){var s="",n=tt({},t),r;for(r in e)if(e.hasOwnProperty(r)){delete n[r];var d=120-2*i-r.length-2,_=aa(e[r],d);t.hasOwnProperty(r)?(d=aa(t[r],d),s+=io(i)+r+": "+_+`
91
- `,s+=dr(i)+r+": "+d+`
92
- `):s+=io(i)+r+": "+_+`
93
- `}for(var D in n)n.hasOwnProperty(D)&&(e=aa(n[D],120-2*i-D.length-2),s+=dr(i)+D+": "+e+`
94
- `);return s}function Y1(e,t,i,s){var n="",r=new Map;for(M in i)i.hasOwnProperty(M)&&r.set(M.toLowerCase(),M);if(r.size===1&&r.has("children"))n+=dh(e,t,ki(s));else{for(var d in t)if(t.hasOwnProperty(d)&&d!=="children"){var _=120-2*(s+1)-d.length-1,D=r.get(d.toLowerCase());if(D!==void 0){r.delete(d.toLowerCase());var M=t[d];D=i[D];var K=so(M,_);_=so(D,_),typeof M=="object"&&M!==null&&typeof D=="object"&&D!==null&&hh(M)==="Object"&&hh(D)==="Object"&&(2<Object.keys(M).length||2<Object.keys(D).length||-1<K.indexOf("...")||-1<_.indexOf("..."))?n+=ki(s+1)+d+`={{
95
- `+G1(M,D,s+2)+ki(s+1)+`}}
96
- `:(n+=io(s+1)+d+"="+K+`
97
- `,n+=dr(s+1)+d+"="+_+`
98
- `)}else n+=ki(s+1)+d+"="+so(t[d],_)+`
99
- `}r.forEach(function(te){if(te!=="children"){var F=120-2*(s+1)-te.length-1;n+=dr(s+1)+te+"="+so(i[te],F)+`
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+=Il(r,""+e,s+1)):(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(n=e==null?n+Il(""+t,null,s+1):n+Il(""+t,void 0,s+1)),n}function Sp(e,t){var i=yp(e);if(i===null){for(i="",e=e.child;e;)i+=Sp(e,t),e=e.sibling;return i}return ki(t)+"<"+i+`>
104
- `}function fh(e,t){var i=wp(e,t);if(i!==e&&(e.children.length!==1||e.children[0]!==i))return ki(t)+`...
105
- `+fh(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=Il(n,e.serverProps,t),t++;else if(r=yp(e.fiber),r!==null)if(e.serverProps===void 0){s=t;var d=120-2*s-r.length-2,_="";for(M in n)if(n.hasOwnProperty(M)&&M!=="children"){var D=so(n[M],15);if(d-=M.length+D.length+2,0>d){_+=" ...";break}_+=" "+M+"="+D}s=ki(s)+"<"+r+_+`>
107
- `,t++}else e.serverProps===null?(s=dh(r,n,io(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=Y1(r,n,e.serverProps,t),t++);var M="";for(n=e.fiber.child,r=0;n&&r<e.children.length;)d=e.children[r],d.fiber===n?(M+=fh(d,t),r++):M+=Sp(n,t),n=n.sibling;for(n&&0<e.children.length&&(M+=ki(t)+`...
108
- `),n=e.serverTail,e.serverProps===null&&t--,e=0;e<n.length;e++)r=n[e],M=typeof r=="string"?M+(dr(t)+oa(r,120-2*t)+`
109
- `):M+dh(r.type,r.props,dr(t));return i+s+M}function mh(e){try{return`
110
-
111
- `+fh(e,0)}catch{return""}}function Np(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?mh(n).replaceAll(/^[+-]/gm,">"):""}function Ep(e,t){var i=tt({},e||k_),s={tag:t};return D_.indexOf(t)!==-1&&(i.aTagInScope=null,i.buttonTagInScope=null,i.nobrTagInScope=null),tN.indexOf(t)!==-1&&(i.pTagInButtonScope=null),eN.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 xp(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 iN.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 X1(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 Cp(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 ph(e,t){t=t||k_;var i=t.current;if(t=(i=xp(e,i&&i.tag,t.implicitRootScope)?null:i)?null:X1(e,t),t=i||t,!t)return!0;var s=t.tag;if(t=String(!!i)+"|"+e+"|"+s,eu[t])return!1;eu[t]=!0;var n=(t=Bi)?Cp(t.return,s):null,r=t!==null&&n!==null?Np(n,t,null):"",d="<"+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`,d,s,i,r)):console.error(`In HTML, %s cannot be a descendant of <%s>.
113
- This will cause a hydration error.%s`,d,s,r),t&&(e=t.return,n===null||e===null||n===e&&e._debugOwner===t._debugOwner||ce(n,function(){console.error(`<%s> cannot contain a nested %s.
114
- See this log for the ancestor stack trace.`,s,d)})),!1}function $l(e,t,i){if(i||xp("#text",t,!1))return!0;if(i="#text|"+t,eu[i])return!1;eu[i]=!0;var s=(i=Bi)?Cp(i,t):null;return i=i!==null&&s!==null?Np(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 la(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}function Q1(e){return e.replace(rN,function(t,i){return i.toUpperCase()})}function Ap(e,t,i){var s=t.indexOf("--")===0;s||(-1<t.indexOf("-")?Eo.hasOwnProperty(t)&&Eo[t]||(Eo[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,Q1(t.replace(nN,"ms-")))):sN.test(t)?Eo.hasOwnProperty(t)&&Eo[t]||(Eo[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!T_.test(i)||Mf.hasOwnProperty(i)&&Mf[i]||(Mf[i]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,i.replace(T_,""))),typeof i=="number"&&(isNaN(i)?M_||(M_=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(i)||O_||(O_=!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||j_.has(t)?t==="float"?e.cssFloat=i:(De(i,t),e[t]=(""+i).trim()):e[t]=i+"px"}function Dp(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=Tf[n]||[n],d=0;d<r.length;d++)s[r[d]]=n}for(var _ in t)if(t.hasOwnProperty(_)&&(!i||i[_]!==t[_]))for(n=Tf[_]||[_],r=0;r<n.length;r++)s[n[r]]=_;_={};for(var D in t)for(n=Tf[D]||[D],r=0;r<n.length;r++)_[n[r]]=D;D={};for(var M in s)if(n=s[M],(r=_[M])&&n!==r&&(d=n+","+r,!D[d])){D[d]=!0,d=console;var K=t[n];d.error.call(d,"%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.",K==null||typeof K=="boolean"||K===""?"Removing":"Updating",n,r)}}for(var te in i)!i.hasOwnProperty(te)||t!=null&&t.hasOwnProperty(te)||(te.indexOf("--")===0?e.setProperty(te,""):te==="float"?e.cssFloat="":e[te]="");for(var F in t)M=t[F],t.hasOwnProperty(F)&&i[F]!==M&&Ap(e,F,M)}else for(s in t)t.hasOwnProperty(s)&&Ap(e,s,t[s])}function ca(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 kp(e){return oN.get(e)||e}function K1(e,t){if(hs.call(Co,t)&&Co[t])return!0;if(lN.test(t)){if(e="aria-"+t.slice(4).toLowerCase(),e=L_.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Co[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),Co[t]=!0}if(aN.test(t)){if(e=t.toLowerCase(),e=L_.hasOwnProperty(e)?e:null,e==null)return Co[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),Co[t]=!0)}return!0}function Z1(e,t){var i=[],s;for(s in t)K1(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 ey(e,t,i,s){if(hs.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(J_.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),pi[t]=!0}else if(J_.test(t))return cN.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),pi[t]=!0;if(uN.test(t)||hN.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(iu.hasOwnProperty(n)){if(n=iu[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 ty(e,t,i){var s=[],n;for(n in t)ey(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 ua(e){return dN.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Gs(){}function bh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function Vp(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(ch(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(je(t,"name"),i=i.querySelectorAll('input[name="'+Pi(""+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.");ch(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&&hp(s)}break e;case"textarea":gp(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&to(e,!!i.multiple,t,!1)}}}function Rp(e,t,i){if(Of)return e(t,i);Of=!0;try{var s=e(t);return s}finally{if(Of=!1,(Ao!==null||Do!==null)&&(mo(),Ao&&(t=Ao,e=Do,Do=Ao=null,Vp(t),e)))for(t=0;t<e.length;t++)Vp(e[t])}}function ha(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 Tp(){if(su)return su;var e,t=Lf,i=t.length,s,n="value"in Un?Un.value:Un.textContent,r=n.length;for(e=0;e<i&&t[e]===n[e];e++);var d=i-e;for(s=1;s<=d&&t[i-s]===n[r-s];s++);return su=n.slice(e,1<s?1-s:void 0)}function ql(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 Pl(){return!0}function Mp(){return!1}function yi(e){function t(i,s,n,r,d){this._reactName=i,this._targetInst=n,this.type=s,this.nativeEvent=r,this.target=d,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(i=e[_],this[_]=i?i(r):r[_]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Pl:Mp,this.isPropagationStopped=Mp,this}return tt(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=Pl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),t}function iy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xN[e])?!!t[e]:!1}function vh(){return iy}function Op(e,t){switch(e){case"keyup":return BN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==I_;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function sy(e,t){switch(e){case"compositionend":return jp(t);case"keypress":return t.which!==q_?null:(W_=!0,P_);case"textInput":return e=t.data,e===P_&&W_?null:e;default:return null}}function ny(e,t){if(ko)return e==="compositionend"||!Uf&&Op(e,t)?(e=Tp(),su=Lf=Un=null,ko=!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 $_&&t.locale!=="ko"?null:t.data;default:return null}}function Lp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!HN[e.type]:t==="textarea"}function ry(e){if(!Is)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 Bp(e,t,i,s){Ao?Do?Do.push(s):Do=[s]:Ao=s,t=Bc(t,"onChange"),0<t.length&&(i=new nu("onChange","change",null,i,s),e.push({event:i,listeners:t}))}function oy(e){_g(e,0)}function Wl(e){var t=ke(e);if(hp(t))return e}function Jp(e,t){if(e==="change")return t}function Hp(){Ya&&(Ya.detachEvent("onpropertychange",Up),Xa=Ya=null)}function Up(e){if(e.propertyName==="value"&&Wl(Xa)){var t=[];Bp(t,Xa,e,bh(e)),Rp(oy,t)}}function ay(e,t,i){e==="focusin"?(Hp(),Ya=t,Xa=i,Ya.attachEvent("onpropertychange",Up)):e==="focusout"&&Hp()}function ly(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wl(Xa)}function cy(e,t){if(e==="click")return Wl(t)}function uy(e,t){if(e==="input"||e==="change")return Wl(t)}function hy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function da(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(!hs.call(t,n)||!bi(e[n],t[n]))return!1}return!0}function zp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ip(e,t){var i=zp(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=zp(i)}}function $p(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$p(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zl(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=zl(e.document)}return t}function gh(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 Pp(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;If||Vo==null||Vo!==zl(s)||(s=Vo,"selectionStart"in s&&gh(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}),Qa&&da(Qa,s)||(Qa=s,s=Bc(zf,"onSelect"),0<s.length&&(t=new nu("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Vo)))}function fr(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}function mr(e){if($f[e])return $f[e];if(!Ro[e])return e;var t=Ro[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in G_)return $f[e]=t[i];return e}function as(e,t){Z_.set(e,t),at(t,[e])}function dy(e){for(var t=ou,i=0;i<e.length;i++){var s=e[i];if(typeof s=="object"&&s!==null)if(Gt(s)&&s.length===2&&typeof s[0]=="string"){if(t!==ou&&t!==Gf)return Wf;t=Gf}else return Wf;else{if(typeof s=="function"||typeof s=="string"&&50<s.length||t!==ou&&t!==Ff)return Wf;t=Ff}}return t}function _h(e,t,i,s){for(var n in e)hs.call(e,n)&&n[0]!=="_"&&ws(n,e[n],t,i,s)}function ws(e,t,i,s,n){switch(typeof t){case"object":if(t===null){t="null";break}else{if(t.$$typeof===Ls){var r=E(t.type)||"…",d=t.key;t=t.props;var _=Object.keys(t),D=_.length;if(d==null&&D===0){t="<"+r+" />";break}if(3>s||D===1&&_[0]==="children"&&d==null){t="<"+r+" … />";break}i.push([n+"  ".repeat(s)+e,"<"+r]),d!==null&&ws("key",d,i,s+1,n),e=!1;for(var M in t)M==="children"?t.children!=null&&(!Gt(t.children)||0<t.children.length)&&(e=!0):hs.call(t,M)&&M[0]!=="_"&&ws(M,t[M],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(M=dy(t),M===Ff||M===ou){t=JSON.stringify(t);break}else if(M===Gf){for(i.push([n+"  ".repeat(s)+e,""]),e=0;e<t.length;e++)r=t[e],ws(r[0],r[1],i,s+1,n);return}}if(r==="Promise"){if(t.status==="fulfilled"){if(r=i.length,ws(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,ws(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"&&(M=Object.getPrototypeOf(t))&&typeof M.constructor=="function"&&(r=M.constructor.name),i.push([n+"  ".repeat(s)+e,r==="Object"?3>s?"":"…":r]),3>s&&_h(t,i,s+1,n);return}case"function":t=t.name===""?"() => {}":t.name+"() {}";break;case"string":t=t===WN?"…":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 Wp(e,t,i,s){var n=!0;for(d in e)d in t||(i.push([au+"  ".repeat(s)+d,"…"]),n=!1);for(var r in t)if(r in e){var d=e[r],_=t[r];if(d!==_){if(s===0&&r==="children")n="  ".repeat(s)+r,i.push([au+n,"…"],[lu+n,"…"]);else{if(!(3<=s)){if(typeof d=="object"&&typeof _=="object"&&d!==null&&_!==null&&d.$$typeof===_.$$typeof)if(_.$$typeof===Ls){if(d.type===_.type&&d.key===_.key){d=E(_.type)||"…",n="  ".repeat(s)+r,d="<"+d+" … />",i.push([au+n,d],[lu+n,d]),n=!1;continue}}else{var D=Object.prototype.toString.call(d),M=Object.prototype.toString.call(_);if(D===M&&(M==="[object Object]"||M==="[object Array]")){D=[iw+"  ".repeat(s)+r,M==="[object Array]"?"Array":""],i.push(D),M=i.length,Wp(d,_,i,s+1)?M===i.length&&(D[1]="Referentially unequal but deeply equal objects. Consider memoization."):n=!1;continue}}else if(typeof d=="function"&&typeof _=="function"&&d.name===_.name&&d.length===_.length&&(D=Function.prototype.toString.call(d),M=Function.prototype.toString.call(_),D===M)){d=_.name===""?"() => {}":_.name+"() {}",i.push([iw+"  ".repeat(s)+r,d+" Referentially unequal function closure. Consider memoization."]);continue}}ws(r,d,i,s,au),ws(r,_,i,s,lu)}n=!1}}else i.push([lu+"  ".repeat(s)+r,"…"]),n=!1;return n}function ls(e){ot=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function ys(e,t,i,s){Et&&(In.start=t,In.end=i,rn.color="warning",rn.tooltipText=s,rn.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,s,In)):performance.measure(s,In))}function Fl(e,t,i){ys(e,t,i,"Reconnect")}function Gl(e,t,i,s,n){var r=V(e);if(r!==null&&Et){var d=e.alternate,_=e.actualDuration;if(d===null||d.child!==e.child)for(var D=e.child;D!==null;D=D.sibling)_-=D.actualDuration;s=.5>_?s?"tertiary-light":"primary-light":10>_?s?"tertiary":"primary":100>_?s?"tertiary-dark":"primary-dark":"error";var M=e.memoizedProps;_=e._debugTask,M!==null&&d!==null&&d.memoizedProps!==M?(D=[FN],M=Wp(d.memoizedProps,M,D,0),1<D.length&&(M&&!zn&&(d.lanes&n)===0&&100<e.actualDuration?(zn=!0,D[0]=GN,rn.color="warning",rn.tooltipText=sw):(rn.color=s,rn.tooltipText=r),rn.properties=D,In.start=t,In.end=i,_!=null?_.run(performance.measure.bind(performance,"​"+r,In)):performance.measure("​"+r,In))):_!=null?_.run(console.timeStamp.bind(console,r,t,i,Gi,void 0,s)):console.timeStamp(r,t,i,Gi,void 0,s)}}function wh(e,t,i,s){if(Et){var n=V(e);if(n!==null){for(var r=null,d=[],_=0;_<s.length;_++){var D=s[_];r==null&&D.source!==null&&(r=D.source._debugTask),D=D.value,d.push(["Error",typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D)])}e.key!==null&&ws("key",e.key,d,0,""),e.memoizedProps!==null&&_h(e.memoizedProps,d,0,""),r==null&&(r=e._debugTask),e={start:t,end:i,detail:{devtools:{color:"error",track:Gi,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:d}}},r?r.run(performance.measure.bind(performance,"​"+n,e)):performance.measure("​"+n,e)}}}function Ss(e,t,i,s,n){if(n!==null){if(Et){var r=V(e);if(r!==null){s=[];for(var d=0;d<n.length;d++){var _=n[d].value;s.push(["Error",typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_)])}e.key!==null&&ws("key",e.key,s,0,""),e.memoizedProps!==null&&_h(e.memoizedProps,s,0,""),t={start:t,end:i,detail:{devtools:{color:"error",track:Gi,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=V(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,Gi,void 0,n)):console.timeStamp(r,t,i,Gi,void 0,n))}function fy(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 Fp(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 Gp(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 my(e,t,i,s,n,r){if(Et&&!(t<=e)){i=[];for(var d=0;d<s.length;d++){var _=s[d].value;i.push(["Recoverable Error",typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_)])}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 yh(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 py(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 Yp(e,t,i,s,n){if(Et&&!(t<=e)){for(var r=[],d=0;d<i.length;d++){var _=i[d].value;r.push(["Error",typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_)])}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 Sh(e,t,i){!Et||t<=e||console.timeStamp("Animating",e,t,ot,nt,"secondary-dark")}function Yl(){for(var e=To,t=Yf=To=0;t<e;){var i=Yi[t];Yi[t++]=null;var s=Yi[t];Yi[t++]=null;var n=Yi[t];Yi[t++]=null;var r=Yi[t];if(Yi[t++]=null,s!==null&&n!==null){var d=s.pending;d===null?n.next=n:(n.next=d.next,d.next=n),s.pending=n}r!==0&&Xp(i,n,r)}}function Xl(e,t,i,s){Yi[To++]=e,Yi[To++]=t,Yi[To++]=i,Yi[To++]=s,Yf|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Nh(e,t,i,s){return Xl(e,t,i,s),Ql(e)}function ai(e,t){return Xl(e,null,null,t),Ql(e)}function Xp(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&Ka||(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 Ql(e){if(xl>uE)throw qr=xl=0,Cl=Dm=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.");qr>hE&&(qr=0,Cl=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&&dg(e);for(var t=e,i=t.return;i!==null;)t.alternate===null&&(t.flags&4098)!==0&&dg(e),t=i,i=t.return;return t.tag===3?t.stateNode:null}function pr(e){if(Xi===null)return e;var t=Xi(e);return t===void 0?e:t.current}function Eh(e){if(Xi===null)return e;var t=Xi(e);return t===void 0?e!=null&&typeof e.render=="function"&&(t=pr(e.render),e.render!==t)?(t={$$typeof:Ua,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function Qp(e,t){if(Xi===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===Ua||n===Li)&&(s=!0);break;case 14:case 15:(n===Gc||n===Li)&&(s=!0);break;default:return!1}return!!(s&&(e=Xi(i),e!==void 0&&e===Xi(t)))}function Kp(e){Xi!==null&&typeof WeakSet=="function"&&(Mo===null&&(Mo=new WeakSet),Mo.add(e))}function Zp(e,t,i){do{var s=e,n=s.alternate,r=s.child,d=s.sibling,_=s.tag;s=s.type;var D=null;switch(_){case 0:case 15:case 1:D=s;break;case 11:D=s.render}if(Xi===null)throw Error("Expected resolveFamily to be set during hot reload.");var M=!1;if(s=!1,D!==null&&(D=Xi(D),D!==void 0&&(i.has(D)?s=!0:t.has(D)&&(_===1?s=!0:M=!0))),Mo!==null&&(Mo.has(e)||n!==null&&Mo.has(n))&&(s=!0),s&&(e._debugNeedsRemount=!0),(s||M)&&(n=ai(e,2),n!==null&&Rt(n,e,2)),r===null||s||Zp(r,t,i),d===null)break;e=d}while(!0)}function by(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,nw||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function xh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ys(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=pr(e.type);break;case 1:i.type=pr(e.type);break;case 11:i.type=Eh(e.type)}return i}function eb(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 Ch(e,t,i,s,n,r){var d=0,_=e;if(typeof e=="function")xh(e)&&(d=1),_=pr(_);else if(typeof e=="string")d=re(),d=xS(e,i,d)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case wf:return t=m(31,i,t,n),t.elementType=wf,t.lanes=r,t;case yo:return br(i.children,n,r,t);case Fc:d=8,n|=ci,n|=ds;break;case bf: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|Ye),t.elementType=bf,t.lanes=r,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case gf:return t=m(13,i,t,n),t.elementType=gf,t.lanes=r,t;case _f:return t=m(19,i,t,n),t.elementType=_f,t.lanes=r,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bs:d=10;break e;case vf:d=9;break e;case Ua:d=11,_=Eh(_);break e;case Gc:d=14;break e;case Li:d=16,_=null;break e}_="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(_+=" 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":Gt(e)?i="array":e!==void 0&&e.$$typeof===Ls?(i="<"+(E(e.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):i=typeof e,(d=s?R(s):null)&&(_+=`
117
-
118
- Check the render method of \``+d+"`."),d=29,i=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(i+"."+_)),_=null}return t=m(d,i,t,n),t.elementType=e,t.type=_,t.lanes=r,t._debugOwner=s,t}function Kl(e,t,i){return t=Ch(e.type,e.key,e.props,e._owner,t,i),t._debugOwner=e._owner,t._debugStack=e._debugStack,t._debugTask=e._debugTask,t}function br(e,t,i,s){return e=m(7,e,s,t),e.lanes=i,e}function Ah(e,t,i){return e=m(6,e,null,t),e.lanes=i,e}function tb(e){var t=m(18,null,null,He);return t.stateNode=e,t}function Dh(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 Vi(e,t){if(typeof e=="object"&&e!==null){var i=Xf.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Y(t)},Xf.set(e,t),t)}return{value:e,source:t,stack:Y(t)}}function Xs(e,t){En(),Oo[jo++]=Za,Oo[jo++]=cu,cu=e,Za=t}function ib(e,t,i){En(),Qi[Ki++]=an,Qi[Ki++]=ln,Qi[Ki++]=kr,kr=e;var s=an;e=ln;var n=32-fi(s)-1;s&=~(1<<n),i+=1;var r=32-fi(t)+n;if(30<r){var d=n-n%5;r=(s&(1<<d)-1).toString(32),s>>=d,n-=d,an=1<<32-fi(t)+n|i<<n|s,ln=r+e}else an=1<<r|i<<n|s,ln=e}function kh(e){En(),e.return!==null&&(Xs(e,1),ib(e,1,0))}function Vh(e){for(;e===cu;)cu=Oo[--jo],Oo[jo]=null,Za=Oo[--jo],Oo[jo]=null;for(;e===kr;)kr=Qi[--Ki],Qi[Ki]=null,ln=Qi[--Ki],Qi[Ki]=null,an=Qi[--Ki],Qi[Ki]=null}function sb(){return En(),kr!==null?{id:an,overflow:ln}:null}function nb(e,t){En(),Qi[Ki++]=an,Qi[Ki++]=ln,Qi[Ki++]=kr,an=t.id,ln=t.overflow,kr=e}function En(){it||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function vr(e,t){if(e.return===null){if(Ji===null)Ji={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t};else{if(Ji.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Ji.distanceFromLeaf>t&&(Ji.distanceFromLeaf=t)}return Ji}var i=vr(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 rb(){it&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Zl(e,t){$s||(e=vr(e,0),e.serverProps=null,t!==null&&(t=Bg(t),e.serverTail.push(t)))}function xn(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,i="",s=Ji;throw s!==null&&(Ji=null,i=mh(s)),fa(Vi(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)),Qf}function ob(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[ri]=e,t[mi]=s,Xd(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<Al.length;i++)st(Al[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),dp(t,s),fp(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"option":mp(t,s);break;case"select":hi("select",s),st("invalid",t),bp(t,s);break;case"textarea":hi("textarea",s),st("invalid",t),vp(t,s),_p(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||Ng(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=Gs),t=!0):t=!1,t||xn(e,!0)}function ab(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 no(e){if(e!==oi)return!1;if(!it)return ab(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")||tf(e.type,e.memoizedProps)),i=!i),i&&xt){for(i=xt;i;){var s=vr(e,0),n=Bg(i);s.serverTail.push(n),i=n.type==="Suspense"?of(i):ji(i.nextSibling)}xn(e)}if(ab(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=of(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=of(e)}else t===27?(t=xt,jn(e.type)?(e=Um,Um=null,xt=e):xt=t):xt=oi?ji(e.stateNode.nextSibling):null;return!0}function gr(){xt=oi=null,$s=it=!1}function Rh(){var e=qn;return e!==null&&(wi===null?wi=e:wi.push.apply(wi,e),qn=null),e}function fa(e){qn===null?qn=[e]:qn.push(e)}function Th(){var e=Ji;if(e!==null){Ji=null;for(var t=mh(e);0<e.children.length;)e=e.children[0];ce(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 ec(){Lo=uu=null,Bo=!1}function Cn(e,t,i){H(Kf,t._currentValue,e),t._currentValue=i,H(Zf,t._currentRenderer,e),t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==ow&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=ow}function Qs(e,t){e._currentValue=Kf.current;var i=Zf.current;$(Zf,t),e._currentRenderer=i,$(Kf,t)}function Mh(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 Oh(e,t,i,s){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var r=n.dependencies;if(r!==null){var d=n.child;r=r.firstContext;e:for(;r!==null;){var _=r;r=n;for(var D=0;D<t.length;D++)if(_.context===t[D]){r.lanes|=i,_=r.alternate,_!==null&&(_.lanes|=i),Mh(r.return,i,e),s||(d=null);break e}r=_.next}}else if(n.tag===18){if(d=n.return,d===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");d.lanes|=i,r=d.alternate,r!==null&&(r.lanes|=i),Mh(d,i,e),d=null}else d=n.child;if(d!==null)d.return=n;else for(d=n;d!==null;){if(d===e){d=null;break}if(n=d.sibling,n!==null){n.return=d.return,d=n;break}d=d.return}n=d}}function ro(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 d=n.alternate;if(d===null)throw Error("Should have a current fiber. This is a bug in React.");if(d=d.memoizedProps,d!==null){var _=n.type;bi(n.pendingProps.value,d.value)||(e!==null?e.push(_):e=[_])}}else if(n===Yc.current){if(d=n.alternate,d===null)throw Error("Should have a current fiber. This is a bug in React.");d.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Tl):e=[Tl])}n=n.return}e!==null&&Oh(t,e,i,s),t.flags|=262144}function tc(e){for(e=e.firstContext;e!==null;){if(!bi(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _r(e){uu=e,Lo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return Bo&&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()."),lb(uu,e)}function ic(e,t){return uu===null&&_r(e),lb(e,t)}function lb(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Lo===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().");Lo=t,e.dependencies={lanes:0,firstContext:t,_debugThenableState:null},e.flags|=524288}else Lo=Lo.next=t;return i}function jh(){return{controller:new QN,data:new Map,refCount:0}}function wr(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 ma(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&&KN(ZN,function(){e.controller.abort()})}function Ns(e,t,i){(e&127)!==0?0>qs&&(qs=zt(),tl=hu(t),em=t,i!=null&&(tm=V(i)),(lt&(Xt|zi))!==ti&&(Tt=!0,Wn=el),e=ja(),t=Oa(),e!==Jo||t!==il?Jo=-1.1:t!==null&&(Wn=el),Tr=e,il=t):(e&4194048)!==0&&0>es&&(es=zt(),sl=hu(t),aw=t,i!=null&&(lw=V(i)),0>dn)&&(e=ja(),t=Oa(),(e!==Gn||t!==Mr)&&(Gn=-1.1),Fn=e,Mr=t)}function vy(e){if(0>qs){qs=zt(),tl=e._debugTask!=null?e._debugTask:null,(lt&(Xt|zi))!==ti&&(Wn=el);var t=ja(),i=Oa();t!==Jo||i!==il?Jo=-1.1:i!==null&&(Wn=el),Tr=t,il=i}0>es&&(es=zt(),sl=e._debugTask!=null?e._debugTask:null,0>dn)&&(e=ja(),t=Oa(),(e!==Gn||t!==Mr)&&(Gn=-1.1),Fn=e,Mr=t)}function Ks(){var e=Vr;return Vr=0,e}function sc(e){var t=Vr;return Vr=e,t}function pa(e){var t=Vr;return Vr+=e,t}function nc(){Be=Oe=-1.1}function Ri(){var e=Oe;return Oe=-1.1,e}function Ti(e){0<=e&&(Oe=e)}function Es(){var e=kt;return kt=-0,e}function xs(e){0<=e&&(kt=e)}function Cs(){var e=Dt;return Dt=null,e}function As(){var e=Tt;return Tt=!1,e}function Lh(e){vi=zt(),0>e.actualStartTime&&(e.actualStartTime=vi)}function Bh(e){if(0<=vi){var t=zt()-vi;e.actualDuration+=t,e.selfBaseDuration=t,vi=-1}}function cb(e){if(0<=vi){var t=zt()-vi;e.actualDuration+=t,vi=-1}}function Ds(){if(0<=vi){var e=zt(),t=e-vi;vi=-1,Vr+=t,kt+=t,Be=e}}function ub(e){Dt===null&&(Dt=[]),Dt.push(e),un===null&&(un=[]),un.push(e)}function ks(){vi=zt(),0>Oe&&(Oe=vi)}function ba(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function gy(e,t){if(rl===null){var i=rl=[];sm=0,Or=Wd(),Ho={status:"pending",value:void 0,then:function(s){i.push(s)}}}return sm++,t.then(hb,hb),t}function hb(){if(--sm===0&&(-1<es||(dn=-1.1),rl!==null)){Ho!==null&&(Ho.status="fulfilled");var e=rl;rl=null,Or=0,Ho=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _y(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 Jh(){var e=jr.current;return e!==null?e:_t.pooledCache}function rc(e,t){t===null?H(jr,jr.current,e):H(jr,t.pool,e)}function db(){var e=Jh();return e===null?null:{parent:Ut._currentValue,pool:e}}function fb(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function mb(e){return e=e.status,e==="fulfilled"||e==="rejected"}function pb(e,t,i){de.actQueue!==null&&(de.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(Gs,Gs),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,vb(e),e;default:if(typeof t.status=="string")t.then(Gs,Gs);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 d=t;d.status="fulfilled",d.value=r}},function(r){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vb(e),e}throw Br=t,dl=!0,Uo}}function An(e){try{return nE(e)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(Br=t,dl=!0,Uo):t}}function bb(){if(Br===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Br;return Br=null,dl=!1,e}function vb(e){if(e===Uo||e===_u)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=Xe;return e!=null&&(Xe=t===null?e:t.concat(e)),t}function Hh(){var e=Xe;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 oc(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=Kl(e,i.mode,0),t._debugInfo=Xe,t.return=i),ce(t,function(d){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",d)},r);break}}}function ac(e){var t=fl;return fl+=1,zo===null&&(zo=fb()),pb(zo,e,t)}function va(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function gb(e,t){throw t.$$typeof===LS?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 lc(e,t){var i=Hh();i!==null?i.run(gb.bind(null,e,t)):gb(e,t)}function _b(e,t){var i=V(e)||"Component";Dw[i]||(Dw[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 cc(e,t){var i=Hh();i!==null?i.run(_b.bind(null,e,t)):_b(e,t)}function wb(e,t){var i=V(e)||"Component";kw[i]||(kw[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 uc(e,t){var i=Hh();i!==null?i.run(wb.bind(null,e,t)):wb(e,t)}function yb(e){function t(W,G){if(e){var Q=W.deletions;Q===null?(W.deletions=[G],W.flags|=16):Q.push(G)}}function i(W,G){if(!e)return null;for(;G!==null;)t(W,G),G=G.sibling;return null}function s(W){for(var G=new Map;W!==null;)W.key!==null?G.set(W.key,W):G.set(W.index,W),W=W.sibling;return G}function n(W,G){return W=Ys(W,G),W.index=0,W.sibling=null,W}function r(W,G,Q){return W.index=Q,e?(Q=W.alternate,Q!==null?(Q=Q.index,Q<G?(W.flags|=67108866,G):Q):(W.flags|=67108866,G)):(W.flags|=1048576,G)}function d(W){return e&&W.alternate===null&&(W.flags|=67108866),W}function _(W,G,Q,me){return G===null||G.tag!==6?(G=Ah(Q,W.mode,me),G.return=W,G._debugOwner=W,G._debugTask=W._debugTask,G._debugInfo=Xe,G):(G=n(G,Q),G.return=W,G._debugInfo=Xe,G)}function D(W,G,Q,me){var Ee=Q.type;return Ee===yo?(G=K(W,G,Q.props.children,me,Q.key),oc(Q,G,W),G):G!==null&&(G.elementType===Ee||Qp(G,Q)||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Li&&An(Ee)===G.type)?(G=n(G,Q.props),va(G,Q),G.return=W,G._debugOwner=Q._owner,G._debugInfo=Xe,G):(G=Kl(Q,W.mode,me),va(G,Q),G.return=W,G._debugInfo=Xe,G)}function M(W,G,Q,me){return G===null||G.tag!==4||G.stateNode.containerInfo!==Q.containerInfo||G.stateNode.implementation!==Q.implementation?(G=Dh(Q,W.mode,me),G.return=W,G._debugInfo=Xe,G):(G=n(G,Q.children||[]),G.return=W,G._debugInfo=Xe,G)}function K(W,G,Q,me,Ee){return G===null||G.tag!==7?(G=br(Q,W.mode,me,Ee),G.return=W,G._debugOwner=W,G._debugTask=W._debugTask,G._debugInfo=Xe,G):(G=n(G,Q),G.return=W,G._debugInfo=Xe,G)}function te(W,G,Q){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=Ah(""+G,W.mode,Q),G.return=W,G._debugOwner=W,G._debugTask=W._debugTask,G._debugInfo=Xe,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case Ls:return Q=Kl(G,W.mode,Q),va(Q,G),Q.return=W,W=ii(G._debugInfo),Q._debugInfo=Xe,Xe=W,Q;case wo:return G=Dh(G,W.mode,Q),G.return=W,G._debugInfo=Xe,G;case Li:var me=ii(G._debugInfo);return G=An(G),W=te(W,G,Q),Xe=me,W}if(Gt(G)||k(G))return Q=br(G,W.mode,Q,null),Q.return=W,Q._debugOwner=W,Q._debugTask=W._debugTask,W=ii(G._debugInfo),Q._debugInfo=Xe,Xe=W,Q;if(typeof G.then=="function")return me=ii(G._debugInfo),W=te(W,ac(G),Q),Xe=me,W;if(G.$$typeof===Bs)return te(W,ic(W,G),Q);lc(W,G)}return typeof G=="function"&&cc(W,G),typeof G=="symbol"&&uc(W,G),null}function F(W,G,Q,me){var Ee=G!==null?G.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Ee!==null?null:_(W,G,""+Q,me);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Ls:return Q.key===Ee?(Ee=ii(Q._debugInfo),W=D(W,G,Q,me),Xe=Ee,W):null;case wo:return Q.key===Ee?M(W,G,Q,me):null;case Li:return Ee=ii(Q._debugInfo),Q=An(Q),W=F(W,G,Q,me),Xe=Ee,W}if(Gt(Q)||k(Q))return Ee!==null?null:(Ee=ii(Q._debugInfo),W=K(W,G,Q,me,null),Xe=Ee,W);if(typeof Q.then=="function")return Ee=ii(Q._debugInfo),W=F(W,G,ac(Q),me),Xe=Ee,W;if(Q.$$typeof===Bs)return F(W,G,ic(W,Q),me);lc(W,Q)}return typeof Q=="function"&&cc(W,Q),typeof Q=="symbol"&&uc(W,Q),null}function ae(W,G,Q,me,Ee){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return W=W.get(Q)||null,_(G,W,""+me,Ee);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case Ls:return Q=W.get(me.key===null?Q:me.key)||null,W=ii(me._debugInfo),G=D(G,Q,me,Ee),Xe=W,G;case wo:return W=W.get(me.key===null?Q:me.key)||null,M(G,W,me,Ee);case Li:var ze=ii(me._debugInfo);return me=An(me),G=ae(W,G,Q,me,Ee),Xe=ze,G}if(Gt(me)||k(me))return Q=W.get(Q)||null,W=ii(me._debugInfo),G=K(G,Q,me,Ee,null),Xe=W,G;if(typeof me.then=="function")return ze=ii(me._debugInfo),G=ae(W,G,Q,ac(me),Ee),Xe=ze,G;if(me.$$typeof===Bs)return ae(W,G,Q,ic(G,me),Ee);lc(G,me)}return typeof me=="function"&&cc(G,me),typeof me=="symbol"&&uc(G,me),null}function Ne(W,G,Q,me){if(typeof Q!="object"||Q===null)return me;switch(Q.$$typeof){case Ls:case wo:N(W,G,Q);var Ee=Q.key;if(typeof Ee!="string")break;if(me===null){me=new Set,me.add(Ee);break}if(!me.has(Ee)){me.add(Ee);break}ce(G,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:Q=An(Q),Ne(W,G,Q,me)}return me}function Ce(W,G,Q,me){for(var Ee=null,ze=null,Me=null,Ve=G,Fe=G=0,Ct=null;Ve!==null&&Fe<Q.length;Fe++){Ve.index>Fe?(Ct=Ve,Ve=null):Ct=Ve.sibling;var Jt=F(W,Ve,Q[Fe],me);if(Jt===null){Ve===null&&(Ve=Ct);break}Ee=Ne(W,Jt,Q[Fe],Ee),e&&Ve&&Jt.alternate===null&&t(W,Ve),G=r(Jt,G,Fe),Me===null?ze=Jt:Me.sibling=Jt,Me=Jt,Ve=Ct}if(Fe===Q.length)return i(W,Ve),it&&Xs(W,Fe),ze;if(Ve===null){for(;Fe<Q.length;Fe++)Ve=te(W,Q[Fe],me),Ve!==null&&(Ee=Ne(W,Ve,Q[Fe],Ee),G=r(Ve,G,Fe),Me===null?ze=Ve:Me.sibling=Ve,Me=Ve);return it&&Xs(W,Fe),ze}for(Ve=s(Ve);Fe<Q.length;Fe++)Ct=ae(Ve,W,Fe,Q[Fe],me),Ct!==null&&(Ee=Ne(W,Ct,Q[Fe],Ee),e&&Ct.alternate!==null&&Ve.delete(Ct.key===null?Fe:Ct.key),G=r(Ct,G,Fe),Me===null?ze=Ct:Me.sibling=Ct,Me=Ct);return e&&Ve.forEach(function(wn){return t(W,wn)}),it&&Xs(W,Fe),ze}function St(W,G,Q,me){if(Q==null)throw Error("An iterable object provided no iterator.");for(var Ee=null,ze=null,Me=G,Ve=G=0,Fe=null,Ct=null,Jt=Q.next();Me!==null&&!Jt.done;Ve++,Jt=Q.next()){Me.index>Ve?(Fe=Me,Me=null):Fe=Me.sibling;var wn=F(W,Me,Jt.value,me);if(wn===null){Me===null&&(Me=Fe);break}Ct=Ne(W,wn,Jt.value,Ct),e&&Me&&wn.alternate===null&&t(W,Me),G=r(wn,G,Ve),ze===null?Ee=wn:ze.sibling=wn,ze=wn,Me=Fe}if(Jt.done)return i(W,Me),it&&Xs(W,Ve),Ee;if(Me===null){for(;!Jt.done;Ve++,Jt=Q.next())Me=te(W,Jt.value,me),Me!==null&&(Ct=Ne(W,Me,Jt.value,Ct),G=r(Me,G,Ve),ze===null?Ee=Me:ze.sibling=Me,ze=Me);return it&&Xs(W,Ve),Ee}for(Me=s(Me);!Jt.done;Ve++,Jt=Q.next())Fe=ae(Me,W,Ve,Jt.value,me),Fe!==null&&(Ct=Ne(W,Fe,Jt.value,Ct),e&&Fe.alternate!==null&&Me.delete(Fe.key===null?Ve:Fe.key),G=r(Fe,G,Ve),ze===null?Ee=Fe:ze.sibling=Fe,ze=Fe);return e&&Me.forEach(function(DE){return t(W,DE)}),it&&Xs(W,Ve),Ee}function rt(W,G,Q,me){if(typeof Q=="object"&&Q!==null&&Q.type===yo&&Q.key===null&&(oc(Q,null,W),Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Ls:var Ee=ii(Q._debugInfo);e:{for(var ze=Q.key;G!==null;){if(G.key===ze){if(ze=Q.type,ze===yo){if(G.tag===7){i(W,G.sibling),me=n(G,Q.props.children),me.return=W,me._debugOwner=Q._owner,me._debugInfo=Xe,oc(Q,me,W),W=me;break e}}else if(G.elementType===ze||Qp(G,Q)||typeof ze=="object"&&ze!==null&&ze.$$typeof===Li&&An(ze)===G.type){i(W,G.sibling),me=n(G,Q.props),va(me,Q),me.return=W,me._debugOwner=Q._owner,me._debugInfo=Xe,W=me;break e}i(W,G);break}else t(W,G);G=G.sibling}Q.type===yo?(me=br(Q.props.children,W.mode,me,Q.key),me.return=W,me._debugOwner=W,me._debugTask=W._debugTask,me._debugInfo=Xe,oc(Q,me,W),W=me):(me=Kl(Q,W.mode,me),va(me,Q),me.return=W,me._debugInfo=Xe,W=me)}return W=d(W),Xe=Ee,W;case wo:e:{for(Ee=Q,Q=Ee.key;G!==null;){if(G.key===Q)if(G.tag===4&&G.stateNode.containerInfo===Ee.containerInfo&&G.stateNode.implementation===Ee.implementation){i(W,G.sibling),me=n(G,Ee.children||[]),me.return=W,W=me;break e}else{i(W,G);break}else t(W,G);G=G.sibling}me=Dh(Ee,W.mode,me),me.return=W,W=me}return d(W);case Li:return Ee=ii(Q._debugInfo),Q=An(Q),W=rt(W,G,Q,me),Xe=Ee,W}if(Gt(Q))return Ee=ii(Q._debugInfo),W=Ce(W,G,Q,me),Xe=Ee,W;if(k(Q)){if(Ee=ii(Q._debugInfo),ze=k(Q),typeof ze!="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=ze.call(Q);return Me===Q?(W.tag!==0||Object.prototype.toString.call(W.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Me)!=="[object Generator]")&&(Cw||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."),Cw=!0):Q.entries!==ze||am||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),am=!0),W=St(W,G,Me,me),Xe=Ee,W}if(typeof Q.then=="function")return Ee=ii(Q._debugInfo),W=rt(W,G,ac(Q),me),Xe=Ee,W;if(Q.$$typeof===Bs)return rt(W,G,ic(W,Q),me);lc(W,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Ee=""+Q,G!==null&&G.tag===6?(i(W,G.sibling),me=n(G,Ee),me.return=W,W=me):(i(W,G),me=Ah(Ee,W.mode,me),me.return=W,me._debugOwner=W,me._debugTask=W._debugTask,me._debugInfo=Xe,W=me),d(W)):(typeof Q=="function"&&cc(W,Q),typeof Q=="symbol"&&uc(W,Q),i(W,G))}return function(W,G,Q,me){var Ee=Xe;Xe=null;try{fl=0;var ze=rt(W,G,Q,me);return zo=null,ze}catch(Ct){if(Ct===Uo||Ct===_u)throw Ct;var Me=m(29,Ct,null,W.mode);Me.lanes=me,Me.return=W;var Ve=Me._debugInfo=Xe;if(Me._debugOwner=W._debugOwner,Me._debugTask=W._debugTask,Ve!=null){for(var Fe=Ve.length-1;0<=Fe;Fe--)if(typeof Ve[Fe].stack=="string"){Me._debugOwner=Ve[Fe],Me._debugTask=Ve[Fe].debugTask;break}}return Me}finally{Xe=Ee}}}function Sb(e,t){var i=Gt(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 Uh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zh(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 Dn(e){return{lane:e,tag:Rw,payload:null,callback:null,next:null}}function kn(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,cm===s&&!Ow){var n=V(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),Ow=!0}return(lt&Xt)!==ti?(n=s.pending,n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t,t=Ql(e),Xp(e,null,i),t):(Xl(e,s,t,i),Ql(e))}function ga(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 hc(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 d={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};r===null?n=r=d:r=r.next=d,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 _a(){if(um){var e=Ho;if(e!==null)throw e}}function wa(e,t,i,s){um=!1;var n=e.updateQueue;Yn=!1,cm=n.shared;var r=n.firstBaseUpdate,d=n.lastBaseUpdate,_=n.shared.pending;if(_!==null){n.shared.pending=null;var D=_,M=D.next;D.next=null,d===null?r=M:d.next=M,d=D;var K=e.alternate;K!==null&&(K=K.updateQueue,_=K.lastBaseUpdate,_!==d&&(_===null?K.firstBaseUpdate=M:_.next=M,K.lastBaseUpdate=D))}if(r!==null){var te=n.baseState;d=0,K=M=D=null,_=r;do{var F=_.lane&-536870913,ae=F!==_.lane;if(ae?(Qe&F)===F:(s&F)===F){F!==0&&F===Or&&(um=!0),K!==null&&(K=K.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{F=e;var Ne=_,Ce=t,St=i;switch(Ne.tag){case Tw:if(Ne=Ne.payload,typeof Ne=="function"){Bo=!0;var rt=Ne.call(St,te,Ce);if(F.mode&ci){Ae(!0);try{Ne.call(St,te,Ce)}finally{Ae(!1)}}Bo=!1,te=rt;break e}te=Ne;break e;case lm:F.flags=F.flags&-65537|128;case Rw:if(rt=Ne.payload,typeof rt=="function"){if(Bo=!0,Ne=rt.call(St,te,Ce),F.mode&ci){Ae(!0);try{rt.call(St,te,Ce)}finally{Ae(!1)}}Bo=!1}else Ne=rt;if(Ne==null)break e;te=tt({},te,Ne);break e;case Mw:Yn=!0}}F=_.callback,F!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=n.callbacks,ae===null?n.callbacks=[F]:ae.push(F))}else ae={lane:F,tag:_.tag,payload:_.payload,callback:_.callback,next:null},K===null?(M=K=ae,D=te):K=K.next=ae,d|=F;if(_=_.next,_===null){if(_=n.shared.pending,_===null)break;ae=_,_=ae.next,ae.next=null,n.lastBaseUpdate=ae,n.shared.pending=null}}while(!0);K===null&&(D=te),n.baseState=D,n.firstBaseUpdate=M,n.lastBaseUpdate=K,r===null&&(n.shared.lanes=0),Kn|=d,e.lanes=d,e.memoizedState=te}cm=null}function Nb(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++)Nb(i[e],t)}function Eb(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Nb(i[e],t)}function xb(e,t){var i=Ws;H(yu,i,e),H(Io,t,e),Ws=i|t.baseLanes}function Ih(e){H(yu,Ws,e),H(Io,Io.current,e)}function $h(e){Ws=yu.current,$(Io,e),$(yu,e)}function Vn(e){var t=e.alternate;H(Bt,Bt.current&$o,e),H(Hi,e,e),ts===null&&(t===null||Io.current!==null||t.memoizedState!==null)&&(ts=e)}function qh(e){H(Bt,Bt.current,e),H(Hi,e,e),ts===null&&(ts=e)}function Cb(e){e.tag===22?(H(Bt,Bt.current,e),H(Hi,e,e),ts===null&&(ts=e)):Rn(e)}function Rn(e){H(Bt,Bt.current,e),H(Hi,Hi.current,e)}function Mi(e){$(Hi,e),ts===e&&(ts=null),$(Bt,e)}function dc(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||nf(i)||rf(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 et(){var e=ue;ss===null?ss=[e]:ss.push(e)}function _e(){var e=ue;if(ss!==null&&(pn++,ss[pn]!==e)){var t=V(Ue);if(!jw.has(t)&&(jw.add(t),ss!==null)){for(var i="",s=0;s<=pn;s++){var n=ss[s],r=s===pn?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 oo(e){e==null||Gt(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.",ue,typeof e)}function fc(){var e=V(Ue);Bw.has(e)||(Bw.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 Ph(e,t){if(bl)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.",ue),!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`,ue,"["+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 Wh(e,t,i,s,n,r){fn=r,Ue=t,ss=e!==null?e._debugHookTypes:null,pn=-1,bl=e!==null&&e.type!==t.type,(Object.prototype.toString.call(i)==="[object AsyncFunction]"||Object.prototype.toString.call(i)==="[object AsyncGeneratorFunction]")&&(r=V(Ue),hm.has(r)||(hm.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,de.H=e!==null&&e.memoizedState!==null?fm:ss!==null?Jw:dm,Hr=r=(t.mode&ci)!==He;var d=nm(i,s,n);if(Hr=!1,Po&&(d=Fh(t,i,s,n)),r){Ae(!0);try{d=Fh(t,i,s,n)}finally{Ae(!1)}}return Ab(e,t),d}function Ab(e,t){t._debugHookTypes=ss,t.dependencies===null?mn!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:mn}):t.dependencies._debugThenableState=mn,de.H=vl;var i=gt!==null&&gt.next!==null;if(fn=0,ss=ue=It=gt=Ue=null,pn=-1,e!==null&&(e.flags&65011712)!==(t.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),Nu=!1,pl=0,mn=null,i)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||$t||(e=e.dependencies,e!==null&&tc(e)&&($t=!0)),dl?(dl=!1,e=!0):e=!1,e&&(t=V(t)||"Unknown",Lw.has(t)||hm.has(t)||(Lw.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 Fh(e,t,i,s){Ue=e;var n=0;do{if(Po&&(mn=null),pl=0,Po=!1,n>=oE)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(n+=1,bl=!1,It=gt=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}pn=-1,de.H=Hw,r=nm(t,i,s)}while(Po);return r}function yy(){var e=de.H,t=e.useState()[0];return t=typeof t.then=="function"?ya(t):t,e=e.useState()[0],(gt!==null?gt.memoizedState:null)!==e&&(Ue.flags|=1024),t}function Gh(){var e=Eu!==0;return Eu=0,e}function Yh(e,t,i){t.updateQueue=e.updateQueue,t.flags=(t.mode&ds)!==He?t.flags&-402655237:t.flags&-2053,e.lanes&=~i}function Xh(e){if(Nu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nu=!1}fn=0,ss=It=gt=Ue=null,pn=-1,ue=null,Po=!1,pl=Eu=0,mn=null}function di(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?Ue.memoizedState=It=e:It=It.next=e,It}function mt(){if(gt===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=gt.next;var t=It===null?Ue.memoizedState:It.next;if(t!==null)It=t,gt=e;else{if(e===null)throw Ue.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.");gt=e,e={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},It===null?Ue.memoizedState=It=e:It=It.next=e}return It}function mc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ya(e){var t=pl;return pl+=1,mn===null&&(mn=fb()),e=pb(mn,e,t),t=Ue,(It===null?t.memoizedState:It.next)===null&&(t=t.alternate,de.H=t!==null&&t.memoizedState!==null?fm:dm),e}function Tn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ya(e);if(e.$$typeof===Bs)return At(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function yr(e){var t=null,i=Ue.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ue.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=mc(),Ue.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0||bl)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=BS;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 cs(e,t){return typeof t=="function"?t(e):t}function Qh(e,t,i){var s=di();if(i!==void 0){var n=i(t);if(Hr){Ae(!0);try{i(t)}finally{Ae(!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=Cy.bind(null,Ue,e),[s.memoizedState,e]}function ao(e){var t=mt();return Kh(t,gt,e)}function Kh(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 d=n.next;n.next=r.next,r.next=d}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 _=d=null,D=null,M=t,K=!1;do{var te=M.lane&-536870913;if(te!==M.lane?(Qe&te)===te:(fn&te)===te){var F=M.revertLane;if(F===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),te===Or&&(K=!0);else if((fn&F)===F){M=M.next,F===Or&&(K=!0);continue}else te={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},D===null?(_=D=te,d=r):D=D.next=te,Ue.lanes|=F,Kn|=F;te=M.action,Hr&&i(r,te),r=M.hasEagerState?M.eagerState:i(r,te)}else F={lane:te,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},D===null?(_=D=F,d=r):D=D.next=F,Ue.lanes|=te,Kn|=te;M=M.next}while(M!==null&&M!==t);if(D===null?d=r:D.next=_,!bi(r,e.memoizedState)&&($t=!0,K&&(i=Ho,i!==null)))throw i;e.memoizedState=r,e.baseState=d,e.baseQueue=D,s.lastRenderedState=r}return n===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Sa(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 d=n=n.next;do r=e(r,d.action),d=d.next;while(d!==n);bi(r,t.memoizedState)||($t=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),i.lastRenderedState=r}return[r,s]}function Zh(e,t,i){var s=Ue,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();qo||r===i()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),qo=!0)}else{if(r=t(),qo||(i=t(),bi(r,i)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),qo=!0)),_t===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Qe&127)!==0||Db(s,t,r)}return n.memoizedState=r,i={value:r,getSnapshot:t},n.queue=i,gc(Vb.bind(null,s,i,e),[e]),s.flags|=2048,co(is|_i,{destroy:void 0},kb.bind(null,s,i,r,t),null),r}function pc(e,t,i){var s=Ue,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(),!qo){var d=t();bi(i,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),qo=!0)}(d=!bi((gt||n).memoizedState,i))&&(n.memoizedState=i,$t=!0),n=n.queue;var _=Vb.bind(null,s,n,e);if(Si(2048,_i,_,[e]),n.getSnapshot!==t||d||It!==null&&It.memoizedState.tag&is){if(s.flags|=2048,co(is|_i,{destroy:void 0},kb.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||(fn&127)!==0||Db(s,t,i)}return i}function Db(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ue.updateQueue,t===null?(t=mc(),Ue.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function kb(e,t,i,s){t.value=i,t.getSnapshot=s,Rb(t)&&Tb(e)}function Vb(e,t,i){return i(function(){Rb(t)&&(Ns(2,"updateSyncExternalStore()",e),Tb(e))})}function Rb(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!bi(e,i)}catch{return!0}}function Tb(e){var t=ai(e,2);t!==null&&Rt(t,e,2)}function ed(e){var t=di();if(typeof e=="function"){var i=e;if(e=i(),Hr){Ae(!0);try{i()}finally{Ae(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:e},t}function td(e){e=ed(e);var t=e.queue,i=Qb.bind(null,Ue,t);return t.dispatch=i,[e.memoizedState,i]}function id(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=bd.bind(null,Ue,!0,i),i.dispatch=t,[e,t]}function Mb(e,t){var i=mt();return Ob(i,gt,e,t)}function Ob(e,t,i,s){return e.baseState=i,Kh(e,gt,typeof s=="function"?s:cs)}function jb(e,t){var i=mt();return gt!==null?Ob(i,gt,e,t):(i.baseState=e,[e,i.queue.dispatch])}function Sy(e,t,i,s,n){if(Ec(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(d){r.listeners.push(d)}};de.T!==null?i(!0):r.isTransition=!1,s(r),i=t.pending,i===null?(r.next=t.pending=r,Lb(t,r)):(r.next=i.next,t.pending=i.next=r)}}function Lb(e,t){var i=t.action,s=t.payload,n=e.state;if(t.isTransition){var r=de.T,d={};d._updatedFibers=new Set,de.T=d;try{var _=i(n,s),D=de.S;D!==null&&D(d,_),Bb(e,t,_)}catch(M){sd(e,t,M)}finally{r!==null&&d.types!==null&&(r.types!==null&&r.types!==d.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=d.types),de.T=r,r===null&&d._updatedFibers&&(e=d._updatedFibers.size,d._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{d=i(n,s),Bb(e,t,d)}catch(M){sd(e,t,M)}}function Bb(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?(de.asyncTransitions++,i.then(Nc,Nc),i.then(function(s){Jb(e,t,s)},function(s){return sd(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.")):Jb(e,t,i)}function Jb(e,t,i){t.status="fulfilled",t.value=i,Hb(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Lb(e,i)))}function sd(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Hb(t),t=t.next;while(t!==s)}e.action=null}function Hb(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ub(e,t){return t}function lo(e,t){if(it){var i=_t.formState;if(i!==null){e:{var s=Ue;if(it){if(xt){t:{for(var n=xt,r=Zi;n.nodeType!==8;){if(!r){n=null;break t}if(n=ji(n.nextSibling),n===null){n=null;break t}}r=n.data,n=r===Lm||r===E0?n:null}if(n){xt=ji(n.nextSibling),s=n.data===Lm;break e}}xn(s)}s=!1}s&&(t=i[0])}}return i=di(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ub,lastRenderedState:t},i.queue=s,i=Qb.bind(null,Ue,s),s.dispatch=i,s=ed(!1),r=bd.bind(null,Ue,!1,s.queue),s=di(),n={state:t,dispatch:null,action:e,pending:null},s.queue=n,i=Sy.bind(null,Ue,n,r,i),n.dispatch=i,s.memoizedState=e,[t,i,!1]}function bc(e){var t=mt();return zb(t,gt,e)}function zb(e,t,i){if(t=Kh(e,t,Ub)[0],e=ao(cs)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ya(t)}catch(d){throw d===Uo?_u:d}else s=t;t=mt();var n=t.queue,r=n.dispatch;return i!==t.memoizedState&&(Ue.flags|=2048,co(is|_i,{destroy:void 0},Ny.bind(null,n,i),null)),[s,r,e]}function Ny(e,t){e.action=t}function vc(e){var t=mt(),i=gt;if(i!==null)return zb(t,i,e);mt(),t=t.memoizedState,i=mt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function co(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=mc(),Ue.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 nd(e){var t=di();return e={current:e},t.memoizedState=e}function Sr(e,t,i,s){var n=di();Ue.flags|=e,n.memoizedState=co(is|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;gt!==null&&s!==null&&Ph(s,gt.memoizedState.deps)?n.memoizedState=co(t,r,i,s):(Ue.flags|=e,n.memoizedState=co(is|t,r,i,s))}function gc(e,t){(Ue.mode&ds)!==He?Sr(276826112,_i,e,t):Sr(8390656,_i,e,t)}function Ey(e){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=mc(),Ue.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function rd(e){var t=di(),i={impl:e};return t.memoizedState=i,function(){if((lt&Xt)!==ti)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return i.impl.apply(void 0,arguments)}}function _c(e){var t=mt().memoizedState;return Ey({ref:t,nextImpl:e}),function(){if((lt&Xt)!==ti)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}function od(e,t){var i=4194308;return(Ue.mode&ds)!==He&&(i|=134217728),Sr(i,Ui,e,t)}function Ib(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 ad(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;(Ue.mode&ds)!==He&&(s|=134217728),Sr(s,Ui,Ib.bind(null,t,e),i)}function wc(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,Ui,Ib.bind(null,t,e),i)}function ld(e,t){return di().memoizedState=[e,t===void 0?null:t],e}function yc(e,t){var i=mt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Ph(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function cd(e,t){var i=di();t=t===void 0?null:t;var s=e();if(Hr){Ae(!0);try{e()}finally{Ae(!1)}}return i.memoizedState=[s,t],s}function Sc(e,t){var i=mt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Ph(t,s[1]))return s[0];if(s=e(),Hr){Ae(!0);try{e()}finally{Ae(!1)}}return i.memoizedState=[s,t],s}function ud(e,t){var i=di();return hd(i,e,t)}function $b(e,t){var i=mt();return Pb(i,gt.memoizedState,e,t)}function qb(e,t){var i=mt();return gt===null?hd(i,e,t):Pb(i,gt.memoizedState,e,t)}function hd(e,t,i){return i===void 0||(fn&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Wv(),Ue.lanes|=e,Kn|=e,i)}function Pb(e,t,i,s){return bi(i,t)?i:Io.current!==null?(e=hd(e,i,s),bi(e,t)||($t=!0),e):(fn&42)===0||(fn&1073741824)!==0&&(Qe&261930)===0?($t=!0,e.memoizedState=i):(e=Wv(),Ue.lanes|=e,Kn|=e,t)}function Nc(){de.asyncTransitions--}function Wb(e,t,i,s,n){var r=ft.p;ft.p=r!==0&&r<zs?r:zs;var d=de.T,_={};_._updatedFibers=new Set,de.T=_,bd(e,!1,t,i);try{var D=n(),M=de.S;if(M!==null&&M(_,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){de.asyncTransitions++,D.then(Nc,Nc);var K=_y(D,s);Na(e,t,K,Oi(e))}else Na(e,t,s,Oi(e))}catch(te){Na(e,t,{then:function(){},status:"rejected",reason:te},Oi(e))}finally{ft.p=r,d!==null&&_.types!==null&&(d.types!==null&&d.types!==_.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."),d.types=_.types),de.T=d,d===null&&_._updatedFibers&&(e=_._updatedFibers.size,_._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 dd(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=Fb(e).queue;vy(e),Wb(e,n,t,Xr,i===null?g:function(){return Gb(e),i(s)})}function Fb(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Xr,baseState:Xr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:Xr},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Gb(e){de.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var t=Fb(e);t.next===null&&(t=e.alternate.memoizedState),Na(e,t.next.queue,{},Oi(e))}function fd(){var e=ed(!1);return e=Wb.bind(null,Ue,e.queue,!0,!1),di().memoizedState=e,[!1,e]}function Yb(){var e=ao(cs)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:ya(e),t]}function Xb(){var e=Sa(cs)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:ya(e),t]}function Nr(){return At(Tl)}function md(){var e=di(),t=_t.identifierPrefix;if(it){var i=ln,s=an;i=(s&~(1<<32-fi(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Eu++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=rE++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t}function pd(){return di().memoizedState=xy.bind(null,Ue)}function xy(e,t){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=Oi(i),n=Dn(s),r=kn(i,n,s);r!==null&&(Ns(s,"refresh()",e),Rt(r,i,s),ga(r,i,s)),e=jh(),t!=null&&r!==null&&console.error("The seed argument is not enabled outside experimental channels."),n.payload={cache:e};return}i=i.return}}function Cy(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=Oi(e);var n={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};Ec(e)?Kb(t,n):(n=Nh(e,t,n,s),n!==null&&(Ns(s,"dispatch()",e),Rt(n,e,s),Zb(n,t,s)))}function Qb(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=Oi(e),Na(e,t,i,s)&&Ns(s,"setState()",e)}function Na(e,t,i,s){var n={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ec(e))Kb(t,n);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null)){var d=de.H;de.H=ms;try{var _=t.lastRenderedState,D=r(_,i);if(n.hasEagerState=!0,n.eagerState=D,bi(D,_))return Xl(e,t,n,0),_t===null&&Yl(),!1}catch{}finally{de.H=d}}if(i=Nh(e,t,n,s),i!==null)return Rt(i,e,s),Zb(i,t,s),!0}return!1}function bd(e,t,i,s){if(de.T===null&&Or===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:Wd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ec(e)){if(t)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else t=Nh(e,i,s,2),t!==null&&(Ns(2,"setOptimistic()",e),Rt(t,e,2))}function Ec(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Kb(e,t){Po=Nu=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Zb(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Mt(e,i)}}function vd(e){if(e!==null&&typeof e!="function"){var t=String(e);Xw.has(t)||(Xw.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function gd(e,t,i,s){var n=e.memoizedState,r=i(s,n);if(e.mode&ci){Ae(!0);try{r=i(s,n)}finally{Ae(!1)}}r===void 0&&(t=E(t)||"Component",Ww.has(t)||(Ww.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),n=r==null?n:tt({},n,r),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}function ev(e,t,i,s,n,r,d){var _=e.stateNode;if(typeof _.shouldComponentUpdate=="function"){if(i=_.shouldComponentUpdate(s,r,d),e.mode&ci){Ae(!0);try{i=_.shouldComponentUpdate(s,r,d)}finally{Ae(!1)}}return i===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",E(t)||"Component"),i}return t.prototype&&t.prototype.isPureReactComponent?!da(i,s)||!da(n,r):!0}function tv(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=V(e)||"Component",zw.has(e)||(zw.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),mm.enqueueReplaceState(t,t.state,null))}function Er(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=tt({},i));for(var n in e)i[n]===void 0&&(i[n]=e[n])}return i}function iv(e){Pf(e),console.warn(`%s
161
-
162
- %s
163
- `,Wo?"An error occurred in the <"+Wo+"> 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 sv(e){var t=Wo?"The above error occurred in the <"+Wo+"> 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, "+((pm||"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,T0+" "+e[0],M0,Yu+s+Yu,O0):e.splice(0,0,T0,M0,Yu+s+Yu,O0),e.unshift(console),s=CE.apply(console.error,e),s()}else console.error(`%o
170
-
171
- %s
172
-
173
- %s
174
- `,e,t,i)}function nv(e){Pf(e)}function xc(e,t){try{Wo=t.source?V(t.source):null,pm=null;var i=t.value;if(de.actQueue!==null)de.thrownErrors.push(i);else{var s=e.onUncaughtError;s(i,{componentStack:t.stack})}}catch(n){setTimeout(function(){throw n})}}function rv(e,t,i){try{Wo=i.source?V(i.source):null,pm=V(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 _d(e,t,i){return i=Dn(i),i.tag=lm,i.payload={element:null},i.callback=function(){ce(t.source,xc,e,t)},i}function wd(e){return e=Dn(e),e.tag=lm,e}function yd(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(){Kp(i),ce(s.source,rv,t,i,s)}}var d=i.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Kp(i),ce(s.source,rv,t,i,s),typeof n!="function"&&(er===null?er=new Set([this]):er.add(this)),tE(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.",V(i)||"Unknown")})}function Ay(e,t,i,s,n){if(i.flags|=32768,Us&&Ra(e,n),s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&ro(t,i,n,!0),it&&($s=!0),i=Hi.current,i!==null){switch(i.tag){case 31:case 13:return ts===null?Oc():i.alternate===null&&Vt===vn&&(Vt=Au),i.flags&=-257,i.flags|=65536,i.lanes=n,s===wu?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Id(e,s,n)),!1;case 22:return i.flags|=65536,s===wu?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)),Id(e,s,n)),!1}throw Error("Unexpected Suspense handler tag ("+i.tag+"). This is a bug in React.")}return Id(e,s,n),Oc(),!1}if(it)return $s=!0,t=Hi.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,s!==Qf&&fa(Vi(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!==Qf&&fa(Vi(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=Vi(s,i),n=_d(e.stateNode,s,n),hc(e,n),Vt!==Xn&&(Vt=Ur)),!1;var r=Vi(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(Nl===null?Nl=[r]:Nl.push(r),Vt!==Xn&&(Vt=Ur),t===null)return!0;s=Vi(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=n&-n,i.lanes|=e,e=_d(i.stateNode,s,e),hc(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"&&(er===null||!er.has(r))))return i.flags|=65536,n&=-n,i.lanes|=n,n=wd(n),yd(n,e,i,s),hc(i,n),!1}i=i.return}while(i!==null);return!1}function si(e,t,i,s){t.child=e===null?Vw(t,null,i,s):Jr(t,e.child,i,s)}function ov(e,t,i,s,n){i=i.render;var r=t.ref;if("ref"in s){var d={};for(var _ in s)_!=="ref"&&(d[_]=s[_])}else d=s;return _r(t),s=Wh(e,t,i,d,r,n),_=Gh(),e!==null&&!$t?(Yh(e,t,n),Zs(e,t,n)):(it&&_&&kh(t),t.flags|=1,si(e,t,s,n),t.child)}function av(e,t,i,s,n){if(e===null){var r=i.type;return typeof r=="function"&&!xh(r)&&r.defaultProps===void 0&&i.compare===null?(i=pr(r),t.tag=15,t.type=i,Nd(t,r),lv(e,t,i,s,n)):(e=Ch(i.type,null,s,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!kd(e,n)){var d=r.memoizedProps;if(i=i.compare,i=i!==null?i:da,i(d,s)&&e.ref===t.ref)return Zs(e,t,n)}return t.flags|=1,e=Ys(r,s),e.ref=t.ref,e.return=t,t.child=e}function lv(e,t,i,s,n){if(e!==null){var r=e.memoizedProps;if(da(r,s)&&e.ref===t.ref&&t.type===e.type)if($t=!1,t.pendingProps=s=r,kd(e,n))(e.flags&131072)!==0&&($t=!0);else return t.lanes=e.lanes,Zs(e,t,n)}return Sd(e,t,i,s,n)}function cv(e,t,i,s){var n=s.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:Ka,_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 uv(e,t,r,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&rc(t,r!==null?r.cachePool:null),r!==null?xb(t,r):Ih(t),Cb(t);else return s=t.lanes=536870912,uv(e,t,r!==null?r.baseLanes|i:i,i,s)}else r!==null?(rc(t,r.cachePool),xb(t,r),Rn(t),t.memoizedState=null):(e!==null&&rc(t,null),Ih(t),Rn(t));return si(e,t,n,i),t.child}function Ea(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:Ka,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uv(e,t,i,s,n){var r=Jh();return r=r===null?null:{parent:Ut._currentValue,pool:r},t.memoizedState={baseLanes:i,cachePool:r},e!==null&&rc(t,null),Ih(t),Cb(t),e!==null&&ro(e,t,s,!0),t.childLanes=n,null}function Cc(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=Dc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hv(e,t,i){return Jr(t,e.child,null,i),e=Cc(t,t.pendingProps),e.flags|=2,Mi(t),t.memoizedState=null,e}function Dy(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=Cc(t,s),t.lanes=536870912,Ea(null,e);if(qh(t),(e=xt)?(i=Lg(e,Zi),i=i!==null&&i.data===Wr?i:null,i!==null&&(s={dehydrated:i,treeContext:sb(),retryLane:536870912,hydrationErrors:null},t.memoizedState=s,s=tb(i),s.return=t,t.child=s,oi=t,xt=null)):i=null,i===null)throw Zl(t,e),xn(t);return t.lanes=536870912,null}return Cc(t,s)}var r=e.memoizedState;if(r!==null){var d=r.dehydrated;if(qh(t),n)if(t.flags&256)t.flags&=-257,t=hv(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(rb(),(i&536870912)!==0&&Mc(t),$t||ro(e,t,i,!1),n=(i&e.childLanes)!==0,$t||n){if(s=_t,s!==null&&(d=ht(s,i),d!==0&&d!==r.retryLane))throw r.retryLane=d,ai(e,d),Rt(s,e,d),bm;Oc(),t=hv(e,t,i)}else e=r.treeContext,xt=ji(d.nextSibling),oi=t,it=!0,qn=null,$s=!1,Ji=null,Zi=!1,e!==null&&nb(t,e),t=Cc(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&&Mc(t),e=Ys(r,s),e.ref=t.ref,t.child=e,e.return=t,e}function Ac(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 Sd(e,t,i,s,n){if(i.prototype&&typeof i.prototype.render=="function"){var r=E(i)||"Unknown";Qw[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),Qw[r]=!0)}return t.mode&ci&&fs.recordLegacyContextWarning(t,null),e===null&&(Nd(t,t.type),i.contextTypes&&(r=E(i)||"Unknown",Zw[r]||(Zw[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)))),_r(t),i=Wh(e,t,i,s,void 0,n),s=Gh(),e!==null&&!$t?(Yh(e,t,n),Zs(e,t,n)):(it&&s&&kh(t),t.flags|=1,si(e,t,i,n),t.child)}function dv(e,t,i,s,n,r){return _r(t),pn=-1,bl=e!==null&&e.type!==t.type,t.updateQueue=null,i=Fh(t,s,i,n),Ab(e,t),s=Gh(),e!==null&&!$t?(Yh(e,t,r),Zs(e,t,r)):(it&&s&&kh(t),t.flags|=1,si(e,t,i,r),t.child)}function fv(e,t,i,s,n){switch(I(t)){case!1:var r=t.stateNode,d=new t.type(t.memoizedProps,r.context).state;r.updater.enqueueSetState(r,d,null);break;case!0:t.flags|=128,t.flags|=65536,r=Error("Simulated error coming from DevTools");var _=n&-n;if(t.lanes|=_,d=_t,d===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");_=wd(_),yd(_,d,t,Vi(r,t)),hc(t,_)}if(_r(t),t.stateNode===null){if(d=$n,r=i.contextType,"contextType"in i&&r!==null&&(r===void 0||r.$$typeof!==Bs)&&!Yw.has(i)&&(Yw.add(i),_=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===vf?" 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",E(i)||"Component",_)),typeof r=="object"&&r!==null&&(d=At(r)),r=new i(s,d),t.mode&ci){Ae(!0);try{r=new i(s,d)}finally{Ae(!1)}}if(d=t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=mm,t.stateNode=r,r._reactInternals=t,r._reactInternalInstance=Uw,typeof i.getDerivedStateFromProps=="function"&&d===null&&(d=E(i)||"Component",Iw.has(d)||(Iw.add(d),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.",d,r.state===null?"null":"undefined",d))),typeof i.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"){var D=_=d=null;if(typeof r.componentWillMount=="function"&&r.componentWillMount.__suppressDeprecationWarning!==!0?d="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(d="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps.__suppressDeprecationWarning!==!0?_="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(_="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"&&r.componentWillUpdate.__suppressDeprecationWarning!==!0?D="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(D="UNSAFE_componentWillUpdate"),d!==null||_!==null||D!==null){r=E(i)||"Component";var M=typeof i.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";qw.has(r)||(qw.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,M,d!==null?`
182
- `+d:"",_!==null?`
183
- `+_:"",D!==null?`
184
- `+D:""))}}r=t.stateNode,d=E(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?",d):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",d)),!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?",d),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.",d),r.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",d),i.childContextTypes&&!Gw.has(i)&&(Gw.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)",d)),i.contextTypes&&!Fw.has(i)&&(Fw.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)",d)),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.",d),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.",E(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()?",d),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().",d),typeof r.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",d),typeof r.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",d),_=r.props!==s,r.props!==void 0&&_&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",d),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.",d,d),typeof r.getSnapshotBeforeUpdate!="function"||typeof r.componentDidUpdate=="function"||$w.has(i)||($w.add(i),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",E(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.",d),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.",d),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.",d),(_=r.state)&&(typeof _!="object"||Gt(_))&&console.error("%s.state: must be set to an object or null",d),typeof r.getChildContext=="function"&&typeof i.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",d),r=t.stateNode,r.props=s,r.state=t.memoizedState,r.refs={},Uh(t),d=i.contextType,r.context=typeof d=="object"&&d!==null?At(d):$n,r.state===s&&(d=E(i)||"Component",Pw.has(d)||(Pw.add(d),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.",d))),t.mode&ci&&fs.recordLegacyContextWarning(t,r),fs.recordUnsafeLifecycleWarnings(t,r),r.state=t.memoizedState,d=i.getDerivedStateFromProps,typeof d=="function"&&(gd(t,i,d,s),r.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(d=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),d!==r.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",V(t)||"Component"),mm.enqueueReplaceState(r,r.state,null)),wa(t,s,r,n),_a(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&ds)!==He&&(t.flags|=134217728),r=!0}else if(e===null){r=t.stateNode;var K=t.memoizedProps;_=Er(i,K),r.props=_;var te=r.context;D=i.contextType,d=$n,typeof D=="object"&&D!==null&&(d=At(D)),M=i.getDerivedStateFromProps,D=typeof M=="function"||typeof r.getSnapshotBeforeUpdate=="function",K=t.pendingProps!==K,D||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(K||te!==d)&&tv(t,r,s,d),Yn=!1;var F=t.memoizedState;r.state=F,wa(t,s,r,n),_a(),te=t.memoizedState,K||F!==te||Yn?(typeof M=="function"&&(gd(t,i,M,s),te=t.memoizedState),(_=Yn||ev(t,i,_,s,F,te,d))?(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&ds)!==He&&(t.flags|=134217728)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&ds)!==He&&(t.flags|=134217728),t.memoizedProps=s,t.memoizedState=te),r.props=s,r.state=te,r.context=d,r=_):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&ds)!==He&&(t.flags|=134217728),r=!1)}else{r=t.stateNode,zh(e,t),d=t.memoizedProps,D=Er(i,d),r.props=D,M=t.pendingProps,F=r.context,te=i.contextType,_=$n,typeof te=="object"&&te!==null&&(_=At(te)),K=i.getDerivedStateFromProps,(te=typeof K=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(d!==M||F!==_)&&tv(t,r,s,_),Yn=!1,F=t.memoizedState,r.state=F,wa(t,s,r,n),_a();var ae=t.memoizedState;d!==M||F!==ae||Yn||e!==null&&e.dependencies!==null&&tc(e.dependencies)?(typeof K=="function"&&(gd(t,i,K,s),ae=t.memoizedState),(D=Yn||ev(t,i,D,s,F,ae,_)||e!==null&&e.dependencies!==null&&tc(e.dependencies))?(te||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(s,ae,_),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(s,ae,_)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),r.props=s,r.state=ae,r.context=_,r=D):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),r=!1)}if(_=r,Ac(e,t),d=(t.flags&128)!==0,_||d){if(_=t.stateNode,ye(t),d&&typeof i.getDerivedStateFromError!="function")i=null,vi=-1;else if(i=bw(_),t.mode&ci){Ae(!0);try{bw(_)}finally{Ae(!1)}}t.flags|=1,e!==null&&d?(t.child=Jr(t,e.child,null,n),t.child=Jr(t,null,i,n)):si(e,t,i,n),t.memoizedState=_.state,e=t.child}else e=Zs(e,t,n);return n=t.stateNode,r&&n.props!==s&&(Fo||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",V(t)||"a component"),Fo=!0),e}function mv(e,t,i,s){return gr(),t.flags|=256,si(e,t,i,s),t.child}function Nd(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=E(t)||"Unknown",e0[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),e0[e]=!0)),typeof t.contextType=="object"&&t.contextType!==null&&(t=E(t)||"Unknown",Kw[t]||(console.error("%s: Function components do not support contextType.",t),Kw[t]=!0))}function Ed(e){return{baseLanes:e,cachePool:db()}}function xd(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Ai),e}function pv(e,t,i){var s,n=t.pendingProps;ee(t)&&(t.flags|=128);var r=!1,d=(t.flags&128)!==0;if((s=d)||(s=e!==null&&e.memoizedState===null?!1:(Bt.current&ml)!==0),s&&(r=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(it){if(r?Vn(t):Rn(t),(e=xt)?(i=Lg(e,Zi),i=i!==null&&i.data!==Wr?i:null,i!==null&&(s={dehydrated:i,treeContext:sb(),retryLane:536870912,hydrationErrors:null},t.memoizedState=s,s=tb(i),s.return=t,t.child=s,oi=t,xt=null)):i=null,i===null)throw Zl(t,e),xn(t);return rf(i)?t.lanes=32:t.lanes=536870912,null}var _=n.children;if(n=n.fallback,r){Rn(t);var D=t.mode;return _=Dc({mode:"hidden",children:_},D),n=br(n,D,i,null),_.return=t,n.return=t,_.sibling=n,t.child=_,n=t.child,n.memoizedState=Ed(i),n.childLanes=xd(e,s,i),t.memoizedState=vm,Ea(null,n)}return Vn(t),Cd(t,_)}var M=e.memoizedState;if(M!==null){var K=M.dehydrated;if(K!==null){if(d)t.flags&256?(Vn(t),t.flags&=-257,t=Ad(e,t,i)):t.memoizedState!==null?(Rn(t),t.child=e.child,t.flags|=128,t=null):(Rn(t),_=n.fallback,D=t.mode,n=Dc({mode:"visible",children:n.children},D),_=br(_,D,i,null),_.flags|=2,n.return=t,_.return=t,n.sibling=_,t.child=n,Jr(t,e.child,null,i),n=t.child,n.memoizedState=Ed(i),n.childLanes=xd(e,s,i),t.memoizedState=vm,t=Ea(null,n));else if(Vn(t),rb(),(i&536870912)!==0&&Mc(t),rf(K)){if(s=K.nextSibling&&K.nextSibling.dataset,s){_=s.dgst;var te=s.msg;D=s.stck;var F=s.cstck}r=te,s=_,n=D,K=F,_=r,D=K,_=Error(_||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),_.stack=n||"",_.digest=s,s=D===void 0?null:D,n={value:_,source:null,stack:s},typeof s=="string"&&Xf.set(_,n),fa(n),t=Ad(e,t,i)}else if($t||ro(e,t,i,!1),s=(i&e.childLanes)!==0,$t||s){if(s=_t,s!==null&&(n=ht(s,i),n!==0&&n!==M.retryLane))throw M.retryLane=n,ai(e,n),Rt(s,e,n),bm;nf(K)||Oc(),t=Ad(e,t,i)}else nf(K)?(t.flags|=192,t.child=e.child,t=null):(e=M.treeContext,xt=ji(K.nextSibling),oi=t,it=!0,qn=null,$s=!1,Ji=null,Zi=!1,e!==null&&nb(t,e),t=Cd(t,n.children),t.flags|=4096);return t}}return r?(Rn(t),_=n.fallback,D=t.mode,F=e.child,K=F.sibling,n=Ys(F,{mode:"hidden",children:n.children}),n.subtreeFlags=F.subtreeFlags&65011712,K!==null?_=Ys(K,_):(_=br(_,D,i,null),_.flags|=2),_.return=t,n.return=t,n.sibling=_,t.child=n,Ea(null,n),n=t.child,_=e.child.memoizedState,_===null?_=Ed(i):(D=_.cachePool,D!==null?(F=Ut._currentValue,D=D.parent!==F?{parent:F,pool:F}:D):D=db(),_={baseLanes:_.baseLanes|i,cachePool:D}),n.memoizedState=_,n.childLanes=xd(e,s,i),t.memoizedState=vm,Ea(e.child,n)):(M!==null&&(i&62914560)===i&&(i&e.lanes)!==0&&Mc(t),Vn(t),i=e.child,e=i.sibling,i=Ys(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 Cd(e,t){return t=Dc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Dc(e,t){return e=m(22,e,null,t),e.lanes=0,e}function Ad(e,t,i){return Jr(t,e.child,null,i),e=Cd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bv(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Mh(e.return,t,i)}function Dd(e,t,i,s,n,r){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:n,treeForkCount:r}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=s,d.tail=i,d.tailMode=n,d.treeForkCount=r)}function vv(e,t,i){var s=t.pendingProps,n=s.revealOrder,r=s.tail,d=s.children,_=Bt.current;if((s=(_&ml)!==0)?(_=_&$o|ml,t.flags|=128):_&=$o,H(Bt,_,t),_=n??"null",n!=="forwards"&&n!=="unstable_legacy-backwards"&&n!=="together"&&n!=="independent"&&!t0[_])if(t0[_]=!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);_=r??"null",Cu[_]||(r==null?(n==="forwards"||n==="backwards"||n==="unstable_legacy-backwards")&&(Cu[_]=!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"?(Cu[_]=!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"&&(Cu[_]=!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")&&d!==void 0&&d!==null&&d!==!1)if(Gt(d)){for(_=0;_<d.length;_++)if(!Sb(d[_],_))break e}else if(_=k(d),typeof _=="function"){if(_=_.call(d))for(var D=_.next(),M=0;!D.done;D=_.next()){if(!Sb(D.value,M))break e;M++}}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,d,i),it?(En(),d=Za):d=0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bv(e,i,t);else if(e.tag===19)bv(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&&dc(e)===null&&(n=i),i=i.sibling;i=n,i===null?(n=t.child,t.child=null):(n=i.sibling,i.sibling=null),Dd(t,!1,n,i,r,d);break;case"backwards":case"unstable_legacy-backwards":for(i=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&dc(e)===null){t.child=n;break}e=n.sibling,n.sibling=i,i=n,n=e}Dd(t,!0,i,null,r,d);break;case"together":Dd(t,!1,null,null,void 0,d);break;default:t.memoizedState=null}return t.child}function Zs(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),vi=-1,Kn|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ro(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=Ys(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Ys(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function kd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&tc(e)))}function ky(e,t,i){switch(t.tag){case 3:ne(t,t.stateNode.containerInfo),Cn(t,Ut,e.memoizedState.cache),gr();break;case 27:case 5:oe(t);break;case 4:ne(t,t.stateNode.containerInfo);break;case 10:Cn(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,qh(t),null;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(Vn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?pv(e,t,i):(Vn(t),e=Zs(e,t,i),e!==null?e.sibling:null);Vn(t);break;case 19:var n=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(ro(e,t,i,!1),s=(i&t.childLanes)!==0),n){if(s)return vv(e,t,i);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),H(Bt,Bt.current,t),s)break;return null;case 22:return t.lanes=0,cv(e,t,i,t.pendingProps);case 24:Cn(t,Ut,e.memoizedState.cache)}return Zs(e,t,i)}function Vd(e,t,i){if(t._debugNeedsRemount&&e!==null){i=Ch(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)$t=!0;else{if(!kd(e,i)&&(t.flags&128)===0)return $t=!1,ky(e,t,i);$t=(e.flags&131072)!==0}else $t=!1,(s=it)&&(En(),s=(t.flags&1048576)!==0),s&&(s=t.index,En(),ib(t,Za,s));switch(t.lanes=0,t.tag){case 16:e:if(s=t.pendingProps,e=An(t.elementType),t.type=e,typeof e=="function")xh(e)?(s=Er(e,s),t.tag=1,t.type=e=pr(e),t=fv(null,t,e,s,i)):(t.tag=0,Nd(t,e),t.type=e=pr(e),t=Sd(null,t,e,s,i));else{if(e!=null){if(n=e.$$typeof,n===Ua){t.tag=11,t.type=e=Eh(e),t=ov(null,t,e,s,i);break e}else if(n===Gc){t.tag=14,t=av(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=E(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 Sd(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,n=Er(s,t.pendingProps),fv(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,zh(e,t),wa(t,s,null,i);var d=t.memoizedState;if(s=d.cache,Cn(t,Ut,s),s!==r.cache&&Oh(t,[Ut],i,!0),_a(),s=d.element,r.isDehydrated)if(r={element:s,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=mv(e,t,s,i);break e}else if(s!==n){n=Vi(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t),fa(n),t=mv(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=ji(e.firstChild),oi=t,it=!0,qn=null,$s=!1,Ji=null,Zi=!0,i=Vw(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(gr(),s===n){t=Zs(e,t,i);break e}si(e,t,s,i)}t=t.child}return t;case 26:return Ac(e,t),e===null?(i=Ig(t.type,null,t.pendingProps,null))?t.memoizedState=i:it||(i=t.type,e=t.pendingProps,s=X(Bn.current),s=Jc(s).createElement(i),s[ri]=t,s[mi]=e,ni(s,i,e),Te(s),t.stateNode=s):t.memoizedState=Ig(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return oe(t),e===null&&it&&(s=X(Bn.current),n=re(),s=t.stateNode=Ug(t.type,t.pendingProps,s,n,!1),$s||(n=Dg(s,t.type,t.pendingProps,n),n!==null&&(vr(t,0).serverProps=n)),oi=t,Zi=!0,n=xt,jn(t.type)?(Um=n,xt=ji(s.firstChild)):xt=n),si(e,t,t.pendingProps.children,i),Ac(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&it&&(r=re(),s=ph(t.type,r.ancestorInfo),n=xt,(d=!n)||(d=vS(n,t.type,t.pendingProps,Zi),d!==null?(t.stateNode=d,$s||(r=Dg(d,t.type,t.pendingProps,r),r!==null&&(vr(t,0).serverProps=r)),oi=t,xt=ji(d.firstChild),Zi=!1,r=!0):r=!1,d=!r),d&&(s&&Zl(t,n),xn(t))),oe(t),n=t.type,r=t.pendingProps,d=e!==null?e.memoizedProps:null,s=r.children,tf(n,r)?s=null:d!==null&&tf(n,d)&&(t.flags|=32),t.memoizedState!==null&&(n=Wh(e,t,yy,null,null,i),Tl._currentValue=n),Ac(e,t),si(e,t,s,i),t.child;case 6:return e===null&&it&&(i=t.pendingProps,e=re(),s=e.ancestorInfo.current,i=s!=null?$l(i,s.tag,e.ancestorInfo.implicitRootScope):!0,e=xt,(s=!e)||(s=gS(e,t.pendingProps,Zi),s!==null?(t.stateNode=s,oi=t,xt=null,s=!0):s=!1,s=!s),s&&(i&&Zl(t,e),xn(t))),null;case 13:return pv(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 ov(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||i0||(i0=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Cn(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."),_r(t),n=At(n),s=nm(s,n,void 0),t.flags|=1,si(e,t,s,i),t.child;case 14:return av(e,t,t.type,t.pendingProps,i);case 15:return lv(e,t,t.type,t.pendingProps,i);case 19:return vv(e,t,i);case 31:return Dy(e,t,i);case 22:return cv(e,t,i,t.pendingProps);case 24:return _r(t),s=At(Ut),e===null?(n=Jh(),n===null&&(n=_t,r=jh(),n.pooledCache=r,wr(r),r!==null&&(n.pooledCacheLanes|=i),n=r),t.memoizedState={parent:s,cache:n},Uh(t),Cn(t,Ut,n)):((e.lanes&i)!==0&&(zh(e,t),wa(t,null,null,i),_a()),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),Cn(t,Ut,s)):(s=r.cache,Cn(t,Ut,s),s!==n.cache&&Oh(t,[Ut],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 en(e){e.flags|=4}function Rd(e,t,i,s,n){if((t=(e.mode&XN)!==He)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Xv())e.flags|=8192;else throw Br=wu,om}else e.flags&=-16777217}function gv(e,t){if(t.type!=="stylesheet"||(t.state.loading&ns)!==Yr)e.flags&=-16777217;else if(e.flags|=16777216,!Fg(t))if(Xv())e.flags|=8192;else throw Br=wu,om}function kc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ge():536870912,e.lanes|=t,$r|=t)}function xa(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&Ye)!==He){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&Ye)!==He){n=e.actualDuration,r=e.selfBaseDuration;for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,n+=d.actualDuration,r+=d.treeBaseDuration,d=d.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 Vy(e,t,i){var s=t.pendingProps;switch(Vh(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(Ut,t),ie(t),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(no(t)?(Th(),en(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Rh())),yt(t),null;case 26:var n=t.type,r=t.memoizedState;return e===null?(en(t),r!==null?(yt(t),gv(t,r)):(yt(t),Rd(t,n,null,s,i))):r?r!==e.memoizedState?(en(t),yt(t),gv(t,r)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&en(t),yt(t),Rd(t,n,e,s,i)),null;case 27:if(T(t),i=X(Bn.current),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&en(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=re(),no(t)?ob(t):(e=Ug(n,s,i,e,!0),t.stateNode=e,en(t))}return yt(t),null;case 5:if(T(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&en(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 d=re();if(no(t))ob(t);else{switch(r=X(Bn.current),ph(n,d.ancestorInfo),d=d.context,r=Jc(r),d){case ta:r=r.createElementNS(xo,n);break;case Wu:r=r.createElementNS(tu,n);break;default:switch(n){case"svg":r=r.createElementNS(xo,n);break;case"math":r=r.createElementNS(tu,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]"||hs.call(C0,n)||(C0[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(d=t.child;d!==null;){if(d.tag===5||d.tag===6)r.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.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&&en(t)}}return yt(t),Rd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&en(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=X(Bn.current),i=re(),no(t)){if(e=t.stateNode,i=t.memoizedProps,n=!$s,s=null,r=oi,r!==null)switch(r.tag){case 3:n&&(n=Jg(e,i,s),n!==null&&(vr(t,0).serverProps=n));break;case 27:case 5:s=r.memoizedProps,n&&(n=Jg(e,i,s),n!==null&&(vr(t,0).serverProps=n))}e[ri]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Ng(e.nodeValue,i)),e||xn(t,!0)}else n=i.ancestorInfo.current,n!=null&&$l(s,n.tag,i.ancestorInfo.implicitRootScope),e=Jc(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=no(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&Ye)!==He&&i!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else Th(),gr(),(t.flags&128)===0&&(i=t.memoizedState=null),t.flags|=4,yt(t),(t.mode&Ye)!==He&&i!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else i=Rh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Mi(t),t):(Mi(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=no(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&Ye)!==He&&n!==null&&(n=t.child,n!==null&&(t.treeBaseDuration-=n.treeBaseDuration))}else Th(),gr(),(t.flags&128)===0&&(n=t.memoizedState=null),t.flags|=4,yt(t),(t.mode&Ye)!==He&&n!==null&&(n=t.child,n!==null&&(t.treeBaseDuration-=n.treeBaseDuration));n=!1}else n=Rh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Mi(t),t):(Mi(t),null)}return Mi(t),(t.flags&128)!==0?(t.lanes=i,(t.mode&Ye)!==He&&ba(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),kc(t,t.updateQueue),yt(t),(t.mode&Ye)!==He&&i&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return ie(t),e===null&&Gd(t.stateNode.containerInfo),yt(t),null;case 10:return Qs(t.type,t),yt(t),null;case 19:if($(Bt,t),s=t.memoizedState,s===null)return yt(t),null;if(n=(t.flags&128)!==0,r=s.rendering,r===null)if(n)xa(s,!1);else{if(Vt!==vn||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=dc(e),r!==null){for(t.flags|=128,xa(s,!1),e=r.updateQueue,t.updateQueue=e,kc(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)eb(i,e),i=i.sibling;return H(Bt,Bt.current&$o|ml,t),it&&Xs(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Kt()>Mu&&(t.flags|=128,n=!0,xa(s,!1),t.lanes=4194304)}else{if(!n)if(e=dc(r),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,kc(t,e),xa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!r.alternate&&!it)return yt(t),null}else 2*Kt()-s.renderingStartTime>Mu&&i!==536870912&&(t.flags|=128,n=!0,xa(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=Kt(),e.sibling=null,i=Bt.current,i=n?i&$o|ml:i&$o,H(Bt,i,t),it&&Xs(t,s.treeForkCount),e):(yt(t),null);case 22:case 23:return Mi(t),$h(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&&kc(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&&$(jr,t),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Qs(Ut,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 Ry(e,t){switch(Vh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ye)!==He&&ba(t),t):null;case 3:return Qs(Ut,t),ie(t),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return T(t),null;case 31:if(t.memoizedState!==null){if(Mi(t),t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");gr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ye)!==He&&ba(t),t):null;case 13:if(Mi(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.");gr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ye)!==He&&ba(t),t):null;case 19:return $(Bt,t),null;case 4:return ie(t),null;case 10:return Qs(t.type,t),null;case 22:case 23:return Mi(t),$h(t),e!==null&&$(jr,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ye)!==He&&ba(t),t):null;case 24:return Qs(Ut,t),null;case 25:return null;default:return null}}function _v(e,t){switch(Vh(t),t.tag){case 3:Qs(Ut,t),ie(t);break;case 26:case 27:case 5:T(t);break;case 4:ie(t);break;case 31:t.memoizedState!==null&&Mi(t);break;case 13:Mi(t);break;case 19:$(Bt,t);break;case 10:Qs(t.type,t);break;case 22:case 23:Mi(t),$h(t),e!==null&&$(jr,t);break;case 24:Qs(Ut,t)}}function Vs(e){return(e.mode&Ye)!==He}function wv(e,t){Vs(e)?(ks(),Ca(t,e),Ds()):Ca(t,e)}function Td(e,t,i){Vs(e)?(ks(),uo(i,e,t),Ds()):uo(i,e,t)}function Ca(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&gi)!==Su&&(Ko=!0),s=ce(t,iE,i),(e&gi)!==Su&&(Ko=!1),s!==void 0&&typeof s!="function")){var r=void 0;r=(i.tag&Ui)!==0?"useLayoutEffect":(i.tag&gi)!==0?"useInsertionEffect":"useEffect";var d=void 0;d=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,ce(t,function(_,D){console.error("%s must not return anything besides a function, which is used for clean-up.%s",_,D)},r,d)}i=i.next}while(i!==n)}}catch(_){dt(t,t.return,_)}}function uo(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 d=s.inst,_=d.destroy;_!==void 0&&(d.destroy=void 0,(e&gi)!==Su&&(Ko=!0),n=t,ce(n,sE,n,i,_),(e&gi)!==Su&&(Ko=!1))}s=s.next}while(s!==r)}}catch(D){dt(t,t.return,D)}}function yv(e,t){Vs(e)?(ks(),Ca(t,e),Ds()):Ca(t,e)}function Md(e,t,i){Vs(e)?(ks(),uo(i,e,t),Ds()):uo(i,e,t)}function Sv(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||Fo||(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.",V(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.",V(e)||"instance"));try{ce(e,Eb,t,i)}catch(s){dt(e,e.return,s)}}}function Ty(e,t,i){return e.getSnapshotBeforeUpdate(t,i)}function My(e,t){var i=t.memoizedProps,s=t.memoizedState;t=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||Fo||(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.",V(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.",V(e)||"instance"));try{var n=Er(e.type,i),r=ce(e,Ty,t,n,s);i=s0,r!==void 0||i.has(e.type)||(i.add(e.type),ce(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",V(e))})),t.__reactInternalSnapshotBeforeUpdate=r}catch(d){dt(e,e.return,d)}}function Nv(e,t,i){i.props=Er(e.type,e.memoizedProps),i.state=e.memoizedState,Vs(e)?(ks(),ce(e,Sw,e,t,i),Ds()):ce(e,Sw,e,t,i)}function Oy(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(Vs(e))try{ks(),e.refCleanup=t(i)}finally{Ds()}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().",V(e)),t.current=i}}function Aa(e,t){try{ce(e,Oy,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(Vs(e))try{ks(),ce(e,s)}finally{Ds(e)}else ce(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(Vs(e))try{ks(),ce(e,i,null)}finally{Ds(e)}else ce(e,i,null)}catch(n){dt(e,t,n)}else i.current=null}function Ev(e,t,i,s){var n=e.memoizedProps,r=n.id,d=n.onCommit;n=n.onRender,t=t===null?"mount":"update",bu&&(t="nested-update"),typeof n=="function"&&n(r,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,i),typeof d=="function"&&d(r,t,s,i)}function jy(e,t,i,s){var n=e.memoizedProps;e=n.id,n=n.onPostCommit,t=t===null?"mount":"update",bu&&(t="nested-update"),typeof n=="function"&&n(e,t,s,i)}function xv(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{ce(e,rS,s,t,i,e)}catch(n){dt(e,e.return,n)}}function Od(e,t,i){try{ce(e,aS,e.stateNode,e.type,i,t,e)}catch(s){dt(e,e.return,s)}}function Cv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&jn(e.type)||e.tag===4}function jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cv(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&&jn(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 Ld(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(Mg(i),(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t)):(Mg(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=Gs));else if(s!==4&&(s===27&&jn(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Ld(e,t,i),e=e.sibling;e!==null;)Ld(e,t,i),e=e.sibling}function Vc(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&&jn(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Vc(e,t,i),e=e.sibling;e!==null;)Vc(e,t,i),e=e.sibling}function Ly(e){for(var t,i=e.return;i!==null;){if(Cv(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=jd(e),Vc(e,i,t);break;case 5:i=t.stateNode,t.flags&32&&(Tg(i),t.flags&=-33),t=jd(e),Vc(e,t,i);break;case 3:case 4:t=t.stateNode.containerInfo,i=jd(e),Ld(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 Av(e){var t=e.stateNode,i=e.memoizedProps;try{ce(e,NS,e.type,i,t,e)}catch(s){dt(e,e.return,s)}}function Dv(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 By(e,t){if(e=e.containerInfo,Bm=Xu,e=qp(e),gh(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 d=0,_=-1,D=-1,M=0,K=0,te=e,F=null;t:for(;;){for(var ae;te!==i||n!==0&&te.nodeType!==3||(_=d+n),te!==r||s!==0&&te.nodeType!==3||(D=d+s),te.nodeType===3&&(d+=te.nodeValue.length),(ae=te.firstChild)!==null;)F=te,te=ae;for(;;){if(te===e)break t;if(F===i&&++M===n&&(_=d),F===r&&++K===s&&(D=d),(ae=te.nextSibling)!==null)break;te=F,F=te.parentNode}te=ae}i=_===-1||D===-1?null:{start:_,end:D}}else i=null}i=i||{start:0,end:0}}else i=null;for(Jm={focusedElem:e,selectionRange:i},Xu=!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&&My(e,i);break;case 3:if((n&1024)!==0){if(e=e.stateNode.containerInfo,i=e.nodeType,i===9)sf(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":sf(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 kv(e,t,i){var s=Ri(),n=Es(),r=Cs(),d=As(),_=i.flags;switch(i.tag){case 0:case 11:case 15:Ts(e,i),_&4&&wv(i,Ui|is);break;case 1:if(Ts(e,i),_&4)if(e=i.stateNode,t===null)i.type.defaultProps||"ref"in i.memoizedProps||Fo||(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.",V(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.",V(i)||"instance")),Vs(i)?(ks(),ce(i,rm,i,e),Ds()):ce(i,rm,i,e);else{var D=Er(i.type,t.memoizedProps);t=t.memoizedState,i.type.defaultProps||"ref"in i.memoizedProps||Fo||(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.",V(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.",V(i)||"instance")),Vs(i)?(ks(),ce(i,_w,i,e,D,t,e.__reactInternalSnapshotBeforeUpdate),Ds()):ce(i,_w,i,e,D,t,e.__reactInternalSnapshotBeforeUpdate)}_&64&&Sv(i),_&512&&Aa(i,i.return);break;case 3:if(t=Ks(),Ts(e,i),_&64&&(_=i.updateQueue,_!==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{ce(i,Eb,_,D)}catch(K){dt(i,i.return,K)}}e.effectDuration+=sc(t);break;case 27:t===null&&_&4&&Av(i);case 26:case 5:if(Ts(e,i),t===null){if(_&4)xv(i);else if(_&64){e=i.type,t=i.memoizedProps,D=i.stateNode;try{ce(i,oS,D,e,t,i)}catch(K){dt(i,i.return,K)}}}_&512&&Aa(i,i.return);break;case 12:if(_&4){_=Ks(),Ts(e,i),e=i.stateNode,e.effectDuration+=pa(_);try{ce(i,Ev,i,t,Pn,e.effectDuration)}catch(K){dt(i,i.return,K)}}else Ts(e,i);break;case 31:Ts(e,i),_&4&&Tv(e,i);break;case 13:Ts(e,i),_&4&&Mv(e,i),_&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(_=Wy.bind(null,i),_S(e,_))));break;case 22:if(_=i.memoizedState!==null||bn,!_){t=t!==null&&t.memoizedState!==null||qt,D=bn;var M=qt;bn=_,(qt=t)&&!M?(Ms(e,i,(i.subtreeFlags&8772)!==0),(i.mode&Ye)!==He&&0<=Oe&&0<=Be&&.05<Be-Oe&&Fl(i,Oe,Be)):Ts(e,i),bn=D,qt=M}break;case 30:break;default:Ts(e,i)}(i.mode&Ye)!==He&&0<=Oe&&0<=Be&&((Tt||.05<kt)&&Ss(i,Oe,Be,kt,Dt),i.alternate===null&&i.return!==null&&i.return.alternate!==null&&.05<Be-Oe&&(Dv(i.return.alternate,i.return)||ys(i,Oe,Be,"Mount"))),Ti(s),xs(n),Dt=r,Tt=d}function Vv(e){var t=e.alternate;t!==null&&(e.alternate=null,Vv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&se(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 tn(e,t,i){for(i=i.child;i!==null;)Rv(e,t,i),i=i.sibling}function Rv(e,t,i){if(li&&typeof li.onCommitFiberUnmount=="function")try{li.onCommitFiberUnmount(No,i)}catch(M){Hs||(Hs=!0,console.error("React instrumentation encountered an error: %o",M))}var s=Ri(),n=Es(),r=Cs(),d=As();switch(i.tag){case 26:qt||Rs(i,t),tn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(e=i.stateNode,e.parentNode.removeChild(e));break;case 27:qt||Rs(i,t);var _=Pt,D=xi;jn(i.type)&&(Pt=i.stateNode,xi=!1),tn(e,t,i),ce(i,La,i.stateNode),Pt=_,xi=D;break;case 5:qt||Rs(i,t);case 6:if(_=Pt,D=xi,Pt=null,tn(e,t,i),Pt=_,xi=D,Pt!==null)if(xi)try{ce(i,uS,Pt,i.stateNode)}catch(M){dt(i,t,M)}else try{ce(i,cS,Pt,i.stateNode)}catch(M){dt(i,t,M)}break;case 18:Pt!==null&&(xi?(e=Pt,Og(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),_o(e)):Og(Pt,i.stateNode));break;case 4:_=Pt,D=xi,Pt=i.stateNode.containerInfo,xi=!0,tn(e,t,i),Pt=_,xi=D;break;case 0:case 11:case 14:case 15:uo(gi,i,t),qt||Td(i,t,Ui),tn(e,t,i);break;case 1:qt||(Rs(i,t),_=i.stateNode,typeof _.componentWillUnmount=="function"&&Nv(i,t,_)),tn(e,t,i);break;case 21:tn(e,t,i);break;case 22:qt=(_=qt)||i.memoizedState!==null,tn(e,t,i),qt=_;break;default:tn(e,t,i)}(i.mode&Ye)!==He&&0<=Oe&&0<=Be&&(Tt||.05<kt)&&Ss(i,Oe,Be,kt,Dt),Ti(s),xs(n),Dt=r,Tt=d}function Tv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ce(t,yS,e)}catch(i){dt(t,t.return,i)}}}function Mv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ce(t,SS,e)}catch(i){dt(t,t.return,i)}}function Jy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new n0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new n0),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function Rc(e,t){var i=Jy(e);t.forEach(function(s){if(!i.has(s)){if(i.add(s),Us)if(Go!==null&&Yo!==null)Ra(Yo,Go);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var n=Fy.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,d=i[s],_=Ri(),D=r;e:for(;D!==null;){switch(D.tag){case 27:if(jn(D.type)){Pt=D.stateNode,xi=!1;break e}break;case 5:Pt=D.stateNode,xi=!1;break e;case 3:case 4:Pt=D.stateNode.containerInfo,xi=!0;break e}D=D.return}if(Pt===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Rv(n,r,d),Pt=null,xi=!1,(d.mode&Ye)!==He&&0<=Oe&&0<=Be&&.05<Be-Oe&&ys(d,Oe,Be,"Unmount"),Ti(_),n=d,r=n.alternate,r!==null&&(r.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ov(t,e),t=t.sibling}function Ov(e,t){var i=Ri(),s=Es(),n=Cs(),r=As(),d=e.alternate,_=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ni(t,e),Ei(e),_&4&&(uo(gi|is,e,e.return),Ca(gi|is,e),Td(e,e.return,Ui|is));break;case 1:if(Ni(t,e),Ei(e),_&512&&(qt||d===null||Rs(d,d.return)),_&64&&bn&&(_=e.updateQueue,_!==null&&(d=_.callbacks,d!==null))){var D=_.shared.hiddenCallbacks;_.shared.hiddenCallbacks=D===null?d:D.concat(d)}break;case 26:if(D=ps,Ni(t,e),Ei(e),_&512&&(qt||d===null||Rs(d,d.return)),_&4){var M=d!==null?d.memoizedState:null;if(_=e.memoizedState,d===null)if(_===null)if(e.stateNode===null){e:{_=e.type,d=e.memoizedProps,D=D.ownerDocument||D;t:switch(_){case"title":M=D.getElementsByTagName("title")[0],(!M||M[$a]||M[ri]||M.namespaceURI===xo||M.hasAttribute("itemprop"))&&(M=D.createElement(_),D.head.insertBefore(M,D.querySelector("head > title"))),ni(M,_,d),M[ri]=e,Te(M),_=M;break e;case"link":var K=Pg("link","href",D).get(_+(d.href||""));if(K){for(var te=0;te<K.length;te++)if(M=K[te],M.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&M.getAttribute("rel")===(d.rel==null?null:d.rel)&&M.getAttribute("title")===(d.title==null?null:d.title)&&M.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){K.splice(te,1);break t}}M=D.createElement(_),ni(M,_,d),D.head.appendChild(M);break;case"meta":if(K=Pg("meta","content",D).get(_+(d.content||""))){for(te=0;te<K.length;te++)if(M=K[te],je(d.content,"content"),M.getAttribute("content")===(d.content==null?null:""+d.content)&&M.getAttribute("name")===(d.name==null?null:d.name)&&M.getAttribute("property")===(d.property==null?null:d.property)&&M.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&M.getAttribute("charset")===(d.charSet==null?null:d.charSet)){K.splice(te,1);break t}}M=D.createElement(_),ni(M,_,d),D.head.appendChild(M);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+_+'". This is a bug in React.')}M[ri]=e,Te(M),_=M}e.stateNode=_}else Wg(D,e.type,e.stateNode);else e.stateNode=qg(D,_,e.memoizedProps);else M!==_?(M===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):M.count--,_===null?Wg(D,e.type,e.stateNode):qg(D,_,e.memoizedProps)):_===null&&e.stateNode!==null&&Od(e,e.memoizedProps,d.memoizedProps)}break;case 27:Ni(t,e),Ei(e),_&512&&(qt||d===null||Rs(d,d.return)),d!==null&&_&4&&Od(e,e.memoizedProps,d.memoizedProps);break;case 5:if(Ni(t,e),Ei(e),_&512&&(qt||d===null||Rs(d,d.return)),e.flags&32){D=e.stateNode;try{ce(e,Tg,D)}catch(Ce){dt(e,e.return,Ce)}}_&4&&e.stateNode!=null&&(D=e.memoizedProps,Od(e,D,d!==null?d.memoizedProps:D)),_&1024&&(gm=!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),_&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.");_=e.memoizedProps,d=d!==null?d.memoizedProps:_,D=e.stateNode;try{ce(e,lS,D,d,_)}catch(Ce){dt(e,e.return,Ce)}}break;case 3:if(D=Ks(),Fu=null,M=ps,ps=Hc(t.containerInfo),Ni(t,e),ps=M,Ei(e),_&4&&d!==null&&d.memoizedState.isDehydrated)try{ce(e,wS,t.containerInfo)}catch(Ce){dt(e,e.return,Ce)}gm&&(gm=!1,jv(e)),t.effectDuration+=sc(D);break;case 4:_=ps,ps=Hc(e.stateNode.containerInfo),Ni(t,e),Ei(e),ps=_;break;case 12:_=Ks(),Ni(t,e),Ei(e),e.stateNode.effectDuration+=pa(_);break;case 31:Ni(t,e),Ei(e),_&4&&(_=e.updateQueue,_!==null&&(e.updateQueue=null,Rc(e,_)));break;case 13:Ni(t,e),Ei(e),e.child.flags&8192&&e.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Tu=Kt()),_&4&&(_=e.updateQueue,_!==null&&(e.updateQueue=null,Rc(e,_)));break;case 22:D=e.memoizedState!==null;var F=d!==null&&d.memoizedState!==null,ae=bn,Ne=qt;if(bn=ae||D,qt=Ne||F,Ni(t,e),qt=Ne,bn=ae,F&&!D&&!ae&&!Ne&&(e.mode&Ye)!==He&&0<=Oe&&0<=Be&&.05<Be-Oe&&Fl(e,Oe,Be),Ei(e),_&8192)e:for(t=e.stateNode,t._visibility=D?t._visibility&~Ka:t._visibility|Ka,!D||d===null||F||bn||qt||(xr(e),(e.mode&Ye)!==He&&0<=Oe&&0<=Be&&.05<Be-Oe&&ys(e,Oe,Be,"Disconnect")),d=null,t=e;;){if(t.tag===5||t.tag===26){if(d===null){F=d=t;try{M=F.stateNode,D?ce(F,dS,M):ce(F,pS,F.stateNode,F.memoizedProps)}catch(Ce){dt(F,F.return,Ce)}}}else if(t.tag===6){if(d===null){F=t;try{K=F.stateNode,D?ce(F,fS,K):ce(F,bS,K,F.memoizedProps)}catch(Ce){dt(F,F.return,Ce)}}}else if(t.tag===18){if(d===null){F=t;try{te=F.stateNode,D?ce(F,hS,te):ce(F,mS,F.stateNode)}catch(Ce){dt(F,F.return,Ce)}}}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;d===t&&(d=null),t=t.return}d===t&&(d=null),t.sibling.return=t.return,t=t.sibling}_&4&&(_=e.updateQueue,_!==null&&(d=_.retryQueue,d!==null&&(_.retryQueue=null,Rc(e,d))));break;case 19:Ni(t,e),Ei(e),_&4&&(_=e.updateQueue,_!==null&&(e.updateQueue=null,Rc(e,_)));break;case 30:break;case 21:break;default:Ni(t,e),Ei(e)}(e.mode&Ye)!==He&&0<=Oe&&0<=Be&&((Tt||.05<kt)&&Ss(e,Oe,Be,kt,Dt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<Be-Oe&&(Dv(e.return.alternate,e.return)||ys(e,Oe,Be,"Mount"))),Ti(i),xs(s),Dt=n,Tt=r}function Ei(e){var t=e.flags;if(t&2){try{ce(e,Ly,e)}catch(i){dt(e,e.return,i)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jv(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jv(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;)kv(e,t.alternate,t),t=t.sibling}function Lv(e){var t=Ri(),i=Es(),s=Cs(),n=As();switch(e.tag){case 0:case 11:case 14:case 15:Td(e,e.return,Ui),xr(e);break;case 1:Rs(e,e.return);var r=e.stateNode;typeof r.componentWillUnmount=="function"&&Nv(e,e.return,r),xr(e);break;case 27:ce(e,La,e.stateNode);case 26:case 5:Rs(e,e.return),xr(e);break;case 22:e.memoizedState===null&&xr(e);break;case 30:xr(e);break;default:xr(e)}(e.mode&Ye)!==He&&0<=Oe&&0<=Be&&(Tt||.05<kt)&&Ss(e,Oe,Be,kt,Dt),Ti(t),xs(i),Dt=s,Tt=n}function xr(e){for(e=e.child;e!==null;)Lv(e),e=e.sibling}function Bv(e,t,i,s){var n=Ri(),r=Es(),d=Cs(),_=As(),D=i.flags;switch(i.tag){case 0:case 11:case 15:Ms(e,i,s),wv(i,Ui);break;case 1:if(Ms(e,i,s),t=i.stateNode,typeof t.componentDidMount=="function"&&ce(i,rm,i,t),t=i.updateQueue,t!==null){e=i.stateNode;try{ce(i,wy,t,e)}catch(M){dt(i,i.return,M)}}s&&D&64&&Sv(i),Aa(i,i.return);break;case 27:Av(i);case 26:case 5:Ms(e,i,s),s&&t===null&&D&4&&xv(i),Aa(i,i.return);break;case 12:if(s&&D&4){D=Ks(),Ms(e,i,s),s=i.stateNode,s.effectDuration+=pa(D);try{ce(i,Ev,i,t,Pn,s.effectDuration)}catch(M){dt(i,i.return,M)}}else Ms(e,i,s);break;case 31:Ms(e,i,s),s&&D&4&&Tv(e,i);break;case 13:Ms(e,i,s),s&&D&4&&Mv(e,i);break;case 22:i.memoizedState===null&&Ms(e,i,s),Aa(i,i.return);break;case 30:break;default:Ms(e,i,s)}(i.mode&Ye)!==He&&0<=Oe&&0<=Be&&(Tt||.05<kt)&&Ss(i,Oe,Be,kt,Dt),Ti(n),xs(r),Dt=d,Tt=_}function Ms(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;)Bv(e,t.alternate,t,i),t=t.sibling}function Bd(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&&wr(e),i!=null&&ma(i))}function Jd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(wr(t),e!=null&&ma(e))}function us(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;Jv(e,t,i,s,r!==null?r.actualStartTime:n),t=r}}function Jv(e,t,i,s,n){var r=Ri(),d=Es(),_=Cs(),D=As(),M=zn,K=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&Ye)!==He&&0<t.actualStartTime&&(t.flags&1)!==0&&Gl(t,t.actualStartTime,n,Yt,i),us(e,t,i,s,n),K&2048&&yv(t,_i|is);break;case 1:(t.mode&Ye)!==He&&0<t.actualStartTime&&((t.flags&128)!==0?wh(t,t.actualStartTime,n,[]):(t.flags&1)!==0&&Gl(t,t.actualStartTime,n,Yt,i)),us(e,t,i,s,n);break;case 3:var te=Ks(),F=Yt;Yt=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)===0,us(e,t,i,s,n),Yt=F,K&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),s=t.memoizedState.cache,s!==i&&(wr(s),i!=null&&ma(i))),e.passiveEffectDuration+=sc(te);break;case 12:if(K&2048){K=Ks(),us(e,t,i,s,n),e=t.stateNode,e.passiveEffectDuration+=pa(K);try{ce(t,jy,t,t.alternate,Pn,e.passiveEffectDuration)}catch(ae){dt(t,t.return,ae)}}else us(e,t,i,s,n);break;case 31:K=Yt,te=t.alternate!==null?t.alternate.memoizedState:null,F=t.memoizedState,te!==null&&F===null?(F=t.deletions,F!==null&&0<F.length&&F[0].tag===18?(Yt=!1,te=te.hydrationErrors,te!==null&&wh(t,t.actualStartTime,n,te)):Yt=!0):Yt=!1,us(e,t,i,s,n),Yt=K;break;case 13:K=Yt,te=t.alternate!==null?t.alternate.memoizedState:null,F=t.memoizedState,te===null||te.dehydrated===null||F!==null&&F.dehydrated!==null?Yt=!1:(F=t.deletions,F!==null&&0<F.length&&F[0].tag===18?(Yt=!1,te=te.hydrationErrors,te!==null&&wh(t,t.actualStartTime,n,te)):Yt=!0),us(e,t,i,s,n),Yt=K;break;case 23:break;case 22:F=t.stateNode,te=t.alternate,t.memoizedState!==null?F._visibility&on?us(e,t,i,s,n):Da(e,t,i,s,n):F._visibility&on?us(e,t,i,s,n):(F._visibility|=on,ho(e,t,i,s,(t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),n),(t.mode&Ye)===He||Yt||(e=t.actualStartTime,0<=e&&.05<n-e&&Fl(t,e,n),0<=Oe&&0<=Be&&.05<Be-Oe&&Fl(t,Oe,Be))),K&2048&&Bd(te,t);break;case 24:us(e,t,i,s,n),K&2048&&Jd(t.alternate,t);break;default:us(e,t,i,s,n)}(t.mode&Ye)!==He&&((e=!Yt&&t.alternate===null&&t.return!==null&&t.return.alternate!==null)&&(i=t.actualStartTime,0<=i&&.05<n-i&&ys(t,i,n,"Mount")),0<=Oe&&0<=Be&&((Tt||.05<kt)&&Ss(t,Oe,Be,kt,Dt),e&&.05<Be-Oe&&ys(t,Oe,Be,"Mount"))),Ti(r),xs(d),Dt=_,Tt=D,zn=M}function ho(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 d=t.sibling;Hv(e,t,i,s,n,d!==null?d.actualStartTime:r),t=d}}function Hv(e,t,i,s,n,r){var d=Ri(),_=Es(),D=Cs(),M=As(),K=zn;n&&(t.mode&Ye)!==He&&0<t.actualStartTime&&(t.flags&1)!==0&&Gl(t,t.actualStartTime,r,Yt,i);var te=t.flags;switch(t.tag){case 0:case 11:case 15:ho(e,t,i,s,n,r),yv(t,_i);break;case 23:break;case 22:var F=t.stateNode;t.memoizedState!==null?F._visibility&on?ho(e,t,i,s,n,r):Da(e,t,i,s,r):(F._visibility|=on,ho(e,t,i,s,n,r)),n&&te&2048&&Bd(t.alternate,t);break;case 24:ho(e,t,i,s,n,r),n&&te&2048&&Jd(t.alternate,t);break;default:ho(e,t,i,s,n,r)}(t.mode&Ye)!==He&&0<=Oe&&0<=Be&&(Tt||.05<kt)&&Ss(t,Oe,Be,kt,Dt),Ti(d),xs(_),Dt=D,Tt=M,zn=K}function Da(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 d=e,_=i,D=s,M=t!==null?t.actualStartTime:n,K=zn;(r.mode&Ye)!==He&&0<r.actualStartTime&&(r.flags&1)!==0&&Gl(r,r.actualStartTime,M,Yt,_);var te=r.flags;switch(r.tag){case 22:Da(d,r,_,D,M),te&2048&&Bd(r.alternate,r);break;case 24:Da(d,r,_,D,M),te&2048&&Jd(r.alternate,r);break;default:Da(d,r,_,D,M)}zn=K,r=t}}function fo(e,t,i){if(e.subtreeFlags&gl)for(e=e.child;e!==null;)Uv(e,t,i),e=e.sibling}function Uv(e,t,i){switch(e.tag){case 26:fo(e,t,i),e.flags&gl&&e.memoizedState!==null&&CS(i,ps,e.memoizedState,e.memoizedProps);break;case 5:fo(e,t,i);break;case 3:case 4:var s=ps;ps=Hc(e.stateNode.containerInfo),fo(e,t,i),ps=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=gl,gl=16777216,fo(e,t,i),gl=s):fo(e,t,i));break;default:fo(e,t,i)}}function zv(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 ka(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=Ri();ei=s,qv(s,e),(s.mode&Ye)!==He&&0<=Oe&&0<=Be&&.05<Be-Oe&&ys(s,Oe,Be,"Unmount"),Ti(n)}zv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Iv(e),e=e.sibling}function Iv(e){var t=Ri(),i=Es(),s=Cs(),n=As();switch(e.tag){case 0:case 11:case 15:ka(e),e.flags&2048&&Md(e,e.return,_i|is);break;case 3:var r=Ks();ka(e),e.stateNode.passiveEffectDuration+=sc(r);break;case 12:r=Ks(),ka(e),e.stateNode.passiveEffectDuration+=pa(r);break;case 22:r=e.stateNode,e.memoizedState!==null&&r._visibility&on&&(e.return===null||e.return.tag!==13)?(r._visibility&=~on,Tc(e),(e.mode&Ye)!==He&&0<=Oe&&0<=Be&&.05<Be-Oe&&ys(e,Oe,Be,"Disconnect")):ka(e);break;default:ka(e)}(e.mode&Ye)!==He&&0<=Oe&&0<=Be&&(Tt||.05<kt)&&Ss(e,Oe,Be,kt,Dt),Ti(t),xs(i),Tt=n,Dt=s}function Tc(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=Ri();ei=s,qv(s,e),(s.mode&Ye)!==He&&0<=Oe&&0<=Be&&.05<Be-Oe&&ys(s,Oe,Be,"Unmount"),Ti(n)}zv(e)}for(e=e.child;e!==null;)$v(e),e=e.sibling}function $v(e){var t=Ri(),i=Es(),s=Cs(),n=As();switch(e.tag){case 0:case 11:case 15:Md(e,e.return,_i),Tc(e);break;case 22:var r=e.stateNode;r._visibility&on&&(r._visibility&=~on,Tc(e));break;default:Tc(e)}(e.mode&Ye)!==He&&0<=Oe&&0<=Be&&(Tt||.05<kt)&&Ss(e,Oe,Be,kt,Dt),Ti(t),xs(i),Tt=n,Dt=s}function qv(e,t){for(;ei!==null;){var i=ei,s=i,n=t,r=Ri(),d=Es(),_=Cs(),D=As();switch(s.tag){case 0:case 11:case 15:Md(s,n,_i);break;case 23:case 22:s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool,n!=null&&wr(n));break;case 24:ma(s.memoizedState.cache)}if((s.mode&Ye)!==He&&0<=Oe&&0<=Be&&(Tt||.05<kt)&&Ss(s,Oe,Be,kt,Dt),Ti(r),xs(d),Tt=D,Dt=_,s=i.child,s!==null)s.return=i,ei=s;else e:for(i=e;ei!==null;){if(s=ei,r=s.sibling,d=s.return,Vv(s),s===i){ei=null;break e}if(r!==null){r.return=d,ei=r;break e}ei=d}}}function Hy(){lE.forEach(function(e){return e()})}function Pv(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||de.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Oi(e){if((lt&Xt)!==ti&&Qe!==0)return Qe&-Qe;var t=de.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),Wd()):Nn()}function Wv(){if(Ai===0)if((Qe&536870912)===0||it){var e=Qc;Qc<<=1,(Qc&3932160)===0&&(Qc=262144),Ai=e}else Ai=536870912;return e=Hi.current,e!==null&&(e.flags|=32),Ai}function Rt(e,t,i){if(Ko&&console.error("useInsertionEffect must not schedule updates."),km&&(Lu=!0),(e===_t&&(pt===zr||pt===Ir)||e.cancelPendingCommit!==null)&&(po(e,0),Mn(e,Qe,Ai,!1)),ct(e,i),(lt&Xt)!==ti&&e===_t){if(Js)switch(t.tag){case 0:case 11:case 15:e=Ke&&V(Ke)||"Unknown",_0.has(e)||(_0.add(e),t=V(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:g0||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),g0=!0)}}else Us&&hr(e,t,i),Yy(t),e===_t&&((lt&Xt)===ti&&(Zn|=i),Vt===Xn&&Mn(e,Qe,Ai,!1)),Os(e)}function Fv(e,t,i){if((lt&(Xt|zi))!==ti)throw Error("Should not already be working.");if(Qe!==0&&Ke!==null){var s=Ke,n=Kt();switch(hw){case yl:case zr:var r=nl;Et&&((s=s._debugTask)?s.run(console.timeStamp.bind(console,"Suspended",r,n,Gi,void 0,"primary-light")):console.timeStamp("Suspended",r,n,Gi,void 0,"primary-light"));break;case Ir:r=nl,Et&&((s=s._debugTask)?s.run(console.timeStamp.bind(console,"Action",r,n,Gi,void 0,"primary-light")):console.timeStamp("Action",r,n,Gi,void 0,"primary-light"));break;default:Et&&(s=n-nl,3>s||console.timeStamp("Blocked",nl,n,Gi,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))?zy(e,t):Ud(e,t,!0);var d=i;do{if(r===vn){Xo&&!i&&Mn(e,t,0,!1),t=pt,nl=zt(),hw=t;break}else{if(s=Kt(),n=e.current.alternate,d&&!Uy(n)){ls(t),n=Zt,r=s,!Et||r<=n||(jt?jt.run(console.timeStamp.bind(console,"Teared Render",n,r,ot,nt,"error")):console.timeStamp("Teared Render",n,r,ot,nt,"error")),Cr(t,s),r=Ud(e,t,!1),d=!1;continue}if(r===Ur){if(d=t,e.errorRecoveryDisabledLanes&d)var _=0;else _=e.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){ls(t),yh(Zt,s,t,jt),Cr(t,s),t=_;e:{s=e,r=d,d=Nl;var D=s.current.memoizedState.isDehydrated;if(D&&(po(s,_).flags|=256),_=Ud(s,_,!1),_!==Ur){if(ym&&!D){s.errorRecoveryDisabledLanes|=r,Zn|=r,r=Xn;break e}s=wi,wi=d,s!==null&&(wi===null?wi=s:wi.push.apply(wi,s))}r=_}if(d=!1,r!==Ur)continue;s=Kt()}}if(r===wl){ls(t),yh(Zt,s,t,jt),Cr(t,s),po(e,0),Mn(e,t,0,!0);break}e:{switch(i=e,r){case vn:case wl:throw Error("Root did not complete. This is a bug in React.");case Xn:if((t&4194048)!==t)break;case Du:ls(t),Fp(Zt,s,t,jt),Cr(t,s),n=t,(n&127)!==0?fu=s:(n&4194048)!==0&&(mu=s),Mn(i,t,Ai,!Qn);break e;case Ur:wi=null;break;case Au:case r0:break;default:throw Error("Unknown root exit status.")}if(de.actQueue!==null)zd(i,n,t,wi,El,Ru,Ai,Zn,$r,r,null,null,Zt,s);else{if((t&62914560)===t&&(d=Tu+l0-Kt(),10<d)){if(Mn(i,t,Ai,!Qn),Re(i,0,!0)!==0)break e;bs=t,i.timeoutHandle=A0(Gv.bind(null,i,n,wi,El,Ru,t,Ai,Zn,$r,Qn,r,"Throttled",Zt,s),d);break e}Gv(i,n,wi,El,Ru,t,Ai,Zn,$r,Qn,r,null,Zt,s)}}}break}while(!0);Os(e)}function Gv(e,t,i,s,n,r,d,_,D,M,K,te,F,ae){e.timeoutHandle=Gr;var Ne=t.subtreeFlags,Ce=null;if((Ne&8192||(Ne&16785408)===16785408)&&(Ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gs},Uv(t,r,Ce),Ne=(r&62914560)===r?Tu-Kt():(r&4194048)===r?a0-Kt():0,Ne=AS(Ce,Ne),Ne!==null)){bs=r,e.cancelPendingCommit=Ne(zd.bind(null,e,t,r,i,s,n,d,_,D,K,Ce,Ce.waitingForViewTransition?"Waiting for the previous Animation":0<Ce.count?0<Ce.imgCount?"Suspended on CSS and Images":"Suspended on CSS":Ce.imgCount===1?"Suspended on an Image":0<Ce.imgCount?"Suspended on Images":null,F,ae)),Mn(e,r,d,!M);return}zd(e,t,r,i,s,n,d,_,D,K,Ce,te,F,ae)}function Uy(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 Mn(e,t,i,s){t&=~Sm,t&=~Zn,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var n=t;0<n;){var r=31-fi(n),d=1<<r;s[r]=-1,n&=~d}i!==0&&wt(e,i,t)}function mo(){return(lt&(Xt|zi))===ti?(Ta(0),!1):!0}function Hd(){if(Ke!==null){if(pt===Ci)var e=Ke.return;else e=Ke,ec(),Xh(e),zo=null,fl=0,e=Ke;for(;e!==null;)_v(e.alternate,e),e=e.return;Ke=null}}function Cr(e,t){(e&127)!==0&&(Rr=t),(e&4194048)!==0&&(hn=t),(e&62914560)!==0&&(cw=t),(e&2080374784)!==0&&(uw=t)}function po(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=Zt;if(Zt=zt(),Qe!==0&&0<i){if(ls(Qe),Vt===Au||Vt===Xn)Fp(i,Zt,t,jt);else{var s=Zt,n=jt;if(Et&&!(s<=i)){var r=(t&738197653)===t?"tertiary-dark":"primary-dark",d=(t&536870912)===t?"Prewarm":(t&201326741)===t?"Interrupted Hydration":"Interrupted Render";n?n.run(console.timeStamp.bind(console,d,i,s,ot,nt,r)):console.timeStamp(d,i,s,ot,nt,r)}}Cr(Qe,Zt)}if(i=jt,jt=null,(t&127)!==0){jt=tl,n=0<=qs&&qs<Rr?Rr:qs,s=0<=Tr&&Tr<Rr?Rr:Tr,r=0<=s?s:0<=n?n:Zt,0<=fu?(ls(2),Gp(fu,r,t,i)):pu&127,i=n;var _=s,D=il,M=0<Jo,K=Wn===el,te=Wn===du;if(n=Zt,s=tl,r=em,d=tm,Et){if(ot="Blocking",0<i?i>n&&(i=n):i=n,0<_?_>i&&(_=i):_=i,D!==null&&i>_){var F=M?"secondary-light":"warning";s?s.run(console.timeStamp.bind(console,M?"Consecutive":"Event: "+D,_,i,ot,nt,F)):console.timeStamp(M?"Consecutive":"Event: "+D,_,i,ot,nt,F)}n>i&&(_=K?"error":(t&738197653)===t?"tertiary-light":"primary-light",K=te?"Promise Resolved":K?"Cascading Update":5<n-i?"Update Blocked":"Update",te=[],d!=null&&te.push(["Component name",d]),r!=null&&te.push(["Method name",r]),i={start:i,end:n,detail:{devtools:{properties:te,track:ot,trackGroup:nt,color:_}}},s?s.run(performance.measure.bind(performance,K,i)):performance.measure(K,i))}qs=-1.1,Wn=0,tm=em=null,fu=-1.1,Jo=Tr,Tr=-1.1,Rr=zt()}if((t&4194048)!==0&&(jt=sl,n=0<=dn&&dn<hn?hn:dn,i=0<=es&&es<hn?hn:es,s=0<=Fn&&Fn<hn?hn:Fn,r=0<=s?s:0<=i?i:Zt,0<=mu?(ls(256),Gp(mu,r,t,jt)):pu&4194048,te=s,_=Mr,D=0<Gn,M=im===du,r=Zt,s=sl,d=aw,K=lw,Et&&(ot="Transition",0<i?i>r&&(i=r):i=r,0<n?n>i&&(n=i):n=i,0<te?te>n&&(te=n):te=n,n>te&&_!==null&&(F=D?"secondary-light":"warning",s?s.run(console.timeStamp.bind(console,D?"Consecutive":"Event: "+_,te,n,ot,nt,F)):console.timeStamp(D?"Consecutive":"Event: "+_,te,n,ot,nt,F)),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=M?"Promise Resolved":5<r-i?"Update Blocked":"Update",te=[],K!=null&&te.push(["Component name",K]),d!=null&&te.push(["Method name",d]),i={start:i,end:r,detail:{devtools:{properties:te,track:ot,trackGroup:nt,color:"primary-light"}}},s?s.run(performance.measure.bind(performance,n,i)):performance.measure(n,i))),es=dn=-1.1,im=0,mu=-1.1,Gn=Fn,Fn=-1.1,hn=zt()),(t&62914560)!==0&&(pu&62914560)!==0&&(ls(4194304),Sh(cw,Zt)),(t&2080374784)!==0&&(pu&2080374784)!==0&&(ls(268435456),Sh(uw,Zt)),i=e.timeoutHandle,i!==Gr&&(e.timeoutHandle=Gr,yE(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),bs=0,Hd(),_t=e,Ke=i=Ys(e.current,null),Qe=t,pt=Ci,Ii=null,Qn=!1,Xo=Ze(e,t),ym=!1,Vt=vn,$r=Ai=Sm=Zn=Kn=0,wi=Nl=null,Ru=!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 Ws=t,Yl(),e=tw(),1e3<e-ew&&(de.recentlyCreatedOwnerStacks=0,ew=e),fs.discardPendingWarnings(),i}function Yv(e,t){Ue=null,de.H=vl,de.getCurrentStack=null,Js=!1,Bi=null,t===Uo||t===_u?(t=bb(),pt=yl):t===om?(t=bb(),pt=o0):pt=t===bm?wm:t!==null&&typeof t=="object"&&typeof t.then=="function"?Sl:ku,Ii=t;var i=Ke;i===null?(Vt=wl,xc(e,Vi(t,e.current))):i.mode&Ye&&Bh(i)}function Xv(){var e=Hi.current;return e===null?!0:(Qe&4194048)===Qe?ts===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===ts:!1}function Qv(){var e=de.H;return de.H=vl,e===null?vl:e}function Kv(){var e=de.A;return de.A=aE,e}function Mc(e){jt===null&&(jt=e._debugTask==null?null:e._debugTask)}function Oc(){Vt=Xn,Qn||(Qe&4194048)!==Qe&&Hi.current!==null||(Xo=!0),(Kn&134217727)===0&&(Zn&134217727)===0||_t===null||Mn(_t,Qe,Ai,!1)}function Ud(e,t,i){var s=lt;lt|=Xt;var n=Qv(),r=Kv();if(_t!==e||Qe!==t){if(Us){var d=e.memoizedUpdaters;0<d.size&&(Ra(e,Qe),d.clear()),Kr(e,t)}El=null,po(e,t)}t=!1,d=Vt;e:do try{if(pt!==Ci&&Ke!==null){var _=Ke,D=Ii;switch(pt){case wm:Hd(),d=Du;break e;case yl:case zr:case Ir:case Sl:Hi.current===null&&(t=!0);var M=pt;if(pt=Ci,Ii=null,bo(e,_,D,M),i&&Xo){d=vn;break e}break;default:M=pt,pt=Ci,Ii=null,bo(e,_,D,M)}}Zv(),d=Vt;break}catch(K){Yv(e,K)}while(!0);return t&&e.shellSuspendCounter++,ec(),lt=s,de.H=n,de.A=r,Ke===null&&(_t=null,Qe=0,Yl()),d}function Zv(){for(;Ke!==null;)eg(Ke)}function zy(e,t){var i=lt;lt|=Xt;var s=Qv(),n=Kv();if(_t!==e||Qe!==t){if(Us){var r=e.memoizedUpdaters;0<r.size&&(Ra(e,Qe),r.clear()),Kr(e,t)}El=null,Mu=Kt()+c0,po(e,t)}else Xo=Ze(e,t);e:do try{if(pt!==Ci&&Ke!==null)t:switch(t=Ke,r=Ii,pt){case ku:pt=Ci,Ii=null,bo(e,t,r,ku);break;case zr:case Ir:if(mb(r)){pt=Ci,Ii=null,tg(t);break}t=function(){pt!==zr&&pt!==Ir||_t!==e||(pt=Vu),Os(e)},r.then(t,t);break e;case yl:pt=Vu;break e;case o0:pt=_m;break e;case Vu:mb(r)?(pt=Ci,Ii=null,tg(t)):(pt=Ci,Ii=null,bo(e,t,r,Vu));break;case _m:var d=null;switch(Ke.tag){case 26:d=Ke.memoizedState;case 5:case 27:var _=Ke;if(d?Fg(d):_.stateNode.complete){pt=Ci,Ii=null;var D=_.sibling;if(D!==null)Ke=D;else{var M=_.return;M!==null?(Ke=M,jc(M)):Ke=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}pt=Ci,Ii=null,bo(e,t,r,_m);break;case Sl:pt=Ci,Ii=null,bo(e,t,r,Sl);break;case wm:Hd(),Vt=Du;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}de.actQueue!==null?Zv():Iy();break}catch(K){Yv(e,K)}while(!0);return ec(),de.H=s,de.A=n,lt=i,Ke!==null?vn:(_t=null,Qe=0,Yl(),Vt)}function Iy(){for(;Ke!==null&&!zS();)eg(Ke)}function eg(e){var t=e.alternate;(e.mode&Ye)!==He?(Lh(e),t=ce(e,Vd,t,e,Ws),Bh(e)):t=ce(e,Vd,t,e,Ws),e.memoizedProps=e.pendingProps,t===null?jc(e):Ke=t}function tg(e){var t=ce(e,$y,e);e.memoizedProps=e.pendingProps,t===null?jc(e):Ke=t}function $y(e){var t=e.alternate,i=(e.mode&Ye)!==He;switch(i&&Lh(e),e.tag){case 15:case 0:t=dv(t,e,e.pendingProps,e.type,void 0,Qe);break;case 11:t=dv(t,e,e.pendingProps,e.type.render,e.ref,Qe);break;case 5:Xh(e);default:_v(t,e),e=Ke=eb(e,Ws),t=Vd(t,e,Ws)}return i&&Bh(e),t}function bo(e,t,i,s){ec(),Xh(t),zo=null,fl=0;var n=t.return;try{if(Ay(e,n,t,i,Qe)){Vt=wl,xc(e,Vi(i,e.current)),Ke=null;return}}catch(r){if(n!==null)throw Ke=n,r;Vt=wl,xc(e,Vi(i,e.current)),Ke=null;return}t.flags&32768?(it||s===ku?e=!0:Xo||(Qe&536870912)!==0?e=!1:(Qn=e=!0,(s===zr||s===Ir||s===yl||s===Sl)&&(s=Hi.current,s!==null&&s.tag===13&&(s.flags|=16384))),ig(t,e)):jc(t)}function jc(e){var t=e;do{if((t.flags&32768)!==0){ig(t,Qn);return}var i=t.alternate;if(e=t.return,Lh(t),i=ce(t,Vy,i,t,Ws),(t.mode&Ye)!==He&&cb(t),i!==null){Ke=i;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);Vt===vn&&(Vt=r0)}function ig(e,t){do{var i=Ry(e.alternate,e);if(i!==null){i.flags&=32767,Ke=i;return}if((e.mode&Ye)!==He){cb(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);Vt=Du,Ke=null}function zd(e,t,i,s,n,r,d,_,D,M,K,te,F,ae){e.cancelPendingCommit=null;do Va();while(Wt!==tr);if(fs.flushLegacyContextWarning(),fs.flushPendingUnsafeLifecycleWarnings(),(lt&(Xt|zi))!==ti)throw Error("Should not already be working.");if(ls(i),M===Ur?yh(F,ae,i,jt):s!==null?my(F,ae,i,s,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,jt):fy(F,ae,i,jt),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|=Yf,bt(e,i,r,d,_,D),e===_t&&(Ke=_t=null,Qe=0),Qo=t,ir=e,bs=i,xm=r,Am=n,p0=s,Cm=ae,b0=te,vs=Ou,v0=null,t.actualDuration!==0||(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Gy(So,function(){return Vl=window.event,vs===Ou&&(vs=Em),ag(),null})):(e.callbackNode=null,e.callbackPriority=0),un=null,Pn=zt(),te!==null&&py(ae,Pn,te,jt),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=de.T,de.T=null,n=ft.p,ft.p=Fi,d=lt,lt|=zi;try{By(e,t,i)}finally{lt=d,ft.p=n,de.T=s}}Wt=h0,sg(),ng(),rg()}}function sg(){if(Wt===h0){Wt=tr;var e=ir,t=Qo,i=bs,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=de.T,de.T=null;var n=ft.p;ft.p=Fi;var r=lt;lt|=zi;try{Go=i,Yo=e,nc(),Ov(t,e),Yo=Go=null,i=Jm;var d=qp(e.containerInfo),_=i.focusedElem,D=i.selectionRange;if(d!==_&&_&&_.ownerDocument&&$p(_.ownerDocument.documentElement,_)){if(D!==null&&gh(_)){var M=D.start,K=D.end;if(K===void 0&&(K=M),"selectionStart"in _)_.selectionStart=M,_.selectionEnd=Math.min(K,_.value.length);else{var te=_.ownerDocument||document,F=te&&te.defaultView||window;if(F.getSelection){var ae=F.getSelection(),Ne=_.textContent.length,Ce=Math.min(D.start,Ne),St=D.end===void 0?Ce:Math.min(D.end,Ne);!ae.extend&&Ce>St&&(d=St,St=Ce,Ce=d);var rt=Ip(_,Ce),W=Ip(_,St);if(rt&&W&&(ae.rangeCount!==1||ae.anchorNode!==rt.node||ae.anchorOffset!==rt.offset||ae.focusNode!==W.node||ae.focusOffset!==W.offset)){var G=te.createRange();G.setStart(rt.node,rt.offset),ae.removeAllRanges(),Ce>St?(ae.addRange(G),ae.extend(W.node,W.offset)):(G.setEnd(W.node,W.offset),ae.addRange(G))}}}}for(te=[],ae=_;ae=ae.parentNode;)ae.nodeType===1&&te.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<te.length;_++){var Q=te[_];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Xu=!!Bm,Jm=Bm=null}finally{lt=r,ft.p=n,de.T=s}}e.current=t,Wt=d0}}function ng(){if(Wt===d0){Wt=tr;var e=v0;if(e!==null){Pn=zt();var t=cn,i=Pn;!Et||i<=t||console.timeStamp(e,t,i,ot,nt,"secondary-light")}e=ir,t=Qo,i=bs;var s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=de.T,de.T=null;var n=ft.p;ft.p=Fi;var r=lt;lt|=zi;try{Go=i,Yo=e,nc(),kv(e,t.alternate,t),Yo=Go=null}finally{lt=r,ft.p=n,de.T=s}}e=Cm,t=b0,cn=zt(),e=t===null?e:Pn,t=cn,i=vs===Nm,s=jt,un!==null?Yp(e,t,un,!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")),Wt=f0}}function rg(){if(Wt===m0||Wt===f0){if(Wt===m0){var e=cn;cn=zt();var t=cn,i=vs===Nm;!Et||t<=e||console.timeStamp(i?"Interrupted View Transition":"Starting Animation",e,t,ot,nt,i?" error":"secondary-light"),vs!==Nm&&(vs=u0)}Wt=tr,IS(),e=ir;var s=Qo;t=bs,i=p0;var n=s.actualDuration!==0||(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0;n?Wt=ju:(Wt=tr,Qo=ir=null,og(e,e.pendingLanes),qr=0,Cl=null);var r=e.pendingLanes;if(r===0&&(er=null),n||hg(e),r=Zr(t),s=s.stateNode,li&&typeof li.onCommitFiberRoot=="function")try{var d=(s.current.flags&128)===128;switch(r){case Fi:var _=Af;break;case zs:_=Df;break;case nn:_=So;break;case Zc:_=kf;break;default:_=So}li.onCommitFiberRoot(No,s,_,d)}catch(te){Hs||(Hs=!0,console.error("React instrumentation encountered an error: %o",te))}if(Us&&e.memoizedUpdaters.clear(),Hy(),i!==null){d=de.T,_=ft.p,ft.p=Fi,de.T=null;try{var D=e.onRecoverableError;for(s=0;s<i.length;s++){var M=i[s],K=qy(M.stack);ce(M.source,D,M.value,K)}}finally{de.T=d,ft.p=_}}(bs&3)!==0&&Va(),Os(e),r=e.pendingLanes,(t&261930)!==0&&(r&42)!==0?(vu=!0,e===Dm?xl++:(xl=0,Dm=e)):xl=0,n||Cr(t,cn),Ta(0)}}function qy(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 og(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function Va(){return sg(),ng(),rg(),ag()}function ag(){if(Wt!==ju)return!1;var e=ir,t=xm;xm=0;var i=Zr(bs),s=nn>i?nn:i;i=de.T;var n=ft.p;try{ft.p=s,de.T=null;var r=Am;Am=null,s=ir;var d=bs;if(Wt=tr,Qo=ir=null,bs=0,(lt&(Xt|zi))!==ti)throw Error("Cannot flush passive effects while already rendering.");ls(d),km=!0,Lu=!1;var _=0;if(un=null,_=Kt(),vs===u0)Sh(cn,_,eE);else{var D=cn,M=_,K=vs===Em;!Et||M<=D||(jt?jt.run(console.timeStamp.bind(console,K?"Waiting for Paint":"Waiting",D,M,ot,nt,"secondary-light")):console.timeStamp(K?"Waiting for Paint":"Waiting",D,M,ot,nt,"secondary-light"))}D=lt,lt|=zi;var te=s.current;nc(),Iv(te);var F=s.current;te=Cm,nc(),Jv(s,F,d,r,te),hg(s),lt=D;var ae=Kt();if(F=_,te=jt,un!==null?Yp(F,ae,un,!0,te):!Et||ae<=F||(te?te.run(console.timeStamp.bind(console,"Remaining Effects",F,ae,ot,nt,"secondary-dark")):console.timeStamp("Remaining Effects",F,ae,ot,nt,"secondary-dark")),Cr(d,ae),Ta(0,!1),Lu?s===Cl?qr++:(qr=0,Cl=s):qr=0,Lu=km=!1,li&&typeof li.onPostCommitFiberRoot=="function")try{li.onPostCommitFiberRoot(No,s)}catch(Ce){Hs||(Hs=!0,console.error("React instrumentation encountered an error: %o",Ce))}var Ne=s.current.stateNode;return Ne.effectDuration=0,Ne.passiveEffectDuration=0,!0}finally{ft.p=n,de.T=i,og(e,t)}}function lg(e,t,i){t=Vi(i,t),ub(t),t=_d(e.stateNode,t,2),e=kn(e,t,2),e!==null&&(ct(e,2),Os(e))}function dt(e,t,i){if(Ko=!1,e.tag===3)lg(e,e,i);else{for(;t!==null;){if(t.tag===3){lg(t,e,i);return}if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(er===null||!er.has(s))){e=Vi(i,e),ub(e),i=wd(2),s=kn(t,i,2),s!==null&&(yd(i,s,t,e),ct(s,2),Os(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 Id(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new cE;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)||(ym=!0,n.add(i),s=Py.bind(null,e,t,i),Us&&Ra(e,i),t.then(s,s))}function Py(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,(i&127)!==0?0>qs&&(Rr=qs=zt(),tl=hu("Promise Resolved"),Wn=du):(i&4194048)!==0&&0>es&&(hn=es=zt(),sl=hu("Promise Resolved"),im=du),Pv()&&de.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&&(Vt===Xn||Vt===Au&&(Qe&62914560)===Qe&&Kt()-Tu<l0?(lt&Xt)===ti&&po(e,0):Sm|=i,$r===Qe&&($r=0)),Os(e)}function cg(e,t){t===0&&(t=Ge()),e=ai(e,t),e!==null&&(ct(e,t),Os(e))}function Wy(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),cg(e,i)}function Fy(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),cg(e,i)}function $d(e,t,i){if((t.subtreeFlags&67117056)!==0)for(t=t.child;t!==null;){var s=e,n=t,r=n.type===Fc;r=i||r,n.tag!==22?n.flags&67108864?r&&ce(n,ug,s,n):$d(s,n,r):n.memoizedState===null&&(r&&n.flags&8192?ce(n,ug,s,n):n.subtreeFlags&67108864&&ce(n,$d,s,n,r)),t=t.sibling}}function ug(e,t){Ae(!0);try{Lv(t),$v(t),Bv(e,t.alternate,t,!1),Hv(e,t,0,null,!1,0)}finally{Ae(!1)}}function hg(e){var t=!0;e.current.mode&(ci|ds)||(t=!1),$d(e,e.current,t)}function dg(e){if((lt&Xt)===ti){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=V(e)||"ReactComponent",Bu!==null){if(Bu.has(t))return;Bu.add(t)}else Bu=new Set([t]);ce(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 Ra(e,t){Us&&e.memoizedUpdaters.forEach(function(i){hr(e,i,t)})}function Gy(e,t){var i=de.actQueue;return i!==null?(i.push(t),dE):Cf(e,t)}function Yy(e){Pv()&&de.actQueue===null&&ce(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`,V(e))})}function Os(e){e!==Zo&&e.next===null&&(Zo===null?Ju=Zo=e:Zo=Zo.next=e),Hu=!0,de.actQueue!==null?Rm||(Rm=!0,bg()):Vm||(Vm=!0,bg())}function Ta(e,t){if(!Tm&&Hu){Tm=!0;do for(var i=!1,s=Ju;s!==null;){if(e!==0){var n=s.pendingLanes;if(n===0)var r=0;else{var d=s.suspendedLanes,_=s.pingedLanes;r=(1<<31-fi(42|e)+1)-1,r&=n&~(d&~_),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(i=!0,pg(s,r))}else r=Qe,r=Re(s,s===_t?r:0,s.cancelPendingCommit!==null||s.timeoutHandle!==Gr),(r&3)===0||Ze(s,r)||(i=!0,pg(s,r));s=s.next}while(i);Tm=!1}}function Xy(){Vl=window.event,qd()}function qd(){Hu=Rm=Vm=!1;var e=0;sr!==0&&sS()&&(e=sr);for(var t=Kt(),i=null,s=Ju;s!==null;){var n=s.next,r=fg(s,t);r===0?(s.next=null,i===null?Ju=n:i.next=n,n===null&&(Zo=i)):(i=s,(e!==0||(r&3)!==0)&&(Hu=!0)),s=n}Wt!==tr&&Wt!==ju||Ta(e),sr!==0&&(sr=0)}function fg(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,n=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var d=31-fi(r),_=1<<d,D=n[d];D===-1?((_&i)===0||(_&s)!==0)&&(n[d]=$e(_,t)):D<=t&&(e.expiredLanes|=_),r&=~_}if(t=_t,i=Qe,i=Re(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Gr),s=e.callbackNode,i===0||e===t&&(pt===zr||pt===Ir)||e.cancelPendingCommit!==null)return s!==null&&Pd(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ze(e,i)){if(t=i&-i,t!==e.callbackPriority||de.actQueue!==null&&s!==Mm)Pd(s);else return t;switch(Zr(i)){case Fi:case zs:i=Df;break;case nn:i=So;break;case Zc:i=kf;break;default:i=So}return s=mg.bind(null,e),de.actQueue!==null?(de.actQueue.push(s),i=Mm):i=Cf(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&Pd(s),e.callbackPriority=2,e.callbackNode=null,2}function mg(e,t){if(vu=bu=!1,Vl=window.event,Wt!==tr&&Wt!==ju)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(vs===Ou&&(vs=Em),Va()&&e.callbackNode!==i)return null;var s=Qe;return s=Re(e,e===_t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Gr),s===0?null:(Fv(e,s,t),fg(e,Kt()),e.callbackNode!=null&&e.callbackNode===i?mg.bind(null,e):null)}function pg(e,t){if(Va())return null;bu=vu,vu=!1,Fv(e,t,!0)}function Pd(e){e!==Mm&&e!==null&&US(e)}function bg(){de.actQueue!==null&&de.actQueue.push(function(){return qd(),null}),SE(function(){(lt&(Xt|zi))!==ti?Cf(Af,Xy):qd()})}function Wd(){if(sr===0){var e=Or;e===0&&(e=Xc,Xc<<=1,(Xc&261888)===0&&(Xc=256)),sr=e}return sr}function vg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(je(e,"action"),ua(""+e))}function gg(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 Qy(e,t,i,s,n){if(t==="submit"&&i&&i.stateNode===n){var r=vg((n[mi]||null).action),d=s.submitter;d&&(t=(t=d[mi]||null)?vg(t.formAction):d.getAttribute("formAction"),t!==null&&(r=t,d=null));var _=new nu("action","action",null,s,n);e.push({event:_,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(sr!==0){var D=d?gg(n,d):new FormData(n),M={pending:!0,data:D,method:n.method,action:r};Object.freeze(M),dd(i,M,null,D)}}else typeof r=="function"&&(_.preventDefault(),D=d?gg(n,d):new FormData(n),M={pending:!0,data:D,method:n.method,action:r},Object.freeze(M),dd(i,M,r,D))},currentTarget:n}]})}}function Lc(e,t,i){e.currentTarget=i;try{t(e)}catch(s){Pf(s)}e.currentTarget=null}function _g(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 d=s.length-1;0<=d;d--){var _=s[d],D=_.instance,M=_.currentTarget;if(_=_.listener,D!==n&&r.isPropagationStopped())break e;D!==null?ce(D,Lc,r,_,M):Lc(r,_,M),n=D}else for(d=0;d<s.length;d++){if(_=s[d],D=_.instance,M=_.currentTarget,_=_.listener,D!==n&&r.isPropagationStopped())break e;D!==null?ce(D,Lc,r,_,M):Lc(r,_,M),n=D}}}}function st(e,t){Om.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[Vf];i===void 0&&(i=t[Vf]=new Set);var s=e+"__bubble";i.has(s)||(wg(t,e,2,!1),i.add(s))}function Fd(e,t,i){Om.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),wg(i,e,s,t)}function Gd(e){if(!e[Uu]){e[Uu]=!0,b_.forEach(function(i){i!=="selectionchange"&&(Om.has(i)||Fd(i,!1,e),Fd(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uu]||(t[Uu]=!0,Fd("selectionchange",!1,t))}}function wg(e,t,i,s){switch(Zg(t)){case Fi:var n=RS;break;case zs:n=TS;break;default:n=hf}i=n.bind(null,t,i,e),n=void 0,!jf||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 Yd(e,t,i,s,n){var r=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var d=s.tag;if(d===3||d===4){var _=s.stateNode.containerInfo;if(_===n)break;if(d===4)for(d=s.return;d!==null;){var D=d.tag;if((D===3||D===4)&&d.stateNode.containerInfo===n)return;d=d.return}for(;_!==null;){if(d=we(_),d===null)return;if(D=d.tag,D===5||D===6||D===26||D===27){s=r=d;continue e}_=_.parentNode}}s=s.return}Rp(function(){var M=r,K=bh(i),te=[];e:{var F=Z_.get(e);if(F!==void 0){var ae=nu,Ne=e;switch(e){case"keypress":if(ql(i)===0)break e;case"keydown":case"keyup":ae=AN;break;case"focusin":Ne="focus",ae=Hf;break;case"focusout":Ne="blur",ae=Hf;break;case"beforeblur":case"afterblur":ae=Hf;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":ae=H_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=pN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=VN;break;case Y_:case X_:case Q_:ae=gN;break;case K_:ae=TN;break;case"scroll":case"scrollend":ae=fN;break;case"wheel":ae=ON;break;case"copy":case"cut":case"paste":ae=wN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=z_;break;case"toggle":case"beforetoggle":ae=LN}var Ce=(t&4)!==0,St=!Ce&&(e==="scroll"||e==="scrollend"),rt=Ce?F!==null?F+"Capture":null:F;Ce=[];for(var W=M,G;W!==null;){var Q=W;if(G=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||G===null||rt===null||(Q=ha(W,rt),Q!=null&&Ce.push(Ma(W,Q,G))),St)break;W=W.return}0<Ce.length&&(F=new ae(F,Ne,null,i,K),te.push({event:F,listeners:Ce}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",F&&i!==qa&&(Ne=i.relatedTarget||i.fromElement)&&(we(Ne)||Ne[Hn]))break e;if((ae||F)&&(F=K.window===K?K:(F=K.ownerDocument)?F.defaultView||F.parentWindow:window,ae?(Ne=i.relatedTarget||i.toElement,ae=M,Ne=Ne?we(Ne):null,Ne!==null&&(St=u(Ne),Ce=Ne.tag,Ne!==St||Ce!==5&&Ce!==27&&Ce!==6)&&(Ne=null)):(ae=null,Ne=M),ae!==Ne)){if(Ce=H_,Q="onMouseLeave",rt="onMouseEnter",W="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=z_,Q="onPointerLeave",rt="onPointerEnter",W="pointer"),St=ae==null?F:ke(ae),G=Ne==null?F:ke(Ne),F=new Ce(Q,W+"leave",ae,i,K),F.target=St,F.relatedTarget=G,Q=null,we(K)===M&&(Ce=new Ce(rt,W+"enter",Ne,i,K),Ce.target=G,Ce.relatedTarget=St,Q=Ce),St=Q,ae&&Ne)t:{for(Ce=Ky,rt=ae,W=Ne,G=0,Q=rt;Q;Q=Ce(Q))G++;Q=0;for(var me=W;me;me=Ce(me))Q++;for(;0<G-Q;)rt=Ce(rt),G--;for(;0<Q-G;)W=Ce(W),Q--;for(;G--;){if(rt===W||W!==null&&rt===W.alternate){Ce=rt;break t}rt=Ce(rt),W=Ce(W)}Ce=null}else Ce=null;ae!==null&&yg(te,F,ae,Ce,!1),Ne!==null&&St!==null&&yg(te,St,Ne,Ce,!0)}}e:{if(F=M?ke(M):window,ae=F.nodeName&&F.nodeName.toLowerCase(),ae==="select"||ae==="input"&&F.type==="file")var Ee=Jp;else if(Lp(F))if(F_)Ee=uy;else{Ee=ly;var ze=ay}else ae=F.nodeName,!ae||ae.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?M&&ca(M.elementType)&&(Ee=Jp):Ee=cy;if(Ee&&(Ee=Ee(e,M))){Bp(te,Ee,i,K);break e}ze&&ze(e,F,M),e==="focusout"&&M&&F.type==="number"&&M.memoizedProps.value!=null&&uh(F,"number",F.value)}switch(ze=M?ke(M):window,e){case"focusin":(Lp(ze)||ze.contentEditable==="true")&&(Vo=ze,zf=M,Qa=null);break;case"focusout":Qa=zf=Vo=null;break;case"mousedown":If=!0;break;case"contextmenu":case"mouseup":case"dragend":If=!1,Pp(te,i,K);break;case"selectionchange":if(UN)break;case"keydown":case"keyup":Pp(te,i,K)}var Me;if(Uf)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else ko?Op(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===I_&&(Ve="onCompositionStart");Ve&&($_&&i.locale!=="ko"&&(ko||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&ko&&(Me=Tp()):(Un=K,Lf="value"in Un?Un.value:Un.textContent,ko=!0)),ze=Bc(M,Ve),0<ze.length&&(Ve=new U_(Ve,e,null,i,K),te.push({event:Ve,listeners:ze}),Me?Ve.data=Me:(Me=jp(i),Me!==null&&(Ve.data=Me)))),(Me=JN?sy(e,i):ny(e,i))&&(Ve=Bc(M,"onBeforeInput"),0<Ve.length&&(ze=new SN("onBeforeInput","beforeinput",null,i,K),te.push({event:ze,listeners:Ve}),ze.data=Me)),Qy(te,e,M,i,K)}_g(te,t)})}function Ma(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Bc(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=ha(e,i),n!=null&&s.unshift(Ma(e,n,r)),n=ha(e,t),n!=null&&s.push(Ma(e,n,r))),e.tag===3)return s;e=e.return}return[]}function Ky(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function yg(e,t,i,s,n){for(var r=t._reactName,d=[];i!==null&&i!==s;){var _=i,D=_.alternate,M=_.stateNode;if(_=_.tag,D!==null&&D===s)break;_!==5&&_!==26&&_!==27||M===null||(D=M,n?(M=ha(i,r),M!=null&&d.unshift(Ma(i,M,D))):n||(M=ha(i,r),M!=null&&d.push(Ma(i,M,D)))),i=i.return}d.length!==0&&e.push({event:t,listeners:d})}function Xd(e,t){Z1(e,t),e!=="input"&&e!=="textarea"&&e!=="select"||t==null||t.value!==null||B_||(B_=!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:Ar,possibleRegistrationNames:Rf};ca(e)||typeof t.is=="string"||ty(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 Qt(e,t,i,s){t!==i&&(i=On(i),On(t)!==i&&(s[e]=t))}function Zy(e,t,i){t.forEach(function(s){i[Eg(s)]=s==="style"?Kd(e):e.getAttribute(s)})}function js(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 Sg(e,t){return e=e.namespaceURI===tu||e.namespaceURI===xo?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function On(e){return Ie(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)),qe(e)),(typeof e=="string"?e:""+e).replace(fE,`
221
- `).replace(mE,"")}function Ng(e,t){return t=On(t),On(e)===t}function vt(e,t,i,s,n,r){switch(i){case"children":typeof s=="string"?($l(s,t,!1),t==="body"||t==="textarea"&&s===""||la(e,s)):(typeof s=="number"||typeof s=="bigint")&&($l(""+s,t,!1),t!=="body"&&la(e,""+s));break;case"className":Ul(e,"class",s);break;case"tabIndex":Ul(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ul(e,i,s);break;case"style":Dp(e,s,r);break;case"data":if(t!=="object"){Ul(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}je(s,i),s=ua(""+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||$u||($u=!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||Iu||(Iu=!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"||zu?t!=="button"||n.type==null||n.type==="submit"||zu?typeof s=="function"&&(n.name==null||S0||(S0=!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||$u||($u=!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||Iu||(Iu=!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."))):(zu=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(zu=!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"&&vt(e,t,"name",n.name,n,null),vt(e,t,"formEncType",n.formEncType,n,null),vt(e,t,"formMethod",n.formMethod,n,null),vt(e,t,"formTarget",n.formTarget,n,null)):(vt(e,t,"encType",n.encType,n,null),vt(e,t,"method",n.method,n,null),vt(e,t,"target",n.target,n,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}je(s,i),s=ua(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(typeof s!="function"&&js(i,s),e.onclick=Gs);break;case"onScroll":s!=null&&(typeof s!="function"&&js(i,s),st("scroll",e));break;case"onScrollEnd":s!=null&&(typeof s!="function"&&js(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}je(s,i),i=ua(""+s),e.setAttributeNS(Pr,"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"?(je(s,i),e.setAttribute(i,""+s)):e.removeAttribute(i);break;case"inert":s!==""||qu[i]||(qu[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"?(je(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?(je(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):(je(s,i),e.setAttribute(i,s));break;case"popover":st("beforetoggle",e),st("toggle",e),eo(e,"popover",s);break;case"xlinkActuate":Fs(e,Pr,"xlink:actuate",s);break;case"xlinkArcrole":Fs(e,Pr,"xlink:arcrole",s);break;case"xlinkRole":Fs(e,Pr,"xlink:role",s);break;case"xlinkShow":Fs(e,Pr,"xlink:show",s);break;case"xlinkTitle":Fs(e,Pr,"xlink:title",s);break;case"xlinkType":Fs(e,Pr,"xlink:type",s);break;case"xmlBase":Fs(e,jm,"xml:base",s);break;case"xmlLang":Fs(e,jm,"xml:lang",s);break;case"xmlSpace":Fs(e,jm,"xml:space",s);break;case"is":r!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),eo(e,"is",s);break;case"innerText":case"textContent":break;case"popoverTarget":N0||s==null||typeof s!="object"||(N0=!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=kp(i),eo(e,i,s)):Ar.hasOwnProperty(i)&&s!=null&&typeof s!="function"&&js(i,s)}}function Qd(e,t,i,s,n,r){switch(i){case"style":Dp(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"?la(e,s):(typeof s=="number"||typeof s=="bigint")&&la(e,""+s);break;case"onScroll":s!=null&&(typeof s!="function"&&js(i,s),st("scroll",e));break;case"onScrollEnd":s!=null&&(typeof s!="function"&&js(i,s),st("scrollend",e));break;case"onClick":s!=null&&(typeof s!="function"&&js(i,s),e.onclick=Gs);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Ar.hasOwnProperty(i))s!=null&&typeof s!="function"&&js(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,""):eo(e,i,s)}}}function ni(e,t,i){switch(Xd(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 d=i[r];if(d!=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:vt(e,t,r,d,i,null)}}n&&vt(e,t,"srcSet",i.srcSet,i,null),s&&vt(e,t,"src",i.src,i,null);return;case"input":hi("input",i),st("invalid",e);var _=r=d=n=null,D=null,M=null;for(s in i)if(i.hasOwnProperty(s)){var K=i[s];if(K!=null)switch(s){case"name":n=K;break;case"type":d=K;break;case"checked":D=K;break;case"defaultChecked":M=K;break;case"value":r=K;break;case"defaultValue":_=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:vt(e,t,s,K,i,null)}}dp(e,i),fp(e,r,_,D,M,d,n,!1);return;case"select":hi("select",i),st("invalid",e),s=d=r=null;for(n in i)if(i.hasOwnProperty(n)&&(_=i[n],_!=null))switch(n){case"value":r=_;break;case"defaultValue":d=_;break;case"multiple":s=_;default:vt(e,t,n,_,i,null)}bp(e,i),t=r,i=d,e.multiple=!!s,t!=null?to(e,!!s,t,!1):i!=null&&to(e,!!s,i,!0);return;case"textarea":hi("textarea",i),st("invalid",e),r=n=s=null;for(d in i)if(i.hasOwnProperty(d)&&(_=i[d],_!=null))switch(d){case"value":s=_;break;case"defaultValue":n=_;break;case"children":r=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:vt(e,t,d,_,i,null)}vp(e,i),_p(e,s,n,r);return;case"option":mp(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:vt(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<Al.length;s++)st(Al[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(M in i)if(i.hasOwnProperty(M)&&(s=i[M],s!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:vt(e,t,M,s,i,null)}return;default:if(ca(t)){for(K in i)i.hasOwnProperty(K)&&(s=i[K],s!==void 0&&Qd(e,t,K,s,i,void 0));return}}for(_ in i)i.hasOwnProperty(_)&&(s=i[_],s!=null&&vt(e,t,_,s,i,null))}function eS(e,t,i,s){switch(Xd(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,d=null,_=null,D=null,M=null,K=null;for(ae in i){var te=i[ae];if(i.hasOwnProperty(ae)&&te!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":D=te;default:s.hasOwnProperty(ae)||vt(e,t,ae,null,s,te)}}for(var F in s){var ae=s[F];if(te=i[F],s.hasOwnProperty(F)&&(ae!=null||te!=null))switch(F){case"type":r=ae;break;case"name":n=ae;break;case"checked":M=ae;break;case"defaultChecked":K=ae;break;case"value":d=ae;break;case"defaultValue":_=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ae!==te&&vt(e,t,F,ae,s,te)}}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||y0||(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"),y0=!0),!t||s||w0||(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"),w0=!0),ch(e,d,_,D,M,K,r,n);return;case"select":ae=d=_=F=null;for(r in i)if(D=i[r],i.hasOwnProperty(r)&&D!=null)switch(r){case"value":break;case"multiple":ae=D;default:s.hasOwnProperty(r)||vt(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":F=r;break;case"defaultValue":_=r;break;case"multiple":d=r;default:r!==D&&vt(e,t,n,r,s,D)}s=_,t=d,i=ae,F!=null?to(e,!!t,F,!1):!!i!=!!t&&(s!=null?to(e,!!t,s,!0):to(e,!!t,t?[]:"",!1));return;case"textarea":ae=F=null;for(_ in i)if(n=i[_],i.hasOwnProperty(_)&&n!=null&&!s.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:vt(e,t,_,null,s,n)}for(d in s)if(n=s[d],r=i[d],s.hasOwnProperty(d)&&(n!=null||r!=null))switch(d){case"value":F=n;break;case"defaultValue":ae=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:n!==r&&vt(e,t,d,n,s,r)}gp(e,F,ae);return;case"option":for(var Ne in i)if(F=i[Ne],i.hasOwnProperty(Ne)&&F!=null&&!s.hasOwnProperty(Ne))switch(Ne){case"selected":e.selected=!1;break;default:vt(e,t,Ne,null,s,F)}for(D in s)if(F=s[D],ae=i[D],s.hasOwnProperty(D)&&F!==ae&&(F!=null||ae!=null))switch(D){case"selected":e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:vt(e,t,D,F,s,ae)}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 Ce in i)F=i[Ce],i.hasOwnProperty(Ce)&&F!=null&&!s.hasOwnProperty(Ce)&&vt(e,t,Ce,null,s,F);for(M in s)if(F=s[M],ae=i[M],s.hasOwnProperty(M)&&F!==ae&&(F!=null||ae!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:vt(e,t,M,F,s,ae)}return;default:if(ca(t)){for(var St in i)F=i[St],i.hasOwnProperty(St)&&F!==void 0&&!s.hasOwnProperty(St)&&Qd(e,t,St,void 0,s,F);for(K in s)F=s[K],ae=i[K],!s.hasOwnProperty(K)||F===ae||F===void 0&&ae===void 0||Qd(e,t,K,F,s,ae);return}}for(var rt in i)F=i[rt],i.hasOwnProperty(rt)&&F!=null&&!s.hasOwnProperty(rt)&&vt(e,t,rt,null,s,F);for(te in s)F=s[te],ae=i[te],!s.hasOwnProperty(te)||F===ae||F==null&&ae==null||vt(e,t,te,F,s,ae)}function Eg(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function Kd(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 xg(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 d=t[r];d!=null&&typeof d!="boolean"&&d!==""&&(r.indexOf("--")===0?(De(d,r),s+=n+r+":"+(""+d).trim()):typeof d!="number"||d===0||j_.has(r)?(De(d,r),s+=n+r.replace(V_,"-$1").toLowerCase().replace(R_,"-ms-")+":"+(""+d).trim()):s+=n+r.replace(V_,"-$1").toLowerCase().replace(R_,"-ms-")+":"+d+"px",n=";")}s=s||null,t=e.getAttribute("style"),t!==s&&(s=On(s),On(t)!==s&&(i.style=Kd(e)))}}function Wi(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(je(s,t),e===""+s)return}Qt(t,e,s,r)}function Cg(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}Qt(t,e,s,r)}function Zd(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(je(s,i),e===""+s)return}Qt(t,e,s,r)}function Ag(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)&&(je(s,t),e===""+s))return}Qt(t,e,s,r)}function ef(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(je(s,t),i=ua(""+s),e===i)return}Qt(t,e,s,r)}function Dg(e,t,i,s){for(var n={},r=new Set,d=e.attributes,_=0;_<d.length;_++)switch(d[_].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:r.add(d[_].name)}if(ca(t)){for(var D in i)if(i.hasOwnProperty(D)){var M=i[D];if(M!=null){if(Ar.hasOwnProperty(D))typeof M!="function"&&js(D,M);else if(i.suppressHydrationWarning!==!0)switch(D){case"children":typeof M!="string"&&typeof M!="number"||Qt("children",e.textContent,M,n);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":d=e.innerHTML,M=M?M.__html:void 0,M!=null&&(M=Sg(e,M),Qt(D,d,M,n));continue;case"style":r.delete(D),xg(e,M,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"),d=Hl(e,"class",M),Qt("className",d,M,n);continue;default:s.context===gn&&t!=="svg"&&t!=="math"?r.delete(D.toLowerCase()):r.delete(D),d=Hl(e,D,M),Qt(D,d,M,n)}}}}else for(M in i)if(i.hasOwnProperty(M)&&(D=i[M],D!=null)){if(Ar.hasOwnProperty(M))typeof D!="function"&&js(M,D);else if(i.suppressHydrationWarning!==!0)switch(M){case"children":typeof D!="string"&&typeof D!="number"||Qt("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":d=e.innerHTML,D=D?D.__html:void 0,D!=null&&(D=Sg(e,D),d!==D&&(n[M]={__html:d}));continue;case"className":Wi(e,M,"class",D,r,n);continue;case"tabIndex":Wi(e,M,"tabindex",D,r,n);continue;case"style":r.delete(M),xg(e,D,n);continue;case"multiple":r.delete(M),Qt(M,e.multiple,D,n);continue;case"muted":r.delete(M),Qt(M,e.muted,D,n);continue;case"autoFocus":r.delete("autofocus"),Qt(M,e.autofocus,D,n);continue;case"data":if(t!=="object"){r.delete(M),d=e.getAttribute("data"),Qt(M,d,D,n);continue}case"src":case"href":if(!(D!==""||t==="a"&&M==="href"||t==="object"&&M==="data")){console.error(M==="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.',M,M);continue}ef(e,M,M,D,r,n);continue;case"action":case"formAction":if(d=e.getAttribute(M),typeof D=="function"){r.delete(M.toLowerCase()),M==="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(d===pE){r.delete(M.toLowerCase()),Qt(M,"function",D,n);continue}ef(e,M,M.toLowerCase(),D,r,n);continue;case"xlinkHref":ef(e,M,"xlink:href",D,r,n);continue;case"contentEditable":Zd(e,M,"contenteditable",D,r,n);continue;case"spellCheck":Zd(e,M,"spellcheck",D,r,n);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Zd(e,M,M,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":Cg(e,M,M.toLowerCase(),D,r,n);continue;case"capture":case"download":e:{_=e;var K=d=M,te=n;if(r.delete(K),_=_.getAttribute(K),_===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&&_==="")break e;break;default:if(je(D,d),_===""+D)break e}Qt(d,_,D,te)}continue;case"cols":case"rows":case"size":case"span":e:{if(_=e,K=d=M,te=n,r.delete(K),_=_.getAttribute(K),_===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)&&(je(D,d),_===""+D))break e}Qt(d,_,D,te)}continue;case"rowSpan":Ag(e,M,"rowspan",D,r,n);continue;case"start":Ag(e,M,M,D,r,n);continue;case"xHeight":Wi(e,M,"x-height",D,r,n);continue;case"xlinkActuate":Wi(e,M,"xlink:actuate",D,r,n);continue;case"xlinkArcrole":Wi(e,M,"xlink:arcrole",D,r,n);continue;case"xlinkRole":Wi(e,M,"xlink:role",D,r,n);continue;case"xlinkShow":Wi(e,M,"xlink:show",D,r,n);continue;case"xlinkTitle":Wi(e,M,"xlink:title",D,r,n);continue;case"xlinkType":Wi(e,M,"xlink:type",D,r,n);continue;case"xmlBase":Wi(e,M,"xml:base",D,r,n);continue;case"xmlLang":Wi(e,M,"xml:lang",D,r,n);continue;case"xmlSpace":Wi(e,M,"xml:space",D,r,n);continue;case"inert":D!==""||qu[M]||(qu[M]=!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.",M)),Cg(e,M,M,D,r,n);continue;default:if(!(2<M.length)||M[0]!=="o"&&M[0]!=="O"||M[1]!=="n"&&M[1]!=="N"){_=kp(M),d=!1,s.context===gn&&t!=="svg"&&t!=="math"?r.delete(_.toLowerCase()):(K=M.toLowerCase(),K=iu.hasOwnProperty(K)&&iu[K]||null,K!==null&&K!==M&&(d=!0,r.delete(K)),r.delete(_));e:if(K=e,te=_,_=D,_s(te))if(K.hasAttribute(te))K=K.getAttribute(te),je(_,te),_=K===""+_?_:K;else{switch(typeof _){case"function":case"symbol":break e;case"boolean":if(K=te.toLowerCase().slice(0,5),K!=="data-"&&K!=="aria-")break e}_=_===void 0?void 0:null}else _=void 0;d||Qt(M,_,D,n)}}}return 0<r.size&&i.suppressHydrationWarning!==!0&&Zy(e,r,n),Object.keys(n).length===0?null:n}function tS(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 kg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iS(){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,d=n.initiatorType,_=n.duration;if(r&&_&&kg(d)){for(d=0,_=n.responseEnd,s+=1;s<i.length;s++){var D=i[s],M=D.startTime;if(M>_)break;var K=D.transferSize,te=D.initiatorType;K&&kg(te)&&(D=D.responseEnd,d+=K*(D<_?1:(_-M)/(D-M)))}if(--s,t+=8*(r+d)/(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 Jc(e){return e.nodeType===9?e:e.ownerDocument}function Vg(e){switch(e){case xo:return ta;case tu:return Wu;default:return gn}}function Rg(e,t){if(e===gn)switch(t){case"svg":return ta;case"math":return Wu;default:return gn}return e===ta&&t==="foreignObject"?gn:e}function tf(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 sS(){var e=window.event;return e&&e.type==="popstate"?e===Hm?!1:(Hm=e,!0):(Hm=null,!1)}function Oa(){var e=window.event;return e&&e!==Vl?e.type:null}function ja(){var e=window.event;return e&&e!==Vl?e.timeStamp:-1.1}function nS(e){setTimeout(function(){throw e})}function rS(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 oS(){}function aS(e,t,i,s){eS(e,t,i,s),e[mi]=s}function Tg(e){la(e,"")}function lS(e,t,i){e.nodeValue=i}function Mg(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,ce(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,ce(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 jn(e){return e==="head"}function cS(e,t){e.removeChild(t)}function uS(e,t){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(t)}function Og(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===kl||i===Pu){if(s===0){e.removeChild(n),_o(t);return}s--}else if(i===Dl||i===nr||i===Fr||i===ea||i===Wr)s++;else if(i===vE)La(e.ownerDocument.documentElement);else if(i===_E){i=e.ownerDocument.head,La(i);for(var r=i.firstChild;r;){var d=r.nextSibling,_=r.nodeName;r[$a]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&r.rel.toLowerCase()==="stylesheet"||i.removeChild(r),r=d}}else i===gE&&La(e.ownerDocument.body);i=n}while(i);_o(t)}function jg(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===kl){if(e===0)break;e--}else i!==Dl&&i!==nr&&i!==Fr&&i!==ea||e++;i=s}while(i)}function hS(e){jg(e,!0)}function dS(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function fS(e){e.nodeValue=""}function mS(e){jg(e,!1)}function pS(e,t){t=t[wE],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function bS(e,t){e.nodeValue=t}function sf(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":sf(i),se(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function vS(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[$a])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"){je(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=ji(e.nextSibling),e===null)break}return null}function gS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=ji(e.nextSibling),e===null))return null;return e}function Lg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ji(e.nextSibling),e===null))return null;return e}function nf(e){return e.data===nr||e.data===Fr}function rf(e){return e.data===ea||e.data===nr&&e.ownerDocument.readyState!==x0}function _S(e,t){var i=e.ownerDocument;if(e.data===Fr)e._reactRetry=t;else if(e.data!==nr||i.readyState!==x0)t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function ji(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===Dl||t===ea||t===nr||t===Fr||t===Wr||t===Lm||t===E0)break;if(t===kl||t===Pu)return null}}return e}function Bg(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[Eg(r.name)]=r.name.toLowerCase()==="style"?Kd(e):r.value}return{type:t,props:i}}return e.nodeType===8?e.data===Wr?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function Jg(e,t,i){return i===null||i[bE]!==!0?(e.nodeValue===t?e=null:(t=On(t),e=On(e.nodeValue)===t?null:e.nodeValue),e):null}function of(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i===kl||i===Pu){if(t===0)return ji(e.nextSibling);t--}else i!==Dl&&i!==ea&&i!==nr&&i!==Fr&&i!==Wr||t++}e=e.nextSibling}return null}function Hg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i===Dl||i===ea||i===nr||i===Fr||i===Wr){if(t===0)return e;t--}else i!==kl&&i!==Pu||t++}e=e.previousSibling}return null}function wS(e){_o(e)}function yS(e){_o(e)}function SS(e){_o(e)}function Ug(e,t,i,s,n){switch(n&&ph(e,s.ancestorInfo),t=Jc(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 NS(e,t,i,s){if(!i[Hn]&&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 La(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);se(e)}function Hc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function zg(e,t,i){var s=ia;if(s&&typeof t=="string"&&t){var n=Pi(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof i=="string"&&(n+='[crossorigin="'+i+'"]'),R0.has(n)||(R0.add(n),e={rel:e,crossOrigin:i,href:t},s.querySelector(n)===null&&(t=s.createElement("link"),ni(t,"link",e),Te(t),s.head.appendChild(t)))}}function Ig(e,t,i,s){var n=(n=Bn.current)?Hc(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=vo(i.href),t=Pe(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=vo(i.href);var r=Pe(n).hoistableStyles,d=r.get(e);if(!d&&(n=n.ownerDocument||n,d={type:"stylesheet",instance:null,count:0,state:{loading:Yr,preload:null}},r.set(e,d),(r=n.querySelector(Ba(e)))&&!r._p&&(d.instance=r,d.state.loading=Rl|ns),!rs.has(e))){var _={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy};rs.set(e,_),r||ES(n,e,_,d.state)}if(t&&s===null)throw i=`
222
-
223
- - `+Uc(t)+`
224
- + `+Uc(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 d}if(t&&s!==null)throw i=`
225
-
226
- - `+Uc(t)+`
227
- + `+Uc(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=go(i),t=Pe(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 Uc(e){var t=0,i="<link";return typeof e.rel=="string"?(t++,i+=' rel="'+e.rel+'"'):hs.call(e,"rel")&&(t++,i+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(t++,i+=' href="'+e.href+'"'):hs.call(e,"href")&&(t++,i+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(t++,i+=' precedence="'+e.precedence+'"'):hs.call(e,"precedence")&&(t++,i+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>t&&(i+=" ..."),i+" />"}function vo(e){return'href="'+Pi(e)+'"'}function Ba(e){return'link[rel="stylesheet"]['+e+"]"}function $g(e){return tt({},e,{"data-precedence":e.precedence,precedence:null})}function ES(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=Rl:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=Rl}),t.addEventListener("error",function(){return s.loading|=k0}),ni(t,"link",i),Te(t),e.head.appendChild(t))}function go(e){return'[src="'+Pi(e)+'"]'}function Ja(e){return"script[async]"+e}function qg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Pi(i.href)+'"]');if(s)return t.instance=s,Te(s),s;var n=tt({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Te(s),ni(s,"style",n),zc(s,i.precedence,e),t.instance=s;case"stylesheet":n=vo(i.href);var r=e.querySelector(Ba(n));if(r)return t.state.loading|=ns,t.instance=r,Te(r),r;s=$g(i),(n=rs.get(n))&&af(s,n),r=(e.ownerDocument||e).createElement("link"),Te(r);var d=r;return d._p=new Promise(function(_,D){d.onload=_,d.onerror=D}),ni(r,"link",s),t.state.loading|=ns,zc(r,i.precedence,e),t.instance=r;case"script":return r=go(i.src),(n=e.querySelector(Ja(r)))?(t.instance=n,Te(n),n):(s=i,(n=rs.get(r))&&(s=tt({},i),lf(s,n)),e=e.ownerDocument||e,n=e.createElement("script"),Te(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&ns)===Yr&&(s=t.instance,t.state.loading|=ns,zc(s,i.precedence,e));return t.instance}function zc(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,d=0;d<s.length;d++){var _=s[d];if(_.dataset.precedence===t)r=_;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 af(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function lf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}function Pg(e,t,i){if(Fu===null){var s=new Map,n=Fu=new Map;n.set(i,s)}else n=Fu,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[$a]||r[ri]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!==xo){var d=r.getAttribute(t)||"";d=e+d;var _=s.get(d);_?_.push(r):s.set(d,[r])}}return s}function Wg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function xS(e,t,i){var s=!i.ancestorInfo.containerTagInScope;if(i.context===ta||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=tS(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 Fg(e){return!(e.type==="stylesheet"&&(e.state.loading&V0)===Yr)}function CS(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&ns)===Yr){if(i.instance===null){var n=vo(s.href),r=t.querySelector(Ba(n));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ic.bind(e),t.then(e,e)),i.state.loading|=ns,i.instance=r,Te(r);return}r=t.ownerDocument||t,s=$g(s),(n=rs.get(n))&&af(s,n),r=r.createElement("link"),Te(r);var d=r;d._p=new Promise(function(_,D){d.onload=_,d.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&V0)===Yr&&(e.count++,i=Ic.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}function AS(e,t){return e.stylesheets&&e.count===0&&$c(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&$c(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},NE+t);0<e.imgBytes&&zm===0&&(zm=125*iS()*xE);var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$c(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>zm?50:EE)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(n)}}:null}function Ic(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$c(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function $c(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Gu=new Map,t.forEach(DS,e),Gu=null,Ic.call(e))}function DS(e,t){if(!(t.state.loading&ns)){var i=Gu.get(e);if(i)var s=i.get(Im);else{i=new Map,Gu.set(e,i);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<n.length;r++){var d=n[r];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(i.set(d.dataset.precedence,d),s=d)}s&&i.set(Im,s)}n=t.instance,d=n.getAttribute("data-precedence"),r=i.get(d)||s,r===s&&i.set(Im,n),i.set(d,n),this.count++,s=Ic.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|=ns}}function kS(e,t,i,s,n,r,d,_,D){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Gr,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=d,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 Gg(e,t,i,s,n,r,d,_,D,M,K,te){return e=new kS(e,t,i,d,D,M,K,te,_),t=YN,r===!0&&(t|=ci|ds),t|=Ye,r=m(3,null,null,t),e.current=r,r.stateNode=e,t=jh(),wr(t),e.pooledCache=t,wr(t),r.memoizedState={element:s,isDehydrated:i,cache:t},Uh(r),e}function Yg(e){return e?(e=$n,e):$n}function cf(e,t,i,s,n,r){if(li&&typeof li.onScheduleFiberRoot=="function")try{li.onScheduleFiberRoot(No,s,i)}catch(d){Hs||(Hs=!0,console.error("React instrumentation encountered an error: %o",d))}n=Yg(n),s.context===null?s.context=n:s.pendingContext=n,Js&&Bi!==null&&!j0&&(j0=!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.`,V(Bi)||"Unknown")),s=Dn(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=kn(e,s,t),i!==null&&(Ns(t,"root.render()",null),Rt(i,e,t),ga(i,e,t))}function Xg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function uf(e,t){Xg(e,t),(e=e.alternate)&&Xg(e,t)}function Qg(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&Rt(t,e,67108864),uf(e,67108864)}}function Kg(e){if(e.tag===13||e.tag===31){var t=Oi(e);t=gs(t);var i=ai(e,t);i!==null&&Rt(i,e,t),uf(e,t)}}function VS(){return Bi}function RS(e,t,i,s){var n=de.T;de.T=null;var r=ft.p;try{ft.p=Fi,hf(e,t,i,s)}finally{ft.p=r,de.T=n}}function TS(e,t,i,s){var n=de.T;de.T=null;var r=ft.p;try{ft.p=zs,hf(e,t,i,s)}finally{ft.p=r,de.T=n}}function hf(e,t,i,s){if(Xu){var n=df(s);if(n===null)Yd(e,t,s,Qu,i),e_(e,s);else if(MS(n,e,t,i,s))s.stopPropagation();else if(e_(e,s),t&4&&-1<AE.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 d=ve(r.pendingLanes);if(d!==0){var _=r;for(_.pendingLanes|=2,_.entangledLanes|=2;d;){var D=1<<31-fi(d);_.entanglements[1]|=D,d&=~D}Os(r),(lt&(Xt|zi))===ti&&(Mu=Kt()+c0,Ta(0))}}break;case 31:case 13:_=ai(r,2),_!==null&&Rt(_,r,2),mo(),uf(r,2)}if(r=df(s),r===null&&Yd(e,t,s,Qu,i),r===n)break;n=r}n!==null&&s.stopPropagation()}else Yd(e,t,s,null,i)}}function df(e){return e=bh(e),ff(e)}function ff(e){if(Qu=null,e=we(e),e!==null){var t=u(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=l(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 Qu=e,null}function Zg(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 Fi;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 zs;case"message":switch($S()){case Af:return Fi;case Df:return zs;case So:case qS:return nn;case kf:return Zc;default:return nn}default:return nn}}function e_(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":Ml.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ol.delete(t.pointerId)}}function Ha(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&&Qg(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function MS(e,t,i,s,n){switch(t){case"focusin":return rr=Ha(rr,e,t,i,s,n),!0;case"dragenter":return or=Ha(or,e,t,i,s,n),!0;case"mouseover":return ar=Ha(ar,e,t,i,s,n),!0;case"pointerover":var r=n.pointerId;return Ml.set(r,Ha(Ml.get(r)||null,e,t,i,s,n)),!0;case"gotpointercapture":return r=n.pointerId,Ol.set(r,Ha(Ol.get(r)||null,e,t,i,s,n)),!0}return!1}function t_(e){var t=we(e.target);if(t!==null){var i=u(t);if(i!==null){if(t=i.tag,t===13){if(t=o(i),t!==null){e.blockedOn=t,O(e.priority,function(){Kg(i)});return}}else if(t===31){if(t=l(i),t!==null){e.blockedOn=t,O(e.priority,function(){Kg(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 qc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=df(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i),n=s;qa!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),qa=n,i.target.dispatchEvent(s),qa===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."),qa=null}else return t=Se(i),t!==null&&Qg(t),e.blockedOn=i,!1;t.shift()}return!0}function i_(e,t,i){qc(e)&&i.delete(t)}function OS(){$m=!1,rr!==null&&qc(rr)&&(rr=null),or!==null&&qc(or)&&(or=null),ar!==null&&qc(ar)&&(ar=null),Ml.forEach(i_),Ol.forEach(i_)}function Pc(e,t){e.blockedOn===t&&(e.blockedOn=null,$m||($m=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,OS)))}function s_(e){Ku!==e&&(Ku=e,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,function(){Ku===e&&(Ku=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(ff(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),dd(r,i,s,n))}}))}function _o(e){function t(D){return Pc(D,e)}rr!==null&&Pc(rr,e),or!==null&&Pc(or,e),ar!==null&&Pc(ar,e),Ml.forEach(t),Ol.forEach(t);for(var i=0;i<lr.length;i++){var s=lr[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<lr.length&&(i=lr[0],i.blockedOn===null);)t_(i),i.blockedOn===null&&lr.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],d=n[mi]||null;if(typeof r=="function")d||s_(i);else if(d){var _=null;if(r&&r.hasAttribute("formAction")){if(n=r,d=r[mi]||null)_=d.formAction;else if(ff(n)!==null)continue}else _=d.action;typeof _=="function"?i[s+1]=_:(i.splice(s,3),s-=3),s_(i)}}}function n_(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(d){return n=d})},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 mf(e){this._internalRoot=e}function Wc(e){this._internalRoot=e}function r_(e){e[Hn]&&(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 Ht=jE(),pf=sh(),jS=BE(),tt=Object.assign,LS=Symbol.for("react.element"),Ls=Symbol.for("react.transitional.element"),wo=Symbol.for("react.portal"),yo=Symbol.for("react.fragment"),Fc=Symbol.for("react.strict_mode"),bf=Symbol.for("react.profiler"),vf=Symbol.for("react.consumer"),Bs=Symbol.for("react.context"),Ua=Symbol.for("react.forward_ref"),gf=Symbol.for("react.suspense"),_f=Symbol.for("react.suspense_list"),Gc=Symbol.for("react.memo"),Li=Symbol.for("react.lazy"),wf=Symbol.for("react.activity"),BS=Symbol.for("react.memo_cache_sentinel"),o_=Symbol.iterator,JS=Symbol.for("react.client.reference"),Gt=Array.isArray,de=pf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ft=jS.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,HS=Object.freeze({pending:!1,data:null,method:null,action:null}),yf=[],Sf=[],sn=-1,Ln=J(null),za=J(null),Bn=J(null),Yc=J(null),Ia=0,a_,l_,c_,u_,h_,d_,f_;z.__reactDisabledLog=!0;var Nf,m_,Ef=!1,xf=new(typeof WeakMap=="function"?WeakMap:Map),Bi=null,Js=!1,hs=Object.prototype.hasOwnProperty,Cf=Ht.unstable_scheduleCallback,US=Ht.unstable_cancelCallback,zS=Ht.unstable_shouldYield,IS=Ht.unstable_requestPaint,Kt=Ht.unstable_now,$S=Ht.unstable_getCurrentPriorityLevel,Af=Ht.unstable_ImmediatePriority,Df=Ht.unstable_UserBlockingPriority,So=Ht.unstable_NormalPriority,qS=Ht.unstable_LowPriority,kf=Ht.unstable_IdlePriority,PS=Ht.log,WS=Ht.unstable_setDisableYieldValue,No=null,li=null,Hs=!1,Us=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",fi=Math.clz32?Math.clz32:Nt,FS=Math.log,GS=Math.LN2,Xc=256,Qc=262144,Kc=4194304,Fi=2,zs=8,nn=32,Zc=268435456,Jn=Math.random().toString(36).slice(2),ri="__reactFiber$"+Jn,mi="__reactProps$"+Jn,Hn="__reactContainer$"+Jn,Vf="__reactEvents$"+Jn,YS="__reactListeners$"+Jn,XS="__reactHandles$"+Jn,p_="__reactResources$"+Jn,$a="__reactMarker$"+Jn,b_=new Set,Ar={},Rf={},QS={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},KS=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]*$"),v_={},g_={},ZS=/[\n"\\]/g,__=!1,w_=!1,y_=!1,S_=!1,N_=!1,E_=!1,x_=["value","defaultValue"],C_=!1,A_=/["'&<>\n\t]|^\s|\s$/,eN="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(" "),D_="applet caption html table td th marquee object template foreignObject desc title".split(" "),tN=D_.concat(["button"]),iN="dd dt li option optgroup p rp rt".split(" "),k_={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},eu={},Tf={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"]},V_=/([A-Z])/g,R_=/^ms-/,sN=/^(?:webkit|moz|o)[A-Z]/,nN=/^-ms-/,rN=/-(.)/g,T_=/;\s*$/,Eo={},Mf={},M_=!1,O_=!1,j_=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(" ")),tu="http://www.w3.org/1998/Math/MathML",xo="http://www.w3.org/2000/svg",oN=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"]]),iu={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"},L_={"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},Co={},aN=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]*$"),lN=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]*$"),B_=!1,pi={},J_=/^on./,cN=/^on[^A-Z]/,uN=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]*$"),hN=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]*$"),dN=/^[\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,qa=null,Ao=null,Do=null,Of=!1,Is=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jf=!1;if(Is)try{var Pa={};Object.defineProperty(Pa,"passive",{get:function(){jf=!0}}),window.addEventListener("test",Pa,Pa),window.removeEventListener("test",Pa,Pa)}catch{jf=!1}var Un=null,Lf=null,su=null,Dr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nu=yi(Dr),Wa=tt({},Dr,{view:0,detail:0}),fN=yi(Wa),Bf,Jf,Fa,ru=tt({},Wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vh,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!==Fa&&(Fa&&e.type==="mousemove"?(Bf=e.screenX-Fa.screenX,Jf=e.screenY-Fa.screenY):Jf=Bf=0,Fa=e),Bf)},movementY:function(e){return"movementY"in e?e.movementY:Jf}}),H_=yi(ru),mN=tt({},ru,{dataTransfer:0}),pN=yi(mN),bN=tt({},Wa,{relatedTarget:0}),Hf=yi(bN),vN=tt({},Dr,{animationName:0,elapsedTime:0,pseudoElement:0}),gN=yi(vN),_N=tt({},Dr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wN=yi(_N),yN=tt({},Dr,{data:0}),U_=yi(yN),SN=U_,NN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EN={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"},xN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},CN=tt({},Wa,{key:function(e){if(e.key){var t=NN[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ql(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?EN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vh,charCode:function(e){return e.type==="keypress"?ql(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ql(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),AN=yi(CN),DN=tt({},ru,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z_=yi(DN),kN=tt({},Wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vh}),VN=yi(kN),RN=tt({},Dr,{propertyName:0,elapsedTime:0,pseudoElement:0}),TN=yi(RN),MN=tt({},ru,{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}),ON=yi(MN),jN=tt({},Dr,{newState:0,oldState:0}),LN=yi(jN),BN=[9,13,27,32],I_=229,Uf=Is&&"CompositionEvent"in window,Ga=null;Is&&"documentMode"in document&&(Ga=document.documentMode);var JN=Is&&"TextEvent"in window&&!Ga,$_=Is&&(!Uf||Ga&&8<Ga&&11>=Ga),q_=32,P_=String.fromCharCode(q_),W_=!1,ko=!1,HN={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},Ya=null,Xa=null,F_=!1;Is&&(F_=ry("input")&&(!document.documentMode||9<document.documentMode));var bi=typeof Object.is=="function"?Object.is:hy,UN=Is&&"documentMode"in document&&11>=document.documentMode,Vo=null,zf=null,Qa=null,If=!1,Ro={animationend:fr("Animation","AnimationEnd"),animationiteration:fr("Animation","AnimationIteration"),animationstart:fr("Animation","AnimationStart"),transitionrun:fr("Transition","TransitionRun"),transitionstart:fr("Transition","TransitionStart"),transitioncancel:fr("Transition","TransitionCancel"),transitionend:fr("Transition","TransitionEnd")},$f={},G_={};Is&&(G_=document.createElement("div").style,"AnimationEvent"in window||(delete Ro.animationend.animation,delete Ro.animationiteration.animation,delete Ro.animationstart.animation),"TransitionEvent"in window||delete Ro.transitionend.transition);var Y_=mr("animationend"),X_=mr("animationiteration"),Q_=mr("animationstart"),zN=mr("transitionrun"),IN=mr("transitionstart"),$N=mr("transitioncancel"),K_=mr("transitionend"),Z_=new Map,qf="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(" ");qf.push("scrollEnd");var ew=0;if(typeof performance=="object"&&typeof performance.now=="function")var qN=performance,tw=function(){return qN.now()};else{var PN=Date;tw=function(){return PN.now()}}var Pf=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)},WN="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.",ou=0,Wf=1,Ff=2,Gf=3,au="– ",lu="+ ",iw="  ",Et=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",Gi="Components ⚛",nt="Scheduler ⚛",ot="Blocking",zn=!1,rn={color:"primary",properties:null,tooltipText:"",track:Gi},In={start:-0,end:-0,detail:{devtools:rn}},FN=["Changed Props",""],sw="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",GN=["Changed Props",sw],Ka=1,on=2,Yi=[],To=0,Yf=0,$n={};Object.freeze($n);var Xi=null,Mo=null,He=0,YN=1,Ye=2,ci=8,ds=16,XN=32,nw=!1;try{var rw=Object.preventExtensions({})}catch{nw=!0}var Xf=new WeakMap,Oo=[],jo=0,cu=null,Za=0,Qi=[],Ki=0,kr=null,an=1,ln="",oi=null,xt=null,it=!1,$s=!1,Ji=null,qn=null,Zi=!1,Qf=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."),Kf=J(null),Zf=J(null),ow={},uu=null,Lo=null,Bo=!1,QN=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()})}},KN=Ht.unstable_scheduleCallback,ZN=Ht.unstable_NormalPriority,Ut={$$typeof:Bs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},zt=Ht.unstable_now,hu=console.createTask?console.createTask:function(){return null},el=1,du=2,Zt=-0,Pn=-0,cn=-0,un=null,vi=-1.1,Vr=-0,kt=-0,Oe=-1.1,Be=-1.1,Dt=null,Tt=!1,Rr=-0,qs=-1.1,tl=null,Wn=0,em=null,tm=null,Tr=-1.1,il=null,Jo=-1.1,fu=-1.1,hn=-0,dn=-1.1,es=-1.1,im=0,sl=null,aw=null,lw=null,Fn=-1.1,Mr=null,Gn=-1.1,mu=-1.1,cw=-0,uw=-0,pu=0,eE=null,hw=0,nl=-1.1,bu=!1,vu=!1,rl=null,sm=0,Or=0,Ho=null,dw=de.S;de.S=function(e,t){if(a0=Kt(),typeof t=="object"&&t!==null&&typeof t.then=="function"){if(0>dn&&0>es){dn=zt();var i=ja(),s=Oa();(i!==Gn||s!==Mr)&&(Gn=-1.1),Fn=i,Mr=s}gy(e,t)}dw!==null&&dw(e,t)};var jr=J(null),fs={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},ol=[],al=[],ll=[],cl=[],ul=[],hl=[],Lr=new Set;fs.recordUnsafeLifecycleWarnings=function(e,t){Lr.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&ol.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillMount=="function"&&al.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&ll.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&cl.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&ul.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillUpdate=="function"&&hl.push(e))},fs.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<ol.length&&(ol.forEach(function(_){e.add(V(_)||"Component"),Lr.add(_.type)}),ol=[]);var t=new Set;0<al.length&&(al.forEach(function(_){t.add(V(_)||"Component"),Lr.add(_.type)}),al=[]);var i=new Set;0<ll.length&&(ll.forEach(function(_){i.add(V(_)||"Component"),Lr.add(_.type)}),ll=[]);var s=new Set;0<cl.length&&(cl.forEach(function(_){s.add(V(_)||"Component"),Lr.add(_.type)}),cl=[]);var n=new Set;0<ul.length&&(ul.forEach(function(_){n.add(V(_)||"Component"),Lr.add(_.type)}),ul=[]);var r=new Set;if(0<hl.length&&(hl.forEach(function(_){r.add(V(_)||"Component"),Lr.add(_.type)}),hl=[]),0<t.size){var d=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`,d)}0<s.size&&(d=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`,d)),0<r.size&&(d=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`,d)),0<e.size&&(d=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`,d)),0<i.size&&(d=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`,d)),0<n.size&&(d=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`,d))};var gu=new Map,fw=new Set;fs.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."):!fw.has(e.type)&&(s=gu.get(i),e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(s===void 0&&(s=[],gu.set(i,s)),s.push(e))},fs.flushLegacyContextWarning=function(){gu.forEach(function(e){if(e.length!==0){var t=e[0],i=new Set;e.forEach(function(n){i.add(V(n)||"Component"),fw.add(n.type)});var s=f(i);ce(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)})}})},fs.discardPendingWarnings=function(){ol=[],al=[],ll=[],cl=[],ul=[],hl=[],gu=new Map};var mw={react_stack_bottom_frame:function(e,t,i){var s=Js;Js=!0;try{return e(t,i)}finally{Js=s}}},nm=mw.react_stack_bottom_frame.bind(mw),pw={react_stack_bottom_frame:function(e){var t=Js;Js=!0;try{return e.render()}finally{Js=t}}},bw=pw.react_stack_bottom_frame.bind(pw),vw={react_stack_bottom_frame:function(e,t){try{t.componentDidMount()}catch(i){dt(e,e.return,i)}}},rm=vw.react_stack_bottom_frame.bind(vw),gw={react_stack_bottom_frame:function(e,t,i,s,n){try{t.componentDidUpdate(i,s,n)}catch(r){dt(e,e.return,r)}}},_w=gw.react_stack_bottom_frame.bind(gw),ww={react_stack_bottom_frame:function(e,t){var i=t.stack;e.componentDidCatch(t.value,{componentStack:i!==null?i:""})}},tE=ww.react_stack_bottom_frame.bind(ww),yw={react_stack_bottom_frame:function(e,t,i){try{i.componentWillUnmount()}catch(s){dt(e,t,s)}}},Sw=yw.react_stack_bottom_frame.bind(yw),Nw={react_stack_bottom_frame:function(e){var t=e.create;return e=e.inst,t=t(),e.destroy=t}},iE=Nw.react_stack_bottom_frame.bind(Nw),Ew={react_stack_bottom_frame:function(e,t,i){try{i()}catch(s){dt(e,t,s)}}},sE=Ew.react_stack_bottom_frame.bind(Ew),xw={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},nE=xw.react_stack_bottom_frame.bind(xw),Uo=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`."),om=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."),_u=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."),wu={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.')}},Br=null,dl=!1,zo=null,fl=0,Xe=null,am,Cw=am=!1,Aw={},Dw={},kw={};N=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=V(e),n=s||"null";if(!Aw[n]){Aw[n]=!0,i=i._owner,e=e._debugOwner;var r="";e&&typeof e.tag=="number"&&(n=V(e))&&(r=`
265
-
266
- Check the render method of \``+n+"`."),r||s&&(r=`
267
-
268
- Check the top-level render call using <`+s+">.");var d="";i!=null&&e!==i&&(s=null,typeof i.tag=="number"?s=V(i):typeof i.name=="string"&&(s=i.name),s&&(d=" It was passed a child from "+s+".")),ce(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,d)})}}};var Jr=yb(!0),Vw=yb(!1),Rw=0,Tw=1,Mw=2,lm=3,Yn=!1,Ow=!1,cm=null,um=!1,Io=J(null),yu=J(0),Hi=J(null),ts=null,$o=1,ml=2,Bt=J(0),Su=0,is=1,gi=2,Ui=4,_i=8,qo,jw=new Set,Lw=new Set,hm=new Set,Bw=new Set,fn=0,Ue=null,gt=null,It=null,Nu=!1,Po=!1,Hr=!1,Eu=0,pl=0,mn=null,rE=0,oE=25,ue=null,ss=null,pn=-1,bl=!1,vl={readContext:At,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};vl.useEffectEvent=Ot;var dm=null,Jw=null,fm=null,Hw=null,Ps=null,ms=null,xu=null;dm={readContext:function(e){return At(e)},use:Tn,useCallback:function(e,t){return ue="useCallback",et(),oo(t),ld(e,t)},useContext:function(e){return ue="useContext",et(),At(e)},useEffect:function(e,t){return ue="useEffect",et(),oo(t),gc(e,t)},useImperativeHandle:function(e,t,i){return ue="useImperativeHandle",et(),oo(i),ad(e,t,i)},useInsertionEffect:function(e,t){ue="useInsertionEffect",et(),oo(t),Sr(4,gi,e,t)},useLayoutEffect:function(e,t){return ue="useLayoutEffect",et(),oo(t),od(e,t)},useMemo:function(e,t){ue="useMemo",et(),oo(t);var i=de.H;de.H=Ps;try{return cd(e,t)}finally{de.H=i}},useReducer:function(e,t,i){ue="useReducer",et();var s=de.H;de.H=Ps;try{return Qh(e,t,i)}finally{de.H=s}},useRef:function(e){return ue="useRef",et(),nd(e)},useState:function(e){ue="useState",et();var t=de.H;de.H=Ps;try{return td(e)}finally{de.H=t}},useDebugValue:function(){ue="useDebugValue",et()},useDeferredValue:function(e,t){return ue="useDeferredValue",et(),ud(e,t)},useTransition:function(){return ue="useTransition",et(),fd()},useSyncExternalStore:function(e,t,i){return ue="useSyncExternalStore",et(),Zh(e,t,i)},useId:function(){return ue="useId",et(),md()},useFormState:function(e,t){return ue="useFormState",et(),fc(),lo(e,t)},useActionState:function(e,t){return ue="useActionState",et(),lo(e,t)},useOptimistic:function(e){return ue="useOptimistic",et(),id(e)},useHostTransitionStatus:Nr,useMemoCache:yr,useCacheRefresh:function(){return ue="useCacheRefresh",et(),pd()},useEffectEvent:function(e){return ue="useEffectEvent",et(),rd(e)}},Jw={readContext:function(e){return At(e)},use:Tn,useCallback:function(e,t){return ue="useCallback",_e(),ld(e,t)},useContext:function(e){return ue="useContext",_e(),At(e)},useEffect:function(e,t){return ue="useEffect",_e(),gc(e,t)},useImperativeHandle:function(e,t,i){return ue="useImperativeHandle",_e(),ad(e,t,i)},useInsertionEffect:function(e,t){ue="useInsertionEffect",_e(),Sr(4,gi,e,t)},useLayoutEffect:function(e,t){return ue="useLayoutEffect",_e(),od(e,t)},useMemo:function(e,t){ue="useMemo",_e();var i=de.H;de.H=Ps;try{return cd(e,t)}finally{de.H=i}},useReducer:function(e,t,i){ue="useReducer",_e();var s=de.H;de.H=Ps;try{return Qh(e,t,i)}finally{de.H=s}},useRef:function(e){return ue="useRef",_e(),nd(e)},useState:function(e){ue="useState",_e();var t=de.H;de.H=Ps;try{return td(e)}finally{de.H=t}},useDebugValue:function(){ue="useDebugValue",_e()},useDeferredValue:function(e,t){return ue="useDeferredValue",_e(),ud(e,t)},useTransition:function(){return ue="useTransition",_e(),fd()},useSyncExternalStore:function(e,t,i){return ue="useSyncExternalStore",_e(),Zh(e,t,i)},useId:function(){return ue="useId",_e(),md()},useActionState:function(e,t){return ue="useActionState",_e(),lo(e,t)},useFormState:function(e,t){return ue="useFormState",_e(),fc(),lo(e,t)},useOptimistic:function(e){return ue="useOptimistic",_e(),id(e)},useHostTransitionStatus:Nr,useMemoCache:yr,useCacheRefresh:function(){return ue="useCacheRefresh",_e(),pd()},useEffectEvent:function(e){return ue="useEffectEvent",_e(),rd(e)}},fm={readContext:function(e){return At(e)},use:Tn,useCallback:function(e,t){return ue="useCallback",_e(),yc(e,t)},useContext:function(e){return ue="useContext",_e(),At(e)},useEffect:function(e,t){ue="useEffect",_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return ue="useImperativeHandle",_e(),wc(e,t,i)},useInsertionEffect:function(e,t){return ue="useInsertionEffect",_e(),Si(4,gi,e,t)},useLayoutEffect:function(e,t){return ue="useLayoutEffect",_e(),Si(4,Ui,e,t)},useMemo:function(e,t){ue="useMemo",_e();var i=de.H;de.H=ms;try{return Sc(e,t)}finally{de.H=i}},useReducer:function(e,t,i){ue="useReducer",_e();var s=de.H;de.H=ms;try{return ao(e,t,i)}finally{de.H=s}},useRef:function(){return ue="useRef",_e(),mt().memoizedState},useState:function(){ue="useState",_e();var e=de.H;de.H=ms;try{return ao(cs)}finally{de.H=e}},useDebugValue:function(){ue="useDebugValue",_e()},useDeferredValue:function(e,t){return ue="useDeferredValue",_e(),$b(e,t)},useTransition:function(){return ue="useTransition",_e(),Yb()},useSyncExternalStore:function(e,t,i){return ue="useSyncExternalStore",_e(),pc(e,t,i)},useId:function(){return ue="useId",_e(),mt().memoizedState},useFormState:function(e){return ue="useFormState",_e(),fc(),bc(e)},useActionState:function(e){return ue="useActionState",_e(),bc(e)},useOptimistic:function(e,t){return ue="useOptimistic",_e(),Mb(e,t)},useHostTransitionStatus:Nr,useMemoCache:yr,useCacheRefresh:function(){return ue="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return ue="useEffectEvent",_e(),_c(e)}},Hw={readContext:function(e){return At(e)},use:Tn,useCallback:function(e,t){return ue="useCallback",_e(),yc(e,t)},useContext:function(e){return ue="useContext",_e(),At(e)},useEffect:function(e,t){ue="useEffect",_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return ue="useImperativeHandle",_e(),wc(e,t,i)},useInsertionEffect:function(e,t){return ue="useInsertionEffect",_e(),Si(4,gi,e,t)},useLayoutEffect:function(e,t){return ue="useLayoutEffect",_e(),Si(4,Ui,e,t)},useMemo:function(e,t){ue="useMemo",_e();var i=de.H;de.H=xu;try{return Sc(e,t)}finally{de.H=i}},useReducer:function(e,t,i){ue="useReducer",_e();var s=de.H;de.H=xu;try{return Sa(e,t,i)}finally{de.H=s}},useRef:function(){return ue="useRef",_e(),mt().memoizedState},useState:function(){ue="useState",_e();var e=de.H;de.H=xu;try{return Sa(cs)}finally{de.H=e}},useDebugValue:function(){ue="useDebugValue",_e()},useDeferredValue:function(e,t){return ue="useDeferredValue",_e(),qb(e,t)},useTransition:function(){return ue="useTransition",_e(),Xb()},useSyncExternalStore:function(e,t,i){return ue="useSyncExternalStore",_e(),pc(e,t,i)},useId:function(){return ue="useId",_e(),mt().memoizedState},useFormState:function(e){return ue="useFormState",_e(),fc(),vc(e)},useActionState:function(e){return ue="useActionState",_e(),vc(e)},useOptimistic:function(e,t){return ue="useOptimistic",_e(),jb(e,t)},useHostTransitionStatus:Nr,useMemoCache:yr,useCacheRefresh:function(){return ue="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return ue="useEffectEvent",_e(),_c(e)}},Ps={readContext:function(e){return b(),At(e)},use:function(e){return c(),Tn(e)},useCallback:function(e,t){return ue="useCallback",c(),et(),ld(e,t)},useContext:function(e){return ue="useContext",c(),et(),At(e)},useEffect:function(e,t){return ue="useEffect",c(),et(),gc(e,t)},useImperativeHandle:function(e,t,i){return ue="useImperativeHandle",c(),et(),ad(e,t,i)},useInsertionEffect:function(e,t){ue="useInsertionEffect",c(),et(),Sr(4,gi,e,t)},useLayoutEffect:function(e,t){return ue="useLayoutEffect",c(),et(),od(e,t)},useMemo:function(e,t){ue="useMemo",c(),et();var i=de.H;de.H=Ps;try{return cd(e,t)}finally{de.H=i}},useReducer:function(e,t,i){ue="useReducer",c(),et();var s=de.H;de.H=Ps;try{return Qh(e,t,i)}finally{de.H=s}},useRef:function(e){return ue="useRef",c(),et(),nd(e)},useState:function(e){ue="useState",c(),et();var t=de.H;de.H=Ps;try{return td(e)}finally{de.H=t}},useDebugValue:function(){ue="useDebugValue",c(),et()},useDeferredValue:function(e,t){return ue="useDeferredValue",c(),et(),ud(e,t)},useTransition:function(){return ue="useTransition",c(),et(),fd()},useSyncExternalStore:function(e,t,i){return ue="useSyncExternalStore",c(),et(),Zh(e,t,i)},useId:function(){return ue="useId",c(),et(),md()},useFormState:function(e,t){return ue="useFormState",c(),et(),lo(e,t)},useActionState:function(e,t){return ue="useActionState",c(),et(),lo(e,t)},useOptimistic:function(e){return ue="useOptimistic",c(),et(),id(e)},useMemoCache:function(e){return c(),yr(e)},useHostTransitionStatus:Nr,useCacheRefresh:function(){return ue="useCacheRefresh",et(),pd()},useEffectEvent:function(e){return ue="useEffectEvent",c(),et(),rd(e)}},ms={readContext:function(e){return b(),At(e)},use:function(e){return c(),Tn(e)},useCallback:function(e,t){return ue="useCallback",c(),_e(),yc(e,t)},useContext:function(e){return ue="useContext",c(),_e(),At(e)},useEffect:function(e,t){ue="useEffect",c(),_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return ue="useImperativeHandle",c(),_e(),wc(e,t,i)},useInsertionEffect:function(e,t){return ue="useInsertionEffect",c(),_e(),Si(4,gi,e,t)},useLayoutEffect:function(e,t){return ue="useLayoutEffect",c(),_e(),Si(4,Ui,e,t)},useMemo:function(e,t){ue="useMemo",c(),_e();var i=de.H;de.H=ms;try{return Sc(e,t)}finally{de.H=i}},useReducer:function(e,t,i){ue="useReducer",c(),_e();var s=de.H;de.H=ms;try{return ao(e,t,i)}finally{de.H=s}},useRef:function(){return ue="useRef",c(),_e(),mt().memoizedState},useState:function(){ue="useState",c(),_e();var e=de.H;de.H=ms;try{return ao(cs)}finally{de.H=e}},useDebugValue:function(){ue="useDebugValue",c(),_e()},useDeferredValue:function(e,t){return ue="useDeferredValue",c(),_e(),$b(e,t)},useTransition:function(){return ue="useTransition",c(),_e(),Yb()},useSyncExternalStore:function(e,t,i){return ue="useSyncExternalStore",c(),_e(),pc(e,t,i)},useId:function(){return ue="useId",c(),_e(),mt().memoizedState},useFormState:function(e){return ue="useFormState",c(),_e(),bc(e)},useActionState:function(e){return ue="useActionState",c(),_e(),bc(e)},useOptimistic:function(e,t){return ue="useOptimistic",c(),_e(),Mb(e,t)},useMemoCache:function(e){return c(),yr(e)},useHostTransitionStatus:Nr,useCacheRefresh:function(){return ue="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return ue="useEffectEvent",c(),_e(),_c(e)}},xu={readContext:function(e){return b(),At(e)},use:function(e){return c(),Tn(e)},useCallback:function(e,t){return ue="useCallback",c(),_e(),yc(e,t)},useContext:function(e){return ue="useContext",c(),_e(),At(e)},useEffect:function(e,t){ue="useEffect",c(),_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return ue="useImperativeHandle",c(),_e(),wc(e,t,i)},useInsertionEffect:function(e,t){return ue="useInsertionEffect",c(),_e(),Si(4,gi,e,t)},useLayoutEffect:function(e,t){return ue="useLayoutEffect",c(),_e(),Si(4,Ui,e,t)},useMemo:function(e,t){ue="useMemo",c(),_e();var i=de.H;de.H=ms;try{return Sc(e,t)}finally{de.H=i}},useReducer:function(e,t,i){ue="useReducer",c(),_e();var s=de.H;de.H=ms;try{return Sa(e,t,i)}finally{de.H=s}},useRef:function(){return ue="useRef",c(),_e(),mt().memoizedState},useState:function(){ue="useState",c(),_e();var e=de.H;de.H=ms;try{return Sa(cs)}finally{de.H=e}},useDebugValue:function(){ue="useDebugValue",c(),_e()},useDeferredValue:function(e,t){return ue="useDeferredValue",c(),_e(),qb(e,t)},useTransition:function(){return ue="useTransition",c(),_e(),Xb()},useSyncExternalStore:function(e,t,i){return ue="useSyncExternalStore",c(),_e(),pc(e,t,i)},useId:function(){return ue="useId",c(),_e(),mt().memoizedState},useFormState:function(e){return ue="useFormState",c(),_e(),vc(e)},useActionState:function(e){return ue="useActionState",c(),_e(),vc(e)},useOptimistic:function(e,t){return ue="useOptimistic",c(),_e(),jb(e,t)},useMemoCache:function(e){return c(),yr(e)},useHostTransitionStatus:Nr,useCacheRefresh:function(){return ue="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return ue="useEffectEvent",c(),_e(),_c(e)}};var Uw={},zw=new Set,Iw=new Set,$w=new Set,qw=new Set,Pw=new Set,Ww=new Set,Fw=new Set,Gw=new Set,Yw=new Set,Xw=new Set;Object.freeze(Uw);var mm={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Oi(e),n=Dn(s);n.payload=t,i!=null&&(vd(i),n.callback=i),t=kn(e,n,s),t!==null&&(Ns(s,"this.setState()",e),Rt(t,e,s),ga(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Oi(e),n=Dn(s);n.tag=Tw,n.payload=t,i!=null&&(vd(i),n.callback=i),t=kn(e,n,s),t!==null&&(Ns(s,"this.replaceState()",e),Rt(t,e,s),ga(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Oi(e),s=Dn(i);s.tag=Mw,t!=null&&(vd(t),s.callback=t),t=kn(e,s,i),t!==null&&(Ns(i,"this.forceUpdate()",e),Rt(t,e,i),ga(t,e,i))}},Wo=null,pm=null,bm=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."),$t=!1,Qw={},Kw={},Zw={},e0={},Fo=!1,t0={},Cu={},vm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},i0=!1,s0=null;s0=new Set;var bn=!1,qt=!1,gm=!1,n0=typeof WeakSet=="function"?WeakSet:Set,ei=null,Go=null,Yo=null,Pt=null,xi=!1,ps=null,Yt=!1,gl=8192,aE={getCacheForType:function(e){var t=At(Ut),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return At(Ut).controller.signal},getOwner:function(){return Bi}};if(typeof Symbol=="function"&&Symbol.for){var _l=Symbol.for;_l("selector.component"),_l("selector.has_pseudo_class"),_l("selector.role"),_l("selector.test_id"),_l("selector.text")}var lE=[],cE=typeof WeakMap=="function"?WeakMap:Map,ti=0,Xt=2,zi=4,vn=0,wl=1,Ur=2,Au=3,Xn=4,Du=6,r0=5,lt=ti,_t=null,Ke=null,Qe=0,Ci=0,ku=1,zr=2,yl=3,o0=4,_m=5,Sl=6,Vu=7,wm=8,Ir=9,pt=Ci,Ii=null,Qn=!1,Xo=!1,ym=!1,Ws=0,Vt=vn,Kn=0,Zn=0,Sm=0,Ai=0,$r=0,Nl=null,wi=null,Ru=!1,Tu=0,a0=0,l0=300,Mu=1/0,c0=500,El=null,jt=null,er=null,Ou=0,Nm=1,Em=2,u0=3,tr=0,h0=1,d0=2,f0=3,m0=4,ju=5,Wt=0,ir=null,Qo=null,bs=0,xm=0,Cm=-0,Am=null,p0=null,b0=null,vs=Ou,v0=null,uE=50,xl=0,Dm=null,km=!1,Lu=!1,hE=50,qr=0,Cl=null,Ko=!1,Bu=null,g0=!1,_0=new Set,dE={},Ju=null,Zo=null,Vm=!1,Rm=!1,Hu=!1,Tm=!1,sr=0,Mm={};(function(){for(var e=0;e<qf.length;e++){var t=qf[e],i=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),as(i,"on"+t)}as(Y_,"onAnimationEnd"),as(X_,"onAnimationIteration"),as(Q_,"onAnimationStart"),as("dblclick","onDoubleClick"),as("focusin","onFocus"),as("focusout","onBlur"),as(zN,"onTransitionRun"),as(IN,"onTransitionStart"),as($N,"onTransitionCancel"),as(K_,"onTransitionEnd")})(),We("onMouseEnter",["mouseout","mouseover"]),We("onMouseLeave",["mouseout","mouseover"]),We("onPointerEnter",["pointerout","pointerover"]),We("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 Al="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(" "),Om=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Al)),Uu="_reactListening"+Math.random().toString(36).slice(2),w0=!1,y0=!1,zu=!1,S0=!1,Iu=!1,$u=!1,N0=!1,qu={},fE=/\r\n?/g,mE=/\u0000|\uFFFD/g,Pr="http://www.w3.org/1999/xlink",jm="http://www.w3.org/XML/1998/namespace",pE="javascript:throw new Error('React form unexpectedly submitted.')",bE="suppressHydrationWarning",Wr="&",Pu="/&",Dl="$",kl="/$",nr="$?",Fr="$~",ea="$!",vE="html",gE="body",_E="head",Lm="F!",E0="F",x0="loading",wE="style",gn=0,ta=1,Wu=2,Bm=null,Jm=null,C0={dialog:!0,webview:!0},Hm=null,Vl=void 0,A0=typeof setTimeout=="function"?setTimeout:void 0,yE=typeof clearTimeout=="function"?clearTimeout:void 0,Gr=-1,D0=typeof Promise=="function"?Promise:void 0,SE=typeof queueMicrotask=="function"?queueMicrotask:typeof D0<"u"?function(e){return D0.resolve(null).then(e).catch(nS)}:A0,Um=null,Yr=0,Rl=1,k0=2,V0=3,ns=4,rs=new Map,R0=new Set,_n=ft.d;ft.d={f:function(){var e=_n.f(),t=mo();return e||t},r:function(e){var t=Se(e);t!==null&&t.tag===5&&t.type==="form"?Gb(t):_n.r(e)},D:function(e){_n.D(e),zg("dns-prefetch",e,null)},C:function(e,t){_n.C(e,t),zg("preconnect",e,t)},L:function(e,t,i){_n.L(e,t,i);var s=ia;if(s&&e&&t){var n='link[rel="preload"][as="'+Pi(t)+'"]';t==="image"&&i&&i.imageSrcSet?(n+='[imagesrcset="'+Pi(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(n+='[imagesizes="'+Pi(i.imageSizes)+'"]')):n+='[href="'+Pi(e)+'"]';var r=n;switch(t){case"style":r=vo(e);break;case"script":r=go(e)}rs.has(r)||(e=tt({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),rs.set(r,e),s.querySelector(n)!==null||t==="style"&&s.querySelector(Ba(r))||t==="script"&&s.querySelector(Ja(r))||(t=s.createElement("link"),ni(t,"link",e),Te(t),s.head.appendChild(t)))}},m:function(e,t){_n.m(e,t);var i=ia;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Pi(s)+'"][href="'+Pi(e)+'"]',r=n;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=go(e)}if(!rs.has(r)&&(e=tt({rel:"modulepreload",href:e},t),rs.set(r,e),i.querySelector(n)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ja(r)))return}s=i.createElement("link"),ni(s,"link",e),Te(s),i.head.appendChild(s)}}},X:function(e,t){_n.X(e,t);var i=ia;if(i&&e){var s=Pe(i).hoistableScripts,n=go(e),r=s.get(n);r||(r=i.querySelector(Ja(n)),r||(e=tt({src:e,async:!0},t),(t=rs.get(n))&&lf(e,t),r=i.createElement("script"),Te(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){_n.S(e,t,i);var s=ia;if(s&&e){var n=Pe(s).hoistableStyles,r=vo(e);t=t||"default";var d=n.get(r);if(!d){var _={loading:Yr,preload:null};if(d=s.querySelector(Ba(r)))_.loading=Rl|ns;else{e=tt({rel:"stylesheet",href:e,"data-precedence":t},i),(i=rs.get(r))&&af(e,i);var D=d=s.createElement("link");Te(D),ni(D,"link",e),D._p=new Promise(function(M,K){D.onload=M,D.onerror=K}),D.addEventListener("load",function(){_.loading|=Rl}),D.addEventListener("error",function(){_.loading|=k0}),_.loading|=ns,zc(d,t,s)}d={type:"stylesheet",instance:d,count:1,state:_},n.set(r,d)}}},M:function(e,t){_n.M(e,t);var i=ia;if(i&&e){var s=Pe(i).hoistableScripts,n=go(e),r=s.get(n);r||(r=i.querySelector(Ja(n)),r||(e=tt({src:e,async:!0,type:"module"},t),(t=rs.get(n))&&lf(e,t),r=i.createElement("script"),Te(r),ni(r,"link",e),i.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},s.set(n,r))}}};var ia=typeof document>"u"?null:document,Fu=null,NE=6e4,EE=800,xE=500,zm=0,Im=null,Gu=null,Xr=HS,Tl={$$typeof:Bs,Provider:null,Consumer:null,_currentValue:Xr,_currentValue2:Xr,_threadCount:0},T0="%c%s%c",M0="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",O0="",Yu=" ",CE=Function.prototype.bind,j0=!1,L0=null,B0=null,J0=null,H0=null,U0=null,z0=null,I0=null,$0=null,q0=null,P0=null;L0=function(e,t,i,s){t=p(e,t),t!==null&&(i=x(t.memoizedState,i,0,s),t.memoizedState=i,t.baseState=i,e.memoizedProps=tt({},e.memoizedProps),i=ai(e,2),i!==null&&Rt(i,e,2))},B0=function(e,t,i){t=p(e,t),t!==null&&(i=q(t.memoizedState,i,0),t.memoizedState=i,t.baseState=i,e.memoizedProps=tt({},e.memoizedProps),i=ai(e,2),i!==null&&Rt(i,e,2))},J0=function(e,t,i,s){t=p(e,t),t!==null&&(i=L(t.memoizedState,i,s),t.memoizedState=i,t.baseState=i,e.memoizedProps=tt({},e.memoizedProps),i=ai(e,2),i!==null&&Rt(i,e,2))},H0=function(e,t,i){e.pendingProps=x(e.memoizedProps,t,0,i),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ai(e,2),t!==null&&Rt(t,e,2)},U0=function(e,t){e.pendingProps=q(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ai(e,2),t!==null&&Rt(t,e,2)},z0=function(e,t,i){e.pendingProps=L(e.memoizedProps,t,i),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ai(e,2),t!==null&&Rt(t,e,2)},I0=function(e){var t=ai(e,2);t!==null&&Rt(t,e,2)},$0=function(e){var t=Ge(),i=ai(e,t);i!==null&&Rt(i,e,t)},q0=function(e){I=e},P0=function(e){ee=e};var Xu=!0,Qu=null,$m=!1,rr=null,or=null,ar=null,Ml=new Map,Ol=new Map,lr=[],AE="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(" "),Ku=null;if(Wc.prototype.render=mf.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()."):h(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=Oi(s);cf(s,n,i,t,null,null)},Wc.prototype.unmount=mf.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&(Xt|zi))!==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."),cf(e.current,2,null,e,null,null),mo(),t[Hn]=null}},Wc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nn();e={blockedOn:null,target:e,priority:t};for(var i=0;i<lr.length&&t!==0&&t<lr[i].priority;i++);lr.splice(i,0,e),i===0&&t_(e)}},(function(){var e=pf.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=S(t),e=e!==null?A(e):null,e=e===null?null:e.stateNode,e},!(function(){var e={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:de,reconcilerVersion:"19.2.7"};return e.overrideHookState=L0,e.overrideHookStateDeletePath=B0,e.overrideHookStateRenamePath=J0,e.overrideProps=H0,e.overridePropsDeletePath=U0,e.overridePropsRenamePath=z0,e.scheduleUpdate=I0,e.scheduleRetry=$0,e.setErrorHandler=q0,e.setSuspenseHandler=P0,e.scheduleRefresh=C,e.scheduleRoot=w,e.setRefreshHandler=y,e.getCurrentFiber=VS,$i(e)})()&&Is&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var W0=window.location.protocol;/^(https?|file):$/.test(W0)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(W0==="file:"?`
272
- You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}jl.createRoot=function(e,t){if(!h(e))throw Error("Target container is not a DOM element.");r_(e);var i=!1,s="",n=iv,r=sv,d=nv;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===Ls&&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&&(d=t.onRecoverableError)),t=Gg(e,1,!1,null,null,i,s,null,n,r,d,n_),e[Hn]=t.current,Gd(e),new mf(t)},jl.hydrateRoot=function(e,t,i){if(!h(e))throw Error("Target container is not a DOM element.");r_(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=iv,d=sv,_=nv,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&&(d=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError),i.formState!==void 0&&(D=i.formState)),t=Gg(e,1,!0,t,i??null,s,n,D,r,d,_,n_),t.context=Yg(null),i=t.current,s=Oi(i),s=gs(s),n=Dn(s),n.callback=null,kn(i,n,s),Ns(s,"hydrateRoot()",null),i=s,t.current.lanes=i,ct(t,i),Os(t),e[Hn]=t.current,Gd(e),new Wc(t)},jl.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),jl}var i1;function HE(){return i1||(i1=1,Wm.exports=JE()),Wm.exports}var UE=HE(),Xm={exports:{}},s1;function zE(){return s1||(s1=1,(function(p,x){(function(L,j){p.exports=j()})(globalThis,(()=>(()=>{var L={4567:function(I,c,b){var g=this&&this.__decorate||function(o,l,v,S){var A,k=arguments.length,E=k<3?l:S===null?S=Object.getOwnPropertyDescriptor(l,v):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,l,v,S);else for(var R=o.length-1;R>=0;R--)(A=o[R])&&(E=(k<3?A(E):k>3?A(l,v,E):A(l,v))||E);return k>3&&E&&Object.defineProperty(l,v,E),E},N=this&&this.__param||function(o,l){return function(v,S){l(v,S,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;const f=b(9042),m=b(9924),w=b(844),C=b(4725),y=b(2585),h=b(3656);let u=c.AccessibilityManager=class extends w.Disposable{constructor(o,l,v,S){super(),this._terminal=o,this._coreBrowserService=v,this._renderService=S,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 A=0;A<this._terminal.rows;A++)this._rowElements[A]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[A]);if(this._topBoundaryFocusListener=A=>this._handleBoundaryFocus(A,0),this._bottomBoundaryFocusListener=A=>this._handleBoundaryFocus(A,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((A=>this._handleResize(A.rows)))),this.register(this._terminal.onRender((A=>this._refreshRows(A.start,A.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((A=>this._handleChar(A)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
276
- `)))),this.register(this._terminal.onA11yTab((A=>this._handleTab(A)))),this.register(this._terminal.onKey((A=>this._handleKey(A.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,h.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 l=0;l<o;l++)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,l){this._liveRegionDebouncer.refresh(o,l,this._terminal.rows)}_renderRows(o,l){const v=this._terminal.buffer,S=v.lines.length.toString();for(let A=o;A<=l;A++){const k=v.lines.get(v.ydisp+A),E=[],R=(k==null?void 0:k.translateToString(!0,void 0,void 0,E))||"",V=(v.ydisp+A+1).toString(),J=this._rowElements[A];J&&(R.length===0?(J.innerText=" ",this._rowColumns.set(J,[0,1])):(J.textContent=R,this._rowColumns.set(J,E)),J.setAttribute("aria-posinset",V),J.setAttribute("aria-setsize",S))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,l){const v=o.target,S=this._rowElements[l===0?1:this._rowElements.length-2];if(v.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==S)return;let A,k;if(l===0?(A=v,k=this._rowElements.pop(),this._rowContainer.removeChild(k)):(A=this._rowElements.shift(),k=v,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),k.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var R;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 l={node:o.anchorNode,offset:o.anchorOffset},v={node:o.focusNode,offset:o.focusOffset};if((l.node.compareDocumentPosition(v.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===v.node&&l.offset>v.offset)&&([l,v]=[v,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const S=this._rowElements.slice(-1)[0];if(v.node.compareDocumentPosition(S)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(v={node:S,offset:((R=S.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(v.node))return;const A=({node:V,offset:J})=>{const $=V instanceof Text?V.parentNode:V;let H=parseInt($==null?void 0:$.getAttribute("aria-posinset"),10)-1;if(isNaN(H))return console.warn("row is invalid. Race condition?"),null;const X=this._rowColumns.get($);if(!X)return console.warn("columns is null. Race condition?"),null;let ne=J<X.length?X[J]:X.slice(-1)[0]+1;return ne>=this._terminal.cols&&(++H,ne=0),{row:H,column:ne}},k=A(l),E=A(v);if(k&&E){if(k.row>E.row||k.row===E.row&&k.column>=E.column)throw new Error("invalid range");this._terminal.select(k.column,k.row,(E.row-k.row)*this._terminal.cols-k.column+E.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);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`}};c.AccessibilityManager=u=g([N(1,y.IInstantiationService),N(2,C.ICoreBrowserService),N(3,C.IRenderService)],u)},3614:(I,c)=>{function b(m){return m.replace(/\r?\n/g,"\r")}function g(m,w){return w?"\x1B[200~"+m+"\x1B[201~":m}function N(m,w,C,y){m=g(m=b(m),C.decPrivateModes.bracketedPasteMode&&y.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(m,!0),w.value=""}function f(m,w,C){const y=C.getBoundingClientRect(),h=m.clientX-y.left-10,u=m.clientY-y.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${h}px`,w.style.top=`${u}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=b,c.bracketTextForPaste=g,c.copyHandler=function(m,w){m.clipboardData&&m.clipboardData.setData("text/plain",w.selectionText),m.preventDefault()},c.handlePasteEvent=function(m,w,C,y){m.stopPropagation(),m.clipboardData&&N(m.clipboardData.getData("text/plain"),w,C,y)},c.paste=N,c.moveTextAreaUnderMouseCursor=f,c.rightClickHandler=function(m,w,C,y,h){f(m,w,C),h&&y.rightClickSelect(m),w.value=y.selectionText,w.select()}},7239:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;const g=b(1505);c.ColorContrastCache=class{constructor(){this._color=new g.TwoKeyMap,this._css=new g.TwoKeyMap}setCss(N,f,m){this._css.set(N,f,m)}getCss(N,f){return this._css.get(N,f)}setColor(N,f,m){this._color.set(N,f,m)}getColor(N,f){return this._color.get(N,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(b,g,N,f){b.addEventListener(g,N,f);let m=!1;return{dispose:()=>{m||(m=!0,b.removeEventListener(g,N,f))}}}},3551:function(I,c,b){var g=this&&this.__decorate||function(u,o,l,v){var S,A=arguments.length,k=A<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(u,o,l,v);else for(var E=u.length-1;E>=0;E--)(S=u[E])&&(k=(A<3?S(k):A>3?S(o,l,k):S(o,l))||k);return A>3&&k&&Object.defineProperty(o,l,k),k},N=this&&this.__param||function(u,o){return function(l,v){o(l,v,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier=void 0;const f=b(3656),m=b(8460),w=b(844),C=b(2585),y=b(4725);let h=c.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(u,o,l,v,S){super(),this._element=u,this._mouseService=o,this._renderService=l,this._bufferService=v,this._linkProviderService=S,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 A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.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(u){this._lastMouseEvent=u;const o=this._positionFromMouseEvent(u,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const l=u.composedPath();for(let v=0;v<l.length;v++){const S=l[v];if(S.classList.contains("xterm"))break;if(S.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(u){if(this._activeLine!==u.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(u,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,u)||(this._clearCurrentLink(),this._askForLink(u,!0))}_askForLink(u,o){var v,S;this._activeProviderReplies&&o||((v=this._activeProviderReplies)==null||v.forEach((A=>{A==null||A.forEach((k=>{k.link.dispose&&k.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=u.y);let l=!1;for(const[A,k]of this._linkProviderService.linkProviders.entries())o?(S=this._activeProviderReplies)!=null&&S.get(A)&&(l=this._checkLinkProviderResult(A,u,l)):k.provideLinks(u.y,(E=>{var V,J;if(this._isMouseOut)return;const R=E==null?void 0:E.map(($=>({link:$})));(V=this._activeProviderReplies)==null||V.set(A,R),l=this._checkLinkProviderResult(A,u,l),((J=this._activeProviderReplies)==null?void 0:J.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(u.y,this._activeProviderReplies)}))}_removeIntersectingLinks(u,o){const l=new Set;for(let v=0;v<o.size;v++){const S=o.get(v);if(S)for(let A=0;A<S.length;A++){const k=S[A],E=k.link.range.start.y<u?0:k.link.range.start.x,R=k.link.range.end.y>u?this._bufferService.cols:k.link.range.end.x;for(let V=E;V<=R;V++){if(l.has(V)){S.splice(A--,1);break}l.add(V)}}}}_checkLinkProviderResult(u,o,l){var A;if(!this._activeProviderReplies)return l;const v=this._activeProviderReplies.get(u);let S=!1;for(let k=0;k<u;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(S=!0);if(!S&&v){const k=v.find((E=>this._linkAtPosition(E.link,o)));k&&(l=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let k=0;k<this._activeProviderReplies.size;k++){const E=(A=this._activeProviderReplies.get(k))==null?void 0:A.find((R=>this._linkAtPosition(R.link,o)));if(E){l=!0,this._handleNewLink(E);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(u){if(!this._currentLink)return;const o=this._positionFromMouseEvent(u,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(u,this._currentLink.link.text)}_clearCurrentLink(u,o){this._currentLink&&this._lastMouseEvent&&(!u||!o||this._currentLink.link.range.start.y>=u&&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(u){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(u.link,o)&&(this._currentLink=u,this._currentLink.state={decorations:{underline:u.link.decorations===void 0||u.link.decorations.underline,pointerCursor:u.link.decorations===void 0||u.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,u.link,this._lastMouseEvent),u.link.decorations={},Object.defineProperties(u.link.decorations,{pointerCursor:{get:()=>{var l,v;return(v=(l=this._currentLink)==null?void 0:l.state)==null?void 0:v.decorations.pointerCursor},set:l=>{var v;(v=this._currentLink)!=null&&v.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,v;return(v=(l=this._currentLink)==null?void 0:l.state)==null?void 0:v.decorations.underline},set:l=>{var v,S,A;(v=this._currentLink)!=null&&v.state&&((A=(S=this._currentLink)==null?void 0:S.state)==null?void 0:A.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(u.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const v=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=S&&(this._clearCurrentLink(v,S),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(u,o,l){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&&u.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(l,o.text)}_fireUnderlineEvent(u,o){const l=u.range,v=this._bufferService.buffer.ydisp,S=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-v-1,l.end.x,l.end.y-v-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(S)}_linkLeave(u,o,l){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&&u.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(l,o.text)}_linkAtPosition(u,o){const l=u.range.start.y*this._bufferService.cols+u.range.start.x,v=u.range.end.y*this._bufferService.cols+u.range.end.x,S=o.y*this._bufferService.cols+o.x;return l<=S&&S<=v}_positionFromMouseEvent(u,o,l){const v=l.getCoords(u,o,this._bufferService.cols,this._bufferService.rows);if(v)return{x:v[0],y:v[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(u,o,l,v,S){return{x1:u,y1:o,x2:l,y2:v,cols:this._bufferService.cols,fg:S}}};c.Linkifier=h=g([N(1,y.IMouseService),N(2,y.IRenderService),N(3,C.IBufferService),N(4,y.ILinkProviderService)],h)},9042:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(I,c,b){var g=this&&this.__decorate||function(y,h,u,o){var l,v=arguments.length,S=v<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,u):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,h,u,o);else for(var A=y.length-1;A>=0;A--)(l=y[A])&&(S=(v<3?l(S):v>3?l(h,u,S):l(h,u))||S);return v>3&&S&&Object.defineProperty(h,u,S),S},N=this&&this.__param||function(y,h){return function(u,o){h(u,o,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkProvider=void 0;const f=b(511),m=b(2585);let w=c.OscLinkProvider=class{constructor(y,h,u){this._bufferService=y,this._optionsService=h,this._oscLinkService=u}provideLinks(y,h){var R;const u=this._bufferService.buffer.lines.get(y-1);if(!u)return void h(void 0);const o=[],l=this._optionsService.rawOptions.linkHandler,v=new f.CellData,S=u.getTrimmedLength();let A=-1,k=-1,E=!1;for(let V=0;V<S;V++)if(k!==-1||u.hasContent(V)){if(u.loadCell(V,v),v.hasExtendedAttrs()&&v.extended.urlId){if(k===-1){k=V,A=v.extended.urlId;continue}E=v.extended.urlId!==A}else k!==-1&&(E=!0);if(E||k!==-1&&V===S-1){const J=(R=this._oscLinkService.getLinkData(A))==null?void 0:R.uri;if(J){const $={start:{x:k+1,y},end:{x:V+(E||V!==S-1?0:1),y}};let H=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const X=new URL(J);["http:","https:"].includes(X.protocol)||(H=!0)}catch{H=!0}H||o.push({text:J,range:$,activate:(X,ne)=>l?l.activate(X,ne,$):C(0,ne),hover:(X,ne)=>{var ie;return(ie=l==null?void 0:l.hover)==null?void 0:ie.call(l,X,ne,$)},leave:(X,ne)=>{var ie;return(ie=l==null?void 0:l.leave)==null?void 0:ie.call(l,X,ne,$)}})}E=!1,v.hasExtendedAttrs()&&v.extended.urlId?(k=V,A=v.extended.urlId):(k=-1,A=-1)}}h(o)}};function C(y,h){if(confirm(`Do you want to navigate to ${h}?
278
-
279
- WARNING: This link could potentially be dangerous`)){const u=window.open();if(u){try{u.opener=null}catch{}u.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}}c.OscLinkProvider=w=g([N(0,m.IBufferService),N(1,m.IOptionsService),N(2,m.IOscLinkService)],w)},6193:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0,c.RenderDebouncer=class{constructor(b,g){this._renderCallback=b,this._coreBrowserService=g,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(b){return this._refreshCallbacks.push(b),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(b,g,N){this._rowCount=N,b=b!==void 0?b:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,b):b,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g,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 b=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(b,g),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const b of this._refreshCallbacks)b(0);this._refreshCallbacks=[]}}},3236:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;const g=b(3614),N=b(3656),f=b(3551),m=b(9042),w=b(3730),C=b(1680),y=b(3107),h=b(5744),u=b(2950),o=b(1296),l=b(428),v=b(4269),S=b(5114),A=b(8934),k=b(3230),E=b(9312),R=b(4725),V=b(6731),J=b(8055),$=b(8969),H=b(8460),X=b(844),ne=b(6114),ie=b(8437),re=b(2584),oe=b(7399),T=b(5941),z=b(9074),B=b(2585),P=b(5435),he=b(4567),fe=b(779);class ge extends $.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(Y={}){super(Y),this.browser=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new X.MutableDisposable),this._onCursorMove=this.register(new H.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new H.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new H.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new H.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new H.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new H.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new H.EventEmitter),this._onBlur=this.register(new H.EventEmitter),this._onA11yCharEmitter=this.register(new H.EventEmitter),this._onA11yTabEmitter=this.register(new H.EventEmitter),this._onWillOpen=this.register(new H.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(z.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(fe.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((U,pe)=>this.refresh(U,pe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((U=>this._reportWindowsOptions(U)))),this.register(this._inputHandler.onColor((U=>this._handleColorEvent(U)))),this.register((0,H.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,H.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((U=>this._afterResize(U.cols,U.rows)))),this.register((0,X.toDisposable)((()=>{var U,pe;this._customKeyEventHandler=void 0,(pe=(U=this.element)==null?void 0:U.parentNode)==null||pe.removeChild(this.element)})))}_handleColorEvent(Y){if(this._themeService)for(const U of Y){let pe,le="";switch(U.index){case 256:pe="foreground",le="10";break;case 257:pe="background",le="11";break;case 258:pe="cursor",le="12";break;default:pe="ansi",le="4;"+U.index}switch(U.type){case 0:const ce=J.color.toColorRGB(pe==="ansi"?this._themeService.colors.ansi[U.index]:this._themeService.colors[pe]);this.coreService.triggerDataEvent(`${re.C0.ESC}]${le};${(0,T.toRgbString)(ce)}${re.C1_ESCAPED.ST}`);break;case 1:if(pe==="ansi")this._themeService.modifyColors((ye=>ye.ansi[U.index]=J.channels.toColor(...U.color)));else{const ye=pe;this._themeService.modifyColors((be=>be[ye]=J.channels.toColor(...U.color)))}break;case 2:this._themeService.restoreColor(U.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Y){Y?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(he.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(re.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Y;return(Y=this.textarea)==null?void 0:Y.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(re.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 Y=this.buffer.ybase+this.buffer.y,U=this.buffer.lines.get(Y);if(!U)return;const pe=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,ce=U.getWidth(pe),ye=this._renderService.dimensions.css.cell.width*ce,be=this.buffer.y*this._renderService.dimensions.css.cell.height,Ie=pe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ie+"px",this.textarea.style.top=be+"px",this.textarea.style.width=ye+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,N.addDisposableDomListener)(this.element,"copy",(U=>{this.hasSelection()&&(0,g.copyHandler)(U,this._selectionService)})));const Y=U=>(0,g.handlePasteEvent)(U,this.textarea,this.coreService,this.optionsService);this.register((0,N.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,N.addDisposableDomListener)(this.element,"paste",Y)),ne.isFirefox?this.register((0,N.addDisposableDomListener)(this.element,"mousedown",(U=>{U.button===2&&(0,g.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,N.addDisposableDomListener)(this.element,"contextmenu",(U=>{(0,g.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ne.isLinux&&this.register((0,N.addDisposableDomListener)(this.element,"auxclick",(U=>{U.button===1&&(0,g.moveTextAreaUnderMouseCursor)(U,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,N.addDisposableDomListener)(this.textarea,"keyup",(Y=>this._keyUp(Y)),!0)),this.register((0,N.addDisposableDomListener)(this.textarea,"keydown",(Y=>this._keyDown(Y)),!0)),this.register((0,N.addDisposableDomListener)(this.textarea,"keypress",(Y=>this._keyPress(Y)),!0)),this.register((0,N.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,N.addDisposableDomListener)(this.textarea,"compositionupdate",(Y=>this._compositionHelper.compositionupdate(Y)))),this.register((0,N.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,N.addDisposableDomListener)(this.textarea,"input",(Y=>this._inputEvent(Y)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Y){var pe;if(!Y)throw new Error("Terminal requires a parent element.");if(Y.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((pe=this.element)==null?void 0:pe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Y.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"),Y.appendChild(this.element);const U=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.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,N.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.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(S.CoreBrowserService,this.textarea,Y.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,N.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,N.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(V.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(v.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(u.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(U);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((le=>this.scrollLines(le.amount,le.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(E.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,N.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(y.BufferDecorationRenderer,this.screenElement)),this.register((0,N.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),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(he.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(h.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(h.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 Y=this,U=this.element;function pe(ye){const be=Y._mouseService.getMouseReportCoords(ye,Y.screenElement);if(!be)return!1;let Ie,qe;switch(ye.overrideType||ye.type){case"mousemove":qe=32,ye.buttons===void 0?(Ie=3,ye.button!==void 0&&(Ie=ye.button<3?ye.button:3)):Ie=1&ye.buttons?0:4&ye.buttons?1:2&ye.buttons?2:3;break;case"mouseup":qe=0,Ie=ye.button<3?ye.button:3;break;case"mousedown":qe=1,Ie=ye.button<3?ye.button:3;break;case"wheel":if(Y._customWheelEventHandler&&Y._customWheelEventHandler(ye)===!1||Y.viewport.getLinesScrolled(ye)===0)return!1;qe=ye.deltaY<0?0:1,Ie=4;break;default:return!1}return!(qe===void 0||Ie===void 0||Ie>4)&&Y.coreMouseService.triggerMouseEvent({col:be.col,row:be.row,x:be.x,y:be.y,button:Ie,action:qe,ctrl:ye.ctrlKey,alt:ye.altKey,shift:ye.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ce={mouseup:ye=>(pe(ye),ye.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(ye)),wheel:ye=>(pe(ye),this.cancel(ye,!0)),mousedrag:ye=>{ye.buttons&&pe(ye)},mousemove:ye=>{ye.buttons||pe(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?le.mousemove||(U.addEventListener("mousemove",ce.mousemove),le.mousemove=ce.mousemove):(U.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&ye?le.wheel||(U.addEventListener("wheel",ce.wheel,{passive:!1}),le.wheel=ce.wheel):(U.removeEventListener("wheel",le.wheel),le.wheel=null),2&ye?le.mouseup||(le.mouseup=ce.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&ye?le.mousedrag||(le.mousedrag=ce.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,N.addDisposableDomListener)(U,"mousedown",(ye=>{if(ye.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ye))return pe(ye),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(ye)}))),this.register((0,N.addDisposableDomListener)(U,"wheel",(ye=>{if(!le.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 Ie=re.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ye.deltaY<0?"A":"B");let qe="";for(let je=0;je<Math.abs(be);je++)qe+=Ie;return this.coreService.triggerDataEvent(qe,!0),this.cancel(ye,!0)}return this.viewport.handleWheel(ye)?this.cancel(ye):void 0}}),{passive:!1})),this.register((0,N.addDisposableDomListener)(U,"touchstart",(ye=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ye),this.cancel(ye)}),{passive:!0})),this.register((0,N.addDisposableDomListener)(U,"touchmove",(ye=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ye)?void 0:this.cancel(ye)}),{passive:!1}))}refresh(Y,U){var pe;(pe=this._renderService)==null||pe.refreshRows(Y,U)}updateCursorStyle(Y){var U;(U=this._selectionService)!=null&&U.shouldColumnSelect(Y)?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(Y,U,pe=0){var le;pe===1?(super.scrollLines(Y,U,pe),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(Y)}paste(Y){(0,g.paste)(Y,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Y){this._customKeyEventHandler=Y}attachCustomWheelEventHandler(Y){this._customWheelEventHandler=Y}registerLinkProvider(Y){return this._linkProviderService.registerLinkProvider(Y)}registerCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const U=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),U}deregisterCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Y)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Y){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Y)}registerDecoration(Y){return this._decorationService.registerDecoration(Y)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Y,U,pe){this._selectionService.setSelection(Y,U,pe)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var Y;(Y=this._selectionService)==null||Y.clearSelection()}selectAll(){var Y;(Y=this._selectionService)==null||Y.selectAll()}selectLines(Y,U){var pe;(pe=this._selectionService)==null||pe.selectLines(Y,U)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const U=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!U&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;U||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const pe=(0,oe.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),pe.type===3||pe.type===2){const le=this.rows-1;return this.scrollLines(pe.type===2?-le:le),this.cancel(Y,!0)}return pe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(pe.cancel&&this.cancel(Y,!0),!pe.key||!!(Y.key&&!Y.ctrlKey&&!Y.altKey&&!Y.metaKey&&Y.key.length===1&&Y.key.charCodeAt(0)>=65&&Y.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(pe.key!==re.C0.ETX&&pe.key!==re.C0.CR||(this.textarea.value=""),this._onKey.fire({key:pe.key,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(pe.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,U){const pe=Y.isMac&&!this.options.macOptionIsMeta&&U.altKey&&!U.ctrlKey&&!U.metaKey||Y.isWindows&&U.altKey&&U.ctrlKey&&!U.metaKey||Y.isWindows&&U.getModifierState("AltGraph");return U.type==="keypress"?pe:pe&&(!U.keyCode||U.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(U){return U.keyCode===16||U.keyCode===17||U.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let U;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)U=Y.charCode;else if(Y.which===null||Y.which===void 0)U=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;U=Y.which}return!(!U||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(U=String.fromCharCode(U),this._onKey.fire({key:U,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(U,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Y){if(Y.data&&Y.inputType==="insertText"&&(!Y.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const U=Y.data;return this.coreService.triggerDataEvent(U,!0),this.cancel(Y),!0}return!1}resize(Y,U){Y!==this.cols||U!==this.rows?super.resize(Y,U):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,U){var pe,le;(pe=this._charSizeService)==null||pe.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var Y;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 U=1;U<this.rows;U++)this.buffer.lines.push(this.buffer.getBlankLine(ie.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Y=this.viewport)==null||Y.reset(),this.refresh(0,this.rows-1)}}reset(){var U,pe;this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),(U=this._selectionService)==null||U.reset(),this._decorationService.reset(),(pe=this.viewport)==null||pe.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Y;(Y=this._renderService)==null||Y.clearTextureAtlas()}_reportFocus(){var Y;(Y=this.element)!=null&&Y.classList.contains("focus")?this.coreService.triggerDataEvent(re.C0.ESC+"[I"):this.coreService.triggerDataEvent(re.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){case P.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const U=this._renderService.dimensions.css.canvas.width.toFixed(0),pe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${re.C0.ESC}[4;${pe};${U}t`);break;case P.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const le=this._renderService.dimensions.css.cell.width.toFixed(0),ce=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${re.C0.ESC}[6;${ce};${le}t`)}}cancel(Y,U){if(this.options.cancelEvents||U)return Y.preventDefault(),Y.stopPropagation(),!1}}c.Terminal=ge},9924:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0,c.TimeBasedDebouncer=class{constructor(b,g=1e3){this._renderCallback=b,this._debounceThresholdMS=g,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(b,g,N){this._rowCount=N,b=b!==void 0?b:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,b):b,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g;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 b=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(b,g)}}},1680:function(I,c,b){var g=this&&this.__decorate||function(u,o,l,v){var S,A=arguments.length,k=A<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(u,o,l,v);else for(var E=u.length-1;E>=0;E--)(S=u[E])&&(k=(A<3?S(k):A>3?S(o,l,k):S(o,l))||k);return A>3&&k&&Object.defineProperty(o,l,k),k},N=this&&this.__param||function(u,o){return function(l,v){o(l,v,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;const f=b(3656),m=b(4725),w=b(8460),C=b(844),y=b(2585);let h=c.Viewport=class extends C.Disposable{constructor(u,o,l,v,S,A,k,E){super(),this._viewportElement=u,this._scrollArea=o,this._bufferService=l,this._optionsService=v,this._charSizeService=S,this._renderService=A,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((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(E.colors),this.register(E.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(u){this._viewportElement.style.backgroundColor=u.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(u){if(u)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 u=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==u&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=u),this._refreshAnimationFrame=null}syncScrollArea(u=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(u);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(u)}_handleScroll(u){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 u=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(u*(this._smoothScrollState.target-this._smoothScrollState.origin)),u<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(u,o){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&l<this._lastRecordedBufferHeight)||(u.cancelable&&u.preventDefault(),!1)}handleWheel(u){const o=this._getPixelsScrolled(u);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(u,o))}scrollLines(u){if(u!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=u*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:u,suppressScrollEvent:!1})}_getPixelsScrolled(u){if(u.deltaY===0||u.shiftKey)return 0;let o=this._applyScrollModifier(u.deltaY,u);return u.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:u.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(u,o){var E;let l,v="";const S=[],A=o??this._bufferService.buffer.lines.length,k=this._bufferService.buffer.lines;for(let R=u;R<A;R++){const V=k.get(R);if(!V)continue;const J=(E=k.get(R+1))==null?void 0:E.isWrapped;if(v+=V.translateToString(!J),!J||R===k.length-1){const $=document.createElement("div");$.textContent=v,S.push($),v.length>0&&(l=$),v=""}}return{bufferElements:S,cursorElement:l}}getLinesScrolled(u){if(u.deltaY===0||u.shiftKey)return 0;let o=this._applyScrollModifier(u.deltaY,u);return u.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):u.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(u,o){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&o.altKey||l==="ctrl"&&o.ctrlKey||l==="shift"&&o.shiftKey?u*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:u*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(u){this._lastTouchY=u.touches[0].pageY}handleTouchMove(u){const o=this._lastTouchY-u.touches[0].pageY;return this._lastTouchY=u.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(u,o))}};c.Viewport=h=g([N(2,y.IBufferService),N(3,y.IOptionsService),N(4,m.ICharSizeService),N(5,m.IRenderService),N(6,m.ICoreBrowserService),N(7,m.IThemeService)],h)},3107:function(I,c,b){var g=this&&this.__decorate||function(y,h,u,o){var l,v=arguments.length,S=v<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,u):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,h,u,o);else for(var A=y.length-1;A>=0;A--)(l=y[A])&&(S=(v<3?l(S):v>3?l(h,u,S):l(h,u))||S);return v>3&&S&&Object.defineProperty(h,u,S),S},N=this&&this.__param||function(y,h){return function(u,o){h(u,o,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferDecorationRenderer=void 0;const f=b(4725),m=b(844),w=b(2585);let C=c.BufferDecorationRenderer=class extends m.Disposable{constructor(y,h,u,o,l){super(),this._screenElement=y,this._bufferService=h,this._coreBrowserService=u,this._decorationService=o,this._renderService=l,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 y of this._decorationService.decorations)this._renderDecoration(y);this._dimensionsChanged=!1}_renderDecoration(y){this._refreshStyle(y),this._dimensionsChanged&&this._refreshXPosition(y)}_createElement(y){var o;const h=this._coreBrowserService.mainDocument.createElement("div");h.classList.add("xterm-decoration"),h.classList.toggle("xterm-decoration-top-layer",((o=y==null?void 0:y.options)==null?void 0:o.layer)==="top"),h.style.width=`${Math.round((y.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,h.style.height=(y.options.height||1)*this._renderService.dimensions.css.cell.height+"px",h.style.top=(y.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",h.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const u=y.options.x??0;return u&&u>this._bufferService.cols&&(h.style.display="none"),this._refreshXPosition(y,h),h}_refreshStyle(y){const h=y.marker.line-this._bufferService.buffers.active.ydisp;if(h<0||h>=this._bufferService.rows)y.element&&(y.element.style.display="none",y.onRenderEmitter.fire(y.element));else{let u=this._decorationElements.get(y);u||(u=this._createElement(y),y.element=u,this._decorationElements.set(y,u),this._container.appendChild(u),y.onDispose((()=>{this._decorationElements.delete(y),u.remove()}))),u.style.top=h*this._renderService.dimensions.css.cell.height+"px",u.style.display=this._altBufferIsActive?"none":"block",y.onRenderEmitter.fire(u)}}_refreshXPosition(y,h=y.element){if(!h)return;const u=y.options.x??0;(y.options.anchor||"left")==="right"?h.style.right=u?u*this._renderService.dimensions.css.cell.width+"px":"":h.style.left=u?u*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(y){var h;(h=this._decorationElements.get(y))==null||h.remove(),this._decorationElements.delete(y),y.dispose()}};c.BufferDecorationRenderer=C=g([N(1,w.IBufferService),N(2,f.ICoreBrowserService),N(3,w.IDecorationService),N(4,f.IRenderService)],C)},5871:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorZoneStore=void 0,c.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(b){if(b.options.overviewRulerOptions){for(const g of this._zones)if(g.color===b.options.overviewRulerOptions.color&&g.position===b.options.overviewRulerOptions.position){if(this._lineIntersectsZone(g,b.marker.line))return;if(this._lineAdjacentToZone(g,b.marker.line,b.options.overviewRulerOptions.position))return void this._addLineToZone(g,b.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=b.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=b.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=b.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=b.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:b.options.overviewRulerOptions.color,position:b.options.overviewRulerOptions.position,startBufferLine:b.marker.line,endBufferLine:b.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(b){this._linePadding=b}_lineIntersectsZone(b,g){return g>=b.startBufferLine&&g<=b.endBufferLine}_lineAdjacentToZone(b,g,N){return g>=b.startBufferLine-this._linePadding[N||"full"]&&g<=b.endBufferLine+this._linePadding[N||"full"]}_addLineToZone(b,g){b.startBufferLine=Math.min(b.startBufferLine,g),b.endBufferLine=Math.max(b.endBufferLine,g)}}},5744:function(I,c,b){var g=this&&this.__decorate||function(l,v,S,A){var k,E=arguments.length,R=E<3?v:A===null?A=Object.getOwnPropertyDescriptor(v,S):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(l,v,S,A);else for(var V=l.length-1;V>=0;V--)(k=l[V])&&(R=(E<3?k(R):E>3?k(v,S,R):k(v,S))||R);return E>3&&R&&Object.defineProperty(v,S,R),R},N=this&&this.__param||function(l,v){return function(S,A){v(S,A,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OverviewRulerRenderer=void 0;const f=b(5871),m=b(4725),w=b(844),C=b(2585),y={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0};let o=c.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,v,S,A,k,E,R){var J;super(),this._viewportElement=l,this._screenElement=v,this._bufferService=S,this._decorationService=A,this._renderService=k,this._optionsService=E,this._coreBrowserService=R,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 V=this._canvas.getContext("2d");if(!V)throw new Error("Ctx cannot be null");this._ctx=V,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var $;($=this._canvas)==null||$.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 l=Math.floor(this._canvas.width/3),v=Math.ceil(this._canvas.width/3);h.full=this._canvas.width,h.left=l,h.center=v,h.right=l,this._refreshDrawHeightConstants(),u.full=0,u.left=0,u.center=h.left,u.right=h.left+h.center}_refreshDrawHeightConstants(){y.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,v=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);y.left=v,y.center=v,y.right=v}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.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 l=this._colorZoneStore.zones;for(const v of l)v.position!=="full"&&this._renderColorZone(v);for(const v of l)v.position==="full"&&this._renderColorZone(v);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(u[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-y[l.position||"full"]/2),h[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+y[l.position||"full"]))}_queueRefresh(l,v){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=v||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};c.OverviewRulerRenderer=o=g([N(2,C.IBufferService),N(3,C.IDecorationService),N(4,m.IRenderService),N(5,C.IOptionsService),N(6,m.ICoreBrowserService)],o)},2950:function(I,c,b){var g=this&&this.__decorate||function(y,h,u,o){var l,v=arguments.length,S=v<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,u):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,h,u,o);else for(var A=y.length-1;A>=0;A--)(l=y[A])&&(S=(v<3?l(S):v>3?l(h,u,S):l(h,u))||S);return v>3&&S&&Object.defineProperty(h,u,S),S},N=this&&this.__param||function(y,h){return function(u,o){h(u,o,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;const f=b(4725),m=b(2585),w=b(2584);let C=c.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(y,h,u,o,l,v){this._textarea=y,this._compositionView=h,this._bufferService=u,this._optionsService=o,this._coreService=l,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(y){this._compositionView.textContent=y.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(y){if(this._isComposing||this._isSendingComposition){if(y.keyCode===229||y.keyCode===16||y.keyCode===17||y.keyCode===18)return!1;this._finalizeComposition(!1)}return y.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(y){if(this._compositionView.classList.remove("active"),this._isComposing=!1,y){const h={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let u;this._isSendingComposition=!1,h.start+=this._dataAlreadySent.length,u=this._isComposing?this._textarea.value.substring(h.start,h.end):this._textarea.value.substring(h.start),u.length>0&&this._coreService.triggerDataEvent(u,!0)}}),0)}else{this._isSendingComposition=!1;const h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}}_handleAnyTextareaChanges(){const y=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const h=this._textarea.value,u=h.replace(y,"");this._dataAlreadySent=u,h.length>y.length?this._coreService.triggerDataEvent(u,!0):h.length<y.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):h.length===y.length&&h!==y&&this._coreService.triggerDataEvent(h,!0)}}),0)}updateCompositionElements(y){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const h=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),u=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=h*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=u+"px",this._compositionView.style.lineHeight=u+"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=l+"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"}y||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};c.CompositionHelper=C=g([N(2,m.IBufferService),N(3,m.IOptionsService),N(4,m.ICoreService),N(5,f.IRenderService)],C)},9806:(I,c)=>{function b(g,N,f){const m=f.getBoundingClientRect(),w=g.getComputedStyle(f),C=parseInt(w.getPropertyValue("padding-left")),y=parseInt(w.getPropertyValue("padding-top"));return[N.clientX-m.left-C,N.clientY-m.top-y]}Object.defineProperty(c,"__esModule",{value:!0}),c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=b,c.getCoords=function(g,N,f,m,w,C,y,h,u){if(!C)return;const o=b(g,N,f);return o?(o[0]=Math.ceil((o[0]+(u?y/2:0))/y),o[1]=Math.ceil(o[1]/h),o[0]=Math.min(Math.max(o[0],1),m+(u?1:0)),o[1]=Math.min(Math.max(o[1],1),w),o):void 0}},9504:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;const g=b(2584);function N(h,u,o,l){const v=h-f(h,o),S=u-f(u,o),A=Math.abs(v-S)-(function(k,E,R){let V=0;const J=k-f(k,R),$=E-f(E,R);for(let H=0;H<Math.abs(J-$);H++){const X=m(k,E)==="A"?-1:1,ne=R.buffer.lines.get(J+X*H);ne!=null&&ne.isWrapped&&V++}return V})(h,u,o);return y(A,C(m(h,u),l))}function f(h,u){let o=0,l=u.buffer.lines.get(h),v=l==null?void 0:l.isWrapped;for(;v&&h>=0&&h<u.rows;)o++,l=u.buffer.lines.get(--h),v=l==null?void 0:l.isWrapped;return o}function m(h,u){return h>u?"A":"B"}function w(h,u,o,l,v,S){let A=h,k=u,E="";for(;A!==o||k!==l;)A+=v?1:-1,v&&A>S.cols-1?(E+=S.buffer.translateBufferLineToString(k,!1,h,A),A=0,h=0,k++):!v&&A<0&&(E+=S.buffer.translateBufferLineToString(k,!1,0,h+1),A=S.cols-1,h=A,k--);return E+S.buffer.translateBufferLineToString(k,!1,h,A)}function C(h,u){const o=u?"O":"[";return g.C0.ESC+o+h}function y(h,u){h=Math.floor(h);let o="";for(let l=0;l<h;l++)o+=u;return o}c.moveToCellSequence=function(h,u,o,l){const v=o.buffer.x,S=o.buffer.y;if(!o.buffer.hasScrollback)return(function(E,R,V,J,$,H){return N(R,J,$,H).length===0?"":y(w(E,R,E,R-f(R,$),!1,$).length,C("D",H))})(v,S,0,u,o,l)+N(S,u,o,l)+(function(E,R,V,J,$,H){let X;X=N(R,J,$,H).length>0?J-f(J,$):R;const ne=J,ie=(function(re,oe,T,z,B,P){let he;return he=N(T,z,B,P).length>0?z-f(z,B):oe,re<T&&he<=z||re>=T&&he<z?"C":"D"})(E,R,V,J,$,H);return y(w(E,X,V,ne,ie==="C",$).length,C(ie,H))})(v,S,h,u,o,l);let A;if(S===u)return A=v>h?"D":"C",y(Math.abs(v-h),C(A,l));A=S>u?"D":"C";const k=Math.abs(S-u);return y((function(E,R){return R.cols-E})(S>u?h:v,o)+(k-1)*o.cols+1+((S>u?v:h)-1),C(A,l))}},1296:function(I,c,b){var g=this&&this.__decorate||function(H,X,ne,ie){var re,oe=arguments.length,T=oe<3?X:ie===null?ie=Object.getOwnPropertyDescriptor(X,ne):ie;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(H,X,ne,ie);else for(var z=H.length-1;z>=0;z--)(re=H[z])&&(T=(oe<3?re(T):oe>3?re(X,ne,T):re(X,ne))||T);return oe>3&&T&&Object.defineProperty(X,ne,T),T},N=this&&this.__param||function(H,X){return function(ne,ie){X(ne,ie,H)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;const f=b(3787),m=b(2550),w=b(2223),C=b(6171),y=b(6052),h=b(4725),u=b(8055),o=b(8460),l=b(844),v=b(2585),S="xterm-dom-renderer-owner-",A="xterm-rows",k="xterm-fg-",E="xterm-bg-",R="xterm-focus",V="xterm-selection";let J=1,$=c.DomRenderer=class extends l.Disposable{constructor(H,X,ne,ie,re,oe,T,z,B,P,he,fe,ge){super(),this._terminal=H,this._document=X,this._element=ne,this._screenElement=ie,this._viewportElement=re,this._helperContainer=oe,this._linkifier2=T,this._charSizeService=B,this._optionsService=P,this._bufferService=he,this._coreBrowserService=fe,this._themeService=ge,this._terminalClass=J++,this._rowElements=[],this._selectionRenderModel=(0,y.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(A),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(V),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((xe=>this._injectCss(xe)))),this._injectCss(this._themeService.colors),this._rowFactory=z.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(S+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((xe=>this._handleLinkHover(xe)))),this.register(this._linkifier2.onHideLinkUnderline((xe=>this._handleLinkLeave(xe)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(S+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 H=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*H,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*H),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/H),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/H),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 X=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=X,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(H){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let X=`${this._terminalSelector} .${A} { color: ${H.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;X+=`${this._terminalSelector} .${A} .xterm-dim { color: ${u.color.multiplyOpacity(H.foreground,.5).css};}`,X+=`${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}`,ie=`blink_bar_${this._terminalClass}`,re=`blink_block_${this._terminalClass}`;X+=`@keyframes ${ne} { 50% { border-bottom-style: hidden; }}`,X+=`@keyframes ${ie} { 50% { box-shadow: none; }}`,X+=`@keyframes ${re} { 0% { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css}; } 50% { background-color: inherit; color: ${H.cursor.css}; }}`,X+=`${this._terminalSelector} .${A}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${A}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${ie} 1s step-end infinite;}${this._terminalSelector} .${A}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${re} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${H.cursor.css} !important; color: ${H.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${H.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${H.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${H.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,X+=`${this._terminalSelector} .${V} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${V} div { position: absolute; background-color: ${H.selectionBackgroundOpaque.css};}${this._terminalSelector} .${V} div { position: absolute; background-color: ${H.selectionInactiveBackgroundOpaque.css};}`;for(const[oe,T]of H.ansi.entries())X+=`${this._terminalSelector} .${k}${oe} { color: ${T.css}; }${this._terminalSelector} .${k}${oe}.xterm-dim { color: ${u.color.multiplyOpacity(T,.5).css}; }${this._terminalSelector} .${E}${oe} { background-color: ${T.css}; }`;X+=`${this._terminalSelector} .${k}${w.INVERTED_DEFAULT_COLOR} { color: ${u.color.opaque(H.background).css}; }${this._terminalSelector} .${k}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${u.color.multiplyOpacity(u.color.opaque(H.background),.5).css}; }${this._terminalSelector} .${E}${w.INVERTED_DEFAULT_COLOR} { background-color: ${H.foreground.css}; }`,this._themeStyleElement.textContent=X}_setDefaultSpacing(){const H=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${H}px`,this._rowFactory.defaultSpacing=H}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(H,X){for(let ne=this._rowElements.length;ne<=X;ne++){const ie=this._document.createElement("div");this._rowContainer.appendChild(ie),this._rowElements.push(ie)}for(;this._rowElements.length>X;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(H,X){this._refreshRowElements(H,X),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(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(H,X,ne){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(H,X,ne),this.renderRows(0,this._bufferService.rows-1),!H||!X)return;this._selectionRenderModel.update(this._terminal,H,X,ne);const ie=this._selectionRenderModel.viewportStartRow,re=this._selectionRenderModel.viewportEndRow,oe=this._selectionRenderModel.viewportCappedStartRow,T=this._selectionRenderModel.viewportCappedEndRow;if(oe>=this._bufferService.rows||T<0)return;const z=this._document.createDocumentFragment();if(ne){const B=H[0]>X[0];z.appendChild(this._createSelectionElement(oe,B?X[0]:H[0],B?H[0]:X[0],T-oe+1))}else{const B=ie===oe?H[0]:0,P=oe===re?X[0]:this._bufferService.cols;z.appendChild(this._createSelectionElement(oe,B,P));const he=T-oe-1;if(z.appendChild(this._createSelectionElement(oe+1,0,this._bufferService.cols,he)),oe!==T){const fe=re===T?X[0]:this._bufferService.cols;z.appendChild(this._createSelectionElement(T,0,fe))}}this._selectionContainer.appendChild(z)}_createSelectionElement(H,X,ne,ie=1){const re=this._document.createElement("div"),oe=X*this.dimensions.css.cell.width;let T=this.dimensions.css.cell.width*(ne-X);return oe+T>this.dimensions.css.canvas.width&&(T=this.dimensions.css.canvas.width-oe),re.style.height=ie*this.dimensions.css.cell.height+"px",re.style.top=H*this.dimensions.css.cell.height+"px",re.style.left=`${oe}px`,re.style.width=`${T}px`,re}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 H of this._rowElements)H.replaceChildren()}renderRows(H,X){const ne=this._bufferService.buffer,ie=ne.ybase+ne.y,re=Math.min(ne.x,this._bufferService.cols-1),oe=this._optionsService.rawOptions.cursorBlink,T=this._optionsService.rawOptions.cursorStyle,z=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=H;B<=X;B++){const P=B+ne.ydisp,he=this._rowElements[B],fe=ne.lines.get(P);if(!he||!fe)break;he.replaceChildren(...this._rowFactory.createRow(fe,P,P===ie,T,z,re,oe,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${S}${this._terminalClass}`}_handleLinkHover(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!0)}_handleLinkLeave(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!1)}_setCellUnderline(H,X,ne,ie,re,oe){ne<0&&(H=0),ie<0&&(X=0);const T=this._bufferService.rows-1;ne=Math.max(Math.min(ne,T),0),ie=Math.max(Math.min(ie,T),0),re=Math.min(re,this._bufferService.cols);const z=this._bufferService.buffer,B=z.ybase+z.y,P=Math.min(z.x,re-1),he=this._optionsService.rawOptions.cursorBlink,fe=this._optionsService.rawOptions.cursorStyle,ge=this._optionsService.rawOptions.cursorInactiveStyle;for(let xe=ne;xe<=ie;++xe){const Y=xe+z.ydisp,U=this._rowElements[xe],pe=z.lines.get(Y);if(!U||!pe)break;U.replaceChildren(...this._rowFactory.createRow(pe,Y,Y===B,fe,ge,P,he,this.dimensions.css.cell.width,this._widthCache,oe?xe===ne?H:0:-1,oe?(xe===ie?X:re)-1:-1))}}};c.DomRenderer=$=g([N(7,v.IInstantiationService),N(8,h.ICharSizeService),N(9,v.IOptionsService),N(10,v.IBufferService),N(11,h.ICoreBrowserService),N(12,h.IThemeService)],$)},3787:function(I,c,b){var g=this&&this.__decorate||function(A,k,E,R){var V,J=arguments.length,$=J<3?k:R===null?R=Object.getOwnPropertyDescriptor(k,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(A,k,E,R);else for(var H=A.length-1;H>=0;H--)(V=A[H])&&($=(J<3?V($):J>3?V(k,E,$):V(k,E))||$);return J>3&&$&&Object.defineProperty(k,E,$),$},N=this&&this.__param||function(A,k){return function(E,R){k(E,R,A)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=void 0;const f=b(2223),m=b(643),w=b(511),C=b(2585),y=b(8055),h=b(4725),u=b(4269),o=b(6171),l=b(3734);let v=c.DomRendererRowFactory=class{constructor(A,k,E,R,V,J,$){this._document=A,this._characterJoinerService=k,this._optionsService=E,this._coreBrowserService=R,this._coreService=V,this._decorationService=J,this._themeService=$,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,k,E){this._selectionStart=A,this._selectionEnd=k,this._columnSelectMode=E}createRow(A,k,E,R,V,J,$,H,X,ne,ie){const re=[],oe=this._characterJoinerService.getJoinedCharacters(k),T=this._themeService.colors;let z,B=A.getNoBgTrimmedLength();E&&B<J+1&&(B=J+1);let P=0,he="",fe=0,ge=0,xe=0,Y=!1,U=0,pe=!1,le=0;const ce=[],ye=ne!==-1&&ie!==-1;for(let be=0;be<B;be++){A.loadCell(be,this._workCell);let Ie=this._workCell.getWidth();if(Ie===0)continue;let qe=!1,je=be,De=this._workCell;if(oe.length>0&&be===oe[0][0]){qe=!0;const ht=oe.shift();De=new u.JoinedCellData(this._workCell,A.translateToString(!0,ht[0],ht[1]),ht[1]-ht[0]),je=ht[1]-1,Ie=De.getWidth()}const Lt=this._isCellInSelection(be,k),$i=E&&be===J,Ae=ye&&be>=ne&&be<=ie;let Nt=!1;this._decorationService.forEachDecorationAtCell(be,k,void 0,(ht=>{Nt=!0}));let ve=De.getChars()||m.WHITESPACE_CELL_CHAR;if(ve===" "&&(De.isUnderline()||De.isOverline())&&(ve=" "),le=Ie*H-X.get(ve,De.isBold(),De.isItalic()),z){if(P&&(Lt&&pe||!Lt&&!pe&&De.bg===fe)&&(Lt&&pe&&T.selectionForeground||De.fg===ge)&&De.extended.ext===xe&&Ae===Y&&le===U&&!$i&&!qe&&!Nt){De.isInvisible()?he+=m.WHITESPACE_CELL_CHAR:he+=ve,P++;continue}P&&(z.textContent=he),z=this._document.createElement("span"),P=0,he=""}else z=this._document.createElement("span");if(fe=De.bg,ge=De.fg,xe=De.extended.ext,Y=Ae,U=le,pe=Lt,qe&&J>=be&&J<=je&&(J=be),!this._coreService.isCursorHidden&&$i&&this._coreService.isCursorInitialized){if(ce.push("xterm-cursor"),this._coreBrowserService.isFocused)$&&ce.push("xterm-cursor-blink"),ce.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(V)switch(V){case"outline":ce.push("xterm-cursor-outline");break;case"block":ce.push("xterm-cursor-block");break;case"bar":ce.push("xterm-cursor-bar");break;case"underline":ce.push("xterm-cursor-underline")}}if(De.isBold()&&ce.push("xterm-bold"),De.isItalic()&&ce.push("xterm-italic"),De.isDim()&&ce.push("xterm-dim"),he=De.isInvisible()?m.WHITESPACE_CELL_CHAR:De.getChars()||m.WHITESPACE_CELL_CHAR,De.isUnderline()&&(ce.push(`xterm-underline-${De.extended.underlineStyle}`),he===" "&&(he=" "),!De.isUnderlineColorDefault()))if(De.isUnderlineColorRGB())z.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(De.getUnderlineColor()).join(",")})`;else{let ht=De.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&De.isBold()&&ht<8&&(ht+=8),z.style.textDecorationColor=T.ansi[ht].css}De.isOverline()&&(ce.push("xterm-overline"),he===" "&&(he=" ")),De.isStrikethrough()&&ce.push("xterm-strikethrough"),Ae&&(z.style.textDecoration="underline");let Re=De.getFgColor(),Ze=De.getFgColorMode(),$e=De.getBgColor(),Ge=De.getBgColorMode();const ut=!!De.isInverse();if(ut){const ht=Re;Re=$e,$e=ht;const gs=Ze;Ze=Ge,Ge=gs}let ct,bt,wt,Mt=!1;switch(this._decorationService.forEachDecorationAtCell(be,k,void 0,(ht=>{ht.options.layer!=="top"&&Mt||(ht.backgroundColorRGB&&(Ge=50331648,$e=ht.backgroundColorRGB.rgba>>8&16777215,ct=ht.backgroundColorRGB),ht.foregroundColorRGB&&(Ze=50331648,Re=ht.foregroundColorRGB.rgba>>8&16777215,bt=ht.foregroundColorRGB),Mt=ht.options.layer==="top")})),!Mt&&Lt&&(ct=this._coreBrowserService.isFocused?T.selectionBackgroundOpaque:T.selectionInactiveBackgroundOpaque,$e=ct.rgba>>8&16777215,Ge=50331648,Mt=!0,T.selectionForeground&&(Ze=50331648,Re=T.selectionForeground.rgba>>8&16777215,bt=T.selectionForeground)),Mt&&ce.push("xterm-decoration-top"),Ge){case 16777216:case 33554432:wt=T.ansi[$e],ce.push(`xterm-bg-${$e}`);break;case 50331648:wt=y.channels.toColor($e>>16,$e>>8&255,255&$e),this._addStyle(z,`background-color:#${S(($e>>>0).toString(16),"0",6)}`);break;default:ut?(wt=T.foreground,ce.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):wt=T.background}switch(ct||De.isDim()&&(ct=y.color.multiplyOpacity(wt,.5)),Ze){case 16777216:case 33554432:De.isBold()&&Re<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Re+=8),this._applyMinimumContrast(z,wt,T.ansi[Re],De,ct,void 0)||ce.push(`xterm-fg-${Re}`);break;case 50331648:const ht=y.channels.toColor(Re>>16&255,Re>>8&255,255&Re);this._applyMinimumContrast(z,wt,ht,De,ct,bt)||this._addStyle(z,`color:#${S(Re.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(z,wt,T.foreground,De,ct,bt)||ut&&ce.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ce.length&&(z.className=ce.join(" "),ce.length=0),$i||qe||Nt?z.textContent=he:P++,le!==this.defaultSpacing&&(z.style.letterSpacing=`${le}px`),re.push(z),be=je}return z&&P&&(z.textContent=he),re}_applyMinimumContrast(A,k,E,R,V,J){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const $=this._getContrastCache(R);let H;if(V||J||(H=$.getColor(k.rgba,E.rgba)),H===void 0){const X=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);H=y.color.ensureContrastRatio(V||k,J||E,X),$.setColor((V||k).rgba,(J||E).rgba,H??null)}return!!H&&(this._addStyle(A,`color:${H.css}`),!0)}_getContrastCache(A){return A.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(A,k){A.setAttribute("style",`${A.getAttribute("style")||""}${k};`)}_isCellInSelection(A,k){const E=this._selectionStart,R=this._selectionEnd;return!(!E||!R)&&(this._columnSelectMode?E[0]<=R[0]?A>=E[0]&&k>=E[1]&&A<R[0]&&k<=R[1]:A<E[0]&&k>=E[1]&&A>=R[0]&&k<=R[1]:k>E[1]&&k<R[1]||E[1]===R[1]&&k===E[1]&&A>=E[0]&&A<R[0]||E[1]<R[1]&&k===R[1]&&A<R[0]||E[1]<R[1]&&k===E[1]&&A>=E[0])}};function S(A,k,E){for(;A.length<E;)A=k+A;return A}c.DomRendererRowFactory=v=g([N(1,h.ICharacterJoinerService),N(2,C.IOptionsService),N(3,h.ICoreBrowserService),N(4,C.ICoreService),N(5,C.IDecorationService),N(6,h.IThemeService)],v)},2550:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WidthCache=void 0,c.WidthCache=class{constructor(b,g){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=b.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 N=b.createElement("span");N.classList.add("xterm-char-measure-element");const f=b.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const m=b.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const w=b.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[N,f,m,w],this._container.appendChild(N),this._container.appendChild(f),this._container.appendChild(m),this._container.appendChild(w),g.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(b,g,N,f){b===this._font&&g===this._fontSize&&N===this._weight&&f===this._weightBold||(this._font=b,this._fontSize=g,this._weight=N,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${N}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${N}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(b,g,N){let f=0;if(!g&&!N&&b.length===1&&(f=b.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const C=this._measure(b,0);return C>0&&(this._flat[f]=C),C}let m=b;g&&(m+="B"),N&&(m+="I");let w=this._holey.get(m);if(w===void 0){let C=0;g&&(C|=1),N&&(C|=2),w=this._measure(b,C),w>0&&this._holey.set(m,w)}return w}_measure(b,g){const N=this._measureElements[g];return N.textContent=b.repeat(32),N.offsetWidth/32}}},2223:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;const g=b(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},6171:(I,c)=>{function b(N){return 57508<=N&&N<=57558}function g(N){return N>=128512&&N<=128591||N>=127744&&N<=128511||N>=128640&&N<=128767||N>=9728&&N<=9983||N>=9984&&N<=10175||N>=65024&&N<=65039||N>=129280&&N<=129535||N>=127462&&N<=127487}Object.defineProperty(c,"__esModule",{value:!0}),c.computeNextVariantOffset=c.createRenderDimensions=c.treatGlyphAsBackgroundColor=c.allowRescaling=c.isEmoji=c.isRestrictedPowerlineGlyph=c.isPowerlineGlyph=c.throwIfFalsy=void 0,c.throwIfFalsy=function(N){if(!N)throw new Error("value must not be falsy");return N},c.isPowerlineGlyph=b,c.isRestrictedPowerlineGlyph=function(N){return 57520<=N&&N<=57527},c.isEmoji=g,c.allowRescaling=function(N,f,m,w){return f===1&&m>Math.ceil(1.5*w)&&N!==void 0&&N>255&&!g(N)&&!b(N)&&!(function(C){return 57344<=C&&C<=63743})(N)},c.treatGlyphAsBackgroundColor=function(N){return b(N)||(function(f){return 9472<=f&&f<=9631})(N)},c.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},c.computeNextVariantOffset=function(N,f,m=0){return(N-(2*Math.round(f)-m))%(2*Math.round(f))}},6052:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createSelectionRenderModel=void 0;class b{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(N,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=N.buffers.active.ydisp,y=f[1]-C,h=m[1]-C,u=Math.max(y,0),o=Math.min(h,N.rows-1);u>=N.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=y,this.viewportEndRow=h,this.viewportCappedStartRow=u,this.viewportCappedEndRow=o,this.startCol=f[0],this.endCol=m[0])}isCellSelected(N,f,m){return!!this.hasSelection&&(m-=N.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)}}c.createSelectionRenderModel=function(){return new b}},456:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0,c.SelectionModel=class{constructor(b){this._bufferService=b,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 b=this.selectionStart[0]+this.selectionStartLength;return b>this._bufferService.cols?b%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(b/this._bufferService.cols)-1]:[b%this._bufferService.cols,this.selectionStart[1]+Math.floor(b/this._bufferService.cols)]:[b,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const b=this.selectionStart[0]+this.selectionStartLength;return b>this._bufferService.cols?[b%this._bufferService.cols,this.selectionStart[1]+Math.floor(b/this._bufferService.cols)]:[Math.max(b,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const b=this.selectionStart,g=this.selectionEnd;return!(!b||!g)&&(b[1]>g[1]||b[1]===g[1]&&b[0]>g[0])}handleTrim(b){return this.selectionStart&&(this.selectionStart[1]-=b),this.selectionEnd&&(this.selectionEnd[1]-=b),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(I,c,b){var g=this&&this.__decorate||function(o,l,v,S){var A,k=arguments.length,E=k<3?l:S===null?S=Object.getOwnPropertyDescriptor(l,v):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,l,v,S);else for(var R=o.length-1;R>=0;R--)(A=o[R])&&(E=(k<3?A(E):k>3?A(l,v,E):A(l,v))||E);return k>3&&E&&Object.defineProperty(l,v,E),E},N=this&&this.__param||function(o,l){return function(v,S){l(v,S,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;const f=b(2585),m=b(8460),w=b(844);let C=c.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,l,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 u(this._optionsService))}catch{this._measureStrategy=this.register(new h(o,l,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())}};c.CharSizeService=C=g([N(2,f.IOptionsService)],C);class y extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,v){l!==void 0&&l>0&&v!==void 0&&v>0&&(this._result.width=l,this._result.height=v)}}class h extends y{constructor(l,v,S){super(),this._document=l,this._parentElement=v,this._optionsService=S,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 u extends y{constructor(l){super(),this._optionsService=l,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 l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(I,c,b){var g=this&&this.__decorate||function(u,o,l,v){var S,A=arguments.length,k=A<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(u,o,l,v);else for(var E=u.length-1;E>=0;E--)(S=u[E])&&(k=(A<3?S(k):A>3?S(o,l,k):S(o,l))||k);return A>3&&k&&Object.defineProperty(o,l,k),k},N=this&&this.__param||function(u,o){return function(l,v){o(l,v,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;const f=b(3734),m=b(643),w=b(511),C=b(2585);class y extends f.AttributeData{constructor(o,l,v){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,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()]}}c.JoinedCellData=y;let h=c.CharacterJoinerService=class C1{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const v=[],S=l.translateToString(!0);let A=0,k=0,E=0,R=l.getFg(0),V=l.getBg(0);for(let J=0;J<l.getTrimmedLength();J++)if(l.loadCell(J,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==V){if(J-A>1){const $=this._getJoinedRanges(S,E,k,l,A);for(let H=0;H<$.length;H++)v.push($[H])}A=J,E=k,R=this._workCell.fg,V=this._workCell.bg}k+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const J=this._getJoinedRanges(S,E,k,l,A);for(let $=0;$<J.length;$++)v.push(J[$])}return v}_getJoinedRanges(o,l,v,S,A){const k=o.substring(l,v);let E=[];try{E=this._characterJoiners[0].handler(k)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const V=this._characterJoiners[R].handler(k);for(let J=0;J<V.length;J++)C1._mergeRanges(E,V[J])}catch(V){console.error(V)}return this._stringRangesToCellRanges(E,S,A),E}_stringRangesToCellRanges(o,l,v){let S=0,A=!1,k=0,E=o[S];if(E){for(let R=v;R<this._bufferService.cols;R++){const V=l.getWidth(R),J=l.getString(R).length||m.WHITESPACE_CELL_CHAR.length;if(V!==0){if(!A&&E[0]<=k&&(E[0]=R,A=!0),E[1]<=k){if(E[1]=R,E=o[++S],!E)break;E[0]<=k?(E[0]=R,A=!0):A=!1}k+=J}}E&&(E[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let v=!1;for(let S=0;S<o.length;S++){const A=o[S];if(v){if(l[1]<=A[0])return o[S-1][1]=l[1],o;if(l[1]<=A[1])return o[S-1][1]=Math.max(l[1],A[1]),o.splice(S,1),o;o.splice(S,1),S--}else{if(l[1]<=A[0])return o.splice(S,0,l),o;if(l[1]<=A[1])return A[0]=Math.min(l[0],A[0]),o;l[0]<A[1]&&(A[0]=Math.min(l[0],A[0]),v=!0)}}return v?o[o.length-1][1]=l[1]:o.push(l),o}};c.CharacterJoinerService=h=g([N(0,C.IBufferService)],h)},5114:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;const g=b(844),N=b(8460),f=b(3656);class m extends g.Disposable{constructor(y,h,u){super(),this._textarea=y,this._window=h,this.mainDocument=u,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new N.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new N.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,N.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(y){this._window!==y&&(this._window=y,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}c.CoreBrowserService=m;class w extends g.Disposable{constructor(y){super(),this._parentWindow=y,this._windowResizeListener=this.register(new g.MutableDisposable),this._onDprChange=this.register(new N.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,g.toDisposable)((()=>this.clearListener())))}setWindow(y){this._parentWindow=y,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 y;this._outerListener&&((y=this._resolutionMediaMatchList)==null||y.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,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LinkProviderService=void 0;const g=b(844);class N extends g.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,g.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)}}}}c.LinkProviderService=N},8934:function(I,c,b){var g=this&&this.__decorate||function(C,y,h,u){var o,l=arguments.length,v=l<3?y:u===null?u=Object.getOwnPropertyDescriptor(y,h):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(C,y,h,u);else for(var S=C.length-1;S>=0;S--)(o=C[S])&&(v=(l<3?o(v):l>3?o(y,h,v):o(y,h))||v);return l>3&&v&&Object.defineProperty(y,h,v),v},N=this&&this.__param||function(C,y){return function(h,u){y(h,u,C)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;const f=b(4725),m=b(9806);let w=c.MouseService=class{constructor(C,y){this._renderService=C,this._charSizeService=y}getCoords(C,y,h,u,o){return(0,m.getCoords)(window,C,y,h,u,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(C,y){const h=(0,m.getCoordsRelativeToElement)(window,C,y);if(this._charSizeService.hasValidSize)return h[0]=Math.min(Math.max(h[0],0),this._renderService.dimensions.css.canvas.width-1),h[1]=Math.min(Math.max(h[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(h[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(h[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(h[0]),y:Math.floor(h[1])}}};c.MouseService=w=g([N(0,f.IRenderService),N(1,f.ICharSizeService)],w)},3230:function(I,c,b){var g=this&&this.__decorate||function(o,l,v,S){var A,k=arguments.length,E=k<3?l:S===null?S=Object.getOwnPropertyDescriptor(l,v):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,l,v,S);else for(var R=o.length-1;R>=0;R--)(A=o[R])&&(E=(k<3?A(E):k>3?A(l,v,E):A(l,v))||E);return k>3&&E&&Object.defineProperty(l,v,E),E},N=this&&this.__param||function(o,l){return function(v,S){l(v,S,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;const f=b(6193),m=b(4725),w=b(8460),C=b(844),y=b(7226),h=b(2585);let u=c.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,l,v,S,A,k,E,R){super(),this._rowCount=o,this._charSizeService=S,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new y.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(((V,J)=>this._renderRows(V,J)),E),this.register(this._renderDebouncer),this.register(E.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(k.onResize((()=>this._fullRefresh()))),this.register(k.buffers.onBufferActivate((()=>{var V;return(V=this._renderer.value)==null?void 0:V.clear()}))),this.register(v.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(A.onDecorationRegistered((()=>this._fullRefresh()))),this.register(A.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(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(E.window,l),this.register(E.onWindowChange((V=>this._registerIntersectionObserver(V,l))))}_registerIntersectionObserver(o,l){if("IntersectionObserver"in o){const v=new o.IntersectionObserver((S=>this._handleIntersectionChange(S[S.length-1])),{threshold:0});v.observe(l),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,l,v=!1){this._isPaused?this._needsFullRefresh=!0:(v||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,l,this._rowCount))}_renderRows(o,l){this._renderer.value&&(o=Math.min(o,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(o,l),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:l}),this._onRender.fire({start:o,end:l}),this._isNextRenderRedrawOnly=!0)}resize(o,l){this._rowCount=l,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((l=>this.refreshRows(l.start,l.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,l;this._renderer.value&&((l=(o=this._renderer.value).clearTextureAtlas)==null||l.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var v;return(v=this._renderer.value)==null?void 0:v.handleResize(o,l)})):this._renderer.value.handleResize(o,l),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,l,v){var S;this._selectionState.start=o,this._selectionState.end=l,this._selectionState.columnSelectMode=v,(S=this._renderer.value)==null||S.handleSelectionChanged(o,l,v)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};c.RenderService=u=g([N(2,h.IOptionsService),N(3,m.ICharSizeService),N(4,h.IDecorationService),N(5,h.IBufferService),N(6,m.ICoreBrowserService),N(7,m.IThemeService)],u)},9312:function(I,c,b){var g=this&&this.__decorate||function(E,R,V,J){var $,H=arguments.length,X=H<3?R:J===null?J=Object.getOwnPropertyDescriptor(R,V):J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(E,R,V,J);else for(var ne=E.length-1;ne>=0;ne--)($=E[ne])&&(X=(H<3?$(X):H>3?$(R,V,X):$(R,V))||X);return H>3&&X&&Object.defineProperty(R,V,X),X},N=this&&this.__param||function(E,R){return function(V,J){R(V,J,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;const f=b(9806),m=b(9504),w=b(456),C=b(4725),y=b(8460),h=b(844),u=b(6114),o=b(4841),l=b(511),v=b(2585),S=" ",A=new RegExp(S,"g");let k=c.SelectionService=class extends h.Disposable{constructor(E,R,V,J,$,H,X,ne,ie){super(),this._element=E,this._screenElement=R,this._linkifier=V,this._bufferService=J,this._coreService=$,this._mouseService=H,this._optionsService=X,this._renderService=ne,this._coreBrowserService=ie,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new y.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new y.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new y.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=re=>this._handleMouseMove(re),this._mouseUpListener=re=>this._handleMouseUp(re),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((re=>this._handleTrim(re))),this.register(this._bufferService.buffers.onBufferActivate((re=>this._handleBufferActivate(re)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,h.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 E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!E||!R||E[0]===R[0]&&E[1]===R[1])}get selectionText(){const E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!E||!R)return"";const V=this._bufferService.buffer,J=[];if(this._activeSelectionMode===3){if(E[0]===R[0])return"";const $=E[0]<R[0]?E[0]:R[0],H=E[0]<R[0]?R[0]:E[0];for(let X=E[1];X<=R[1];X++){const ne=V.translateBufferLineToString(X,!0,$,H);J.push(ne)}}else{const $=E[1]===R[1]?R[0]:void 0;J.push(V.translateBufferLineToString(E[1],!0,E[0],$));for(let H=E[1]+1;H<=R[1]-1;H++){const X=V.lines.get(H),ne=V.translateBufferLineToString(H,!0);X!=null&&X.isWrapped?J[J.length-1]+=ne:J.push(ne)}if(E[1]!==R[1]){const H=V.lines.get(R[1]),X=V.translateBufferLineToString(R[1],!0,0,R[0]);H&&H.isWrapped?J[J.length-1]+=X:J.push(X)}}return J.map(($=>$.replace(A," "))).join(u.isWindows?`\r
280
- `:`
281
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(E){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),u.isLinux&&E&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(E){const R=this._getMouseBufferCoords(E),V=this._model.finalSelectionStart,J=this._model.finalSelectionEnd;return!!(V&&J&&R)&&this._areCoordsInSelection(R,V,J)}isCellInSelection(E,R){const V=this._model.finalSelectionStart,J=this._model.finalSelectionEnd;return!(!V||!J)&&this._areCoordsInSelection([E,R],V,J)}_areCoordsInSelection(E,R,V){return E[1]>R[1]&&E[1]<V[1]||R[1]===V[1]&&E[1]===R[1]&&E[0]>=R[0]&&E[0]<V[0]||R[1]<V[1]&&E[1]===V[1]&&E[0]<V[0]||R[1]<V[1]&&E[1]===R[1]&&E[0]>=R[0]}_selectWordAtCursor(E,R){var $,H;const V=(H=($=this._linkifier.currentLink)==null?void 0:$.link)==null?void 0:H.range;if(V)return this._model.selectionStart=[V.start.x-1,V.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(V,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const J=this._getMouseBufferCoords(E);return!!J&&(this._selectWordAt(J,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(E,R){this._model.clearSelection(),E=Math.max(E,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(E){this._model.handleTrim(E)&&this.refresh()}_getMouseBufferCoords(E){const R=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(E){let R=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,E,this._screenElement)[1];const V=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=V?0:(R>V&&(R-=V),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(E){return u.isMac?E.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:E.shiftKey}handleMouseDown(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._handleIncrementalClick(E):E.detail===1?this._handleSingleClick(E):E.detail===2?this._handleDoubleClick(E):E.detail===3&&this._handleTripleClick(E),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),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(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))}_handleSingleClick(E){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(E)?3:0,this._model.selectionStart=this._getMouseBufferCoords(E),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(E){this._selectWordAtCursor(E,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(E){const R=this._getMouseBufferCoords(E);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(E){return E.altKey&&!(u.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(E){if(E.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),!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(E),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const V=this._bufferService.buffer;if(this._model.selectionEnd[1]<V.lines.length){const J=V.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]++}R&&R[0]===this._model.selectionEnd[0]&&R[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 E=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}}_handleMouseUp(E){const R=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&E.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const V=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(V&&V[0]!==void 0&&V[1]!==void 0){const J=(0,m.moveToCellSequence)(V[0]-1,V[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(J,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,V=!(!E||!R||E[0]===R[0]&&E[1]===R[1]);V?E&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&E[0]===this._oldSelectionStart[0]&&E[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(E,R,V)):this._oldHasSelection&&this._fireOnSelectionChange(E,R,V)}_fireOnSelectionChange(E,R,V){this._oldSelectionStart=E,this._oldSelectionEnd=R,this._oldHasSelection=V,this._onSelectionChange.fire()}_handleBufferActivate(E){this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(E,R){let V=R;for(let J=0;R>=J;J++){const $=E.loadCell(J,this._workCell).getChars().length;this._workCell.getWidth()===0?V--:$>1&&R!==J&&(V+=$-1)}return V}setSelection(E,R,V){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,R],this._model.selectionStartLength=V,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(E){this._isClickInSelection(E)||(this._selectWordAtCursor(E,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(E,R,V=!0,J=!0){if(E[0]>=this._bufferService.cols)return;const $=this._bufferService.buffer,H=$.lines.get(E[1]);if(!H)return;const X=$.translateBufferLineToString(E[1],!1);let ne=this._convertViewportColToCharacterIndex(H,E[0]),ie=ne;const re=E[0]-ne;let oe=0,T=0,z=0,B=0;if(X.charAt(ne)===" "){for(;ne>0&&X.charAt(ne-1)===" ";)ne--;for(;ie<X.length&&X.charAt(ie+1)===" ";)ie++}else{let fe=E[0],ge=E[0];H.getWidth(fe)===0&&(oe++,fe--),H.getWidth(ge)===2&&(T++,ge++);const xe=H.getString(ge).length;for(xe>1&&(B+=xe-1,ie+=xe-1);fe>0&&ne>0&&!this._isCharWordSeparator(H.loadCell(fe-1,this._workCell));){H.loadCell(fe-1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===0?(oe++,fe--):Y>1&&(z+=Y-1,ne-=Y-1),ne--,fe--}for(;ge<H.length&&ie+1<X.length&&!this._isCharWordSeparator(H.loadCell(ge+1,this._workCell));){H.loadCell(ge+1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(T++,ge++):Y>1&&(B+=Y-1,ie+=Y-1),ie++,ge++}}ie++;let P=ne+re-oe+z,he=Math.min(this._bufferService.cols,ie-ne+oe+T-z-B);if(R||X.slice(ne,ie).trim()!==""){if(V&&P===0&&H.getCodePoint(0)!==32){const fe=$.lines.get(E[1]-1);if(fe&&H.isWrapped&&fe.getCodePoint(this._bufferService.cols-1)!==32){const ge=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(ge){const xe=this._bufferService.cols-ge.start;P-=xe,he+=xe}}}if(J&&P+he===this._bufferService.cols&&H.getCodePoint(this._bufferService.cols-1)!==32){const fe=$.lines.get(E[1]+1);if(fe!=null&&fe.isWrapped&&fe.getCodePoint(0)!==32){const ge=this._getWordAt([0,E[1]+1],!1,!1,!0);ge&&(he+=ge.length)}}return{start:P,length:he}}}_selectWordAt(E,R){const V=this._getWordAt(E,R);if(V){for(;V.start<0;)V.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[V.start,E[1]],this._model.selectionStartLength=V.length}}_selectToWordAt(E){const R=this._getWordAt(E,!0);if(R){let V=E[1];for(;R.start<0;)R.start+=this._bufferService.cols,V--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,V++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,V]}}_isCharWordSeparator(E){return E.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(E.getChars())>=0}_selectLineAt(E){const R=this._bufferService.buffer.getWrappedRangeForLine(E),V={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(V,this._bufferService.cols)}};c.SelectionService=k=g([N(3,v.IBufferService),N(4,v.ICoreService),N(5,C.IMouseService),N(6,v.IOptionsService),N(7,C.IRenderService),N(8,C.ICoreBrowserService)],k)},4725:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ILinkProviderService=c.IThemeService=c.ICharacterJoinerService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;const g=b(8343);c.ICharSizeService=(0,g.createDecorator)("CharSizeService"),c.ICoreBrowserService=(0,g.createDecorator)("CoreBrowserService"),c.IMouseService=(0,g.createDecorator)("MouseService"),c.IRenderService=(0,g.createDecorator)("RenderService"),c.ISelectionService=(0,g.createDecorator)("SelectionService"),c.ICharacterJoinerService=(0,g.createDecorator)("CharacterJoinerService"),c.IThemeService=(0,g.createDecorator)("ThemeService"),c.ILinkProviderService=(0,g.createDecorator)("LinkProviderService")},6731:function(I,c,b){var g=this&&this.__decorate||function(k,E,R,V){var J,$=arguments.length,H=$<3?E:V===null?V=Object.getOwnPropertyDescriptor(E,R):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(k,E,R,V);else for(var X=k.length-1;X>=0;X--)(J=k[X])&&(H=($<3?J(H):$>3?J(E,R,H):J(E,R))||H);return $>3&&H&&Object.defineProperty(E,R,H),H},N=this&&this.__param||function(k,E){return function(R,V){E(R,V,k)}};Object.defineProperty(c,"__esModule",{value:!0}),c.ThemeService=c.DEFAULT_ANSI_COLORS=void 0;const f=b(7239),m=b(8055),w=b(8460),C=b(844),y=b(2585),h=m.css.toColor("#ffffff"),u=m.css.toColor("#000000"),o=m.css.toColor("#ffffff"),l=m.css.toColor("#000000"),v={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.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")],E=[0,95,135,175,215,255];for(let R=0;R<216;R++){const V=E[R/36%6|0],J=E[R/6%6|0],$=E[R%6];k.push({css:m.channels.toCss(V,J,$),rgba:m.channels.toRgba(V,J,$)})}for(let R=0;R<24;R++){const V=8+10*R;k.push({css:m.channels.toCss(V,V,V),rgba:m.channels.toRgba(V,V,V)})}return k})());let S=c.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:h,background:u,cursor:o,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:v,selectionBackgroundOpaque:m.color.blend(u,v),selectionInactiveBackgroundTransparent:v,selectionInactiveBackgroundOpaque:m.color.blend(u,v),ansi:c.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(k={}){const E=this._colors;if(E.foreground=A(k.foreground,h),E.background=A(k.background,u),E.cursor=A(k.cursor,o),E.cursorAccent=A(k.cursorAccent,l),E.selectionBackgroundTransparent=A(k.selectionBackground,v),E.selectionBackgroundOpaque=m.color.blend(E.background,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundTransparent=A(k.selectionInactiveBackground,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundOpaque=m.color.blend(E.background,E.selectionInactiveBackgroundTransparent),E.selectionForeground=k.selectionForeground?A(k.selectionForeground,m.NULL_COLOR):void 0,E.selectionForeground===m.NULL_COLOR&&(E.selectionForeground=void 0),m.color.isOpaque(E.selectionBackgroundTransparent)&&(E.selectionBackgroundTransparent=m.color.opacity(E.selectionBackgroundTransparent,.3)),m.color.isOpaque(E.selectionInactiveBackgroundTransparent)&&(E.selectionInactiveBackgroundTransparent=m.color.opacity(E.selectionInactiveBackgroundTransparent,.3)),E.ansi=c.DEFAULT_ANSI_COLORS.slice(),E.ansi[0]=A(k.black,c.DEFAULT_ANSI_COLORS[0]),E.ansi[1]=A(k.red,c.DEFAULT_ANSI_COLORS[1]),E.ansi[2]=A(k.green,c.DEFAULT_ANSI_COLORS[2]),E.ansi[3]=A(k.yellow,c.DEFAULT_ANSI_COLORS[3]),E.ansi[4]=A(k.blue,c.DEFAULT_ANSI_COLORS[4]),E.ansi[5]=A(k.magenta,c.DEFAULT_ANSI_COLORS[5]),E.ansi[6]=A(k.cyan,c.DEFAULT_ANSI_COLORS[6]),E.ansi[7]=A(k.white,c.DEFAULT_ANSI_COLORS[7]),E.ansi[8]=A(k.brightBlack,c.DEFAULT_ANSI_COLORS[8]),E.ansi[9]=A(k.brightRed,c.DEFAULT_ANSI_COLORS[9]),E.ansi[10]=A(k.brightGreen,c.DEFAULT_ANSI_COLORS[10]),E.ansi[11]=A(k.brightYellow,c.DEFAULT_ANSI_COLORS[11]),E.ansi[12]=A(k.brightBlue,c.DEFAULT_ANSI_COLORS[12]),E.ansi[13]=A(k.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),E.ansi[14]=A(k.brightCyan,c.DEFAULT_ANSI_COLORS[14]),E.ansi[15]=A(k.brightWhite,c.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const R=Math.min(E.ansi.length-16,k.extendedAnsi.length);for(let V=0;V<R;V++)E.ansi[V+16]=A(k.extendedAnsi[V],c.DEFAULT_ANSI_COLORS[V+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 E=0;E<this._restoreColors.ansi.length;++E)this._colors.ansi[E]=this._restoreColors.ansi[E]}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 A(k,E){if(k!==void 0)try{return m.css.toColor(k)}catch{}return E}c.ThemeService=S=g([N(0,y.IOptionsService)],S)},6349:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;const g=b(8460),N=b(844);class f extends N.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new g.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new g.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new g.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 y=0;y<Math.min(w,this.length);y++)C[y]=this._array[this._getCyclicIndex(y)];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,...y){if(C){for(let h=w;h<this._length-C;h++)this._array[this._getCyclicIndex(h)]=this._array[this._getCyclicIndex(h+C)];this._length-=C,this.onDeleteEmitter.fire({index:w,amount:C})}for(let h=this._length-1;h>=w;h--)this._array[this._getCyclicIndex(h+y.length)]=this._array[this._getCyclicIndex(h)];for(let h=0;h<y.length;h++)this._array[this._getCyclicIndex(w+h)]=y[h];if(y.length&&this.onInsertEmitter.fire({index:w,amount:y.length}),this._length+y.length>this._maxLength){const h=this._length+y.length-this._maxLength;this._startIndex+=h,this._length=this._maxLength,this.onTrimEmitter.fire(h)}else this._length+=y.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,C,y){if(!(C<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+y<0)throw new Error("Cannot shift elements in list beyond index 0");if(y>0){for(let u=C-1;u>=0;u--)this.set(w+u+y,this.get(w+u));const h=w+C+y-this._length;if(h>0)for(this._length+=h;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let h=0;h<C;h++)this.set(w+h+y,this.get(w+h))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}c.CircularList=f},1439:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function b(g,N=5){if(typeof g!="object")return g;const f=Array.isArray(g)?[]:{};for(const m in g)f[m]=N<=1?g[m]:g[m]&&b(g[m],N-1);return f}},8055:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=c.NULL_COLOR=void 0;let b=0,g=0,N=0,f=0;var m,w,C,y,h;function u(l){const v=l.toString(16);return v.length<2?"0"+v:v}function o(l,v){return l<v?(v+.05)/(l+.05):(l+.05)/(v+.05)}c.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(v,S,A,k){return k!==void 0?`#${u(v)}${u(S)}${u(A)}${u(k)}`:`#${u(v)}${u(S)}${u(A)}`},l.toRgba=function(v,S,A,k=255){return(v<<24|S<<16|A<<8|k)>>>0},l.toColor=function(v,S,A,k){return{css:l.toCss(v,S,A,k),rgba:l.toRgba(v,S,A,k)}}})(m||(c.channels=m={})),(function(l){function v(S,A){return f=Math.round(255*A),[b,g,N]=h.toChannels(S.rgba),{css:m.toCss(b,g,N,f),rgba:m.toRgba(b,g,N,f)}}l.blend=function(S,A){if(f=(255&A.rgba)/255,f===1)return{css:A.css,rgba:A.rgba};const k=A.rgba>>24&255,E=A.rgba>>16&255,R=A.rgba>>8&255,V=S.rgba>>24&255,J=S.rgba>>16&255,$=S.rgba>>8&255;return b=V+Math.round((k-V)*f),g=J+Math.round((E-J)*f),N=$+Math.round((R-$)*f),{css:m.toCss(b,g,N),rgba:m.toRgba(b,g,N)}},l.isOpaque=function(S){return(255&S.rgba)==255},l.ensureContrastRatio=function(S,A,k){const E=h.ensureContrastRatio(S.rgba,A.rgba,k);if(E)return m.toColor(E>>24&255,E>>16&255,E>>8&255)},l.opaque=function(S){const A=(255|S.rgba)>>>0;return[b,g,N]=h.toChannels(A),{css:m.toCss(b,g,N),rgba:A}},l.opacity=v,l.multiplyOpacity=function(S,A){return f=255&S.rgba,v(S,f*A/255)},l.toColorRGB=function(S){return[S.rgba>>24&255,S.rgba>>16&255,S.rgba>>8&255]}})(w||(c.color=w={})),(function(l){let v,S;try{const A=document.createElement("canvas");A.width=1,A.height=1;const k=A.getContext("2d",{willReadFrequently:!0});k&&(v=k,v.globalCompositeOperation="copy",S=v.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return b=parseInt(A.slice(1,2).repeat(2),16),g=parseInt(A.slice(2,3).repeat(2),16),N=parseInt(A.slice(3,4).repeat(2),16),m.toColor(b,g,N);case 5:return b=parseInt(A.slice(1,2).repeat(2),16),g=parseInt(A.slice(2,3).repeat(2),16),N=parseInt(A.slice(3,4).repeat(2),16),f=parseInt(A.slice(4,5).repeat(2),16),m.toColor(b,g,N,f);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const k=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return b=parseInt(k[1]),g=parseInt(k[2]),N=parseInt(k[3]),f=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),m.toColor(b,g,N,f);if(!v||!S)throw new Error("css.toColor: Unsupported css format");if(v.fillStyle=S,v.fillStyle=A,typeof v.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(v.fillRect(0,0,1,1),[b,g,N,f]=v.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(b,g,N,f),css:A}}})(C||(c.css=C={})),(function(l){function v(S,A,k){const E=S/255,R=A/255,V=k/255;return .2126*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(V<=.03928?V/12.92:Math.pow((V+.055)/1.055,2.4))}l.relativeLuminance=function(S){return v(S>>16&255,S>>8&255,255&S)},l.relativeLuminance2=v})(y||(c.rgb=y={})),(function(l){function v(A,k,E){const R=A>>24&255,V=A>>16&255,J=A>>8&255;let $=k>>24&255,H=k>>16&255,X=k>>8&255,ne=o(y.relativeLuminance2($,H,X),y.relativeLuminance2(R,V,J));for(;ne<E&&($>0||H>0||X>0);)$-=Math.max(0,Math.ceil(.1*$)),H-=Math.max(0,Math.ceil(.1*H)),X-=Math.max(0,Math.ceil(.1*X)),ne=o(y.relativeLuminance2($,H,X),y.relativeLuminance2(R,V,J));return($<<24|H<<16|X<<8|255)>>>0}function S(A,k,E){const R=A>>24&255,V=A>>16&255,J=A>>8&255;let $=k>>24&255,H=k>>16&255,X=k>>8&255,ne=o(y.relativeLuminance2($,H,X),y.relativeLuminance2(R,V,J));for(;ne<E&&($<255||H<255||X<255);)$=Math.min(255,$+Math.ceil(.1*(255-$))),H=Math.min(255,H+Math.ceil(.1*(255-H))),X=Math.min(255,X+Math.ceil(.1*(255-X))),ne=o(y.relativeLuminance2($,H,X),y.relativeLuminance2(R,V,J));return($<<24|H<<16|X<<8|255)>>>0}l.blend=function(A,k){if(f=(255&k)/255,f===1)return k;const E=k>>24&255,R=k>>16&255,V=k>>8&255,J=A>>24&255,$=A>>16&255,H=A>>8&255;return b=J+Math.round((E-J)*f),g=$+Math.round((R-$)*f),N=H+Math.round((V-H)*f),m.toRgba(b,g,N)},l.ensureContrastRatio=function(A,k,E){const R=y.relativeLuminance(A>>8),V=y.relativeLuminance(k>>8);if(o(R,V)<E){if(V<R){const H=v(A,k,E),X=o(R,y.relativeLuminance(H>>8));if(X<E){const ne=S(A,k,E);return X>o(R,y.relativeLuminance(ne>>8))?H:ne}return H}const J=S(A,k,E),$=o(R,y.relativeLuminance(J>>8));if($<E){const H=v(A,k,E);return $>o(R,y.relativeLuminance(H>>8))?J:H}return J}},l.reduceLuminance=v,l.increaseLuminance=S,l.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(h||(c.rgba=h={})),c.toPaddedHex=u,c.contrastRatio=o},8969:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;const g=b(844),N=b(2585),f=b(4348),m=b(7866),w=b(744),C=b(7302),y=b(6975),h=b(8460),u=b(1753),o=b(1480),l=b(7994),v=b(9282),S=b(5435),A=b(5981),k=b(2660);let E=!1;class R extends g.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new h.EventEmitter),this._onScroll.event((J=>{var $;($=this._onScrollApi)==null||$.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 $ in J)this.optionsService.options[$]=J[$]}constructor(J){super(),this._windowsWrappingHeuristics=this.register(new g.MutableDisposable),this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new h.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new C.OptionsService(J)),this._instantiationService.setService(N.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(N.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(N.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(y.CoreService)),this._instantiationService.setService(N.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(u.CoreMouseService)),this._instantiationService.setService(N.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(N.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(N.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(N.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new S.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,h.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,h.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,h.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,h.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(($=>{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(($=>{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 A.WriteBuffer((($,H)=>this._inputHandler.parse($,H)))),this.register((0,h.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(J,$){this._writeBuffer.write(J,$)}writeSync(J,$){this._logService.logLevel<=N.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(J,$)}input(J,$=!0){this.coreService.triggerDataEvent(J,$)}resize(J,$){isNaN(J)||isNaN($)||(J=Math.max(J,w.MINIMUM_COLS),$=Math.max($,w.MINIMUM_ROWS),this._bufferService.resize(J,$))}scroll(J,$=!1){this._bufferService.scroll(J,$)}scrollLines(J,$,H){this._bufferService.scrollLines(J,$,H)}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 $=J-this._bufferService.buffer.ydisp;$!==0&&this.scrollLines($)}registerEscHandler(J,$){return this._inputHandler.registerEscHandler(J,$)}registerDcsHandler(J,$){return this._inputHandler.registerDcsHandler(J,$)}registerCsiHandler(J,$){return this._inputHandler.registerCsiHandler(J,$)}registerOscHandler(J,$){return this._inputHandler.registerOscHandler(J,$)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let J=!1;const $=this.optionsService.rawOptions.windowsPty;$&&$.buildNumber!==void 0&&$.buildNumber!==void 0?J=$.backend==="conpty"&&$.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,g.toDisposable)((()=>{for(const $ of J)$.dispose()}))}}}c.CoreTerminal=R},8460:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.runAndSubscribe=c.forwardEvent=c.EventEmitter=void 0,c.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=b=>(this._listeners.push(b),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===b)return void this._listeners.splice(g,1)}}})),this._event}fire(b,g){const N=[];for(let f=0;f<this._listeners.length;f++)N.push(this._listeners[f]);for(let f=0;f<N.length;f++)N[f].call(void 0,b,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},c.forwardEvent=function(b,g){return b((N=>g.fire(N)))},c.runAndSubscribe=function(b,g){return g(void 0),b((N=>g(N)))}},5435:function(I,c,b){var g=this&&this.__decorate||function(oe,T,z,B){var P,he=arguments.length,fe=he<3?T:B===null?B=Object.getOwnPropertyDescriptor(T,z):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(oe,T,z,B);else for(var ge=oe.length-1;ge>=0;ge--)(P=oe[ge])&&(fe=(he<3?P(fe):he>3?P(T,z,fe):P(T,z))||fe);return he>3&&fe&&Object.defineProperty(T,z,fe),fe},N=this&&this.__param||function(oe,T){return function(z,B){T(z,B,oe)}};Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;const f=b(2584),m=b(7116),w=b(2015),C=b(844),y=b(482),h=b(8437),u=b(8460),o=b(643),l=b(511),v=b(3734),S=b(2585),A=b(1480),k=b(6242),E=b(6351),R=b(5941),V={"(":0,")":1,"*":2,"+":3,"-":1,".":2},J=131072;function $(oe,T){if(oe>24)return T.setWinLines||!1;switch(oe){case 1:return!!T.restoreWin;case 2:return!!T.minimizeWin;case 3:return!!T.setWinPosition;case 4:return!!T.setWinSizePixels;case 5:return!!T.raiseWin;case 6:return!!T.lowerWin;case 7:return!!T.refreshWin;case 8:return!!T.setWinSizeChars;case 9:return!!T.maximizeWin;case 10:return!!T.fullscreenWin;case 11:return!!T.getWinState;case 13:return!!T.getWinPosition;case 14:return!!T.getWinSizePixels;case 15:return!!T.getScreenSizePixels;case 16:return!!T.getCellSizePixels;case 18:return!!T.getWinSizeChars;case 19:return!!T.getScreenSizeChars;case 20:return!!T.getIconTitle;case 21:return!!T.getWinTitle;case 22:return!!T.pushTitle;case 23:return!!T.popTitle;case 24:return!!T.setWinLines}return!1}var H;(function(oe){oe[oe.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",oe[oe.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(H||(c.WindowsOptionsReportType=H={}));let X=0;class ne extends C.Disposable{getAttrData(){return this._curAttrData}constructor(T,z,B,P,he,fe,ge,xe,Y=new w.EscapeSequenceParser){super(),this._bufferService=T,this._charsetService=z,this._coreService=B,this._logService=P,this._optionsService=he,this._oscLinkService=fe,this._coreMouseService=ge,this._unicodeService=xe,this._parser=Y,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new y.StringToUtf32,this._utf8Decoder=new y.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new u.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new u.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new u.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new u.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new u.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new u.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new u.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new u.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new u.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new u.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new u.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new u.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 ie(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((U=>this._activeBuffer=U.activeBuffer))),this._parser.setCsiHandlerFallback(((U,pe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(U),params:pe.toArray()})})),this._parser.setEscHandlerFallback((U=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(U)})})),this._parser.setExecuteHandlerFallback((U=>{this._logService.debug("Unknown EXECUTE code: ",{code:U})})),this._parser.setOscHandlerFallback(((U,pe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:U,action:pe,data:le})})),this._parser.setDcsHandlerFallback(((U,pe,le)=>{pe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(U),action:pe,payload:le})})),this._parser.setPrintHandler(((U,pe,le)=>this.print(U,pe,le))),this._parser.registerCsiHandler({final:"@"},(U=>this.insertChars(U))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(U=>this.scrollLeft(U))),this._parser.registerCsiHandler({final:"A"},(U=>this.cursorUp(U))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(U=>this.scrollRight(U))),this._parser.registerCsiHandler({final:"B"},(U=>this.cursorDown(U))),this._parser.registerCsiHandler({final:"C"},(U=>this.cursorForward(U))),this._parser.registerCsiHandler({final:"D"},(U=>this.cursorBackward(U))),this._parser.registerCsiHandler({final:"E"},(U=>this.cursorNextLine(U))),this._parser.registerCsiHandler({final:"F"},(U=>this.cursorPrecedingLine(U))),this._parser.registerCsiHandler({final:"G"},(U=>this.cursorCharAbsolute(U))),this._parser.registerCsiHandler({final:"H"},(U=>this.cursorPosition(U))),this._parser.registerCsiHandler({final:"I"},(U=>this.cursorForwardTab(U))),this._parser.registerCsiHandler({final:"J"},(U=>this.eraseInDisplay(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(U=>this.eraseInDisplay(U,!0))),this._parser.registerCsiHandler({final:"K"},(U=>this.eraseInLine(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(U=>this.eraseInLine(U,!0))),this._parser.registerCsiHandler({final:"L"},(U=>this.insertLines(U))),this._parser.registerCsiHandler({final:"M"},(U=>this.deleteLines(U))),this._parser.registerCsiHandler({final:"P"},(U=>this.deleteChars(U))),this._parser.registerCsiHandler({final:"S"},(U=>this.scrollUp(U))),this._parser.registerCsiHandler({final:"T"},(U=>this.scrollDown(U))),this._parser.registerCsiHandler({final:"X"},(U=>this.eraseChars(U))),this._parser.registerCsiHandler({final:"Z"},(U=>this.cursorBackwardTab(U))),this._parser.registerCsiHandler({final:"`"},(U=>this.charPosAbsolute(U))),this._parser.registerCsiHandler({final:"a"},(U=>this.hPositionRelative(U))),this._parser.registerCsiHandler({final:"b"},(U=>this.repeatPrecedingCharacter(U))),this._parser.registerCsiHandler({final:"c"},(U=>this.sendDeviceAttributesPrimary(U))),this._parser.registerCsiHandler({prefix:">",final:"c"},(U=>this.sendDeviceAttributesSecondary(U))),this._parser.registerCsiHandler({final:"d"},(U=>this.linePosAbsolute(U))),this._parser.registerCsiHandler({final:"e"},(U=>this.vPositionRelative(U))),this._parser.registerCsiHandler({final:"f"},(U=>this.hVPosition(U))),this._parser.registerCsiHandler({final:"g"},(U=>this.tabClear(U))),this._parser.registerCsiHandler({final:"h"},(U=>this.setMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(U=>this.setModePrivate(U))),this._parser.registerCsiHandler({final:"l"},(U=>this.resetMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(U=>this.resetModePrivate(U))),this._parser.registerCsiHandler({final:"m"},(U=>this.charAttributes(U))),this._parser.registerCsiHandler({final:"n"},(U=>this.deviceStatus(U))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(U=>this.deviceStatusPrivate(U))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(U=>this.softReset(U))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(U=>this.setCursorStyle(U))),this._parser.registerCsiHandler({final:"r"},(U=>this.setScrollRegion(U))),this._parser.registerCsiHandler({final:"s"},(U=>this.saveCursor(U))),this._parser.registerCsiHandler({final:"t"},(U=>this.windowOptions(U))),this._parser.registerCsiHandler({final:"u"},(U=>this.restoreCursor(U))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(U=>this.insertColumns(U))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(U=>this.deleteColumns(U))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(U=>this.selectProtected(U))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(U=>this.requestMode(U,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(U=>this.requestMode(U,!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((U=>(this.setTitle(U),this.setIconName(U),!0)))),this._parser.registerOscHandler(1,new k.OscHandler((U=>this.setIconName(U)))),this._parser.registerOscHandler(2,new k.OscHandler((U=>this.setTitle(U)))),this._parser.registerOscHandler(4,new k.OscHandler((U=>this.setOrReportIndexedColor(U)))),this._parser.registerOscHandler(8,new k.OscHandler((U=>this.setHyperlink(U)))),this._parser.registerOscHandler(10,new k.OscHandler((U=>this.setOrReportFgColor(U)))),this._parser.registerOscHandler(11,new k.OscHandler((U=>this.setOrReportBgColor(U)))),this._parser.registerOscHandler(12,new k.OscHandler((U=>this.setOrReportCursorColor(U)))),this._parser.registerOscHandler(104,new k.OscHandler((U=>this.restoreIndexedColor(U)))),this._parser.registerOscHandler(110,new k.OscHandler((U=>this.restoreFgColor(U)))),this._parser.registerOscHandler(111,new k.OscHandler((U=>this.restoreBgColor(U)))),this._parser.registerOscHandler(112,new k.OscHandler((U=>this.restoreCursorColor(U)))),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 U in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:U},(()=>this.selectCharset("("+U))),this._parser.registerEscHandler({intermediates:")",final:U},(()=>this.selectCharset(")"+U))),this._parser.registerEscHandler({intermediates:"*",final:U},(()=>this.selectCharset("*"+U))),this._parser.registerEscHandler({intermediates:"+",final:U},(()=>this.selectCharset("+"+U))),this._parser.registerEscHandler({intermediates:"-",final:U},(()=>this.selectCharset("-"+U))),this._parser.registerEscHandler({intermediates:".",final:U},(()=>this.selectCharset("."+U))),this._parser.registerEscHandler({intermediates:"/",final:U},(()=>this.selectCharset("/"+U)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((U=>(this._logService.error("Parsing error: ",U),U))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler(((U,pe)=>this.requestStatusString(U,pe))))}_preserveStack(T,z,B,P){this._parseStack.paused=!0,this._parseStack.cursorStartX=T,this._parseStack.cursorStartY=z,this._parseStack.decodedLength=B,this._parseStack.position=P}_logSlowResolvingAsync(T){this._logService.logLevel<=S.LogLevelEnum.WARN&&Promise.race([T,new Promise(((z,B)=>setTimeout((()=>B("#SLOW_TIMEOUT")),5e3)))]).catch((z=>{if(z!=="#SLOW_TIMEOUT")throw z;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(T,z){let B,P=this._activeBuffer.x,he=this._activeBuffer.y,fe=0;const ge=this._parseStack.paused;if(ge){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,z))return this._logSlowResolvingAsync(B),B;P=this._parseStack.cursorStartX,he=this._parseStack.cursorStartY,this._parseStack.paused=!1,T.length>J&&(fe=this._parseStack.position+J)}if(this._logService.logLevel<=S.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof T=="string"?` "${T}"`:` "${Array.prototype.map.call(T,(U=>String.fromCharCode(U))).join("")}"`),typeof T=="string"?T.split("").map((U=>U.charCodeAt(0))):T),this._parseBuffer.length<T.length&&this._parseBuffer.length<J&&(this._parseBuffer=new Uint32Array(Math.min(T.length,J))),ge||this._dirtyRowTracker.clearRange(),T.length>J)for(let U=fe;U<T.length;U+=J){const pe=U+J<T.length?U+J:T.length,le=typeof T=="string"?this._stringDecoder.decode(T.substring(U,pe),this._parseBuffer):this._utf8Decoder.decode(T.subarray(U,pe),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,le))return this._preserveStack(P,he,le,U),this._logSlowResolvingAsync(B),B}else if(!ge){const U=typeof T=="string"?this._stringDecoder.decode(T,this._parseBuffer):this._utf8Decoder.decode(T,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,U))return this._preserveStack(P,he,U,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===P&&this._activeBuffer.y===he||this._onCursorMove.fire();const xe=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Y=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Y<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Y,this._bufferService.rows-1),Math.min(xe,this._bufferService.rows-1))}print(T,z,B){let P,he;const fe=this._charsetService.charset,ge=this._optionsService.rawOptions.screenReaderMode,xe=this._bufferService.cols,Y=this._coreService.decPrivateModes.wraparound,U=this._coreService.modes.insertMode,pe=this._curAttrData;let le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-z>0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,pe);let ce=this._parser.precedingJoinState;for(let ye=z;ye<B;++ye){if(P=T[ye],P<127&&fe){const je=fe[String.fromCharCode(P)];je&&(P=je.charCodeAt(0))}const be=this._unicodeService.charProperties(P,ce);he=A.UnicodeService.extractWidth(be);const Ie=A.UnicodeService.extractShouldJoin(be),qe=Ie?A.UnicodeService.extractWidth(ce):0;if(ce=be,ge&&this._onA11yChar.fire((0,y.stringFromCodePoint)(P)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+he-qe>xe){if(Y){const je=le;let De=this._activeBuffer.x-qe;for(this._activeBuffer.x=qe,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),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),qe>0&&le instanceof h.BufferLine&&le.copyCellsFrom(je,De,0,qe,!1);De<xe;)je.setCellFromCodepoint(De++,0,1,pe)}else if(this._activeBuffer.x=xe-1,he===2)continue}if(Ie&&this._activeBuffer.x){const je=le.getWidth(this._activeBuffer.x-1)?1:2;le.addCodepointToCell(this._activeBuffer.x-je,P,he);for(let De=he-qe;--De>=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,pe)}else if(U&&(le.insertCells(this._activeBuffer.x,he-qe,this._activeBuffer.getNullCell(pe)),le.getWidth(xe-1)===2&&le.setCellFromCodepoint(xe-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,pe)),le.setCellFromCodepoint(this._activeBuffer.x++,P,he,pe),he>0)for(;--he;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,pe)}this._parser.precedingJoinState=ce,this._activeBuffer.x<xe&&B-z>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,pe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(T,z){return T.final!=="t"||T.prefix||T.intermediates?this._parser.registerCsiHandler(T,z):this._parser.registerCsiHandler(T,(B=>!$(B.params[0],this._optionsService.rawOptions.windowOptions)||z(B)))}registerDcsHandler(T,z){return this._parser.registerDcsHandler(T,new E.DcsHandler(z))}registerEscHandler(T,z){return this._parser.registerEscHandler(T,z)}registerOscHandler(T,z){return this._parser.registerOscHandler(T,new k.OscHandler(z))}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 T;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&&((T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&T.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);z.hasWidth(this._activeBuffer.x)&&!z.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const T=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-T),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(T=this._bufferService.cols-1){this._activeBuffer.x=Math.min(T,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(T,z){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=T,this._activeBuffer.y=this._activeBuffer.scrollTop+z):(this._activeBuffer.x=T,this._activeBuffer.y=z),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(T,z){this._restrictCursor(),this._setCursor(this._activeBuffer.x+T,this._activeBuffer.y+z)}cursorUp(T){const z=this._activeBuffer.y-this._activeBuffer.scrollTop;return z>=0?this._moveCursor(0,-Math.min(z,T.params[0]||1)):this._moveCursor(0,-(T.params[0]||1)),!0}cursorDown(T){const z=this._activeBuffer.scrollBottom-this._activeBuffer.y;return z>=0?this._moveCursor(0,Math.min(z,T.params[0]||1)):this._moveCursor(0,T.params[0]||1),!0}cursorForward(T){return this._moveCursor(T.params[0]||1,0),!0}cursorBackward(T){return this._moveCursor(-(T.params[0]||1),0),!0}cursorNextLine(T){return this.cursorDown(T),this._activeBuffer.x=0,!0}cursorPrecedingLine(T){return this.cursorUp(T),this._activeBuffer.x=0,!0}cursorCharAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(T){return this._setCursor(T.length>=2?(T.params[1]||1)-1:0,(T.params[0]||1)-1),!0}charPosAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(T){return this._moveCursor(T.params[0]||1,0),!0}linePosAbsolute(T){return this._setCursor(this._activeBuffer.x,(T.params[0]||1)-1),!0}vPositionRelative(T){return this._moveCursor(0,T.params[0]||1),!0}hVPosition(T){return this.cursorPosition(T),!0}tabClear(T){const z=T.params[0];return z===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:z===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let z=T.params[0]||1;for(;z--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let z=T.params[0]||1;for(;z--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(T){const z=T.params[0];return z===1&&(this._curAttrData.bg|=536870912),z!==2&&z!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(T,z,B,P=!1,he=!1){const fe=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);fe.replaceCells(z,B,this._activeBuffer.getNullCell(this._eraseAttrData()),he),P&&(fe.isWrapped=!1)}_resetBufferLine(T,z=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),z),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+T),B.isWrapped=!1)}eraseInDisplay(T,z=!1){let B;switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,z);B<this._bufferService.rows;B++)this._resetBufferLine(B,z);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,z),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,z);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,z);this._dirtyRowTracker.markDirty(0);break;case 3:const P=this._activeBuffer.lines.length-this._bufferService.rows;P>0&&(this._activeBuffer.lines.trimStart(P),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-P,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-P,0),this._onScroll.fire(0))}return!0}eraseInLine(T,z=!1){switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,z);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,z);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,z)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(T){this._restrictCursor();let z=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,he=this._bufferService.rows-1+this._activeBuffer.ybase-P+1;for(;z--;)this._activeBuffer.lines.splice(he-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(T){this._restrictCursor();let z=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let P;for(P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,P=this._bufferService.rows-1+this._activeBuffer.ybase-P;z--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(P,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(T){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.insertCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(T){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.deleteCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(T){let z=T.params[0]||1;for(;z--;)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(T){let z=T.params[0]||1;for(;z--;)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(h.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=T.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.deleteCells(0,z,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=T.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.insertCells(0,z,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=T.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.insertCells(this._activeBuffer.x,z,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=T.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.deleteCells(this._activeBuffer.x,z,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(T){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(T.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(T){const z=this._parser.precedingJoinState;if(!z)return!0;const B=T.params[0]||1,P=A.UnicodeService.extractWidth(z),he=this._activeBuffer.x-P,fe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(he),ge=new Uint32Array(fe.length*B);let xe=0;for(let U=0;U<fe.length;){const pe=fe.codePointAt(U)||0;ge[xe++]=pe,U+=pe>65535?2:1}let Y=xe;for(let U=1;U<B;++U)ge.copyWithin(Y,0,xe),Y+=xe;return this.print(ge,0,Y),!0}sendDeviceAttributesPrimary(T){return T.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(T){return T.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(T.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(T){return(this._optionsService.rawOptions.termName+"").indexOf(T)===0}setMode(T){for(let z=0;z<T.length;z++)switch(T.params[z]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(T){for(let z=0;z<T.length;z++)switch(T.params[z]){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(T){for(let z=0;z<T.length;z++)switch(T.params[z]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(T){for(let z=0;z<T.length;z++)switch(T.params[z]){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(),T.params[z]===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(T,z){const B=this._coreService.decPrivateModes,{activeProtocol:P,activeEncoding:he}=this._coreMouseService,fe=this._coreService,{buffers:ge,cols:xe}=this._bufferService,{active:Y,alt:U}=ge,pe=this._optionsService.rawOptions,le=Ie=>Ie?1:2,ce=T.params[0];return ye=ce,be=z?ce===2?4:ce===4?le(fe.modes.insertMode):ce===12?3:ce===20?le(pe.convertEol):0:ce===1?le(B.applicationCursorKeys):ce===3?pe.windowOptions.setWinLines?xe===80?2:xe===132?1:0:0:ce===6?le(B.origin):ce===7?le(B.wraparound):ce===8?3:ce===9?le(P==="X10"):ce===12?le(pe.cursorBlink):ce===25?le(!fe.isCursorHidden):ce===45?le(B.reverseWraparound):ce===66?le(B.applicationKeypad):ce===67?4:ce===1e3?le(P==="VT200"):ce===1002?le(P==="DRAG"):ce===1003?le(P==="ANY"):ce===1004?le(B.sendFocus):ce===1005?4:ce===1006?le(he==="SGR"):ce===1015?4:ce===1016?le(he==="SGR_PIXELS"):ce===1048?1:ce===47||ce===1047||ce===1049?le(Y===U):ce===2004?le(B.bracketedPasteMode):0,fe.triggerDataEvent(`${f.C0.ESC}[${z?"":"?"}${ye};${be}$y`),!0;var ye,be}_updateAttrColor(T,z,B,P,he){return z===2?(T|=50331648,T&=-16777216,T|=v.AttributeData.fromColorRGB([B,P,he])):z===5&&(T&=-50331904,T|=33554432|255&B),T}_extractColor(T,z,B){const P=[0,0,-1,0,0,0];let he=0,fe=0;do{if(P[fe+he]=T.params[z+fe],T.hasSubParams(z+fe)){const ge=T.getSubParams(z+fe);let xe=0;do P[1]===5&&(he=1),P[fe+xe+1+he]=ge[xe];while(++xe<ge.length&&xe+fe+1+he<P.length);break}if(P[1]===5&&fe+he>=2||P[1]===2&&fe+he>=5)break;P[1]&&(he=1)}while(++fe+z<T.length&&fe+he<P.length);for(let ge=2;ge<P.length;++ge)P[ge]===-1&&(P[ge]=0);switch(P[0]){case 38:B.fg=this._updateAttrColor(B.fg,P[1],P[3],P[4],P[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,P[1],P[3],P[4],P[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,P[1],P[3],P[4],P[5])}return fe}_processUnderline(T,z){z.extended=z.extended.clone(),(!~T||T>5)&&(T=1),z.extended.underlineStyle=T,z.fg|=268435456,T===0&&(z.fg&=-268435457),z.updateExtended()}_processSGR0(T){T.fg=h.DEFAULT_ATTR_DATA.fg,T.bg=h.DEFAULT_ATTR_DATA.bg,T.extended=T.extended.clone(),T.extended.underlineStyle=0,T.extended.underlineColor&=-67108864,T.updateExtended()}charAttributes(T){if(T.length===1&&T.params[0]===0)return this._processSGR0(this._curAttrData),!0;const z=T.length;let B;const P=this._curAttrData;for(let he=0;he<z;he++)B=T.params[he],B>=30&&B<=37?(P.fg&=-50331904,P.fg|=16777216|B-30):B>=40&&B<=47?(P.bg&=-50331904,P.bg|=16777216|B-40):B>=90&&B<=97?(P.fg&=-50331904,P.fg|=16777224|B-90):B>=100&&B<=107?(P.bg&=-50331904,P.bg|=16777224|B-100):B===0?this._processSGR0(P):B===1?P.fg|=134217728:B===3?P.bg|=67108864:B===4?(P.fg|=268435456,this._processUnderline(T.hasSubParams(he)?T.getSubParams(he)[0]:1,P)):B===5?P.fg|=536870912:B===7?P.fg|=67108864:B===8?P.fg|=1073741824:B===9?P.fg|=2147483648:B===2?P.bg|=134217728:B===21?this._processUnderline(2,P):B===22?(P.fg&=-134217729,P.bg&=-134217729):B===23?P.bg&=-67108865:B===24?(P.fg&=-268435457,this._processUnderline(0,P)):B===25?P.fg&=-536870913:B===27?P.fg&=-67108865:B===28?P.fg&=-1073741825:B===29?P.fg&=2147483647:B===39?(P.fg&=-67108864,P.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):B===49?(P.bg&=-67108864,P.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?he+=this._extractColor(T,he,P):B===53?P.bg|=1073741824:B===55?P.bg&=-1073741825:B===59?(P.extended=P.extended.clone(),P.extended.underlineColor=-1,P.updateExtended()):B===100?(P.fg&=-67108864,P.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,P.bg&=-67108864,P.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(T){switch(T.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const z=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${z};${B}R`)}return!0}deviceStatusPrivate(T){if(T.params[0]===6){const z=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${z};${B}R`)}return!0}softReset(T){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.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(T){const z=T.params[0]||1;switch(z){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 B=z%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(T){const z=T.params[0]||1;let B;return(T.length<2||(B=T.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>z&&(this._activeBuffer.scrollTop=z-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(T){if(!$(T.params[0],this._optionsService.rawOptions.windowOptions))return!0;const z=T.length>1?T.params[1]:0;switch(T.params[0]){case 14:z!==2&&this._onRequestWindowsOptionsReport.fire(H.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(H.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:z!==0&&z!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),z!==0&&z!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:z!==0&&z!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),z!==0&&z!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(T){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(T){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(T){return this._windowTitle=T,this._onTitleChange.fire(T),!0}setIconName(T){return this._iconName=T,!0}setOrReportIndexedColor(T){const z=[],B=T.split(";");for(;B.length>1;){const P=B.shift(),he=B.shift();if(/^\d+$/.exec(P)){const fe=parseInt(P);if(re(fe))if(he==="?")z.push({type:0,index:fe});else{const ge=(0,R.parseColor)(he);ge&&z.push({type:1,index:fe,color:ge})}}}return z.length&&this._onColor.fire(z),!0}setHyperlink(T){const z=T.split(";");return!(z.length<2)&&(z[1]?this._createHyperlink(z[0],z[1]):!z[0]&&this._finishHyperlink())}_createHyperlink(T,z){this._getCurrentLinkId()&&this._finishHyperlink();const B=T.split(":");let P;const he=B.findIndex((fe=>fe.startsWith("id=")));return he!==-1&&(P=B[he].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:P,uri:z}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(T,z){const B=T.split(";");for(let P=0;P<B.length&&!(z>=this._specialColors.length);++P,++z)if(B[P]==="?")this._onColor.fire([{type:0,index:this._specialColors[z]}]);else{const he=(0,R.parseColor)(B[P]);he&&this._onColor.fire([{type:1,index:this._specialColors[z],color:he}])}return!0}setOrReportFgColor(T){return this._setOrReportSpecialColor(T,0)}setOrReportBgColor(T){return this._setOrReportSpecialColor(T,1)}setOrReportCursorColor(T){return this._setOrReportSpecialColor(T,2)}restoreIndexedColor(T){if(!T)return this._onColor.fire([{type:2}]),!0;const z=[],B=T.split(";");for(let P=0;P<B.length;++P)if(/^\d+$/.exec(B[P])){const he=parseInt(B[P]);re(he)&&z.push({type:2,index:he})}return z.length&&this._onColor.fire(z),!0}restoreFgColor(T){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(T){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(T){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(T){return T.length!==2?(this.selectDefaultCharset(),!0):(T[0]==="/"||this._charsetService.setgCharset(V[T[0]],m.CHARSETS[T[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 T=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,T,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=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(T){return this._charsetService.setgLevel(T),!0}screenAlignmentPattern(){const T=new l.CellData;T.content=4194373,T.fg=this._curAttrData.fg,T.bg=this._curAttrData.bg,this._setCursor(0,0);for(let z=0;z<this._bufferService.rows;++z){const B=this._activeBuffer.ybase+this._activeBuffer.y+z,P=this._activeBuffer.lines.get(B);P&&(P.fill(T),P.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(T,z){const B=this._bufferService.buffer,P=this._optionsService.rawOptions;return(he=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${he}${f.C0.ESC}\\`),!0))(T==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:T==='"p'?'P1$r61;1"p':T==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:T==="m"?"P1$r0m":T===" q"?`P1$r${{block:2,underline:4,bar:6}[P.cursorStyle]-(P.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(T,z){this._dirtyRowTracker.markRangeDirty(T,z)}}c.InputHandler=ne;let ie=class{constructor(oe){this._bufferService=oe,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(oe){oe<this.start?this.start=oe:oe>this.end&&(this.end=oe)}markRangeDirty(oe,T){oe>T&&(X=oe,oe=T,T=X),oe<this.start&&(this.start=oe),T>this.end&&(this.end=T)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function re(oe){return 0<=oe&&oe<256}ie=g([N(0,S.IBufferService)],ie)},844:(I,c)=>{function b(g){for(const N of g)N.dispose();g.length=0}Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.toDisposable=c.MutableDisposable=c.Disposable=void 0,c.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const g of this._disposables)g.dispose();this._disposables.length=0}register(g){return this._disposables.push(g),g}unregister(g){const N=this._disposables.indexOf(g);N!==-1&&this._disposables.splice(N,1)}},c.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var N;this._isDisposed||g===this._value||((N=this._value)==null||N.dispose(),this._value=g)}clear(){this.value=void 0}dispose(){var g;this._isDisposed=!0,(g=this._value)==null||g.dispose(),this._value=void 0}},c.toDisposable=function(g){return{dispose:g}},c.disposeArray=b,c.getDisposeArrayDisposable=function(g){return{dispose:()=>b(g)}}},1505:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.FourKeyMap=c.TwoKeyMap=void 0;class b{constructor(){this._data={}}set(N,f,m){this._data[N]||(this._data[N]={}),this._data[N][f]=m}get(N,f){return this._data[N]?this._data[N][f]:void 0}clear(){this._data={}}}c.TwoKeyMap=b,c.FourKeyMap=class{constructor(){this._data=new b}set(g,N,f,m,w){this._data.get(g,N)||this._data.set(g,N,new b),this._data.get(g,N).set(f,m,w)}get(g,N,f,m){var w;return(w=this._data.get(g,N))==null?void 0:w.get(f,m)}clear(){this._data.clear()}}},6114:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.isChromeOS=c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.getSafariVersion=c.isSafari=c.isLegacyEdge=c.isFirefox=c.isNode=void 0,c.isNode=typeof process<"u"&&"title"in process;const b=c.isNode?"node":navigator.userAgent,g=c.isNode?"node":navigator.platform;c.isFirefox=b.includes("Firefox"),c.isLegacyEdge=b.includes("Edge"),c.isSafari=/^((?!chrome|android).)*safari/i.test(b),c.getSafariVersion=function(){if(!c.isSafari)return 0;const N=b.match(/Version\/(\d+)/);return N===null||N.length<2?0:parseInt(N[1])},c.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),c.isIpad=g==="iPad",c.isIphone=g==="iPhone",c.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),c.isLinux=g.indexOf("Linux")>=0,c.isChromeOS=/\bCrOS\b/.test(b)},6106:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SortedList=void 0;let b=0;c.SortedList=class{constructor(g){this._getKey=g,this._array=[]}clear(){this._array.length=0}insert(g){this._array.length!==0?(b=this._search(this._getKey(g)),this._array.splice(b,0,g)):this._array.push(g)}delete(g){if(this._array.length===0)return!1;const N=this._getKey(g);if(N===void 0||(b=this._search(N),b===-1)||this._getKey(this._array[b])!==N)return!1;do if(this._array[b]===g)return this._array.splice(b,1),!0;while(++b<this._array.length&&this._getKey(this._array[b])===N);return!1}*getKeyIterator(g){if(this._array.length!==0&&(b=this._search(g),!(b<0||b>=this._array.length)&&this._getKey(this._array[b])===g))do yield this._array[b];while(++b<this._array.length&&this._getKey(this._array[b])===g)}forEachByKey(g,N){if(this._array.length!==0&&(b=this._search(g),!(b<0||b>=this._array.length)&&this._getKey(this._array[b])===g))do N(this._array[b]);while(++b<this._array.length&&this._getKey(this._array[b])===g)}values(){return[...this._array].values()}_search(g){let N=0,f=this._array.length-1;for(;f>=N;){let m=N+f>>1;const w=this._getKey(this._array[m]);if(w>g)f=m-1;else{if(!(w<g)){for(;m>0&&this._getKey(this._array[m-1])===g;)m--;return m}N=m+1}}return N}}},7226:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DebouncedIdleTask=c.IdleTaskQueue=c.PriorityTaskQueue=void 0;const g=b(6114);class N{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,y=0,h=w.timeRemaining(),u=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),y=Math.max(C,y),u=w.timeRemaining(),1.5*y>u)return h-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(h-C))}ms`),void this._start();h=u}this.clear()}}class f extends N{_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())}}}c.PriorityTaskQueue=f,c.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends N{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:f,c.DebouncedIdleTask=class{constructor(){this._queue=new c.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;const g=b(643);c.updateWindowsModeWrappedState=function(N){const f=N.buffer.lines.get(N.buffer.ybase+N.buffer.y-1),m=f==null?void 0:f.get(N.cols-1),w=N.buffer.lines.get(N.buffer.ybase+N.buffer.y);w&&m&&(w.isWrapped=m[g.CHAR_DATA_CODE_INDEX]!==g.NULL_CELL_CODE&&m[g.CHAR_DATA_CODE_INDEX]!==g.WHITESPACE_CELL_CODE)}},3734:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;class b{constructor(){this.fg=0,this.bg=0,this.extended=new g}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 b;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}c.AttributeData=b;class g{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 g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}c.ExtendedAttrs=g},9092:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Buffer=c.MAX_BUFFER_SIZE=void 0;const g=b(6349),N=b(7226),f=b(3734),m=b(8437),w=b(4634),C=b(511),y=b(643),h=b(4863),u=b(7116);c.MAX_BUFFER_SIZE=4294967295,c.Buffer=class{constructor(o,l,v){this._hasScrollback=o,this._optionsService=l,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=u.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,y.WHITESPACE_CELL_CHAR,y.WHITESPACE_CELL_WIDTH,y.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new N.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new g.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,l){return new m.BufferLine(this._bufferService.cols,this.getNullCell(o),l)}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 l=o+this._optionsService.rawOptions.scrollback;return l>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:l}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=m.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new g.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,l){const v=this.getNullCell(m.DEFAULT_ATTR_DATA);let S=0;const A=this._getCorrectBufferLength(l);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<o)for(let E=0;E<this.lines.length;E++)S+=+this.lines.get(E).resize(o,v);let k=0;if(this._rows<l)for(let E=this._rows;E<l;E++)this.lines.length<l+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 E=this._rows;E>l;E--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const E=this.lines.length-A;E>0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=A}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,l-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(o,l),this._cols>o))for(let k=0;k<this.lines.length;k++)S+=+this.lines.get(k).resize(o,v);this._cols=o,this._rows=l,this._memoryCleanupQueue.clear(),S>.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 l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>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,l){this._cols!==o&&(o>this._cols?this._reflowLarger(o,l):this._reflowSmaller(o,l))}_reflowLarger(o,l){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 S=(0,w.reflowLargerCreateNewLayout)(this.lines,v);(0,w.reflowLargerApplyNewLayout)(this.lines,S.layout),this._reflowLargerAdjustViewport(o,l,S.countRemoved)}}_reflowLargerAdjustViewport(o,l,v){const S=this.getNullCell(m.DEFAULT_ATTR_DATA);let A=v;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new m.BufferLine(o,S))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-v,0)}_reflowSmaller(o,l){const v=this.getNullCell(m.DEFAULT_ATTR_DATA),S=[];let A=0;for(let k=this.lines.length-1;k>=0;k--){let E=this.lines.get(k);if(!E||!E.isWrapped&&E.getTrimmedLength()<=o)continue;const R=[E];for(;E.isWrapped&&k>0;)E=this.lines.get(--k),R.unshift(E);const V=this.ybase+this.y;if(V>=k&&V<k+R.length)continue;const J=R[R.length-1].getTrimmedLength(),$=(0,w.reflowSmallerGetNewLineLengths)(R,this._cols,o),H=$.length-R.length;let X;X=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+H):Math.max(0,this.lines.length-this.lines.maxLength+H);const ne=[];for(let B=0;B<H;B++){const P=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);ne.push(P)}ne.length>0&&(S.push({start:k+R.length+A,newLines:ne}),A+=ne.length),R.push(...ne);let ie=$.length-1,re=$[ie];re===0&&(ie--,re=$[ie]);let oe=R.length-H-1,T=J;for(;oe>=0;){const B=Math.min(T,re);if(R[ie]===void 0)break;if(R[ie].copyCellsFrom(R[oe],T-B,re-B,B,!0),re-=B,re===0&&(ie--,re=$[ie]),T-=B,T===0){oe--;const P=Math.max(oe,0);T=(0,w.getWrappedLineTrimmedLength)(R,P,this._cols)}}for(let B=0;B<R.length;B++)$[B]<o&&R[B].setCell($[B],v);let z=H-X;for(;z-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+H,this.ybase+l-1)}if(S.length>0){const k=[],E=[];for(let ie=0;ie<this.lines.length;ie++)E.push(this.lines.get(ie));const R=this.lines.length;let V=R-1,J=0,$=S[J];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let H=0;for(let ie=Math.min(this.lines.maxLength-1,R+A-1);ie>=0;ie--)if($&&$.start>V+H){for(let re=$.newLines.length-1;re>=0;re--)this.lines.set(ie--,$.newLines[re]);ie++,k.push({index:V+1,amount:$.newLines.length}),H+=$.newLines.length,$=S[++J]}else this.lines.set(ie,E[V--]);let X=0;for(let ie=k.length-1;ie>=0;ie--)k[ie].index+=X,this.lines.onInsertEmitter.fire(k[ie]),X+=k[ie].amount;const ne=Math.max(0,R+A-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(o,l,v=0,S){const A=this.lines.get(o);return A?A.translateToString(l,v,S):""}getWrappedRangeForLine(o){let l=o,v=o;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;v+1<this.lines.length&&this.lines.get(v+1).isWrapped;)v++;return{first:l,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 l=0;l<this.markers.length;l++)this.markers[l].line===o&&(this.markers[l].dispose(),this.markers.splice(l--,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 l=new h.Marker(o);return this.markers.push(l),l.register(this.lines.onTrim((v=>{l.line-=v,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((v=>{l.line>=v.index&&(l.line+=v.amount)}))),l.register(this.lines.onDelete((v=>{l.line>=v.index&&l.line<v.index+v.amount&&l.dispose(),l.line>v.index&&(l.line-=v.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;const g=b(3734),N=b(511),f=b(643),m=b(482);c.DEFAULT_ATTR_DATA=Object.freeze(new g.AttributeData);let w=0;class C{constructor(h,u,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*h);const l=u||N.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let v=0;v<h;++v)this.setCell(v,l);this.length=h}get(h){const u=this._data[3*h+0],o=2097151&u;return[this._data[3*h+1],2097152&u?this._combined[h]:o?(0,m.stringFromCodePoint)(o):"",u>>22,2097152&u?this._combined[h].charCodeAt(this._combined[h].length-1):o]}set(h,u){this._data[3*h+1]=u[f.CHAR_DATA_ATTR_INDEX],u[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[h]=u[1],this._data[3*h+0]=2097152|h|u[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*h+0]=u[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|u[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(h){return this._data[3*h+0]>>22}hasWidth(h){return 12582912&this._data[3*h+0]}getFg(h){return this._data[3*h+1]}getBg(h){return this._data[3*h+2]}hasContent(h){return 4194303&this._data[3*h+0]}getCodePoint(h){const u=this._data[3*h+0];return 2097152&u?this._combined[h].charCodeAt(this._combined[h].length-1):2097151&u}isCombined(h){return 2097152&this._data[3*h+0]}getString(h){const u=this._data[3*h+0];return 2097152&u?this._combined[h]:2097151&u?(0,m.stringFromCodePoint)(2097151&u):""}isProtected(h){return 536870912&this._data[3*h+2]}loadCell(h,u){return w=3*h,u.content=this._data[w+0],u.fg=this._data[w+1],u.bg=this._data[w+2],2097152&u.content&&(u.combinedData=this._combined[h]),268435456&u.bg&&(u.extended=this._extendedAttrs[h]),u}setCell(h,u){2097152&u.content&&(this._combined[h]=u.combinedData),268435456&u.bg&&(this._extendedAttrs[h]=u.extended),this._data[3*h+0]=u.content,this._data[3*h+1]=u.fg,this._data[3*h+2]=u.bg}setCellFromCodepoint(h,u,o,l){268435456&l.bg&&(this._extendedAttrs[h]=l.extended),this._data[3*h+0]=u|o<<22,this._data[3*h+1]=l.fg,this._data[3*h+2]=l.bg}addCodepointToCell(h,u,o){let l=this._data[3*h+0];2097152&l?this._combined[h]+=(0,m.stringFromCodePoint)(u):2097151&l?(this._combined[h]=(0,m.stringFromCodePoint)(2097151&l)+(0,m.stringFromCodePoint)(u),l&=-2097152,l|=2097152):l=u|4194304,o&&(l&=-12582913,l|=o<<22),this._data[3*h+0]=l}insertCells(h,u,o){if((h%=this.length)&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h-1,0,1,o),u<this.length-h){const l=new N.CellData;for(let v=this.length-h-u-1;v>=0;--v)this.setCell(h+u+v,this.loadCell(h+v,l));for(let v=0;v<u;++v)this.setCell(h+v,o)}else for(let l=h;l<this.length;++l)this.setCell(l,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(h,u,o){if(h%=this.length,u<this.length-h){const l=new N.CellData;for(let v=0;v<this.length-h-u;++v)this.setCell(h+v,this.loadCell(h+u+v,l));for(let v=this.length-u;v<this.length;++v)this.setCell(v,o)}else for(let l=h;l<this.length;++l)this.setCell(l,o);h&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h-1,0,1,o),this.getWidth(h)!==0||this.hasContent(h)||this.setCellFromCodepoint(h,0,1,o)}replaceCells(h,u,o,l=!1){if(l)for(h&&this.getWidth(h-1)===2&&!this.isProtected(h-1)&&this.setCellFromCodepoint(h-1,0,1,o),u<this.length&&this.getWidth(u-1)===2&&!this.isProtected(u)&&this.setCellFromCodepoint(u,0,1,o);h<u&&h<this.length;)this.isProtected(h)||this.setCell(h,o),h++;else for(h&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h-1,0,1,o),u<this.length&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u,0,1,o);h<u&&h<this.length;)this.setCell(h++,o)}resize(h,u){if(h===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*h;if(h>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const l=new Uint32Array(o);l.set(this._data),this._data=l}for(let l=this.length;l<h;++l)this.setCell(l,u)}else{this._data=this._data.subarray(0,o);const l=Object.keys(this._combined);for(let S=0;S<l.length;S++){const A=parseInt(l[S],10);A>=h&&delete this._combined[A]}const v=Object.keys(this._extendedAttrs);for(let S=0;S<v.length;S++){const A=parseInt(v[S],10);A>=h&&delete this._extendedAttrs[A]}}return this.length=h,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const h=new Uint32Array(this._data.length);return h.set(this._data),this._data=h,1}return 0}fill(h,u=!1){if(u)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,h);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,h)}}copyFrom(h){this.length!==h.length?this._data=new Uint32Array(h._data):this._data.set(h._data),this.length=h.length,this._combined={};for(const u in h._combined)this._combined[u]=h._combined[u];this._extendedAttrs={};for(const u in h._extendedAttrs)this._extendedAttrs[u]=h._extendedAttrs[u];this.isWrapped=h.isWrapped}clone(){const h=new C(0);h._data=new Uint32Array(this._data),h.length=this.length;for(const u in this._combined)h._combined[u]=this._combined[u];for(const u in this._extendedAttrs)h._extendedAttrs[u]=this._extendedAttrs[u];return h.isWrapped=this.isWrapped,h}getTrimmedLength(){for(let h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0])return h+(this._data[3*h+0]>>22);return 0}getNoBgTrimmedLength(){for(let h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0]||50331648&this._data[3*h+2])return h+(this._data[3*h+0]>>22);return 0}copyCellsFrom(h,u,o,l,v){const S=h._data;if(v)for(let k=l-1;k>=0;k--){for(let E=0;E<3;E++)this._data[3*(o+k)+E]=S[3*(u+k)+E];268435456&S[3*(u+k)+2]&&(this._extendedAttrs[o+k]=h._extendedAttrs[u+k])}else for(let k=0;k<l;k++){for(let E=0;E<3;E++)this._data[3*(o+k)+E]=S[3*(u+k)+E];268435456&S[3*(u+k)+2]&&(this._extendedAttrs[o+k]=h._extendedAttrs[u+k])}const A=Object.keys(h._combined);for(let k=0;k<A.length;k++){const E=parseInt(A[k],10);E>=u&&(this._combined[E-u+o]=h._combined[E])}}translateToString(h,u,o,l){u=u??0,o=o??this.length,h&&(o=Math.min(o,this.getTrimmedLength())),l&&(l.length=0);let v="";for(;u<o;){const S=this._data[3*u+0],A=2097151&S,k=2097152&S?this._combined[u]:A?(0,m.stringFromCodePoint)(A):f.WHITESPACE_CELL_CHAR;if(v+=k,l)for(let E=0;E<k.length;++E)l.push(u);u+=S>>22||1}return l&&l.push(u),v}}c.BufferLine=C},4841:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getRangeLength=void 0,c.getRangeLength=function(b,g){if(b.start.y>b.end.y)throw new Error(`Buffer range end (${b.end.x}, ${b.end.y}) cannot be before start (${b.start.x}, ${b.start.y})`);return g*(b.end.y-b.start.y)+(b.end.x-b.start.x+1)}},4634:(I,c)=>{function b(g,N,f){if(N===g.length-1)return g[N].getTrimmedLength();const m=!g[N].hasContent(f-1)&&g[N].getWidth(f-1)===1,w=g[N+1].getWidth(0)===2;return m&&w?f-1:f}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(g,N,f,m,w){const C=[];for(let y=0;y<g.length-1;y++){let h=y,u=g.get(++h);if(!u.isWrapped)continue;const o=[g.get(y)];for(;h<g.length&&u.isWrapped;)o.push(u),u=g.get(++h);if(m>=y&&m<h){y+=o.length-1;continue}let l=0,v=b(o,l,N),S=1,A=0;for(;S<o.length;){const E=b(o,S,N),R=E-A,V=f-v,J=Math.min(R,V);o[l].copyCellsFrom(o[S],A,v,J,!1),v+=J,v===f&&(l++,v=0),A+=J,A===E&&(S++,A=0),v===0&&l!==0&&o[l-1].getWidth(f-1)===2&&(o[l].copyCellsFrom(o[l-1],f-1,v++,1,!1),o[l-1].setCell(f-1,w))}o[l].replaceCells(v,f,w);let k=0;for(let E=o.length-1;E>0&&(E>l||o[E].getTrimmedLength()===0);E--)k++;k>0&&(C.push(y+o.length-k),C.push(k)),y+=o.length-1}return C},c.reflowLargerCreateNewLayout=function(g,N){const f=[];let m=0,w=N[m],C=0;for(let y=0;y<g.length;y++)if(w===y){const h=N[++m];g.onDeleteEmitter.fire({index:y-C,amount:h}),y+=h-1,C+=h,w=N[++m]}else f.push(y);return{layout:f,countRemoved:C}},c.reflowLargerApplyNewLayout=function(g,N){const f=[];for(let m=0;m<N.length;m++)f.push(g.get(N[m]));for(let m=0;m<f.length;m++)g.set(m,f[m]);g.length=N.length},c.reflowSmallerGetNewLineLengths=function(g,N,f){const m=[],w=g.map(((u,o)=>b(g,o,N))).reduce(((u,o)=>u+o));let C=0,y=0,h=0;for(;h<w;){if(w-h<f){m.push(w-h);break}C+=f;const u=b(g,y,N);C>u&&(C-=u,y++);const o=g[y].getWidth(C-1)===2;o&&C--;const l=o?f-1:f;m.push(l),h+=l}return m},c.getWrappedLineTrimmedLength=b},5295:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;const g=b(8460),N=b(844),f=b(9092);class m extends N.Disposable{constructor(C,y){super(),this._optionsService=C,this._bufferService=y,this._onBufferActivate=this.register(new g.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,y){this._normal.resize(C,y),this._alt.resize(C,y),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}c.BufferSet=m},511:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;const g=b(482),N=b(643),f=b(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 y=new m;return y.setFromCharData(C),y}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,g.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[N.CHAR_DATA_ATTR_INDEX],this.bg=0;let y=!1;if(C[N.CHAR_DATA_CHAR_INDEX].length>2)y=!0;else if(C[N.CHAR_DATA_CHAR_INDEX].length===2){const h=C[N.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=h&&h<=56319){const u=C[N.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=u&&u<=57343?this.content=1024*(h-55296)+u-56320+65536|C[N.CHAR_DATA_WIDTH_INDEX]<<22:y=!0}else y=!0}else this.content=C[N.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[N.CHAR_DATA_WIDTH_INDEX]<<22;y&&(this.combinedData=C[N.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[N.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.CellData=m},643:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_EXT=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=0,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.DEFAULT_EXT=0,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},4863:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;const g=b(8460),N=b(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 g.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,N.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}c.Marker=f,f._nextId=1},7116:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},c.CHARSETS.A={"#":"£"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},c.CHARSETS.C=c.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},c.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},c.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},c.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},c.CHARSETS.E=c.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},c.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},c.CHARSETS.H=c.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(I,c)=>{var b,g,N;Object.defineProperty(c,"__esModule",{value:!0}),c.C1_ESCAPED=c.C1=c.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
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=""})(b||(c.C0=b={})),(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="Ÿ"})(g||(c.C1=g={})),(function(f){f.ST=`${b.ESC}\\`})(N||(c.C1_ESCAPED=N={}))},7399:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;const g=b(2584),N={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};c.evaluateKeyboardEvent=function(f,m,w,C){const y={type:0,cancel:!1,key:void 0},h=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?y.key=m?g.C0.ESC+"OA":g.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?y.key=m?g.C0.ESC+"OD":g.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?y.key=m?g.C0.ESC+"OC":g.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(y.key=m?g.C0.ESC+"OB":g.C0.ESC+"[B");break;case 8:y.key=f.ctrlKey?"\b":g.C0.DEL,f.altKey&&(y.key=g.C0.ESC+y.key);break;case 9:if(f.shiftKey){y.key=g.C0.ESC+"[Z";break}y.key=g.C0.HT,y.cancel=!0;break;case 13:y.key=f.altKey?g.C0.ESC+g.C0.CR:g.C0.CR,y.cancel=!0;break;case 27:y.key=g.C0.ESC,f.altKey&&(y.key=g.C0.ESC+g.C0.ESC),y.cancel=!0;break;case 37:if(f.metaKey)break;h?(y.key=g.C0.ESC+"[1;"+(h+1)+"D",y.key===g.C0.ESC+"[1;3D"&&(y.key=g.C0.ESC+(w?"b":"[1;5D"))):y.key=m?g.C0.ESC+"OD":g.C0.ESC+"[D";break;case 39:if(f.metaKey)break;h?(y.key=g.C0.ESC+"[1;"+(h+1)+"C",y.key===g.C0.ESC+"[1;3C"&&(y.key=g.C0.ESC+(w?"f":"[1;5C"))):y.key=m?g.C0.ESC+"OC":g.C0.ESC+"[C";break;case 38:if(f.metaKey)break;h?(y.key=g.C0.ESC+"[1;"+(h+1)+"A",w||y.key!==g.C0.ESC+"[1;3A"||(y.key=g.C0.ESC+"[1;5A")):y.key=m?g.C0.ESC+"OA":g.C0.ESC+"[A";break;case 40:if(f.metaKey)break;h?(y.key=g.C0.ESC+"[1;"+(h+1)+"B",w||y.key!==g.C0.ESC+"[1;3B"||(y.key=g.C0.ESC+"[1;5B")):y.key=m?g.C0.ESC+"OB":g.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(y.key=g.C0.ESC+"[2~");break;case 46:y.key=h?g.C0.ESC+"[3;"+(h+1)+"~":g.C0.ESC+"[3~";break;case 36:y.key=h?g.C0.ESC+"[1;"+(h+1)+"H":m?g.C0.ESC+"OH":g.C0.ESC+"[H";break;case 35:y.key=h?g.C0.ESC+"[1;"+(h+1)+"F":m?g.C0.ESC+"OF":g.C0.ESC+"[F";break;case 33:f.shiftKey?y.type=2:f.ctrlKey?y.key=g.C0.ESC+"[5;"+(h+1)+"~":y.key=g.C0.ESC+"[5~";break;case 34:f.shiftKey?y.type=3:f.ctrlKey?y.key=g.C0.ESC+"[6;"+(h+1)+"~":y.key=g.C0.ESC+"[6~";break;case 112:y.key=h?g.C0.ESC+"[1;"+(h+1)+"P":g.C0.ESC+"OP";break;case 113:y.key=h?g.C0.ESC+"[1;"+(h+1)+"Q":g.C0.ESC+"OQ";break;case 114:y.key=h?g.C0.ESC+"[1;"+(h+1)+"R":g.C0.ESC+"OR";break;case 115:y.key=h?g.C0.ESC+"[1;"+(h+1)+"S":g.C0.ESC+"OS";break;case 116:y.key=h?g.C0.ESC+"[15;"+(h+1)+"~":g.C0.ESC+"[15~";break;case 117:y.key=h?g.C0.ESC+"[17;"+(h+1)+"~":g.C0.ESC+"[17~";break;case 118:y.key=h?g.C0.ESC+"[18;"+(h+1)+"~":g.C0.ESC+"[18~";break;case 119:y.key=h?g.C0.ESC+"[19;"+(h+1)+"~":g.C0.ESC+"[19~";break;case 120:y.key=h?g.C0.ESC+"[20;"+(h+1)+"~":g.C0.ESC+"[20~";break;case 121:y.key=h?g.C0.ESC+"[21;"+(h+1)+"~":g.C0.ESC+"[21~";break;case 122:y.key=h?g.C0.ESC+"[23;"+(h+1)+"~":g.C0.ESC+"[23~";break;case 123:y.key=h?g.C0.ESC+"[24;"+(h+1)+"~":g.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?y.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(y.key=g.C0.US),f.key==="@"&&(y.key=g.C0.NUL)):f.keyCode===65&&(y.type=1);else{const u=N[f.keyCode],o=u==null?void 0:u[f.shiftKey?1:0];if(o)y.key=g.C0.ESC+o;else if(f.keyCode>=65&&f.keyCode<=90){const l=f.ctrlKey?f.keyCode-64:f.keyCode+32;let v=String.fromCharCode(l);f.shiftKey&&(v=v.toUpperCase()),y.key=g.C0.ESC+v}else if(f.keyCode===32)y.key=g.C0.ESC+(f.ctrlKey?g.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let l=f.code.slice(3,4);f.shiftKey||(l=l.toLowerCase()),y.key=g.C0.ESC+l,y.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?y.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?y.key=g.C0.NUL:f.keyCode>=51&&f.keyCode<=55?y.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?y.key=g.C0.DEL:f.keyCode===219?y.key=g.C0.ESC:f.keyCode===220?y.key=g.C0.FS:f.keyCode===221&&(y.key=g.C0.GS)}return y}},482:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(b){return b>65535?(b-=65536,String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):String.fromCharCode(b)},c.utf32ToString=function(b,g=0,N=b.length){let f="";for(let m=g;m<N;++m){let w=b[m];w>65535?(w-=65536,f+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):f+=String.fromCharCode(w)}return f},c.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(b,g){const N=b.length;if(!N)return 0;let f=0,m=0;if(this._interim){const w=b.charCodeAt(m++);56320<=w&&w<=57343?g[f++]=1024*(this._interim-55296)+w-56320+65536:(g[f++]=this._interim,g[f++]=w),this._interim=0}for(let w=m;w<N;++w){const C=b.charCodeAt(w);if(55296<=C&&C<=56319){if(++w>=N)return this._interim=C,f;const y=b.charCodeAt(w);56320<=y&&y<=57343?g[f++]=1024*(C-55296)+y-56320+65536:(g[f++]=C,g[f++]=y)}else C!==65279&&(g[f++]=C)}return f}},c.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(b,g){const N=b.length;if(!N)return 0;let f,m,w,C,y=0,h=0,u=0;if(this.interim[0]){let v=!1,S=this.interim[0];S&=(224&S)==192?31:(240&S)==224?15:7;let A,k=0;for(;(A=63&this.interim[++k])&&k<4;)S<<=6,S|=A;const E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=E-k;for(;u<R;){if(u>=N)return 0;if(A=b[u++],(192&A)!=128){u--,v=!0;break}this.interim[k++]=A,S<<=6,S|=63&A}v||(E===2?S<128?u--:g[y++]=S:E===3?S<2048||S>=55296&&S<=57343||S===65279||(g[y++]=S):S<65536||S>1114111||(g[y++]=S)),this.interim.fill(0)}const o=N-4;let l=u;for(;l<N;){for(;!(!(l<o)||128&(f=b[l])||128&(m=b[l+1])||128&(w=b[l+2])||128&(C=b[l+3]));)g[y++]=f,g[y++]=m,g[y++]=w,g[y++]=C,l+=4;if(f=b[l++],f<128)g[y++]=f;else if((224&f)==192){if(l>=N)return this.interim[0]=f,y;if(m=b[l++],(192&m)!=128){l--;continue}if(h=(31&f)<<6|63&m,h<128){l--;continue}g[y++]=h}else if((240&f)==224){if(l>=N)return this.interim[0]=f,y;if(m=b[l++],(192&m)!=128){l--;continue}if(l>=N)return this.interim[0]=f,this.interim[1]=m,y;if(w=b[l++],(192&w)!=128){l--;continue}if(h=(15&f)<<12|(63&m)<<6|63&w,h<2048||h>=55296&&h<=57343||h===65279)continue;g[y++]=h}else if((248&f)==240){if(l>=N)return this.interim[0]=f,y;if(m=b[l++],(192&m)!=128){l--;continue}if(l>=N)return this.interim[0]=f,this.interim[1]=m,y;if(w=b[l++],(192&w)!=128){l--;continue}if(l>=N)return this.interim[0]=f,this.interim[1]=m,this.interim[2]=w,y;if(C=b[l++],(192&C)!=128){l--;continue}if(h=(7&f)<<18|(63&m)<<12|(63&w)<<6|63&C,h<65536||h>1114111)continue;g[y++]=h}}return y}}},225:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;const g=b(1480),N=[[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;c.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<N.length;++w)m.fill(0,N[w][0],N[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?m[w]:(function(C,y){let h,u=0,o=y.length-1;if(C<y[0][0]||C>y[o][1])return!1;for(;o>=u;)if(h=u+o>>1,C>y[h][1])u=h+1;else{if(!(C<y[h][0]))return!0;o=h-1}return!1})(w,f)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,C){let y=this.wcwidth(w),h=y===0&&C!==0;if(h){const u=g.UnicodeService.extractWidth(C);u===0?h=!1:u>y&&(y=u)}return g.UnicodeService.createPropertyValue(0,y,h)}}},5981:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;const g=b(8460),N=b(844);class f extends N.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 g.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 y;for(this._isSyncWriting=!0;y=this._writeBuffer.shift();){this._action(y);const h=this._callbacks.shift();h&&h()}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 y=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const h=this._writeBuffer[this._bufferOffset],u=this._action(h,C);if(u){const l=v=>Date.now()-y>=12?setTimeout((()=>this._innerWrite(0,v))):this._innerWrite(y,v);return void u.catch((v=>(queueMicrotask((()=>{throw v})),Promise.resolve(!1)))).then(l)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=h.length,Date.now()-y>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}c.WriteBuffer=f},5941:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.toRgbString=c.parseColor=void 0;const b=/^([\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})$/,g=/^[\da-f]+$/;function N(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}}c.parseColor=function(f){if(!f)return;let m=f.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const w=b.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),g.exec(m)&&[3,6,9,12].includes(m.length))){const w=m.length/3,C=[0,0,0];for(let y=0;y<3;++y){const h=parseInt(m.slice(w*y,w*y+w),16);C[y]=w===1?h<<4:w===2?h:w===3?h>>4:h>>8}return C}},c.toRgbString=function(f,m=16){const[w,C,y]=f;return`rgb:${N(w,m)}/${N(C,m)}/${N(y,m)}`}},5770:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},6351:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;const g=b(482),N=b(8742),f=b(5770),m=[];c.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,y){this._handlers[C]===void 0&&(this._handlers[C]=[]);const h=this._handlers[C];return h.push(y),{dispose:()=>{const u=h.indexOf(y);u!==-1&&h.splice(u,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,y){if(this.reset(),this._ident=C,this._active=this._handlers[C]||m,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].hook(y);else this._handlerFb(this._ident,"HOOK",y)}put(C,y,h){if(this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].put(C,y,h);else this._handlerFb(this._ident,"PUT",(0,g.utf32ToString)(C,y,h))}unhook(C,y=!0){if(this._active.length){let h=!1,u=this._active.length-1,o=!1;if(this._stack.paused&&(u=this._stack.loopPosition-1,h=y,o=this._stack.fallThrough,this._stack.paused=!1),!o&&h===!1){for(;u>=0&&(h=this._active[u].unhook(C),h!==!0);u--)if(h instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!1,h;u--}for(;u>=0;u--)if(h=this._active[u].unhook(!1),h instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!0,h}else this._handlerFb(this._ident,"UNHOOK",C);this._active=m,this._ident=0}};const w=new N.Params;w.addParam(0),c.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,y,h){this._hitLimit||(this._data+=(0,g.utf32ToString)(C,y,h),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let y=!1;if(this._hitLimit)y=!1;else if(C&&(y=this._handler(this._data,this._params),y instanceof Promise))return y.then((h=>(this._params=w,this._data="",this._hitLimit=!1,h)));return this._params=w,this._data="",this._hitLimit=!1,y}}},2015:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;const g=b(844),N=b(8742),f=b(6242),m=b(6351);class w{constructor(u){this.table=new Uint8Array(u)}setDefault(u,o){this.table.fill(u<<4|o)}add(u,o,l,v){this.table[o<<8|u]=l<<4|v}addMany(u,o,l,v){for(let S=0;S<u.length;S++)this.table[o<<8|u[S]]=l<<4|v}}c.TransitionTable=w;const C=160;c.VT500_TRANSITION_TABLE=(function(){const h=new w(4095),u=Array.apply(null,Array(256)).map(((k,E)=>E)),o=(k,E)=>u.slice(k,E),l=o(32,127),v=o(0,24);v.push(25),v.push.apply(v,o(28,32));const S=o(0,14);let A;for(A in h.setDefault(1,0),h.addMany(l,0,2,0),S)h.addMany([24,26,153,154],A,3,0),h.addMany(o(128,144),A,3,0),h.addMany(o(144,152),A,3,0),h.add(156,A,0,0),h.add(27,A,11,1),h.add(157,A,4,8),h.addMany([152,158,159],A,0,7),h.add(155,A,11,3),h.add(144,A,11,9);return h.addMany(v,0,3,0),h.addMany(v,1,3,1),h.add(127,1,0,1),h.addMany(v,8,0,8),h.addMany(v,3,3,3),h.add(127,3,0,3),h.addMany(v,4,3,4),h.add(127,4,0,4),h.addMany(v,6,3,6),h.addMany(v,5,3,5),h.add(127,5,0,5),h.addMany(v,2,3,2),h.add(127,2,0,2),h.add(93,1,4,8),h.addMany(l,8,5,8),h.add(127,8,5,8),h.addMany([156,27,24,26,7],8,6,0),h.addMany(o(28,32),8,0,8),h.addMany([88,94,95],1,0,7),h.addMany(l,7,0,7),h.addMany(v,7,0,7),h.add(156,7,0,0),h.add(127,7,0,7),h.add(91,1,11,3),h.addMany(o(64,127),3,7,0),h.addMany(o(48,60),3,8,4),h.addMany([60,61,62,63],3,9,4),h.addMany(o(48,60),4,8,4),h.addMany(o(64,127),4,7,0),h.addMany([60,61,62,63],4,0,6),h.addMany(o(32,64),6,0,6),h.add(127,6,0,6),h.addMany(o(64,127),6,0,0),h.addMany(o(32,48),3,9,5),h.addMany(o(32,48),5,9,5),h.addMany(o(48,64),5,0,6),h.addMany(o(64,127),5,7,0),h.addMany(o(32,48),4,9,5),h.addMany(o(32,48),1,9,2),h.addMany(o(32,48),2,9,2),h.addMany(o(48,127),2,10,0),h.addMany(o(48,80),1,10,0),h.addMany(o(81,88),1,10,0),h.addMany([89,90,92],1,10,0),h.addMany(o(96,127),1,10,0),h.add(80,1,11,9),h.addMany(v,9,0,9),h.add(127,9,0,9),h.addMany(o(28,32),9,0,9),h.addMany(o(32,48),9,9,12),h.addMany(o(48,60),9,8,10),h.addMany([60,61,62,63],9,9,10),h.addMany(v,11,0,11),h.addMany(o(32,128),11,0,11),h.addMany(o(28,32),11,0,11),h.addMany(v,10,0,10),h.add(127,10,0,10),h.addMany(o(28,32),10,0,10),h.addMany(o(48,60),10,8,10),h.addMany([60,61,62,63],10,0,11),h.addMany(o(32,48),10,9,12),h.addMany(v,12,0,12),h.add(127,12,0,12),h.addMany(o(28,32),12,0,12),h.addMany(o(32,48),12,9,12),h.addMany(o(48,64),12,0,11),h.addMany(o(64,127),12,12,13),h.addMany(o(64,127),10,12,13),h.addMany(o(64,127),9,12,13),h.addMany(v,13,13,13),h.addMany(l,13,13,13),h.add(127,13,0,13),h.addMany([27,156,24,26],13,14,0),h.add(C,0,2,0),h.add(C,8,5,8),h.add(C,6,0,6),h.add(C,11,0,11),h.add(C,13,13,13),h})();class y extends g.Disposable{constructor(u=c.VT500_TRANSITION_TABLE){super(),this._transitions=u,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new N.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,l,v)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,l)=>{},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,g.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(u,o=[64,126]){let l=0;if(u.prefix){if(u.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=u.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(u.intermediates){if(u.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let S=0;S<u.intermediates.length;++S){const A=u.intermediates.charCodeAt(S);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=A}}if(u.final.length!==1)throw new Error("final must be a single byte");const v=u.final.charCodeAt(0);if(o[0]>v||v>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return l<<=8,l|=v,l}identToString(u){const o=[];for(;u;)o.push(String.fromCharCode(255&u)),u>>=8;return o.reverse().join("")}setPrintHandler(u){this._printHandler=u}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(u,o){const l=this._identifier(u,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const v=this._escHandlers[l];return v.push(o),{dispose:()=>{const S=v.indexOf(o);S!==-1&&v.splice(S,1)}}}clearEscHandler(u){this._escHandlers[this._identifier(u,[48,126])]&&delete this._escHandlers[this._identifier(u,[48,126])]}setEscHandlerFallback(u){this._escHandlerFb=u}setExecuteHandler(u,o){this._executeHandlers[u.charCodeAt(0)]=o}clearExecuteHandler(u){this._executeHandlers[u.charCodeAt(0)]&&delete this._executeHandlers[u.charCodeAt(0)]}setExecuteHandlerFallback(u){this._executeHandlerFb=u}registerCsiHandler(u,o){const l=this._identifier(u);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const v=this._csiHandlers[l];return v.push(o),{dispose:()=>{const S=v.indexOf(o);S!==-1&&v.splice(S,1)}}}clearCsiHandler(u){this._csiHandlers[this._identifier(u)]&&delete this._csiHandlers[this._identifier(u)]}setCsiHandlerFallback(u){this._csiHandlerFb=u}registerDcsHandler(u,o){return this._dcsParser.registerHandler(this._identifier(u),o)}clearDcsHandler(u){this._dcsParser.clearHandler(this._identifier(u))}setDcsHandlerFallback(u){this._dcsParser.setHandlerFallback(u)}registerOscHandler(u,o){return this._oscParser.registerHandler(u,o)}clearOscHandler(u){this._oscParser.clearHandler(u)}setOscHandlerFallback(u){this._oscParser.setHandlerFallback(u)}setErrorHandler(u){this._errorHandler=u}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(u,o,l,v,S){this._parseStack.state=u,this._parseStack.handlers=o,this._parseStack.handlerPos=l,this._parseStack.transition=v,this._parseStack.chunkPos=S}parse(u,o,l){let v,S=0,A=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const E=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&R>-1){for(;R>=0&&(v=E[R](this._params),v!==!0);R--)if(v instanceof Promise)return this._parseStack.handlerPos=R,v}this._parseStack.handlers=[];break;case 4:if(l===!1&&R>-1){for(;R>=0&&(v=E[R](),v!==!0);R--)if(v instanceof Promise)return this._parseStack.handlerPos=R,v}this._parseStack.handlers=[];break;case 6:if(S=u[this._parseStack.chunkPos],v=this._dcsParser.unhook(S!==24&&S!==26,l),v)return v;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(S=u[this._parseStack.chunkPos],v=this._oscParser.end(S!==24&&S!==26,l),v)return v;S===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 E=k;E<o;++E){switch(S=u[E],A=this._transitions.table[this.currentState<<8|(S<160?S:C)],A>>4){case 2:for(let H=E+1;;++H){if(H>=o||(S=u[H])<32||S>126&&S<C){this._printHandler(u,E,H),E=H-1;break}if(++H>=o||(S=u[H])<32||S>126&&S<C){this._printHandler(u,E,H),E=H-1;break}if(++H>=o||(S=u[H])<32||S>126&&S<C){this._printHandler(u,E,H),E=H-1;break}if(++H>=o||(S=u[H])<32||S>126&&S<C){this._printHandler(u,E,H),E=H-1;break}}break;case 3:this._executeHandlers[S]?this._executeHandlers[S]():this._executeHandlerFb(S),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:E,code:S,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|S];let V=R?R.length-1:-1;for(;V>=0&&(v=R[V](this._params),v!==!0);V--)if(v instanceof Promise)return this._preserveStack(3,R,V,A,E),v;V<0&&this._csiHandlerFb(this._collect<<8|S,this._params),this.precedingJoinState=0;break;case 8:do switch(S){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(S-48)}while(++E<o&&(S=u[E])>47&&S<60);E--;break;case 9:this._collect<<=8,this._collect|=S;break;case 10:const J=this._escHandlers[this._collect<<8|S];let $=J?J.length-1:-1;for(;$>=0&&(v=J[$](),v!==!0);$--)if(v instanceof Promise)return this._preserveStack(4,J,$,A,E),v;$<0&&this._escHandlerFb(this._collect<<8|S),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|S,this._params);break;case 13:for(let H=E+1;;++H)if(H>=o||(S=u[H])===24||S===26||S===27||S>127&&S<C){this._dcsParser.put(u,E,H),E=H-1;break}break;case 14:if(v=this._dcsParser.unhook(S!==24&&S!==26),v)return this._preserveStack(6,[],0,A,E),v;S===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let H=E+1;;H++)if(H>=o||(S=u[H])<32||S>127&&S<C){this._oscParser.put(u,E,H),E=H-1;break}break;case 6:if(v=this._oscParser.end(S!==24&&S!==26),v)return this._preserveStack(5,[],0,A,E),v;S===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&A}}}c.EscapeSequenceParser=y},6242:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;const g=b(5770),N=b(482),f=[];c.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,w){this._handlers[m]===void 0&&(this._handlers[m]=[]);const C=this._handlers[m];return C.push(w),{dispose:()=>{const y=C.indexOf(w);y!==-1&&C.splice(y,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 y=this._active.length-1;y>=0;y--)this._active[y].put(m,w,C);else this._handlerFb(this._id,"PUT",(0,N.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 y=m[w++];if(y===59){this._state=2,this._start();break}if(y<48||57<y)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+y-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,y=this._active.length-1,h=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,C=w,h=this._stack.fallThrough,this._stack.paused=!1),!h&&C===!1){for(;y>=0&&(C=this._active[y].end(m),C!==!0);y--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!1,C;y--}for(;y>=0;y--)if(C=this._active[y].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",m);this._active=f,this._id=-1,this._state=0}}},c.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,N.utf32ToString)(m,w,C),this._data.length>g.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,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;const b=2147483647;class g{static fromArray(f){const m=new g;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 y=0;y<C.length;++y)m.addSubParam(C[y]);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 g(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>b?b: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>b?b: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,b):f}}c.Params=g},5741:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0,c.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let b=this._addons.length-1;b>=0;b--)this._addons[b].instance.dispose()}loadAddon(b,g){const N={instance:g,dispose:g.dispose,isDisposed:!1};this._addons.push(N),g.dispose=()=>this._wrappedAddonDispose(N),g.activate(b)}_wrappedAddonDispose(b){if(b.isDisposed)return;let g=-1;for(let N=0;N<this._addons.length;N++)if(this._addons[N]===b){g=N;break}if(g===-1)throw new Error("Could not dispose an addon that has not been loaded");b.isDisposed=!0,b.dispose.apply(b.instance),this._addons.splice(g,1)}}},8771:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferApiView=void 0;const g=b(3785),N=b(511);c.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 g.BufferLineApiView(m)}getNullCell(){return new N.CellData}}},3785:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLineApiView=void 0;const g=b(511);c.BufferLineApiView=class{constructor(N){this._line=N}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(N,f){if(!(N<0||N>=this._line.length))return f?(this._line.loadCell(N,f),f):this._line.loadCell(N,new g.CellData)}translateToString(N,f,m){return this._line.translateToString(N,f,m)}}},8285:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferNamespaceApi=void 0;const g=b(8771),N=b(8460),f=b(844);class m extends f.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new N.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new g.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new g.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}c.BufferNamespaceApi=m},7975:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ParserApi=void 0,c.ParserApi=class{constructor(b){this._core=b}registerCsiHandler(b,g){return this._core.registerCsiHandler(b,(N=>g(N.toArray())))}addCsiHandler(b,g){return this.registerCsiHandler(b,g)}registerDcsHandler(b,g){return this._core.registerDcsHandler(b,((N,f)=>g(N,f.toArray())))}addDcsHandler(b,g){return this.registerDcsHandler(b,g)}registerEscHandler(b,g){return this._core.registerEscHandler(b,g)}addEscHandler(b,g){return this.registerEscHandler(b,g)}registerOscHandler(b,g){return this._core.registerOscHandler(b,g)}addOscHandler(b,g){return this.registerOscHandler(b,g)}}},7090:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeApi=void 0,c.UnicodeApi=class{constructor(b){this._core=b}register(b){this._core.unicodeService.register(b)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(b){this._core.unicodeService.activeVersion=b}}},744:function(I,c,b){var g=this&&this.__decorate||function(h,u,o,l){var v,S=arguments.length,A=S<3?u:l===null?l=Object.getOwnPropertyDescriptor(u,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(h,u,o,l);else for(var k=h.length-1;k>=0;k--)(v=h[k])&&(A=(S<3?v(A):S>3?v(u,o,A):v(u,o))||A);return S>3&&A&&Object.defineProperty(u,o,A),A},N=this&&this.__param||function(h,u){return function(o,l){u(o,l,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;const f=b(8460),m=b(844),w=b(5295),C=b(2585);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;let y=c.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(h){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(h.rawOptions.cols||0,c.MINIMUM_COLS),this.rows=Math.max(h.rawOptions.rows||0,c.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(h,this))}resize(h,u){this.cols=h,this.rows=u,this.buffers.resize(h,u),this._onResize.fire({cols:h,rows:u})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(h,u=!1){const o=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===h.fg&&l.getBg(0)===h.bg||(l=o.getBlankLine(h,u),this._cachedBlankLine=l),l.isWrapped=u;const v=o.ybase+o.scrollTop,S=o.ybase+o.scrollBottom;if(o.scrollTop===0){const A=o.lines.isFull;S===o.lines.length-1?A?o.lines.recycle().copyFrom(l):o.lines.push(l.clone()):o.lines.splice(S+1,0,l.clone()),A?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const A=S-v+1;o.lines.shiftElements(v+1,A-1,-1),o.lines.set(S,l.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(h,u,o){const l=this.buffer;if(h<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else h+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const v=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+h,l.ybase),0),v!==l.ydisp&&(u||this._onScroll.fire(l.ydisp))}};c.BufferService=y=g([N(0,C.IOptionsService)],y)},7994:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0,c.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(b){this.glevel=b,this.charset=this._charsets[b]}setgCharset(b,g){this._charsets[b]=g,this.glevel===b&&(this.charset=g)}}},1753:function(I,c,b){var g=this&&this.__decorate||function(l,v,S,A){var k,E=arguments.length,R=E<3?v:A===null?A=Object.getOwnPropertyDescriptor(v,S):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(l,v,S,A);else for(var V=l.length-1;V>=0;V--)(k=l[V])&&(R=(E<3?k(R):E>3?k(v,S,R):k(v,S))||R);return E>3&&R&&Object.defineProperty(v,S,R),R},N=this&&this.__param||function(l,v){return function(S,A){v(S,A,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;const f=b(2585),m=b(8460),w=b(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function y(l,v){let S=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(S|=64,S|=l.action):(S|=3&l.button,4&l.button&&(S|=64),8&l.button&&(S|=128),l.action===32?S|=32:l.action!==0||v||(S|=3)),S}const h=String.fromCharCode,u={DEFAULT:l=>{const v=[y(l,!1)+32,l.col+32,l.row+32];return v[0]>255||v[1]>255||v[2]>255?"":`\x1B[M${h(v[0])}${h(v[1])}${h(v[2])}`},SGR:l=>{const v=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${y(l,!0)};${l.col};${l.row}${v}`},SGR_PIXELS:l=>{const v=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${y(l,!0)};${l.x};${l.y}${v}`}};let o=c.CoreMouseService=class extends w.Disposable{constructor(l,v){super(),this._bufferService=l,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 S of Object.keys(C))this.addProtocol(S,C[S]);for(const S of Object.keys(u))this.addEncoding(S,u[S]);this.reset()}addProtocol(l,v){this._protocols[l]=v}addEncoding(l,v){this._encodings[l]=v}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const v=this._encodings[this._activeEncoding](l);return v&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(v):this._coreService.triggerDataEvent(v,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,v,S){if(S){if(l.x!==v.x||l.y!==v.y)return!1}else if(l.col!==v.col||l.row!==v.row)return!1;return l.button===v.button&&l.action===v.action&&l.ctrl===v.ctrl&&l.alt===v.alt&&l.shift===v.shift}};c.CoreMouseService=o=g([N(0,f.IBufferService),N(1,f.ICoreService)],o)},6975:function(I,c,b){var g=this&&this.__decorate||function(o,l,v,S){var A,k=arguments.length,E=k<3?l:S===null?S=Object.getOwnPropertyDescriptor(l,v):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,l,v,S);else for(var R=o.length-1;R>=0;R--)(A=o[R])&&(E=(k<3?A(E):k>3?A(l,v,E):A(l,v))||E);return k>3&&E&&Object.defineProperty(l,v,E),E},N=this&&this.__param||function(o,l){return function(v,S){l(v,S,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;const f=b(1439),m=b(8460),w=b(844),C=b(2585),y=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let u=c.CoreService=class extends w.Disposable{constructor(o,l,v){super(),this._bufferService=o,this._logService=l,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)(y),this.decPrivateModes=(0,f.clone)(h)}reset(){this.modes=(0,f.clone)(y),this.decPrivateModes=(0,f.clone)(h)}triggerDataEvent(o,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const v=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&v.ybase!==v.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((S=>S.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(o))}};c.CoreService=u=g([N(0,C.IBufferService),N(1,C.ILogService),N(2,C.IOptionsService)],u)},9074:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DecorationService=void 0;const g=b(8055),N=b(8460),f=b(844),m=b(6106);let w=0,C=0;class y 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 N.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new N.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const l=new h(o);if(l){const v=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),v.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,l,v){let S=0,A=0;for(const k of this._decorations.getKeyIterator(l))S=k.options.x??0,A=S+(k.options.width??1),o>=S&&o<A&&(!v||(k.options.layer??"bottom")===v)&&(yield k)}forEachDecorationAtCell(o,l,v,S){this._decorations.forEachByKey(l,(A=>{w=A.options.x??0,C=w+(A.options.width??1),o>=w&&o<C&&(!v||(A.options.layer??"bottom")===v)&&S(A)}))}}c.DecorationService=y;class h extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=g.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=g.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new N.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new N.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,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;const g=b(2585),N=b(8343);class f{constructor(...w){this._entries=new Map;for(const[C,y]of w)this.set(C,y)}set(w,C){const y=this._entries.get(w);return this._entries.set(w,C),y}forEach(w){for(const[C,y]of this._entries.entries())w(C,y)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}c.ServiceCollection=f,c.InstantiationService=class{constructor(){this._services=new f,this._services.set(g.IInstantiationService,this)}setService(m,w){this._services.set(m,w)}getService(m){return this._services.get(m)}createInstance(m,...w){const C=(0,N.getServiceDependencies)(m).sort(((u,o)=>u.index-o.index)),y=[];for(const u of C){const o=this._services.get(u.id);if(!o)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${u.id}.`);y.push(o)}const h=C.length>0?C[0].index:w.length;if(w.length!==h)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${h+1} conflicts with ${w.length} static arguments`);return new m(...w,...y)}}},7866:function(I,c,b){var g=this&&this.__decorate||function(h,u,o,l){var v,S=arguments.length,A=S<3?u:l===null?l=Object.getOwnPropertyDescriptor(u,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(h,u,o,l);else for(var k=h.length-1;k>=0;k--)(v=h[k])&&(A=(S<3?v(A):S>3?v(u,o,A):v(u,o))||A);return S>3&&A&&Object.defineProperty(u,o,A),A},N=this&&this.__param||function(h,u){return function(o,l){u(o,l,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.traceCall=c.setTraceLogger=c.LogService=void 0;const f=b(844),m=b(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,y=c.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(h){super(),this._optionsService=h,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(h){for(let u=0;u<h.length;u++)typeof h[u]=="function"&&(h[u]=h[u]())}_log(h,u,o){this._evalLazyOptionalParams(o),h.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+u,...o)}trace(h,...u){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,h,u)}debug(h,...u){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,h,u)}info(h,...u){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,h,u)}warn(h,...u){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,h,u)}error(h,...u){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,h,u)}};c.LogService=y=g([N(0,m.IOptionsService)],y),c.setTraceLogger=function(h){C=h},c.traceCall=function(h,u,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...v){if(C.logLevel!==m.LogLevelEnum.TRACE)return l.apply(this,v);C.trace(`GlyphRenderer#${l.name}(${v.map((A=>JSON.stringify(A))).join(", ")})`);const S=l.apply(this,v);return C.trace(`GlyphRenderer#${l.name} return`,S),S}}},7302:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=void 0;const g=b(8460),N=b(844),f=b(6114);c.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends N.Disposable{constructor(y){super(),this._onOptionChange=this.register(new g.EventEmitter),this.onOptionChange=this._onOptionChange.event;const h={...c.DEFAULT_OPTIONS};for(const u in y)if(u in h)try{const o=y[u];h[u]=this._sanitizeAndValidateOption(u,o)}catch(o){console.error(o)}this.rawOptions=h,this.options={...h},this._setupOptions(),this.register((0,N.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(y,h){return this.onOptionChange((u=>{u===y&&h(this.rawOptions[y])}))}onMultipleOptionChange(y,h){return this.onOptionChange((u=>{y.indexOf(u)!==-1&&h()}))}_setupOptions(){const y=u=>{if(!(u in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${u}"`);return this.rawOptions[u]},h=(u,o)=>{if(!(u in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${u}"`);o=this._sanitizeAndValidateOption(u,o),this.rawOptions[u]!==o&&(this.rawOptions[u]=o,this._onOptionChange.fire(u))};for(const u in this.rawOptions){const o={get:y.bind(this,u),set:h.bind(this,u)};Object.defineProperty(this.options,u,o)}}_sanitizeAndValidateOption(y,h){switch(y){case"cursorStyle":if(h||(h=c.DEFAULT_OPTIONS[y]),!(function(u){return u==="block"||u==="underline"||u==="bar"})(h))throw new Error(`"${h}" is not a valid value for ${y}`);break;case"wordSeparator":h||(h=c.DEFAULT_OPTIONS[y]);break;case"fontWeight":case"fontWeightBold":if(typeof h=="number"&&1<=h&&h<=1e3)break;h=m.includes(h)?h:c.DEFAULT_OPTIONS[y];break;case"cursorWidth":h=Math.floor(h);case"lineHeight":case"tabStopWidth":if(h<1)throw new Error(`${y} cannot be less than 1, value: ${h}`);break;case"minimumContrastRatio":h=Math.max(1,Math.min(21,Math.round(10*h)/10));break;case"scrollback":if((h=Math.min(h,4294967295))<0)throw new Error(`${y} cannot be less than 0, value: ${h}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(h<=0)throw new Error(`${y} cannot be less than or equal to 0, value: ${h}`);break;case"rows":case"cols":if(!h&&h!==0)throw new Error(`${y} must be numeric, value: ${h}`);break;case"windowsPty":h=h??{}}return h}}c.OptionsService=w},2660:function(I,c,b){var g=this&&this.__decorate||function(w,C,y,h){var u,o=arguments.length,l=o<3?C:h===null?h=Object.getOwnPropertyDescriptor(C,y):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(w,C,y,h);else for(var v=w.length-1;v>=0;v--)(u=w[v])&&(l=(o<3?u(l):o>3?u(C,y,l):u(C,y))||l);return o>3&&l&&Object.defineProperty(C,y,l),l},N=this&&this.__param||function(w,C){return function(y,h){C(y,h,w)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkService=void 0;const f=b(2585);let m=c.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),S={data:w,id:this._nextId++,lines:[v]};return v.onDispose((()=>this._removeMarkerFromLink(S,v))),this._dataByLinkId.set(S.id,S),S.id}const y=w,h=this._getEntryIdKey(y),u=this._entriesWithId.get(h);if(u)return this.addLineToLink(u.id,C.ybase+C.y),u.id;const o=C.addMarker(C.ybase+C.y),l={id:this._nextId++,key:this._getEntryIdKey(y),data:y,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(l,o))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(w,C){const y=this._dataByLinkId.get(w);if(y&&y.lines.every((h=>h.line!==C))){const h=this._bufferService.buffer.addMarker(C);y.lines.push(h),h.onDispose((()=>this._removeMarkerFromLink(y,h)))}}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 y=w.lines.indexOf(C);y!==-1&&(w.lines.splice(y,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};c.OscLinkService=m=g([N(0,f.IBufferService)],m)},8343:(I,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0;const b="di$target",g="di$dependencies";c.serviceRegistry=new Map,c.getServiceDependencies=function(N){return N[g]||[]},c.createDecorator=function(N){if(c.serviceRegistry.has(N))return c.serviceRegistry.get(N);const f=function(m,w,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(y,h,u){h[b]===h?h[g].push({id:y,index:u}):(h[g]=[{id:y,index:u}],h[b]=h)})(f,m,C)};return f.toString=()=>N,c.serviceRegistry.set(N,f),f}},2585:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.IDecorationService=c.IUnicodeService=c.IOscLinkService=c.IOptionsService=c.ILogService=c.LogLevelEnum=c.IInstantiationService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;const g=b(8343);var N;c.IBufferService=(0,g.createDecorator)("BufferService"),c.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),c.ICoreService=(0,g.createDecorator)("CoreService"),c.ICharsetService=(0,g.createDecorator)("CharsetService"),c.IInstantiationService=(0,g.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"})(N||(c.LogLevelEnum=N={})),c.ILogService=(0,g.createDecorator)("LogService"),c.IOptionsService=(0,g.createDecorator)("OptionsService"),c.IOscLinkService=(0,g.createDecorator)("OscLinkService"),c.IUnicodeService=(0,g.createDecorator)("UnicodeService"),c.IDecorationService=(0,g.createDecorator)("DecorationService")},1480:(I,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;const g=b(8460),N=b(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,y=!1){return(16777215&w)<<3|(3&C)<<1|(y?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new g.EventEmitter,this.onChange=this._onChange.event;const w=new N.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,y=0;const h=w.length;for(let u=0;u<h;++u){let o=w.charCodeAt(u);if(55296<=o&&o<=56319){if(++u>=h)return C+this.wcwidth(o);const S=w.charCodeAt(u);56320<=S&&S<=57343?o=1024*(o-55296)+S-56320+65536:C+=this.wcwidth(S)}const l=this.charProperties(o,y);let v=f.extractWidth(l);f.extractShouldJoin(l)&&(v-=f.extractWidth(y)),C+=v,y=l}return C}charProperties(w,C){return this._activeProvider.charProperties(w,C)}}c.UnicodeService=f}},j={};function q(I){var c=j[I];if(c!==void 0)return c.exports;var b=j[I]={exports:{}};return L[I].call(b.exports,b,b.exports,q),b.exports}var ee={};return(()=>{var I=ee;Object.defineProperty(I,"__esModule",{value:!0}),I.Terminal=void 0;const c=q(9042),b=q(3236),g=q(844),N=q(5741),f=q(8285),m=q(7975),w=q(7090),C=["cols","rows"];class y extends g.Disposable{constructor(u){super(),this._core=this.register(new b.Terminal(u)),this._addonManager=this.register(new N.AddonManager),this._publicOptions={...this._core.options};const o=v=>this._core.options[v],l=(v,S)=>{this._checkReadonlyOptions(v),this._core.options[v]=S};for(const v in this._core.options){const S={get:o.bind(this,v),set:l.bind(this,v)};Object.defineProperty(this._publicOptions,v,S)}}_checkReadonlyOptions(u){if(C.includes(u))throw new Error(`Option "${u}" 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 u=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:u.applicationCursorKeys,applicationKeypadMode:u.applicationKeypad,bracketedPasteMode:u.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:u.origin,reverseWraparoundMode:u.reverseWraparound,sendFocusMode:u.sendFocus,wraparoundMode:u.wraparound}}get options(){return this._publicOptions}set options(u){for(const o in u)this._publicOptions[o]=u[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(u,o=!0){this._core.input(u,o)}resize(u,o){this._verifyIntegers(u,o),this._core.resize(u,o)}open(u){this._core.open(u)}attachCustomKeyEventHandler(u){this._core.attachCustomKeyEventHandler(u)}attachCustomWheelEventHandler(u){this._core.attachCustomWheelEventHandler(u)}registerLinkProvider(u){return this._core.registerLinkProvider(u)}registerCharacterJoiner(u){return this._checkProposedApi(),this._core.registerCharacterJoiner(u)}deregisterCharacterJoiner(u){this._checkProposedApi(),this._core.deregisterCharacterJoiner(u)}registerMarker(u=0){return this._verifyIntegers(u),this._core.registerMarker(u)}registerDecoration(u){return this._checkProposedApi(),this._verifyPositiveIntegers(u.x??0,u.width??0,u.height??0),this._core.registerDecoration(u)}hasSelection(){return this._core.hasSelection()}select(u,o,l){this._verifyIntegers(u,o,l),this._core.select(u,o,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(u,o){this._verifyIntegers(u,o),this._core.selectLines(u,o)}dispose(){super.dispose()}scrollLines(u){this._verifyIntegers(u),this._core.scrollLines(u)}scrollPages(u){this._verifyIntegers(u),this._core.scrollPages(u)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(u){this._verifyIntegers(u),this._core.scrollToLine(u)}clear(){this._core.clear()}write(u,o){this._core.write(u,o)}writeln(u,o){this._core.write(u),this._core.write(`\r
283
- `,o)}paste(u){this._core.paste(u)}refresh(u,o){this._verifyIntegers(u,o),this._core.refresh(u,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(u){this._addonManager.loadAddon(this,u)}static get strings(){return c}_verifyIntegers(...u){for(const o of u)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...u){for(const o of u)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}I.Terminal=y})(),ee})()))})(Xm)),Xm.exports}var IE=zE(),Qm={exports:{}},n1;function $E(){return n1||(n1=1,(function(p,x){(function(L,j){p.exports=j()})(self,(()=>(()=>{var L={};return(()=>{var j=L;Object.defineProperty(j,"__esModule",{value:!0}),j.FitAddon=void 0,j.FitAddon=class{activate(q){this._terminal=q}dispose(){}fit(){const q=this.proposeDimensions();if(!q||!this._terminal||isNaN(q.cols)||isNaN(q.rows))return;const ee=this._terminal._core;this._terminal.rows===q.rows&&this._terminal.cols===q.cols||(ee._renderService.clear(),this._terminal.resize(q.cols,q.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const q=this._terminal._core,ee=q._renderService.dimensions;if(ee.css.cell.width===0||ee.css.cell.height===0)return;const I=this._terminal.options.scrollback===0?0:q.viewport.scrollBarWidth,c=window.getComputedStyle(this._terminal.element.parentElement),b=parseInt(c.getPropertyValue("height")),g=Math.max(0,parseInt(c.getPropertyValue("width"))),N=window.getComputedStyle(this._terminal.element),f=b-(parseInt(N.getPropertyValue("padding-top"))+parseInt(N.getPropertyValue("padding-bottom"))),m=g-(parseInt(N.getPropertyValue("padding-right"))+parseInt(N.getPropertyValue("padding-left")))-I;return{cols:Math.max(2,Math.floor(m/ee.css.cell.width)),rows:Math.max(1,Math.floor(f/ee.css.cell.height))}}}})(),L})()))})(Qm)),Qm.exports}var qE=$E();const r1=20,o1=5,a1=6,PE=1200,WE=2e3,eh=4e3,yn=new TextEncoder,FE=new TextDecoder;function GE(p){return/\/api\/pty\/agents\//.test(p)?["pty-ws.v1"]:void 0}const l1=p=>{try{const x=atob(p),L=new Uint8Array(x.length);for(let j=0;j<x.length;j++)L[j]=x.charCodeAt(j);return L}catch{return new Uint8Array(0)}},c1=p=>{const x=yn.encode(p);let L="";for(let j=0;j<x.length;j++)L+=String.fromCharCode(x[j]);return btoa(L)};function u1(p){if(!p)return null;const x=/\/agents\/([^/]+)\/sessions\/([^/]+)\/attach/;try{const j=new URL(p).pathname.match(x);return j?{instanceId:decodeURIComponent(j[1]),sessionId:decodeURIComponent(j[2])}:null}catch{const L=p.match(x);return L?{instanceId:decodeURIComponent(L[1]),sessionId:decodeURIComponent(L[2])}:null}}function YE(p){return p.replace(/\x1b\][\s\S]*?(?:\x07|\x1b\\)/g,"").replace(/\x1b\[\?[0-9;]*[cnhl]/g,"").replace(/\x1b\[[0-9;]*[Rn]/g,"")}function XE(p){return p.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"").replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[()][A-Za-z0-9]/g,"")}function QE(p){const L=XE(p).replace(/\r/g,`
284
- `).split(`
285
- `).map(ee=>ee.trim()).filter(Boolean).slice(-24),j=L.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(ee=>ee.test(j))?L.slice(-10).join(`
287
- `).slice(0,900):""}function h1(p,x){return p?`${p.instanceId}:${p.sessionId}`:`url:${x}`}class KE{constructor(x,L,j,q,ee){Ft(this,"term");Ft(this,"fit");Ft(this,"wrapper");Ft(this,"url");Ft(this,"target");Ft(this,"role",null);Ft(this,"attached",!1);Ft(this,"ws",null);Ft(this,"lastSeq",0);Ft(this,"connId",0);Ft(this,"closedByUser",!1);Ft(this,"gotFrame",!1);Ft(this,"retries",0);Ft(this,"outputTail","");Ft(this,"ro",null);Ft(this,"retryTimer",null);Ft(this,"noticeTimer",null);Ft(this,"deadlineTimer",null);Ft(this,"disposed",!1);this.onChange=j,this.onPrompt=q,this.isActive=ee,this.url=x,this.target=L,this.term=new IE.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 qE.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 c=YE(I);c&&(this.isActive()&&this.onPrompt(null),this.send("pty.session_input",{data:c1(c)}))}),this.term.onResize(({cols:I,rows:c})=>{this.role==="controller"&&(I<r1||c<o1||this.send("pty.session_resize",{cols:I,rows:c}))})}fitSafe(){try{this.fit.fit()}catch{}}write(x){const L=FE.decode(x,{stream:!0});if(L){this.outputTail=(this.outputTail+L).slice(-6e3);const j=QE(this.outputTail);j&&this.isActive()&&this.onPrompt({needed:!0,prompt:j,since:new Date().toISOString(),source:"pty"})}try{this.term.write(x)}catch{}}send(x,L){var j;try{(j=this.ws)==null||j.send(JSON.stringify(L===void 0?{op:x}:{op:x,payload:L}))}catch{}}sendOn(x,L,j){try{x.send(JSON.stringify(j===void 0?{op:L}:{op:L,payload:j}))}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(x){this.wrapper.style.display=x?"block":"none",x&&(this.fitSafe(),requestAnimationFrame(()=>this.fitSafe()))}onContainerResize(){this.wrapper.style.display!=="none"&&this.fitSafe()}connect(x,L,j){var I;this.clearTimers();const q=++this.connId;if(this.closedByUser=!1,this.retries=0,this.gotFrame=!1,(I=this.ws)==null||I.close(),!L){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 ee=()=>{if(this.connId!==q||this.closedByUser||this.disposed)return;const c=new WebSocket(this.url,GE(this.url));this.ws=c;let b=!1;c.addEventListener("open",()=>{this.connId!==q||this.ws!==c||(this.attached=!0,this.onChange(),this.clearFrameTimers(),this.noticeTimer=setTimeout(()=>{this.connId!==q||this.ws!==c||this.closedByUser||this.gotFrame||this.write(yn.encode(`\r
288
- [attached — no output yet]\r
289
- `))},WE),this.deadlineTimer=setTimeout(()=>{if(!(this.connId!==q||this.ws!==c||this.closedByUser||this.gotFrame)){if(this.role==="controller"){this.write(yn.encode(`\r
290
- [attached — no output after ${Math.round(eh/1e3)}s; requesting repaint]\r
291
- `)),this.sendOn(c,"pty.request_keyframe");return}if(this.retries>=a1){this.write(yn.encode(`\r
292
- [attached — no output after ${Math.round(eh/1e3)}s]\r
293
- `));return}this.retries+=1,this.write(yn.encode(`\r
294
- [attached — no output after ${Math.round(eh/1e3)}s; requesting repaint]\r
295
- `));try{c.close()}catch{}ee()}},eh))});const g=()=>{if(!(this.connId!==q||this.ws!==c||b)&&(b=!0,this.clearFrameTimers(),this.role=null,this.attached=!1,this.onChange(),!(this.closedByUser||this.gotFrame))){if(this.retries<a1){this.retries+=1,this.retries===1&&this.write(yn.encode(`\r
296
- [waiting for session…]\r
297
- `)),this.retryTimer=setTimeout(ee,PE);return}this.write(yn.encode(`\r
298
- [connection error — session did not become ready]\r
299
- `))}};c.addEventListener("close",g),c.addEventListener("error",g),c.addEventListener("message",N=>{var m,w,C,y;if(this.connId!==q||this.ws!==c)return;let f;try{f=JSON.parse(N.data)}catch{return}switch(f.op){case"binding_hello":{const h=j??(L?this.lastSeq:0);this.sendOn(c,"pty.join_session",{role:x,replay_from:h}),x==="controller"&&this.term.cols>=r1&&this.term.rows>=o1&&this.sendOn(c,"pty.session_resize",{cols:this.term.cols,rows:this.term.rows});break}case"role_assigned":{const h=((m=f.payload)==null?void 0:m.role)??null;this.role=h,this.term.options.disableStdin=h!=="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(l1(((w=f.payload)==null?void 0:w.data)??""));break;case"keyframe":this.clearFrameTimers(),this.gotFrame=!0,this.retries=0;for(const h of((C=f.payload)==null?void 0:C.frames)??[])h.seq&&(this.lastSeq=Math.max(this.lastSeq,h.seq)),this.write(l1(h.payload.data));break;case"error":this.write(yn.encode(`\r
300
- [${((y=f.payload)==null?void 0:y.code)??"error"}]\r
301
- `));break}})};ee()}requestKeyframe(){this.send("pty.request_keyframe")}sendInput(x){return!this.ws||this.role!=="controller"||!x?!1:(this.isActive()&&this.onPrompt(null),this.send("pty.session_input",{data:c1(x+`\r
302
- `)}),!0)}close(){var x;this.closedByUser=!0,this.connId+=1,this.role=null,this.attached=!1,this.term.options.disableStdin=!0,this.clearTimers(),(x=this.ws)==null||x.close(),this.ws=null,this.onChange()}dispose(){var x;this.disposed=!0,this.close();try{(x=this.ro)==null||x.disconnect()}catch{}try{this.term.dispose()}catch{}try{this.wrapper.remove()}catch{}}observe(x){this.ro||typeof ResizeObserver>"u"||(this.ro=new ResizeObserver(()=>this.onContainerResize()),this.ro.observe(x))}}function ZE(){const p=Z.useRef(new Map),x=Z.useRef(""),L=Z.useRef(null),[j,q]=Z.useState({attached:!1,role:null,url:null,target:null}),[ee,I]=Z.useState({needed:!1,prompt:"",since:null,source:"pty"}),c=()=>p.current.get(x.current)??null,b=Z.useCallback(()=>{const o=p.current.get(x.current);if(!o){q({attached:!1,role:null,url:null,target:null});return}q({attached:o.attached,role:o.role,url:o.url,target:o.target})},[]),g=Z.useCallback(o=>{I(o??{needed:!1,prompt:"",since:null,source:"pty"})},[]),N=Z.useCallback(o=>{x.current=o;for(const[l,v]of p.current)v.setVisible(l===o);g(null),b()},[g,b]),f=Z.useCallback((o,l=!1,v="observer",S)=>{const A=S??u1(o),k=h1(A,o);let E=p.current.get(k);E?(E.url=o,(l||v==="controller"&&E.role!=="controller")&&E.connect(v,l)):(E=new KE(o,A,b,g,()=>x.current===k),p.current.set(k,E),L.current&&(L.current.appendChild(E.wrapper),E.observe(L.current)),E.connect(v,l)),N(k)},[N,g,b]),m=Z.useCallback(()=>{const o=c();if(!o)return;const l=x.current;o.dispose(),p.current.delete(l);const v=p.current.keys().next();v.done?(x.current="",g(null),b()):N(v.value)},[N,g,b]),w=Z.useCallback((o,l,v)=>{const S=v??u1(o),A=p.current.get(h1(S,o)),k=l??(A==null?void 0:A.role)??"observer";f(o,!0,k,S)},[f]),C=Z.useCallback(()=>{var o;(o=c())==null||o.requestKeyframe()},[]),y=Z.useCallback((o,l)=>{const v=c();if(!v)return!1;if(l&&(!v.target||v.target.instanceId!==l.instanceId||v.target.sessionId!==l.sessionId)){try{v.term.write(yn.encode(`\r
303
- [inject refused: target ${l.instanceId}:${l.sessionId} does not match attached session ${v.target?`${v.target.instanceId}:${v.target.sessionId}`:"none"}]\r
304
- `))}catch{}return!1}return v.sendInput(o)},[]),h=Z.useCallback(o=>{if(!o){L.current=null;return}L.current=o;for(const[l,v]of p.current)v.wrapper.parentElement!==o&&o.appendChild(v.wrapper),v.observe(o),v.setVisible(l===x.current)},[]);Z.useEffect(()=>{const o=()=>{for(const l of p.current.values())l.onContainerResize()};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]);const u=p.current;return Z.useEffect(()=>()=>{for(const o of u.values())o.dispose();u.clear()},[u]),{state:j,responseNeeded:ee,attach:f,detach:m,replay:w,requestKeyframe:C,sendInput:y,openTerminal:h,isController:j.role==="controller"}}let A1="";function ex(){if(typeof window>"u")return null;const p=new URLSearchParams(window.location.hash.replace(/^#/,"")),x=p.get("bootstrap")||"";return x?{nonce:x,audience:p.get("audience")||"browser",next:p.get("next")||""}:null}async function tx(){const p=ex(),x=p?await fetch("/bootstrap/session",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({nonce:p.nonce,audience:p.audience})}):await fetch("/bootstrap/session",{credentials:"same-origin"});if(!x.ok)throw new Error(`Cockpit session bootstrap failed (${x.status})`);const L=await x.json();if(!L.csrf)throw new Error("Cockpit session bootstrap returned no CSRF binding");A1=L.csrf,p&&typeof window<"u"&&window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}${p.next?`#${p.next}`:""}`)}let d1;function D1(){return d1??(d1=tx()),d1}async function nh(p,x={}){await D1();const L=String(x.method||"GET").toUpperCase(),j=new Headers(x.headers);return["GET","HEAD","OPTIONS"].includes(L)||j.set("x-cockpit-csrf",A1),fetch(p,{...x,credentials:"same-origin",headers:j})}async function Le(p,x={}){const L=await nh(p,x);if(!L.ok){const j=await L.clone().json().catch(()=>null);throw(j==null?void 0:j.error)==="managed_docker_raw_credentials_rejected"?new Error(`${j.message} ${j.recovery}`.trim()):new Error(`${p} → ${L.status}`)}return L.status===204?{}:L.json()}const Je=p=>p&&p.length>12?p.slice(0,8)+"…":p;function ur(p){const x=String(p??"").toLowerCase();return x==="host"?"host":x==="container"||x==="docker"?"container":x==="vm"||x==="qemu"||x==="kvm"?"vm":"other"}function k1(p,x){return p==="agent"?`@${x}`:p==="command"?`/${x}`:x}const f1=[[50,10],[72,16],[88,34],[84,58],[68,72],[50,72],[32,72],[16,58],[12,34],[28,16],[50,30]];function ix({onStartSession:p,onLaunchInstance:x,goTo:L}){var E,R;const[j,q]=Z.useState(null),[ee]=Z.useState(()=>!localStorage.getItem("cockpit.welcomed")),[I,c]=Z.useState(""),[b,g]=Z.useState("auto"),[N,f]=Z.useState("observe"),[m,w]=Z.useState(()=>ax());Z.useEffect(()=>{localStorage.setItem("cockpit.welcomed","1")},[]),Z.useEffect(()=>{(async()=>{try{const[V,J]=await Promise.all([Le("/api/inventory"),Le("/api/health")]),[$,H,X]=await Promise.all([Le("/api/running").catch(()=>({running:[]})),Le("/api/approvals?status=pending").catch(()=>({approvals:[]})),Le("/api/cost").catch(()=>null)]);q({instances:V.instances,running:$.running??[],approvals:H.approvals??[],cost:X,executor:J.executor_url,connected:V.instances.length>0,inventoryWarning:sx(V)})}catch{q({instances:[],running:[],approvals:[],cost:null,executor:"",connected:!1})}})()},[]);const C=(j==null?void 0:j.instances.filter(V=>V.state==="running"))??[],y={host:(j==null?void 0:j.instances.some(V=>{var J;return ur(((J=V.runtime_posture)==null?void 0:J.kind)??V.runtime)==="host"}))??!1,container:(j==null?void 0:j.instances.some(V=>{var J;return ur(((J=V.runtime_posture)==null?void 0:J.kind)??V.runtime)==="container"}))??!1,vm:(j==null?void 0:j.instances.some(V=>{var J;return ur(((J=V.runtime_posture)==null?void 0:J.kind)??V.runtime)==="vm"}))??!1},h=async()=>{var V;await((V=navigator.clipboard)==null?void 0:V.writeText("aiwg cockpit"))},u=lx(j),o=((j==null?void 0:j.approvals.length)??0)+(y.host&&y.container&&y.vm?0:1),l=C.find(V=>V.id===I)??C[0]??(j==null?void 0:j.instances[0]),v=l?(E=j==null?void 0:j.cost)==null?void 0:E.per_instance.find(V=>V.instance_id===l.id):void 0,S=((R=j==null?void 0:j.cost)==null?void 0:R.total.usd)??0,A=j!=null&&j.cost?Math.min(100,Math.max(6,S*12)):0,k=[l?l.loadout:"no stack",b==="auto"?"auto runtime":b,N].join(" / ");return a.jsxDEV("div",{className:"welcome operator-wall",children:[a.jsxDEV("section",{className:`wall-hero ${j!=null&&j.connected?"wall-hero-compact":""}`,"aria-labelledby":"cockpit-wall-title",children:[a.jsxDEV("div",{children:[a.jsxDEV("p",{className:"eyebrow",children:"Operator wall"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:108,columnNumber:11},this),a.jsxDEV("h2",{id:"cockpit-wall-title",children:"Work alongside your agents"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:109,columnNumber:11},this),a.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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:110,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:107,columnNumber:9},this),a.jsxDEV("div",{className:"hero-actions","aria-label":"Primary Cockpit actions",children:[a.jsxDEV("button",{className:"cta",onClick:x,children:"+ New instance + session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:116,columnNumber:11},this),a.jsxDEV("button",{className:"cta",onClick:p,children:"▸ Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:117,columnNumber:11},this),a.jsxDEV("button",{onClick:()=>L("running"),children:"View board"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:118,columnNumber:11},this),a.jsxDEV("button",{onClick:h,children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:119,columnNumber:11},this),(j==null?void 0:j.connected)&&a.jsxDEV("div",{className:"segmented",role:"group","aria-label":"Wall review mode",children:[a.jsxDEV("button",{"aria-pressed":m==="topology",onClick:()=>w("topology"),children:"Topology"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:122,columnNumber:15},this),a.jsxDEV("button",{"aria-pressed":m==="handoff",onClick:()=>w("handoff"),children:"Handoff"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:123,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:121,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:115,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:106,columnNumber:7},this),j?j.connected?a.jsxDEV(a.Fragment,{children:[a.jsxDEV("section",{className:"radial-wall","aria-labelledby":"operator-wall-map-title",children:a.jsxDEV("div",{className:`radial-map mode-${m}`,"aria-label":"Operator wall topology",children:[a.jsxDEV("svg",{className:"radial-links",viewBox:"0 0 100 100","aria-hidden":"true",focusable:"false",children:[a.jsxDEV("circle",{className:"link-ring",cx:"50",cy:"50",r:"37"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:154,columnNumber:19},this),a.jsxDEV("circle",{className:"link-ring link-ring-inner",cx:"50",cy:"50",r:"22"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:155,columnNumber:19},this),u.map(V=>a.jsxDEV("line",{className:`link-line link-${V.state}`,x1:"50",y1:"50",x2:V.x,y2:V.y},V.key,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:157,columnNumber:21},this)),a.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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:159,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:153,columnNumber:17},this),a.jsxDEV("button",{className:"central-hub",onClick:p,"aria-label":"Start from Cockpit command hub",children:[a.jsxDEV("span",{className:"hub-core","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:162,columnNumber:19},this),a.jsxDEV("strong",{children:"Cockpit"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:163,columnNumber:19},this),a.jsxDEV("span",{children:[C.length," running · ",j.approvals.length," approvals"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:164,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:161,columnNumber:17},this),u.map((V,J)=>a.jsxDEV("button",{className:`orbit-node node-${V.family} node-${V.state}`,style:ox(V),onClick:()=>L(V.tab),"aria-label":`${V.label}: ${V.meta}`,children:[a.jsxDEV("span",{className:`node-glyph glyph-${V.family}`,"aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:174,columnNumber:21},this),a.jsxDEV("span",{className:"node-copy",children:[a.jsxDEV("strong",{children:V.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:176,columnNumber:23},this),a.jsxDEV("span",{children:V.meta},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:177,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:175,columnNumber:21},this),J===3&&a.jsxDEV("span",{className:"handoff-marker","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:179,columnNumber:37},this)]},V.key,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:167,columnNumber:19},this)),m==="handoff"&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("div",{className:"handoff-callout handoff-source",children:[a.jsxDEV("span",{children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:185,columnNumber:23},this),a.jsxDEV("strong",{children:j.running[0]?Je(j.running[0].instance_id):"ready"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:186,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:184,columnNumber:21},this),a.jsxDEV("div",{className:"handoff-callout handoff-destination",children:[a.jsxDEV("span",{children:"Destination"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:189,columnNumber:23},this),a.jsxDEV("strong",{children:C[1]?Je(C[1].id):"next stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:190,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:188,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:183,columnNumber:19},this),a.jsxDEV("div",{className:"radial-overlay","aria-labelledby":"operator-wall-map-title",children:[a.jsxDEV("div",{className:"radial-overlay-head",children:[a.jsxDEV("div",{children:[a.jsxDEV("p",{className:"eyebrow",children:m==="handoff"?"Mission route":"Live topology"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:197,columnNumber:23},this),a.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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:198,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:196,columnNumber:21},this),a.jsxDEV("div",{className:"mission-route","aria-label":"Mission handoff state",children:[a.jsxDEV("span",{children:"Mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:201,columnNumber:23},this),a.jsxDEV("strong",{children:j.running[0]?Je(j.running[0].task_id):"ready"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:202,columnNumber:23},this),a.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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:203,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:200,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:195,columnNumber:19},this),a.jsxDEV("dl",{className:"wall-readout",children:[a.jsxDEV("div",{children:[a.jsxDEV("dt",{children:"Coverage"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:26},this),a.jsxDEV("dd",{children:[[y.host,y.container,y.vm].filter(Boolean).length,"/3"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:43},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:21},this),a.jsxDEV("div",{children:[a.jsxDEV("dt",{children:"Executor"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:26},this),a.jsxDEV("dd",{children:j.executor||"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:43},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:21},this),a.jsxDEV("div",{children:[a.jsxDEV("dt",{children:"Control"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:26},this),a.jsxDEV("dd",{children:C.some(V=>V.session_backends.some(J=>J.available&&J.drive))?"drive available":"observe first"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:42},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:21},this),a.jsxDEV("div",{children:[a.jsxDEV("dt",{children:"Quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:26},this),a.jsxDEV("dd",{children:j.cost?`$${j.cost.total.usd.toFixed(2)}`:"n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:21},this),a.jsxDEV("div",{children:[a.jsxDEV("dt",{children:"Gates"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:26},this),a.jsxDEV("dd",{children:o>0?`${o} attention`:"clear"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:208,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:194,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:152,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:151,columnNumber:13},this),a.jsxDEV("section",{className:"stack-board","aria-label":"Running stack board",children:C.slice(0,6).map(V=>{var X;const J=j.running.find(ne=>ne.instance_id===V.id),$=(X=j.cost)==null?void 0:X.per_instance.find(ne=>ne.instance_id===V.id),H=V.session_backends.some(ne=>ne.available&&ne.drive);return a.jsxDEV("article",{className:`stack-card accent-${rx(V.id)}`,children:[a.jsxDEV("div",{className:"stack-head",children:[a.jsxDEV("span",{className:`topology topology-${nx(V)}`,"aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:227,columnNumber:23},this),a.jsxDEV("div",{children:[a.jsxDEV("h3",{children:V.loadout},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:229,columnNumber:25},this),a.jsxDEV("p",{children:[Je(V.id)," · ",V.runtime_posture.label]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:230,columnNumber:25},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:228,columnNumber:23},this),a.jsxDEV("span",{className:`badge isolation-${V.runtime_posture.isolation}`,children:V.state},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:232,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:226,columnNumber:21},this),a.jsxDEV("div",{className:"stack-log",role:"img","aria-label":`Recent activity for ${V.loadout}`,children:[a.jsxDEV("span",{children:J?`task ${Je(J.task_id)} · ${J.state}`:"idle · ready for session attach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:235,columnNumber:23},this),a.jsxDEV("span",{children:[V.transport.label," · ",V.transport.mode]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:236,columnNumber:23},this),a.jsxDEV("span",{children:H?"Drive enabled":"Observe only"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:237,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:234,columnNumber:21},this),a.jsxDEV("div",{className:"segment-progress","aria-label":"Session progress",children:a.jsxDEV("span",{style:{width:J?"68%":"28%"}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:240,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:239,columnNumber:21},this),a.jsxDEV("div",{className:"transport-bar",children:[a.jsxDEV("button",{onClick:()=>L("sessions"),children:"Attach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:243,columnNumber:23},this),a.jsxDEV("button",{onClick:()=>L("running"),children:"Details"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:244,columnNumber:23},this),a.jsxDEV("span",{children:$?`$${$.usd.toFixed(2)}`:"cost n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:245,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:242,columnNumber:21},this)]},V.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:225,columnNumber:19},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:219,columnNumber:13},this),a.jsxDEV("section",{className:"telemetry-strip","aria-label":"Fleet telemetry",children:[a.jsxDEV("button",{onClick:()=>L("inventory"),children:[a.jsxDEV("strong",{children:j.instances.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:254,columnNumber:17},this),a.jsxDEV("span",{children:["instances · ",C.length," running"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:255,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:253,columnNumber:15},this),a.jsxDEV("button",{onClick:()=>L("running"),children:[a.jsxDEV("strong",{children:j.running.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:258,columnNumber:17},this),a.jsxDEV("span",{children:"active tasks"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:259,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:257,columnNumber:15},this),a.jsxDEV("button",{onClick:()=>L("approvals"),children:[a.jsxDEV("strong",{children:j.approvals.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:262,columnNumber:17},this),a.jsxDEV("span",{children:"pending approvals"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:263,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:261,columnNumber:15},this),a.jsxDEV("button",{onClick:()=>L("running"),children:[a.jsxDEV("strong",{children:j.cost?`$${j.cost.total.usd.toFixed(2)}`:"--"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:266,columnNumber:17},this),a.jsxDEV("span",{children:"cost · quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:267,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:265,columnNumber:15},this),a.jsxDEV("button",{onClick:()=>L("inventory"),children:[a.jsxDEV("strong",{children:y.host&&y.container&&y.vm?"3/3":`${[y.host,y.container,y.vm].filter(Boolean).length}/3`},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:270,columnNumber:17},this),a.jsxDEV("span",{children:"host · docker · vm"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:271,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:269,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:252,columnNumber:13},this),a.jsxDEV("section",{className:"control-planner","aria-label":"Guided start and cost quota",children:[a.jsxDEV("div",{className:"guided-start","aria-label":"Guided start",children:[a.jsxDEV("div",{children:[a.jsxDEV("p",{className:"eyebrow",children:"Guided start"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:278,columnNumber:19},this),a.jsxDEV("h3",{children:"Pick stack, runtime, and task posture."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:279,columnNumber:19},this),a.jsxDEV("p",{className:"hint",children:["Plan: ",k]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:280,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:277,columnNumber:17},this),a.jsxDEV("div",{className:"planner-grid",children:[a.jsxDEV("label",{children:[a.jsxDEV("span",{children:"Stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:284,columnNumber:21},this),a.jsxDEV("select",{value:(l==null?void 0:l.id)??"",onChange:V=>c(V.target.value),children:C.map(V=>a.jsxDEV("option",{value:V.id,children:[V.loadout," · ",V.runtime_posture.kind]},V.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:286,columnNumber:52},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:285,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:283,columnNumber:19},this),a.jsxDEV("label",{children:[a.jsxDEV("span",{children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:290,columnNumber:21},this),a.jsxDEV("select",{value:b,onChange:V=>g(V.target.value),children:[a.jsxDEV("option",{value:"auto",children:"Auto from selected stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:292,columnNumber:23},this),a.jsxDEV("option",{value:"host",children:"Host"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:293,columnNumber:23},this),a.jsxDEV("option",{value:"container",children:"Docker/container"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:294,columnNumber:23},this),a.jsxDEV("option",{value:"vm",children:"VM"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:295,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:291,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:289,columnNumber:19},this),a.jsxDEV("label",{children:[a.jsxDEV("span",{children:"Task"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:299,columnNumber:21},this),a.jsxDEV("select",{value:N,onChange:V=>f(V.target.value),children:[a.jsxDEV("option",{value:"observe",children:"Observe first"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:301,columnNumber:23},this),a.jsxDEV("option",{value:"drive",children:"Drive when granted"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:302,columnNumber:23},this),a.jsxDEV("option",{value:"handoff",children:"Mission handoff"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:303,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:300,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:298,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:282,columnNumber:17},this),a.jsxDEV("div",{className:"cta-row",children:[a.jsxDEV("button",{className:"cta",onClick:p,children:"▸ Start planned session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:308,columnNumber:19},this),a.jsxDEV("button",{onClick:()=>L("explore"),children:"Browse capabilities"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:309,columnNumber:19},this),j.approvals.length>0&&a.jsxDEV("button",{onClick:()=>L("approvals"),children:["Review ",j.approvals.length," approval(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:310,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:307,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:276,columnNumber:15},this),a.jsxDEV("aside",{className:"quota-panel","aria-label":"Cost and quota",children:[a.jsxDEV("p",{className:"eyebrow",children:"Cost & quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:315,columnNumber:17},this),a.jsxDEV("div",{className:"quota-donut",style:{"--quota":`${A}%`},children:[a.jsxDEV("strong",{children:j.cost?`$${S.toFixed(2)}`:"--"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:317,columnNumber:19},this),a.jsxDEV("span",{children:j.cost?`${j.cost.total.input_tokens+j.cost.total.output_tokens} tokens`:"metrics unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:318,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:316,columnNumber:17},this),a.jsxDEV("dl",{className:"quota-readout",children:[a.jsxDEV("div",{children:[a.jsxDEV("dt",{children:"Selected stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:24},this),a.jsxDEV("dd",{children:v?`$${v.usd.toFixed(2)}`:"n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:19},this),a.jsxDEV("div",{children:[a.jsxDEV("dt",{children:"Headroom"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:24},this),a.jsxDEV("dd",{children:j.cost?A>80?"near limit":"clear":"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:41},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:19},this),a.jsxDEV("div",{children:[a.jsxDEV("dt",{children:"Approval load"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:24},this),a.jsxDEV("dd",{children:[j.approvals.length," pending"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:46},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:320,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:314,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:275,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:150,columnNumber:11},this):a.jsxDEV("div",{className:"card warn-card",children:[a.jsxDEV("h3",{children:"No stack connected"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:132,columnNumber:13},this),j.executor?a.jsxDEV(a.Fragment,{children:[a.jsxDEV("p",{children:["Bridge is connected to a real executor at ",a.jsxDEV("code",{children:j.executor},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:135,columnNumber:17},this),j.inventoryWarning&&a.jsxDEV("p",{className:"warn",children:["Inventory note: ",j.inventoryWarning]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:136,columnNumber:41},this),a.jsxDEV("div",{className:"cta-row",children:[a.jsxDEV("button",{className:"cta",onClick:x,children:"+ Launch instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:138,columnNumber:19},this),a.jsxDEV("button",{onClick:()=>L("inventory"),children:"Open inventory"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:139,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:137,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:134,columnNumber:15},this):a.jsxDEV(a.Fragment,{children:[a.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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:144,columnNumber:17},this),a.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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:145,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:143,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:131,columnNumber:11},this):a.jsxDEV("p",{className:"empty",children:"Checking your stacks…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:129,columnNumber:14},this),ee&&a.jsxDEV("div",{className:"card tour",children:[a.jsxDEV("h3",{children:"Three things to know"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:332,columnNumber:11},this),a.jsxDEV("ol",{children:[a.jsxDEV("li",{children:[a.jsxDEV("strong",{children:"Sessions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:334,columnNumber:13},this),a.jsxDEV("li",{children:[a.jsxDEV("strong",{children:"Actions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:335,columnNumber:17},this)," and the ",a.jsxDEV("strong",{children:"+ capability picker"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:335,columnNumber:13},this),a.jsxDEV("li",{children:[a.jsxDEV("strong",{children:"Explore"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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-v2VJA1/web/src/components/Welcome.tsx",lineNumber:336,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:333,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:331,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Welcome.tsx",lineNumber:105,columnNumber:5},this)}function sx(p){const x=p.admin_error;return[p.degraded_admin_inventory,x==null?void 0:x.code,x==null?void 0:x.title,x==null?void 0:x.detail].filter(Boolean).join(" · ")||void 0}function nx(p){var L;const x=ur(((L=p.runtime_posture)==null?void 0:L.kind)??p.runtime);return x==="host"?"terminal":x==="vm"||x==="container"?"cube":"window"}function rx(p){let x=0;for(const L of p)x+=L.charCodeAt(0);return x%4+1}function ox(p){return{"--x":`${p.x}%`,"--y":`${p.y}%`}}function ax(){return new URLSearchParams(window.location.search).get("wall")==="handoff"?"handoff":"topology"}function lx(p){var g,N;const x=(p==null?void 0:p.instances.filter(f=>f.state==="running"))??[],L=p==null?void 0:p.instances.find(f=>{var m;return ur(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="host"}),j=p==null?void 0:p.instances.find(f=>{var m;return ur(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="container"}),q=p==null?void 0:p.instances.find(f=>{var m;return ur(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="vm"}),ee=(p==null?void 0:p.instances.some(f=>f.session_backends.some(m=>m.available&&m.drive)))??!1,I=(p==null?void 0:p.approvals.length)??0,c=(N=(g=p==null?void 0:p.cost)==null?void 0:g.total)==null?void 0:N.usd;return[{key:"host",label:(L==null?void 0:L.loadout)||"Host CLI",meta:L?`${Je(L.id)} · ${L.state}`:"not connected",family:"host",tab:"inventory",state:L?"running":"blocked"},{key:"vm",label:(q==null?void 0:q.loadout)||"VM sandbox",meta:q?`${Je(q.id)} · ${q.state}`:"not connected",family:"vm",tab:"inventory",state:q?"running":"blocked"},{key:"container",label:(j==null?void 0:j.loadout)||"Docker runtime",meta:j?`${Je(j.id)} · ${j.state}`:"not connected",family:"container",tab:"inventory",state:j?"running":"blocked"},{key:"mission",label:"Mission handoff",meta:p!=null&&p.running[0]?`${Je(p.running[0].task_id)} · ${p.running[0].state}`:"ready",family:"mission",tab:"running",state:p!=null&&p.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:c===void 0?"metrics n/a":`$${c.toFixed(2)}`,family:"cost",tab:"running",state:c===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:ee?"drive available":"observe first",family:"action",tab:"actions",state:ee?"ready":"idle"},{key:"sessions",label:"Sessions",meta:x.length?`${x.length} attachable`:"none active",family:"session",tab:"sessions",state:x.length?"running":"idle"},{key:"inventory",label:"Inventory",meta:`${(p==null?void 0:p.instances.length)??0} registered`,family:"inventory",tab:"inventory",state:p!=null&&p.instances.length?"ready":"idle"}].map((f,m)=>({...f,x:f1[m][0],y:f1[m][1]}))}const V1=(p,x)=>Object.prototype.hasOwnProperty.call(p,x),cx=p=>p!==null&&typeof p=="object"&&!Array.isArray(p)&&[Object.prototype,null].includes(Object.getPrototypeOf(p)),Di=(p=!1)=>{throw Object.assign(new Error(p?"Invalid desktop request":"Invalid desktop response"),{code:p?"desktop_invalid_request":"desktop_invalid_response"})},Jl=(p,x,L=Number.MAX_SAFE_INTEGER)=>Number.isSafeInteger(p)&&p>=x&&p<=L,m1=p=>typeof p=="string"&&/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/.test(p),Qr=p=>typeof p=="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(p),ra=(p,x,L=!1)=>{(!cx(p)||x.some(j=>!V1(p,j))||L&&Reflect.ownKeys(p).some(j=>!x.includes(j)))&&Di(L)},na=(p,x,L=!1)=>(x.includes(p)||Di(L),p),ux=(p,x)=>na(p,["control","observe"],x);function hx(p){return ra(p,["width","height","dpi"],!0),(!Jl(p.width,640,3840)||!Jl(p.height,480,2160)||!Jl(p.dpi,72,240))&&Di(!0),{width:p.width,height:p.height,dpi:p.dpi}}function R1(p,x){if(p==="CloseRequest")return ra(x,["action"],!0),{action:na(x.action,["revoke_access","sign_out"],!0)};["CreateDesktop","AttachmentRequest"].includes(p)||Di(!0);const L=p==="CreateDesktop"?"requested_mode":"mode";return ra(x,["viewport",L],!0),{[L]:ux(x[L],!0),viewport:hx(x.viewport)}}const Km=["observe","control","sharing","clipboard_copy","clipboard_paste","file_transfer","audio","recording"];function dx(p){return ra(p,[...Km,"isolation_tier","generation"]),(Km.some(x=>typeof p[x]!="boolean")||!Jl(p.generation,1))&&Di(),{...Object.fromEntries(Km.map(x=>[x,p[x]])),isolation_tier:na(p.isolation_tier,["cooperative","separate_desktop_vm"]),generation:p.generation}}function Zm(p){(typeof p!="string"||p.length>40)&&Di();const x=p.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d{1,9})?(?:Z|([+-])(\d{2}):(\d{2}))$/);x||Di();const[,L,j,q,ee,I,c,,b,g]=x,N=Number(L),f=Number(j),m=Number(q),C=[31,N%4===0&&(N%100!==0||N%400===0)?29:28,31,30,31,30,31,31,30,31,30,31];return(f<1||f>12||m<1||m>C[f-1]||Number(ee)>23||Number(I)>59||Number(c)>59||Number(b??0)>23||Number(g??0)>59||!Number.isFinite(Date.parse(p)))&&Di(),p}const fx=Object.freeze({desktop_not_supported:[501,"Desktop access is not supported."],desktop_not_ready:[409,"The desktop is not ready."],access_denied:[403,"Desktop access denied."],control_conflict:[409,"Another controller owns the desktop."],grant_expired:[410,"Desktop admission expired. Reconnect to request new admission."],stale_instance:[409,"The instance changed. Refresh before reconnecting."],route_unavailable:[503,"The desktop route is unavailable."],credentials_unavailable:[503,"Desktop credentials are unavailable."],upstream_certificate_invalid:[502,"The desktop certificate could not be verified."],quota_exceeded:[429,"The desktop capacity limit was reached."],desktop_session_ended:[410,"The guest desktop session ended."],cleanup_pending:[409,"Desktop cleanup is pending."],idempotency_conflict:[409,"The request identifier was already used for a different request."]});function mx(p){return(!Array.isArray(p)||p.length>32||p.some(x=>typeof x!="string"||!/^[a-z][a-z0-9_]{0,63}$/.test(x)))&&Di(),[...new Set(p.map(x=>V1(fx,x)||["unknown","not_ready","unsupported"].includes(x)?x:"unknown"))]}function T1(p,x){if(p==="BackendAttachmentGrant")return ra(x,["attachment_id","desktop_id","grant","expires_at","policy_generation"]),(!Qr(x.attachment_id)||!Qr(x.desktop_id)||!Jl(x.policy_generation,1)||typeof x.grant!="string"||!/^[A-Za-z0-9._~+/-]{32,4096}={0,2}$/.test(x.grant)||x.grant.length>4096)&&Di(),{attachment_id:x.attachment_id,desktop_id:x.desktop_id,grant:x.grant,expires_at:Zm(x.expires_at),policy_generation:x.policy_generation};["Capability","Desktop"].includes(p)||Di(),ra(x,[...["schema_version","instance_id","incarnation","policy"],...p==="Capability"?["supported","readiness","reason_codes"]:["id","workspace_id","state","cleanup","absolute_expires_at","retained_until"]]),(x.schema_version!=="rdp-cockpit.v1"||!Qr(x.instance_id)||!m1(x.incarnation))&&Di();const j={schema_version:x.schema_version,instance_id:x.instance_id,incarnation:x.incarnation,policy:dx(x.policy)};return p==="Capability"?(typeof x.supported!="boolean"&&Di(),{...j,supported:x.supported,readiness:na(x.readiness,["ready","not_ready","unknown"]),reason_codes:mx(x.reason_codes)}):((!Qr(x.id)||!m1(x.workspace_id))&&Di(),{...j,id:x.id,workspace_id:x.workspace_id,state:na(x.state,["preparing","ready","attached","detached","closing","closed","failed"]),cleanup:na(x.cleanup,["none","pending","complete","failed"]),absolute_expires_at:Zm(x.absolute_expires_at),retained_until:x.retained_until===null?null:Zm(x.retained_until)})}const M1={unauthorized:"Sign in to Cockpit to connect to this desktop.",access_denied:"You do not have access to this desktop.",desktop_not_supported:"Desktop assistance is not available for this instance.",desktop_not_ready:"The desktop is still getting ready.",control_conflict:"Another participant currently controls this desktop.",stale_instance:"This instance changed. Refresh before reconnecting.",desktop_session_ended:"This desktop session has ended.",cleanup_pending:"The desktop is still being cleaned up.",quota_exceeded:"Desktop capacity is currently full. Try again later.",idempotency_conflict:"This request identifier was already used. Refresh before trying again.",desktop_invalid_request:"The desktop request is invalid.",desktop_invalid_response:"The desktop service returned an invalid response.",unavailable:"Desktop assistance is temporarily unavailable."};class Sn extends Error{constructor(x,L=0){super(M1[x]),this.code=x,this.status=L,this.name="DesktopApiError"}}function rh(p,x){if(!Qr(p)||x!==void 0&&!Qr(x))throw new Sn("desktop_invalid_request");return`/api/desktops/instances/${p}${x===void 0?"":`/sessions/${x}`}`}async function oh(p,x){const L=await nh(p,x),j=await L.json().catch(q=>{var ee;if((ee=x.signal)!=null&&ee.aborted)throw x.signal.reason;if(q instanceof DOMException&&q.name==="AbortError")throw q;return null});if(!L.ok){const q=j&&typeof j=="object"&&"error"in j?j.error:void 0,ee=typeof q=="string"&&Object.hasOwn(M1,q)?q:"unavailable";throw new Sn(ee,L.status)}return j}function op(p,x,L){try{const j=T1("Desktop",p);if(j.instance_id.toLowerCase()!==x.toLowerCase()||L!==void 0&&j.id.toLowerCase()!==L.toLowerCase())throw new Error;return j}catch{throw new Sn("desktop_invalid_response")}}async function O1(p,x){const L=await oh(`${rh(p)}/capability`,{signal:x});if(L&&typeof L=="object"&&"state"in L&&L.state==="unsupported"&&"reason"in L&&typeof L.reason=="string"&&["desktop_backend_not_configured","desktop_not_supported"].includes(L.reason))return{state:"unsupported",reason:L.reason};try{const j=T1("Capability",L);if(j.instance_id.toLowerCase()!==p.toLowerCase())throw new Error;return j}catch{throw new Sn("desktop_invalid_response")}}async function px(p,x,L){return op(await oh(rh(p,x),{signal:L}),p,x)}async function bx(p,x,L){const j=`${rh(p)}/sessions`;if(typeof L.idempotencyKey!="string"||!/^[A-Za-z0-9_-]{16,128}$/.test(L.idempotencyKey))throw new Sn("desktop_invalid_request");let q;try{q=R1("CreateDesktop",x)}catch{throw new Sn("desktop_invalid_request")}return op(await oh(j,{method:"POST",signal:L.signal,headers:{"content-type":"application/json","idempotency-key":L.idempotencyKey},body:JSON.stringify(q)}),p)}async function vx(p,x,L,j){const q=`${rh(p,x)}/close`;let ee;try{ee=R1("CloseRequest",L)}catch{throw new Sn("desktop_invalid_request")}return op(await oh(q,{method:"POST",signal:j,headers:{"content-type":"application/json"},body:JSON.stringify(ee)}),p,x)}const gx={loading:"Loading desktop capability…",not_ready:"The desktop is still getting ready.",unavailable:"Desktop assistance is not available for this instance.",idle:"Ready to connect.",live:"Desktop session live. Display transport is not available in this build; the guest session is running and can be closed from here.",reconnecting:"Reconnecting to the desktop session…",disconnected:"Disconnected from the desktop session. The guest session may still be running.",expired:"This desktop session has expired.",denied:"You do not have access to this desktop.","guest-ended":"The guest was signed out; this desktop session has ended.",failed:"The desktop session failed.",stale:"This instance changed. Refresh before reconnecting.",handoff_waiting:"Another participant currently controls this desktop. Waiting for handoff.",closing:"Closing the desktop session; cleanup is pending."},_x=5,p1=[1,2,4,8],b1=["stale","expired","guest-ended","failed","denied"];function j1(p){return p==="desktop_backend_not_configured"?"Desktop backend is not configured":"This instance does not support desktop assistance"}function L1(p){return p?p.policy.control?"control":p.policy.observe?"observe":null:null}function wx(p,x,L,j=Date.now()){if(x&&x.incarnation!==p.incarnation)return{status:"stale",reason:"VM restarted (new incarnation)"};const q=Date.parse(p.absolute_expires_at);if(Number.isFinite(q)&&q<=j&&!["closed","failed"].includes(p.state))return{status:"expired",reason:""};switch(p.state){case"preparing":return{status:"loading",reason:"Preparing the guest desktop."};case"ready":case"attached":return{status:"live",reason:""};case"detached":return{status:"disconnected",reason:""};case"closing":return{status:"closing",reason:""};case"closed":return L==="sign_out"?{status:"guest-ended",reason:""}:{status:"disconnected",reason:"The desktop session was closed."};case"failed":return{status:"failed",reason:""};default:return{status:"failed",reason:"Unknown desktop state."}}}function B1(p){if(!(p instanceof Sn))return null;switch(p.code){case"access_denied":case"unauthorized":return{status:"denied",reason:p.message};case"desktop_session_ended":return{status:"expired",reason:p.message};case"control_conflict":return{status:"handoff_waiting",reason:p.message};case"stale_instance":return{status:"stale",reason:p.message};case"desktop_not_supported":return{status:"unavailable",reason:p.message};case"quota_exceeded":case"idempotency_conflict":case"desktop_invalid_request":case"desktop_invalid_response":return{status:"failed",reason:p.message};default:return null}}function yx(){return(typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random()}`).replace(/[^A-Za-z0-9_-]/g,"-").slice(0,128).padEnd(16,"0")}function ep(p,x){return B1(p)??{status:x,reason:p instanceof Error?p.message:"Desktop assistance is temporarily unavailable."}}function Sx(p,x=2e3,L=1e3){const[j,q]=Z.useState({status:"loading",reason:"",capability:null,session:null,cleanup:null,failures:0}),ee=Z.useRef(null),I=Z.useRef(void 0),c=Z.useRef(null),b=Z.useRef(null),g=Z.useRef(!1),N=Z.useCallback(()=>{g.current=!1,I.current!==void 0&&(window.clearTimeout(I.current),I.current=void 0)},[]),f=Z.useCallback(()=>(ee.current??(ee.current=new AbortController),ee.current.signal),[]),m=Z.useCallback(v=>{const S=wx(v,c.current,b.current);return c.current=v,q(A=>({...A,status:S.status,reason:S.reason,session:v,cleanup:v.cleanup,failures:0})),S.status},[]),w=Z.useCallback(async()=>{q(v=>({...v,status:"loading",reason:""}));try{const v=await O1(p,f());if(f().aborted)return;if("state"in v&&v.state==="unsupported"){q(A=>({...A,status:"unavailable",reason:j1(v.reason),capability:null}));return}const S=v;S.supported?S.readiness==="ready"?q(A=>({...A,status:"idle",reason:"",capability:S})):q(A=>({...A,status:"not_ready",reason:S.readiness==="unknown"?"Desktop readiness unknown":S.reason_codes.join(", "),capability:S})):q(A=>({...A,status:"unavailable",reason:S.reason_codes.join(", ")||"This instance does not support desktop assistance",capability:S}))}catch(v){if(f().aborted)return;q(S=>({...S,...ep(v,"unavailable"),capability:null}))}},[p,f]),C=Z.useCallback(async()=>{const v=c.current;if(!(!g.current||!v))try{const S=await px(p,v.id,f());if(!g.current||f().aborted)return;const A=m(S);if(b1.includes(A)||S.state==="closed"){N();return}I.current=window.setTimeout(C,x)}catch(S){if(!g.current||f().aborted)return;const A=B1(S);if(A){q(k=>({...k,...A})),A.status==="handoff_waiting"?I.current=window.setTimeout(C,x):N();return}q(k=>{const E=k.failures+1;return E>=_x?(N(),{...k,status:"disconnected",reason:"Lost contact with the desktop service.",failures:E}):(I.current=window.setTimeout(C,L*p1[Math.min(E-1,p1.length-1)]),{...k,status:"reconnecting",reason:"",failures:E})})}},[m,L,p,x,f,N]),y=Z.useCallback(()=>{g.current=!0,I.current=window.setTimeout(C,x)},[C,x]),h=Z.useCallback(async()=>{const v=L1(j.capability);if(v){b.current=null,q(S=>({...S,status:"loading",reason:"Requesting a desktop session…",failures:0}));try{const S=await bx(p,{requested_mode:v,viewport:{width:window.innerWidth,height:window.innerHeight,dpi:Math.round(96*(window.devicePixelRatio||1))}},{idempotencyKey:yx(),signal:f()});if(f().aborted)return;c.current=null;const A=m(S);b1.includes(A)||y()}catch(S){if(f().aborted)return;q(A=>({...A,...ep(S,"failed")}))}}},[m,p,f,y,j.capability]),u=Z.useCallback(()=>{N(),q(v=>({...v,status:"disconnected",reason:"You disconnected from this desktop; the guest session is still running."}))},[N]),o=Z.useCallback(()=>{c.current&&(q(v=>({...v,status:"reconnecting",reason:"",failures:0})),g.current=!0,C())},[C]),l=Z.useCallback(async v=>{const S=c.current;if(S){N(),b.current=v,q(A=>({...A,status:"closing",reason:v==="sign_out"?"Signing the guest out…":"Revoking desktop access…"}));try{const A=await vx(p,S.id,{action:v},f());if(f().aborted)return;m(A)==="closing"&&y()}catch(A){if(f().aborted)return;q(k=>({...k,...ep(A,"failed")}))}}},[m,p,f,y,N]);return Z.useEffect(()=>(ee.current=new AbortController,c.current=null,b.current=null,w(),()=>{var v;N(),(v=ee.current)==null||v.abort(),ee.current=null}),[w,N]),{state:j,connect:h,disconnect:u,reconnect:o,close:l,retry:w}}const Nx=3e4;async function Ex(p){const x=Date.now();if(!Qr(p))return{enabled:!1,reason:"Desktop requires a gateway instance id",checkedAt:x};try{const L=await O1(p);return"state"in L&&L.state==="unsupported"?{enabled:!1,reason:j1(L.reason),checkedAt:x}:"supported"in L?L.supported?L.readiness==="ready"?{enabled:!0,incarnation:L.incarnation,checkedAt:x}:L.readiness==="not_ready"?{enabled:!1,reason:["Desktop is still getting ready",...L.reason_codes].join(": "),incarnation:L.incarnation,checkedAt:x}:{enabled:!1,reason:"Desktop readiness unknown",incarnation:L.incarnation,checkedAt:x}:{enabled:!1,reason:L.reason_codes.join(", ")||"This instance does not support desktop assistance",incarnation:L.incarnation,checkedAt:x}:{enabled:!1,reason:"Desktop readiness unknown",checkedAt:x}}catch(L){return{enabled:!1,reason:L instanceof Sn?L.message:"Desktop assistance is temporarily unavailable.",checkedAt:x}}}function xx({onStartSession:p,onLaunchInstance:x,onOpenDesktop:L,refreshTick:j=0,refreshMs:q=5e3}){const[ee,I]=Z.useState(null),[c,b]=Z.useState(""),[g,N]=Z.useState(""),[f,m]=Z.useState(""),[w,C]=Z.useState({}),y=Z.useRef({}),h=typeof L=="function",u=Z.useCallback(S=>{if(!h)return;const A=Date.now(),E=S.filter(R=>R.state==="running").filter(R=>{const V=y.current[R.id];return!V||A-V.checkedAt>=Nx});E.length&&Promise.all(E.map(async R=>[R.id,await Ex(R.id)])).then(R=>{const V={...y.current};for(const[J,$]of R)V[J]=$;y.current=V,C(V)})},[h]),o=Z.useCallback(()=>{Le("/api/inventory").then(S=>{I(S),b(""),u(S.instances)}).catch(S=>b(S.message))},[u]);Z.useEffect(()=>{o();const S=window.setInterval(o,q);return()=>window.clearInterval(S)},[o,q,j]);const l=(S,A,k="")=>Le(S,{method:A}).then(E=>{N(""),m(E.message??(E.already_gone?"Instance already removed; inventory refreshed.":k)),o()}).catch(E=>{m(""),N(E.message)}),v=async(S,A)=>{var J,$;if(A.disabled)return;const k=g1(((J=S.launch_context)==null?void 0:J.name)??Je(S.id)),E=`${k}-${A.id==="snapshot"?"snapshot":A.id}`,R=window.prompt(`${A.label} asset id`,E);if(R===null)return;const V={asset_ref:R.trim()};if(A.id!=="snapshot"){const H=window.prompt("New instance name",`${k}-${A.id==="warm-pool"?"warm":A.id}`);if(H===null)return;V.name=g1(H)}N(""),m(`${A.label} requested; waiting for operation...`);try{const H=await Le(`/api/instances/${encodeURIComponent(S.id)}/${A.id}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(V)}),X=H.id??(($=H.operation)==null?void 0:$.id);if(!X){m(`${A.label} accepted.`),o();return}const ne=await Ox(X);await Le("/api/audit/intent",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({event:"instance.fast_start.terminal",detail:{instance_id:S.id,provider:S.provider,action:A.id,operation_id:X,state:ne.state,result:ne.result,error:ne.error??ne.failure}})}).catch(()=>{}),m(`${A.label} ${ne.state??"completed"}: ${X}`),o()}catch(H){m(""),N(H.message)}};return c?a.jsxDEV("p",{className:"err",children:["Could not load inventory: ",c]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:152,columnNumber:19},this):ee?ee.instances.length?a.jsxDEV(a.Fragment,{children:[a.jsxDEV("div",{className:"section-toolbar",children:[a.jsxDEV("div",{children:[a.jsxDEV("h2",{children:"Agent instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:168,columnNumber:11},this),a.jsxDEV("p",{className:"hint",children:[ee.count," ",ee.count===1?"target":"targets"," · ",new Date(ee.fetched_at).toLocaleTimeString()]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:169,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:167,columnNumber:9},this),x&&a.jsxDEV("button",{className:"cta",onClick:x,children:"New instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:171,columnNumber:30},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:166,columnNumber:7},this),g&&a.jsxDEV("p",{className:"err",children:["Action failed: ",g]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:173,columnNumber:21},this),f&&a.jsxDEV("p",{className:"hint",role:"status",children:f},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:174,columnNumber:21},this),ee.bootstrap_trust&&a.jsxDEV(Ax,{posture:ee.bootstrap_trust},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:175,columnNumber:32},this),a.jsxDEV("table",{className:"inventory-table",children:[a.jsxDEV("caption",{children:"Available instance deployments"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:177,columnNumber:9},this),a.jsxDEV("thead",{children:a.jsxDEV("tr",{children:[a.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:180,columnNumber:13},this),a.jsxDEV("th",{scope:"col",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:180,columnNumber:42},this),a.jsxDEV("th",{scope:"col",children:"Loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:180,columnNumber:70},this),a.jsxDEV("th",{scope:"col",children:"Transport"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:181,columnNumber:13},this),a.jsxDEV("th",{scope:"col",children:"Host daemon"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:181,columnNumber:43},this),a.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:181,columnNumber:75},this),a.jsxDEV("th",{scope:"col",children:"Tenant"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:181,columnNumber:101},this),a.jsxDEV("th",{scope:"col",children:"Manage"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:181,columnNumber:128},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:179,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:178,columnNumber:9},this),a.jsxDEV("tbody",{children:ee.instances.map(S=>a.jsxDEV("tr",{children:(()=>{var V,J,$,H,X,ne,ie,re,oe;const A=(V=S.session_backends)==null?void 0:V.some(T=>T.available),k=($=(J=S.session_backends)==null?void 0:J.find(T=>!T.available))==null?void 0:$.reason,E=Vx(S),R=Rx(S);return a.jsxDEV(a.Fragment,{children:[a.jsxDEV("td",{className:"instance-cell",children:[a.jsxDEV("code",{title:S.id,children:((H=S.launch_context)==null?void 0:H.name)??Je(S.id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:199,columnNumber:17},this),((X=S.launch_context)==null?void 0:X.name)&&a.jsxDEV("div",{className:"cell-note",children:Je(S.id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:200,columnNumber:44},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:198,columnNumber:15},this),a.jsxDEV("td",{className:"runtime-cell",children:[a.jsxDEV("span",{className:`badge isolation-${S.runtime_posture.isolation}`,title:S.runtime_posture.warning||S.runtime_posture.label,children:S.runtime_posture.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:203,columnNumber:17},this),S.provider&&a.jsxDEV("div",{className:"cell-note",children:S.provider},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:206,columnNumber:32},this),Tx(S)&&a.jsxDEV("div",{className:"cell-note",children:["VFIO",v1(S).length?` · ${v1(S).join(", ")}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:208,columnNumber:19},this),((ne=S.gpu)==null?void 0:ne.reason)&&a.jsxDEV("div",{className:"cell-note",children:S.gpu.reason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:212,columnNumber:35},this),S.runtime_posture.warning&&a.jsxDEV("div",{className:"cell-note",children:S.runtime_posture.warning},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:213,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:202,columnNumber:15},this),a.jsxDEV("td",{children:[S.loadout,((ie=S.launch_context)==null?void 0:ie.image_ref)&&a.jsxDEV("div",{className:"cell-note",children:S.launch_context.image_ref},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:217,columnNumber:49},this),((re=S.launch_context)==null?void 0:re.source)&&a.jsxDEV("div",{className:"cell-note",children:S.launch_context.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:218,columnNumber:46},this),S.storage&&a.jsxDEV("div",{className:"cell-note",children:["Storage: ",S.storage.persistent?"persistent":"ephemeral",S.storage.delete_on_destroy?" · delete on destroy":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:220,columnNumber:19},this),((oe=S.storage)==null?void 0:oe.reason)&&a.jsxDEV("div",{className:"cell-note",children:S.storage.reason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:224,columnNumber:39},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:215,columnNumber:15},this),a.jsxDEV("td",{children:[a.jsxDEV("span",{className:`badge trust-${S.transport.trust}`,title:`${S.transport.source}${S.transport.evidence?`: ${S.transport.evidence}`:""}`,children:S.transport.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:227,columnNumber:17},this),a.jsxDEV("div",{className:"cell-note",children:[S.transport.mode,S.transport.stale?" · stale":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:230,columnNumber:17},this),S.managed_docker_posture&&a.jsxDEV(Cx,{posture:S.managed_docker_posture},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:231,columnNumber:46},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:226,columnNumber:15},this),a.jsxDEV("td",{className:"daemon-cell",children:[a.jsxDEV("span",{className:`badge daemon-${S.host_daemon.status}`,children:S.host_daemon.status.replace("_"," ")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:234,columnNumber:17},this),S.host_daemon.detail&&a.jsxDEV("div",{className:"cell-note",children:S.host_daemon.detail},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:235,columnNumber:42},this),S.host_daemon.operator_command&&a.jsxDEV("code",{title:"Operator start command",children:S.host_daemon.operator_command},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:236,columnNumber:52},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:233,columnNumber:15},this),a.jsxDEV("td",{children:[a.jsxDEV("span",{className:`state ${R.kind==="stale-agent"?"degraded":S.state}`,title:R.detail,children:[a.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:240,columnNumber:19},this),R.label]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:239,columnNumber:17},this),R.detail&&R.kind!=="healthy"&&a.jsxDEV("div",{className:"cell-note",children:R.detail},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:242,columnNumber:64},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:238,columnNumber:15},this),a.jsxDEV("td",{children:S.tenant},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:244,columnNumber:15},this),a.jsxDEV("td",{className:"manage-actions",children:[S.state==="running"&&p&&a.jsxDEV("button",{className:"cta","aria-label":`Start session on ${Je(S.id)}`,disabled:!A,title:A?void 0:k,onClick:()=>p(S.id),children:"Session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:247,columnNumber:19},this)," ",S.state==="running"&&L&&(()=>{const T=w[S.id],z=(T==null?void 0:T.enabled)===!0,B=T?T.reason:"Checking desktop capability…";return a.jsxDEV("button",{"aria-label":`Open desktop for ${Je(S.id)}`,disabled:!z,title:z?"Open the guest desktop panel for this instance.":B,onClick:()=>L(S.id),children:"Open Desktop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:262,columnNumber:21},this)})()," ",E&&a.jsxDEV("button",{"aria-label":`Reconnect agent for ${Je(S.id)}`,title:k??"Ask the running agent to re-register without restarting the instance.",onClick:()=>l(`/api/instances/${encodeURIComponent(S.id)}/reconnect`,"POST","Reconnect requested; inventory will refresh shortly."),children:"Reconnect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:273,columnNumber:19},this)," ",Mx(S).map(T=>a.jsxDEV("button",{"aria-label":`${T.label} ${Je(S.id)}`,disabled:T.disabled,title:T.reason,onClick:()=>v(S,T),children:T.label},T.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:282,columnNumber:19},this))," ",S.state==="running"?a.jsxDEV("button",{"aria-label":`Stop instance ${Je(S.id)}`,onClick:()=>l(`/api/instances/${encodeURIComponent(S.id)}/stop`,"POST"),children:"Stop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:293,columnNumber:21},this):a.jsxDEV("button",{"aria-label":`Start instance ${Je(S.id)}`,onClick:()=>l(`/api/instances/${encodeURIComponent(S.id)}/start`,"POST"),children:"Start"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:294,columnNumber:21},this)," ",a.jsxDEV("button",{"aria-label":`Destroy instance ${Je(S.id)}`,title:S.state!=="running"&&S.runtime==="docker"?"Stopped Docker row — Destroy asks the sandbox management API to remove it.":void 0,onClick:()=>{confirm(`Destroy ${Je(S.id)}? This cannot be undone.`)&&l(`/api/instances/${encodeURIComponent(S.id)}`,"DELETE")},children:"Destroy"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:295,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:245,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:197,columnNumber:13},this)})()},S.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:186,columnNumber:13},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:184,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:176,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:165,columnNumber:5},this):a.jsxDEV("section",{className:"empty-state",children:[a.jsxDEV("h2",{children:"No instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:157,columnNumber:9},this),a.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-v2VJA1/web/src/components/Inventory.tsx",lineNumber:158,columnNumber:9},this),x&&a.jsxDEV("button",{className:"cta",onClick:x,children:"+ New instance + session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:159,columnNumber:30},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:156,columnNumber:7},this):a.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:153,columnNumber:21},this)}function Cx({posture:p}){return p.secure_default?a.jsxDEV("div",{children:[a.jsxDEV("span",{className:"badge trust-secure",children:"Managed UDS · split identity"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:315,columnNumber:43},this),a.jsxDEV("div",{className:"cell-note",children:["control identity valid · workload UID ",p.workload_uid]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:315,columnNumber:115},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:315,columnNumber:38},this):p.requires_recreation?a.jsxDEV("div",{children:[a.jsxDEV("span",{className:"badge trust-degraded",children:"Recreate required"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:316,columnNumber:48},this),a.jsxDEV("div",{className:"cell-note",children:"Existing container lacks managed identity evidence; recreate it to adopt the secure default."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:316,columnNumber:111},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:316,columnNumber:43},this):a.jsxDEV("div",{children:[a.jsxDEV("span",{className:"badge trust-compatibility",children:"Compatibility transport"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:317,columnNumber:15},this),a.jsxDEV("div",{className:"cell-note",children:p.fallback_reason??`${p.transport_mode} is not equivalent to native UDS peer identity`},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:317,columnNumber:89},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:317,columnNumber:10},this)}function Ax({posture:p}){const x=[p.ca_provider_ref,p.trust_bundle_ref,p.rotation_state,p.expires_at?`expires ${new Date(p.expires_at).toLocaleDateString()}`:void 0].filter(Boolean).join(" · ");return a.jsxDEV("p",{className:`trust-banner trust-${p.status}`,role:p.status==="secure"?"status":"alert",children:[a.jsxDEV("span",{children:p.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:329,columnNumber:7},this),x&&a.jsxDEV("span",{className:"trust-detail",children:x},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:330,columnNumber:18},this),p.status!=="secure"&&a.jsxDEV("span",{className:"trust-detail",children:p.recovery},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:331,columnNumber:39},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Inventory.tsx",lineNumber:328,columnNumber:5},this)}const Dx=["docker","container","vm","qemu","kvm"],kx=[{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 Vx(p){var q,ee;const x=String(((q=p.runtime_posture)==null?void 0:q.kind)??p.runtime).toLowerCase(),L=String(p.state).toLowerCase()==="running",j=p.agent_ready===!1||((ee=p.session_backends)==null?void 0:ee.some(I=>I.available===!1));return L&&Dx.includes(x)&&!!j}function Rx(p){var q,ee;const x=String(p.state).toLowerCase()==="running",L=(ee=(q=p.session_backends)==null?void 0:q.find(I=>I.available===!1))==null?void 0:ee.reason,j=p.agent_ready===!1||!!L;return x&&j?{kind:"stale-agent",label:"agent unreachable",detail:L??"Runtime is still running, but the agent is not registered."}:{kind:"healthy",label:p.state}}function Tx(p){var x,L,j,q,ee,I;return((x=p.capabilities)==null?void 0:x.some(c=>c.id==="device.vfio"))||((L=p.capability_constraints)==null?void 0:L.some(c=>c.capability==="device.vfio"))||!!((j=p.gpu)!=null&&j.assigned||(q=p.gpu)!=null&&q.available||(I=(ee=p.gpu)==null?void 0:ee.devices)!=null&&I.length)}function v1(p){var x,L;return((L=(x=p.gpu)==null?void 0:x.devices)==null?void 0:L.filter(Boolean))??[]}function Mx(p){var ee;const x=String(((ee=p.runtime_posture)==null?void 0:ee.kind)??p.runtime).toLowerCase();if(!["vm","qemu","kvm"].includes(x))return[];const L=new Set((p.capabilities??[]).map(I=>I.id)),j=p.capability_constraints??[],q=String(p.provider??"").toLowerCase();return kx.flatMap(I=>{const c=I.capabilities.some(N=>L.has(N)),b=j.find(N=>{var f;return((f=N.excludes)==null?void 0:f.some(m=>I.capabilities.includes(m)))||I.capabilities.includes(N.capability)});if(!c&&!b)return[];const g=I.id==="snapshot"&&q==="libvirt"?"Checkpoint":I.label;return[{id:I.id,label:g,disabled:!!b,reason:b==null?void 0:b.reason}]})}function g1(p){const x=String(p||"cockpit-vm").toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+$/g,"").slice(0,63),L=/^[a-z]/.test(x)?x:`a-${x.replace(/^-+/,"")}`;return L.length>=2?L:"cockpit-vm"}async function Ox(p){let x={id:p,state:"unknown"};for(let L=0;L<60;L+=1){x=await Le(`/api/operations/${encodeURIComponent(p)}`);const j=String(x.state??"").toLowerCase();if(["succeeded","failed","canceled","cancelled"].includes(j))return x;await new Promise(q=>window.setTimeout(q,1e3))}return x}function jx({refreshTick:p=0}){const[x,L]=Z.useState(null),[j,q]=Z.useState(null),[ee,I]=Z.useState(""),c=Z.useCallback(()=>{Le("/api/running").then(g=>{L(g),I("")}).catch(g=>I(g.message)),Le("/api/cost").then(q).catch(()=>q(null))},[]);Z.useEffect(()=>{c()},[c,p]);const b=g=>Le(`/api/tasks/${encodeURIComponent(g.instance_id)}/${encodeURIComponent(g.task_id)}/cancel`,{method:"POST"}).then(c).catch(N=>alert(N.message));return ee?a.jsxDEV("p",{className:"err",children:["Could not load running: ",ee]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:23,columnNumber:19},this):x?a.jsxDEV(a.Fragment,{children:[a.jsxDEV("p",{className:"hint",children:[a.jsxDEV("strong",{children:"Fleet overview."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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 ",a.jsxDEV("strong",{children:"Sessions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:30,columnNumber:59},this)," (the attached workspace)."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:28,columnNumber:7},this),j&&a.jsxDEV("p",{className:"hint",children:["Spend across stacks: ",a.jsxDEV("strong",{children:["$",j.total.usd.toFixed(2)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:33,columnNumber:50},this)," · ",(j.total.input_tokens+j.total.output_tokens).toLocaleString()," tokens"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:33,columnNumber:9},this),x.running.length?a.jsxDEV("table",{children:[a.jsxDEV("caption",{children:["Running across all stacks — ",x.count," task(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:39,columnNumber:13},this),a.jsxDEV("thead",{children:a.jsxDEV("tr",{children:[a.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:41,columnNumber:19},this),a.jsxDEV("th",{scope:"col",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:41,columnNumber:48},this),a.jsxDEV("th",{scope:"col",children:"Transport"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:41,columnNumber:76},this),a.jsxDEV("th",{scope:"col",children:"Task"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:41,columnNumber:106},this),a.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:41,columnNumber:131},this),a.jsxDEV("th",{scope:"col",children:"Tenant"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:41,columnNumber:157},this),a.jsxDEV("th",{scope:"col",children:"Control"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:41,columnNumber:184},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:41,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:40,columnNumber:13},this),a.jsxDEV("tbody",{children:x.running.map(g=>a.jsxDEV("tr",{children:[a.jsxDEV("td",{children:a.jsxDEV("code",{title:g.instance_id,children:Je(g.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:46,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:46,columnNumber:19},this),a.jsxDEV("td",{children:g.runtime_posture?a.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-v2VJA1/web/src/components/Running.tsx",lineNumber:47,columnNumber:44},this):a.jsxDEV("span",{className:"badge",children:"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:47,columnNumber:207},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:47,columnNumber:19},this),a.jsxDEV("td",{children:g.transport?a.jsxDEV("span",{className:`badge trust-${g.transport.trust}`,children:g.transport.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:48,columnNumber:38},this):a.jsxDEV("span",{className:"badge",children:"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:48,columnNumber:120},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:48,columnNumber:19},this),a.jsxDEV("td",{children:a.jsxDEV("code",{title:g.task_id,children:Je(g.task_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:49,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:49,columnNumber:19},this),a.jsxDEV("td",{children:a.jsxDEV("span",{className:`state ${g.state}`,children:[a.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:50,columnNumber:60},this),g.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:50,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:50,columnNumber:19},this),a.jsxDEV("td",{children:g.tenant},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:51,columnNumber:19},this),a.jsxDEV("td",{children:a.jsxDEV("button",{"aria-label":`Stop task ${Je(g.task_id)}`,onClick:()=>b(g),children:"Stop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:52,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:52,columnNumber:19},this)]},g.task_id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:45,columnNumber:17},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:43,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:38,columnNumber:11},this):a.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-v2VJA1/web/src/components/Running.tsx",lineNumber:36,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:27,columnNumber:5},this):a.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Running.tsx",lineNumber:24,columnNumber:20},this)}function Lx({refreshTick:p=0}){const[x,L]=Z.useState(null),[j,q]=Z.useState(""),[ee,I]=Z.useState(null),[c,b]=Z.useState("all"),g=Z.useCallback(()=>{Le("/api/missions").then(C=>{L(C),q(""),I(y=>{var h;return y??((h=C.sessions[0])==null?void 0:h.id)??null})}).catch(C=>q(C.message))},[]);if(Z.useEffect(()=>{g()},[g,p]),j)return a.jsxDEV("p",{className:"err",children:["Could not load Missions: ",j]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:24,columnNumber:19},this);if(!x)return a.jsxDEV("p",{className:"empty",children:"Loading..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:25,columnNumber:21},this);const N=Px(x.missions),f=x.missions.filter(C=>C.graph),m=x.sessions.map(C=>({...C,missions:C.missions.filter(y=>c==="all"||(c==="graph"?!!y.graph:!y.graph))})).filter(C=>C.missions.length>0||c==="all"),w=m.find(C=>C.id===ee)??m[0]??null;return a.jsxDEV(a.Fragment,{children:[a.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-v2VJA1/web/src/components/Missions.tsx",lineNumber:37,columnNumber:7},this),a.jsxDEV("div",{className:"mission-summary","aria-label":"Mission status summary",children:[a.jsxDEV("span",{children:[a.jsxDEV("strong",{children:x.count},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:43,columnNumber:15},this)," total"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:43,columnNumber:9},this),a.jsxDEV("span",{children:[a.jsxDEV("strong",{children:N.active},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:44,columnNumber:15},this)," active"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:44,columnNumber:9},this),a.jsxDEV("span",{children:[a.jsxDEV("strong",{children:N.awaiting},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:45,columnNumber:15},this)," awaiting approval"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:45,columnNumber:9},this),a.jsxDEV("span",{children:[a.jsxDEV("strong",{children:N.terminal},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:46,columnNumber:15},this)," terminal"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:46,columnNumber:9},this),a.jsxDEV("span",{children:[a.jsxDEV("strong",{children:f.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:47,columnNumber:15},this)," graph-profile"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:42,columnNumber:7},this),a.jsxDEV("fieldset",{className:"mission-profile-filter",children:[a.jsxDEV("legend",{children:"Run profile"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:50,columnNumber:9},this),["all","graph","ordinary"].map(C=>a.jsxDEV("label",{children:[a.jsxDEV("input",{type:"radio",name:"mission-profile",checked:c===C,onChange:()=>b(C)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:52,columnNumber:11},this)," ",C==="graph"?"Graph profile":C==="ordinary"?"Ordinary Flow / Mission":"All runs"]},C,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:51,columnNumber:66},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:49,columnNumber:7},this),c!=="ordinary"&&f.length>0&&a.jsxDEV(Bx,{missions:f},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:55,columnNumber:68},this),a.jsxDEV(Hx,{sessions:x.sessions.filter(C=>C.source==="aiwg-mc"),onChanged:g},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:56,columnNumber:7},this),m.length?a.jsxDEV("div",{className:"missions-layout",children:[a.jsxDEV("aside",{className:"mission-sessions","aria-label":"Mission sessions",children:m.map(C=>a.jsxDEV("button",{className:C.id===(w==null?void 0:w.id)?"selected":"",onClick:()=>I(C.id),"aria-pressed":C.id===(w==null?void 0:w.id),children:[a.jsxDEV("span",{children:C.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:67,columnNumber:17},this),a.jsxDEV("small",{children:[C.source," · ",C.missions.length]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:68,columnNumber:17},this)]},C.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:61,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:59,columnNumber:11},this),w&&a.jsxDEV(Ux,{session:w,onChanged:g},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:72,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:58,columnNumber:9},this):a.jsxDEV("p",{className:"empty",children:"No runs match this profile filter."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:57,columnNumber:34},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:36,columnNumber:5},this)}function Bx({missions:p}){return a.jsxDEV("section",{className:"graph-runs","aria-label":"Flow graph runs",children:[a.jsxDEV("h2",{children:"Flow / graph runs"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:81,columnNumber:5},this),a.jsxDEV("p",{className:"hint",children:"Read-only ledger projection. Visual editing is intentionally deferred; raw route evidence is not rendered."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:82,columnNumber:5},this),p.map(x=>{var L;return a.jsxDEV("article",{className:"graph-run",children:[a.jsxDEV("h3",{children:[x.graph.graph_id," ",a.jsxDEV("small",{children:["run ",Je(x.graph.run_id)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:84,columnNumber:37},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:84,columnNumber:7},this),a.jsxDEV("p",{children:[x.graph.graph_version?`v${x.graph.graph_version} · `:"",x.status,x.graph.replay_of_run_id?` · replay of ${Je(x.graph.replay_of_run_id)}`:"",x.graph.checkpoint_id?` · checkpoint ${Je(x.graph.checkpoint_id)}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:85,columnNumber:7},this),(L=x.graph_nodes)!=null&&L.length?a.jsxDEV("table",{children:[a.jsxDEV("caption",{children:[x.graph_nodes.length," graph node(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:87,columnNumber:9},this),a.jsxDEV("thead",{children:a.jsxDEV("tr",{children:[a.jsxDEV("th",{scope:"col",children:"Node"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:88,columnNumber:20},this),a.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:88,columnNumber:45},this),a.jsxDEV("th",{scope:"col",children:"Runtime / route"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:88,columnNumber:71},this),a.jsxDEV("th",{scope:"col",children:"HITL / retry"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:88,columnNumber:107},this),a.jsxDEV("th",{scope:"col",children:"Cost / evidence"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:88,columnNumber:140},this),a.jsxDEV("th",{scope:"col",children:"Replay lineage"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:88,columnNumber:176},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:88,columnNumber:16},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:88,columnNumber:9},this),a.jsxDEV("tbody",{children:x.graph_nodes.map(j=>a.jsxDEV(Jx,{node:j},j.node_run_id??j.node_id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:89,columnNumber:51},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:89,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:86,columnNumber:132},this):a.jsxDEV("p",{className:"empty",children:"Graph identity is present; node ledger data is not available yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:86,columnNumber:39},this)]},`${x.graph.run_id}:${x.id}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:83,columnNumber:32},this)})]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:80,columnNumber:10},this)}function Jx({node:p}){return a.jsxDEV("tr",{children:[a.jsxDEV("td",{children:[a.jsxDEV("strong",{children:p.node_id},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:97,columnNumber:9},this),p.node_run_id&&a.jsxDEV("small",{className:"block",children:Je(p.node_run_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:97,columnNumber:61},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:97,columnNumber:5},this),a.jsxDEV("td",{children:a.jsxDEV("span",{className:`state ${J1(p.state)}`,children:[a.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:98,columnNumber:62},this),p.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:98,columnNumber:9},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:98,columnNumber:5},this),a.jsxDEV("td",{children:[p.runtime_binding,a.jsxDEV("small",{className:"block",children:p.route_reason??"No route reason recorded"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:99,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:99,columnNumber:5},this),a.jsxDEV("td",{children:[p.hitl_status??"-",a.jsxDEV("small",{className:"block",children:["retries ",p.retry_count??0]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:100,columnNumber:34},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:100,columnNumber:5},this),a.jsxDEV("td",{children:["$",(p.cost_usd??0).toFixed(4)," · ",p.tokens??0," tokens",a.jsxDEV("small",{className:"block",children:p.evidence_summary??"No redacted evidence summary"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:101,columnNumber:71},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:101,columnNumber:5},this),a.jsxDEV("td",{children:p.replay_of_node_run_id?`replay of ${Je(p.replay_of_node_run_id)}`:p.checkpoint_id?`checkpoint ${Je(p.checkpoint_id)}`:"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:102,columnNumber:5},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:96,columnNumber:10},this)}function Hx({sessions:p,onChanged:x}){var o;const[L,j]=Z.useState(((o=p[0])==null?void 0:o.id)??""),[q,ee]=Z.useState(""),[I,c]=Z.useState(""),[b,g]=Z.useState(!1),[N,f]=Z.useState(!1),[m,w]=Z.useState(""),[C,y]=Z.useState(!1);if(Z.useEffect(()=>{var l;p.some(v=>v.id===L)||j(((l=p[0])==null?void 0:l.id)??"")},[p,L]),!p.length)return a.jsxDEV("p",{className:"hint",children:["Create a Mission Control session with ",a.jsxDEV("code",{children:"aiwg mc start"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:117,columnNumber:90},this)," before dispatching from Cockpit."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:117,columnNumber:32},this);const h=p.find(l=>l.id===L)??p[0],u=async l=>{var v,S;l.preventDefault(),y(!0),w("");try{await Le("/api/missions",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({session_id:h.id,objective:q,completion:I,expected_updated_at:h.updated_at,request_id:((S=(v=globalThis.crypto)==null?void 0:v.randomUUID)==null?void 0:S.call(v))??`cockpit-${Date.now()}`,run:b,accept_cost:N})}),ee(""),c(""),x()}catch(A){w(`Mission dispatch failed: ${A.message}`)}finally{y(!1)}};return a.jsxDEV("form",{className:"mission-composer","aria-label":"Dispatch durable mission",onSubmit:u,children:[a.jsxDEV("label",{children:["Session",a.jsxDEV("select",{value:h.id,onChange:l=>j(l.target.value),children:p.map(l=>a.jsxDEV("option",{value:l.id,children:l.name},l.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:147,columnNumber:129},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:147,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:147,columnNumber:5},this),a.jsxDEV("label",{children:["Objective",a.jsxDEV("input",{required:!0,maxLength:4096,value:q,onChange:l=>ee(l.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:148,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:148,columnNumber:5},this),a.jsxDEV("label",{children:["Completion criteria",a.jsxDEV("input",{maxLength:4096,value:I,onChange:l=>c(l.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:149,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:149,columnNumber:5},this),a.jsxDEV("label",{children:[a.jsxDEV("input",{type:"checkbox",checked:b,onChange:l=>g(l.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:150,columnNumber:12},this)," Run after queueing"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:150,columnNumber:5},this),b&&a.jsxDEV("label",{children:[a.jsxDEV("input",{type:"checkbox",checked:N,onChange:l=>f(l.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:151,columnNumber:23},this)," Accept estimated provider cost if the non-interactive gate requires it"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:151,columnNumber:16},this),a.jsxDEV("button",{disabled:C||!q.trim(),type:"submit",children:b?"Queue and run mission":"Queue mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:152,columnNumber:5},this),m&&a.jsxDEV("p",{className:"err",role:"alert",children:m},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:153,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:146,columnNumber:10},this)}function Ux({session:p,onChanged:x}){const L=p.source==="agentic-sandbox-fleet",j=p.source==="aiwg-mc",[q,ee]=Z.useState(""),[I,c]=Z.useState(""),b=async(g,N)=>{var m,w;c(`${g}:${N??p.id}`),ee("");const f=g==="cancel"?`/api/missions/${encodeURIComponent(p.id)}/${encodeURIComponent(N)}/cancel`:`/api/missions/${encodeURIComponent(p.id)}/${g}`;try{await Le(f,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({expected_updated_at:p.updated_at,request_id:((w=(m=globalThis.crypto)==null?void 0:m.randomUUID)==null?void 0:w.call(m))??`cockpit-${Date.now()}`})}),x()}catch(C){ee(`Mission control failed: ${C.message}. Refresh and retry if the state changed elsewhere.`)}finally{c("")}};return a.jsxDEV("section",{className:"mission-detail","aria-label":`${p.name} missions`,children:[a.jsxDEV("div",{className:"mission-detail-head",children:[a.jsxDEV("div",{children:[a.jsxDEV("h2",{children:p.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:188,columnNumber:11},this),a.jsxDEV("p",{children:[L&&p.parent_mission_id?`Parent mission ${p.parent_mission_id} · `:"",p.source," · ",p.state,p.inventory_revision!==void 0?` · inventory r${p.inventory_revision}`:"",p.updated_at?` · updated ${new Date(p.updated_at).toLocaleString()}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:189,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:187,columnNumber:9},this),a.jsxDEV("div",{children:[a.jsxDEV("span",{className:"badge",children:[p.audit_count," audit events"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:197,columnNumber:11},this),j&&p.state==="active"&&a.jsxDEV("button",{disabled:!!I,onClick:()=>b("pause"),children:"Pause session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:198,columnNumber:58},this),j&&p.state==="paused"&&a.jsxDEV("button",{disabled:!!I,onClick:()=>b("resume"),children:"Resume session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:199,columnNumber:58},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:196,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:186,columnNumber:7},this),q&&a.jsxDEV("p",{className:"err",role:"alert",children:q},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:202,columnNumber:25},this),p.missions.length?a.jsxDEV("table",{className:L?"fleet-missions":void 0,children:[a.jsxDEV("caption",{children:[p.missions.length," mission projection(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:205,columnNumber:11},this),a.jsxDEV("thead",{children:L?a.jsxDEV("tr",{children:[a.jsxDEV("th",{scope:"col",children:"Child workload"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:208,columnNumber:21},this),a.jsxDEV("th",{scope:"col",children:"Status"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:208,columnNumber:56},this),a.jsxDEV("th",{scope:"col",children:"Target / runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:208,columnNumber:83},this),a.jsxDEV("th",{scope:"col",children:"Binding"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:208,columnNumber:120},this),a.jsxDEV("th",{scope:"col",children:"Evidence"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:208,columnNumber:148},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:208,columnNumber:17},this):a.jsxDEV("tr",{children:[a.jsxDEV("th",{scope:"col",children:"Mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:209,columnNumber:21},this),a.jsxDEV("th",{scope:"col",children:"Status"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:209,columnNumber:49},this),a.jsxDEV("th",{scope:"col",children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:209,columnNumber:76},this),a.jsxDEV("th",{scope:"col",children:"Loop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:209,columnNumber:103},this),a.jsxDEV("th",{scope:"col",children:"Backing"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:209,columnNumber:128},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:209,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:206,columnNumber:11},this),a.jsxDEV("tbody",{children:p.missions.map(g=>a.jsxDEV("tr",{children:[a.jsxDEV("td",{children:[a.jsxDEV("strong",{children:g.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:215,columnNumber:19},this),L&&a.jsxDEV("small",{className:"block",children:zx(g)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:216,columnNumber:29},this),g.completion&&a.jsxDEV("small",{className:"block",children:["Done when: ",g.completion]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:217,columnNumber:36},this),g.error&&a.jsxDEV("small",{className:"block err",children:g.error},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:218,columnNumber:31},this),j&&!g.terminal&&g.status!=="aborted"&&g.status!=="failed"&&g.status!=="completed"&&g.status!=="done"&&a.jsxDEV("button",{disabled:!!I,onClick:()=>b("cancel",g.id),children:"Cancel mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:220,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:214,columnNumber:17},this),a.jsxDEV("td",{children:[a.jsxDEV("span",{className:`state ${J1(g.status)}`,children:[a.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:224,columnNumber:70},this),g.status]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:224,columnNumber:19},this),g.health&&a.jsxDEV("small",{className:"block",children:["health: ",g.health]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:225,columnNumber:32},this),g.backpressure&&a.jsxDEV("small",{className:"block fleet-warning",children:["backpressure: ",g.backpressure.reason,g.backpressure.retryable?" · retryable":" · operator action"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:226,columnNumber:38},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:223,columnNumber:17},this),L?a.jsxDEV(a.Fragment,{children:[a.jsxDEV("td",{children:[a.jsxDEV("strong",{children:g.target_id??"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:229,columnNumber:23},this),a.jsxDEV("small",{className:"block",children:[g.executor_id??"-"," / ",g.runtime_id??"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:229,columnNumber:60},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:229,columnNumber:19},this),a.jsxDEV("td",{children:[Ix(g),a.jsxDEV("small",{className:"block",children:["revision ",g.revision??0,g.last_seen?` · ${new Date(g.last_seen).toLocaleString()}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:230,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:230,columnNumber:19},this),a.jsxDEV("td",{children:$x(g)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:231,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:228,columnNumber:26},this):a.jsxDEV(a.Fragment,{children:[a.jsxDEV("td",{children:g.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:233,columnNumber:19},this),a.jsxDEV("td",{children:Wx(g)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:234,columnNumber:19},this),a.jsxDEV("td",{children:Fx(g)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:235,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:232,columnNumber:23},this)]},g.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:213,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:211,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:204,columnNumber:9},this):a.jsxDEV("p",{className:"empty",children:"This session has no missions."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:203,columnNumber:35},this),p.audit_tail.length>0&&a.jsxDEV("section",{className:"audit-tail","aria-label":"Mission audit tail",children:[a.jsxDEV("h3",{children:"Audit Tail"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:244,columnNumber:11},this),p.audit_tail.map((g,N)=>a.jsxDEV("p",{children:[a.jsxDEV("code",{children:g.ts?new Date(g.ts).toLocaleTimeString():"event"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:247,columnNumber:15},this)," ",String(g.event??"mission_event"),g.missionId||g.mission_id?a.jsxDEV(a.Fragment,{children:[" · ",a.jsxDEV("code",{children:Je(String(g.missionId??g.mission_id))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:249,columnNumber:59},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:249,columnNumber:54},this):null]},`${g.ts??"event"}-${N}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:246,columnNumber:13},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:243,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:185,columnNumber:5},this)}function zx(p){return p.workload_kind==="daemon"?`daemon health · desired ${p.desired_state??"unknown"}`:p.workload_kind==="persistent-agent"?`persistent retention · desired ${p.desired_state??"unknown"}`:p.workload_kind==="scheduled-collector"?`scheduled collection${p.schedule?` · ${p.schedule}`:""}`:p.workload_kind==="one-shot-command"?`one-shot terminal result · desired ${p.desired_state??"unknown"}`:p.workload_kind??"fleet workload"}function Ix(p){const x=[p.runtime_session_id&&`session ${Je(p.runtime_session_id)}`,p.task_id&&`task ${Je(p.task_id)}`,p.command_id&&`command ${Je(p.command_id)}`].filter(Boolean);return x.length?x.join(" · "):"binding pending"}function $x(p){var x;return(x=p.artifacts)!=null&&x.length?a.jsxDEV("ul",{className:"fleet-artifacts",children:p.artifacts.map(L=>a.jsxDEV("li",{children:[qx(L.uri)?a.jsxDEV("a",{href:L.uri,children:L.kind},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:279,columnNumber:41},this):a.jsxDEV("span",{children:L.kind},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:279,columnNumber:86},this),a.jsxDEV("small",{className:"block",children:[a.jsxDEV("code",{children:L.sha256.slice(0,12)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:280,columnNumber:32},this)," · ",L.uri]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:280,columnNumber:7},this)]},`${L.kind}:${L.uri}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:278,columnNumber:5},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:277,columnNumber:10},this):a.jsxDEV("span",{className:"muted",children:"No artifacts yet"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Missions.tsx",lineNumber:276,columnNumber:42},this)}function qx(p){try{return["http:","https:"].includes(new URL(p).protocol)}catch{return!1}}function Px(p){return p.reduce((x,L)=>{var j;return(L.status==="awaiting-approval"||L.status==="input-required"||((j=L.backpressure)==null?void 0:j.reason)==="approval")&&(x.awaiting+=1),L.terminal?x.terminal+=1:x.active+=1,x},{active:0,awaiting:0,terminal:0})}function J1(p){return p.replace(/[^a-z0-9_-]/gi,"-")}function Wx(p){return p.loop===void 0&&!p.max_iterations?"-":`${p.loop??0}/${p.max_iterations??"?"}`}function Fx(p){return p.transport==="uhp"?`UHP ${p.endpoint_profile??"profile unknown"} · ${p.protocol_version??"version unknown"}`:p.transport==="a2a"?`A2A${p.task_id?` ${Je(p.task_id)}`:""}`:p.ralph_loop_id?`Ralph ${Je(p.ralph_loop_id)}`:p.task_id&&p.instance_id?`${Je(p.instance_id)} / ${Je(p.task_id)}`:p.target_agent?Je(p.target_agent):"-"}function Gx(p,x=300){const[L,j]=Z.useState(p);return Z.useEffect(()=>{const q=setTimeout(()=>j(p),x);return()=>clearTimeout(q)},[p,x]),L}const Yx=["all","skill","agent","command","rule","flow","behavior","hook","template","tool","addon","framework","extension","plugin","provider","document"];function ap({onPick:p,autoFocus:x,compact:L,refreshTick:j=0}){const[q,ee]=Z.useState(""),[I,c]=Z.useState("all"),[b,g]=Z.useState(null),[N,f]=Z.useState(""),m=Gx(q,300),w=Z.useRef(null);return Z.useEffect(()=>{var C;x&&((C=w.current)==null||C.focus())},[x]),Z.useEffect(()=>{const C=y=>{var h;(y.ctrlKey||y.metaKey)&&y.key==="k"&&(y.preventDefault(),(h=w.current)==null||h.focus())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[]),Z.useEffect(()=>{const C=m.trim();if(!C){g(null);return}let y=!0;return Le(`/api/capabilities?q=${encodeURIComponent(C)}&type=${encodeURIComponent(I)}&limit=12`).then(h=>{y&&(g(h.results),f(""))}).catch(h=>{y&&f(h.message)}),()=>{y=!1}},[m,I,j]),a.jsxDEV("div",{children:[a.jsxDEV("div",{className:"controls",children:[a.jsxDEV("input",{ref:w,type:"search",value:q,onChange:C=>ee(C.target.value),placeholder:"Search capabilities… (Ctrl/⌘-K)","aria-label":"Search capabilities",style:{minWidth:L?220:300}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:45,columnNumber:9},this),a.jsxDEV("select",{value:I,onChange:C=>c(C.target.value),"aria-label":"Capability type filter",children:Yx.map(C=>a.jsxDEV("option",{value:C,children:C},C,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:48,columnNumber:29},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:44,columnNumber:7},this),N&&a.jsxDEV("p",{className:"err",children:N},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:51,columnNumber:15},this),b===null?a.jsxDEV("p",{className:"hint",children:"Type to search every indexed capability and artifact type."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:53,columnNumber:11},this):b.length?a.jsxDEV("div",{className:"capgrid",role:"listbox","aria-label":"Capability results",children:b.map(C=>{var y;return a.jsxDEV("button",{className:"capcard",role:"option","aria-selected":!1,onClick:()=>p(C),children:[a.jsxDEV("div",{className:"capcard-head",children:[a.jsxDEV("span",{className:"badge",children:C.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:61,columnNumber:21},this)," ",a.jsxDEV("strong",{children:C.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:61,columnNumber:61},this),a.jsxDEV("span",{className:"capcard-score",children:(C.score??0).toFixed(2)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:62,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:60,columnNumber:19},this),a.jsxDEV("div",{className:"capcard-cap",children:(C.capability||C.title||"").slice(0,110)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:64,columnNumber:19},this),(y=C.triggers)!=null&&y.length?a.jsxDEV("div",{className:"capcard-tags",children:C.triggers.slice(0,3).map(h=>a.jsxDEV("span",{className:"tag",children:h},h,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:66,columnNumber:88},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:66,columnNumber:23},this):null]},C.path,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:59,columnNumber:17},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:57,columnNumber:13},this):a.jsxDEV("p",{className:"empty",children:"No matches."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:55,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/CapabilitySearch.tsx",lineNumber:43,columnNumber:5},this)}const H1={needed:!1,prompt:"",since:null,source:"snapshot"};let ih={activeKey:null,entries:{}};const np=new Set;function ah(p,x){return`${p}:${x}`}function U1(p){return ah(p.instance_id,p.id)}function Xx(p){return np.add(p),()=>np.delete(p)}function rp(){return ih}function lp(){return Z.useSyncExternalStore(Xx,rp,rp)}function Qx(p){return Object.values(p.entries).filter(x=>x.responseNeeded.needed).map(x=>({id:`pty:${x.key}`,instance_id:x.instanceId,prompt:x.responseNeeded.prompt,source:x.responseNeeded.source,status:"response-needed",attach_url:x.metadata.attach_url}))}function Kx(p,x=new Date().toISOString()){p.length&&cp(L=>{const j={...L.entries};for(const q of p){const ee=U1(q),I=j[ee];j[ee]={key:ee,instanceId:q.instance_id,sessionId:q.id,metadata:{...(I==null?void 0:I.metadata)??{},...q},lastOutputAt:(I==null?void 0:I.lastOutputAt)??null,unread:(I==null?void 0:I.unread)??!1,responseNeeded:(I==null?void 0:I.responseNeeded)??H1,snapshot:(I==null?void 0:I.snapshot)??null,attached:(I==null?void 0:I.attached)??!1,updatedAt:x}}return{...L,entries:j}})}function tp(p,x,L=new Date().toISOString()){const j=p&&x?ah(p,x):null;cp(q=>{const ee={...q.entries};for(const[I,c]of Object.entries(ee))c.attached!==(I===j)&&(ee[I]={...c,attached:I===j,updatedAt:L});return{activeKey:j,entries:ee}})}function Zx(p,x,L=new Date().toISOString()){const j=ah(p,x);z1(j,q=>({...q,unread:!1,updatedAt:L}))}function eC(p,x,L,j={}){const q=ah(p,x),ee=j.now??new Date().toISOString();z1(q,I=>{var f;const c=((f=I.snapshot)==null?void 0:f.text)??"",b=L,g=b!==c,N=nC(b);return{...I,lastOutputAt:g?ee:I.lastOutputAt,unread:I.attached?!1:I.unread||g,responseNeeded:N?{needed:!0,prompt:N,since:I.responseNeeded.prompt===N?I.responseNeeded.since:ee,source:j.source??"snapshot"}:{...H1,source:j.source??"snapshot"},snapshot:{text:b,lines:iC(b),fetchedAt:ee,seq:j.seq},updatedAt:ee}})}function z1(p,x){cp(L=>{const j=L.entries[p];return j?{...L,entries:{...L.entries,[p]:x(j)}}:L})}function cp(p){const x=p(ih);x!==ih&&(ih=x,tC())}function tC(){for(const p of np)p()}function iC(p,x=24){return p.replace(/\r/g,`
305
- `).split(`
306
- `).filter(Boolean).slice(-x)}function sC(p){return p.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"").replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[()][A-Za-z0-9]/g,"")}function nC(p){const L=sC(p).replace(/\r/g,`
307
- `).split(`
308
- `).map(ee=>ee.trim()).filter(Boolean).slice(-24),j=L.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(ee=>ee.test(j))?L.slice(-10).join(`
310
- `).slice(0,900):""}function rC(p=12e3){lp();const x=Z.useRef(new Set);Z.useEffect(()=>{let L=!1,j;const q=(I=p)=>{j=window.setTimeout(ee,I)},ee=async()=>{if(L)return;if(document.hidden){q(p);return}const I=Object.values(rp().entries).filter(c=>!c.attached).filter(c=>c.metadata.has_screen!==!1).filter(c=>!x.current.has(`${c.instanceId}:${c.sessionId}`));await Promise.all(I.map(async c=>{const b=`${c.instanceId}:${c.sessionId}`;try{const g=await nh(`/api/instances/${encodeURIComponent(c.instanceId)}/sessions/${encodeURIComponent(c.sessionId)}/screen`);if(!g.ok){g.status===404&&x.current.add(b);return}const N=await g.json(),f=String(N.text??N.snapshot??N.screen??N.content??""),m=N.seq??N.sequence??N.anchor_sequence??N.anchorSequence;eC(c.instanceId,c.sessionId,f,{seq:typeof m=="number"?m:void 0})}catch{}})),L||q(p)};return q(0),()=>{L=!0,j!==void 0&&window.clearTimeout(j)}},[p])}function oC({session:p,composer:x,setComposer:L,onRequestStart:j,refreshMs:q=5e3,refreshTick:ee=0}){var Nt;const[I,c]=Z.useState([]),[b,g]=Z.useState([]),[N,f]=Z.useState(""),[m,w]=Z.useState(""),[C,y]=Z.useState(""),[h,u]=Z.useState(!1),[o,l]=Z.useState(""),[v,S]=Z.useState(""),[A,k]=Z.useState(""),[E,R]=Z.useState(""),[V,J]=Z.useState(""),$=Z.useRef(""),H=Z.useRef(!1),X=Z.useRef(""),ne=Z.useRef(0),ie=Z.useRef(0),re=Z.useRef(0),oe=Z.useRef(null),T=lp();rC(),Z.useEffect(()=>{$.current=N},[N]),Z.useEffect(()=>{H.current=p.state.attached},[p.state.attached]);const z=ve=>{var Ze;const Re=x&&!x.endsWith(" ")?" ":"";L(x+Re+k1(ve.type,ve.name)),u(!1),(Ze=oe.current)==null||Ze.focus()},B=Z.useCallback(async()=>{var ut;const ve=ne.current+1;ne.current=ve;const Re=await Le("/api/inventory");if(ve!==ne.current)return;const Ze=uC(Re.instances).filter(ct=>{var bt;return ct.state==="running"&&((bt=ct.session_backends)==null?void 0:bt.length)});c(Ze);const $e=$.current;let Ge=((ut=Ze[0])==null?void 0:ut.id)??"";($e&&Ze.some(ct=>ct.id===$e)||H.current&&$e)&&(Ge=$e),$.current=Ge,f(Ge),y(ct=>{const bt=Ze.find(Mt=>Mt.id===Ge)??Ze[0];if(ct&&(bt!=null&&bt.session_backends.some(Mt=>`${Mt.mode}:${Mt.backend}`===ct&&Mt.available!==!1))||H.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}`:""})},[]);Z.useEffect(()=>{X.current=E||_1(p.state.url)},[E,p.state.url]);const P=Z.useCallback(async ve=>{if(!ve)return;const Re=ie.current+1;ie.current=Re;const Ze=await Le(`/api/sessions?instance=${encodeURIComponent(ve)}`);if(Re!==ie.current||ve!==$.current)return;const $e=Ze.sessions??[];Kx($e),g($e),k(""),w(Ge=>Ge&&$e.some(ut=>cr(ut)===Ge)||H.current&&X.current===ve&&Ge?Ge:$e[0]?cr($e[0]):"")},[]);Z.useEffect(()=>{let ve=!1,Re,Ze=q;const $e=ut=>{Re=window.setTimeout(Ge,ut)},Ge=async()=>{if(!ve){if(o){$e(q);return}try{const ut=$.current;await B(),ut&&ut===$.current&&await P($.current),Ze=q}catch(ut){ve||k(ut.message),Ze=Math.min(Math.max(q,Ze*2),3e4)}ve||$e(Ze)}};return Ge(),()=>{ve=!0,Re!==void 0&&window.clearTimeout(Re)}},[o,P,B,q,ee]),Z.useEffect(()=>{N&&(g([]),k(""),P(N).catch(ve=>k(ve.message)))},[N,P]);const he=p.state.attached,fe=p.state.role==="controller"?"controller":"observer",ge=I.find(ve=>ve.id===N),xe=(ge==null?void 0:ge.session_backends)??[],Y=xe.find(ve=>`${ve.mode}:${ve.backend}`===C)??xe.find(ve=>ve.available!==!1)??xe[0],U=(Nt=xe.find(ve=>ve.available===!1))==null?void 0:Nt.reason,pe=ge?w1(ge):!1,le=b.find(ve=>cr(ve)===m),ce=E||_1(p.state.url),ye=ce&&V?`${ce}:${V}`:cC(p.state.url),be=p.state.target??(ce&&V?{instanceId:ce,sessionId:V}:null),Ie=he&&ce===N&&V&&!b.some(ve=>cr(ve)===ye)?[...b,{id:V,instance_id:N,attach_url:p.state.url??"",session_name:"attached session",session_backend:Y==null?void 0:Y.backend,session_class:Y==null?void 0:Y.mode}]:b,qe=()=>{p.sendInput(x,be)&&L("")},je=(ve,Re)=>{R(ve.instance_id||N),J(String(ve.id)),tp(ve.instance_id||N,String(ve.id)),p.attach(ve.attach_url,!1,Re,{instanceId:ve.instance_id||N,sessionId:String(ve.id)})},De=(ve,Re)=>{R(ve.instance_id||N),J(String(ve.id)),tp(ve.instance_id||N,String(ve.id)),p.replay(ve.attach_url,Re,{instanceId:ve.instance_id||N,sessionId:String(ve.id)})},Lt=()=>{R(""),J(""),tp(null,null),p.detach()};Z.useEffect(()=>{const ve=b.find(Re=>cr(Re)===m);ve&&Zx(ve.instance_id,String(ve.id))},[m,b]),Z.useEffect(()=>{if(!p.state.url||!ce||ce!==N)return;if(b.some(Re=>cr(Re)===ye)){re.current=0;return}b.length&&(re.current+=1,re.current>=2&&Lt())},[ye,ce,N,p.state.url,b]),Z.useEffect(()=>{if(!ge)return;if(!ge.session_backends.some(Re=>`${Re.mode}:${Re.backend}`===C)){const Re=ge.session_backends.find(Ze=>Ze.available)??ge.session_backends[0];y(Re?`${Re.mode}:${Re.backend}`:"")}},[C,ge]);const $i=async ve=>{const Re=ve??le;if(!ge||!Re)return;const Ze=Re.session_name??Re.id;if(confirm(`End session ${Ze}? This closes the PTY and detaches connected views.`)){l(Re.id),k("");try{await Le(`/api/instances/${encodeURIComponent(ge.id)}/sessions/${encodeURIComponent(Re.id)}`,{method:"DELETE"}),cr(Re)===ye&&Lt(),await P(ge.id)}catch($e){k($e.message)}finally{l("")}}},Ae=async()=>{if(ge){S(ge.id),k("");try{await Le(`/api/instances/${encodeURIComponent(ge.id)}/reconnect`,{method:"POST"}),await B(),await P(ge.id)}catch(ve){k(ve.message)}finally{S("")}}};return a.jsxDEV(a.Fragment,{children:[a.jsxDEV("p",{className:"hint",children:[a.jsxDEV("strong",{children:"Workspace."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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 ",a.jsxDEV("strong",{children:"Running"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:243,columnNumber:72},this)," fleet board."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:241,columnNumber:7},this),a.jsxDEV("div",{className:"session-workspace",children:[a.jsxDEV("aside",{className:"session-nav","aria-label":"Instances and sessions",children:[a.jsxDEV("div",{className:"session-nav-head",children:[a.jsxDEV("h2",{children:"Instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:249,columnNumber:13},this),a.jsxDEV("span",{className:"hint",children:I.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:250,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:248,columnNumber:11},this),!I.length&&a.jsxDEV("p",{className:"empty",children:"No running instances with session metadata."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:252,columnNumber:33},this),a.jsxDEV("ul",{className:"nav-list",children:I.map(ve=>{var $e;const Re=ve.id===N,Ze=(($e=ve.launch_context)==null?void 0:$e.name)??Je(ve.id);return a.jsxDEV("li",{className:`nav-instance${Re?" selected":""}`,children:[a.jsxDEV("button",{className:"nav-instance-row","aria-expanded":Re,onClick:()=>f(ve.id),title:ve.id,children:[a.jsxDEV("span",{className:`badge isolation-${ve.runtime_posture.isolation}`,children:ve.runtime},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:260,columnNumber:21},this),a.jsxDEV("span",{className:"nav-instance-name",children:Ze},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:261,columnNumber:21},this),a.jsxDEV("span",{className:`state ${ve.state}`,children:[a.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:262,columnNumber:58},this),ve.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:262,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:259,columnNumber:19},this),Re&&a.jsxDEV("div",{className:"nav-sessions",children:[Ie.length===0&&a.jsxDEV("p",{className:"empty nav-empty",children:w1(ve)?"Agent unreachable; reconnect to recover existing sessions.":"No sessions yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:267,columnNumber:25},this),a.jsxDEV("ul",{children:Ie.map(Ge=>{const ut=cr(Ge),ct=ut===m,bt=ut===ye&&he,wt=T.entries[U1(Ge)];return a.jsxDEV("li",{children:[a.jsxDEV("button",{className:`nav-session${ct?" selected":""}${bt?" live":""}`,onClick:()=>{const Mt=p.state.role==="controller"&&(Y==null?void 0:Y.drive)!==!1?"controller":"observer";w(ut),ut===ye&&he?De(Ge,Mt):je(Ge,Mt)},title:Ge.id,children:[a.jsxDEV("span",{className:"nav-session-name",children:ip(Ge)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:296,columnNumber:33},this),a.jsxDEV("span",{className:"nav-session-meta",children:aC(Ge)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:297,columnNumber:33},this),lC(Ge)&&a.jsxDEV("span",{className:"badge controller",title:"A controller is connected",children:"ctrl"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:298,columnNumber:63},this),(wt==null?void 0:wt.unread)&&a.jsxDEV("span",{className:"badge unread",title:"Unread output",children:"unread"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:299,columnNumber:59},this),(wt==null?void 0:wt.responseNeeded.needed)&&a.jsxDEV("span",{className:"badge response",title:"Response needed",children:"response"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:300,columnNumber:74},this),bt&&a.jsxDEV("span",{className:"badge live-dot",title:"Attached here",children:"●"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:301,columnNumber:42},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:279,columnNumber:31},this),a.jsxDEV("button",{className:"nav-session-end","aria-label":`End session ${ip(Ge)}`,title:"End this PTY session",disabled:o===Ge.id,onClick:()=>$i(Ge),children:o===Ge.id?"…":"×"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:303,columnNumber:31},this)]},Ge.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:278,columnNumber:29},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:271,columnNumber:23},this),a.jsxDEV("button",{className:"cta-sm nav-new-session",disabled:xe.length>0&&(Y==null?void 0:Y.available)===!1,onClick:()=>j(ve.id),children:"+ New session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:316,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:265,columnNumber:21},this)]},ve.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:258,columnNumber:17},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:253,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:247,columnNumber:9},this),a.jsxDEV("section",{className:"session-main",children:[a.jsxDEV("div",{className:"controls",children:[xe.length>1&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("label",{htmlFor:"sel-backend",children:"Mode"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:329,columnNumber:17},this),a.jsxDEV("select",{id:"sel-backend",value:C,onChange:ve=>y(ve.target.value),children:xe.map(ve=>a.jsxDEV("option",{value:`${ve.mode}:${ve.backend}`,disabled:!ve.available,children:[ve.mode," · ",ve.backend,ve.available?"":` — ${ve.reason??"unsupported"}`]},`${ve.mode}:${ve.backend}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:331,columnNumber:40},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:330,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:328,columnNumber:15},this),a.jsxDEV("span",{className:"controls-active",title:le==null?void 0:le.id,children:le?ip(le):"— no session selected —"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:335,columnNumber:13},this),a.jsxDEV("button",{disabled:!le||he&&p.state.role==="observer",onClick:()=>le&&je(le,"observer"),children:"Observe"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:336,columnNumber:13},this),a.jsxDEV("button",{disabled:!le||(Y==null?void 0:Y.drive)===!1||he&&p.state.role==="controller",onClick:()=>le&&je(le,"controller"),children:he&&p.state.role==="observer"?"Take Control":"Drive"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:337,columnNumber:13},this),a.jsxDEV("button",{disabled:!he||(Y==null?void 0:Y.keyframe)===!1,onClick:p.requestKeyframe,children:"Keyframe"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:340,columnNumber:13},this),a.jsxDEV("button",{disabled:!he,onClick:()=>le&&De(le,fe),children:"Reattach + replay"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:341,columnNumber:13},this),a.jsxDEV("button",{disabled:!he,onClick:Lt,children:"Detach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:342,columnNumber:13},this),pe&&a.jsxDEV("button",{disabled:v===(ge==null?void 0:ge.id),onClick:Ae,children:v===(ge==null?void 0:ge.id)?"Reconnecting…":"Reconnect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:344,columnNumber:15},this),p.state.role&&a.jsxDEV("span",{className:`badge ${p.state.role}`,children:p.state.role},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:348,columnNumber:36},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:326,columnNumber:11},this),A&&a.jsxDEV("p",{className:"err",children:["Session action failed: ",A]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:350,columnNumber:26},this),ge&&a.jsxDEV("p",{className:"hint",children:[ge.runtime_posture.label," · ",ge.transport.label," (",ge.transport.mode,") · attach starts as observe unless control is explicitly granted.",he&&p.state.role==="observer"?" Click Take Control to re-attach with write access.":"",Y&&!Y.available?` ${Y.reason??"Selected backend is unavailable."}`:"",pe?` Agent is unreachable while the runtime is still running. ${U??"Reconnect can re-register the agent without restarting the instance."}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:352,columnNumber:13},this),a.jsxDEV("div",{className:"terminal",ref:p.openTerminal,role:"log","aria-label":"Session output"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:359,columnNumber:11},this),h&&a.jsxDEV("div",{className:"picker",children:[a.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-v2VJA1/web/src/components/Sessions.tsx",lineNumber:362,columnNumber:15},this),a.jsxDEV(ap,{compact:!0,autoFocus:!0,onPick:z},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:363,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:361,columnNumber:13},this),a.jsxDEV("div",{className:"inputrow",children:[a.jsxDEV("button",{"aria-label":"Insert a capability",title:"Insert a capability (search)",onClick:()=>u(ve=>!ve),children:"+"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:367,columnNumber:13},this),a.jsxDEV("input",{ref:oe,value:x,onChange:ve=>L(ve.target.value),onKeyDown:ve=>{ve.key==="Enter"&&qe()},placeholder:p.isController?"Type to drive the session…":"Observing — input is read-only",disabled:!p.isController,"aria-label":"Session input"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:368,columnNumber:13},this),a.jsxDEV("button",{disabled:!p.isController,onClick:qe,children:"Send"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:377,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:366,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:325,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:245,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Sessions.tsx",lineNumber:240,columnNumber:5},this)}function ip(p){return p.session_name??Je(p.id)}function aC(p){const x=`${p.session_class??"managed"}/${p.session_backend??"tmux"}`;if(!p.membership)return x;const L=p.membership.attachment_count;return`${x} · ${L} viewer${L===1?"":"s"}`}function lC(p){var x;return(((x=p.membership)==null?void 0:x.controllers.length)??0)>0}function cr(p){return`${p.instance_id}:${p.id}`}function cC(p){const x=I1(p);return x?`${x.instanceId}:${x.sessionId}`:""}function I1(p){if(!p)return null;const x=/\/agents\/([^/]+)\/sessions\/([^/]+)\/attach/;try{const j=new URL(p).pathname.match(x);return j?{instanceId:decodeURIComponent(j[1]),sessionId:decodeURIComponent(j[2])}:null}catch{const L=p.match(x);return L?{instanceId:decodeURIComponent(L[1]),sessionId:decodeURIComponent(L[2])}:null}}function _1(p){var x;return((x=I1(p))==null?void 0:x.instanceId)??""}function uC(p){const x=new Set;return p.filter(L=>x.has(L.id)?!1:(x.add(L.id),!0))}const hC=["docker","container","vm","qemu","kvm"];function w1(p){var q,ee;const x=String(((q=p.runtime_posture)==null?void 0:q.kind)??p.runtime).toLowerCase(),L=String(p.state).toLowerCase()==="running",j=p.agent_ready===!1||((ee=p.session_backends)==null?void 0:ee.some(I=>I.available===!1));return L&&hC.includes(x)&&!!j}const sp="Display transport is not available in this build",dC={loading:"loading",not_ready:"not ready",unavailable:"unavailable",idle:"ready",live:"live",reconnecting:"reconnecting",disconnected:"disconnected",expired:"expired",denied:"denied","guest-ended":"guest ended",failed:"failed",stale:"stale",handoff_waiting:"handoff waiting",closing:"closing"},fC=[["observe","Observe"],["control","Control"],["sharing","Sharing"],["clipboard_copy","Clipboard copy"],["clipboard_paste","Clipboard paste"],["file_transfer","File transfer"],["audio","Audio"],["recording","Recording"],["isolation_tier","Isolation tier"],["generation","Policy generation"]];function mC(p){return typeof p=="boolean"?p?"granted":"not granted":String(p)}function pC({instanceId:p,onBack:x,pollMs:L,backoffMs:j}){const{state:q,connect:ee,disconnect:I,reconnect:c,close:b,retry:g}=Sx(p,L,j),{status:N,reason:f,capability:m,session:w,cleanup:C}=q,y=(w==null?void 0:w.policy)??(m==null?void 0:m.policy)??null,h=L1(m),o=w!==null&&!["guest-ended","expired","stale","denied","failed"].includes(N)&&(w==null?void 0:w.state)!=="closed";return a.jsxDEV("section",{className:"card desktop-panel","aria-label":`Desktop for ${Je(p)}`,children:[a.jsxDEV("div",{className:"section-toolbar",children:[a.jsxDEV("div",{children:[a.jsxDEV("h2",{children:["Desktop ",a.jsxDEV("code",{title:p,children:Je(p)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:38,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:38,columnNumber:11},this),a.jsxDEV("p",{className:"hint",children:["Guest desktop session managed through the Bridge control API. ",sp,"."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:37,columnNumber:9},this),a.jsxDEV("button",{onClick:x,"aria-label":"Back to inventory",children:"Back"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:41,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:36,columnNumber:7},this),a.jsxDEV("p",{role:"status",className:"desktop-status",children:[a.jsxDEV("span",{className:`badge desktop-${N}`,children:dC[N]},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:45,columnNumber:9},this)," ",gx[N],f?` ${f}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:44,columnNumber:7},this),w&&a.jsxDEV("dl",{className:"desktop-session",children:[a.jsxDEV("dt",{children:"Session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:51,columnNumber:11},this),a.jsxDEV("dd",{children:a.jsxDEV("code",{title:w.id,children:Je(w.id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:51,columnNumber:31},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:51,columnNumber:27},this),a.jsxDEV("dt",{children:"Guest state"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:52,columnNumber:11},this),a.jsxDEV("dd",{children:w.state},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:52,columnNumber:31},this),a.jsxDEV("dt",{children:"Cleanup"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:53,columnNumber:11},this),a.jsxDEV("dd",{className:`desktop-cleanup-${C??"none"}`,children:C??"none"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:53,columnNumber:27},this),a.jsxDEV("dt",{children:"VM incarnation"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:54,columnNumber:11},this),a.jsxDEV("dd",{children:a.jsxDEV("code",{children:w.incarnation},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:54,columnNumber:38},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:54,columnNumber:34},this),a.jsxDEV("dt",{children:"Expires"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:55,columnNumber:11},this),a.jsxDEV("dd",{children:new Date(w.absolute_expires_at).toLocaleString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:55,columnNumber:27},this),w.retained_until&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("dt",{children:"Retained until"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:56,columnNumber:40},this),a.jsxDEV("dd",{children:new Date(w.retained_until).toLocaleString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:56,columnNumber:63},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:56,columnNumber:38},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:50,columnNumber:9},this),y&&a.jsxDEV("div",{className:"desktop-policy",children:[a.jsxDEV("h3",{children:"Effective capabilities (from backend)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:62,columnNumber:11},this),a.jsxDEV("ul",{children:fC.map(([l,v])=>a.jsxDEV("li",{children:[a.jsxDEV("span",{className:"muted",children:[v,":"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:65,columnNumber:29},this)," ",mC(y[l])]},l,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:65,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:63,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:61,columnNumber:9},this),a.jsxDEV("div",{className:"controls desktop-actions",children:[N==="not_ready"&&a.jsxDEV("button",{onClick:()=>{g()},children:"Retry"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:72,columnNumber:36},this),N==="idle"&&a.jsxDEV("button",{className:"cta",disabled:!h,title:h?void 0:"Backend grants neither observe nor control for this instance",onClick:()=>{ee()},children:"Connect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:74,columnNumber:11},this),(y==null?void 0:y.observe)&&a.jsxDEV("button",{disabled:!0,title:sp,"aria-label":"Observe (unavailable)",children:"Observe"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:84,columnNumber:11},this),(y==null?void 0:y.control)&&a.jsxDEV("button",{disabled:!0,title:sp,"aria-label":"Take control (unavailable)",children:"Take Control"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:87,columnNumber:11},this),o&&(N==="live"||N==="reconnecting"||N==="handoff_waiting"||N==="loading")&&a.jsxDEV("button",{onClick:I,title:"Stop following this session; the guest desktop keeps running.",children:"Disconnect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:90,columnNumber:11},this),o&&N==="disconnected"&&a.jsxDEV("button",{onClick:c,children:"Reconnect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:93,columnNumber:11},this),o&&N!=="closing"&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("button",{onClick:()=>{b("revoke_access")},title:"Remove your access to this desktop; the guest session is retained.",children:"Revoke access"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:97,columnNumber:13},this),a.jsxDEV("button",{onClick:()=>{window.confirm("Sign the guest out? This ends the guest desktop session and its unsaved work.")&&b("sign_out")},title:"End the guest session; distinct from disconnecting or revoking access.",children:"Sign out guest"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:98,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:96,columnNumber:11},this),N==="stale"&&a.jsxDEV("button",{onClick:()=>{g()},children:"Refresh"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:106,columnNumber:32},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:71,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Desktop.tsx",lineNumber:35,columnNumber:5},this)}function bC({refreshTick:p=0,responses:x=[],goSessions:L}){const[j,q]=Z.useState(null),[ee,I]=Z.useState(""),c=Z.useCallback(()=>{Le("/api/approvals?status=pending").then(g=>{q(g.approvals),I("")}).catch(g=>I(g.message))},[]);Z.useEffect(()=>{c()},[c,p]);const b=(g,N)=>Le(`/api/approvals/${encodeURIComponent(g)}?decision=${N}`,{method:"POST"}).then(c).catch(f=>alert(f.message));return a.jsxDEV(a.Fragment,{children:[a.jsxDEV("p",{className:"hint",children:["Unified response-needed inbox — formal ",a.jsxDEV("code",{children:"hitl-prompt/v1"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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-v2VJA1/web/src/components/Approvals.tsx",lineNumber:22,columnNumber:7},this),ee&&a.jsxDEV("p",{className:"err",children:ee},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:23,columnNumber:15},this),x.length>0&&a.jsxDEV("section",{className:"response-needed","aria-label":"Sessions waiting for response",children:[a.jsxDEV("h2",{children:"Response Needed"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:26,columnNumber:11},this),x.map(g=>a.jsxDEV("article",{className:"response-item",children:[a.jsxDEV("div",{children:[a.jsxDEV("strong",{children:g.source==="pty"?"Interactive session prompt":g.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:30,columnNumber:17},this),a.jsxDEV("p",{children:g.prompt},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:31,columnNumber:17},this),a.jsxDEV("span",{children:[a.jsxDEV("code",{children:Je(g.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:32,columnNumber:23},this)," · ",g.status]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:32,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:29,columnNumber:15},this),L&&a.jsxDEV("button",{onClick:L,children:"Open Session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:34,columnNumber:30},this)]},g.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:28,columnNumber:13},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:25,columnNumber:9},this),j?!j.length&&!x.length?a.jsxDEV("p",{className:"empty",children:"No pending approvals or responses."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:40,columnNumber:48},this):j.length?a.jsxDEV("table",{children:[a.jsxDEV("caption",{children:[j.length," approval request(s) awaiting your decision"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:43,columnNumber:15},this),a.jsxDEV("thead",{children:a.jsxDEV("tr",{children:[a.jsxDEV("th",{scope:"col",children:"Request"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:26},this),a.jsxDEV("th",{scope:"col",children:"Risk"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:54},this),a.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:79},this),a.jsxDEV("th",{scope:"col",children:"Decision"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:108},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:22},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:15},this),a.jsxDEV("tbody",{children:j.map(g=>a.jsxDEV("tr",{children:[a.jsxDEV("td",{children:g.prompt},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:48,columnNumber:21},this),a.jsxDEV("td",{children:a.jsxDEV("span",{className:`badge ${g.risk==="high"?"high":""}`,children:g.risk},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:49,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:49,columnNumber:21},this),a.jsxDEV("td",{children:a.jsxDEV("code",{title:g.instance_id,children:Je(g.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:50,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:50,columnNumber:21},this),a.jsxDEV("td",{style:{whiteSpace:"nowrap"},children:[a.jsxDEV("button",{onClick:()=>b(g.id,"approve"),children:"Approve"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:52,columnNumber:23},this)," ",a.jsxDEV("button",{onClick:()=>b(g.id,"deny"),children:"Deny"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:53,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:51,columnNumber:21},this)]},g.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:47,columnNumber:19},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:45,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:42,columnNumber:13},this):null:a.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:39,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Approvals.tsx",lineNumber:21,columnNumber:5},this)}function vC({refreshTick:p=0}){const[x,L]=Z.useState(null),[j,q]=Z.useState(null),[ee,I]=Z.useState("requirements"),[c,b]=Z.useState(null),[g,N]=Z.useState(""),[f,m]=Z.useState("docs"),[w,C]=Z.useState(""),[y,h]=Z.useState(""),[u,o]=Z.useState(!1),l=()=>{Le("/api/index/status").then(V=>{q(V),o(!1),h("")}).catch(V=>{h(V.message),o(!0)})};Z.useEffect(()=>{l()},[p]);const v=V=>{L(null),h("");const J=`type=${encodeURIComponent(V.type)}&name=${encodeURIComponent(V.name)}&path=${encodeURIComponent(V.path)}`;Le(`/api/show?${J}`).then(L).catch($=>h($.message))},S=async()=>{const V=ee.trim();if(V){C("query"),h("");try{b(await Le(`/api/index/query?q=${encodeURIComponent(V)}&limit=8`))}catch(J){h(J.message)}finally{C("")}}},A=async()=>{C("rebuild"),h("");try{const V=await Le("/api/index/rebuild",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({all:!0})});q(V.status),b(null)}catch(V){h(V.message)}finally{C("")}},k=async()=>{if(!(!g.trim()||!f.trim())){C("create"),h("");try{await Le("/api/index/graphs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:g.trim(),scanDirs:f.split(",").map(V=>V.trim()).filter(Boolean)})}),N(""),l()}catch(V){h(V.message)}finally{C("")}}},E=(j==null?void 0:j.graphs)??[],R=(c==null?void 0:c.results)??[];return a.jsxDEV(a.Fragment,{children:[a.jsxDEV("p",{className:"hint",children:["Read-only catalog from the AIWG registry — display, not execution. To ",a.jsxDEV("em",{children:"run"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:93,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-v2VJA1/web/src/components/Explore.tsx",lineNumber:92,columnNumber:7},this),y&&a.jsxDEV("p",{className:"err",children:[y,j?" — showing last-known index state.":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:96,columnNumber:15},this),a.jsxDEV("section",{className:"index-live","aria-label":"Live index status",children:[a.jsxDEV("div",{className:"section-toolbar",children:[a.jsxDEV("div",{children:[a.jsxDEV("h2",{children:"Live Index"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:100,columnNumber:13},this),a.jsxDEV("p",{className:"hint",children:[j?`${j.summary.built}/${j.summary.total} graphs built, ${j.summary.missing} missing, ${j.summary.orphans} orphan dirs.`:"Loading index status.",u&&j?" Stale: live refresh is temporarily unavailable.":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:99,columnNumber:11},this),a.jsxDEV("div",{className:"manage-actions",children:[a.jsxDEV("button",{onClick:l,disabled:w==="rebuild",children:"Refresh"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:109,columnNumber:13},this),a.jsxDEV("button",{onClick:A,disabled:w==="rebuild",children:w==="rebuild"?"Rebuilding...":"Rebuild all"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:110,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:108,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:98,columnNumber:9},this),a.jsxDEV("div",{className:"index-grid",children:E.map(V=>a.jsxDEV("article",{className:V.missing?"index-graph missing":"index-graph",children:[a.jsxDEV("div",{children:[a.jsxDEV("strong",{children:V.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:116,columnNumber:20},this)," ",a.jsxDEV("span",{className:"badge",children:V.origin},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:116,columnNumber:46},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:116,columnNumber:15},this),a.jsxDEV("p",{children:[V.built?`${V.entries??0} entries`:"not built",V.ageHours!==null?` · ${V.ageHours}h old`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:117,columnNumber:15},this)]},V.name,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:115,columnNumber:13},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:113,columnNumber:9},this),a.jsxDEV("div",{className:"index-query",children:[a.jsxDEV("label",{children:["Index query",a.jsxDEV("input",{value:ee,onChange:V=>I(V.target.value),onKeyDown:V=>{V.key==="Enter"&&S()}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:124,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:122,columnNumber:11},this),a.jsxDEV("button",{onClick:S,disabled:w==="query",children:w==="query"?"Searching...":"Search index"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:126,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:121,columnNumber:9},this),a.jsxDEV("div",{className:"index-query","aria-label":"Create user index graph",children:[a.jsxDEV("label",{children:["New graph name",a.jsxDEV("input",{value:g,onChange:V=>N(V.target.value),placeholder:"references"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:131,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:129,columnNumber:11},this),a.jsxDEV("label",{children:["Scan directories (comma-separated)",a.jsxDEV("input",{value:f,onChange:V=>m(V.target.value),placeholder:"docs,research"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:135,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:133,columnNumber:11},this),a.jsxDEV("button",{onClick:k,disabled:w==="create"||!g.trim(),children:w==="create"?"Creating...":"Create graph"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:137,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:128,columnNumber:9},this),c&&a.jsxDEV("div",{className:"index-results","aria-label":"Index query results",children:R.length?R.map(V=>a.jsxDEV("article",{children:[a.jsxDEV("strong",{children:V.title||V.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:144,columnNumber:19},this),a.jsxDEV("p",{children:V.summary||V.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:145,columnNumber:19},this),a.jsxDEV("small",{children:[V.type||"artifact",V.phase?` · ${V.phase}`:"",typeof V.score=="number"?` · ${V.score.toFixed(2)}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:146,columnNumber:19},this)]},V.path,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:143,columnNumber:17},this)):a.jsxDEV("p",{className:"empty",children:"No index hits."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:149,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:140,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:97,columnNumber:7},this),a.jsxDEV("div",{className:"grid2",children:[a.jsxDEV(ap,{onPick:v,autoFocus:!0,refreshTick:p},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:154,columnNumber:9},this),a.jsxDEV("div",{role:"region","aria-label":"Capability detail",children:x?a.jsxDEV(a.Fragment,{children:[a.jsxDEV("div",{style:{marginBottom:8},children:[a.jsxDEV("span",{className:"badge",children:x.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:160,columnNumber:50},this)," ",a.jsxDEV("strong",{children:x.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:160,columnNumber:93},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:160,columnNumber:17},this),a.jsxDEV("div",{className:"terminal",style:{maxHeight:"52vh"},children:x.body},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:161,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:159,columnNumber:15},this):a.jsxDEV("p",{className:"empty",children:"Select a capability to inspect its definition."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:157,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:155,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:153,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Explore.tsx",lineNumber:91,columnNumber:5},this)}function gC({session:p,setComposer:x,goSessions:L}){const[j,q]=Z.useState(null),[ee,I]=Z.useState(!1),[c,b]=Z.useState(""),g=Z.useCallback(()=>{Le("/api/library").then(w=>{q(w.library),b("")}).catch(w=>b(w.message))},[]);Z.useEffect(()=>{g()},[g]);const N=async w=>{try{await Le(`/api/library/clone?type=${encodeURIComponent(w.type)}&name=${encodeURIComponent(w.name)}&path=${encodeURIComponent(w.path)}`,{method:"POST"}),I(!1),g()}catch(C){b(C.message)}},f=w=>{confirm(`Remove "${w.name}" from your library? (Your copy only — AIWG is untouched.)`)&&Le(`/api/library/${encodeURIComponent(w.name)}`,{method:"DELETE"}).then(g).catch(C=>alert(C.message))},m=w=>{const C=k1(w.type,w.name.replace(/\.(md|markdown|ya?ml|json)$/i,""));p.isController&&p.state.target&&p.sendInput(C,p.state.target)||x(C),L()};return a.jsxDEV(a.Fragment,{children:[a.jsxDEV("p",{className:"hint",children:["Your ",a.jsxDEV("strong",{children:"own"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:39,columnNumber:14},this)," assets — copied, cloned, or imported. Edit them freely; ",a.jsxDEV("strong",{children:"AIWG install files are never touched"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:39,columnNumber:91},this),". Stored on disk under ",a.jsxDEV("code",{children:"~/.aiwg/cockpit/library"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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-v2VJA1/web/src/components/Library.tsx",lineNumber:38,columnNumber:7},this),c&&a.jsxDEV("p",{className:"err",children:c},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:43,columnNumber:15},this),a.jsxDEV("div",{className:"controls",children:a.jsxDEV("button",{onClick:()=>I(w=>!w),children:ee?"Close":"+ Clone from catalog"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:45,columnNumber:9},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:44,columnNumber:7},this),ee&&a.jsxDEV("div",{className:"picker",children:[a.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-v2VJA1/web/src/components/Library.tsx",lineNumber:49,columnNumber:11},this),a.jsxDEV(ap,{compact:!0,autoFocus:!0,onPick:N},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:48,columnNumber:9},this),j?j.length?a.jsxDEV("table",{children:[a.jsxDEV("caption",{children:[j.length," asset(s) in your library"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:57,columnNumber:15},this),a.jsxDEV("thead",{children:a.jsxDEV("tr",{children:[a.jsxDEV("th",{scope:"col",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:58,columnNumber:26},this),a.jsxDEV("th",{scope:"col",children:"Type"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:58,columnNumber:51},this),a.jsxDEV("th",{scope:"col",children:"Origin"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:58,columnNumber:76},this),a.jsxDEV("th",{scope:"col",children:"Actions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:58,columnNumber:103},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:58,columnNumber:22},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:58,columnNumber:15},this),a.jsxDEV("tbody",{children:j.map(w=>a.jsxDEV("tr",{children:[a.jsxDEV("td",{children:a.jsxDEV("strong",{children:w.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:62,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:62,columnNumber:21},this),a.jsxDEV("td",{children:a.jsxDEV("span",{className:"badge",children:w.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:63,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:63,columnNumber:21},this),a.jsxDEV("td",{children:w.origin},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:64,columnNumber:21},this),a.jsxDEV("td",{style:{whiteSpace:"nowrap"},children:[a.jsxDEV("button",{onClick:()=>m(w),children:"Use"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:66,columnNumber:23},this)," ",a.jsxDEV("button",{onClick:()=>f(w),"aria-label":`Remove ${w.name}`,children:"Remove"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:67,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:65,columnNumber:21},this)]},w.name,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:61,columnNumber:19},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:59,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:56,columnNumber:13},this):a.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-v2VJA1/web/src/components/Library.tsx",lineNumber:54,columnNumber:27},this):a.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:53,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Library.tsx",lineNumber:37,columnNumber:5},this)}function _C({refreshTick:p=0,session:x,setComposer:L,goSessions:j}){const[q,ee]=Z.useState([]),[I,c]=Z.useState([]),[b,g]=Z.useState([]),[N,f]=Z.useState(""),[m,w]=Z.useState("");Z.useEffect(()=>{Le("/api/contributions").then(o=>{ee(o.actions??[]),c(o.screens??[]),g(o.workflows??[])}).catch(o=>f(o.message))},[p]);const C=async o=>{let l=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()&&(l+=" "+v.trim())}await Le("/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:l,controller_attached:x.isController}})}).catch(()=>{}),x.isController&&x.state.target&&x.sendInput(l,x.state.target)?w(`Injected "${l}" into the attached session — the agent runs it.`):(L(l),w(`Ready to inject "${l}". Attach to a session (drive) or start one, then Send.`)),j()},y=async o=>{var l;await((l=navigator.clipboard)==null?void 0:l.writeText(o.inject.command)),w(`Copied "${o.inject.command}" to the clipboard.`)},h=new Map(q.map(o=>[o.id,o])),u=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 a.jsxDEV(a.Fragment,{children:[a.jsxDEV("p",{className:"hint",children:["Actions are ",a.jsxDEV("strong",{children:"contributed declaratively"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:73,columnNumber:21},this),". Clicking one ",a.jsxDEV("strong",{children:"injects a command into an agentic session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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-v2VJA1/web/src/components/Actions.tsx",lineNumber:72,columnNumber:7},this),N&&a.jsxDEV("p",{className:"err",children:N},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:76,columnNumber:15},this),a.jsxDEV("div",{className:"controls",role:"group","aria-label":"Contributed actions",children:q.length?q.map(o=>a.jsxDEV("span",{className:"action-cluster",children:[a.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-v2VJA1/web/src/components/Actions.tsx",lineNumber:81,columnNumber:15},this),o.trust_tier==="sandboxed-third-party"&&a.jsxDEV("span",{className:"badge",children:"sandboxed"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:84,columnNumber:60},this),a.jsxDEV("button",{className:"copy-command","aria-label":`Copy CLI command for ${o.title}`,title:o.inject.command,onClick:()=>y(o),children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:85,columnNumber:15},this)]},o.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:80,columnNumber:13},this)):a.jsxDEV("p",{className:"empty",children:"No contributed actions."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:90,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:77,columnNumber:7},this),a.jsxDEV("div",{className:"contrib-layout",children:[a.jsxDEV("section",{"aria-label":"Contributed screens",children:[a.jsxDEV("div",{className:"section-toolbar",children:a.jsxDEV("h2",{children:"Screens"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:95,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:94,columnNumber:11},this),a.jsxDEV("div",{className:"contrib-grid",children:I.length?I.map(o=>a.jsxDEV("article",{className:"contrib-item",children:[a.jsxDEV("strong",{children:o.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:101,columnNumber:19},this),a.jsxDEV("p",{children:o.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:102,columnNumber:19},this),a.jsxDEV("button",{onClick:()=>u(o),children:"Open"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:103,columnNumber:19},this)]},o.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:100,columnNumber:17},this)):a.jsxDEV("p",{className:"empty",children:"No contributed screens."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:106,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:97,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:93,columnNumber:9},this),a.jsxDEV("section",{"aria-label":"Contributed workflows",children:[a.jsxDEV("div",{className:"section-toolbar",children:a.jsxDEV("h2",{children:"Workflows"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:111,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:110,columnNumber:11},this),a.jsxDEV("div",{className:"contrib-grid",children:b.length?b.map(o=>a.jsxDEV("article",{className:"contrib-item",children:[a.jsxDEV("strong",{children:o.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:117,columnNumber:19},this),o.description&&a.jsxDEV("p",{children:o.description},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:118,columnNumber:37},this),a.jsxDEV("div",{className:"workflow-steps",children:o.steps.map((l,v)=>{const S=h.get(l.action);return a.jsxDEV("button",{disabled:!S,onClick:()=>S&&C(S),children:l.label||(S==null?void 0:S.title)||l.action},`${o.id}-${v}-${l.action}`,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:123,columnNumber:25},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:119,columnNumber:19},this)]},o.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:116,columnNumber:17},this)):a.jsxDEV("p",{className:"empty",children:"No contributed workflows."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:131,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:113,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:109,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:92,columnNumber:7},this),a.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-v2VJA1/web/src/components/Actions.tsx",lineNumber:135,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Actions.tsx",lineNumber:71,columnNumber:5},this)}function wC({refreshTick:p=0}){const[x,L]=Z.useState(null),[j,q]=Z.useState(null),[ee,I]=Z.useState(null),[c,b]=Z.useState(null),[g,N]=Z.useState("all"),[f,m]=Z.useState(""),w=Z.useCallback(()=>{Promise.all([Le("/api/events/snapshot"),Le("/api/missions").catch(()=>null),Le("/api/cost").catch(()=>null),Le("/api/mcp/discovery").catch(()=>null)]).then(([u,o,l,v])=>{L(u),q(o),I(l),b(v),m("")}).catch(u=>m(u.message))},[]);if(Z.useEffect(()=>{w()},[w,p]),f)return a.jsxDEV("p",{className:"err",children:["Could not load telemetry: ",f]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:33,columnNumber:19},this);if(!x)return a.jsxDEV("p",{className:"empty",children:"Loading..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:34,columnNumber:23},this);const C=g==="all"?x.events:x.events.filter(u=>u.type.startsWith(g)),y=yC(j),h=ee?ee.total.input_tokens+ee.total.output_tokens:0;return a.jsxDEV(a.Fragment,{children:[a.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-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:42,columnNumber:7},this),a.jsxDEV("section",{className:"telemetry-kpis","aria-label":"Telemetry key performance indicators",children:[a.jsxDEV("article",{children:[a.jsxDEV("span",{children:"Events"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:18},this),a.jsxDEV("strong",{children:x.count},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:37},this),a.jsxDEV("small",{children:x.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:68},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:9},this),a.jsxDEV("article",{children:[a.jsxDEV("span",{children:"Active Missions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:18},this),a.jsxDEV("strong",{children:y.active},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:46},this),a.jsxDEV("small",{children:[y.terminal," terminal"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:85},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:9},this),a.jsxDEV("article",{children:[a.jsxDEV("span",{children:"Approvals"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:18},this),a.jsxDEV("strong",{children:y.awaiting},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:40},this),a.jsxDEV("small",{children:"awaiting operator input"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:81},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:9},this),a.jsxDEV("article",{children:[a.jsxDEV("span",{children:"Spend"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:18},this),a.jsxDEV("strong",{children:ee?`$${ee.total.usd.toFixed(2)}`:"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:36},this),a.jsxDEV("small",{children:h?`${h.toLocaleString()} tokens`:"cost route unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:99},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:9},this),a.jsxDEV("article",{children:[a.jsxDEV("span",{children:"MCP"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:18},this),a.jsxDEV("strong",{children:(c==null?void 0:c.status)??"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:34},this),a.jsxDEV("small",{children:c?`${c.tools.length} tools · ${c.auth.scopes.length} scopes`:"discovery unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:71},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:46,columnNumber:7},this),c&&a.jsxDEV("section",{className:"audit-tail","aria-label":"MCP management posture",children:[a.jsxDEV("h3",{children:"MCP Management"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:56,columnNumber:11},this),a.jsxDEV("p",{children:[a.jsxDEV("strong",{children:c.endpoint.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:57,columnNumber:14},this)," · ",c.endpoint.transport," · ",c.endpoint.stateless?"stateless":"stateful"," · session id ",c.endpoint.mcp_session_id?"expected":"not expected"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:57,columnNumber:11},this),a.jsxDEV("p",{children:[c.auth.principals.length," principal(s): ",c.auth.principals.map(u=>u.client_id).join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:58,columnNumber:11},this),a.jsxDEV("p",{children:["Tools: ",c.tools.map(u=>u.name).join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:59,columnNumber:11},this),a.jsxDEV("p",{children:["Resources: ",[...c.resources.map(u=>u.uri),...c.resource_templates.map(u=>u.uriTemplate)].join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:60,columnNumber:11},this),c.reason_code&&a.jsxDEV("p",{children:c.reason_code},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:61,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:55,columnNumber:9},this),a.jsxDEV("div",{className:"controls",role:"group","aria-label":"Filter telemetry events",children:["all","mission","task","approval","session","inventory"].map(u=>a.jsxDEV("button",{"aria-pressed":g===u,onClick:()=>N(u),children:u},u,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:67,columnNumber:11},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:65,columnNumber:7},this),C.length?a.jsxDEV("table",{children:[a.jsxDEV("caption",{children:[C.length," event(s), fetched ",new Date(x.fetched_at).toLocaleTimeString()]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:73,columnNumber:11},this),a.jsxDEV("thead",{children:a.jsxDEV("tr",{children:[a.jsxDEV("th",{scope:"col",children:"Time"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:22},this),a.jsxDEV("th",{scope:"col",children:"Type"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:47},this),a.jsxDEV("th",{scope:"col",children:"Subject"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:72},this),a.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:100},this),a.jsxDEV("th",{scope:"col",children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:126},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:18},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:11},this),a.jsxDEV("tbody",{children:C.map(u=>a.jsxDEV("tr",{children:[a.jsxDEV("td",{children:a.jsxDEV("time",{dateTime:u.ts,children:new Date(u.ts).toLocaleTimeString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:78,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:78,columnNumber:17},this),a.jsxDEV("td",{children:a.jsxDEV("span",{className:"badge",children:u.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:79,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:79,columnNumber:17},this),a.jsxDEV("td",{children:a.jsxDEV("code",{title:u.subject,children:Je(u.subject)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:80,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:80,columnNumber:17},this),a.jsxDEV("td",{children:u.state?a.jsxDEV("span",{className:`state ${u.state}`,children:[a.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:69},this),u.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:32},this):"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:17},this),a.jsxDEV("td",{children:u.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:82,columnNumber:17},this)]},u.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:77,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:75,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:72,columnNumber:9},this):a.jsxDEV("p",{className:"empty",children:"No events match this filter."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:71,columnNumber:26},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Telemetry.tsx",lineNumber:41,columnNumber:5},this)}function yC(p){const x={active:0,terminal:0,awaiting:0};for(const L of(p==null?void 0:p.missions)??[])(L.status==="awaiting-approval"||L.status==="input-required")&&(x.awaiting+=1),L.terminal?x.terminal+=1:x.active+=1;return x}const SC={tenant_id:"",host_id:"",instance_id:"",agent_id:""};function NC(){const[p,x]=Z.useState(SC),[L,j]=Z.useState(null),[q,ee]=Z.useState(null),[I,c]=Z.useState(""),[b,g]=Z.useState(!1),[N,f]=Z.useState(null),m=Object.values(p).every(u=>u.trim()),w=JSON.stringify({...p,filter:{limit:250}}),C=async()=>{if(m){g(!0),c(""),ee(null),j(null),f(null);try{const u={"content-type":"application/json"},o=await Le("/api/activity/coverage",{method:"POST",headers:u,body:w});j(o);const l=await Le("/api/activity/timeline",{method:"POST",headers:u,body:w});ee(l)}catch(u){c(u.message)}finally{g(!1)}}},y=async()=>{c(""),f(null);const u=await nh("/api/activity/export",{method:"POST",headers:{"content-type":"application/json"},body:w});if(!u.ok){c(u.status===503?"Signed export unavailable: the sandbox signing key is unavailable.":`Signed export failed (${u.status}).`);return}const o=await u.json();f({key_id:o.manifest.key_id,merkle_root:o.manifest.merkle_root});const l=URL.createObjectURL(new Blob([JSON.stringify(o,null,2)],{type:"application/json"})),v=window.document.createElement("a");v.href=l,v.download="activity-export.json",v.click(),URL.revokeObjectURL(l)},h=L==null?void 0:L.completeness;return a.jsxDEV(a.Fragment,{children:[a.jsxDEV("div",{className:"section-toolbar",children:a.jsxDEV("div",{children:[a.jsxDEV("h2",{children:"Governed activity"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:60,columnNumber:43},this),a.jsxDEV("p",{className:"hint",children:"Exact sandbox scope; coverage is checked before events."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:60,columnNumber:69},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:60,columnNumber:38},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:60,columnNumber:5},this),a.jsxDEV("div",{className:"activity-scope",children:[Object.keys(p).map(u=>a.jsxDEV("label",{children:[u.replace("_id",""),a.jsxDEV("input",{value:p[u],onChange:o=>x({...p,[u]:o.target.value})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:62,columnNumber:105},this)]},u,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:62,columnNumber:64},this)),a.jsxDEV("button",{className:"cta",disabled:!m||b,onClick:C,children:b?"Loading…":"Load activity"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:63,columnNumber:7},this),a.jsxDEV("button",{disabled:!q||b,onClick:y,children:"Export signed evidence"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:64,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:61,columnNumber:5},this),I&&a.jsxDEV("p",{className:"err",role:"alert",children:I},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:66,columnNumber:15},this),h&&a.jsxDEV("section",{className:`activity-coverage ${h.complete?"complete":"incomplete"}`,"aria-label":"Activity coverage",children:[a.jsxDEV("h3",{children:[h.complete?"Complete coverage":"Incomplete coverage"," ",a.jsxDEV("span",{className:"badge",children:h.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:68,columnNumber:70},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:68,columnNumber:7},this),a.jsxDEV("p",{children:["Collectors ",h.collector_count," · gaps ",h.sequence_gap_count," · durable loss ",h.durable_loss_count," · restarts ",h.restart_count," · dropped ",h.dropped_event_count," · stale ",h.stale_collector_count," · clock uncertainty ",h.maximum_clock_error_ms," ms"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:69,columnNumber:7},this),a.jsxDEV("p",{children:["Unsupported event classes: ",h.unsupported_event_classes.length?h.unsupported_event_classes.join(", "):"none"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:70,columnNumber:7},this),L.coverage.map(u=>a.jsxDEV("p",{className:"cell-note",children:[u.collector_id,": gaps ",u.sequence_gaps.length,", loss ",u.durable_loss_records.length,", restarts ",u.restart_count,", dropped ",u.dropped_event_count,", stale ",u.stale?"yes":"no",", clock ±",u.maximum_clock_error_ms," ms"]},u.collector_id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:71,columnNumber:40},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:67,columnNumber:11},this),q&&a.jsxDEV("table",{className:"inventory-table",children:[a.jsxDEV("caption",{children:["Metadata-only activity events — coverage ",q.completeness.complete?"complete":"incomplete"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:53},this),a.jsxDEV("thead",{children:a.jsxDEV("tr",{children:[a.jsxDEV("th",{children:"Time"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:184},this),a.jsxDEV("th",{children:"Event"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:197},this),a.jsxDEV("th",{children:"Plane"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:211},this),a.jsxDEV("th",{children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:225},this),a.jsxDEV("th",{children:"Trust"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:240},this),a.jsxDEV("th",{children:"Outcome"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:254},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:180},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:173},this),a.jsxDEV("tbody",{children:(q.events??[]).map(u=>{var o;return a.jsxDEV("tr",{children:[a.jsxDEV("td",{children:new Date(u.occurred_at).toLocaleString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:74,columnNumber:72},this),a.jsxDEV("td",{children:u.event_name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:74,columnNumber:127},this),a.jsxDEV("td",{children:u.plane},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:74,columnNumber:154},this),a.jsxDEV("td",{children:[u.source.collector," · ",u.source.layer]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:74,columnNumber:176},this),a.jsxDEV("td",{children:a.jsxDEV("span",{className:`badge activity-trust-${u.source.trust}`,children:u.source.trust},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:74,columnNumber:236},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:74,columnNumber:232},this),a.jsxDEV("td",{children:((o=u.outcome)==null?void 0:o.status)??"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:74,columnNumber:331},this)]},u.event_id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:74,columnNumber:47},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:283},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:73,columnNumber:18},this),N&&a.jsxDEV("p",{role:"status",children:["Signed export downloaded · key ",N.key_id," · Merkle root ",N.merkle_root]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:76,columnNumber:20},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Activity.tsx",lineNumber:59,columnNumber:10},this)}const $1="aiwg.cockpit.memory.notes.v1";function EC({refreshTick:p=0}){const[x,L]=Z.useState(()=>xC()),[j,q]=Z.useState([]),[ee,I]=Z.useState(""),[c,b]=Z.useState(""),[g,N]=Z.useState(""),[f,m]=Z.useState(""),[w,C]=Z.useState(""),y=Z.useCallback(l=>{L(l),localStorage.setItem($1,JSON.stringify(l))},[]);Z.useEffect(()=>{Le("/api/missions").then(l=>{q(l.missions),C("");const v=CC(x,l.missions);v!==x&&y(v)}).catch(l=>C(l.message))},[p]);const h=Z.useMemo(()=>{const l=ee.trim().toLowerCase();return l?x.filter(v=>[v.title,v.body,v.source,v.mission_id??"",...v.tags].some(S=>S.toLowerCase().includes(l))):x},[x,ee]),u=()=>{c.trim()&&(y([{id:`note-${Date.now()}`,title:c.trim(),body:g.trim(),tags:f.split(",").map(l=>l.trim()).filter(Boolean),created_at:new Date().toISOString(),source:"operator"},...x]),b(""),N(""),m(""))},o=l=>y(x.filter(v=>v.id!==l));return a.jsxDEV(a.Fragment,{children:[a.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-v2VJA1/web/src/components/Memory.tsx",lineNumber:73,columnNumber:7},this),w&&a.jsxDEV("p",{className:"err",children:["Mission memory sync failed: ",w]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:77,columnNumber:15},this),a.jsxDEV("section",{className:"memory-layout",children:[a.jsxDEV("form",{className:"memory-form",onSubmit:l=>{l.preventDefault(),u()},"aria-label":"Add memory note",children:[a.jsxDEV("h2",{children:"Add Note"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:80,columnNumber:11},this),a.jsxDEV("label",{children:["Title",a.jsxDEV("input",{value:c,onChange:l=>b(l.target.value),placeholder:"Note title"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:81,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:81,columnNumber:11},this),a.jsxDEV("label",{children:["Body",a.jsxDEV("textarea",{value:g,onChange:l=>N(l.target.value),placeholder:"What should future you remember?",rows:4},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:82,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:82,columnNumber:11},this),a.jsxDEV("label",{children:["Tags",a.jsxDEV("input",{value:f,onChange:l=>m(l.target.value),placeholder:"cockpit, release, risk"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:83,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:83,columnNumber:11},this),a.jsxDEV("button",{type:"submit",disabled:!c.trim(),children:"Save Note"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:84,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:79,columnNumber:9},this),a.jsxDEV("section",{className:"memory-list","aria-label":"Memory notes",children:[a.jsxDEV("div",{className:"section-toolbar",children:[a.jsxDEV("div",{children:[a.jsxDEV("h2",{children:"Notes"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:89,columnNumber:15},this),a.jsxDEV("p",{className:"hint",children:[x.length," saved · ",j.filter(l=>l.terminal).length," terminal mission(s) observed"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:90,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:88,columnNumber:13},this),a.jsxDEV("input",{"aria-label":"Search memory notes",value:ee,onChange:l=>I(l.target.value),placeholder:"Search notes"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:92,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:87,columnNumber:11},this),h.length?a.jsxDEV("div",{className:"note-grid",children:h.map(l=>a.jsxDEV("article",{className:"note-card",children:[a.jsxDEV("header",{children:[a.jsxDEV("h3",{children:l.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:99,columnNumber:21},this),a.jsxDEV("button",{"aria-label":`Delete note ${l.title}`,onClick:()=>o(l.id),children:"Remove"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:100,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:98,columnNumber:19},this),l.body&&a.jsxDEV("p",{children:l.body},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:102,columnNumber:33},this),a.jsxDEV("footer",{children:[a.jsxDEV("time",{dateTime:l.created_at,children:new Date(l.created_at).toLocaleString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:104,columnNumber:21},this),l.mission_id&&a.jsxDEV("code",{children:Je(l.mission_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:105,columnNumber:41},this),l.tags.map(v=>a.jsxDEV("span",{className:"tag",children:v},v,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:106,columnNumber:45},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:103,columnNumber:19},this)]},l.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:97,columnNumber:17},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:95,columnNumber:13},this):a.jsxDEV("p",{className:"empty",children:ee?"No notes match your search.":"No notes yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:94,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:86,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/Memory.tsx",lineNumber:72,columnNumber:5},this)}function xC(){try{const p=JSON.parse(localStorage.getItem($1)||"[]");return Array.isArray(p)?p:[]}catch{return[]}}function CC(p,x){const L=new Set(p.map(q=>q.mission_id).filter(Boolean)),j=x.filter(q=>q.terminal&&!L.has(q.id)).map(q=>({id:`mission-note-${q.id}`,title:q.title.slice(0,96),body:[`Status: ${q.status}`,q.completion?`Completion: ${q.completion}`:"",q.error?`Error: ${q.error}`:""].filter(Boolean).join(`
311
- `),tags:["mission",q.status,q.source].filter(Boolean),created_at:q.completed_at??new Date().toISOString(),mission_id:q.id,source:"mission"}));return j.length?[...j,...p]:p}const AC=15e3;function DC({open:p,onClose:x,session:L,onStarted:j,initialInstanceId:q,startTimeoutMs:ee=AC}){var V;const[I,c]=Z.useState([]),[b,g]=Z.useState(""),[N,f]=Z.useState(""),[m,w]=Z.useState(""),[C,y]=Z.useState("observer"),[h,u]=Z.useState(!1),[o,l]=Z.useState("");Z.useEffect(()=>{if(!p)return;l(""),u(!1);let J=!1;return(async()=>{var $,H,X;try{const ne=await Le("/api/inventory");if(J)return;const ie=kC(ne.instances).filter(oe=>oe.state==="running");c(ie);const re=ie.find(oe=>oe.id===q)??ie.find(oe=>{var T;return(T=oe.session_backends)==null?void 0:T.some(z=>z.available)})??ie[0];if(re){g(re.id),f((($=re.launch_context)==null?void 0:$.loadout)??re.loadout??"");const oe=((H=re.session_backends)==null?void 0:H.find(T=>T.available))??((X=re.session_backends)==null?void 0:X[0]);w(oe?`${oe.mode}:${oe.backend}`:"")}else l("No stack connected — start an executor first.")}catch(ne){J||l(ne.message)}})(),()=>{J=!0}},[p,q]);const v=I.find(J=>J.id===b),S=(v==null?void 0:v.session_backends)??[],A=S.find(J=>`${J.mode}:${J.backend}`===m)??S.find(J=>J.available)??S[0];if(Z.useEffect(()=>{var $,H,X;if(!v)return;f((($=v.launch_context)==null?void 0:$.loadout)??v.loadout??"");const J=((H=v.session_backends)==null?void 0:H.find(ne=>ne.available))??((X=v.session_backends)==null?void 0:X[0]);w(J?`${J.mode}:${J.backend}`:"")},[b]),!p)return null;const k=L.state.attached,E=!h&&!!v&&!!(A!=null&&A.available),R=async()=>{if(!v||!A)return;u(!0),l("");const J=new AbortController,$=window.setTimeout(()=>J.abort(),ee);try{const H=new URLSearchParams({mode:A.mode,backend:A.backend}),X=await Le(`/api/instances/${encodeURIComponent(v.id)}/sessions?${H}`,{method:"POST",signal:J.signal});if(!X.attach_url)throw new Error("Session started but no attach URL was returned.");L.attach(X.attach_url,!1,C,{instanceId:v.id,sessionId:X.id}),j(),x(),u(!1)}catch(H){const X=H instanceof DOMException&&H.name==="AbortError"?"Starting the session timed out. The instance may still be preparing PTY support; refresh sessions and try again.":H.message;l(X),u(!1)}finally{window.clearTimeout($)}};return a.jsxDEV("div",{className:"modal-backdrop",role:"presentation",onClick:x,children:a.jsxDEV("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"start-session-title",onClick:J=>J.stopPropagation(),onKeyDown:J=>{J.key==="Escape"&&x()},children:[a.jsxDEV("h2",{id:"start-session-title",children:"Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:122,columnNumber:9},this),o&&a.jsxDEV("p",{className:"err",children:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:124,columnNumber:17},this),k&&a.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-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:126,columnNumber:11},this),a.jsxDEV("div",{className:"form-grid",children:[a.jsxDEV("label",{htmlFor:"ss-instance",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:130,columnNumber:11},this),a.jsxDEV("select",{id:"ss-instance",value:b,onChange:J=>g(J.target.value),children:I.map(J=>a.jsxDEV("option",{value:J.id,children:[Je(J.id)," · ",J.runtime," · ",J.state]},J.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:133,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:131,columnNumber:11},this),a.jsxDEV("label",{children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:137,columnNumber:11},this),a.jsxDEV("span",{className:"ro",children:v?`${v.runtime_posture.label} (${v.runtime})`:"—"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:138,columnNumber:11},this),a.jsxDEV("label",{children:"Instance loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:140,columnNumber:11},this),a.jsxDEV("span",{className:"ro",children:[N||"unknown",(V=v==null?void 0:v.launch_context)!=null&&V.image_ref?` · ${v.launch_context.image_ref}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:141,columnNumber:11},this),a.jsxDEV("label",{htmlFor:"ss-backend",children:"Backend"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:143,columnNumber:11},this),a.jsxDEV("select",{id:"ss-backend",value:m,onChange:J=>w(J.target.value),children:S.length?S.map(J=>a.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-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:147,columnNumber:17},this)):a.jsxDEV("option",{value:"",children:"— not advertised —"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:150,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:144,columnNumber:11},this),a.jsxDEV("label",{htmlFor:"ss-posture",children:"Posture"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:153,columnNumber:11},this),a.jsxDEV("select",{id:"ss-posture",value:C,onChange:J=>y(J.target.value),children:[a.jsxDEV("option",{value:"observer",children:"Observe (read-only)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:159,columnNumber:13},this),a.jsxDEV("option",{value:"controller",disabled:(A==null?void 0:A.drive)===!1,children:"Drive (control)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:160,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:154,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:129,columnNumber:9},this),A&&!A.available&&a.jsxDEV("p",{className:"hint",children:A.reason??"Selected backend is unavailable on this instance."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:165,columnNumber:11},this),a.jsxDEV("div",{className:"modal-actions",children:[a.jsxDEV("button",{onClick:x,disabled:h,children:"Cancel"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:169,columnNumber:11},this),a.jsxDEV("button",{className:"cta",onClick:R,disabled:!E,children:h?"Starting…":k?"Start another session":"Start session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:170,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:168,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:114,columnNumber:7},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/StartSessionModal.tsx",lineNumber:113,columnNumber:5},this)}function kC(p){const x=new Set;return p.filter(L=>x.has(L.id)?!1:(x.add(L.id),!0))}const VC=[{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"}],y1=[{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"]}],th=()=>`cockpit-${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`.slice(0,32),q1=["instance.snapshot","instance.restore","instance.fork","warm_pool.manage"];function RC({open:p,onClose:x,onLaunched:L}){var ye;const[j,q]=Z.useState("host"),[ee,I]=Z.useState(th),[c,b]=Z.useState("host-tools"),[g,N]=Z.useState([]),[f,m]=Z.useState([]),[w,C]=Z.useState(""),[y,h]=Z.useState(null),[u,o]=Z.useState(""),[l,v]=Z.useState(!1),[S,A]=Z.useState("agentic/codex:latest"),[k,E]=Z.useState(""),[R,V]=Z.useState(""),[J,$]=Z.useState(""),[H,X]=Z.useState(""),[ne,ie]=Z.useState(!0),[re,oe]=Z.useState(!1),[T,z]=Z.useState(""),[B,P]=Z.useState("");if(Z.useEffect(()=>{if(!p)return;I(th());let be=!1;return Promise.all([Le("/api/loadouts").catch(()=>({loadouts:[]})),Le("/api/inventory").catch(()=>({instances:[]})),Le("/api/executor/capabilities").catch(()=>null)]).then(([Ie,qe,je])=>{if(be)return;N(Ie.loadouts??[]),m(qe.instances??[]),h(je);const De=(qe.instances??[]).find(P1);C(Lt=>Lt||(De==null?void 0:De.id)||"")}),()=>{be=!0}},[p]),Z.useEffect(()=>{if(!p||j!=="qemu")return;const be=N1(g,j).find(qe=>qe.id===c),Ie=S1(y,be);Ie.length&&!Ie.some(qe=>qe.provider===u)&&o(Ie[0].provider)},[y,c,g,p,j,u]),!p)return null;const he=N1(g,j),fe=he.find(be=>be.id===c),ge=S1(y,fe),xe=j==="qemu"&&(u||((ye=ge[0])==null?void 0:ye.provider))||"",Y=ge.find(be=>be.provider===xe),U=xe?jC(fe,xe):void 0,pe=LC(fe,U,Y,xe,l),le=be=>{q(be),be==="host"?b("host-tools"):be==="docker"?(b("agentic-dev"),A(Ie=>Ie||"agentic/codex:latest")):(b("profiles/basic.yaml"),v(!1))},ce=async()=>{var be,Ie,qe,je,De,Lt,$i,Ae;oe(!0),z(""),P("");try{if(j==="host"){const $e=sa(f).find(wt=>wt.id===w)??sa(f)[0];if($e){P(ne?`Using host target ${((be=$e.launch_context)==null?void 0:be.name)??Je($e.id)}; starting session...`:`Using host target ${((Ie=$e.launch_context)==null?void 0:Ie.name)??Je($e.id)}`),await L($e.id,ne),ne&&x();return}if(!(y!=null&&y.host_runtime_enabled))throw new Error("Host runtime is not enabled on this executor. Enable the host supervisor or choose Docker container.");const Ge={name:ee.replace(/[^a-z0-9-]/g,"-").replace(/^-+/,"a-").slice(0,63),runtime:"host",loadout:"host-tools",start:!0},ut=await Le("/api/instances",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Ge)}),ct=ut.instance_id??ut.instanceId??((qe=ut.result)==null?void 0:qe.instance_id)??((je=ut.result)==null?void 0:je.instanceId),bt=ut.id??((De=ut.operation)==null?void 0:De.id);P(ne?`Host launch accepted: ${ct??bt??"operation pending"}; waiting for session...`:`Host launch accepted: ${ct??bt??"operation pending"}`),await L(ct,ne,bt),ne?x():I(th());return}const Nt={name:ee.replace(/[^a-z0-9-]/g,"-").replace(/^-+/,"a-").slice(0,63),runtime:j,start:!0};if(c&&(Nt.loadout=c),R&&(Nt.profile=R),j==="docker"&&(Nt.image=S==="__custom__"?k.trim():S,Nt.agentshare=!0),j==="qemu"){Nt.agentshare=!0,xe&&(Nt.provider=xe);const $e=BC(xe,pe);$e&&(Nt.runtime_options=$e),J.trim()&&(Nt.ssh_key=J.trim())}j==="docker"&&H.trim()&&(Nt.mounts=H.split(`
312
- `).map($e=>$e.trim()).filter(Boolean));const ve=await Le("/api/instances",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Nt)}),Re=ve.instance_id??ve.instanceId??((Lt=ve.result)==null?void 0:Lt.instance_id)??(($i=ve.result)==null?void 0:$i.instanceId),Ze=ve.id??((Ae=ve.operation)==null?void 0:Ae.id);P(ne?`Launch accepted: ${Re??Ze??"operation pending"}; waiting for session...`:`Launch accepted: ${Re??Ze??"operation pending"}`),await L(Re,ne,Ze),ne?x():I(th())}catch(Nt){z(Nt.message)}finally{oe(!1)}};return a.jsxDEV("div",{className:"modal-backdrop",role:"presentation",onClick:x,children:a.jsxDEV("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"launch-instance-title",onClick:be=>be.stopPropagation(),children:[a.jsxDEV("h2",{id:"launch-instance-title",children:"New instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:213,columnNumber:9},this),a.jsxDEV("p",{className:"hint",children:"Create a runtime target. Existing instances and sessions keep running."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:214,columnNumber:9},this),T&&a.jsxDEV("p",{className:"err",children:T},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:215,columnNumber:17},this),B&&a.jsxDEV("p",{className:"hint ok-text",children:B},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:216,columnNumber:20},this),a.jsxDEV("div",{className:"form-grid",children:[a.jsxDEV("label",{htmlFor:"li-runtime",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:218,columnNumber:11},this),a.jsxDEV("select",{id:"li-runtime",value:j,onChange:be=>le(be.target.value),children:[a.jsxDEV("option",{value:"host",children:"Host"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:220,columnNumber:13},this),a.jsxDEV("option",{value:"docker",children:"Docker container"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:221,columnNumber:13},this),a.jsxDEV("option",{value:"qemu",children:"VM / QEMU"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:222,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:219,columnNumber:11},this),j==="host"?a.jsxDEV(a.Fragment,{children:[a.jsxDEV("label",{htmlFor:"li-host-target",children:"Host target"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:226,columnNumber:15},this),a.jsxDEV("select",{id:"li-host-target",value:w,onChange:be=>C(be.target.value),children:[sa(f).map(be=>{var Ie;return a.jsxDEV("option",{value:be.id,children:[((Ie=be.launch_context)==null?void 0:Ie.name)??Je(be.id)," - ",be.loadout]},be.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:228,columnNumber:52},this)}),!sa(f).length&&(y==null?void 0:y.host_runtime_enabled)&&a.jsxDEV("option",{value:"",children:"Local host runtime - create new"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:229,columnNumber:90},this),!sa(f).length&&!(y!=null&&y.host_runtime_enabled)&&a.jsxDEV("option",{value:"",children:"Host runtime not enabled"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:230,columnNumber:91},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:227,columnNumber:15},this),!sa(f).length&&(y==null?void 0:y.host_runtime_enabled)&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("label",{htmlFor:"li-name",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:234,columnNumber:19},this),a.jsxDEV("input",{id:"li-name",value:ee,onChange:be=>I(be.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:235,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:233,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:225,columnNumber:13},this):a.jsxDEV(a.Fragment,{children:[a.jsxDEV("label",{htmlFor:"li-name",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:241,columnNumber:15},this),a.jsxDEV("input",{id:"li-name",value:ee,onChange:be=>I(be.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:242,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:240,columnNumber:13},this),a.jsxDEV("label",{htmlFor:"li-loadout",children:"Instance loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:245,columnNumber:11},this),j==="host"?a.jsxDEV("span",{className:"ro",children:"host-tools"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:247,columnNumber:13},this):a.jsxDEV("select",{id:"li-loadout",value:c,onChange:be=>b(be.target.value),children:he.map(be=>a.jsxDEV("option",{value:be.id,children:[be.label,be.description?` - ${be.description}`:""]},be.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:250,columnNumber:43},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:249,columnNumber:13},this),j==="qemu"&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("label",{htmlFor:"li-vm-provider",children:"VM provider"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:255,columnNumber:15},this),a.jsxDEV("select",{id:"li-vm-provider",value:xe,onChange:be=>o(be.target.value),disabled:!ge.length,children:[!ge.length&&a.jsxDEV("option",{value:"",children:"Provider discovery unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:262,columnNumber:45},this),ge.map(be=>a.jsxDEV("option",{value:be.provider,children:[be.label??be.provider,be.default?" (default)":""]},be.provider,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:264,columnNumber:19},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:256,columnNumber:15},this),a.jsxDEV("label",{htmlFor:"li-gpu-vfio",children:"GPU / VFIO"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:269,columnNumber:15},this),a.jsxDEV("div",{className:"field-stack",children:[a.jsxDEV("label",{className:"check-row",children:[a.jsxDEV("input",{id:"li-gpu-vfio",type:"checkbox",checked:pe.required||l,disabled:pe.required||!pe.selectable,onChange:be=>v(be.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:272,columnNumber:19},this),"Request GPU passthrough"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:271,columnNumber:17},this),a.jsxDEV("div",{className:`posture-line ${pe.blocked?"warn":pe.effective?"ok-text":""}`,children:pe.message},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:281,columnNumber:17},this),pe.fastStartReason&&a.jsxDEV("div",{className:"cell-note",children:pe.fastStartReason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:284,columnNumber:41},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:270,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:254,columnNumber:13},this),j!=="host"&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("label",{htmlFor:"li-profile",children:"Profile"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:290,columnNumber:15},this),a.jsxDEV("input",{id:"li-profile",value:R,onChange:be=>V(be.target.value),placeholder:"optional"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:291,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:289,columnNumber:13},this),j==="qemu"&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("label",{htmlFor:"li-ssh-key",children:"SSH public key"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:296,columnNumber:15},this),a.jsxDEV("input",{id:"li-ssh-key",value:J,onChange:be=>$(be.target.value),placeholder:"auto-detect, or ~/.ssh/agentic_ed25519.pub"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:297,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:295,columnNumber:13},this),j==="docker"&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("label",{htmlFor:"li-image",children:"Container image"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:307,columnNumber:15},this),a.jsxDEV("div",{className:"field-stack",children:[a.jsxDEV("select",{id:"li-image",value:S,onChange:be=>A(be.target.value),children:[VC.map(be=>a.jsxDEV("option",{value:be.value,children:[be.label," - ",be.value]},be.value,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:310,columnNumber:57},this)),a.jsxDEV("option",{value:"__custom__",children:"Custom image..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:311,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:309,columnNumber:17},this),S==="__custom__"&&a.jsxDEV("input",{"aria-label":"Custom container image",value:k,onChange:be=>E(be.target.value),placeholder:"registry.example.com/team/agent:tag"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:314,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:308,columnNumber:15},this),a.jsxDEV("label",{htmlFor:"li-mounts",children:"Mounts"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:322,columnNumber:15},this),a.jsxDEV("textarea",{id:"li-mounts",value:H,onChange:be=>X(be.target.value),placeholder:"/host/path:/container/path"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:323,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:306,columnNumber:13},this),a.jsxDEV("label",{htmlFor:"li-open-session",children:"After launch"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:326,columnNumber:11},this),a.jsxDEV("label",{className:"check-row",children:[a.jsxDEV("input",{id:"li-open-session",type:"checkbox",checked:ne,onChange:be=>ie(be.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/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-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:327,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:217,columnNumber:9},this),a.jsxDEV("div",{className:"modal-actions",children:[a.jsxDEV("button",{onClick:x,disabled:re,children:"Close"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:333,columnNumber:11},this),a.jsxDEV("button",{className:"cta",onClick:ce,disabled:re||j==="host"&&!w&&!(y!=null&&y.host_runtime_enabled)||j==="host"&&!w&&!ee.trim()||j!=="host"&&!ee.trim()||j==="docker"&&S==="__custom__"&&!k.trim()||j==="qemu"&&pe.effective&&pe.blocked,children:re?"Working...":j==="host"?ne?"Start host session":"Use host":ne?"Create + start session":"Create instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:334,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:332,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:212,columnNumber:7},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/components/LaunchInstanceModal.tsx",lineNumber:211,columnNumber:5},this)}function TC(p){return new Set(((p==null?void 0:p.capabilities)??[]).map(x=>x.id))}function MC(p,x){var L;return new Set([...((L=p==null?void 0:p.runtime_options)==null?void 0:L.required_capabilities)??[],...(x==null?void 0:x.required_capabilities)??[]])}function OC(p,x){var L;return new Set([...((L=p==null?void 0:p.runtime_options)==null?void 0:L.excluded_capabilities)??[],...(x==null?void 0:x.excluded_capabilities)??[]])}function S1(p,x){var ee,I;const L=((I=(ee=p==null?void 0:p.runtime_providers)==null?void 0:ee.providers)==null?void 0:I.filter(c=>c.kind==="vm"))??[],j=new Set(((x==null?void 0:x.compatibility)??[]).filter(c=>["vm","qemu"].includes(String(c.runtime_kind).toLowerCase())).map(c=>c.provider)),q=j.size?L.filter(c=>j.has(c.provider)):L;return q.length?q:[...j].map(c=>({provider:c,kind:"vm",capabilities:[]}))}function jC(p,x){var L;return(L=p==null?void 0:p.compatibility)==null?void 0:L.find(j=>j.provider===x&&["vm","qemu"].includes(String(j.runtime_kind).toLowerCase()))}function LC(p,x,L,j,q){var w;const ee=MC(p,x).has("device.vfio"),I=OC(p,x),c=ee||q,b=TC(L).has("device.vfio"),g=[...I].filter(C=>q1.includes(C)),N=(w=[...(x==null?void 0:x.constraints)??[],...(L==null?void 0:L.capability_constraints)??[]].find(C=>C.capability==="device.vfio"))==null?void 0:w.reason;let f=!1,m="No GPU requested";return j?x&&!x.eligible?(f=c||ee,m=x.reason??"Loadout is not eligible for this provider"):!x&&c?(f=!0,m="Loadout compatibility does not advertise VFIO"):!b&&c?(f=!0,m="Selected provider does not advertise VFIO"):b?x?I.has("device.vfio")&&c?(f=!0,m="Selected loadout excludes GPU passthrough"):ee?m=f?m:"GPU passthrough required by loadout":q?m=f?m:"GPU passthrough requested":b&&!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=c,m="Provider discovery unavailable"),{required:ee,effective:c,blocked:f,selectable:!!(j&&b&&x&&!I.has("device.vfio")&&x.eligible!==!1),message:m,fastStartReason:c&&g.length?`${N??"VFIO-backed VMs cannot safely reuse memory state"} Disabled: ${g.join(", ")}.`:N}}function BC(p,x){if(!p&&!x.effective)return;const L={kind:"vm",launch_strategy:{mode:"cold"}};return p&&(L.provider=p),x.effective&&(L.required_capabilities=["device.vfio"],L.excluded_capabilities=q1,L.constraints={allow_vfio_fast_start:!1,fallback_mode:"fail"}),L}function N1(p,x){if(x==="host")return y1.filter(ee=>ee.id==="host-tools");const L=x==="docker"?["docker","container"]:x==="qemu"?["qemu","vm"]:[x],j=[...p,...y1].reduce((ee,I)=>(ee.some(c=>c.id===I.id)||ee.push(I),ee),[]),q=j.filter(ee=>{var I;return!((I=ee.runtimes)!=null&&I.length)||ee.runtimes.some(c=>L.includes(String(c).toLowerCase()))});return q.length?q:j}function sa(p){return p.filter(P1)}function P1(p){var x,L;return p.state==="running"&&((x=p.runtime_posture)==null?void 0:x.kind)==="host"&&((L=p.session_backends)==null?void 0:L.some(j=>j.available!==!1))}const Bl=[{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:"activity",label:"Activity"},{id:"memory",label:"Memory"},{id:"actions",label:"Actions"}],W1={id:"desktop",label:"Desktop"},E1=[...Bl,W1];function JC(p){if(!p)return Bl;const x=Bl.findIndex(L=>L.id==="sessions")+1;return[...Bl.slice(0,x),W1,...Bl.slice(x)]}const HC=p=>new Promise(x=>window.setTimeout(x,p));function UC(){const[p,x]=Z.useState(()=>{const X=window.location.hash.replace(/^#/,"");return E1.some(ne=>ne.id===X)?X:"welcome"}),[L,j]=Z.useState(()=>!1),[q,ee]=Z.useState(""),I=JC(L),c=X=>{ee(X),x("desktop")},b=ZE(),g=lp(),N=Qx(g).filter(X=>X.id!==`pty:${g.activeKey}`),[f,m]=Z.useState(""),[w,C]=Z.useState(null),[y,h]=Z.useState("checking"),u=Z.useRef(!1),o=Z.useRef(!1),[l,v]=Z.useState(!1),[S,A]=Z.useState(void 0),[k,E]=Z.useState(!1),[R,V]=Z.useState(0);Z.useEffect(()=>{let X=!1,ne,ie=1e3;const re=T=>{ne=window.setTimeout(oe,T)},oe=async()=>{var T;try{const[z,B]=await Promise.all([Le("/api/health"),Le("/api/inventory")]);if(X)return;((T=z.desktop)==null?void 0:T.configured)===!0&&j(!0);const[P,he]=await Promise.all([Le("/api/running").catch(()=>({count:0})),Le("/api/approvals?status=pending").catch(()=>({approvals:[]}))]);if(X)return;const fe=B.instances.map(xe=>{var Y;return ur(((Y=xe.runtime_posture)==null?void 0:Y.kind)??xe.runtime)}),ge=b.responseNeeded.needed?1:0;if(C({executor:z.executor_url,instances:B.instances.length,running:P.count,responses:he.approvals.length+N.length+ge,host:fe.includes("host"),container:fe.includes("container"),vm:fe.includes("vm")}),!o.current){const xe=u.current;u.current=!1,h("live"),xe&&V(Y=>Y+1)}ie=1e3,X||re(15e3)}catch{X||(u.current=!0,h("reconnecting"),re(ie),ie=Math.min(ie*2,15e3))}};return oe(),()=>{X=!0,ne!==void 0&&window.clearTimeout(ne)}},[b.responseNeeded.needed,R,N.length]),Z.useEffect(()=>{if(typeof EventSource>"u")return;let X,ne=!1;const ie=()=>{o.current=!1,V(re=>re+1)};return D1().then(()=>{ne||(X=new EventSource("/api/events"),X.onopen=ie,X.addEventListener("cockpit.refresh",ie),X.onerror=()=>{o.current=!0,u.current=!0,h("reconnecting"),V(re=>re+1)})}).catch(()=>{o.current=!0,h("reconnecting")}),()=>{ne=!0,X==null||X.close()}},[]),Z.useEffect(()=>{const X=()=>{const ne=window.location.hash.replace(/^#/,"");E1.some(ie=>ie.id===ne)&&x(ne)};return window.addEventListener("hashchange",X),()=>window.removeEventListener("hashchange",X)},[]);const J=X=>{A(X),v(!0)},$=async(X,ne,ie)=>{if(V(re=>re+1),!ne){x("inventory"),V(re=>re+1);return}x("sessions"),(async()=>{try{const re=await zC(X,ie),oe=re.session_backends.find(B=>B.available!==!1&&B.drive!==!1)??re.session_backends.find(B=>B.available!==!1)??re.session_backends[0];if(!oe||oe.available===!1)throw new Error((oe==null?void 0:oe.reason)??"No available session backend for the new instance.");const T=new URLSearchParams({mode:oe.mode,backend:oe.backend}),z=await Le(`/api/instances/${encodeURIComponent(re.id)}/sessions?${T}`,{method:"POST"});b.attach(z.attach_url,!1,oe.drive===!1?"observer":"controller",{instanceId:re.id,sessionId:z.id})}catch(re){console.warn("auto-session after launch did not complete:",re.message)}finally{V(re=>re+1)}})()},H=async()=>{var X;await((X=navigator.clipboard)==null?void 0:X.writeText("aiwg cockpit"))};return a.jsxDEV(a.Fragment,{children:[a.jsxDEV("header",{children:[a.jsxDEV("div",{className:"brand-lockup",children:[a.jsxDEV("span",{className:"mark","aria-hidden":"true",children:"◆"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:232,columnNumber:11},this),a.jsxDEV("h1",{children:"AIWG Cockpit"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:233,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:231,columnNumber:9},this),a.jsxDEV("div",{className:"top-status","aria-label":"Cockpit status","aria-live":"polite",children:[a.jsxDEV("span",{className:`health-pill ${y==="live"?"ok":"warn"}`,title:y==="reconnecting"&&w?"Connection interrupted; showing last-known status while Cockpit retries.":void 0,children:y==="live"?"Bridge live":y==="reconnecting"?"Reconnecting…":"Bridge checking"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:236,columnNumber:11},this),w&&a.jsxDEV(a.Fragment,{children:[a.jsxDEV("span",{className:"executor-pill",title:w.executor,children:w.executor},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:244,columnNumber:15},this),a.jsxDEV("span",{children:[w.instances," stacks"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:245,columnNumber:15},this),a.jsxDEV("span",{children:[w.running," running"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:246,columnNumber:15},this),a.jsxDEV("span",{children:[w.responses," responses needed"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:247,columnNumber:15},this),a.jsxDEV("span",{className:"matrix-mini",title:"Runtime target coverage",children:["host ",w.host?"✓":"-"," · docker ",w.container?"✓":"-"," · vm ",w.vm?"✓":"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:248,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:243,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:235,columnNumber:9},this),a.jsxDEV("button",{className:"meta",onClick:()=>E(!0),children:"+ Launch instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:252,columnNumber:9},this),a.jsxDEV("button",{className:"meta",onClick:()=>J(),children:"▸ Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:253,columnNumber:9},this),a.jsxDEV("button",{className:"meta",onClick:H,children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:254,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:230,columnNumber:7},this),a.jsxDEV("div",{role:"tablist","aria-label":"Cockpit views",children:I.map(X=>a.jsxDEV("button",{role:"tab",id:`tab-${X.id}`,"aria-controls":`panel-${X.id}`,"aria-selected":p===X.id,tabIndex:p===X.id?0:-1,onClick:()=>x(X.id),children:X.label},X.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:258,columnNumber:11},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:256,columnNumber:7},this),a.jsxDEV("main",{children:[a.jsxDEV(os,{id:"welcome",tab:p,children:a.jsxDEV(ix,{onStartSession:()=>J(),onLaunchInstance:()=>E(!0),goTo:X=>x(X)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:265,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:265,columnNumber:9},this),a.jsxDEV(os,{id:"inventory",tab:p,children:a.jsxDEV(xx,{onStartSession:J,onLaunchInstance:()=>E(!0),onOpenDesktop:L?c:void 0,refreshTick:R},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:266,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:266,columnNumber:9},this),a.jsxDEV(os,{id:"running",tab:p,children:a.jsxDEV(jx,{refreshTick:R},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:267,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:267,columnNumber:9},this),a.jsxDEV(os,{id:"missions",tab:p,children:a.jsxDEV(Lx,{refreshTick:R},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:268,columnNumber:40},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:268,columnNumber:9},this),L&&a.jsxDEV(os,{id:"desktop",tab:p,children:q?a.jsxDEV(pC,{instanceId:q,onBack:()=>x("inventory")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:272,columnNumber:17},this):a.jsxDEV("section",{className:"empty-state",children:[a.jsxDEV("h2",{children:"No desktop selected"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:275,columnNumber:19},this),a.jsxDEV("p",{className:"hint",children:"Choose a running instance under Inventory and use Open Desktop."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:276,columnNumber:19},this),a.jsxDEV("button",{className:"cta",onClick:()=>x("inventory"),children:"Go to Inventory"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:277,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:274,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:270,columnNumber:11},this),a.jsxDEV("section",{id:"panel-sessions",role:"tabpanel","aria-labelledby":"tab-sessions",hidden:p!=="sessions",children:a.jsxDEV(oC,{session:b,composer:f,setComposer:m,onRequestStart:J,refreshTick:R},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:284,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:283,columnNumber:9},this),a.jsxDEV(os,{id:"approvals",tab:p,children:a.jsxDEV(bC,{refreshTick:R,responses:[...N,...b.responseNeeded.needed?[qC(b)]:[]],goSessions:()=>x("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:286,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:286,columnNumber:9},this),a.jsxDEV(os,{id:"explore",tab:p,children:a.jsxDEV(vC,{refreshTick:R},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:287,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:287,columnNumber:9},this),a.jsxDEV(os,{id:"library",tab:p,children:a.jsxDEV(gC,{session:b,setComposer:m,goSessions:()=>x("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:289,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:288,columnNumber:9},this),a.jsxDEV(os,{id:"telemetry",tab:p,children:a.jsxDEV(wC,{refreshTick:R},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:291,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:291,columnNumber:9},this),a.jsxDEV(os,{id:"activity",tab:p,children:a.jsxDEV(NC,{},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:292,columnNumber:40},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:292,columnNumber:9},this),a.jsxDEV(os,{id:"memory",tab:p,children:a.jsxDEV(EC,{refreshTick:R},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:293,columnNumber:38},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:293,columnNumber:9},this),a.jsxDEV(os,{id:"actions",tab:p,children:a.jsxDEV(_C,{refreshTick:R,session:b,setComposer:m,goSessions:()=>x("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:295,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:294,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:264,columnNumber:7},this),a.jsxDEV(DC,{open:l,onClose:()=>v(!1),session:b,onStarted:()=>x("sessions"),initialInstanceId:S},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:298,columnNumber:7},this),a.jsxDEV(RC,{open:k,onClose:()=>E(!1),onLaunched:$},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:305,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:229,columnNumber:5},this)}const x1=(()=>{const p=Number(window.AIWG_COCKPIT_SESSION_WAIT_S);return Number.isFinite(p)&&p>0?Math.floor(p):150})();async function zC(p,x){var ee,I;let L="",j="";for(let c=0;c<x1;c+=1){if(x){const w=await Le(`/api/operations/${encodeURIComponent(x)}`),C=String(w.state??"").toLowerCase(),y=((ee=w.result)==null?void 0:ee.instance_id)??((I=w.result)==null?void 0:I.instanceId);if(y&&!p&&(p=y),C==="failed")throw new Error(IC(w));C&&(j=$C(w),L=j)}const b=await Le("/api/inventory"),g=new Set(["stopped","failed","error","terminated","destroyed","exited","dead"]),N=p?b.instances.find(w=>w.id===p):null;if(N&&c>3&&g.has(String(N.state).toLowerCase()))throw new Error(`Instance ${N.id} did not come online — it settled to '${N.state}' instead of running`+(j?` (${j})`:"")+". Its agent likely failed to register; check the runtime and try again.");const f=b.instances.filter(w=>String(w.state).toLowerCase()==="running"),m=p?f.find(w=>w.id===p):null;if(m){const w=m.session_backends.find(C=>C.available!==!1)??m.session_backends[0];if(w&&w.available!==!1)return m;L=(w==null?void 0:w.reason)??`instance ${m.id} has no available backend yet`}else L=[j,p?`instance ${p} not visible in inventory yet`:"waiting for launch operation to report instance id"].filter(Boolean).join("; ");await HC(1e3)}const q=p?`Instance ${p}`:"The instance";throw new Error(`${q} launched and is still installing its loadout — its agent had not registered after ${x1}s (${L}). 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 IC(p){var x,L,j,q,ee,I;return typeof p.error=="string"?p.error:((x=p.failure)==null?void 0:x.message)??((L=p.failure)==null?void 0:L.detail)??((j=p.failure)==null?void 0:j.code)??((q=p.error)==null?void 0:q.message)??((ee=p.error)==null?void 0:ee.detail)??((I=p.error)==null?void 0:I.code)??`operation ${p.id??""} failed`}function $C(p){var L,j,q,ee,I;const x=[`operation ${p.id??""} is ${p.state??"unknown"}`];return(L=p.result)!=null&&L.runtime&&x.push(`runtime ${p.result.runtime}`),(j=p.result)!=null&&j.container_id&&x.push(`container ${p.result.container_id.slice(0,12)}`),(((q=p.result)==null?void 0:q.instance_id)??((ee=p.result)==null?void 0:ee.instanceId))&&x.push(`instance ${p.result.instance_id??p.result.instanceId}`),String(p.state??"").toLowerCase()==="succeeded"&&((I=p.result)!=null&&I.container_id)&&x.push("container was created, but no agent registered; see agentic-sandbox #501"),x.join("; ")}function qC(p){return{id:`pty:${p.state.url??"attached"}`,instance_id:"attached session",prompt:p.responseNeeded.prompt,source:p.responseNeeded.source,status:"response-needed",attach_url:p.state.url}}function os({id:p,tab:x,children:L}){return a.jsxDEV("section",{id:`panel-${p}`,role:"tabpanel","aria-labelledby":`tab-${p}`,hidden:x!==p,children:x===p?L:null},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/App.tsx",lineNumber:416,columnNumber:5},this)}UE.createRoot(document.getElementById("root")).render(a.jsxDEV(Z.StrictMode,{children:a.jsxDEV(UC,{},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/main.tsx",lineNumber:9,columnNumber:5},void 0)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-v2VJA1/web/src/main.tsx",lineNumber:8,columnNumber:3},void 0));