repoburg 1.3.199 → 1.3.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-pane/backend/data.db +0 -0
- package/agent-pane/backend/data.db-shm +0 -0
- package/agent-pane/backend/data.db-wal +0 -0
- package/agent-pane/backend/dist/index.js +1658 -277
- package/agent-pane/backend/src/claude/claude-provider.test.ts +393 -3
- package/agent-pane/backend/src/claude/claude-provider.ts +53 -50
- package/agent-pane/backend/src/db/index.ts +12 -0
- package/agent-pane/backend/src/index.ts +5 -2
- package/agent-pane/backend/src/integration/threads-claude-fork.test.ts +241 -0
- package/agent-pane/backend/src/providers/index.ts +3 -1
- package/agent-pane/backend/src/providers/runtime-provider.ts +6 -0
- package/agent-pane/backend/src/repoburg/action-mapping.test.ts +122 -0
- package/agent-pane/backend/src/repoburg/action-mapping.ts +294 -0
- package/agent-pane/backend/src/repoburg/agent-runtime-client.test.ts +271 -0
- package/agent-pane/backend/src/repoburg/agent-runtime-client.ts +285 -0
- package/agent-pane/backend/src/repoburg/backend-resolver.test.ts +356 -0
- package/agent-pane/backend/src/repoburg/backend-resolver.ts +261 -0
- package/agent-pane/backend/src/repoburg/repoburg-client.test.ts +180 -0
- package/agent-pane/backend/src/repoburg/repoburg-client.ts +194 -0
- package/agent-pane/backend/src/repoburg/repoburg-provider.test.ts +780 -0
- package/agent-pane/backend/src/repoburg/repoburg-provider.ts +471 -0
- package/agent-pane/backend/src/repoburg/turn-projector.test.ts +621 -0
- package/agent-pane/backend/src/repoburg/turn-projector.ts +637 -0
- package/agent-pane/backend/src/routes/providers.test.ts +18 -1
- package/agent-pane/backend/src/routes/providers.ts +19 -1
- package/agent-pane/backend/src/routes/sessions.test.ts +215 -1
- package/agent-pane/backend/src/routes/sessions.ts +82 -9
- package/agent-pane/backend/src/routes/threads.ts +21 -6
- package/agent-pane/backend/src/routes/turns.test.ts +45 -1
- package/agent-pane/frontend/dist/assets/index-CJxD4YmJ.js +370 -0
- package/agent-pane/frontend/dist/assets/{index-Dwwhx7YN.css → index-r-xwfOKQ.css} +1 -1
- package/agent-pane/frontend/dist/index.html +2 -2
- package/agent-pane/frontend/src/api/sessions.test.ts +1 -0
- package/agent-pane/frontend/src/api/websocket.test.ts +2 -2
- package/agent-pane/frontend/src/api/websocket.ts +3 -1
- package/agent-pane/frontend/src/components/AskUserItem.test.tsx +143 -0
- package/agent-pane/frontend/src/components/AskUserItem.tsx +207 -0
- package/agent-pane/frontend/src/components/CommentableText.test.tsx +196 -0
- package/agent-pane/frontend/src/components/CommentableText.tsx +109 -21
- package/agent-pane/frontend/src/components/IdeWorkspace.test.tsx +39 -0
- package/agent-pane/frontend/src/components/IdeWorkspace.tsx +28 -2
- package/agent-pane/frontend/src/components/ResizeHandle.tsx +29 -0
- package/agent-pane/frontend/src/components/TurnContent.test.tsx +79 -0
- package/agent-pane/frontend/src/components/TurnContent.tsx +49 -3
- package/agent-pane/frontend/src/components/panels/ThreadsPanel.tsx +35 -3
- package/agent-pane/frontend/src/components/panels/TurnsPanel.test.tsx +48 -0
- package/agent-pane/frontend/src/components/panels/TurnsPanel.tsx +7 -2
- package/agent-pane/frontend/src/constants/models.ts +37 -0
- package/agent-pane/frontend/src/hooks/useResizable.test.ts +97 -0
- package/agent-pane/frontend/src/hooks/useResizable.ts +75 -0
- package/agent-pane/frontend/src/store/store.test.ts +54 -0
- package/agent-pane/frontend/src/store/uiSlice.ts +50 -0
- package/agent-pane/frontend/src/store/wsSlice.ts +10 -3
- package/agent-pane/frontend/src/styles/app.css +26 -1
- package/agent-pane/frontend/src/test/component-helpers.ts +2 -0
- package/agent-pane/frontend/src/test/fixtures.ts +1 -0
- package/agent-pane/frontend/src/types/index.ts +2 -0
- package/agent-pane/frontend/src/utils/duration.test.ts +1 -0
- package/agent-pane/shared/types.ts +17 -0
- package/agent-pane-bug-repro-no-agent-reply.png +0 -0
- package/askuser-after-step5-postgres-selected.png +0 -0
- package/askuser-after-step7-answer-sent.png +0 -0
- package/askuser-card-visible.png +0 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.d.ts +36 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.js +199 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.js.map +1 -0
- package/backend/dist/src/agent-runtime/agent-runtime.controller.d.ts +11 -0
- package/backend/dist/src/agent-runtime/agent-runtime.controller.js +91 -0
- package/backend/dist/src/agent-runtime/agent-runtime.controller.js.map +1 -0
- package/backend/dist/src/agent-runtime/agent-runtime.module.d.ts +2 -0
- package/backend/dist/src/agent-runtime/agent-runtime.module.js +26 -0
- package/backend/dist/src/agent-runtime/agent-runtime.module.js.map +1 -0
- package/backend/dist/src/agent-runtime/agent-runtime.types.d.ts +92 -0
- package/backend/dist/src/agent-runtime/agent-runtime.types.js +3 -0
- package/backend/dist/src/agent-runtime/agent-runtime.types.js.map +1 -0
- package/backend/dist/src/app.controller.d.ts +1 -0
- package/backend/dist/src/app.module.js +4 -0
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/app.service.d.ts +1 -0
- package/backend/dist/src/app.service.js +4 -1
- package/backend/dist/src/app.service.js.map +1 -1
- package/backend/dist/src/interactive-chat/chat.module.js +4 -0
- package/backend/dist/src/interactive-chat/chat.module.js.map +1 -1
- package/backend/dist/src/interactive-chat/chat.service.d.ts +7 -1
- package/backend/dist/src/interactive-chat/chat.service.js +54 -7
- package/backend/dist/src/interactive-chat/chat.service.js.map +1 -1
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js +12 -1
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js.map +1 -1
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.d.ts +3 -1
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js +20 -2
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js.map +1 -1
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.d.ts +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js.map +1 -1
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +2 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -1
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.d.ts +4 -1
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js +37 -2
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js.map +1 -1
- package/backend/dist/src/llm-provider/ollama-llm.provider.d.ts +1 -0
- package/backend/dist/src/llm-provider/ollama-llm.provider.js +19 -1
- package/backend/dist/src/llm-provider/ollama-llm.provider.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.module.js +4 -0
- package/backend/dist/src/llm-responses/llm-responses.module.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.service.d.ts +4 -1
- package/backend/dist/src/llm-responses/llm-responses.service.js +52 -2
- package/backend/dist/src/llm-responses/llm-responses.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/daemon/dist/api/services.js +4 -0
- package/daemon/dist/index.js +0 -0
- package/daemon/dist/serviceManager.js +30 -11
- package/daemon/dist/serviceManager.spec.js +26 -0
- package/daemon/dist/workspace-validation.js +63 -0
- package/daemon/dist/workspace-validation.spec.js +63 -0
- package/package.json +1 -1
- package/r2-step4-apple-banana.png +0 -0
- package/r2-step5-after-rewind-apple-last.png +0 -0
- package/r2-step7-apple-cherry.png +0 -0
- package/r2-step8-cherry-menu-no-restore.png +0 -0
- package/r3-step3-live-task-card-running.png +0 -0
- package/r3-step4-after-completion.png +0 -0
- package/r3-step5-persistence-after-reload.png +0 -0
- package/r3-step6-tasks-tab-card.png +0 -0
- package/reverify-answered-state-answer-sent.png +0 -0
- package/reverify-card-visible-after-completion.png +0 -0
- package/rewind-step3-apple-banana-turns.png +0 -0
- package/rewind-step5-ui-unchanged-after-confirmed-rewind.png +0 -0
- package/rewind-step6-apple-menu-no-restore.png +0 -0
- package/rewind-step7-final-turnlist-unchanged.png +0 -0
- package/rewind-step7-negative-error-toast.png +0 -0
- package/rewind-step7-negative-error-toast2.png +0 -0
- package/subagent-r2-step5-turn-after-reload-no-card.png +0 -0
- package/subagent-r2-step6-tasks-panel-card.png +0 -0
- package/subagent-step3-tasks-tab-done-card.png +0 -0
- package/subagent-step4-turn-stuck-no-cards.png +0 -0
- package/agent-pane/frontend/dist/assets/index-BYo-lnxm.js +0 -362
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
var jh=Object.defineProperty;var Rh=(s,i,l)=>i in s?jh(s,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[i]=l;var Ge=(s,i,l)=>Rh(s,typeof i!="symbol"?i+"":i,l);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))a(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&a(h)}).observe(document,{childList:!0,subtree:!0});function l(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(d){if(d.ep)return;d.ep=!0;const f=l(d);fetch(d.href,f)}})();function wf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Na={exports:{}},ul={},Ea={exports:{}},Ne={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Ad;function Lh(){if(Ad)return Ne;Ad=1;var s=Symbol.for("react.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),S=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=S&&N[S]||N["@@iterator"],typeof N=="function"?N:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I=Object.assign,C={};function z(N,A,xe){this.props=N,this.context=A,this.refs=C,this.updater=xe||D}z.prototype.isReactComponent={},z.prototype.setState=function(N,A){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,A,"setState")},z.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function q(){}q.prototype=z.prototype;function G(N,A,xe){this.props=N,this.context=A,this.refs=C,this.updater=xe||D}var Y=G.prototype=new q;Y.constructor=G,I(Y,z.prototype),Y.isPureReactComponent=!0;var U=Array.isArray,ae=Object.prototype.hasOwnProperty,fe={current:null},ce={key:!0,ref:!0,__self:!0,__source:!0};function le(N,A,xe){var Se,Ee={},Ce=null,$e=null;if(A!=null)for(Se in A.ref!==void 0&&($e=A.ref),A.key!==void 0&&(Ce=""+A.key),A)ae.call(A,Se)&&!ce.hasOwnProperty(Se)&&(Ee[Se]=A[Se]);var Ie=arguments.length-2;if(Ie===1)Ee.children=xe;else if(1<Ie){for(var Be=Array(Ie),mt=0;mt<Ie;mt++)Be[mt]=arguments[mt+2];Ee.children=Be}if(N&&N.defaultProps)for(Se in Ie=N.defaultProps,Ie)Ee[Se]===void 0&&(Ee[Se]=Ie[Se]);return{$$typeof:s,type:N,key:Ce,ref:$e,props:Ee,_owner:fe.current}}function Te(N,A){return{$$typeof:s,type:N.type,key:A,ref:N.ref,props:N.props,_owner:N._owner}}function Z(N){return typeof N=="object"&&N!==null&&N.$$typeof===s}function _e(N){var A={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(xe){return A[xe]})}var ie=/\/+/g;function ye(N,A){return typeof N=="object"&&N!==null&&N.key!=null?_e(""+N.key):A.toString(36)}function re(N,A,xe,Se,Ee){var Ce=typeof N;(Ce==="undefined"||Ce==="boolean")&&(N=null);var $e=!1;if(N===null)$e=!0;else switch(Ce){case"string":case"number":$e=!0;break;case"object":switch(N.$$typeof){case s:case i:$e=!0}}if($e)return $e=N,Ee=Ee($e),N=Se===""?"."+ye($e,0):Se,U(Ee)?(xe="",N!=null&&(xe=N.replace(ie,"$&/")+"/"),re(Ee,A,xe,"",function(mt){return mt})):Ee!=null&&(Z(Ee)&&(Ee=Te(Ee,xe+(!Ee.key||$e&&$e.key===Ee.key?"":(""+Ee.key).replace(ie,"$&/")+"/")+N)),A.push(Ee)),1;if($e=0,Se=Se===""?".":Se+":",U(N))for(var Ie=0;Ie<N.length;Ie++){Ce=N[Ie];var Be=Se+ye(Ce,Ie);$e+=re(Ce,A,xe,Be,Ee)}else if(Be=w(N),typeof Be=="function")for(N=Be.call(N),Ie=0;!(Ce=N.next()).done;)Ce=Ce.value,Be=Se+ye(Ce,Ie++),$e+=re(Ce,A,xe,Be,Ee);else if(Ce==="object")throw A=String(N),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.");return $e}function b(N,A,xe){if(N==null)return N;var Se=[],Ee=0;return re(N,Se,"","",function(Ce){return A.call(xe,Ce,Ee++)}),Se}function ee(N){if(N._status===-1){var A=N._result;A=A(),A.then(function(xe){(N._status===0||N._status===-1)&&(N._status=1,N._result=xe)},function(xe){(N._status===0||N._status===-1)&&(N._status=2,N._result=xe)}),N._status===-1&&(N._status=0,N._result=A)}if(N._status===1)return N._result.default;throw N._result}var ge={current:null},B={transition:null},ue={ReactCurrentDispatcher:ge,ReactCurrentBatchConfig:B,ReactCurrentOwner:fe};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Ne.Children={map:b,forEach:function(N,A,xe){b(N,function(){A.apply(this,arguments)},xe)},count:function(N){var A=0;return b(N,function(){A++}),A},toArray:function(N){return b(N,function(A){return A})||[]},only:function(N){if(!Z(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Ne.Component=z,Ne.Fragment=l,Ne.Profiler=d,Ne.PureComponent=G,Ne.StrictMode=a,Ne.Suspense=x,Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ue,Ne.act=Q,Ne.cloneElement=function(N,A,xe){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var Se=I({},N.props),Ee=N.key,Ce=N.ref,$e=N._owner;if(A!=null){if(A.ref!==void 0&&(Ce=A.ref,$e=fe.current),A.key!==void 0&&(Ee=""+A.key),N.type&&N.type.defaultProps)var Ie=N.type.defaultProps;for(Be in A)ae.call(A,Be)&&!ce.hasOwnProperty(Be)&&(Se[Be]=A[Be]===void 0&&Ie!==void 0?Ie[Be]:A[Be])}var Be=arguments.length-2;if(Be===1)Se.children=xe;else if(1<Be){Ie=Array(Be);for(var mt=0;mt<Be;mt++)Ie[mt]=arguments[mt+2];Se.children=Ie}return{$$typeof:s,type:N.type,key:Ee,ref:Ce,props:Se,_owner:$e}},Ne.createContext=function(N){return N={$$typeof:h,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:f,_context:N},N.Consumer=N},Ne.createElement=le,Ne.createFactory=function(N){var A=le.bind(null,N);return A.type=N,A},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(N){return{$$typeof:m,render:N}},Ne.isValidElement=Z,Ne.lazy=function(N){return{$$typeof:k,_payload:{_status:-1,_result:N},_init:ee}},Ne.memo=function(N,A){return{$$typeof:v,type:N,compare:A===void 0?null:A}},Ne.startTransition=function(N){var A=B.transition;B.transition={};try{N()}finally{B.transition=A}},Ne.unstable_act=Q,Ne.useCallback=function(N,A){return ge.current.useCallback(N,A)},Ne.useContext=function(N){return ge.current.useContext(N)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(N){return ge.current.useDeferredValue(N)},Ne.useEffect=function(N,A){return ge.current.useEffect(N,A)},Ne.useId=function(){return ge.current.useId()},Ne.useImperativeHandle=function(N,A,xe){return ge.current.useImperativeHandle(N,A,xe)},Ne.useInsertionEffect=function(N,A){return ge.current.useInsertionEffect(N,A)},Ne.useLayoutEffect=function(N,A){return ge.current.useLayoutEffect(N,A)},Ne.useMemo=function(N,A){return ge.current.useMemo(N,A)},Ne.useReducer=function(N,A,xe){return ge.current.useReducer(N,A,xe)},Ne.useRef=function(N){return ge.current.useRef(N)},Ne.useState=function(N){return ge.current.useState(N)},Ne.useSyncExternalStore=function(N,A,xe){return ge.current.useSyncExternalStore(N,A,xe)},Ne.useTransition=function(){return ge.current.useTransition()},Ne.version="18.3.1",Ne}var Dd;function Ka(){return Dd||(Dd=1,Ea.exports=Lh()),Ea.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Pd;function Ih(){if(Pd)return ul;Pd=1;var s=Ka(),i=Symbol.for("react.element"),l=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function h(m,x,v){var k,S={},w=null,D=null;v!==void 0&&(w=""+v),x.key!==void 0&&(w=""+x.key),x.ref!==void 0&&(D=x.ref);for(k in x)a.call(x,k)&&!f.hasOwnProperty(k)&&(S[k]=x[k]);if(m&&m.defaultProps)for(k in x=m.defaultProps,x)S[k]===void 0&&(S[k]=x[k]);return{$$typeof:i,type:m,key:w,ref:D,props:S,_owner:d.current}}return ul.Fragment=l,ul.jsx=h,ul.jsxs=h,ul}var Md;function Ah(){return Md||(Md=1,Na.exports=Ih()),Na.exports}var c=Ah(),M=Ka();const ml=wf(M);var Ai={},Ca={exports:{}},Ft={},ja={exports:{}},Ra={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var zd;function Dh(){return zd||(zd=1,(function(s){function i(B,ue){var Q=B.length;B.push(ue);e:for(;0<Q;){var N=Q-1>>>1,A=B[N];if(0<d(A,ue))B[N]=ue,B[Q]=A,Q=N;else break e}}function l(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var ue=B[0],Q=B.pop();if(Q!==ue){B[0]=Q;e:for(var N=0,A=B.length,xe=A>>>1;N<xe;){var Se=2*(N+1)-1,Ee=B[Se],Ce=Se+1,$e=B[Ce];if(0>d(Ee,Q))Ce<A&&0>d($e,Ee)?(B[N]=$e,B[Ce]=Q,N=Ce):(B[N]=Ee,B[Se]=Q,N=Se);else if(Ce<A&&0>d($e,Q))B[N]=$e,B[Ce]=Q,N=Ce;else break e}}return ue}function d(B,ue){var Q=B.sortIndex-ue.sortIndex;return Q!==0?Q:B.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var h=Date,m=h.now();s.unstable_now=function(){return h.now()-m}}var x=[],v=[],k=1,S=null,w=3,D=!1,I=!1,C=!1,z=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Y(B){for(var ue=l(v);ue!==null;){if(ue.callback===null)a(v);else if(ue.startTime<=B)a(v),ue.sortIndex=ue.expirationTime,i(x,ue);else break;ue=l(v)}}function U(B){if(C=!1,Y(B),!I)if(l(x)!==null)I=!0,ee(ae);else{var ue=l(v);ue!==null&&ge(U,ue.startTime-B)}}function ae(B,ue){I=!1,C&&(C=!1,q(le),le=-1),D=!0;var Q=w;try{for(Y(ue),S=l(x);S!==null&&(!(S.expirationTime>ue)||B&&!_e());){var N=S.callback;if(typeof N=="function"){S.callback=null,w=S.priorityLevel;var A=N(S.expirationTime<=ue);ue=s.unstable_now(),typeof A=="function"?S.callback=A:S===l(x)&&a(x),Y(ue)}else a(x);S=l(x)}if(S!==null)var xe=!0;else{var Se=l(v);Se!==null&&ge(U,Se.startTime-ue),xe=!1}return xe}finally{S=null,w=Q,D=!1}}var fe=!1,ce=null,le=-1,Te=5,Z=-1;function _e(){return!(s.unstable_now()-Z<Te)}function ie(){if(ce!==null){var B=s.unstable_now();Z=B;var ue=!0;try{ue=ce(!0,B)}finally{ue?ye():(fe=!1,ce=null)}}else fe=!1}var ye;if(typeof G=="function")ye=function(){G(ie)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,b=re.port2;re.port1.onmessage=ie,ye=function(){b.postMessage(null)}}else ye=function(){z(ie,0)};function ee(B){ce=B,fe||(fe=!0,ye())}function ge(B,ue){le=z(function(){B(s.unstable_now())},ue)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(B){B.callback=null},s.unstable_continueExecution=function(){I||D||(I=!0,ee(ae))},s.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<B?Math.floor(1e3/B):5},s.unstable_getCurrentPriorityLevel=function(){return w},s.unstable_getFirstCallbackNode=function(){return l(x)},s.unstable_next=function(B){switch(w){case 1:case 2:case 3:var ue=3;break;default:ue=w}var Q=w;w=ue;try{return B()}finally{w=Q}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(B,ue){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Q=w;w=B;try{return ue()}finally{w=Q}},s.unstable_scheduleCallback=function(B,ue,Q){var N=s.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?N+Q:N):Q=N,B){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=Q+A,B={id:k++,callback:ue,priorityLevel:B,startTime:Q,expirationTime:A,sortIndex:-1},Q>N?(B.sortIndex=Q,i(v,B),l(x)===null&&B===l(v)&&(C?(q(le),le=-1):C=!0,ge(U,Q-N))):(B.sortIndex=A,i(x,B),I||D||(I=!0,ee(ae))),B},s.unstable_shouldYield=_e,s.unstable_wrapCallback=function(B){var ue=w;return function(){var Q=w;w=ue;try{return B.apply(this,arguments)}finally{w=Q}}}})(Ra)),Ra}var bd;function Ph(){return bd||(bd=1,ja.exports=Dh()),ja.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Od;function Mh(){if(Od)return Ft;Od=1;var s=Ka(),i=Ph();function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,d={};function f(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(d[e]=t,e=0;e<t.length;e++)a.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,v=/^[: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]*$/,k={},S={};function w(e){return x.call(S,e)?!0:x.call(k,e)?!1:v.test(e)?S[e]=!0:(k[e]=!0,!1)}function D(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function I(e,t,n,r){if(t===null||typeof t>"u"||D(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function C(e,t,n,r,o,u,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=p}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){z[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];z[t]=new C(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){z[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){z[e]=new C(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){z[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){z[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){z[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){z[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){z[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var q=/[\-:]([a-z])/g;function G(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(q,G);z[t]=new C(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(q,G);z[t]=new C(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(q,G);z[t]=new C(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){z[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),z.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){z[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function Y(e,t,n,r){var o=z.hasOwnProperty(t)?z[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(I(t,n,o,r)&&(n=null),r||o===null?w(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var U=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ae=Symbol.for("react.element"),fe=Symbol.for("react.portal"),ce=Symbol.for("react.fragment"),le=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),Z=Symbol.for("react.provider"),_e=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),ge=Symbol.for("react.offscreen"),B=Symbol.iterator;function ue(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Object.assign,N;function A(e){if(N===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return`
|
|
34
|
-
`+N+e}var xe=!1;function Se(e,t){if(!e||xe)return"";xe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(L){var r=L}Reflect.construct(e,[],t)}else{try{t.call()}catch(L){r=L}e.call(t.prototype)}else{try{throw Error()}catch(L){r=L}e()}}catch(L){if(L&&r&&typeof L.stack=="string"){for(var o=L.stack.split(`
|
|
35
|
-
`),u=r.stack.split(`
|
|
36
|
-
`),p=o.length-1,y=u.length-1;1<=p&&0<=y&&o[p]!==u[y];)y--;for(;1<=p&&0<=y;p--,y--)if(o[p]!==u[y]){if(p!==1||y!==1)do if(p--,y--,0>y||o[p]!==u[y]){var T=`
|
|
37
|
-
`+o[p].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),T}while(1<=p&&0<=y);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?A(e):""}function Ee(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=Se(e.type,!1),e;case 11:return e=Se(e.type.render,!1),e;case 1:return e=Se(e.type,!0),e;default:return""}}function Ce(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ce:return"Fragment";case fe:return"Portal";case Te:return"Profiler";case le:return"StrictMode";case ye:return"Suspense";case re:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _e:return(e.displayName||"Context")+".Consumer";case Z:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case b:return t=e.displayName||null,t!==null?t:Ce(e.type)||"Memo";case ee:t=e._payload,e=e._init;try{return Ce(e(t))}catch{}}return null}function $e(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";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 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ce(t);case 8:return t===le?"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 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ie(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Be(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mt(e){var t=Be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){r=""+p,u.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(p){r=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dn(e){e._valueTracker||(e._valueTracker=mt(e))}function Fe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Be(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fn(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 Me(e,t){var n=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Un(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ie(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function We(e,t){t=t.checked,t!=null&&Y(e,"checked",t,!1)}function Ut(e,t){We(e,t);var n=Ie(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?It(e,t.type,n):t.hasOwnProperty("defaultValue")&&It(e,t.type,Ie(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pr(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function It(e,t,n){(t!=="number"||fn(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pn=Array.isArray;function P(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ie(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function pe(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(l(91));return Q({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function He(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(l(92));if(pn(n)){if(1<n.length)throw Error(l(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ie(n)}}function Ve(e,t){var n=Ie(t.value),r=Ie(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ot(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function At(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kt(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var nn,hr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(nn=nn||document.createElement("div"),nn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=nn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vr=["Webkit","ms","Moz","O"];Object.keys(qt).forEach(function(e){Vr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qt[t]=qt[e]})});function mr(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qt.hasOwnProperty(e)&&qt[e]?(""+t).trim():t+"px"}function Ns(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=mr(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var _l=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Gr(e,t){if(t){if(_l[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(l(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(t.style!=null&&typeof t.style!="object")throw Error(l(62))}}function gr(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dt=null,mn=null,Nn=null;function Es(e){if(e=qs(e)){if(typeof Dt!="function")throw Error(l(280));var t=e.stateNode;t&&(t=Ql(t),Dt(e.stateNode,e.type,t))}}function Qr(e){mn?Nn?Nn.push(e):Nn=[e]:mn=e}function Cs(){if(mn){var e=mn,t=Nn;if(Nn=mn=null,Es(e),t)for(e=0;e<t.length;e++)Es(t[e])}}function vr(e,t){return e(t)}function yr(){}var Pt=!1;function En(e,t,n){if(Pt)return e(t,n);Pt=!0;try{return vr(e,t,n)}finally{Pt=!1,(mn!==null||Nn!==null)&&(yr(),Cs())}}function Cn(e,t){var n=e.stateNode;if(n===null)return null;var r=Ql(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(l(231,t,typeof n));return n}var xr=!1;if(m)try{var kr={};Object.defineProperty(kr,"passive",{get:function(){xr=!0}}),window.addEventListener("test",kr,kr),window.removeEventListener("test",kr,kr)}catch{xr=!1}function Nl(e,t,n,r,o,u,p,y,T){var L=Array.prototype.slice.call(arguments,3);try{t.apply(n,L)}catch(F){this.onError(F)}}var jn=!1,wr=null,Hn=!1,js=null,Sr={onError:function(e){jn=!0,wr=e}};function Gi(e,t,n,r,o,u,p,y,T){jn=!1,wr=null,Nl.apply(Sr,arguments)}function Qi(e,t,n,r,o,u,p,y,T){if(Gi.apply(this,arguments),jn){if(jn){var L=wr;jn=!1,wr=null}else throw Error(l(198));Hn||(Hn=!0,js=L)}}function Oe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Rn(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 El(e){if(Oe(e)!==e)throw Error(l(188))}function Cl(e){var t=e.alternate;if(!t){if(t=Oe(e),t===null)throw Error(l(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return El(o),e;if(u===r)return El(o),t;u=u.sibling}throw Error(l(188))}if(n.return!==r.return)n=o,r=u;else{for(var p=!1,y=o.child;y;){if(y===n){p=!0,n=o,r=u;break}if(y===r){p=!0,r=o,n=u;break}y=y.sibling}if(!p){for(y=u.child;y;){if(y===n){p=!0,n=u,r=o;break}if(y===r){p=!0,r=u,n=o;break}y=y.sibling}if(!p)throw Error(l(189))}}if(n.alternate!==r)throw Error(l(190))}if(n.tag!==3)throw Error(l(188));return n.stateNode.current===n?e:t}function qr(e){return e=Cl(e),e!==null?Rs(e):null}function Rs(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Rs(e);if(t!==null)return t;e=e.sibling}return null}var Ls=i.unstable_scheduleCallback,jl=i.unstable_cancelCallback,qi=i.unstable_shouldYield,Ki=i.unstable_requestPaint,Xe=i.unstable_now,gn=i.unstable_getCurrentPriorityLevel,Wn=i.unstable_ImmediatePriority,vn=i.unstable_UserBlockingPriority,Kr=i.unstable_NormalPriority,Tr=i.unstable_LowPriority,Rl=i.unstable_IdlePriority,_r=null,Bt=null;function Yr(e){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(_r,e,void 0,(e.current.flags&128)===128)}catch{}}var Et=Math.clz32?Math.clz32:Nr,Xr=Math.log,Vn=Math.LN2;function Nr(e){return e>>>=0,e===0?32:31-(Xr(e)/Vn|0)|0}var Ct=64,Zr=4194304;function Er(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Cr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,u=e.pingedLanes,p=n&268435455;if(p!==0){var y=p&~o;y!==0?r=Er(y):(u&=p,u!==0&&(r=Er(u)))}else p=n&~o,p!==0?r=Er(p):u!==0&&(r=Er(u));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,u=t&-t,o>=u||o===16&&(u&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Et(t),o=1<<n,r|=e[n],t&=~o;return r}function Ll(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Il(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes;0<u;){var p=31-Et(u),y=1<<p,T=o[p];T===-1?((y&n)===0||(y&r)!==0)&&(o[p]=Ll(y,t)):T<=t&&(e.expiredLanes|=y),u&=~y}}function Is(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function As(){var e=Ct;return Ct<<=1,(Ct&4194240)===0&&(Ct=64),e}function Ds(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Et(t),e[t]=n}function Al(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Et(n),u=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~u}}function Gn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Et(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ae=0;function W(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var g,E,O,ne,de,ke=!1,De=[],ze=null,Ze=null,Je=null,Ln=new Map,rt=new Map,Qn=[],Yf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function mu(e,t){switch(e){case"focusin":case"focusout":ze=null;break;case"dragenter":case"dragleave":Ze=null;break;case"mouseover":case"mouseout":Je=null;break;case"pointerover":case"pointerout":Ln.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rt.delete(t.pointerId)}}function Ps(e,t,n,r,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:u,targetContainers:[o]},t!==null&&(t=qs(t),t!==null&&E(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Xf(e,t,n,r,o){switch(t){case"focusin":return ze=Ps(ze,e,t,n,r,o),!0;case"dragenter":return Ze=Ps(Ze,e,t,n,r,o),!0;case"mouseover":return Je=Ps(Je,e,t,n,r,o),!0;case"pointerover":var u=o.pointerId;return Ln.set(u,Ps(Ln.get(u)||null,e,t,n,r,o)),!0;case"gotpointercapture":return u=o.pointerId,rt.set(u,Ps(rt.get(u)||null,e,t,n,r,o)),!0}return!1}function gu(e){var t=Rr(e.target);if(t!==null){var n=Oe(t);if(n!==null){if(t=n.tag,t===13){if(t=Rn(n),t!==null){e.blockedOn=t,de(e.priority,function(){O(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bn=r,n.target.dispatchEvent(r),Bn=null}else return t=qs(n),t!==null&&E(t),e.blockedOn=n,!1;t.shift()}return!0}function vu(e,t,n){Dl(e)&&n.delete(t)}function Zf(){ke=!1,ze!==null&&Dl(ze)&&(ze=null),Ze!==null&&Dl(Ze)&&(Ze=null),Je!==null&&Dl(Je)&&(Je=null),Ln.forEach(vu),rt.forEach(vu)}function Ms(e,t){e.blockedOn===t&&(e.blockedOn=null,ke||(ke=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Zf)))}function zs(e){function t(o){return Ms(o,e)}if(0<De.length){Ms(De[0],e);for(var n=1;n<De.length;n++){var r=De[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ze!==null&&Ms(ze,e),Ze!==null&&Ms(Ze,e),Je!==null&&Ms(Je,e),Ln.forEach(t),rt.forEach(t),n=0;n<Qn.length;n++)r=Qn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qn.length&&(n=Qn[0],n.blockedOn===null);)gu(n),n.blockedOn===null&&Qn.shift()}var Jr=U.ReactCurrentBatchConfig,Pl=!0;function Jf(e,t,n,r){var o=Ae,u=Jr.transition;Jr.transition=null;try{Ae=1,Yi(e,t,n,r)}finally{Ae=o,Jr.transition=u}}function ep(e,t,n,r){var o=Ae,u=Jr.transition;Jr.transition=null;try{Ae=4,Yi(e,t,n,r)}finally{Ae=o,Jr.transition=u}}function Yi(e,t,n,r){if(Pl){var o=Xi(e,t,n,r);if(o===null)mo(e,t,r,Ml,n),mu(e,r);else if(Xf(o,e,t,n,r))r.stopPropagation();else if(mu(e,r),t&4&&-1<Yf.indexOf(e)){for(;o!==null;){var u=qs(o);if(u!==null&&g(u),u=Xi(e,t,n,r),u===null&&mo(e,t,r,Ml,n),u===o)break;o=u}o!==null&&r.stopPropagation()}else mo(e,t,r,null,n)}}var Ml=null;function Xi(e,t,n,r){if(Ml=null,e=hn(r),e=Rr(e),e!==null)if(t=Oe(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Rn(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ml=e,null}function yu(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(gn()){case Wn:return 1;case vn:return 4;case Kr:case Tr:return 16;case Rl:return 536870912;default:return 16}default:return 16}}var qn=null,Zi=null,zl=null;function xu(){if(zl)return zl;var e,t=Zi,n=t.length,r,o="value"in qn?qn.value:qn.textContent,u=o.length;for(e=0;e<n&&t[e]===o[e];e++);var p=n-e;for(r=1;r<=p&&t[n-r]===o[u-r];r++);return zl=o.slice(e,1<r?1-r:void 0)}function bl(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 Ol(){return!0}function ku(){return!1}function Ht(e){function t(n,r,o,u,p){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(n=e[y],this[y]=n?n(u):u[y]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ol:ku,this.isPropagationStopped=ku,this}return Q(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ol)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ol)},persist:function(){},isPersistent:Ol}),t}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ji=Ht(es),bs=Q({},es,{view:0,detail:0}),tp=Ht(bs),eo,to,Os,$l=Q({},bs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ro,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!==Os&&(Os&&e.type==="mousemove"?(eo=e.screenX-Os.screenX,to=e.screenY-Os.screenY):to=eo=0,Os=e),eo)},movementY:function(e){return"movementY"in e?e.movementY:to}}),wu=Ht($l),np=Q({},$l,{dataTransfer:0}),rp=Ht(np),sp=Q({},bs,{relatedTarget:0}),no=Ht(sp),lp=Q({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),ip=Ht(lp),op=Q({},es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ap=Ht(op),up=Q({},es,{data:0}),Su=Ht(up),cp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dp={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"},fp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fp[e])?!!t[e]:!1}function ro(){return pp}var hp=Q({},bs,{key:function(e){if(e.key){var t=cp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ro,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mp=Ht(hp),gp=Q({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tu=Ht(gp),vp=Q({},bs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ro}),yp=Ht(vp),xp=Q({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),kp=Ht(xp),wp=Q({},$l,{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}),Sp=Ht(wp),Tp=[9,13,27,32],so=m&&"CompositionEvent"in window,$s=null;m&&"documentMode"in document&&($s=document.documentMode);var _p=m&&"TextEvent"in window&&!$s,_u=m&&(!so||$s&&8<$s&&11>=$s),Nu=" ",Eu=!1;function Cu(e,t){switch(e){case"keyup":return Tp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ju(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ts=!1;function Np(e,t){switch(e){case"compositionend":return ju(t);case"keypress":return t.which!==32?null:(Eu=!0,Nu);case"textInput":return e=t.data,e===Nu&&Eu?null:e;default:return null}}function Ep(e,t){if(ts)return e==="compositionend"||!so&&Cu(e,t)?(e=xu(),zl=Zi=qn=null,ts=!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 _u&&t.locale!=="ko"?null:t.data;default:return null}}var Cp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ru(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Cp[e.type]:t==="textarea"}function Lu(e,t,n,r){Qr(r),t=Wl(t,"onChange"),0<t.length&&(n=new Ji("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fs=null,Us=null;function jp(e){qu(e,0)}function Fl(e){var t=is(e);if(Fe(t))return e}function Rp(e,t){if(e==="change")return t}var Iu=!1;if(m){var lo;if(m){var io="oninput"in document;if(!io){var Au=document.createElement("div");Au.setAttribute("oninput","return;"),io=typeof Au.oninput=="function"}lo=io}else lo=!1;Iu=lo&&(!document.documentMode||9<document.documentMode)}function Du(){Fs&&(Fs.detachEvent("onpropertychange",Pu),Us=Fs=null)}function Pu(e){if(e.propertyName==="value"&&Fl(Us)){var t=[];Lu(t,Us,e,hn(e)),En(jp,t)}}function Lp(e,t,n){e==="focusin"?(Du(),Fs=t,Us=n,Fs.attachEvent("onpropertychange",Pu)):e==="focusout"&&Du()}function Ip(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fl(Us)}function Ap(e,t){if(e==="click")return Fl(t)}function Dp(e,t){if(e==="input"||e==="change")return Fl(t)}function Pp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rn=typeof Object.is=="function"?Object.is:Pp;function Bs(e,t){if(rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!x.call(t,o)||!rn(e[o],t[o]))return!1}return!0}function Mu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zu(e,t){var n=Mu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Mu(n)}}function bu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ou(){for(var e=window,t=fn();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fn(e.document)}return t}function oo(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 Mp(e){var t=Ou(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bu(n.ownerDocument.documentElement,n)){if(r!==null&&oo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,u=Math.min(r.start,o);r=r.end===void 0?u:Math.min(r.end,o),!e.extend&&u>r&&(o=r,r=u,u=o),o=zu(n,u);var p=zu(n,r);o&&p&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zp=m&&"documentMode"in document&&11>=document.documentMode,ns=null,ao=null,Hs=null,uo=!1;function $u(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uo||ns==null||ns!==fn(r)||(r=ns,"selectionStart"in r&&oo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hs&&Bs(Hs,r)||(Hs=r,r=Wl(ao,"onSelect"),0<r.length&&(t=new Ji("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ns)))}function Ul(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var rs={animationend:Ul("Animation","AnimationEnd"),animationiteration:Ul("Animation","AnimationIteration"),animationstart:Ul("Animation","AnimationStart"),transitionend:Ul("Transition","TransitionEnd")},co={},Fu={};m&&(Fu=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function Bl(e){if(co[e])return co[e];if(!rs[e])return e;var t=rs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fu)return co[e]=t[n];return e}var Uu=Bl("animationend"),Bu=Bl("animationiteration"),Hu=Bl("animationstart"),Wu=Bl("transitionend"),Vu=new Map,Gu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Kn(e,t){Vu.set(e,t),f(t,[e])}for(var fo=0;fo<Gu.length;fo++){var po=Gu[fo],bp=po.toLowerCase(),Op=po[0].toUpperCase()+po.slice(1);Kn(bp,"on"+Op)}Kn(Uu,"onAnimationEnd"),Kn(Bu,"onAnimationIteration"),Kn(Hu,"onAnimationStart"),Kn("dblclick","onDoubleClick"),Kn("focusin","onFocus"),Kn("focusout","onBlur"),Kn(Wu,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),f("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),f("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),f("onBeforeInput",["compositionend","keypress","textInput","paste"]),f("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ws="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(" "),$p=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ws));function Qu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Qi(r,t,void 0,e),e.currentTarget=null}function qu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var p=r.length-1;0<=p;p--){var y=r[p],T=y.instance,L=y.currentTarget;if(y=y.listener,T!==u&&o.isPropagationStopped())break e;Qu(o,y,L),u=T}else for(p=0;p<r.length;p++){if(y=r[p],T=y.instance,L=y.currentTarget,y=y.listener,T!==u&&o.isPropagationStopped())break e;Qu(o,y,L),u=T}}}if(Hn)throw e=js,Hn=!1,js=null,e}function qe(e,t){var n=t[wo];n===void 0&&(n=t[wo]=new Set);var r=e+"__bubble";n.has(r)||(Ku(t,e,2,!1),n.add(r))}function ho(e,t,n){var r=0;t&&(r|=4),Ku(n,e,r,t)}var Hl="_reactListening"+Math.random().toString(36).slice(2);function Vs(e){if(!e[Hl]){e[Hl]=!0,a.forEach(function(n){n!=="selectionchange"&&($p.has(n)||ho(n,!1,e),ho(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hl]||(t[Hl]=!0,ho("selectionchange",!1,t))}}function Ku(e,t,n,r){switch(yu(t)){case 1:var o=Jf;break;case 4:o=ep;break;default:o=Yi}n=o.bind(null,t,n,e),o=void 0,!xr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function mo(e,t,n,r,o){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var p=r.tag;if(p===3||p===4){var y=r.stateNode.containerInfo;if(y===o||y.nodeType===8&&y.parentNode===o)break;if(p===4)for(p=r.return;p!==null;){var T=p.tag;if((T===3||T===4)&&(T=p.stateNode.containerInfo,T===o||T.nodeType===8&&T.parentNode===o))return;p=p.return}for(;y!==null;){if(p=Rr(y),p===null)return;if(T=p.tag,T===5||T===6){r=u=p;continue e}y=y.parentNode}}r=r.return}En(function(){var L=u,F=hn(n),H=[];e:{var $=Vu.get(e);if($!==void 0){var X=Ji,te=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":X=mp;break;case"focusin":te="focus",X=no;break;case"focusout":te="blur",X=no;break;case"beforeblur":case"afterblur":X=no;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=wu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=rp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=yp;break;case Uu:case Bu:case Hu:X=ip;break;case Wu:X=kp;break;case"scroll":X=tp;break;case"wheel":X=Sp;break;case"copy":case"cut":case"paste":X=ap;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Tu}var se=(t&4)!==0,st=!se&&e==="scroll",j=se?$!==null?$+"Capture":null:$;se=[];for(var _=L,R;_!==null;){R=_;var V=R.stateNode;if(R.tag===5&&V!==null&&(R=V,j!==null&&(V=Cn(_,j),V!=null&&se.push(Gs(_,V,R)))),st)break;_=_.return}0<se.length&&($=new X($,te,null,n,F),H.push({event:$,listeners:se}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",$&&n!==Bn&&(te=n.relatedTarget||n.fromElement)&&(Rr(te)||te[In]))break e;if((X||$)&&($=F.window===F?F:($=F.ownerDocument)?$.defaultView||$.parentWindow:window,X?(te=n.relatedTarget||n.toElement,X=L,te=te?Rr(te):null,te!==null&&(st=Oe(te),te!==st||te.tag!==5&&te.tag!==6)&&(te=null)):(X=null,te=L),X!==te)){if(se=wu,V="onMouseLeave",j="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(se=Tu,V="onPointerLeave",j="onPointerEnter",_="pointer"),st=X==null?$:is(X),R=te==null?$:is(te),$=new se(V,_+"leave",X,n,F),$.target=st,$.relatedTarget=R,V=null,Rr(F)===L&&(se=new se(j,_+"enter",te,n,F),se.target=R,se.relatedTarget=st,V=se),st=V,X&&te)t:{for(se=X,j=te,_=0,R=se;R;R=ss(R))_++;for(R=0,V=j;V;V=ss(V))R++;for(;0<_-R;)se=ss(se),_--;for(;0<R-_;)j=ss(j),R--;for(;_--;){if(se===j||j!==null&&se===j.alternate)break t;se=ss(se),j=ss(j)}se=null}else se=null;X!==null&&Yu(H,$,X,se,!1),te!==null&&st!==null&&Yu(H,st,te,se,!0)}}e:{if($=L?is(L):window,X=$.nodeName&&$.nodeName.toLowerCase(),X==="select"||X==="input"&&$.type==="file")var oe=Rp;else if(Ru($))if(Iu)oe=Dp;else{oe=Ip;var he=Lp}else(X=$.nodeName)&&X.toLowerCase()==="input"&&($.type==="checkbox"||$.type==="radio")&&(oe=Ap);if(oe&&(oe=oe(e,L))){Lu(H,oe,n,F);break e}he&&he(e,$,L),e==="focusout"&&(he=$._wrapperState)&&he.controlled&&$.type==="number"&&It($,"number",$.value)}switch(he=L?is(L):window,e){case"focusin":(Ru(he)||he.contentEditable==="true")&&(ns=he,ao=L,Hs=null);break;case"focusout":Hs=ao=ns=null;break;case"mousedown":uo=!0;break;case"contextmenu":case"mouseup":case"dragend":uo=!1,$u(H,n,F);break;case"selectionchange":if(zp)break;case"keydown":case"keyup":$u(H,n,F)}var me;if(so)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 ts?Cu(e,n)&&(ve="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ve="onCompositionStart");ve&&(_u&&n.locale!=="ko"&&(ts||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&ts&&(me=xu()):(qn=F,Zi="value"in qn?qn.value:qn.textContent,ts=!0)),he=Wl(L,ve),0<he.length&&(ve=new Su(ve,e,null,n,F),H.push({event:ve,listeners:he}),me?ve.data=me:(me=ju(n),me!==null&&(ve.data=me)))),(me=_p?Np(e,n):Ep(e,n))&&(L=Wl(L,"onBeforeInput"),0<L.length&&(F=new Su("onBeforeInput","beforeinput",null,n,F),H.push({event:F,listeners:L}),F.data=me))}qu(H,t)})}function Gs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,u=o.stateNode;o.tag===5&&u!==null&&(o=u,u=Cn(e,n),u!=null&&r.unshift(Gs(e,u,o)),u=Cn(e,t),u!=null&&r.push(Gs(e,u,o))),e=e.return}return r}function ss(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Yu(e,t,n,r,o){for(var u=t._reactName,p=[];n!==null&&n!==r;){var y=n,T=y.alternate,L=y.stateNode;if(T!==null&&T===r)break;y.tag===5&&L!==null&&(y=L,o?(T=Cn(n,u),T!=null&&p.unshift(Gs(n,T,y))):o||(T=Cn(n,u),T!=null&&p.push(Gs(n,T,y)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var Fp=/\r\n?/g,Up=/\u0000|\uFFFD/g;function Xu(e){return(typeof e=="string"?e:""+e).replace(Fp,`
|
|
38
|
-
`).replace(Up,"")}function Vl(e,t,n){if(t=Xu(t),Xu(e)!==t&&n)throw Error(l(425))}function Gl(){}var go=null,vo=null;function yo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xo=typeof setTimeout=="function"?setTimeout:void 0,Bp=typeof clearTimeout=="function"?clearTimeout:void 0,Zu=typeof Promise=="function"?Promise:void 0,Hp=typeof queueMicrotask=="function"?queueMicrotask:typeof Zu<"u"?function(e){return Zu.resolve(null).then(e).catch(Wp)}:xo;function Wp(e){setTimeout(function(){throw e})}function ko(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),zs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);zs(t)}function Yn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ju(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ls=Math.random().toString(36).slice(2),yn="__reactFiber$"+ls,Qs="__reactProps$"+ls,In="__reactContainer$"+ls,wo="__reactEvents$"+ls,Vp="__reactListeners$"+ls,Gp="__reactHandles$"+ls;function Rr(e){var t=e[yn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[In]||n[yn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ju(e);e!==null;){if(n=e[yn])return n;e=Ju(e)}return t}e=n,n=e.parentNode}return null}function qs(e){return e=e[yn]||e[In],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function is(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function Ql(e){return e[Qs]||null}var So=[],os=-1;function Xn(e){return{current:e}}function Ke(e){0>os||(e.current=So[os],So[os]=null,os--)}function Qe(e,t){os++,So[os]=e.current,e.current=t}var Zn={},wt=Xn(Zn),Mt=Xn(!1),Lr=Zn;function as(e,t){var n=e.type.contextTypes;if(!n)return Zn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},u;for(u in n)o[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function zt(e){return e=e.childContextTypes,e!=null}function ql(){Ke(Mt),Ke(wt)}function ec(e,t,n){if(wt.current!==Zn)throw Error(l(168));Qe(wt,t),Qe(Mt,n)}function tc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(l(108,$e(e)||"Unknown",o));return Q({},n,r)}function Kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zn,Lr=wt.current,Qe(wt,e),Qe(Mt,Mt.current),!0}function nc(e,t,n){var r=e.stateNode;if(!r)throw Error(l(169));n?(e=tc(e,t,Lr),r.__reactInternalMemoizedMergedChildContext=e,Ke(Mt),Ke(wt),Qe(wt,e)):Ke(Mt),Qe(Mt,n)}var An=null,Yl=!1,To=!1;function rc(e){An===null?An=[e]:An.push(e)}function Qp(e){Yl=!0,rc(e)}function Jn(){if(!To&&An!==null){To=!0;var e=0,t=Ae;try{var n=An;for(Ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}An=null,Yl=!1}catch(o){throw An!==null&&(An=An.slice(e+1)),Ls(Wn,Jn),o}finally{Ae=t,To=!1}}return null}var us=[],cs=0,Xl=null,Zl=0,Kt=[],Yt=0,Ir=null,Dn=1,Pn="";function Ar(e,t){us[cs++]=Zl,us[cs++]=Xl,Xl=e,Zl=t}function sc(e,t,n){Kt[Yt++]=Dn,Kt[Yt++]=Pn,Kt[Yt++]=Ir,Ir=e;var r=Dn;e=Pn;var o=32-Et(r)-1;r&=~(1<<o),n+=1;var u=32-Et(t)+o;if(30<u){var p=o-o%5;u=(r&(1<<p)-1).toString(32),r>>=p,o-=p,Dn=1<<32-Et(t)+o|n<<o|r,Pn=u+e}else Dn=1<<u|n<<o|r,Pn=e}function _o(e){e.return!==null&&(Ar(e,1),sc(e,1,0))}function No(e){for(;e===Xl;)Xl=us[--cs],us[cs]=null,Zl=us[--cs],us[cs]=null;for(;e===Ir;)Ir=Kt[--Yt],Kt[Yt]=null,Pn=Kt[--Yt],Kt[Yt]=null,Dn=Kt[--Yt],Kt[Yt]=null}var Wt=null,Vt=null,Ye=!1,sn=null;function lc(e,t){var n=en(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ic(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,Vt=Yn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ir!==null?{id:Dn,overflow:Pn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=en(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Vt=null,!0):!1;default:return!1}}function Eo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Co(e){if(Ye){var t=Vt;if(t){var n=t;if(!ic(e,t)){if(Eo(e))throw Error(l(418));t=Yn(n.nextSibling);var r=Wt;t&&ic(e,t)?lc(r,n):(e.flags=e.flags&-4097|2,Ye=!1,Wt=e)}}else{if(Eo(e))throw Error(l(418));e.flags=e.flags&-4097|2,Ye=!1,Wt=e}}}function oc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Jl(e){if(e!==Wt)return!1;if(!Ye)return oc(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yo(e.type,e.memoizedProps)),t&&(t=Vt)){if(Eo(e))throw ac(),Error(l(418));for(;t;)lc(e,t),t=Yn(t.nextSibling)}if(oc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vt=Yn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Wt?Yn(e.stateNode.nextSibling):null;return!0}function ac(){for(var e=Vt;e;)e=Yn(e.nextSibling)}function ds(){Vt=Wt=null,Ye=!1}function jo(e){sn===null?sn=[e]:sn.push(e)}var qp=U.ReactCurrentBatchConfig;function Ks(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(l(309));var r=n.stateNode}if(!r)throw Error(l(147,e));var o=r,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(p){var y=o.refs;p===null?delete y[u]:y[u]=p},t._stringRef=u,t)}if(typeof e!="string")throw Error(l(284));if(!n._owner)throw Error(l(290,e))}return e}function ei(e,t){throw e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uc(e){var t=e._init;return t(e._payload)}function cc(e){function t(j,_){if(e){var R=j.deletions;R===null?(j.deletions=[_],j.flags|=16):R.push(_)}}function n(j,_){if(!e)return null;for(;_!==null;)t(j,_),_=_.sibling;return null}function r(j,_){for(j=new Map;_!==null;)_.key!==null?j.set(_.key,_):j.set(_.index,_),_=_.sibling;return j}function o(j,_){return j=or(j,_),j.index=0,j.sibling=null,j}function u(j,_,R){return j.index=R,e?(R=j.alternate,R!==null?(R=R.index,R<_?(j.flags|=2,_):R):(j.flags|=2,_)):(j.flags|=1048576,_)}function p(j){return e&&j.alternate===null&&(j.flags|=2),j}function y(j,_,R,V){return _===null||_.tag!==6?(_=xa(R,j.mode,V),_.return=j,_):(_=o(_,R),_.return=j,_)}function T(j,_,R,V){var oe=R.type;return oe===ce?F(j,_,R.props.children,V,R.key):_!==null&&(_.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===ee&&uc(oe)===_.type)?(V=o(_,R.props),V.ref=Ks(j,_,R),V.return=j,V):(V=_i(R.type,R.key,R.props,null,j.mode,V),V.ref=Ks(j,_,R),V.return=j,V)}function L(j,_,R,V){return _===null||_.tag!==4||_.stateNode.containerInfo!==R.containerInfo||_.stateNode.implementation!==R.implementation?(_=ka(R,j.mode,V),_.return=j,_):(_=o(_,R.children||[]),_.return=j,_)}function F(j,_,R,V,oe){return _===null||_.tag!==7?(_=Fr(R,j.mode,V,oe),_.return=j,_):(_=o(_,R),_.return=j,_)}function H(j,_,R){if(typeof _=="string"&&_!==""||typeof _=="number")return _=xa(""+_,j.mode,R),_.return=j,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ae:return R=_i(_.type,_.key,_.props,null,j.mode,R),R.ref=Ks(j,null,_),R.return=j,R;case fe:return _=ka(_,j.mode,R),_.return=j,_;case ee:var V=_._init;return H(j,V(_._payload),R)}if(pn(_)||ue(_))return _=Fr(_,j.mode,R,null),_.return=j,_;ei(j,_)}return null}function $(j,_,R,V){var oe=_!==null?_.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return oe!==null?null:y(j,_,""+R,V);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case ae:return R.key===oe?T(j,_,R,V):null;case fe:return R.key===oe?L(j,_,R,V):null;case ee:return oe=R._init,$(j,_,oe(R._payload),V)}if(pn(R)||ue(R))return oe!==null?null:F(j,_,R,V,null);ei(j,R)}return null}function X(j,_,R,V,oe){if(typeof V=="string"&&V!==""||typeof V=="number")return j=j.get(R)||null,y(_,j,""+V,oe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case ae:return j=j.get(V.key===null?R:V.key)||null,T(_,j,V,oe);case fe:return j=j.get(V.key===null?R:V.key)||null,L(_,j,V,oe);case ee:var he=V._init;return X(j,_,R,he(V._payload),oe)}if(pn(V)||ue(V))return j=j.get(R)||null,F(_,j,V,oe,null);ei(_,V)}return null}function te(j,_,R,V){for(var oe=null,he=null,me=_,ve=_=0,ft=null;me!==null&&ve<R.length;ve++){me.index>ve?(ft=me,me=null):ft=me.sibling;var be=$(j,me,R[ve],V);if(be===null){me===null&&(me=ft);break}e&&me&&be.alternate===null&&t(j,me),_=u(be,_,ve),he===null?oe=be:he.sibling=be,he=be,me=ft}if(ve===R.length)return n(j,me),Ye&&Ar(j,ve),oe;if(me===null){for(;ve<R.length;ve++)me=H(j,R[ve],V),me!==null&&(_=u(me,_,ve),he===null?oe=me:he.sibling=me,he=me);return Ye&&Ar(j,ve),oe}for(me=r(j,me);ve<R.length;ve++)ft=X(me,j,ve,R[ve],V),ft!==null&&(e&&ft.alternate!==null&&me.delete(ft.key===null?ve:ft.key),_=u(ft,_,ve),he===null?oe=ft:he.sibling=ft,he=ft);return e&&me.forEach(function(ar){return t(j,ar)}),Ye&&Ar(j,ve),oe}function se(j,_,R,V){var oe=ue(R);if(typeof oe!="function")throw Error(l(150));if(R=oe.call(R),R==null)throw Error(l(151));for(var he=oe=null,me=_,ve=_=0,ft=null,be=R.next();me!==null&&!be.done;ve++,be=R.next()){me.index>ve?(ft=me,me=null):ft=me.sibling;var ar=$(j,me,be.value,V);if(ar===null){me===null&&(me=ft);break}e&&me&&ar.alternate===null&&t(j,me),_=u(ar,_,ve),he===null?oe=ar:he.sibling=ar,he=ar,me=ft}if(be.done)return n(j,me),Ye&&Ar(j,ve),oe;if(me===null){for(;!be.done;ve++,be=R.next())be=H(j,be.value,V),be!==null&&(_=u(be,_,ve),he===null?oe=be:he.sibling=be,he=be);return Ye&&Ar(j,ve),oe}for(me=r(j,me);!be.done;ve++,be=R.next())be=X(me,j,ve,be.value,V),be!==null&&(e&&be.alternate!==null&&me.delete(be.key===null?ve:be.key),_=u(be,_,ve),he===null?oe=be:he.sibling=be,he=be);return e&&me.forEach(function(Ch){return t(j,Ch)}),Ye&&Ar(j,ve),oe}function st(j,_,R,V){if(typeof R=="object"&&R!==null&&R.type===ce&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case ae:e:{for(var oe=R.key,he=_;he!==null;){if(he.key===oe){if(oe=R.type,oe===ce){if(he.tag===7){n(j,he.sibling),_=o(he,R.props.children),_.return=j,j=_;break e}}else if(he.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===ee&&uc(oe)===he.type){n(j,he.sibling),_=o(he,R.props),_.ref=Ks(j,he,R),_.return=j,j=_;break e}n(j,he);break}else t(j,he);he=he.sibling}R.type===ce?(_=Fr(R.props.children,j.mode,V,R.key),_.return=j,j=_):(V=_i(R.type,R.key,R.props,null,j.mode,V),V.ref=Ks(j,_,R),V.return=j,j=V)}return p(j);case fe:e:{for(he=R.key;_!==null;){if(_.key===he)if(_.tag===4&&_.stateNode.containerInfo===R.containerInfo&&_.stateNode.implementation===R.implementation){n(j,_.sibling),_=o(_,R.children||[]),_.return=j,j=_;break e}else{n(j,_);break}else t(j,_);_=_.sibling}_=ka(R,j.mode,V),_.return=j,j=_}return p(j);case ee:return he=R._init,st(j,_,he(R._payload),V)}if(pn(R))return te(j,_,R,V);if(ue(R))return se(j,_,R,V);ei(j,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,_!==null&&_.tag===6?(n(j,_.sibling),_=o(_,R),_.return=j,j=_):(n(j,_),_=xa(R,j.mode,V),_.return=j,j=_),p(j)):n(j,_)}return st}var fs=cc(!0),dc=cc(!1),ti=Xn(null),ni=null,ps=null,Ro=null;function Lo(){Ro=ps=ni=null}function Io(e){var t=ti.current;Ke(ti),e._currentValue=t}function Ao(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function hs(e,t){ni=e,Ro=ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(bt=!0),e.firstContext=null)}function Xt(e){var t=e._currentValue;if(Ro!==e)if(e={context:e,memoizedValue:t,next:null},ps===null){if(ni===null)throw Error(l(308));ps=e,ni.dependencies={lanes:0,firstContext:e}}else ps=ps.next=e;return t}var Dr=null;function Do(e){Dr===null?Dr=[e]:Dr.push(e)}function fc(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Do(t)):(n.next=o.next,o.next=n),t.interleaved=n,Mn(e,r)}function Mn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var er=!1;function Po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Mn(e,n)}return o=r.interleaved,o===null?(t.next=t,Do(r)):(t.next=o.next,o.next=t),r.interleaved=t,Mn(e,n)}function ri(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gn(e,n)}}function hc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var p={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?o=u=p:u=u.next=p,n=n.next}while(n!==null);u===null?o=u=t:u=u.next=t}else o=u=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function si(e,t,n,r){var o=e.updateQueue;er=!1;var u=o.firstBaseUpdate,p=o.lastBaseUpdate,y=o.shared.pending;if(y!==null){o.shared.pending=null;var T=y,L=T.next;T.next=null,p===null?u=L:p.next=L,p=T;var F=e.alternate;F!==null&&(F=F.updateQueue,y=F.lastBaseUpdate,y!==p&&(y===null?F.firstBaseUpdate=L:y.next=L,F.lastBaseUpdate=T))}if(u!==null){var H=o.baseState;p=0,F=L=T=null,y=u;do{var $=y.lane,X=y.eventTime;if((r&$)===$){F!==null&&(F=F.next={eventTime:X,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var te=e,se=y;switch($=t,X=n,se.tag){case 1:if(te=se.payload,typeof te=="function"){H=te.call(X,H,$);break e}H=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=se.payload,$=typeof te=="function"?te.call(X,H,$):te,$==null)break e;H=Q({},H,$);break e;case 2:er=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,$=o.effects,$===null?o.effects=[y]:$.push(y))}else X={eventTime:X,lane:$,tag:y.tag,payload:y.payload,callback:y.callback,next:null},F===null?(L=F=X,T=H):F=F.next=X,p|=$;if(y=y.next,y===null){if(y=o.shared.pending,y===null)break;$=y,y=$.next,$.next=null,o.lastBaseUpdate=$,o.shared.pending=null}}while(!0);if(F===null&&(T=H),o.baseState=T,o.firstBaseUpdate=L,o.lastBaseUpdate=F,t=o.shared.interleaved,t!==null){o=t;do p|=o.lane,o=o.next;while(o!==t)}else u===null&&(o.shared.lanes=0);zr|=p,e.lanes=p,e.memoizedState=H}}function mc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(l(191,o));o.call(r)}}}var Ys={},xn=Xn(Ys),Xs=Xn(Ys),Zs=Xn(Ys);function Pr(e){if(e===Ys)throw Error(l(174));return e}function Mo(e,t){switch(Qe(Zs,t),Qe(Xs,e),Qe(xn,Ys),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:At(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=At(t,e)}Ke(xn),Qe(xn,t)}function ms(){Ke(xn),Ke(Xs),Ke(Zs)}function gc(e){Pr(Zs.current);var t=Pr(xn.current),n=At(t,e.type);t!==n&&(Qe(Xs,e),Qe(xn,n))}function zo(e){Xs.current===e&&(Ke(xn),Ke(Xs))}var et=Xn(0);function li(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bo=[];function Oo(){for(var e=0;e<bo.length;e++)bo[e]._workInProgressVersionPrimary=null;bo.length=0}var ii=U.ReactCurrentDispatcher,$o=U.ReactCurrentBatchConfig,Mr=0,tt=null,at=null,ct=null,oi=!1,Js=!1,el=0,Kp=0;function St(){throw Error(l(321))}function Fo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!rn(e[n],t[n]))return!1;return!0}function Uo(e,t,n,r,o,u){if(Mr=u,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ii.current=e===null||e.memoizedState===null?Jp:eh,e=n(r,o),Js){u=0;do{if(Js=!1,el=0,25<=u)throw Error(l(301));u+=1,ct=at=null,t.updateQueue=null,ii.current=th,e=n(r,o)}while(Js)}if(ii.current=ci,t=at!==null&&at.next!==null,Mr=0,ct=at=tt=null,oi=!1,t)throw Error(l(300));return e}function Bo(){var e=el!==0;return el=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?tt.memoizedState=ct=e:ct=ct.next=e,ct}function Zt(){if(at===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=ct===null?tt.memoizedState:ct.next;if(t!==null)ct=t,at=e;else{if(e===null)throw Error(l(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},ct===null?tt.memoizedState=ct=e:ct=ct.next=e}return ct}function tl(e,t){return typeof t=="function"?t(e):t}function Ho(e){var t=Zt(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var r=at,o=r.baseQueue,u=n.pending;if(u!==null){if(o!==null){var p=o.next;o.next=u.next,u.next=p}r.baseQueue=o=u,n.pending=null}if(o!==null){u=o.next,r=r.baseState;var y=p=null,T=null,L=u;do{var F=L.lane;if((Mr&F)===F)T!==null&&(T=T.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),r=L.hasEagerState?L.eagerState:e(r,L.action);else{var H={lane:F,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};T===null?(y=T=H,p=r):T=T.next=H,tt.lanes|=F,zr|=F}L=L.next}while(L!==null&&L!==u);T===null?p=r:T.next=y,rn(r,t.memoizedState)||(bt=!0),t.memoizedState=r,t.baseState=p,t.baseQueue=T,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do u=o.lane,tt.lanes|=u,zr|=u,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wo(e){var t=Zt(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,u=t.memoizedState;if(o!==null){n.pending=null;var p=o=o.next;do u=e(u,p.action),p=p.next;while(p!==o);rn(u,t.memoizedState)||(bt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,r]}function vc(){}function yc(e,t){var n=tt,r=Zt(),o=t(),u=!rn(r.memoizedState,o);if(u&&(r.memoizedState=o,bt=!0),r=r.queue,Vo(wc.bind(null,n,r,e),[e]),r.getSnapshot!==t||u||ct!==null&&ct.memoizedState.tag&1){if(n.flags|=2048,nl(9,kc.bind(null,n,r,o,t),void 0,null),dt===null)throw Error(l(349));(Mr&30)!==0||xc(n,t,o)}return o}function xc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kc(e,t,n,r){t.value=n,t.getSnapshot=r,Sc(t)&&Tc(e)}function wc(e,t,n){return n(function(){Sc(t)&&Tc(e)})}function Sc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rn(e,n)}catch{return!0}}function Tc(e){var t=Mn(e,1);t!==null&&un(t,e,1,-1)}function _c(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tl,lastRenderedState:e},t.queue=e,e=e.dispatch=Zp.bind(null,tt,e),[t.memoizedState,e]}function nl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Nc(){return Zt().memoizedState}function ai(e,t,n,r){var o=kn();tt.flags|=e,o.memoizedState=nl(1|t,n,void 0,r===void 0?null:r)}function ui(e,t,n,r){var o=Zt();r=r===void 0?null:r;var u=void 0;if(at!==null){var p=at.memoizedState;if(u=p.destroy,r!==null&&Fo(r,p.deps)){o.memoizedState=nl(t,n,u,r);return}}tt.flags|=e,o.memoizedState=nl(1|t,n,u,r)}function Ec(e,t){return ai(8390656,8,e,t)}function Vo(e,t){return ui(2048,8,e,t)}function Cc(e,t){return ui(4,2,e,t)}function jc(e,t){return ui(4,4,e,t)}function Rc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Lc(e,t,n){return n=n!=null?n.concat([e]):null,ui(4,4,Rc.bind(null,t,e),n)}function Go(){}function Ic(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ac(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Dc(e,t,n){return(Mr&21)===0?(e.baseState&&(e.baseState=!1,bt=!0),e.memoizedState=n):(rn(n,t)||(n=As(),tt.lanes|=n,zr|=n,e.baseState=!0),t)}function Yp(e,t){var n=Ae;Ae=n!==0&&4>n?n:4,e(!0);var r=$o.transition;$o.transition={};try{e(!1),t()}finally{Ae=n,$o.transition=r}}function Pc(){return Zt().memoizedState}function Xp(e,t,n){var r=lr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Mc(e))zc(t,n);else if(n=fc(e,t,n,r),n!==null){var o=Rt();un(n,e,r,o),bc(n,t,r)}}function Zp(e,t,n){var r=lr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mc(e))zc(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,y=u(p,n);if(o.hasEagerState=!0,o.eagerState=y,rn(y,p)){var T=t.interleaved;T===null?(o.next=o,Do(t)):(o.next=T.next,T.next=o),t.interleaved=o;return}}catch{}finally{}n=fc(e,t,o,r),n!==null&&(o=Rt(),un(n,e,r,o),bc(n,t,r))}}function Mc(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function zc(e,t){Js=oi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gn(e,n)}}var ci={readContext:Xt,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},Jp={readContext:Xt,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:Ec,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ai(4194308,4,Rc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return ai(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Xp.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:_c,useDebugValue:Go,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=_c(!1),t=e[0];return e=Yp.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tt,o=kn();if(Ye){if(n===void 0)throw Error(l(407));n=n()}else{if(n=t(),dt===null)throw Error(l(349));(Mr&30)!==0||xc(r,t,n)}o.memoizedState=n;var u={value:n,getSnapshot:t};return o.queue=u,Ec(wc.bind(null,r,u,e),[e]),r.flags|=2048,nl(9,kc.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=kn(),t=dt.identifierPrefix;if(Ye){var n=Pn,r=Dn;n=(r&~(1<<32-Et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=el++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Kp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},eh={readContext:Xt,useCallback:Ic,useContext:Xt,useEffect:Vo,useImperativeHandle:Lc,useInsertionEffect:Cc,useLayoutEffect:jc,useMemo:Ac,useReducer:Ho,useRef:Nc,useState:function(){return Ho(tl)},useDebugValue:Go,useDeferredValue:function(e){var t=Zt();return Dc(t,at.memoizedState,e)},useTransition:function(){var e=Ho(tl)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:vc,useSyncExternalStore:yc,useId:Pc,unstable_isNewReconciler:!1},th={readContext:Xt,useCallback:Ic,useContext:Xt,useEffect:Vo,useImperativeHandle:Lc,useInsertionEffect:Cc,useLayoutEffect:jc,useMemo:Ac,useReducer:Wo,useRef:Nc,useState:function(){return Wo(tl)},useDebugValue:Go,useDeferredValue:function(e){var t=Zt();return at===null?t.memoizedState=e:Dc(t,at.memoizedState,e)},useTransition:function(){var e=Wo(tl)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:vc,useSyncExternalStore:yc,useId:Pc,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=Q({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Qo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Q({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var di={isMounted:function(e){return(e=e._reactInternals)?Oe(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rt(),o=lr(e),u=zn(r,o);u.payload=t,n!=null&&(u.callback=n),t=tr(e,u,o),t!==null&&(un(t,e,o,r),ri(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rt(),o=lr(e),u=zn(r,o);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=tr(e,u,o),t!==null&&(un(t,e,o,r),ri(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rt(),r=lr(e),o=zn(n,r);o.tag=2,t!=null&&(o.callback=t),t=tr(e,o,r),t!==null&&(un(t,e,r,n),ri(t,e,r))}};function Oc(e,t,n,r,o,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,p):t.prototype&&t.prototype.isPureReactComponent?!Bs(n,r)||!Bs(o,u):!0}function $c(e,t,n){var r=!1,o=Zn,u=t.contextType;return typeof u=="object"&&u!==null?u=Xt(u):(o=zt(t)?Lr:wt.current,r=t.contextTypes,u=(r=r!=null)?as(e,o):Zn),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=di,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=u),t}function Fc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&di.enqueueReplaceState(t,t.state,null)}function qo(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Po(e);var u=t.contextType;typeof u=="object"&&u!==null?o.context=Xt(u):(u=zt(t)?Lr:wt.current,o.context=as(e,u)),o.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(Qo(e,t,u,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&di.enqueueReplaceState(o,o.state,null),si(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function gs(e,t){try{var n="",r=t;do n+=Ee(r),r=r.return;while(r);var o=n}catch(u){o=`
|
|
39
|
-
Error generating stack: `+u.message+`
|
|
40
|
-
`+u.stack}return{value:e,source:t,stack:o,digest:null}}function Ko(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Yo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var nh=typeof WeakMap=="function"?WeakMap:Map;function Uc(e,t,n){n=zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yi||(yi=!0,da=r),Yo(e,t)},n}function Bc(e,t,n){n=zn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Yo(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){Yo(e,t),typeof r!="function"&&(rr===null?rr=new Set([this]):rr.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),n}function Hc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new nh;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=gh.bind(null,e,t,n),t.then(e,e))}function Wc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Vc(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zn(-1,1),t.tag=2,tr(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var rh=U.ReactCurrentOwner,bt=!1;function jt(e,t,n,r){t.child=e===null?dc(t,null,n,r):fs(t,e.child,n,r)}function Gc(e,t,n,r,o){n=n.render;var u=t.ref;return hs(t,o),r=Uo(e,t,n,r,u,o),n=Bo(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,bn(e,t,o)):(Ye&&n&&_o(t),t.flags|=1,jt(e,t,r,o),t.child)}function Qc(e,t,n,r,o){if(e===null){var u=n.type;return typeof u=="function"&&!ya(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,qc(e,t,u,r,o)):(e=_i(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&o)===0){var p=u.memoizedProps;if(n=n.compare,n=n!==null?n:Bs,n(p,r)&&e.ref===t.ref)return bn(e,t,o)}return t.flags|=1,e=or(u,r),e.ref=t.ref,e.return=t,t.child=e}function qc(e,t,n,r,o){if(e!==null){var u=e.memoizedProps;if(Bs(u,r)&&e.ref===t.ref)if(bt=!1,t.pendingProps=r=u,(e.lanes&o)!==0)(e.flags&131072)!==0&&(bt=!0);else return t.lanes=e.lanes,bn(e,t,o)}return Xo(e,t,n,r,o)}function Kc(e,t,n){var r=t.pendingProps,o=r.children,u=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(ys,Gt),Gt|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qe(ys,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=u!==null?u.baseLanes:n,Qe(ys,Gt),Gt|=r}else u!==null?(r=u.baseLanes|n,t.memoizedState=null):r=n,Qe(ys,Gt),Gt|=r;return jt(e,t,o,n),t.child}function Yc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xo(e,t,n,r,o){var u=zt(n)?Lr:wt.current;return u=as(t,u),hs(t,o),n=Uo(e,t,n,r,u,o),r=Bo(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,bn(e,t,o)):(Ye&&r&&_o(t),t.flags|=1,jt(e,t,n,o),t.child)}function Xc(e,t,n,r,o){if(zt(n)){var u=!0;Kl(t)}else u=!1;if(hs(t,o),t.stateNode===null)pi(e,t),$c(t,n,r),qo(t,n,r,o),r=!0;else if(e===null){var p=t.stateNode,y=t.memoizedProps;p.props=y;var T=p.context,L=n.contextType;typeof L=="object"&&L!==null?L=Xt(L):(L=zt(n)?Lr:wt.current,L=as(t,L));var F=n.getDerivedStateFromProps,H=typeof F=="function"||typeof p.getSnapshotBeforeUpdate=="function";H||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==r||T!==L)&&Fc(t,p,r,L),er=!1;var $=t.memoizedState;p.state=$,si(t,r,p,o),T=t.memoizedState,y!==r||$!==T||Mt.current||er?(typeof F=="function"&&(Qo(t,n,F,r),T=t.memoizedState),(y=er||Oc(t,n,y,r,$,T,L))?(H||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=T),p.props=r,p.state=T,p.context=L,r=y):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{p=t.stateNode,pc(e,t),y=t.memoizedProps,L=t.type===t.elementType?y:ln(t.type,y),p.props=L,H=t.pendingProps,$=p.context,T=n.contextType,typeof T=="object"&&T!==null?T=Xt(T):(T=zt(n)?Lr:wt.current,T=as(t,T));var X=n.getDerivedStateFromProps;(F=typeof X=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==H||$!==T)&&Fc(t,p,r,T),er=!1,$=t.memoizedState,p.state=$,si(t,r,p,o);var te=t.memoizedState;y!==H||$!==te||Mt.current||er?(typeof X=="function"&&(Qo(t,n,X,r),te=t.memoizedState),(L=er||Oc(t,n,L,r,$,te,T)||!1)?(F||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(r,te,T),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(r,te,T)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||y===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=te),p.props=r,p.state=te,p.context=T,r=L):(typeof p.componentDidUpdate!="function"||y===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),r=!1)}return Zo(e,t,n,r,u,o)}function Zo(e,t,n,r,o,u){Yc(e,t);var p=(t.flags&128)!==0;if(!r&&!p)return o&&nc(t,n,!1),bn(e,t,u);r=t.stateNode,rh.current=t;var y=p&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&p?(t.child=fs(t,e.child,null,u),t.child=fs(t,null,y,u)):jt(e,t,y,u),t.memoizedState=r.state,o&&nc(t,n,!0),t.child}function Zc(e){var t=e.stateNode;t.pendingContext?ec(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ec(e,t.context,!1),Mo(e,t.containerInfo)}function Jc(e,t,n,r,o){return ds(),jo(o),t.flags|=256,jt(e,t,n,r),t.child}var Jo={dehydrated:null,treeContext:null,retryLane:0};function ea(e){return{baseLanes:e,cachePool:null,transitions:null}}function ed(e,t,n){var r=t.pendingProps,o=et.current,u=!1,p=(t.flags&128)!==0,y;if((y=p)||(y=e!==null&&e.memoizedState===null?!1:(o&2)!==0),y?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Qe(et,o&1),e===null)return Co(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(p=r.children,e=r.fallback,u?(r=t.mode,u=t.child,p={mode:"hidden",children:p},(r&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=p):u=Ni(p,r,0,null),e=Fr(e,r,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=ea(n),t.memoizedState=Jo,e):ta(t,p));if(o=e.memoizedState,o!==null&&(y=o.dehydrated,y!==null))return sh(e,t,p,r,y,o,n);if(u){u=r.fallback,p=t.mode,o=e.child,y=o.sibling;var T={mode:"hidden",children:r.children};return(p&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=T,t.deletions=null):(r=or(o,T),r.subtreeFlags=o.subtreeFlags&14680064),y!==null?u=or(y,u):(u=Fr(u,p,n,null),u.flags|=2),u.return=t,r.return=t,r.sibling=u,t.child=r,r=u,u=t.child,p=e.child.memoizedState,p=p===null?ea(n):{baseLanes:p.baseLanes|n,cachePool:null,transitions:p.transitions},u.memoizedState=p,u.childLanes=e.childLanes&~n,t.memoizedState=Jo,r}return u=e.child,e=u.sibling,r=or(u,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ta(e,t){return t=Ni({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fi(e,t,n,r){return r!==null&&jo(r),fs(t,e.child,null,n),e=ta(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sh(e,t,n,r,o,u,p){if(n)return t.flags&256?(t.flags&=-257,r=Ko(Error(l(422))),fi(e,t,p,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=r.fallback,o=t.mode,r=Ni({mode:"visible",children:r.children},o,0,null),u=Fr(u,o,p,null),u.flags|=2,r.return=t,u.return=t,r.sibling=u,t.child=r,(t.mode&1)!==0&&fs(t,e.child,null,p),t.child.memoizedState=ea(p),t.memoizedState=Jo,u);if((t.mode&1)===0)return fi(e,t,p,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var y=r.dgst;return r=y,u=Error(l(419)),r=Ko(u,r,void 0),fi(e,t,p,r)}if(y=(p&e.childLanes)!==0,bt||y){if(r=dt,r!==null){switch(p&-p){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|p))!==0?0:o,o!==0&&o!==u.retryLane&&(u.retryLane=o,Mn(e,o),un(r,e,o,-1))}return va(),r=Ko(Error(l(421))),fi(e,t,p,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=vh.bind(null,e),o._reactRetry=t,null):(e=u.treeContext,Vt=Yn(o.nextSibling),Wt=t,Ye=!0,sn=null,e!==null&&(Kt[Yt++]=Dn,Kt[Yt++]=Pn,Kt[Yt++]=Ir,Dn=e.id,Pn=e.overflow,Ir=t),t=ta(t,r.children),t.flags|=4096,t)}function td(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ao(e.return,t,n)}function na(e,t,n,r,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=r,u.tail=n,u.tailMode=o)}function nd(e,t,n){var r=t.pendingProps,o=r.revealOrder,u=r.tail;if(jt(e,t,r.children,n),r=et.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&td(e,n,t);else if(e.tag===19)td(e,n,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}r&=1}if(Qe(et,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&li(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),na(t,!1,o,n,u);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&li(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}na(t,!0,n,null,u);break;case"together":na(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pi(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function bn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,n=or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lh(e,t,n){switch(t.tag){case 3:Zc(t),ds();break;case 5:gc(t);break;case 1:zt(t.type)&&Kl(t);break;case 4:Mo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Qe(ti,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Qe(et,et.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?ed(e,t,n):(Qe(et,et.current&1),e=bn(e,t,n),e!==null?e.sibling:null);Qe(et,et.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return nd(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Qe(et,et.current),r)break;return null;case 22:case 23:return t.lanes=0,Kc(e,t,n)}return bn(e,t,n)}var rd,ra,sd,ld;rd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ra=function(){},sd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Pr(xn.current);var u=null;switch(n){case"input":o=Me(e,o),r=Me(e,r),u=[];break;case"select":o=Q({},o,{value:void 0}),r=Q({},r,{value:void 0}),u=[];break;case"textarea":o=pe(e,o),r=pe(e,r),u=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gl)}Gr(n,r);var p;n=null;for(L in o)if(!r.hasOwnProperty(L)&&o.hasOwnProperty(L)&&o[L]!=null)if(L==="style"){var y=o[L];for(p in y)y.hasOwnProperty(p)&&(n||(n={}),n[p]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(d.hasOwnProperty(L)?u||(u=[]):(u=u||[]).push(L,null));for(L in r){var T=r[L];if(y=o!=null?o[L]:void 0,r.hasOwnProperty(L)&&T!==y&&(T!=null||y!=null))if(L==="style")if(y){for(p in y)!y.hasOwnProperty(p)||T&&T.hasOwnProperty(p)||(n||(n={}),n[p]="");for(p in T)T.hasOwnProperty(p)&&y[p]!==T[p]&&(n||(n={}),n[p]=T[p])}else n||(u||(u=[]),u.push(L,n)),n=T;else L==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,y=y?y.__html:void 0,T!=null&&y!==T&&(u=u||[]).push(L,T)):L==="children"?typeof T!="string"&&typeof T!="number"||(u=u||[]).push(L,""+T):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(d.hasOwnProperty(L)?(T!=null&&L==="onScroll"&&qe("scroll",e),u||y===T||(u=[])):(u=u||[]).push(L,T))}n&&(u=u||[]).push("style",n);var L=u;(t.updateQueue=L)&&(t.flags|=4)}},ld=function(e,t,n,r){n!==r&&(t.flags|=4)};function rl(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ih(e,t,n){var r=t.pendingProps;switch(No(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(t),null;case 1:return zt(t.type)&&ql(),Tt(t),null;case 3:return r=t.stateNode,ms(),Ke(Mt),Ke(wt),Oo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Jl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sn!==null&&(ha(sn),sn=null))),ra(e,t),Tt(t),null;case 5:zo(t);var o=Pr(Zs.current);if(n=t.type,e!==null&&t.stateNode!=null)sd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(l(166));return Tt(t),null}if(e=Pr(xn.current),Jl(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[yn]=t,r[Qs]=u,e=(t.mode&1)!==0,n){case"dialog":qe("cancel",r),qe("close",r);break;case"iframe":case"object":case"embed":qe("load",r);break;case"video":case"audio":for(o=0;o<Ws.length;o++)qe(Ws[o],r);break;case"source":qe("error",r);break;case"img":case"image":case"link":qe("error",r),qe("load",r);break;case"details":qe("toggle",r);break;case"input":Un(r,u),qe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},qe("invalid",r);break;case"textarea":He(r,u),qe("invalid",r)}Gr(n,u),o=null;for(var p in u)if(u.hasOwnProperty(p)){var y=u[p];p==="children"?typeof y=="string"?r.textContent!==y&&(u.suppressHydrationWarning!==!0&&Vl(r.textContent,y,e),o=["children",y]):typeof y=="number"&&r.textContent!==""+y&&(u.suppressHydrationWarning!==!0&&Vl(r.textContent,y,e),o=["children",""+y]):d.hasOwnProperty(p)&&y!=null&&p==="onScroll"&&qe("scroll",r)}switch(n){case"input":dn(r),pr(r,u,!0);break;case"textarea":dn(r),ot(r);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(r.onclick=Gl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{p=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kt(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=p.createElement(n,{is:r.is}):(e=p.createElement(n),n==="select"&&(p=e,r.multiple?p.multiple=!0:r.size&&(p.size=r.size))):e=p.createElementNS(e,n),e[yn]=t,e[Qs]=r,rd(e,t,!1,!1),t.stateNode=e;e:{switch(p=gr(n,r),n){case"dialog":qe("cancel",e),qe("close",e),o=r;break;case"iframe":case"object":case"embed":qe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ws.length;o++)qe(Ws[o],e);o=r;break;case"source":qe("error",e),o=r;break;case"img":case"image":case"link":qe("error",e),qe("load",e),o=r;break;case"details":qe("toggle",e),o=r;break;case"input":Un(e,r),o=Me(e,r),qe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Q({},r,{value:void 0}),qe("invalid",e);break;case"textarea":He(e,r),o=pe(e,r),qe("invalid",e);break;default:o=r}Gr(n,o),y=o;for(u in y)if(y.hasOwnProperty(u)){var T=y[u];u==="style"?Ns(e,T):u==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&hr(e,T)):u==="children"?typeof T=="string"?(n!=="textarea"||T!=="")&&_n(e,T):typeof T=="number"&&_n(e,""+T):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(d.hasOwnProperty(u)?T!=null&&u==="onScroll"&&qe("scroll",e):T!=null&&Y(e,u,T,p))}switch(n){case"input":dn(e),pr(e,r,!1);break;case"textarea":dn(e),ot(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ie(r.value));break;case"select":e.multiple=!!r.multiple,u=r.value,u!=null?P(e,!!r.multiple,u,!1):r.defaultValue!=null&&P(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Gl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Tt(t),null;case 6:if(e&&t.stateNode!=null)ld(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(l(166));if(n=Pr(Zs.current),Pr(xn.current),Jl(t)){if(r=t.stateNode,n=t.memoizedProps,r[yn]=t,(u=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:Vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Vl(r.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yn]=t,t.stateNode=r}return Tt(t),null;case 13:if(Ke(et),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&Vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ac(),ds(),t.flags|=98560,u=!1;else if(u=Jl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(l(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(l(317));u[yn]=t}else ds(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Tt(t),u=!1}else sn!==null&&(ha(sn),sn=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(et.current&1)!==0?ut===0&&(ut=3):va())),t.updateQueue!==null&&(t.flags|=4),Tt(t),null);case 4:return ms(),ra(e,t),e===null&&Vs(t.stateNode.containerInfo),Tt(t),null;case 10:return Io(t.type._context),Tt(t),null;case 17:return zt(t.type)&&ql(),Tt(t),null;case 19:if(Ke(et),u=t.memoizedState,u===null)return Tt(t),null;if(r=(t.flags&128)!==0,p=u.rendering,p===null)if(r)rl(u,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=li(e),p!==null){for(t.flags|=128,rl(u,!1),r=p.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)u=n,e=r,u.flags&=14680066,p=u.alternate,p===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=p.childLanes,u.lanes=p.lanes,u.child=p.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=p.memoizedProps,u.memoizedState=p.memoizedState,u.updateQueue=p.updateQueue,u.type=p.type,e=p.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Qe(et,et.current&1|2),t.child}e=e.sibling}u.tail!==null&&Xe()>xs&&(t.flags|=128,r=!0,rl(u,!1),t.lanes=4194304)}else{if(!r)if(e=li(p),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!p.alternate&&!Ye)return Tt(t),null}else 2*Xe()-u.renderingStartTime>xs&&n!==1073741824&&(t.flags|=128,r=!0,rl(u,!1),t.lanes=4194304);u.isBackwards?(p.sibling=t.child,t.child=p):(n=u.last,n!==null?n.sibling=p:t.child=p,u.last=p)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Xe(),t.sibling=null,n=et.current,Qe(et,r?n&1|2:n&1),t):(Tt(t),null);case 22:case 23:return ga(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Gt&1073741824)!==0&&(Tt(t),t.subtreeFlags&6&&(t.flags|=8192)):Tt(t),null;case 24:return null;case 25:return null}throw Error(l(156,t.tag))}function oh(e,t){switch(No(t),t.tag){case 1:return zt(t.type)&&ql(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ms(),Ke(Mt),Ke(wt),Oo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return zo(t),null;case 13:if(Ke(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ke(et),null;case 4:return ms(),null;case 10:return Io(t.type._context),null;case 22:case 23:return ga(),null;case 24:return null;default:return null}}var hi=!1,_t=!1,ah=typeof WeakSet=="function"?WeakSet:Set,J=null;function vs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){nt(e,t,r)}else n.current=null}function sa(e,t,n){try{n()}catch(r){nt(e,t,r)}}var id=!1;function uh(e,t){if(go=Pl,e=Ou(),oo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var p=0,y=-1,T=-1,L=0,F=0,H=e,$=null;t:for(;;){for(var X;H!==n||o!==0&&H.nodeType!==3||(y=p+o),H!==u||r!==0&&H.nodeType!==3||(T=p+r),H.nodeType===3&&(p+=H.nodeValue.length),(X=H.firstChild)!==null;)$=H,H=X;for(;;){if(H===e)break t;if($===n&&++L===o&&(y=p),$===u&&++F===r&&(T=p),(X=H.nextSibling)!==null)break;H=$,$=H.parentNode}H=X}n=y===-1||T===-1?null:{start:y,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(vo={focusedElem:e,selectionRange:n},Pl=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var te=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(te!==null){var se=te.memoizedProps,st=te.memoizedState,j=t.stateNode,_=j.getSnapshotBeforeUpdate(t.elementType===t.type?se:ln(t.type,se),st);j.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(V){nt(t,t.return,V)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return te=id,id=!1,te}function sl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var u=o.destroy;o.destroy=void 0,u!==void 0&&sa(t,n,u)}o=o.next}while(o!==r)}}function mi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function la(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function od(e){var t=e.alternate;t!==null&&(e.alternate=null,od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yn],delete t[Qs],delete t[wo],delete t[Vp],delete t[Gp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ad(e){return e.tag===5||e.tag===3||e.tag===4}function ud(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ad(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.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 ia(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gl));else if(r!==4&&(e=e.child,e!==null))for(ia(e,t,n),e=e.sibling;e!==null;)ia(e,t,n),e=e.sibling}function oa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oa(e,t,n),e=e.sibling;e!==null;)oa(e,t,n),e=e.sibling}var gt=null,on=!1;function nr(e,t,n){for(n=n.child;n!==null;)cd(e,t,n),n=n.sibling}function cd(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(_r,n)}catch{}switch(n.tag){case 5:_t||vs(n,t);case 6:var r=gt,o=on;gt=null,nr(e,t,n),gt=r,on=o,gt!==null&&(on?(e=gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gt.removeChild(n.stateNode));break;case 18:gt!==null&&(on?(e=gt,n=n.stateNode,e.nodeType===8?ko(e.parentNode,n):e.nodeType===1&&ko(e,n),zs(e)):ko(gt,n.stateNode));break;case 4:r=gt,o=on,gt=n.stateNode.containerInfo,on=!0,nr(e,t,n),gt=r,on=o;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var u=o,p=u.destroy;u=u.tag,p!==void 0&&((u&2)!==0||(u&4)!==0)&&sa(n,t,p),o=o.next}while(o!==r)}nr(e,t,n);break;case 1:if(!_t&&(vs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(y){nt(n,t,y)}nr(e,t,n);break;case 21:nr(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,nr(e,t,n),_t=r):nr(e,t,n);break;default:nr(e,t,n)}}function dd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ah),t.forEach(function(r){var o=yh.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function an(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var u=e,p=t,y=p;e:for(;y!==null;){switch(y.tag){case 5:gt=y.stateNode,on=!1;break e;case 3:gt=y.stateNode.containerInfo,on=!0;break e;case 4:gt=y.stateNode.containerInfo,on=!0;break e}y=y.return}if(gt===null)throw Error(l(160));cd(u,p,o),gt=null,on=!1;var T=o.alternate;T!==null&&(T.return=null),o.return=null}catch(L){nt(o,t,L)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)fd(t,e),t=t.sibling}function fd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(an(t,e),wn(e),r&4){try{sl(3,e,e.return),mi(3,e)}catch(se){nt(e,e.return,se)}try{sl(5,e,e.return)}catch(se){nt(e,e.return,se)}}break;case 1:an(t,e),wn(e),r&512&&n!==null&&vs(n,n.return);break;case 5:if(an(t,e),wn(e),r&512&&n!==null&&vs(n,n.return),e.flags&32){var o=e.stateNode;try{_n(o,"")}catch(se){nt(e,e.return,se)}}if(r&4&&(o=e.stateNode,o!=null)){var u=e.memoizedProps,p=n!==null?n.memoizedProps:u,y=e.type,T=e.updateQueue;if(e.updateQueue=null,T!==null)try{y==="input"&&u.type==="radio"&&u.name!=null&&We(o,u),gr(y,p);var L=gr(y,u);for(p=0;p<T.length;p+=2){var F=T[p],H=T[p+1];F==="style"?Ns(o,H):F==="dangerouslySetInnerHTML"?hr(o,H):F==="children"?_n(o,H):Y(o,F,H,L)}switch(y){case"input":Ut(o,u);break;case"textarea":Ve(o,u);break;case"select":var $=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!u.multiple;var X=u.value;X!=null?P(o,!!u.multiple,X,!1):$!==!!u.multiple&&(u.defaultValue!=null?P(o,!!u.multiple,u.defaultValue,!0):P(o,!!u.multiple,u.multiple?[]:"",!1))}o[Qs]=u}catch(se){nt(e,e.return,se)}}break;case 6:if(an(t,e),wn(e),r&4){if(e.stateNode===null)throw Error(l(162));o=e.stateNode,u=e.memoizedProps;try{o.nodeValue=u}catch(se){nt(e,e.return,se)}}break;case 3:if(an(t,e),wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zs(t.containerInfo)}catch(se){nt(e,e.return,se)}break;case 4:an(t,e),wn(e);break;case 13:an(t,e),wn(e),o=e.child,o.flags&8192&&(u=o.memoizedState!==null,o.stateNode.isHidden=u,!u||o.alternate!==null&&o.alternate.memoizedState!==null||(ca=Xe())),r&4&&dd(e);break;case 22:if(F=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(L=_t)||F,an(t,e),_t=L):an(t,e),wn(e),r&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!F&&(e.mode&1)!==0)for(J=e,F=e.child;F!==null;){for(H=J=F;J!==null;){switch($=J,X=$.child,$.tag){case 0:case 11:case 14:case 15:sl(4,$,$.return);break;case 1:vs($,$.return);var te=$.stateNode;if(typeof te.componentWillUnmount=="function"){r=$,n=$.return;try{t=r,te.props=t.memoizedProps,te.state=t.memoizedState,te.componentWillUnmount()}catch(se){nt(r,n,se)}}break;case 5:vs($,$.return);break;case 22:if($.memoizedState!==null){md(H);continue}}X!==null?(X.return=$,J=X):md(H)}F=F.sibling}e:for(F=null,H=e;;){if(H.tag===5){if(F===null){F=H;try{o=H.stateNode,L?(u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(y=H.stateNode,T=H.memoizedProps.style,p=T!=null&&T.hasOwnProperty("display")?T.display:null,y.style.display=mr("display",p))}catch(se){nt(e,e.return,se)}}}else if(H.tag===6){if(F===null)try{H.stateNode.nodeValue=L?"":H.memoizedProps}catch(se){nt(e,e.return,se)}}else if((H.tag!==22&&H.tag!==23||H.memoizedState===null||H===e)&&H.child!==null){H.child.return=H,H=H.child;continue}if(H===e)break e;for(;H.sibling===null;){if(H.return===null||H.return===e)break e;F===H&&(F=null),H=H.return}F===H&&(F=null),H.sibling.return=H.return,H=H.sibling}}break;case 19:an(t,e),wn(e),r&4&&dd(e);break;case 21:break;default:an(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ad(n)){var r=n;break e}n=n.return}throw Error(l(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(_n(o,""),r.flags&=-33);var u=ud(e);oa(e,u,o);break;case 3:case 4:var p=r.stateNode.containerInfo,y=ud(e);ia(e,y,p);break;default:throw Error(l(161))}}catch(T){nt(e,e.return,T)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ch(e,t,n){J=e,pd(e)}function pd(e,t,n){for(var r=(e.mode&1)!==0;J!==null;){var o=J,u=o.child;if(o.tag===22&&r){var p=o.memoizedState!==null||hi;if(!p){var y=o.alternate,T=y!==null&&y.memoizedState!==null||_t;y=hi;var L=_t;if(hi=p,(_t=T)&&!L)for(J=o;J!==null;)p=J,T=p.child,p.tag===22&&p.memoizedState!==null?gd(o):T!==null?(T.return=p,J=T):gd(o);for(;u!==null;)J=u,pd(u),u=u.sibling;J=o,hi=y,_t=L}hd(e)}else(o.subtreeFlags&8772)!==0&&u!==null?(u.return=o,J=u):hd(e)}}function hd(e){for(;J!==null;){var t=J;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:_t||mi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_t)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&mc(t,u,r);break;case 3:var p=t.updateQueue;if(p!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}mc(t,p,n)}break;case 5:var y=t.stateNode;if(n===null&&t.flags&4){n=y;var T=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&n.focus();break;case"img":T.src&&(n.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var L=t.alternate;if(L!==null){var F=L.memoizedState;if(F!==null){var H=F.dehydrated;H!==null&&zs(H)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}_t||t.flags&512&&la(t)}catch($){nt(t,t.return,$)}}if(t===e){J=null;break}if(n=t.sibling,n!==null){n.return=t.return,J=n;break}J=t.return}}function md(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var n=t.sibling;if(n!==null){n.return=t.return,J=n;break}J=t.return}}function gd(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{mi(4,t)}catch(T){nt(t,n,T)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(T){nt(t,o,T)}}var u=t.return;try{la(t)}catch(T){nt(t,u,T)}break;case 5:var p=t.return;try{la(t)}catch(T){nt(t,p,T)}}}catch(T){nt(t,t.return,T)}if(t===e){J=null;break}var y=t.sibling;if(y!==null){y.return=t.return,J=y;break}J=t.return}}var dh=Math.ceil,gi=U.ReactCurrentDispatcher,aa=U.ReactCurrentOwner,Jt=U.ReactCurrentBatchConfig,Pe=0,dt=null,lt=null,vt=0,Gt=0,ys=Xn(0),ut=0,ll=null,zr=0,vi=0,ua=0,il=null,Ot=null,ca=0,xs=1/0,On=null,yi=!1,da=null,rr=null,xi=!1,sr=null,ki=0,ol=0,fa=null,wi=-1,Si=0;function Rt(){return(Pe&6)!==0?Xe():wi!==-1?wi:wi=Xe()}function lr(e){return(e.mode&1)===0?1:(Pe&2)!==0&&vt!==0?vt&-vt:qp.transition!==null?(Si===0&&(Si=As()),Si):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:yu(e.type)),e)}function un(e,t,n,r){if(50<ol)throw ol=0,fa=null,Error(l(185));jr(e,n,r),((Pe&2)===0||e!==dt)&&(e===dt&&((Pe&2)===0&&(vi|=n),ut===4&&ir(e,vt)),$t(e,r),n===1&&Pe===0&&(t.mode&1)===0&&(xs=Xe()+500,Yl&&Jn()))}function $t(e,t){var n=e.callbackNode;Il(e,t);var r=Cr(e,e===dt?vt:0);if(r===0)n!==null&&jl(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&jl(n),t===1)e.tag===0?Qp(yd.bind(null,e)):rc(yd.bind(null,e)),Hp(function(){(Pe&6)===0&&Jn()}),n=null;else{switch(W(r)){case 1:n=Wn;break;case 4:n=vn;break;case 16:n=Kr;break;case 536870912:n=Rl;break;default:n=Kr}n=Ed(n,vd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function vd(e,t){if(wi=-1,Si=0,(Pe&6)!==0)throw Error(l(327));var n=e.callbackNode;if(ks()&&e.callbackNode!==n)return null;var r=Cr(e,e===dt?vt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Ti(e,r);else{t=r;var o=Pe;Pe|=2;var u=kd();(dt!==e||vt!==t)&&(On=null,xs=Xe()+500,Or(e,t));do try{hh();break}catch(y){xd(e,y)}while(!0);Lo(),gi.current=u,Pe=o,lt!==null?t=0:(dt=null,vt=0,t=ut)}if(t!==0){if(t===2&&(o=Is(e),o!==0&&(r=o,t=pa(e,o))),t===1)throw n=ll,Or(e,0),ir(e,r),$t(e,Xe()),n;if(t===6)ir(e,r);else{if(o=e.current.alternate,(r&30)===0&&!fh(o)&&(t=Ti(e,r),t===2&&(u=Is(e),u!==0&&(r=u,t=pa(e,u))),t===1))throw n=ll,Or(e,0),ir(e,r),$t(e,Xe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(l(345));case 2:$r(e,Ot,On);break;case 3:if(ir(e,r),(r&130023424)===r&&(t=ca+500-Xe(),10<t)){if(Cr(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Rt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=xo($r.bind(null,e,Ot,On),t);break}$r(e,Ot,On);break;case 4:if(ir(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var p=31-Et(r);u=1<<p,p=t[p],p>o&&(o=p),r&=~u}if(r=o,r=Xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dh(r/1960))-r,10<r){e.timeoutHandle=xo($r.bind(null,e,Ot,On),r);break}$r(e,Ot,On);break;case 5:$r(e,Ot,On);break;default:throw Error(l(329))}}}return $t(e,Xe()),e.callbackNode===n?vd.bind(null,e):null}function pa(e,t){var n=il;return e.current.memoizedState.isDehydrated&&(Or(e,t).flags|=256),e=Ti(e,t),e!==2&&(t=Ot,Ot=n,t!==null&&ha(t)),e}function ha(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function fh(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],u=o.getSnapshot;o=o.value;try{if(!rn(u(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 ir(e,t){for(t&=~ua,t&=~vi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Et(t),r=1<<n;e[n]=-1,t&=~r}}function yd(e){if((Pe&6)!==0)throw Error(l(327));ks();var t=Cr(e,0);if((t&1)===0)return $t(e,Xe()),null;var n=Ti(e,t);if(e.tag!==0&&n===2){var r=Is(e);r!==0&&(t=r,n=pa(e,r))}if(n===1)throw n=ll,Or(e,0),ir(e,t),$t(e,Xe()),n;if(n===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$r(e,Ot,On),$t(e,Xe()),null}function ma(e,t){var n=Pe;Pe|=1;try{return e(t)}finally{Pe=n,Pe===0&&(xs=Xe()+500,Yl&&Jn())}}function br(e){sr!==null&&sr.tag===0&&(Pe&6)===0&&ks();var t=Pe;Pe|=1;var n=Jt.transition,r=Ae;try{if(Jt.transition=null,Ae=1,e)return e()}finally{Ae=r,Jt.transition=n,Pe=t,(Pe&6)===0&&Jn()}}function ga(){Gt=ys.current,Ke(ys)}function Or(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Bp(n)),lt!==null)for(n=lt.return;n!==null;){var r=n;switch(No(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ql();break;case 3:ms(),Ke(Mt),Ke(wt),Oo();break;case 5:zo(r);break;case 4:ms();break;case 13:Ke(et);break;case 19:Ke(et);break;case 10:Io(r.type._context);break;case 22:case 23:ga()}n=n.return}if(dt=e,lt=e=or(e.current,null),vt=Gt=t,ut=0,ll=null,ua=vi=zr=0,Ot=il=null,Dr!==null){for(t=0;t<Dr.length;t++)if(n=Dr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,u=n.pending;if(u!==null){var p=u.next;u.next=o,r.next=p}n.pending=r}Dr=null}return e}function xd(e,t){do{var n=lt;try{if(Lo(),ii.current=ci,oi){for(var r=tt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}oi=!1}if(Mr=0,ct=at=tt=null,Js=!1,el=0,aa.current=null,n===null||n.return===null){ut=1,ll=t,lt=null;break}e:{var u=e,p=n.return,y=n,T=t;if(t=vt,y.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var L=T,F=y,H=F.tag;if((F.mode&1)===0&&(H===0||H===11||H===15)){var $=F.alternate;$?(F.updateQueue=$.updateQueue,F.memoizedState=$.memoizedState,F.lanes=$.lanes):(F.updateQueue=null,F.memoizedState=null)}var X=Wc(p);if(X!==null){X.flags&=-257,Vc(X,p,y,u,t),X.mode&1&&Hc(u,L,t),t=X,T=L;var te=t.updateQueue;if(te===null){var se=new Set;se.add(T),t.updateQueue=se}else te.add(T);break e}else{if((t&1)===0){Hc(u,L,t),va();break e}T=Error(l(426))}}else if(Ye&&y.mode&1){var st=Wc(p);if(st!==null){(st.flags&65536)===0&&(st.flags|=256),Vc(st,p,y,u,t),jo(gs(T,y));break e}}u=T=gs(T,y),ut!==4&&(ut=2),il===null?il=[u]:il.push(u),u=p;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var j=Uc(u,T,t);hc(u,j);break e;case 1:y=T;var _=u.type,R=u.stateNode;if((u.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(rr===null||!rr.has(R)))){u.flags|=65536,t&=-t,u.lanes|=t;var V=Bc(u,y,t);hc(u,V);break e}}u=u.return}while(u!==null)}Sd(n)}catch(oe){t=oe,lt===n&&n!==null&&(lt=n=n.return);continue}break}while(!0)}function kd(){var e=gi.current;return gi.current=ci,e===null?ci:e}function va(){(ut===0||ut===3||ut===2)&&(ut=4),dt===null||(zr&268435455)===0&&(vi&268435455)===0||ir(dt,vt)}function Ti(e,t){var n=Pe;Pe|=2;var r=kd();(dt!==e||vt!==t)&&(On=null,Or(e,t));do try{ph();break}catch(o){xd(e,o)}while(!0);if(Lo(),Pe=n,gi.current=r,lt!==null)throw Error(l(261));return dt=null,vt=0,ut}function ph(){for(;lt!==null;)wd(lt)}function hh(){for(;lt!==null&&!qi();)wd(lt)}function wd(e){var t=Nd(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?Sd(e):lt=t,aa.current=null}function Sd(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=ih(n,t,Gt),n!==null){lt=n;return}}else{if(n=oh(n,t),n!==null){n.flags&=32767,lt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,lt=null;return}}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);ut===0&&(ut=5)}function $r(e,t,n){var r=Ae,o=Jt.transition;try{Jt.transition=null,Ae=1,mh(e,t,n,r)}finally{Jt.transition=o,Ae=r}return null}function mh(e,t,n,r){do ks();while(sr!==null);if((Pe&6)!==0)throw Error(l(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(l(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(Al(e,u),e===dt&&(lt=dt=null,vt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||xi||(xi=!0,Ed(Kr,function(){return ks(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=Jt.transition,Jt.transition=null;var p=Ae;Ae=1;var y=Pe;Pe|=4,aa.current=null,uh(e,n),fd(n,e),Mp(vo),Pl=!!go,vo=go=null,e.current=n,ch(n),Ki(),Pe=y,Ae=p,Jt.transition=u}else e.current=n;if(xi&&(xi=!1,sr=e,ki=o),u=e.pendingLanes,u===0&&(rr=null),Yr(n.stateNode),$t(e,Xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(yi)throw yi=!1,e=da,da=null,e;return(ki&1)!==0&&e.tag!==0&&ks(),u=e.pendingLanes,(u&1)!==0?e===fa?ol++:(ol=0,fa=e):ol=0,Jn(),null}function ks(){if(sr!==null){var e=W(ki),t=Jt.transition,n=Ae;try{if(Jt.transition=null,Ae=16>e?16:e,sr===null)var r=!1;else{if(e=sr,sr=null,ki=0,(Pe&6)!==0)throw Error(l(331));var o=Pe;for(Pe|=4,J=e.current;J!==null;){var u=J,p=u.child;if((J.flags&16)!==0){var y=u.deletions;if(y!==null){for(var T=0;T<y.length;T++){var L=y[T];for(J=L;J!==null;){var F=J;switch(F.tag){case 0:case 11:case 15:sl(8,F,u)}var H=F.child;if(H!==null)H.return=F,J=H;else for(;J!==null;){F=J;var $=F.sibling,X=F.return;if(od(F),F===L){J=null;break}if($!==null){$.return=X,J=$;break}J=X}}}var te=u.alternate;if(te!==null){var se=te.child;if(se!==null){te.child=null;do{var st=se.sibling;se.sibling=null,se=st}while(se!==null)}}J=u}}if((u.subtreeFlags&2064)!==0&&p!==null)p.return=u,J=p;else e:for(;J!==null;){if(u=J,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:sl(9,u,u.return)}var j=u.sibling;if(j!==null){j.return=u.return,J=j;break e}J=u.return}}var _=e.current;for(J=_;J!==null;){p=J;var R=p.child;if((p.subtreeFlags&2064)!==0&&R!==null)R.return=p,J=R;else e:for(p=_;J!==null;){if(y=J,(y.flags&2048)!==0)try{switch(y.tag){case 0:case 11:case 15:mi(9,y)}}catch(oe){nt(y,y.return,oe)}if(y===p){J=null;break e}var V=y.sibling;if(V!==null){V.return=y.return,J=V;break e}J=y.return}}if(Pe=o,Jn(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(_r,e)}catch{}r=!0}return r}finally{Ae=n,Jt.transition=t}}return!1}function Td(e,t,n){t=gs(n,t),t=Uc(e,t,1),e=tr(e,t,1),t=Rt(),e!==null&&(jr(e,1,t),$t(e,t))}function nt(e,t,n){if(e.tag===3)Td(e,e,n);else for(;t!==null;){if(t.tag===3){Td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(rr===null||!rr.has(r))){e=gs(n,e),e=Bc(t,e,1),t=tr(t,e,1),e=Rt(),t!==null&&(jr(t,1,e),$t(t,e));break}}t=t.return}}function gh(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Rt(),e.pingedLanes|=e.suspendedLanes&n,dt===e&&(vt&n)===n&&(ut===4||ut===3&&(vt&130023424)===vt&&500>Xe()-ca?Or(e,0):ua|=n),$t(e,t)}function _d(e,t){t===0&&((e.mode&1)===0?t=1:(t=Zr,Zr<<=1,(Zr&130023424)===0&&(Zr=4194304)));var n=Rt();e=Mn(e,t),e!==null&&(jr(e,t,n),$t(e,n))}function vh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_d(e,n)}function yh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(l(314))}r!==null&&r.delete(t),_d(e,n)}var Nd;Nd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)bt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return bt=!1,lh(e,t,n);bt=(e.flags&131072)!==0}else bt=!1,Ye&&(t.flags&1048576)!==0&&sc(t,Zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pi(e,t),e=t.pendingProps;var o=as(t,wt.current);hs(t,n),o=Uo(null,t,r,e,o,n);var u=Bo();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zt(r)?(u=!0,Kl(t)):u=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Po(t),o.updater=di,t.stateNode=o,o._reactInternals=t,qo(t,r,e,n),t=Zo(null,t,r,!0,u,n)):(t.tag=0,Ye&&u&&_o(t),jt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=kh(r),e=ln(r,e),o){case 0:t=Xo(null,t,r,e,n);break e;case 1:t=Xc(null,t,r,e,n);break e;case 11:t=Gc(null,t,r,e,n);break e;case 14:t=Qc(null,t,r,ln(r.type,e),n);break e}throw Error(l(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),Xo(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),Xc(e,t,r,o,n);case 3:e:{if(Zc(t),e===null)throw Error(l(387));r=t.pendingProps,u=t.memoizedState,o=u.element,pc(e,t),si(t,r,null,n);var p=t.memoizedState;if(r=p.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){o=gs(Error(l(423)),t),t=Jc(e,t,r,n,o);break e}else if(r!==o){o=gs(Error(l(424)),t),t=Jc(e,t,r,n,o);break e}else for(Vt=Yn(t.stateNode.containerInfo.firstChild),Wt=t,Ye=!0,sn=null,n=dc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ds(),r===o){t=bn(e,t,n);break e}jt(e,t,r,n)}t=t.child}return t;case 5:return gc(t),e===null&&Co(t),r=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,p=o.children,yo(r,o)?p=null:u!==null&&yo(r,u)&&(t.flags|=32),Yc(e,t),jt(e,t,p,n),t.child;case 6:return e===null&&Co(t),null;case 13:return ed(e,t,n);case 4:return Mo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fs(t,null,r,n):jt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),Gc(e,t,r,o,n);case 7:return jt(e,t,t.pendingProps,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,u=t.memoizedProps,p=o.value,Qe(ti,r._currentValue),r._currentValue=p,u!==null)if(rn(u.value,p)){if(u.children===o.children&&!Mt.current){t=bn(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var y=u.dependencies;if(y!==null){p=u.child;for(var T=y.firstContext;T!==null;){if(T.context===r){if(u.tag===1){T=zn(-1,n&-n),T.tag=2;var L=u.updateQueue;if(L!==null){L=L.shared;var F=L.pending;F===null?T.next=T:(T.next=F.next,F.next=T),L.pending=T}}u.lanes|=n,T=u.alternate,T!==null&&(T.lanes|=n),Ao(u.return,n,t),y.lanes|=n;break}T=T.next}}else if(u.tag===10)p=u.type===t.type?null:u.child;else if(u.tag===18){if(p=u.return,p===null)throw Error(l(341));p.lanes|=n,y=p.alternate,y!==null&&(y.lanes|=n),Ao(p,n,t),p=u.sibling}else p=u.child;if(p!==null)p.return=u;else for(p=u;p!==null;){if(p===t){p=null;break}if(u=p.sibling,u!==null){u.return=p.return,p=u;break}p=p.return}u=p}jt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,hs(t,n),o=Xt(o),r=r(o),t.flags|=1,jt(e,t,r,n),t.child;case 14:return r=t.type,o=ln(r,t.pendingProps),o=ln(r.type,o),Qc(e,t,r,o,n);case 15:return qc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),pi(e,t),t.tag=1,zt(r)?(e=!0,Kl(t)):e=!1,hs(t,n),$c(t,r,o),qo(t,r,o,n),Zo(null,t,r,!0,e,n);case 19:return nd(e,t,n);case 22:return Kc(e,t,n)}throw Error(l(156,t.tag))};function Ed(e,t){return Ls(e,t)}function xh(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,n,r){return new xh(e,t,n,r)}function ya(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kh(e){if(typeof e=="function")return ya(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===b)return 14}return 2}function or(e,t){var n=e.alternate;return n===null?(n=en(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _i(e,t,n,r,o,u){var p=2;if(r=e,typeof e=="function")ya(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case ce:return Fr(n.children,o,u,t);case le:p=8,o|=8;break;case Te:return e=en(12,n,t,o|2),e.elementType=Te,e.lanes=u,e;case ye:return e=en(13,n,t,o),e.elementType=ye,e.lanes=u,e;case re:return e=en(19,n,t,o),e.elementType=re,e.lanes=u,e;case ge:return Ni(n,o,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:p=10;break e;case _e:p=9;break e;case ie:p=11;break e;case b:p=14;break e;case ee:p=16,r=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return t=en(p,n,t,o),t.elementType=e,t.type=r,t.lanes=u,t}function Fr(e,t,n,r){return e=en(7,e,r,t),e.lanes=n,e}function Ni(e,t,n,r){return e=en(22,e,r,t),e.elementType=ge,e.lanes=n,e.stateNode={isHidden:!1},e}function xa(e,t,n){return e=en(6,e,null,t),e.lanes=n,e}function ka(e,t,n){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wh(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ds(0),this.expirationTimes=Ds(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ds(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function wa(e,t,n,r,o,u,p,y,T){return e=new wh(e,t,n,y,T),t===1?(t=1,u===!0&&(t|=8)):t=0,u=en(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Po(u),e}function Sh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fe,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Cd(e){if(!e)return Zn;e=e._reactInternals;e:{if(Oe(e)!==e||e.tag!==1)throw Error(l(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(zt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(l(171))}if(e.tag===1){var n=e.type;if(zt(n))return tc(e,n,t)}return t}function jd(e,t,n,r,o,u,p,y,T){return e=wa(n,r,!0,e,o,u,p,y,T),e.context=Cd(null),n=e.current,r=Rt(),o=lr(n),u=zn(r,o),u.callback=t??null,tr(n,u,o),e.current.lanes=o,jr(e,o,r),$t(e,r),e}function Ei(e,t,n,r){var o=t.current,u=Rt(),p=lr(o);return n=Cd(n),t.context===null?t.context=n:t.pendingContext=n,t=zn(u,p),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=tr(o,t,p),e!==null&&(un(e,o,p,u),ri(e,o,p)),p}function Ci(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Rd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sa(e,t){Rd(e,t),(e=e.alternate)&&Rd(e,t)}function Th(){return null}var Ld=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ta(e){this._internalRoot=e}ji.prototype.render=Ta.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));Ei(e,t,null,null)},ji.prototype.unmount=Ta.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;br(function(){Ei(null,e,null,null)}),t[In]=null}};function ji(e){this._internalRoot=e}ji.prototype.unstable_scheduleHydration=function(e){if(e){var t=ne();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qn.length&&t!==0&&t<Qn[n].priority;n++);Qn.splice(n,0,e),n===0&&gu(e)}};function _a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ri(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Id(){}function _h(e,t,n,r,o){if(o){if(typeof r=="function"){var u=r;r=function(){var L=Ci(p);u.call(L)}}var p=jd(t,r,e,0,null,!1,!1,"",Id);return e._reactRootContainer=p,e[In]=p.current,Vs(e.nodeType===8?e.parentNode:e),br(),p}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var y=r;r=function(){var L=Ci(T);y.call(L)}}var T=wa(e,0,!1,null,null,!1,!1,"",Id);return e._reactRootContainer=T,e[In]=T.current,Vs(e.nodeType===8?e.parentNode:e),br(function(){Ei(t,T,n,r)}),T}function Li(e,t,n,r,o){var u=n._reactRootContainer;if(u){var p=u;if(typeof o=="function"){var y=o;o=function(){var T=Ci(p);y.call(T)}}Ei(t,p,e,o)}else p=_h(n,t,e,o,r);return Ci(p)}g=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Er(t.pendingLanes);n!==0&&(Gn(t,n|1),$t(t,Xe()),(Pe&6)===0&&(xs=Xe()+500,Jn()))}break;case 13:br(function(){var r=Mn(e,1);if(r!==null){var o=Rt();un(r,e,1,o)}}),Sa(e,1)}},E=function(e){if(e.tag===13){var t=Mn(e,134217728);if(t!==null){var n=Rt();un(t,e,134217728,n)}Sa(e,134217728)}},O=function(e){if(e.tag===13){var t=lr(e),n=Mn(e,t);if(n!==null){var r=Rt();un(n,e,t,r)}Sa(e,t)}},ne=function(){return Ae},de=function(e,t){var n=Ae;try{return Ae=e,t()}finally{Ae=n}},Dt=function(e,t,n){switch(t){case"input":if(Ut(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ql(r);if(!o)throw Error(l(90));Fe(r),Ut(r,o)}}}break;case"textarea":Ve(e,n);break;case"select":t=n.value,t!=null&&P(e,!!n.multiple,t,!1)}},vr=ma,yr=br;var Nh={usingClientEntryPoint:!1,Events:[qs,is,Ql,Qr,Cs,ma]},al={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Eh={bundleType:al.bundleType,version:al.version,rendererPackageName:al.rendererPackageName,rendererConfig:al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qr(e),e===null?null:e.stateNode},findFiberByHostInstance:al.findFiberByHostInstance||Th,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ii=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ii.isDisabled&&Ii.supportsFiber)try{_r=Ii.inject(Eh),Bt=Ii}catch{}}return Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nh,Ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_a(t))throw Error(l(200));return Sh(e,t,null,n)},Ft.createRoot=function(e,t){if(!_a(e))throw Error(l(299));var n=!1,r="",o=Ld;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=wa(e,1,!1,null,null,n,!1,r,o),e[In]=t.current,Vs(e.nodeType===8?e.parentNode:e),new Ta(t)},Ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=qr(t),e=e===null?null:e.stateNode,e},Ft.flushSync=function(e){return br(e)},Ft.hydrate=function(e,t,n){if(!Ri(t))throw Error(l(200));return Li(null,e,t,!0,n)},Ft.hydrateRoot=function(e,t,n){if(!_a(e))throw Error(l(405));var r=n!=null&&n.hydratedSources||null,o=!1,u="",p=Ld;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),t=jd(t,null,e,1,n??null,o,!1,u,p),e[In]=t.current,Vs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new ji(t)},Ft.render=function(e,t,n){if(!Ri(t))throw Error(l(200));return Li(null,e,t,!1,n)},Ft.unmountComponentAtNode=function(e){if(!Ri(e))throw Error(l(40));return e._reactRootContainer?(br(function(){Li(null,null,e,!1,function(){e._reactRootContainer=null,e[In]=null})}),!0):!1},Ft.unstable_batchedUpdates=ma,Ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ri(n))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return Li(e,t,n,!1,r)},Ft.version="18.3.1-next-f1338f8080-20240426",Ft}var $d;function zh(){if($d)return Ca.exports;$d=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),Ca.exports=Mh(),Ca.exports}var Fd;function bh(){if(Fd)return Ai;Fd=1;var s=zh();return Ai.createRoot=s.createRoot,Ai.hydrateRoot=s.hydrateRoot,Ai}var Oh=bh();const $h=wf(Oh),Ud=s=>{let i;const l=new Set,a=(v,k)=>{const S=typeof v=="function"?v(i):v;if(!Object.is(S,i)){const w=i;i=k??(typeof S!="object"||S===null)?S:Object.assign({},i,S),l.forEach(D=>D(i,w))}},d=()=>i,m={setState:a,getState:d,getInitialState:()=>x,subscribe:v=>(l.add(v),()=>l.delete(v))},x=i=s(a,d,m);return m},Fh=(s=>s?Ud(s):Ud),Uh=s=>s;function Bh(s,i=Uh){const l=ml.useSyncExternalStore(s.subscribe,ml.useCallback(()=>i(s.getState()),[s,i]),ml.useCallback(()=>i(s.getInitialState()),[s,i]));return ml.useDebugValue(l),l}const Hh=s=>{const i=Fh(s),l=a=>Bh(i,a);return Object.assign(l,i),l},Wh=(s=>Hh),Vh="/api";async function Bi(s,i,l){const a=await fetch(`${Vh}${i}`,{method:s,headers:l?{"Content-Type":"application/json"}:void 0,body:l?JSON.stringify(l):void 0});if(!a.ok)throw new Error(`${s} ${i} failed: ${a.status} ${a.statusText}`);return a.json()}function Hr(s){return Bi("GET",s)}function Tn(s,i){return Bi("POST",s,i)}function Sf(s){return Bi("DELETE",s)}function dr(s,i){return Bi("PATCH",s,i)}function Gh(){return Hr("/sessions")}function Di(s){return Hr(`/sessions/${s}`)}function Tf(s){return Tn("/sessions",s)}function Qh(s){return Sf(`/sessions/${s}`)}function qh(s,i,l){return Tn(`/sessions/${s}/turns`,{user_prompt:i,...l!=null&&l.length?{attachments:l}:{}})}function Kh(s){return Tn(`/sessions/${s}/cancel`)}function Yh(s,i){return dr(`/sessions/${s}`,{title:i})}function Xh(s){return dr(`/sessions/${s}`,{lifecycle:"finished"})}function Zh(s){return dr(`/sessions/${s}`,{lifecycle:"working"})}function Bd(s){return dr(`/sessions/${s}`,{has_unreviewed:0})}function Jh(s,i,l,a){const d={model:i,model_reasoning_effort:l};return a!==void 0&&(d.runtime_type=a),dr(`/sessions/${s}`,d)}function em(s,i){return dr(`/sessions/${s}`,{runtime_config:i})}function tm(s,i){return Tn(`/sessions/${s}/rewind`,{turn_id:i})}function nm(s){return Tn(`/sessions/${s}/restore`,{})}function rm(s,i,l){return Tn(`/sessions/${s}/branch`,{turn_id:i,title:l})}function _f(){return Hr("/workspaces")}function sm(s,i){return Tn("/workspaces",{path:s,label:i})}function lm(s){return Tn("/workspaces/hide",{path:s})}async function im(){const s=await fetch("/api/pick-directory");if(s.status===204)return{cancelled:!0};if(!s.ok)throw new Error(`GET /api/pick-directory failed: ${s.status} ${s.statusText}`);return s.json()}const om=(s,i)=>({sessions:[],sessionDetails:{},activeSessionId:null,openTabs:[],activeTurnIndex:0,submittingPrompt:null,restoredPrompt:null,quotedText:null,init:async()=>{try{const l=localStorage.getItem("agentpane:last-model-config");l&&s({lastModelConfig:JSON.parse(l)})}catch{}s({loading:!0,error:null});try{const[l,a]=await Promise.all([Gh(),_f()]);s({sessions:l,workspaces:a,loading:!1}),l.length>0&&!i().activeSessionId&&await i().selectSession(l[0].id)}catch(l){s({loading:!1,error:l.message})}},selectSession:async l=>{if(i().sessionDetails[l]){const a=i().sessionDetails[l];s({activeSessionId:l,activeTurnIndex:a.turns.length>0?a.turns.length-1:0,activeRightTab:"turns",openTabs:i().openTabs.includes(l)?i().openTabs:[...i().openTabs,l]}),a.has_unreviewed===1&&(Bd(l).catch(()=>{}),s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,has_unreviewed:0}:f),sessionDetails:{...d.sessionDetails,[l]:{...a,has_unreviewed:0}}})));return}s({loading:!0,error:null});try{const a=await Di(l);s(d=>({sessionDetails:{...d.sessionDetails,[l]:a},activeSessionId:l,activeTurnIndex:a.turns.length>0?a.turns.length-1:0,activeRightTab:"turns",loading:!1})),a.has_unreviewed===1&&(Bd(l).catch(()=>{}),s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,has_unreviewed:0}:f),sessionDetails:{...d.sessionDetails,[l]:{...a,has_unreviewed:0}}})))}catch(a){s({loading:!1,error:a.message})}},closeTab:l=>{s(a=>{const d=a.openTabs.filter(f=>f!==l);if(a.activeSessionId===l&&d.length>0){const f=d[d.length-1],h=a.sessionDetails[f];return{openTabs:d,activeSessionId:f,activeTurnIndex:h&&h.turns.length>0?h.turns.length-1:0}}return{openTabs:d,activeSessionId:a.activeSessionId===l?null:a.activeSessionId}})},updateModelConfig:async(l,a,d)=>{const f=i().activeSessionId;if(f){s({error:null});try{const h=await Jh(f,l,a,d),m={provider:h.runtime_type,model:h.model??"",reasoning:h.model_reasoning_effort??""};s({lastModelConfig:m}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(m)),s(x=>({sessions:x.sessions.map(v=>v.id===f?h:v),sessionDetails:x.sessionDetails[f]?{...x.sessionDetails,[f]:{...x.sessionDetails[f],model:h.model,model_reasoning_effort:h.model_reasoning_effort,external_thread_id:h.external_thread_id}}:x.sessionDetails})),await i().refreshActiveSession()}catch(h){s({error:h.message}),i().addToast("error",`Failed to update model — ${h.message}`)}}},createSession:async l=>{s({error:null});try{const a=await Tf(l);s(f=>({sessions:[a,...f.sessions],showNewSessionDialog:!1}));const d={provider:a.runtime_type,model:a.model??"",reasoning:a.model_reasoning_effort??""};s({lastModelConfig:d}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(d)),await i().selectSession(a.id),i().addLogEntry("INFO",`Session created — ${a.id.slice(0,8)}`),i().addToast("success",`Session created — ${a.title||a.id.slice(0,8)}`)}catch(a){s({error:a.message}),i().addToast("error",`Failed to create session — ${a.message}`)}},deleteSession:async l=>{var d;s({error:null});const a=(d=i().sessions.find(f=>f.id===l))==null?void 0:d.title;try{await Qh(l),s(f=>{const h={...f.sessionDetails};delete h[l];const m=f.openTabs.filter(k=>k!==l);let x=f.activeSessionId,v=f.activeTurnIndex;if(f.activeSessionId===l){x=m.length>0?m[m.length-1]:null;const k=x?h[x]:null;v=k&&k.turns.length>0?k.turns.length-1:0}return{sessions:f.sessions.filter(k=>k.id!==l),sessionDetails:h,openTabs:m,activeSessionId:x,activeTurnIndex:v}}),i().addLogEntry("INFO",`Session deleted — ${l.slice(0,8)}`),i().addToast("info",`Session "${a||l.slice(0,8)}" deleted`)}catch(f){s({error:f.message}),i().addToast("error",`Failed to delete session — ${f.message}`)}},renameSession:async(l,a)=>{s({error:null});try{const d=await Yh(l,a.trim());s(f=>({sessions:f.sessions.map(h=>h.id===l?d:h),sessionDetails:f.sessionDetails[l]?{...f.sessionDetails,[l]:{...f.sessionDetails[l],title:d.title}}:f.sessionDetails}))}catch(d){s({error:d.message}),i().addToast("error",`Failed to rename session — ${d.message}`)}},markFinished:async l=>{s({error:null});try{const a=await Xh(l);s(d=>({sessions:d.sessions.map(f=>f.id===l?a:f)})),i().addToast("info","Session marked as finished")}catch(a){s({error:a.message}),i().addToast("error",`Failed to mark as finished — ${a.message}`)}},reopenSession:async l=>{s({error:null});try{const a=await Zh(l);s(d=>({sessions:d.sessions.map(f=>f.id===l?a:f)})),i().addToast("info","Session reopened")}catch(a){s({error:a.message}),i().addToast("error",`Failed to reopen session — ${a.message}`)}},submitPrompt:async(l,a)=>{const d=i().activeSessionId;if(d){s({error:null,submittingPrompt:l}),s(f=>{const h=f.sessionDetails[d];return h?{sessionDetails:{...f.sessionDetails,[d]:{...h,is_running:1,status:"running"}},sessions:f.sessions.map(m=>m.id===d?{...m,is_running:1,status:"running"}:m)}:{}});try{const f=await qh(d,l,a);i().addLogEntry("INFO",`Turn submitted — "${l.slice(0,40)}"`),s(h=>{const m=h.sessionDetails[d];if(!m)return{submittingPrompt:null};const x={...f,items:[]};return{submittingPrompt:null,sessionDetails:{...h.sessionDetails,[d]:{...m,turns:[...m.turns,x]}},activeTurnIndex:m.turns.length}})}catch(f){s({submittingPrompt:null,error:f.message}),i().addLogEntry("ERROR",`Turn failed — ${f.message}`),i().addToast("error",`Failed to send prompt — ${f.message}`),s(h=>({sessionDetails:h.sessionDetails[d]?{...h.sessionDetails,[d]:{...h.sessionDetails[d],is_running:0,status:"active"}}:h.sessionDetails,sessions:h.sessions.map(m=>m.id===d?{...m,is_running:0,status:"active"}:m)}))}}},cancelTurn:async()=>{const l=i().activeSessionId;if(l)try{await Kh(l)}catch(a){s({error:a.message})}},rewindToTurn:async(l,a)=>{s({error:null});try{const d=await tm(l,a),f=await Di(l);s(h=>({sessionDetails:{...h.sessionDetails,[l]:f},sessions:h.sessions.map(m=>m.id===l?{...m,external_thread_id:d.external_thread_id,is_running:0,status:"active"}:m),activeTurnIndex:f.turns.length>0?f.turns.length-1:0})),i().addToast("info","Rewound to selected turn")}catch(d){s({error:d.message}),i().addToast("error",`Failed to rewind — ${d.message}`)}},restoreSession:async l=>{s({error:null});try{const a=await nm(l),d=await Di(l);s(f=>({sessionDetails:{...f.sessionDetails,[l]:d},sessions:f.sessions.map(h=>h.id===l?{...h,external_thread_id:a.external_thread_id,is_running:0,status:"active"}:h),activeTurnIndex:d.turns.length>0?d.turns.length-1:0})),i().addToast("info","Restored rewound session")}catch(a){s({error:a.message}),i().addToast("error",`Failed to restore — ${a.message}`)}},branchFromTurn:async(l,a,d)=>{s({error:null});try{const f=await rm(l,a,d);s(h=>({sessions:[f,...h.sessions]})),await i().selectSession(f.id),i().addToast("success","Branched from selected turn")}catch(f){s({error:f.message}),i().addToast("error",`Failed to branch — ${f.message}`)}},updateRuntimeConfig:async l=>{const a=i().activeSessionId;if(a){s({error:null});try{const d=await em(a,JSON.stringify(l));s(f=>({sessions:f.sessions.map(h=>h.id===a?d:h),sessionDetails:f.sessionDetails[a]?{...f.sessionDetails,[a]:{...f.sessionDetails[a],runtime_config:d.runtime_config}}:f.sessionDetails}))}catch(d){s({error:d.message}),i().addToast("error",`Failed to update config — ${d.message}`)}}},refreshActiveSession:async()=>{const l=i().activeSessionId;if(l)try{const a=await Di(l);s(d=>({sessionDetails:{...d.sessionDetails,[l]:a},activeTurnIndex:a.turns.length>0?Math.min(d.activeTurnIndex,a.turns.length-1):0,sessions:d.sessions.map(f=>f.id===l?{...f,is_running:a.is_running,status:a.status}:f)}))}catch(a){s({error:a.message})}}}),am=(s,i)=>({workspaces:[],addWorkspace:async l=>{s({error:null});try{const a=await sm(l.trim());s(d=>({workspaces:[...d.workspaces,a]})),i().addToast("success",`Workspace added — ${a.path}`)}catch(a){i().addToast("error",`Failed to add workspace — ${a.message}`)}},removeWorkspace:async l=>{s({error:null});try{await lm(l);const a=await _f();s({workspaces:a}),i().addToast("info","Workspace hidden")}catch(a){i().addToast("error",`Failed to hide workspace — ${a.message}`)}},createSessionInWorkspace:async l=>{s({error:null});try{const a=i().lastModelConfig,d=await Tf({cwd:l,runtime_type:(a==null?void 0:a.provider)??"codex",model:a==null?void 0:a.model,model_reasoning_effort:a==null?void 0:a.reasoning});s(f=>({sessions:[d,...f.sessions]})),await i().selectSession(d.id),i().addLogEntry("INFO",`Session created in ${l} — ${d.id.slice(0,8)}`),i().addToast("success",`Session created in ${l.split("/").pop()||l}`)}catch(a){s({error:a.message}),i().addToast("error",`Failed to create session — ${a.message}`)}},pickAndAddWorkspace:async()=>{try{const l=await im();if(l.cancelled||!l.path)return;await i().addWorkspace(l.path)}catch(l){i().addToast("error",`Failed to pick directory — ${l.message}`)}}}),um=(s,i)=>({wsConnected:!1,setWsConnected:l=>s({wsConnected:l}),onTurnStarted:(l,a)=>{i().addLogEntry("DEBUG",`turn:started — ${a.slice(0,8)}`),s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,is_running:1,status:"running",turns:f.turns.map(h=>h.id===a?{...h,status:"running"}:h)}},sessions:d.sessions.map(h=>h.id===l?{...h,is_running:1,status:"running"}:h),activeTurnIndex:d.activeSessionId===l?f.turns.findIndex(h=>h.id===a):d.activeTurnIndex}:{}})},onItemStarted:(l,a,d)=>{i().addLogEntry("DEBUG",`item:started — ${d.type}`),s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:La(h,a,d)}}:{}})},onItemUpdated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:La(h,a,d)}}:{}})},onItemCompleted:(l,a,d)=>{if(i().addLogEntry("DEBUG",`item:completed — ${d.type}`),d.type==="background_task"&&(d.status==="completed"||d.status==="failed")){const f=d.data||{},h=f.task_type||"unknown",m=f.description||"background task",v=h==="local_agent"?"Subagent":h==="local_bash"?"Monitor":"Task";d.status==="completed"?i().addToast("success",`${v} completed: ${m}`):i().addToast("error",`${v} failed: ${m}`)}s(f=>{var v,k;const h=f.sessionDetails[l];if(!h)return{};const m=La(h,a,d);let x=m.turns;return d.type==="agent_message"&&((v=d.data)!=null&&v.text)&&(x=x.map(S=>S.id===a?{...S,agent_response:d.data.text}:S)),d.type==="reasoning"&&((k=d.data)!=null&&k.text)&&(x=x.map(S=>{if(S.id!==a)return S;const w=S.thoughts?S.thoughts+`
|
|
41
|
-
`+d.data.text:d.data.text;return{...S,thoughts:w}})),{sessionDetails:{...f.sessionDetails,[l]:{...m,turns:x}}}})},onItemDelta:(l,a,d,f)=>{s(h=>{const m=h.sessionDetails[l];return m?{sessionDetails:{...h.sessionDetails,[l]:cm(m,a,d,f)}}:{}})},onTurnCompleted:(l,a,d,f)=>{const h=(d==null?void 0:d.input_tokens)??0,m=(d==null?void 0:d.output_tokens)??0;i().addLogEntry("INFO",`turn:completed — ${h} in / ${m} out`),s(x=>{const v=x.sessionDetails[l];return v?{sessionDetails:{...x.sessionDetails,[l]:{...v,is_running:0,status:"active",has_unreviewed:f?1:v.has_unreviewed,turns:v.turns.map(k=>k.id===a?{...k,status:"completed",token_usage:d??k.token_usage??null}:k)}},sessions:x.sessions.map(k=>k.id===l?{...k,is_running:0,status:"active",has_unreviewed:f?1:k.has_unreviewed}:k)}:{}})},onTokenUsageUpdated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,turns:h.turns.map(m=>m.id===a?{...m,token_usage:d}:m)}}}:{}})},onContextUsageUpdated:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,contextUsage:a}}}:{}})},onTurnFailed:(l,a,d)=>{i().addLogEntry("ERROR",`turn:failed — ${d}`),i().addToast("error",`Turn failed — ${d}`),s(f=>{const h=f.sessionDetails[l];if(!h)return{};const m=d.includes("cancelled")||d.includes("aborted"),x=m?"aborted":"failed";return{sessionDetails:{...f.sessionDetails,[l]:{...h,is_running:0,status:m?"active":"failed",turns:h.turns.map(v=>{if(v.id!==a)return v;const k=v.items.map(S=>S.status==="in_progress"?{...S,status:"failed"}:S);return{...v,status:x,error:d,items:k}})}},sessions:f.sessions.map(v=>v.id===l?{...v,is_running:0,status:m?"active":"failed"}:v)}})},onTurnCancelled:(l,a)=>{s(d=>{const f=d.sessionDetails[l];if(!f)return{};const h=f.turns.find(v=>v.id===a),m=(h==null?void 0:h.user_prompt)??null,x=f.turns.filter(v=>v.id!==a);return{restoredPrompt:m,sessionDetails:{...d.sessionDetails,[l]:{...f,is_running:0,status:"active",turns:x}},sessions:d.sessions.map(v=>v.id===l?{...v,is_running:0,status:"active"}:v),activeTurnIndex:x.length>0?Math.min(d.activeTurnIndex,x.length-1):0}})},onSessionTitle:(l,a)=>{s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,title:a}:f),sessionDetails:d.sessionDetails[l]?{...d.sessionDetails,[l]:{...d.sessionDetails[l],title:a}}:d.sessionDetails}))},onBackgroundTasksChanged:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,backgroundTasks:a}}}:{}})}});function La(s,i,l){return{...s,turns:s.turns.map(a=>{if(a.id!==i)return a;const d=a.items.findIndex(f=>f.external_item_id===l.external_item_id);if(d>=0){const f=[...a.items];return f[d]=l,{...a,items:f}}if(l.type==="agent_message"){const f=a.items.filter(h=>!(h.type==="agent_message"&&h.id.startsWith("delta-")));return{...a,items:[...f,l]}}return{...a,items:[...a.items,l]}})}}function cm(s,i,l,a){return{...s,turns:s.turns.map(d=>{var m;if(d.id!==i)return d;const f=d.items.findIndex(x=>x.external_item_id===l);if(f>=0){const x=d.items[f],k=(((m=x.data)==null?void 0:m.text)??"")+a,S=[...d.items];return S[f]={...x,data:{...x.data,text:k}},{...d,items:S,agent_response:k}}const h={id:`delta-${l}`,turn_id:i,external_item_id:l,type:"agent_message",data:{text:a},status:"in_progress",created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return{...d,items:[...d.items,h],agent_response:a}})}}function dm(s){return Hr(`/providers/${s}/models`)}const fm=(s,i)=>({activeRightTab:"turns",changesScope:"session",eventLog:[],loading:!1,error:null,showNewSessionDialog:!1,toasts:[],showCommandPalette:!1,selectedChangePath:null,lastModelConfig:null,models:[],modelsLoading:!1,showModelSelector:!1,setActiveTurnIndex:l=>s({activeTurnIndex:l}),switchRightTab:l=>s({activeRightTab:l}),setChangesScope:l=>s({changesScope:l}),setShowNewSessionDialog:l=>s({showNewSessionDialog:l}),setShowCommandPalette:l=>s({showCommandPalette:l}),setShowModelSelector:l=>s({showModelSelector:l}),setSelectedChangePath:l=>s({selectedChangePath:l}),addToast:(l,a,d,f)=>{const h=Math.random().toString(36).slice(2,9);s(m=>({toasts:[...m.toasts,{id:h,type:l,message:a,undoAction:d,undoLabel:f}]}))},removeToast:l=>{s(a=>({toasts:a.toasts.filter(d=>d.id!==l)}))},addLogEntry:(l,a)=>{const d=new Date().toLocaleTimeString("en-GB",{hour12:!1});s(f=>({eventLog:[...f.eventLog,{time:d,level:l,message:a}]}))},loadModels:async l=>{if(!i().modelsLoading){s({modelsLoading:!0,models:[]});try{const a=await dm(l);s({models:a,modelsLoading:!1})}catch{s({modelsLoading:!1})}}}}),pm=(s,i)=>({createThread:async(l,a)=>{try{await Tn(`/sessions/${l}/threads`,a),i().addLogEntry("INFO",`Thread created — "${a.message.slice(0,40)}"`)}catch(d){i().addToast("error",`Failed to create thread — ${d.message}`)}},followupThread:async(l,a,d)=>{try{await Tn(`/sessions/${l}/threads/${a}/followup`,{message:d}),i().addLogEntry("INFO",`Thread follow-up — "${d.slice(0,40)}"`)}catch(f){i().addToast("error",`Failed to send follow-up — ${f.message}`)}},resolveThread:async(l,a)=>{try{await dr(`/sessions/${l}/threads/${a}`,{status:"resolved"})}catch(d){i().addToast("error",`Failed to resolve thread — ${d.message}`)}},reopenThread:async(l,a)=>{try{await dr(`/sessions/${l}/threads/${a}`,{status:"open"})}catch(d){i().addToast("error",`Failed to reopen thread — ${d.message}`)}},deleteThread:async(l,a)=>{try{await Sf(`/sessions/${l}/threads/${a}`)}catch(d){i().addToast("error",`Failed to delete thread — ${d.message}`)}},onThreadCreated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,threads:[...h.threads??[],a],turns:[...h.turns,{...d,items:[]}]}}}:{}})},onThreadFollowup:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,turns:[...h.turns,{...d,items:[]}]}}}:{}})},onThreadResolved:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];if(!h)return{};const m=(h.threads??[]).map(x=>x.id===a?{...x,status:d,resolved_at:d==="resolved"?new Date().toISOString():null}:x);return{sessionDetails:{...f.sessionDetails,[l]:{...h,threads:m}}}})},onThreadDeleted:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,threads:(f.threads??[]).filter(h=>h.id!==a),turns:f.turns.filter(h=>h.thread_id!==a)}}}:{}})}}),K=Wh()((...s)=>({...om(...s),...am(...s),...um(...s),...fm(...s),...pm(...s)}));function Nf(s){switch(s){case"claude":return{iconClass:"ic-claude",iconText:"CL"};case"codex":return{iconClass:"ic-codex",iconText:"CX"};case"repoburg":return{iconClass:"ic-repoburg",iconText:"RB"};case"cursor":return{iconClass:"ic-cursor",iconText:"CR"};default:return{iconClass:"ic-codex",iconText:"CX"}}}function hm(s,i){const l=new Date(s).getTime(),a=i?new Date(i).getTime():Date.now(),d=Math.max(0,Math.floor((a-l)/1e3));if(d<60)return`${d}s`;const f=Math.floor(d/60),h=d%60;if(f<60)return`${f}m ${h}s`;const m=Math.floor(f/60),x=f%60;return`${m}h ${x}m`}function mm(s,i,l=!1,a="working"){if(a==="finished")return"";if(i)return"running";if(l&&s!=="failed")return"queued";switch(s){case"failed":return"error";case"aborted":return"paused";default:return"paused"}}function gm(s,i,l=!1,a="working"){if(a==="finished")return"Finished";if(i)return"Running";if(l&&s!=="failed")return"Review Pending";switch(s){case"failed":return"Failed";case"aborted":return"Aborted";case"active":return"Idle";case"completed":return"Completed";case"running":return"Running";default:return s}}function Ya(s){const i=s.is_running===1,l=s.lifecycle==="finished",a=Nf(s.runtime_type);return{dot:mm(s.status,i,s.has_unreviewed===1,s.lifecycle),label:gm(s.status,i,s.has_unreviewed===1,s.lifecycle),iconClass:a.iconClass,iconText:a.iconText,isRunning:i,isFinished:l}}function Xa(s,i,l=!0){M.useEffect(()=>{if(!l)return;function a(d){s.current&&!s.current.contains(d.target)&&i()}return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[s,i,l])}function Za(s,i=!0){M.useEffect(()=>{if(!i)return;function l(a){a.key==="Escape"&&s()}return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[s,i])}function Ja({status:s,size:i=6}){return c.jsx("span",{className:`status-dot ${s}`,style:i!==6?{width:i,height:i}:void 0})}function Ef({iconClass:s,iconText:i,size:l=20}){return c.jsx("span",{className:`runtime-icon ${s}`,style:l!==20?{width:l,height:l,fontSize:l*.45}:void 0,children:i})}/**
|
|
42
|
-
* @license lucide-react v0.469.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const vm=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cf=(...s)=>s.filter((i,l,a)=>!!i&&i.trim()!==""&&a.indexOf(i)===l).join(" ").trim();/**
|
|
47
|
-
* @license lucide-react v0.469.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var ym={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
52
|
-
* @license lucide-react v0.469.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const xm=M.forwardRef(({color:s="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:d="",children:f,iconNode:h,...m},x)=>M.createElement("svg",{ref:x,...ym,width:i,height:i,stroke:s,strokeWidth:a?Number(l)*24/Number(i):l,className:Cf("lucide",d),...m},[...h.map(([v,k])=>M.createElement(v,k)),...Array.isArray(f)?f:[f]]));/**
|
|
57
|
-
* @license lucide-react v0.469.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const we=(s,i)=>{const l=M.forwardRef(({className:a,...d},f)=>M.createElement(xm,{ref:f,iconNode:i,className:Cf(`lucide-${vm(s)}`,a),...d}));return l.displayName=`${s}`,l};/**
|
|
62
|
-
* @license lucide-react v0.469.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const km=we("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
67
|
-
* @license lucide-react v0.469.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Oa=we("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
72
|
-
* @license lucide-react v0.469.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const wm=we("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
77
|
-
* @license lucide-react v0.469.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const yl=we("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
82
|
-
* @license lucide-react v0.469.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const $a=we("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
87
|
-
* @license lucide-react v0.469.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const eu=we("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
92
|
-
* @license lucide-react v0.469.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const tu=we("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
97
|
-
* @license lucide-react v0.469.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Sm=we("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
102
|
-
* @license lucide-react v0.469.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const jf=we("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
107
|
-
* @license lucide-react v0.469.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const Rf=we("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
|
|
112
|
-
* @license lucide-react v0.469.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const Hd=we("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
117
|
-
* @license lucide-react v0.469.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const Tm=we("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
|
|
122
|
-
* @license lucide-react v0.469.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const _m=we("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
127
|
-
* @license lucide-react v0.469.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const Nm=we("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/**
|
|
132
|
-
* @license lucide-react v0.469.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const Lf=we("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
137
|
-
* @license lucide-react v0.469.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const Em=we("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
142
|
-
* @license lucide-react v0.469.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const Cm=we("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
147
|
-
* @license lucide-react v0.469.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const jm=we("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
152
|
-
* @license lucide-react v0.469.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const Rm=we("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
157
|
-
* @license lucide-react v0.469.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const Lm=we("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
162
|
-
* @license lucide-react v0.469.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const Im=we("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
167
|
-
* @license lucide-react v0.469.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const Am=we("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
172
|
-
* @license lucide-react v0.469.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const Dm=we("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
177
|
-
* @license lucide-react v0.469.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const Pm=we("MessageSquarePlus",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/**
|
|
182
|
-
* @license lucide-react v0.469.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const Mm=we("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
187
|
-
* @license lucide-react v0.469.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const zm=we("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
192
|
-
* @license lucide-react v0.469.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const bm=we("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/**
|
|
197
|
-
* @license lucide-react v0.469.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const Om=we("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
202
|
-
* @license lucide-react v0.469.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const $m=we("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
207
|
-
* @license lucide-react v0.469.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const Fm=we("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
212
|
-
* @license lucide-react v0.469.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const xl=we("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
217
|
-
* @license lucide-react v0.469.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const If=we("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
|
|
222
|
-
* @license lucide-react v0.469.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const Um=we("Rewind",[["polygon",{points:"11 19 2 12 11 5 11 19",key:"14yba5"}],["polygon",{points:"22 19 13 12 22 5 22 19",key:"1pi1cj"}]]);/**
|
|
227
|
-
* @license lucide-react v0.469.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const nu=we("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
232
|
-
* @license lucide-react v0.469.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const Af=we("SatelliteDish",[["path",{d:"M4 10a7.31 7.31 0 0 0 10 10Z",key:"1fzpp3"}],["path",{d:"m9 15 3-3",key:"88sc13"}],["path",{d:"M17 13a6 6 0 0 0-6-6",key:"15cc6u"}],["path",{d:"M21 13A10 10 0 0 0 11 3",key:"11nf8s"}]]);/**
|
|
237
|
-
* @license lucide-react v0.469.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const Bm=we("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
242
|
-
* @license lucide-react v0.469.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const ru=we("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
247
|
-
* @license lucide-react v0.469.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const Hi=we("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
252
|
-
* @license lucide-react v0.469.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const Df=we("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
257
|
-
* @license lucide-react v0.469.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const kl=we("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
262
|
-
* @license lucide-react v0.469.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const Hm=we("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
267
|
-
* @license lucide-react v0.469.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const Wm=we("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
272
|
-
* @license lucide-react v0.469.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const Vm=we("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
277
|
-
* @license lucide-react v0.469.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const Gm=we("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
282
|
-
* @license lucide-react v0.469.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const fr=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
287
|
-
* @license lucide-react v0.469.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const Wd=we("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Qm(s,i){const l=new Map;for(const h of i){const m=h.cwd||"(no directory)",x=l.get(m)??[];x.push(h),l.set(m,x)}const a=new Set,d=new Set(s.filter(h=>h.deleted===1).map(h=>h.path)),f=[];for(const h of s){if(h.deleted===1){a.add(h.path);continue}a.add(h.path),f.push({path:h.path,label:h.label||h.path.split("/").pop()||h.path,sessions:l.get(h.path)??[],workspace:h})}for(const[h,m]of l)a.has(h)||d.has(h)||f.push({path:h,label:h==="(no directory)"?"Other":h.split("/").pop()||h,sessions:m,workspace:null});return f}function qm(){const{sessions:s,workspaces:i,activeSessionId:l,selectSession:a,deleteSession:d,removeWorkspace:f,createSessionInWorkspace:h,pickAndAddWorkspace:m,renameSession:x,markFinished:v,reopenSession:k}=K(),[S,w]=M.useState(new Set),[D,I]=M.useState(new Set),[C,z]=M.useState(null),[q,G]=M.useState(null),[Y,U]=M.useState(""),ae=M.useRef(null),fe=M.useRef(null);Xa(ae,()=>z(null),!!C),Za(()=>z(null),!!C);function ce(re){w(b=>{const ee=new Set(b);return ee.has(re)?ee.delete(re):ee.add(re),ee})}function le(re){I(b=>{const ee=new Set(b);return ee.has(re)?ee.delete(re):ee.add(re),ee})}M.useEffect(()=>{q&&fe.current&&(fe.current.focus(),fe.current.select())},[q]);function Te(re,b){G(re),U(b||re.slice(0,8))}function Z(){q&&x(q,Y),G(null)}function _e(){G(null),U("")}const ie=Qm(i,s);function ye(re){const b=l===re.id,ee=Ya(re);return c.jsxs("div",{className:`tree-item ${b?"active":""} ${ee.isFinished?"tree-item-finished":""}`,onClick:()=>a(re.id),onContextMenu:ge=>{ge.preventDefault(),z({x:ge.clientX,y:ge.clientY,type:"session",sessionId:re.id,sessionTitle:re.title,sessionLifecycle:re.lifecycle})},children:[c.jsx(Ef,{iconClass:ee.iconClass,iconText:ee.iconText,size:16}),q===re.id?c.jsx("input",{ref:fe,className:"tree-rename-input",value:Y,onChange:ge=>U(ge.target.value),onClick:ge=>ge.stopPropagation(),onKeyDown:ge=>{ge.key==="Enter"&&Z(),ge.key==="Escape"&&_e()},onBlur:Z}):c.jsx("span",{className:"tree-label",children:re.title||re.id.slice(0,8)}),ee.dot&&c.jsx(Ja,{status:ee.dot})]},re.id)}return c.jsxs("div",{className:"ide-sidebar",children:[c.jsxs("div",{className:"sidebar-header",children:[c.jsx("span",{className:"sidebar-header-title",children:"Workspaces"}),c.jsx("button",{className:"sidebar-add",title:"Add workspace",onClick:()=>m(),children:c.jsx(xl,{size:14})})]}),ie.length===0?c.jsx("div",{className:"empty-state",style:{padding:"16px"},children:"No workspaces yet. Click + to add one."}):ie.map(re=>{const b=S.has(re.path),ee=re.sessions.filter(Q=>Q.lifecycle!=="finished"),ge=re.sessions.filter(Q=>Q.lifecycle==="finished"),B=`${re.path}:finished`,ue=D.has(B);return c.jsxs("div",{className:`tree-section ${b?"collapsed":""}`,children:[c.jsxs("div",{className:"tree-section-header",onClick:()=>ce(re.path),onContextMenu:Q=>{Q.preventDefault(),z({x:Q.clientX,y:Q.clientY,type:"workspace",path:re.path})},children:[c.jsx($a,{size:9,className:"tree-chevron"}),c.jsx(Cm,{size:14}),c.jsx("span",{className:"tree-section-label",children:re.label}),c.jsx("button",{className:"tree-section-add",title:"New session in this workspace",onClick:Q=>{Q.stopPropagation(),h(re.path)},children:c.jsx(xl,{size:11})}),c.jsx("span",{className:"tree-count",children:re.sessions.length})]}),c.jsxs("div",{className:"tree-children",children:[ee.length===0&&ge.length===0?c.jsx("div",{className:"tree-empty",children:"No sessions"}):ee.map(ye),ge.length>0&&c.jsxs("div",{className:`tree-subgroup ${ue?"collapsed":""}`,children:[c.jsxs("div",{className:"tree-subgroup-header",onClick:()=>le(B),children:[c.jsx($a,{size:8,className:"tree-chevron"}),c.jsx("span",{className:"tree-subgroup-label",children:"Finished"}),c.jsx("span",{className:"tree-subgroup-count",children:ge.length})]}),!ue&&c.jsx("div",{className:"tree-subgroup-items",children:ge.map(ye)})]})]})]},re.path)}),c.jsxs("div",{className:"sidebar-footer",onClick:()=>m(),children:[c.jsx(Em,{size:14}),c.jsx("span",{children:"Add workspace"})]}),C&&c.jsxs("div",{ref:ae,className:"ctx-menu",style:{position:"fixed",left:C.x,top:C.y,zIndex:500},children:[C.type==="workspace"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{h(C.path),z(null)},children:[c.jsx(xl,{size:12})," New Session"]}),c.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{f(C.path),z(null)},children:[c.jsx(kl,{size:12})," Hide Workspace"]})]}),C.type==="session"&&c.jsx(c.Fragment,{children:C.sessionLifecycle!=="finished"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{Te(C.sessionId,C.sessionTitle??""),z(null)},children:[c.jsx($m,{size:12})," Rename"]}),c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{v(C.sessionId),z(null)},children:[c.jsx(jf,{size:12})," Mark as Finished"]}),c.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{d(C.sessionId),z(null)},children:[c.jsx(kl,{size:12})," Delete Session"]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{k(C.sessionId),z(null)},children:[c.jsx(nu,{size:12})," Reopen"]}),c.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{d(C.sessionId),z(null)},children:[c.jsx(kl,{size:12})," Delete Session"]})]})})]})]})}function Km(){const s=K(h=>h.openTabs),i=K(h=>h.activeSessionId),l=K(h=>h.sessions),a=K(h=>h.selectSession),d=K(h=>h.closeTab),f=K(h=>h.setShowNewSessionDialog);return c.jsxs("div",{className:"ide-tabs",children:[s.map(h=>{const m=l.find(k=>k.id===h);if(!m)return null;const x=Ya(m),v=i===h;return c.jsxs("div",{className:`ide-tab ${v?"active":""}`,onClick:()=>a(h),children:[c.jsx(Ef,{iconClass:x.iconClass,iconText:x.iconText,size:14}),m.title||h.slice(0,8),x.dot&&c.jsx(Ja,{status:x.dot}),c.jsx("span",{className:"ide-tab-close",onClick:k=>{k.stopPropagation(),d(h)},children:c.jsx(fr,{size:12})})]},h)}),c.jsx("div",{className:"ide-tab-add",title:"New Session",onClick:()=>f(!0),children:c.jsx(xl,{size:14})})]})}function su(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Wr=su();function Pf(s){Wr=s}var wl={exec:()=>null};function Ue(s,i=""){let l=typeof s=="string"?s:s.source;const a={replace:(d,f)=>{let h=typeof f=="string"?f:f.source;return h=h.replace(Lt.caret,"$1"),l=l.replace(d,h),a},getRegex:()=>new RegExp(l,i)};return a}var Lt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},Ym=/^(?:[ \t]*(?:\n|$))+/,Xm=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Zm=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Tl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Jm=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,lu=/(?:[*+-]|\d{1,9}[.)])/,Mf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zf=Ue(Mf).replace(/bull/g,lu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),eg=Ue(Mf).replace(/bull/g,lu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),iu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,tg=/^[^\n]+/,ou=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ng=Ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ou).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rg=Ue(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,lu).getRegex(),Wi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",au=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sg=Ue("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",au).replace("tag",Wi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bf=Ue(iu).replace("hr",Tl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wi).getRegex(),lg=Ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bf).getRegex(),uu={blockquote:lg,code:Xm,def:ng,fences:Zm,heading:Jm,hr:Tl,html:sg,lheading:zf,list:rg,newline:Ym,paragraph:bf,table:wl,text:tg},Vd=Ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Tl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wi).getRegex(),ig={...uu,lheading:eg,table:Vd,paragraph:Ue(iu).replace("hr",Tl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wi).getRegex()},og={...uu,html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",au).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:wl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ue(iu).replace("hr",Tl).replace("heading",` *#{1,6} *[^
|
|
292
|
-
]`).replace("lheading",zf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ag=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ug=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Of=/^( {2,}|\\)\n(?!\s*$)/,cg=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vi=/[\p{P}\p{S}]/u,cu=/[\s\p{P}\p{S}]/u,$f=/[^\s\p{P}\p{S}]/u,dg=Ue(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,cu).getRegex(),Ff=/(?!~)[\p{P}\p{S}]/u,fg=/(?!~)[\s\p{P}\p{S}]/u,pg=/(?:[^\s\p{P}\p{S}]|~)/u,hg=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Uf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,mg=Ue(Uf,"u").replace(/punct/g,Vi).getRegex(),gg=Ue(Uf,"u").replace(/punct/g,Ff).getRegex(),Bf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vg=Ue(Bf,"gu").replace(/notPunctSpace/g,$f).replace(/punctSpace/g,cu).replace(/punct/g,Vi).getRegex(),yg=Ue(Bf,"gu").replace(/notPunctSpace/g,pg).replace(/punctSpace/g,fg).replace(/punct/g,Ff).getRegex(),xg=Ue("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$f).replace(/punctSpace/g,cu).replace(/punct/g,Vi).getRegex(),kg=Ue(/\\(punct)/,"gu").replace(/punct/g,Vi).getRegex(),wg=Ue(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Sg=Ue(au).replace("(?:-->|$)","-->").getRegex(),Tg=Ue("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Sg).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$i=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_g=Ue(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$i).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Hf=Ue(/^!?\[(label)\]\[(ref)\]/).replace("label",$i).replace("ref",ou).getRegex(),Wf=Ue(/^!?\[(ref)\](?:\[\])?/).replace("ref",ou).getRegex(),Ng=Ue("reflink|nolink(?!\\()","g").replace("reflink",Hf).replace("nolink",Wf).getRegex(),du={_backpedal:wl,anyPunctuation:kg,autolink:wg,blockSkip:hg,br:Of,code:ug,del:wl,emStrongLDelim:mg,emStrongRDelimAst:vg,emStrongRDelimUnd:xg,escape:ag,link:_g,nolink:Wf,punctuation:dg,reflink:Hf,reflinkSearch:Ng,tag:Tg,text:cg,url:wl},Eg={...du,link:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",$i).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$i).getRegex()},Fa={...du,emStrongRDelimAst:yg,emStrongLDelim:gg,url:Ue(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Cg={...Fa,br:Ue(Of).replace("{2,}","*").getRegex(),text:Ue(Fa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pi={normal:uu,gfm:ig,pedantic:og},cl={normal:du,gfm:Fa,breaks:Cg,pedantic:Eg},jg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gd=s=>jg[s];function Sn(s,i){if(i){if(Lt.escapeTest.test(s))return s.replace(Lt.escapeReplace,Gd)}else if(Lt.escapeTestNoEncode.test(s))return s.replace(Lt.escapeReplaceNoEncode,Gd);return s}function Qd(s){try{s=encodeURI(s).replace(Lt.percentDecode,"%")}catch{return null}return s}function qd(s,i){var f;const l=s.replace(Lt.findPipe,(h,m,x)=>{let v=!1,k=m;for(;--k>=0&&x[k]==="\\";)v=!v;return v?"|":" |"}),a=l.split(Lt.splitPipe);let d=0;if(a[0].trim()||a.shift(),a.length>0&&!((f=a.at(-1))!=null&&f.trim())&&a.pop(),i)if(a.length>i)a.splice(i);else for(;a.length<i;)a.push("");for(;d<a.length;d++)a[d]=a[d].trim().replace(Lt.slashPipe,"|");return a}function dl(s,i,l){const a=s.length;if(a===0)return"";let d=0;for(;d<a&&s.charAt(a-d-1)===i;)d++;return s.slice(0,a-d)}function Rg(s,i){if(s.indexOf(i[1])===-1)return-1;let l=0;for(let a=0;a<s.length;a++)if(s[a]==="\\")a++;else if(s[a]===i[0])l++;else if(s[a]===i[1]&&(l--,l<0))return a;return l>0?-2:-1}function Kd(s,i,l,a,d){const f=i.href,h=i.title||null,m=s[1].replace(d.other.outputLinkReplace,"$1");a.state.inLink=!0;const x={type:s[0].charAt(0)==="!"?"image":"link",raw:l,href:f,title:h,text:m,tokens:a.inlineTokens(m)};return a.state.inLink=!1,x}function Lg(s,i,l){const a=s.match(l.other.indentCodeCompensation);if(a===null)return i;const d=a[1];return i.split(`
|
|
293
|
-
`).map(f=>{const h=f.match(l.other.beginningSpace);if(h===null)return f;const[m]=h;return m.length>=d.length?f.slice(d.length):f}).join(`
|
|
294
|
-
`)}var Fi=class{constructor(s){Ge(this,"options");Ge(this,"rules");Ge(this,"lexer");this.options=s||Wr}space(s){const i=this.rules.block.newline.exec(s);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(s){const i=this.rules.block.code.exec(s);if(i){const l=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?l:dl(l,`
|
|
295
|
-
`)}}}fences(s){const i=this.rules.block.fences.exec(s);if(i){const l=i[0],a=Lg(l,i[3]||"",this.rules);return{type:"code",raw:l,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:a}}}heading(s){const i=this.rules.block.heading.exec(s);if(i){let l=i[2].trim();if(this.rules.other.endingHash.test(l)){const a=dl(l,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(l=a.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:l,tokens:this.lexer.inline(l)}}}hr(s){const i=this.rules.block.hr.exec(s);if(i)return{type:"hr",raw:dl(i[0],`
|
|
296
|
-
`)}}blockquote(s){const i=this.rules.block.blockquote.exec(s);if(i){let l=dl(i[0],`
|
|
297
|
-
`).split(`
|
|
298
|
-
`),a="",d="";const f=[];for(;l.length>0;){let h=!1;const m=[];let x;for(x=0;x<l.length;x++)if(this.rules.other.blockquoteStart.test(l[x]))m.push(l[x]),h=!0;else if(!h)m.push(l[x]);else break;l=l.slice(x);const v=m.join(`
|
|
299
|
-
`),k=v.replace(this.rules.other.blockquoteSetextReplace,`
|
|
300
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
301
|
-
${v}`:v,d=d?`${d}
|
|
302
|
-
${k}`:k;const S=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(k,f,!0),this.lexer.state.top=S,l.length===0)break;const w=f.at(-1);if((w==null?void 0:w.type)==="code")break;if((w==null?void 0:w.type)==="blockquote"){const D=w,I=D.raw+`
|
|
303
|
-
`+l.join(`
|
|
304
|
-
`),C=this.blockquote(I);f[f.length-1]=C,a=a.substring(0,a.length-D.raw.length)+C.raw,d=d.substring(0,d.length-D.text.length)+C.text;break}else if((w==null?void 0:w.type)==="list"){const D=w,I=D.raw+`
|
|
305
|
-
`+l.join(`
|
|
306
|
-
`),C=this.list(I);f[f.length-1]=C,a=a.substring(0,a.length-w.raw.length)+C.raw,d=d.substring(0,d.length-D.raw.length)+C.raw,l=I.substring(f.at(-1).raw.length).split(`
|
|
307
|
-
`);continue}}return{type:"blockquote",raw:a,tokens:f,text:d}}}list(s){let i=this.rules.block.list.exec(s);if(i){let l=i[1].trim();const a=l.length>1,d={type:"list",raw:"",ordered:a,start:a?+l.slice(0,-1):"",loose:!1,items:[]};l=a?`\\d{1,9}\\${l.slice(-1)}`:`\\${l}`,this.options.pedantic&&(l=a?l:"[*+-]");const f=this.rules.other.listItemRegex(l);let h=!1;for(;s;){let x=!1,v="",k="";if(!(i=f.exec(s))||this.rules.block.hr.test(s))break;v=i[0],s=s.substring(v.length);let S=i[2].split(`
|
|
308
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,q=>" ".repeat(3*q.length)),w=s.split(`
|
|
309
|
-
`,1)[0],D=!S.trim(),I=0;if(this.options.pedantic?(I=2,k=S.trimStart()):D?I=i[1].length+1:(I=i[2].search(this.rules.other.nonSpaceChar),I=I>4?1:I,k=S.slice(I),I+=i[1].length),D&&this.rules.other.blankLine.test(w)&&(v+=w+`
|
|
310
|
-
`,s=s.substring(w.length+1),x=!0),!x){const q=this.rules.other.nextBulletRegex(I),G=this.rules.other.hrRegex(I),Y=this.rules.other.fencesBeginRegex(I),U=this.rules.other.headingBeginRegex(I),ae=this.rules.other.htmlBeginRegex(I);for(;s;){const fe=s.split(`
|
|
311
|
-
`,1)[0];let ce;if(w=fe,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),ce=w):ce=w.replace(this.rules.other.tabCharGlobal," "),Y.test(w)||U.test(w)||ae.test(w)||q.test(w)||G.test(w))break;if(ce.search(this.rules.other.nonSpaceChar)>=I||!w.trim())k+=`
|
|
312
|
-
`+ce.slice(I);else{if(D||S.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Y.test(S)||U.test(S)||G.test(S))break;k+=`
|
|
313
|
-
`+w}!D&&!w.trim()&&(D=!0),v+=fe+`
|
|
314
|
-
`,s=s.substring(fe.length+1),S=ce.slice(I)}}d.loose||(h?d.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let C=null,z;this.options.gfm&&(C=this.rules.other.listIsTask.exec(k),C&&(z=C[0]!=="[ ] ",k=k.replace(this.rules.other.listReplaceTask,""))),d.items.push({type:"list_item",raw:v,task:!!C,checked:z,loose:!1,text:k,tokens:[]}),d.raw+=v}const m=d.items.at(-1);if(m)m.raw=m.raw.trimEnd(),m.text=m.text.trimEnd();else return;d.raw=d.raw.trimEnd();for(let x=0;x<d.items.length;x++)if(this.lexer.state.top=!1,d.items[x].tokens=this.lexer.blockTokens(d.items[x].text,[]),!d.loose){const v=d.items[x].tokens.filter(S=>S.type==="space"),k=v.length>0&&v.some(S=>this.rules.other.anyLine.test(S.raw));d.loose=k}if(d.loose)for(let x=0;x<d.items.length;x++)d.items[x].loose=!0;return d}}html(s){const i=this.rules.block.html.exec(s);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(s){const i=this.rules.block.def.exec(s);if(i){const l=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",d=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:l,raw:i[0],href:a,title:d}}}table(s){var h;const i=this.rules.block.table.exec(s);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const l=qd(i[1]),a=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),d=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
315
|
-
`):[],f={type:"table",raw:i[0],header:[],align:[],rows:[]};if(l.length===a.length){for(const m of a)this.rules.other.tableAlignRight.test(m)?f.align.push("right"):this.rules.other.tableAlignCenter.test(m)?f.align.push("center"):this.rules.other.tableAlignLeft.test(m)?f.align.push("left"):f.align.push(null);for(let m=0;m<l.length;m++)f.header.push({text:l[m],tokens:this.lexer.inline(l[m]),header:!0,align:f.align[m]});for(const m of d)f.rows.push(qd(m,f.header.length).map((x,v)=>({text:x,tokens:this.lexer.inline(x),header:!1,align:f.align[v]})));return f}}lheading(s){const i=this.rules.block.lheading.exec(s);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(s){const i=this.rules.block.paragraph.exec(s);if(i){const l=i[1].charAt(i[1].length-1)===`
|
|
316
|
-
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:l,tokens:this.lexer.inline(l)}}}text(s){const i=this.rules.block.text.exec(s);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(s){const i=this.rules.inline.escape.exec(s);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(s){const i=this.rules.inline.tag.exec(s);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(s){const i=this.rules.inline.link.exec(s);if(i){const l=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(l)){if(!this.rules.other.endAngleBracket.test(l))return;const f=dl(l.slice(0,-1),"\\");if((l.length-f.length)%2===0)return}else{const f=Rg(i[2],"()");if(f===-2)return;if(f>-1){const m=(i[0].indexOf("!")===0?5:4)+i[1].length+f;i[2]=i[2].substring(0,f),i[0]=i[0].substring(0,m).trim(),i[3]=""}}let a=i[2],d="";if(this.options.pedantic){const f=this.rules.other.pedanticHrefTitle.exec(a);f&&(a=f[1],d=f[3])}else d=i[3]?i[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(l)?a=a.slice(1):a=a.slice(1,-1)),Kd(i,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:d&&d.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(s,i){let l;if((l=this.rules.inline.reflink.exec(s))||(l=this.rules.inline.nolink.exec(s))){const a=(l[2]||l[1]).replace(this.rules.other.multipleSpaceGlobal," "),d=i[a.toLowerCase()];if(!d){const f=l[0].charAt(0);return{type:"text",raw:f,text:f}}return Kd(l,d,l[0],this.lexer,this.rules)}}emStrong(s,i,l=""){let a=this.rules.inline.emStrongLDelim.exec(s);if(!a||a[3]&&l.match(this.rules.other.unicodeAlphaNumeric))return;if(!(a[1]||a[2]||"")||!l||this.rules.inline.punctuation.exec(l)){const f=[...a[0]].length-1;let h,m,x=f,v=0;const k=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(k.lastIndex=0,i=i.slice(-1*s.length+f);(a=k.exec(i))!=null;){if(h=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!h)continue;if(m=[...h].length,a[3]||a[4]){x+=m;continue}else if((a[5]||a[6])&&f%3&&!((f+m)%3)){v+=m;continue}if(x-=m,x>0)continue;m=Math.min(m,m+x+v);const S=[...a[0]][0].length,w=s.slice(0,f+a.index+S+m);if(Math.min(f,m)%2){const I=w.slice(1,-1);return{type:"em",raw:w,text:I,tokens:this.lexer.inlineTokens(I)}}const D=w.slice(2,-2);return{type:"strong",raw:w,text:D,tokens:this.lexer.inlineTokens(D)}}}}codespan(s){const i=this.rules.inline.code.exec(s);if(i){let l=i[2].replace(this.rules.other.newLineCharGlobal," ");const a=this.rules.other.nonSpaceChar.test(l),d=this.rules.other.startingSpaceChar.test(l)&&this.rules.other.endingSpaceChar.test(l);return a&&d&&(l=l.substring(1,l.length-1)),{type:"codespan",raw:i[0],text:l}}}br(s){const i=this.rules.inline.br.exec(s);if(i)return{type:"br",raw:i[0]}}del(s){const i=this.rules.inline.del.exec(s);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(s){const i=this.rules.inline.autolink.exec(s);if(i){let l,a;return i[2]==="@"?(l=i[1],a="mailto:"+l):(l=i[1],a=l),{type:"link",raw:i[0],text:l,href:a,tokens:[{type:"text",raw:l,text:l}]}}}url(s){var l;let i;if(i=this.rules.inline.url.exec(s)){let a,d;if(i[2]==="@")a=i[0],d="mailto:"+a;else{let f;do f=i[0],i[0]=((l=this.rules.inline._backpedal.exec(i[0]))==null?void 0:l[0])??"";while(f!==i[0]);a=i[0],i[1]==="www."?d="http://"+i[0]:d=i[0]}return{type:"link",raw:i[0],text:a,href:d,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(s){const i=this.rules.inline.text.exec(s);if(i){const l=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:l}}}},$n=class Ua{constructor(i){Ge(this,"tokens");Ge(this,"options");Ge(this,"state");Ge(this,"tokenizer");Ge(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||Wr,this.options.tokenizer=this.options.tokenizer||new Fi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const l={other:Lt,block:Pi.normal,inline:cl.normal};this.options.pedantic?(l.block=Pi.pedantic,l.inline=cl.pedantic):this.options.gfm&&(l.block=Pi.gfm,this.options.breaks?l.inline=cl.breaks:l.inline=cl.gfm),this.tokenizer.rules=l}static get rules(){return{block:Pi,inline:cl}}static lex(i,l){return new Ua(l).lex(i)}static lexInline(i,l){return new Ua(l).inlineTokens(i)}lex(i){i=i.replace(Lt.carriageReturn,`
|
|
317
|
-
`),this.blockTokens(i,this.tokens);for(let l=0;l<this.inlineQueue.length;l++){const a=this.inlineQueue[l];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,l=[],a=!1){var d,f,h;for(this.options.pedantic&&(i=i.replace(Lt.tabCharGlobal," ").replace(Lt.spaceLine,""));i;){let m;if((f=(d=this.options.extensions)==null?void 0:d.block)!=null&&f.some(v=>(m=v.call({lexer:this},i,l))?(i=i.substring(m.raw.length),l.push(m),!0):!1))continue;if(m=this.tokenizer.space(i)){i=i.substring(m.raw.length);const v=l.at(-1);m.raw.length===1&&v!==void 0?v.raw+=`
|
|
318
|
-
`:l.push(m);continue}if(m=this.tokenizer.code(i)){i=i.substring(m.raw.length);const v=l.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=`
|
|
319
|
-
`+m.raw,v.text+=`
|
|
320
|
-
`+m.text,this.inlineQueue.at(-1).src=v.text):l.push(m);continue}if(m=this.tokenizer.fences(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.heading(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.hr(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.blockquote(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.list(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.html(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.def(i)){i=i.substring(m.raw.length);const v=l.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=`
|
|
321
|
-
`+m.raw,v.text+=`
|
|
322
|
-
`+m.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[m.tag]||(this.tokens.links[m.tag]={href:m.href,title:m.title});continue}if(m=this.tokenizer.table(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.lheading(i)){i=i.substring(m.raw.length),l.push(m);continue}let x=i;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0;const k=i.slice(1);let S;this.options.extensions.startBlock.forEach(w=>{S=w.call({lexer:this},k),typeof S=="number"&&S>=0&&(v=Math.min(v,S))}),v<1/0&&v>=0&&(x=i.substring(0,v+1))}if(this.state.top&&(m=this.tokenizer.paragraph(x))){const v=l.at(-1);a&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=`
|
|
323
|
-
`+m.raw,v.text+=`
|
|
324
|
-
`+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):l.push(m),a=x.length!==i.length,i=i.substring(m.raw.length);continue}if(m=this.tokenizer.text(i)){i=i.substring(m.raw.length);const v=l.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=`
|
|
325
|
-
`+m.raw,v.text+=`
|
|
326
|
-
`+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):l.push(m);continue}if(i){const v="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return this.state.top=!0,l}inline(i,l=[]){return this.inlineQueue.push({src:i,tokens:l}),l}inlineTokens(i,l=[]){var m,x,v;let a=i,d=null;if(this.tokens.links){const k=Object.keys(this.tokens.links);if(k.length>0)for(;(d=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)k.includes(d[0].slice(d[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(d=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,d.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(d=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let f=!1,h="";for(;i;){f||(h=""),f=!1;let k;if((x=(m=this.options.extensions)==null?void 0:m.inline)!=null&&x.some(w=>(k=w.call({lexer:this},i,l))?(i=i.substring(k.raw.length),l.push(k),!0):!1))continue;if(k=this.tokenizer.escape(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.tag(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.link(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(k.raw.length);const w=l.at(-1);k.type==="text"&&(w==null?void 0:w.type)==="text"?(w.raw+=k.raw,w.text+=k.text):l.push(k);continue}if(k=this.tokenizer.emStrong(i,a,h)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.codespan(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.br(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.del(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.autolink(i)){i=i.substring(k.raw.length),l.push(k);continue}if(!this.state.inLink&&(k=this.tokenizer.url(i))){i=i.substring(k.raw.length),l.push(k);continue}let S=i;if((v=this.options.extensions)!=null&&v.startInline){let w=1/0;const D=i.slice(1);let I;this.options.extensions.startInline.forEach(C=>{I=C.call({lexer:this},D),typeof I=="number"&&I>=0&&(w=Math.min(w,I))}),w<1/0&&w>=0&&(S=i.substring(0,w+1))}if(k=this.tokenizer.inlineText(S)){i=i.substring(k.raw.length),k.raw.slice(-1)!=="_"&&(h=k.raw.slice(-1)),f=!0;const w=l.at(-1);(w==null?void 0:w.type)==="text"?(w.raw+=k.raw,w.text+=k.text):l.push(k);continue}if(i){const w="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw new Error(w)}}return l}},Ui=class{constructor(s){Ge(this,"options");Ge(this,"parser");this.options=s||Wr}space(s){return""}code({text:s,lang:i,escaped:l}){var f;const a=(f=(i||"").match(Lt.notSpaceStart))==null?void 0:f[0],d=s.replace(Lt.endingNewline,"")+`
|
|
327
|
-
`;return a?'<pre><code class="language-'+Sn(a)+'">'+(l?d:Sn(d,!0))+`</code></pre>
|
|
328
|
-
`:"<pre><code>"+(l?d:Sn(d,!0))+`</code></pre>
|
|
329
|
-
`}blockquote({tokens:s}){return`<blockquote>
|
|
330
|
-
${this.parser.parse(s)}</blockquote>
|
|
331
|
-
`}html({text:s}){return s}heading({tokens:s,depth:i}){return`<h${i}>${this.parser.parseInline(s)}</h${i}>
|
|
332
|
-
`}hr(s){return`<hr>
|
|
333
|
-
`}list(s){const i=s.ordered,l=s.start;let a="";for(let h=0;h<s.items.length;h++){const m=s.items[h];a+=this.listitem(m)}const d=i?"ol":"ul",f=i&&l!==1?' start="'+l+'"':"";return"<"+d+f+`>
|
|
334
|
-
`+a+"</"+d+`>
|
|
335
|
-
`}listitem(s){var l;let i="";if(s.task){const a=this.checkbox({checked:!!s.checked});s.loose?((l=s.tokens[0])==null?void 0:l.type)==="paragraph"?(s.tokens[0].text=a+" "+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type==="text"&&(s.tokens[0].tokens[0].text=a+" "+Sn(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):i+=a+" "}return i+=this.parser.parse(s.tokens,!!s.loose),`<li>${i}</li>
|
|
336
|
-
`}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
|
|
337
|
-
`}table(s){let i="",l="";for(let d=0;d<s.header.length;d++)l+=this.tablecell(s.header[d]);i+=this.tablerow({text:l});let a="";for(let d=0;d<s.rows.length;d++){const f=s.rows[d];l="";for(let h=0;h<f.length;h++)l+=this.tablecell(f[h]);a+=this.tablerow({text:l})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
338
|
-
<thead>
|
|
339
|
-
`+i+`</thead>
|
|
340
|
-
`+a+`</table>
|
|
341
|
-
`}tablerow({text:s}){return`<tr>
|
|
342
|
-
${s}</tr>
|
|
343
|
-
`}tablecell(s){const i=this.parser.parseInline(s.tokens),l=s.header?"th":"td";return(s.align?`<${l} align="${s.align}">`:`<${l}>`)+i+`</${l}>
|
|
344
|
-
`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${Sn(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:i,tokens:l}){const a=this.parser.parseInline(l),d=Qd(s);if(d===null)return a;s=d;let f='<a href="'+s+'"';return i&&(f+=' title="'+Sn(i)+'"'),f+=">"+a+"</a>",f}image({href:s,title:i,text:l,tokens:a}){a&&(l=this.parser.parseInline(a,this.parser.textRenderer));const d=Qd(s);if(d===null)return Sn(l);s=d;let f=`<img src="${s}" alt="${l}"`;return i&&(f+=` title="${Sn(i)}"`),f+=">",f}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:Sn(s.text)}},fu=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},Fn=class Ba{constructor(i){Ge(this,"options");Ge(this,"renderer");Ge(this,"textRenderer");this.options=i||Wr,this.options.renderer=this.options.renderer||new Ui,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fu}static parse(i,l){return new Ba(l).parse(i)}static parseInline(i,l){return new Ba(l).parseInline(i)}parse(i,l=!0){var d,f;let a="";for(let h=0;h<i.length;h++){const m=i[h];if((f=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&f[m.type]){const v=m,k=this.options.extensions.renderers[v.type].call({parser:this},v);if(k!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(v.type)){a+=k||"";continue}}const x=m;switch(x.type){case"space":{a+=this.renderer.space(x);continue}case"hr":{a+=this.renderer.hr(x);continue}case"heading":{a+=this.renderer.heading(x);continue}case"code":{a+=this.renderer.code(x);continue}case"table":{a+=this.renderer.table(x);continue}case"blockquote":{a+=this.renderer.blockquote(x);continue}case"list":{a+=this.renderer.list(x);continue}case"html":{a+=this.renderer.html(x);continue}case"paragraph":{a+=this.renderer.paragraph(x);continue}case"text":{let v=x,k=this.renderer.text(v);for(;h+1<i.length&&i[h+1].type==="text";)v=i[++h],k+=`
|
|
345
|
-
`+this.renderer.text(v);l?a+=this.renderer.paragraph({type:"paragraph",raw:k,text:k,tokens:[{type:"text",raw:k,text:k,escaped:!0}]}):a+=k;continue}default:{const v='Token with "'+x.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return a}parseInline(i,l=this.renderer){var d,f;let a="";for(let h=0;h<i.length;h++){const m=i[h];if((f=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&f[m.type]){const v=this.options.extensions.renderers[m.type].call({parser:this},m);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(m.type)){a+=v||"";continue}}const x=m;switch(x.type){case"escape":{a+=l.text(x);break}case"html":{a+=l.html(x);break}case"link":{a+=l.link(x);break}case"image":{a+=l.image(x);break}case"strong":{a+=l.strong(x);break}case"em":{a+=l.em(x);break}case"codespan":{a+=l.codespan(x);break}case"br":{a+=l.br(x);break}case"del":{a+=l.del(x);break}case"text":{a+=l.text(x);break}default:{const v='Token with "'+x.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return a}},ba,Oi=(ba=class{constructor(s){Ge(this,"options");Ge(this,"block");this.options=s||Wr}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?$n.lex:$n.lexInline}provideParser(){return this.block?Fn.parse:Fn.parseInline}},Ge(ba,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),ba),Ig=class{constructor(...s){Ge(this,"defaults",su());Ge(this,"options",this.setOptions);Ge(this,"parse",this.parseMarkdown(!0));Ge(this,"parseInline",this.parseMarkdown(!1));Ge(this,"Parser",Fn);Ge(this,"Renderer",Ui);Ge(this,"TextRenderer",fu);Ge(this,"Lexer",$n);Ge(this,"Tokenizer",Fi);Ge(this,"Hooks",Oi);this.use(...s)}walkTokens(s,i){var a,d;let l=[];for(const f of s)switch(l=l.concat(i.call(this,f)),f.type){case"table":{const h=f;for(const m of h.header)l=l.concat(this.walkTokens(m.tokens,i));for(const m of h.rows)for(const x of m)l=l.concat(this.walkTokens(x.tokens,i));break}case"list":{const h=f;l=l.concat(this.walkTokens(h.items,i));break}default:{const h=f;(d=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&d[h.type]?this.defaults.extensions.childTokens[h.type].forEach(m=>{const x=h[m].flat(1/0);l=l.concat(this.walkTokens(x,i))}):h.tokens&&(l=l.concat(this.walkTokens(h.tokens,i)))}}return l}use(...s){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(l=>{const a={...l};if(a.async=this.defaults.async||a.async||!1,l.extensions&&(l.extensions.forEach(d=>{if(!d.name)throw new Error("extension name required");if("renderer"in d){const f=i.renderers[d.name];f?i.renderers[d.name]=function(...h){let m=d.renderer.apply(this,h);return m===!1&&(m=f.apply(this,h)),m}:i.renderers[d.name]=d.renderer}if("tokenizer"in d){if(!d.level||d.level!=="block"&&d.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const f=i[d.level];f?f.unshift(d.tokenizer):i[d.level]=[d.tokenizer],d.start&&(d.level==="block"?i.startBlock?i.startBlock.push(d.start):i.startBlock=[d.start]:d.level==="inline"&&(i.startInline?i.startInline.push(d.start):i.startInline=[d.start]))}"childTokens"in d&&d.childTokens&&(i.childTokens[d.name]=d.childTokens)}),a.extensions=i),l.renderer){const d=this.defaults.renderer||new Ui(this.defaults);for(const f in l.renderer){if(!(f in d))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;const h=f,m=l.renderer[h],x=d[h];d[h]=(...v)=>{let k=m.apply(d,v);return k===!1&&(k=x.apply(d,v)),k||""}}a.renderer=d}if(l.tokenizer){const d=this.defaults.tokenizer||new Fi(this.defaults);for(const f in l.tokenizer){if(!(f in d))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;const h=f,m=l.tokenizer[h],x=d[h];d[h]=(...v)=>{let k=m.apply(d,v);return k===!1&&(k=x.apply(d,v)),k}}a.tokenizer=d}if(l.hooks){const d=this.defaults.hooks||new Oi;for(const f in l.hooks){if(!(f in d))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;const h=f,m=l.hooks[h],x=d[h];Oi.passThroughHooks.has(f)?d[h]=v=>{if(this.defaults.async)return Promise.resolve(m.call(d,v)).then(S=>x.call(d,S));const k=m.call(d,v);return x.call(d,k)}:d[h]=(...v)=>{let k=m.apply(d,v);return k===!1&&(k=x.apply(d,v)),k}}a.hooks=d}if(l.walkTokens){const d=this.defaults.walkTokens,f=l.walkTokens;a.walkTokens=function(h){let m=[];return m.push(f.call(this,h)),d&&(m=m.concat(d.call(this,h))),m}}this.defaults={...this.defaults,...a}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,i){return $n.lex(s,i??this.defaults)}parser(s,i){return Fn.parse(s,i??this.defaults)}parseMarkdown(s){return(l,a)=>{const d={...a},f={...this.defaults,...d},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&d.async===!1)return h(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof l>"u"||l===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof l!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected"));f.hooks&&(f.hooks.options=f,f.hooks.block=s);const m=f.hooks?f.hooks.provideLexer():s?$n.lex:$n.lexInline,x=f.hooks?f.hooks.provideParser():s?Fn.parse:Fn.parseInline;if(f.async)return Promise.resolve(f.hooks?f.hooks.preprocess(l):l).then(v=>m(v,f)).then(v=>f.hooks?f.hooks.processAllTokens(v):v).then(v=>f.walkTokens?Promise.all(this.walkTokens(v,f.walkTokens)).then(()=>v):v).then(v=>x(v,f)).then(v=>f.hooks?f.hooks.postprocess(v):v).catch(h);try{f.hooks&&(l=f.hooks.preprocess(l));let v=m(l,f);f.hooks&&(v=f.hooks.processAllTokens(v)),f.walkTokens&&this.walkTokens(v,f.walkTokens);let k=x(v,f);return f.hooks&&(k=f.hooks.postprocess(k)),k}catch(v){return h(v)}}}onError(s,i){return l=>{if(l.message+=`
|
|
346
|
-
Please report this to https://github.com/markedjs/marked.`,s){const a="<p>An error occurred:</p><pre>"+Sn(l.message+"",!0)+"</pre>";return i?Promise.resolve(a):a}if(i)return Promise.reject(l);throw l}}},Br=new Ig;function Le(s,i){return Br.parse(s,i)}Le.options=Le.setOptions=function(s){return Br.setOptions(s),Le.defaults=Br.defaults,Pf(Le.defaults),Le};Le.getDefaults=su;Le.defaults=Wr;Le.use=function(...s){return Br.use(...s),Le.defaults=Br.defaults,Pf(Le.defaults),Le};Le.walkTokens=function(s,i){return Br.walkTokens(s,i)};Le.parseInline=Br.parseInline;Le.Parser=Fn;Le.parser=Fn.parse;Le.Renderer=Ui;Le.TextRenderer=fu;Le.Lexer=$n;Le.lexer=$n.lex;Le.Tokenizer=Fi;Le.Hooks=Oi;Le.parse=Le;Le.options;Le.setOptions;Le.use;Le.walkTokens;Le.parseInline;Fn.parse;$n.lex;/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function Yd(s,i){(i==null||i>s.length)&&(i=s.length);for(var l=0,a=Array(i);l<i;l++)a[l]=s[l];return a}function Ag(s){if(Array.isArray(s))return s}function Dg(s,i){var l=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(l!=null){var a,d,f,h,m=[],x=!0,v=!1;try{if(f=(l=l.call(s)).next,i!==0)for(;!(x=(a=f.call(l)).done)&&(m.push(a.value),m.length!==i);x=!0);}catch(k){v=!0,d=k}finally{try{if(!x&&l.return!=null&&(h=l.return(),Object(h)!==h))return}finally{if(v)throw d}}return m}}function Pg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
347
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mg(s,i){return Ag(s)||Dg(s,i)||zg(s,i)||Pg()}function zg(s,i){if(s){if(typeof s=="string")return Yd(s,i);var l={}.toString.call(s).slice(8,-1);return l==="Object"&&s.constructor&&(l=s.constructor.name),l==="Map"||l==="Set"?Array.from(s):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?Yd(s,i):void 0}}const Vf=Object.entries,Xd=Object.setPrototypeOf,bg=Object.isFrozen,Og=Object.getPrototypeOf,$g=Object.getOwnPropertyDescriptor;let yt=Object.freeze,xt=Object.seal,Ts=Object.create,Gf=typeof Reflect<"u"&&Reflect,Ha=Gf.apply,Wa=Gf.construct;yt||(yt=function(i){return i});xt||(xt=function(i){return i});Ha||(Ha=function(i,l){for(var a=arguments.length,d=new Array(a>2?a-2:0),f=2;f<a;f++)d[f-2]=arguments[f];return i.apply(l,d)});Wa||(Wa=function(i){for(var l=arguments.length,a=new Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];return new i(...a)});const ws=it(Array.prototype.forEach),Fg=it(Array.prototype.lastIndexOf),Zd=it(Array.prototype.pop),Ss=it(Array.prototype.push),Ug=it(Array.prototype.splice),cr=Array.isArray,gl=it(String.prototype.toLowerCase),Ia=it(String.prototype.toString),Jd=it(String.prototype.match),fl=it(String.prototype.replace),ef=it(String.prototype.indexOf),Bg=it(String.prototype.trim),Hg=it(Number.prototype.toString),Wg=it(Boolean.prototype.toString),tf=typeof BigInt>"u"?null:it(BigInt.prototype.toString),nf=typeof Symbol>"u"?null:it(Symbol.prototype.toString),ht=it(Object.prototype.hasOwnProperty),pl=it(Object.prototype.toString),pt=it(RegExp.prototype.test),Ur=Vg(TypeError);function it(s){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var l=arguments.length,a=new Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];return Ha(s,i,a)}}function Vg(s){return function(){for(var i=arguments.length,l=new Array(i),a=0;a<i;a++)l[a]=arguments[a];return Wa(s,l)}}function Re(s,i){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gl;if(Xd&&Xd(s,null),!cr(i))return s;let a=i.length;for(;a--;){let d=i[a];if(typeof d=="string"){const f=l(d);f!==d&&(bg(i)||(i[a]=f),d=f)}s[d]=!0}return s}function Gg(s){for(let i=0;i<s.length;i++)ht(s,i)||(s[i]=null);return s}function Nt(s){const i=Ts(null);for(const a of Vf(s)){var l=Mg(a,2);const d=l[0],f=l[1];ht(s,d)&&(cr(f)?i[d]=Gg(f):f&&typeof f=="object"&&f.constructor===Object?i[d]=Nt(f):i[d]=f)}return i}function Qg(s){switch(typeof s){case"string":return s;case"number":return Hg(s);case"boolean":return Wg(s);case"bigint":return tf?tf(s):"0";case"symbol":return nf?nf(s):"Symbol()";case"undefined":return pl(s);case"function":case"object":{if(s===null)return pl(s);const i=s,l=cn(i,"toString");if(typeof l=="function"){const a=l(i);return typeof a=="string"?a:pl(a)}return pl(s)}default:return pl(s)}}function cn(s,i){for(;s!==null;){const a=$g(s,i);if(a){if(a.get)return it(a.get);if(typeof a.value=="function")return it(a.value)}s=Og(s)}function l(){return null}return l}function qg(s){try{return pt(s,""),!0}catch{return!1}}const rf=yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Aa=yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Da=yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Kg=yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Pa=yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Yg=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),sf=yt(["#text"]),lf=yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ma=yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),of=yt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mi=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xg=xt(/{{[\w\W]*|^[\w\W]*}}/g),Zg=xt(/<%[\w\W]*|^[\w\W]*%>/g),Jg=xt(/\${[\w\W]*/g),ev=xt(/^data-[\-\w.\u00B7-\uFFFF]+$/),tv=xt(/^aria-[\-\w]+$/),af=xt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nv=xt(/^(?:\w+script|data):/i),rv=xt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sv=xt(/^html$/i),lv=xt(/^[a-z][.\w]*(-[.\w]+)+$/i),uf=xt(/<[/\w!]/g),cf=xt(/<[/\w]/g),iv=xt(/<\/no(script|embed|frames)/i),ov=xt(/\/>/i),Qt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},av=function(){return typeof window>"u"?null:window},uv=function(i,l){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let a=null;const d="data-tt-policy-suffix";l&&l.hasAttribute(d)&&(a=l.getAttribute(d));const f="dompurify"+(a?"#"+a:"");try{return i.createPolicy(f,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}},df=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ur=function(i,l,a,d){return ht(i,l)&&cr(i[l])?Re(d.base?Nt(d.base):{},i[l],d.transform):a};function Qf(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:av();const i=W=>Qf(W);if(i.version="3.4.13",i.removed=[],!s||!s.document||s.document.nodeType!==Qt.document||!s.Element)return i.isSupported=!1,i;let l=s.document;const a=l,d=a.currentScript;s.DocumentFragment;const f=s.HTMLTemplateElement,h=s.Node,m=s.Element,x=s.NodeFilter,v=s.NamedNodeMap;v===void 0&&(s.NamedNodeMap||s.MozNamedAttrMap),s.HTMLFormElement;const k=s.DOMParser,S=s.trustedTypes,w=m.prototype,D=cn(w,"cloneNode"),I=cn(w,"remove"),C=cn(w,"nextSibling"),z=cn(w,"childNodes"),q=cn(w,"parentNode"),G=cn(w,"shadowRoot"),Y=cn(w,"attributes"),U=h&&h.prototype?cn(h.prototype,"nodeType"):null,ae=h&&h.prototype?cn(h.prototype,"nodeName"):null,fe=h&&h.prototype?cn(h.prototype,"ownerDocument"):null;if(typeof f=="function"){const W=l.createElement("template");W.content&&W.content.ownerDocument&&(l=W.content.ownerDocument)}let ce,le="",Te,Z=!1,_e=0;const ie=function(){if(_e>0)throw Ur('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ye=function(g){ie(),_e++;try{return ce.createHTML(g)}finally{_e--}},re=function(g){ie(),_e++;try{return ce.createScriptURL(g)}finally{_e--}},b=function(){return Z||(Te=uv(S,d),Z=!0),Te},ee=l,ge=ee.implementation,B=ee.createNodeIterator,ue=ee.createDocumentFragment,Q=ee.getElementsByTagName,N=a.importNode;let A=df();i.isSupported=typeof Vf=="function"&&typeof q=="function"&&ge&&ge.createHTMLDocument!==void 0;const xe=Xg,Se=Zg,Ee=Jg,Ce=ev,$e=tv,Ie=nv,Be=rv,mt=lv;let dn=af,Fe=null;const fn=Re({},[...rf,...Aa,...Da,...Pa,...sf]);let Me=null;const Un=Re({},[...lf,...Ma,...of,...Mi]);let We=Object.seal(Ts(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ut=null,pr=null;const It=Object.seal(Ts(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let pn=!0,P=!0,pe=!1,He=!0,Ve=!1,ot=!0,kt=!1,At=!1,nn=null,hr=null,_n=!1,qt=!1,Vr=!1,mr=!1,Ns=!0,_l=!1;const Gr="user-content-";let gr=!0,Bn=!1,hn={},Dt=null;const mn=Re({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Nn=null;const Es=Re({},["audio","video","img","source","image","track"]);let Qr=null;const Cs=Re({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vr="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",Pt="http://www.w3.org/1999/xhtml";let En=Pt,Cn=!1,xr=null;const kr=Re({},[vr,yr,Pt],Ia),Nl=yt(["mi","mo","mn","ms","mtext"]);let jn=Re({},Nl);const wr=yt(["annotation-xml"]);let Hn=Re({},wr);const js=Re({},["title","style","font","a","script"]);let Sr=null;const Gi=["application/xhtml+xml","text/html"],Qi="text/html";let Oe=null,Rn=null;const El=l.createElement("form"),Cl=function(g){return g instanceof RegExp||g instanceof Function},qr=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rn&&Rn===g)return;(!g||typeof g!="object")&&(g={}),g=Nt(g),Sr=Gi.indexOf(g.PARSER_MEDIA_TYPE)===-1?Qi:g.PARSER_MEDIA_TYPE,Oe=Sr==="application/xhtml+xml"?Ia:gl,Fe=ur(g,"ALLOWED_TAGS",fn,{transform:Oe}),Me=ur(g,"ALLOWED_ATTR",Un,{transform:Oe}),xr=ur(g,"ALLOWED_NAMESPACES",kr,{transform:Ia}),Qr=ur(g,"ADD_URI_SAFE_ATTR",Cs,{transform:Oe,base:Cs}),Nn=ur(g,"ADD_DATA_URI_TAGS",Es,{transform:Oe,base:Es}),Dt=ur(g,"FORBID_CONTENTS",mn,{transform:Oe}),Ut=ur(g,"FORBID_TAGS",Nt({}),{transform:Oe}),pr=ur(g,"FORBID_ATTR",Nt({}),{transform:Oe}),hn=ht(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?Nt(g.USE_PROFILES):g.USE_PROFILES:!1,pn=g.ALLOW_ARIA_ATTR!==!1,P=g.ALLOW_DATA_ATTR!==!1,pe=g.ALLOW_UNKNOWN_PROTOCOLS||!1,He=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ve=g.SAFE_FOR_TEMPLATES||!1,ot=g.SAFE_FOR_XML!==!1,kt=g.WHOLE_DOCUMENT||!1,qt=g.RETURN_DOM||!1,Vr=g.RETURN_DOM_FRAGMENT||!1,mr=g.RETURN_TRUSTED_TYPE||!1,_n=g.FORCE_BODY||!1,Ns=g.SANITIZE_DOM!==!1,_l=g.SANITIZE_NAMED_PROPS||!1,gr=g.KEEP_CONTENT!==!1,Bn=g.IN_PLACE||!1,dn=qg(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:af,En=typeof g.NAMESPACE=="string"?g.NAMESPACE:Pt,jn=ht(g,"MATHML_TEXT_INTEGRATION_POINTS")&&g.MATHML_TEXT_INTEGRATION_POINTS&&typeof g.MATHML_TEXT_INTEGRATION_POINTS=="object"?Nt(g.MATHML_TEXT_INTEGRATION_POINTS):Re({},Nl),Hn=ht(g,"HTML_INTEGRATION_POINTS")&&g.HTML_INTEGRATION_POINTS&&typeof g.HTML_INTEGRATION_POINTS=="object"?Nt(g.HTML_INTEGRATION_POINTS):Re({},wr);const E=ht(g,"CUSTOM_ELEMENT_HANDLING")&&g.CUSTOM_ELEMENT_HANDLING&&typeof g.CUSTOM_ELEMENT_HANDLING=="object"?Nt(g.CUSTOM_ELEMENT_HANDLING):Ts(null);if(We=Ts(null),ht(E,"tagNameCheck")&&Cl(E.tagNameCheck)&&(We.tagNameCheck=E.tagNameCheck),ht(E,"attributeNameCheck")&&Cl(E.attributeNameCheck)&&(We.attributeNameCheck=E.attributeNameCheck),ht(E,"allowCustomizedBuiltInElements")&&typeof E.allowCustomizedBuiltInElements=="boolean"&&(We.allowCustomizedBuiltInElements=E.allowCustomizedBuiltInElements),xt(We),Ve&&(P=!1),Vr&&(qt=!0),hn&&(Fe=Re({},sf),Me=Ts(null),hn.html===!0&&(Re(Fe,rf),Re(Me,lf)),hn.svg===!0&&(Re(Fe,Aa),Re(Me,Ma),Re(Me,Mi)),hn.svgFilters===!0&&(Re(Fe,Da),Re(Me,Ma),Re(Me,Mi)),hn.mathMl===!0&&(Re(Fe,Pa),Re(Me,of),Re(Me,Mi))),It.tagCheck=null,It.attributeCheck=null,ht(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?It.tagCheck=g.ADD_TAGS:cr(g.ADD_TAGS)&&(Fe===fn&&(Fe=Nt(Fe)),Re(Fe,g.ADD_TAGS,Oe))),ht(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?It.attributeCheck=g.ADD_ATTR:cr(g.ADD_ATTR)&&(Me===Un&&(Me=Nt(Me)),Re(Me,g.ADD_ATTR,Oe))),ht(g,"ADD_URI_SAFE_ATTR")&&cr(g.ADD_URI_SAFE_ATTR)&&Re(Qr,g.ADD_URI_SAFE_ATTR,Oe),ht(g,"FORBID_CONTENTS")&&cr(g.FORBID_CONTENTS)&&(Dt===mn&&(Dt=Nt(Dt)),Re(Dt,g.FORBID_CONTENTS,Oe)),ht(g,"ADD_FORBID_CONTENTS")&&cr(g.ADD_FORBID_CONTENTS)&&(Dt===mn&&(Dt=Nt(Dt)),Re(Dt,g.ADD_FORBID_CONTENTS,Oe)),gr&&(Fe["#text"]=!0),kt&&Re(Fe,["html","head","body"]),Fe.table&&(Re(Fe,["tbody"]),delete Ut.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ur('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ur('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const O=ce;ce=g.TRUSTED_TYPES_POLICY;try{le=ye("")}catch(ne){throw ce=O,ne}}else g.TRUSTED_TYPES_POLICY===null?(ce=void 0,le=""):(ce===void 0&&(ce=b()),ce&&typeof le=="string"&&(le=ye("")));yt&&yt(g),Rn=g},Rs=Re({},[...Aa,...Da,...Kg]),Ls=Re({},[...Pa,...Yg]),jl=function(g,E,O){return E.namespaceURI===Pt?g==="svg":E.namespaceURI===vr?g==="svg"&&(O==="annotation-xml"||jn[O]):!!Rs[g]},qi=function(g,E,O){return E.namespaceURI===Pt?g==="math":E.namespaceURI===yr?g==="math"&&Hn[O]:!!Ls[g]},Ki=function(g,E,O){return E.namespaceURI===yr&&!Hn[O]||E.namespaceURI===vr&&!jn[O]?!1:!Ls[g]&&(js[g]||!Rs[g])},Xe=function(g){let E=q(g);(!E||!E.tagName)&&(E={namespaceURI:En,tagName:"template"});const O=gl(g.tagName),ne=gl(E.tagName);return xr[g.namespaceURI]?g.namespaceURI===yr?jl(O,E,ne):g.namespaceURI===vr?qi(O,E,ne):g.namespaceURI===Pt?Ki(O,E,ne):!!(Sr==="application/xhtml+xml"&&xr[g.namespaceURI]):!1},gn=function(g){Ss(i.removed,{element:g});try{q(g).removeChild(g)}catch{if(I(g),!q(g))throw Ur("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Wn=function(g){Tr(g);const E=z(g);if(E){const ne=[];ws(E,de=>{Ss(ne,de)}),ws(ne,de=>{try{I(de)}catch{}})}const O=Y(g);if(O)for(let ne=O.length-1;ne>=0;--ne){const de=O[ne],ke=de&&de.name;if(typeof ke=="string")try{g.removeAttribute(ke)}catch{}}},vn=function(g,E){try{Ss(i.removed,{attribute:E.getAttributeNode(g),from:E})}catch{Ss(i.removed,{attribute:null,from:E})}if(E.removeAttribute(g),g==="is")if(qt||Vr)try{gn(E)}catch{}else try{E.setAttribute(g,"")}catch{}},Kr=function(g){const E=Y(g);if(E)for(let O=E.length-1;O>=0;--O){const ne=E[O],de=ne&&ne.name;if(!(typeof de!="string"||Me[Oe(de)]))try{g.removeAttribute(de)}catch{}}},Tr=function(g){const E=[g];for(;E.length>0;){const O=E.pop();(U?U(O):O.nodeType)===Qt.element&&Kr(O);const de=z(O);if(de)for(let ke=de.length-1;ke>=0;--ke)E.push(de[ke])}},Rl=function(g){if(!ot)return;const E=[g];for(;E.length>0;){const O=E.pop(),ne=U?U(O):O.nodeType;if(ne===Qt.processingInstruction||ne===Qt.comment&&pt(cf,O.data)){try{I(O)}catch{}continue}if(ne===Qt.element){const ke=O,De=Oe(ae?ae(O):O.nodeName);try{ke.hasAttribute&&ke.hasAttribute("patchsrc")&&ke.removeAttribute("patchsrc"),ke.hasAttribute&&ke.hasAttribute("for")&&De!=="label"&&De!=="output"&&ke.removeAttribute("for")}catch{}}const de=z(O);if(de)for(let ke=de.length-1;ke>=0;--ke)E.push(de[ke])}},_r=function(g){let E=null,O=null;if(_n)g="<remove></remove>"+g;else{const ke=Jd(g,/^[\r\n\t ]+/);O=ke&&ke[0]}Sr==="application/xhtml+xml"&&En===Pt&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const ne=ce?ye(g):g;if(En===Pt)try{E=new k().parseFromString(ne,Sr)}catch{}if(!E||!E.documentElement){E=ge.createDocument(En,"template",null);try{E.documentElement.innerHTML=Cn?le:ne}catch{}}const de=E.body||E.documentElement;return g&&O&&de.insertBefore(l.createTextNode(O),de.childNodes[0]||null),En===Pt?Q.call(E,kt?"html":"body")[0]:kt?E.documentElement:de},Bt=function(g){const E=fe?fe(g):g.ownerDocument;return B.call(E||g,g,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null)},Yr=function(g){return g=fl(g,xe," "),g=fl(g,Se," "),g=fl(g,Ee," "),g},Et=function(g){var E;g.normalize();const O=fe?fe(g):g.ownerDocument,ne=B.call(O||g,g,x.SHOW_TEXT|x.SHOW_COMMENT|x.SHOW_CDATA_SECTION|x.SHOW_PROCESSING_INSTRUCTION,null);let de=ne.nextNode();for(;de;)de.data=Yr(de.data),de=ne.nextNode();const ke=(E=g.querySelectorAll)===null||E===void 0?void 0:E.call(g,"template");ke&&ws(ke,De=>{Vn(De.content)&&Et(De.content)})},Xr=function(g){const E=ae?ae(g):null;return typeof E!="string"||Oe(E)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==Y(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==U(g)||g.childNodes!==z(g)},Vn=function(g){if(!U||typeof g!="object"||g===null)return!1;try{return U(g)===Qt.documentFragment}catch{return!1}},Nr=function(g){if(!U||typeof g!="object"||g===null)return!1;try{return typeof U(g)=="number"}catch{return!1}};function Ct(W,g,E){W.length!==0&&ws(W,O=>{O.call(i,g,E,Rn)})}const Zr=function(g,E){return!!(ot&&g.hasChildNodes()&&!Nr(g.firstElementChild)&&pt(uf,g.textContent)&&pt(uf,g.innerHTML)||ot&&g.namespaceURI===Pt&&E==="style"&&Nr(g.firstElementChild)||g.nodeType===Qt.processingInstruction||ot&&g.nodeType===Qt.comment&&pt(cf,g.data))},Er=function(g,E,O){if(!Ut[E]&&As(E)&&(We.tagNameCheck instanceof RegExp&&pt(We.tagNameCheck,E)||We.tagNameCheck instanceof Function&&We.tagNameCheck(E)))return!1;if(gr&&!Dt[E]){const ne=q(g),de=z(g);if(de&&ne){const ke=de.length;for(let De=ke-1;De>=0;--De){const ze=g===O?D(de[De],!0):de[De];ne.insertBefore(ze,C(g))}}}return gn(g),!0},Cr=function(g,E,O,ne){return g.length===0?E:E===O||E===ne?Nt(E):E},Ll=function(g,E){if(Ct(A.beforeSanitizeElements,g,null),g!==E&&q(g)===null)return Bn&&Tr(g),!0;if(Xr(g))return gn(g),!0;const O=Oe(ae?ae(g):g.nodeName);if(Fe=Cr(A.uponSanitizeElement,Fe,fn,nn),Ct(A.uponSanitizeElement,g,{tagName:O,allowedTags:Fe}),g!==E&&q(g)===null)return Bn&&Tr(g),!0;if(Zr(g,O))return gn(g),!0;if(Ut[O]||!(It.tagCheck instanceof Function&&It.tagCheck(O))&&!Fe[O]){const de=Er(g,O,E);return de===!1&&Ct(A.afterSanitizeElements,g,null),de}if((U?U(g):g.nodeType)===Qt.element&&!Xe(g)||(O==="noscript"||O==="noembed"||O==="noframes")&&pt(iv,g.innerHTML))return gn(g),!0;if(Ve&&g.nodeType===Qt.text){const de=Yr(g.textContent);g.textContent!==de&&(Ss(i.removed,{element:g.cloneNode()}),g.textContent=de)}return Ct(A.afterSanitizeElements,g,null),!1},Il=function(g,E,O){if(pr[E]||ot&&E==="patchsrc"||ot&&E==="for"&&g!=="label"&&g!=="output"||Ns&&(E==="id"||E==="name")&&(O in l||O in El))return!1;const ne=Me[E]||It.attributeCheck instanceof Function&&It.attributeCheck(E,g);if(!(P&&pt(Ce,E))){if(!(pn&&pt($e,E))){if(ne){if(!Qr[E]){if(!pt(dn,fl(O,Be,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&g!=="script"&&ef(O,"data:")===0&&Nn[g])){if(!(pe&&!pt(Ie,fl(O,Be,"")))){if(O)return!1}}}}}else if(!(As(g)&&(We.tagNameCheck instanceof RegExp&&pt(We.tagNameCheck,g)||We.tagNameCheck instanceof Function&&We.tagNameCheck(g))&&(We.attributeNameCheck instanceof RegExp&&pt(We.attributeNameCheck,E)||We.attributeNameCheck instanceof Function&&We.attributeNameCheck(E,g))||E==="is"&&We.allowCustomizedBuiltInElements&&(We.tagNameCheck instanceof RegExp&&pt(We.tagNameCheck,O)||We.tagNameCheck instanceof Function&&We.tagNameCheck(O))))return!1}}return!0},Is=Re({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),As=function(g){return!Is[gl(g)]&&pt(mt,g)},Ds=function(g,E,O,ne){if(ce&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!O)switch(S.getAttributeType(g,E)){case"TrustedHTML":return ye(ne);case"TrustedScriptURL":return re(ne)}return ne},jr=function(g,E,O,ne){try{O?g.setAttributeNS(O,E,ne):g.setAttribute(E,ne),Xr(g)?gn(g):Zd(i.removed)}catch{vn(E,g)}},Al=function(g){Ct(A.beforeSanitizeAttributes,g,null);const E=g.attributes;if(!E||Xr(g))return;Me=Cr(A.uponSanitizeAttribute,Me,Un,hr);const O={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Me,forceKeepAttr:void 0};let ne=E.length;const de=Oe(g.nodeName);for(;ne--;){const ke=E[ne],De=ke.name,ze=ke.namespaceURI,Ze=ke.value,Je=Oe(De),Ln=Ze;let rt=De==="value"?Ln:Bg(Ln);if(O.attrName=Je,O.attrValue=rt,O.keepAttr=!0,O.forceKeepAttr=void 0,Ct(A.uponSanitizeAttribute,g,O),rt=O.attrValue,_l&&(Je==="id"||Je==="name")&&ef(rt,Gr)!==0&&(vn(De,g),rt=Gr+rt),ot&&pt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,rt)){vn(De,g);continue}if(Je==="attributename"&&Jd(rt,"href")){vn(De,g);continue}if(!O.forceKeepAttr){if(!O.keepAttr){vn(De,g);continue}if(!He&&pt(ov,rt)){vn(De,g);continue}if(Ve&&(rt=Yr(rt)),!Il(de,Je,rt)){vn(De,g);continue}rt=Ds(de,Je,ze,rt),rt!==Ln&&jr(g,De,ze,rt)}}Ct(A.afterSanitizeAttributes,g,null)},Gn=function(g){let E=null;const O=Bt(g);for(Ct(A.beforeSanitizeShadowDOM,g,null);E=O.nextNode();)if(Ct(A.uponSanitizeShadowNode,E,null),Ll(E,g),Al(E),Vn(E.content)&&Gn(E.content),(U?U(E):E.nodeType)===Qt.element){const de=G(E);Vn(de)&&(Ae(de),Gn(de))}Ct(A.afterSanitizeShadowDOM,g,null)},Ae=function(g){const E=[{node:g,shadow:null}];for(;E.length>0;){const O=E.pop();if(O.shadow){Gn(O.shadow);continue}const ne=O.node,ke=(U?U(ne):ne.nodeType)===Qt.element,De=z(ne);if(De)for(let ze=De.length-1;ze>=0;--ze)E.push({node:De[ze],shadow:null});if(ke){const ze=ae?ae(ne):null;if(typeof ze=="string"&&Oe(ze)==="template"){const Ze=ne.content;Vn(Ze)&&E.push({node:Ze,shadow:null})}}if(ke){const ze=G(ne);Vn(ze)&&E.push({node:null,shadow:ze},{node:ze,shadow:null})}}};return i.sanitize=function(W){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,O=null,ne=null,de=null;if(Cn=!W,Cn&&(W="<!-->"),typeof W!="string"&&!Nr(W)&&(W=Qg(W),typeof W!="string"))throw Ur("dirty is not a string, aborting");if(!i.isSupported)return W;At?(Fe=nn,Me=hr):qr(g),(A.uponSanitizeElement.length>0||A.uponSanitizeAttribute.length>0)&&(Fe=Nt(Fe)),A.uponSanitizeAttribute.length>0&&(Me=Nt(Me)),i.removed=[];const ke=Bn&&typeof W!="string"&&Nr(W);if(ke){Rl(W);const Ze=ae?ae(W):W.nodeName;if(typeof Ze=="string"){const Je=Oe(Ze);if(!Fe[Je]||Ut[Je])throw Wn(W),Ur("root node is forbidden and cannot be sanitized in-place")}if(Xr(W))throw Wn(W),Ur("root node is clobbered and cannot be sanitized in-place");try{Ae(W)}catch(Je){throw Wn(W),Je}}else if(Nr(W))E=_r("<!---->"),O=E.ownerDocument.importNode(W,!0),O.nodeType===Qt.element&&O.nodeName==="BODY"||O.nodeName==="HTML"?E=O:E.appendChild(O),Ae(O);else{if(!qt&&!Ve&&!kt&&W.indexOf("<")===-1)return ce&&mr?ye(W):W;if(E=_r(W),!E)return qt?null:mr?le:""}E&&_n&&gn(E.firstChild);const De=ke?W:E;try{const Ze=Bt(De);for(;ne=Ze.nextNode();)Ll(ne,De),Al(ne),Vn(ne.content)&&Gn(ne.content)}catch(Ze){throw ke&&(Wn(W),ws(i.removed,Je=>{Je.element&&Tr(Je.element)})),Ze}if(ke)return ws(i.removed,Ze=>{Ze.element&&Tr(Ze.element)}),Ve&&Et(W),W;if(qt){if(Ve&&Et(E),Vr)for(de=ue.call(E.ownerDocument);E.firstChild;)de.appendChild(E.firstChild);else de=E;return(Me.shadowroot||Me.shadowrootmode)&&(de=N.call(a,de,!0)),de}let ze=kt?E.outerHTML:E.innerHTML;return kt&&Fe["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&pt(sv,E.ownerDocument.doctype.name)&&(ze="<!DOCTYPE "+E.ownerDocument.doctype.name+`>
|
|
348
|
-
`+ze),Ve&&(ze=Yr(ze)),ce&&mr?ye(ze):ze},i.setConfig=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qr(W),At=!0,nn=Fe,hr=Me},i.clearConfig=function(){Rn=null,At=!1,nn=null,hr=null,ce=Te,le=""},i.isValidAttribute=function(W,g,E){Rn||qr({});const O=Oe(W),ne=Oe(g);return Il(O,ne,E)},i.addHook=function(W,g){typeof g=="function"&&ht(A,W)&&Ss(A[W],g)},i.removeHook=function(W,g){if(ht(A,W)){if(g!==void 0){const E=Fg(A[W],g);return E===-1?void 0:Ug(A[W],E,1)[0]}return Zd(A[W])}},i.removeHooks=function(W){ht(A,W)&&(A[W]=[])},i.removeAllHooks=function(){A=df()},i}var pu=Qf();const cv=new Set(["command_execution","file_change","mcp_tool_call","web_search"]);function ff(s){return cv.has(s.type)}function dv({items:s,runtimeType:i,turn:l,threads:a=[]}){const[d,f]=M.useState(!1);if(s.length===0)return null;const h=s.length;return c.jsxs("div",{className:"tool-calls",children:[c.jsxs("div",{className:"tool-calls-header",onClick:()=>f(m=>!m),children:[c.jsx("span",{className:"tool-calls-icon",children:c.jsx(Gm,{size:12})}),c.jsxs("span",{className:"tool-calls-summary",children:[h," tool call",h>1?"s":""]}),c.jsx(eu,{size:14,className:"tool-calls-chevron",style:{transform:d?"rotate(90deg)":"none"}})]}),d&&c.jsx("div",{className:"tool-calls-body",children:s.map(m=>c.jsx(vl,{item:m,runtimeType:i,turn:l,threads:a},m.id))})]})}Le.setOptions({breaks:!0,gfm:!0});function fv(s){const i=Le.parse(s);return pu.sanitize(i)}function pf(s,i){var d;const l=document.createTreeWalker(s,NodeFilter.SHOW_TEXT);let a=0;for(;l.nextNode();){const f=l.currentNode,h=((d=f.textContent)==null?void 0:d.length)??0;if(a+h>i)return{node:f,offset:i-a};a+=h}return null}function pv(s,i){s.querySelectorAll("mark[data-thread-id]").forEach(l=>{const a=l.parentNode;if(!a)return;const d=document.createTextNode(l.textContent||"");a.replaceChild(d,l),a.normalize()});for(const l of i){const a=pf(s,l.start_offset),d=pf(s,l.end_offset);if(!a||!d)continue;const f=document.createRange();f.setStart(a.node,a.offset),f.setEnd(d.node,d.offset);const h=document.createElement("mark");h.setAttribute("data-thread-id",l.id),l.status==="resolved"&&h.classList.add("thread-mark-resolved");try{f.surroundContents(h)}catch{const m=f.extractContents();h.appendChild(m),f.insertNode(h)}}}function hv(s){const i=window.getSelection();if(!i||i.rangeCount===0)return null;const l=i.getRangeAt(0);if(l.collapsed||!s.contains(l.commonAncestorContainer))return null;const a=document.createRange();a.setStart(s,0),a.setEnd(l.startContainer,l.startOffset);const d=a.toString().length,f=l.toString();return{start:d,end:d+f.length,text:f}}function mv({itemId:s,turnId:i,sessionId:l,content:a,threads:d}){const f=M.useRef(null),h=M.useRef(null),[m,x]=M.useState(!1),[v,k]=M.useState({x:0,y:0}),[S,w]=M.useState(!1),[D,I]=M.useState({x:0,y:0}),[C,z]=M.useState(""),[q,G]=M.useState(null),{createThread:Y,switchRightTab:U}=K(),ae=M.useCallback(()=>{var ye;if(!q)return;const ie=`
|
|
349
|
-
\`\`\`QUOTE
|
|
350
|
-
${q.text}
|
|
351
|
-
\`\`\`
|
|
352
|
-
|
|
353
|
-
`;K.setState({quotedText:ie}),x(!1),G(null),(ye=window.getSelection())==null||ye.removeAllRanges()},[q]),fe=d.filter(ie=>ie.item_id===s);M.useEffect(()=>{f.current&&pv(f.current,fe)}),M.useEffect(()=>{function ie(ye){h.current&&!h.current.contains(ye.target)&&(x(!1),w(!1))}return document.addEventListener("mousedown",ie),()=>document.removeEventListener("mousedown",ie)},[]);const ce=M.useCallback(()=>{x(!1),w(!1)},[]),le=M.useCallback(()=>{if(S)return;const ie=f.current;if(!ie)return;const ye=hv(ie);if(ye&&ye.text.trim().length>0){const re=window.getSelection();if(re&&re.rangeCount>0){const b=re.getRangeAt(0).getBoundingClientRect(),ee=28,ge=6;let B=b.top-ee-ge;B<8&&(B=b.bottom+ge),k({x:b.right,y:B}),x(!0),G(ye)}}else x(!1)},[S]),Te=M.useCallback(()=>{x(!1),w(!0),I({x:v.x,y:v.y})},[v]),Z=M.useCallback(async()=>{var ie;!q||!C.trim()||(await Y(l,{itemId:s,turnId:i,startOffset:q.start,endOffset:q.end,selectedText:q.text,message:C.trim()}),z(""),w(!1),G(null),(ie=window.getSelection())==null||ie.removeAllRanges(),U("threads"))},[q,C,Y,l,s,i,U]),_e=M.useCallback(ie=>{const ye=ie.target;if(ye.tagName==="MARK"&&ye.hasAttribute("data-thread-id")){ie.preventDefault(),U("threads");const re=ye.getAttribute("data-thread-id");setTimeout(()=>{const b=document.getElementById(`thread-${re}`);b&&(b.scrollIntoView({behavior:"smooth",block:"center"}),b.classList.add("thread-card-highlighted"),setTimeout(()=>b.classList.remove("thread-card-highlighted"),1500))},100)}},[U]);return c.jsxs("div",{style:{position:"relative"},ref:h,children:[c.jsx("div",{ref:f,dangerouslySetInnerHTML:{__html:fv(a||"…")},onMouseDown:ce,onMouseUp:le,onClick:_e}),m&&!S&&c.jsxs("div",{className:"selection-actions",style:{left:v.x,top:v.y},children:[c.jsxs("button",{className:"discuss-button",onClick:Te,title:"Start a discussion about this text",children:[c.jsx(Pm,{size:14}),c.jsx("span",{children:"Discuss"})]}),c.jsxs("button",{className:"discuss-button",onClick:ae,title:"Quote this text in your message",children:[c.jsx(If,{size:14}),c.jsx("span",{children:"Quote"})]})]}),S&&c.jsxs("div",{className:"thread-create-popover",style:{left:D.x,top:D.y},children:[c.jsxs("div",{className:"thread-create-header",children:[c.jsxs("span",{className:"thread-create-quote",children:['"',q==null?void 0:q.text.slice(0,80),q&&q.text.length>80?"…":"",'"']}),c.jsx("button",{className:"thread-create-close",onClick:()=>{w(!1),G(null)},children:c.jsx(fr,{size:14})})]}),c.jsx("textarea",{className:"thread-create-input",placeholder:"Ask about this text…",value:C,onChange:ie=>z(ie.target.value),autoFocus:!0,rows:2,onKeyDown:ie=>{ie.key==="Enter"&&(ie.metaKey||ie.ctrlKey)&&(ie.preventDefault(),Z()),ie.key==="Escape"&&(w(!1),G(null))}}),c.jsxs("div",{className:"thread-create-footer",children:[c.jsx("span",{className:"thread-create-hint",children:"⌘↵ to send · Esc to cancel"}),c.jsxs("button",{className:"thread-create-send",onClick:Z,disabled:!C.trim(),children:[c.jsx(ru,{size:13}),c.jsx("span",{children:"Send"})]})]})]})]})}Le.setOptions({breaks:!0,gfm:!0});function gv({attachments:s}){const[i,l]=M.useState(null);return M.useEffect(()=>{if(!i)return;function a(d){d.key==="Escape"&&l(null)}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[i]),!Array.isArray(s)||s.length===0?null:c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"attachment-pills",children:s.map((a,d)=>{const f=a.media_type.startsWith("image/"),h=`data:${a.media_type};base64,${a.data}`;return c.jsxs("span",{className:"attachment-pill",title:a.name,onClick:f?()=>l(h):void 0,style:f?{cursor:"pointer"}:void 0,children:[f?c.jsx("img",{src:h,alt:a.name,className:"attachment-pill-thumb"}):c.jsx(Lf,{size:12,className:"attachment-pill-icon"}),c.jsx("span",{className:"attachment-pill-name",children:a.name})]},d)})}),i&&c.jsx("div",{className:"image-preview-modal",onClick:()=>l(null),children:c.jsxs("div",{className:"image-preview-content",onClick:a=>a.stopPropagation(),children:[c.jsx("img",{src:i,alt:"preview"}),c.jsx("button",{className:"image-preview-close",onClick:()=>l(null),children:c.jsx(fr,{size:20})})]})})]})}function vv(s){const i=Le.parse(s);return pu.sanitize(i)}function hf(s){var i;return(i=s.data)!=null&&i.text?s.data.text:""}function yv(s){const i=s.match(/^\/bin\/\w+\s+-\w+\s+"(.*)"$/s);return i?i[1]:s}const mf=1e4;function xv({item:s,runtimeType:i,turn:l,threads:a}){var m,x,v,k,S,w,D,I;const d=s.status==="in_progress",[f,h]=M.useState(!1);switch(s.type){case"agent_message":{const{iconClass:C,iconText:z}=Nf(i??"codex");return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:`turn-header-icon ${C}`,children:z}),c.jsx("span",{className:"turn-header-title",children:"Agent"}),d&&c.jsx("span",{className:"turn-header-meta",children:"writing…"})]}),c.jsx(mv,{itemId:s.id,turnId:l.id,sessionId:l.session_id,content:hf(s)||"…",threads:a,runtimeType:i})]})}case"reasoning":return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(wm,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Reasoning"})]}),c.jsx("div",{dangerouslySetInnerHTML:{__html:vv(hf(s))}})]});case"command_execution":{const C=s.data||{},z=yv(C.command||""),q=C.aggregated_output||"",G=C.exit_code,Y=d?"running…":G!==null?`exit ${G}`:"",U=q.length>mf,ae=U&&!f?q.slice(0,mf)+`
|
|
354
|
-
… (truncated, click to expand)`:q;return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Df,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Command"}),Y&&c.jsx("span",{className:"turn-header-meta",children:Y})]}),c.jsx("pre",{className:"cmd-block",children:c.jsx("code",{children:z})}),q&&c.jsxs(c.Fragment,{children:[c.jsx("pre",{className:"cmd-output",children:c.jsx("code",{children:ae})}),U&&c.jsx("button",{className:"cmd-output-toggle",onClick:()=>h(fe=>!fe),children:f?"Show less":`Show full output (${(q.length/1024).toFixed(0)}KB)`})]})]})}case"file_change":{const C=(m=s.data)==null?void 0:m.changes,z=Array.isArray(C)?C:[],q=`${z.length} file${z.length!==1?"s":""}`;return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Nm,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"File Changes"}),c.jsx("span",{className:"turn-header-meta",children:q})]}),c.jsx("div",{className:"file-change-list",children:z.map((G,Y)=>{const U=G.kind==="add"?"A":G.kind==="delete"?"D":"M",ae=G.kind==="add"?"fc-add":G.kind==="delete"?"fc-del":"fc-mod";return c.jsxs("div",{className:"file-change",children:[c.jsx("span",{className:`fc-status ${ae}`,children:U}),c.jsx("span",{className:"fc-name",children:G.path})]},Y)})})]})}case"mcp_tool_call":{const C=s.data||{},z=C.tool||"mcp";if(z==="Agent"){const le=C.arguments,Te=(le==null?void 0:le.description)||(le==null?void 0:le.prompt)||"Subagent",Z=s.status==="failed",_e=d?"running…":Z?"failed":"done";return c.jsxs("div",{className:"agent-call-card",children:[c.jsx("span",{className:"agent-call-icon",children:c.jsx(Oa,{size:14})}),c.jsx("span",{className:"agent-call-desc",children:Te}),c.jsx("span",{className:`agent-call-status ${d?"running":Z?"failed":"done"}`,children:_e})]})}const q=C.server||"",G=C.arguments,Y=C.result,U=C.error,ae=s.status==="failed"||!!U,fe=d?"running…":ae?"failed":"done",ce=((x=Y==null?void 0:Y.content)==null?void 0:x.filter(le=>le.type==="text").map(le=>le.text))??[];return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Fm,{size:14})}),c.jsxs("span",{className:"turn-header-title",children:["MCP: ",z]}),q&&c.jsx("span",{className:"turn-header-meta",children:q}),c.jsx("span",{className:"turn-header-meta",style:ae?{color:"var(--red)"}:void 0,children:fe})]}),G&&Object.keys(G).length>0&&c.jsx("div",{className:"mcp-args",children:Object.entries(G).map(([le,Te])=>c.jsxs("div",{className:"mcp-arg",children:[c.jsx("span",{className:"mcp-arg-key",children:le}),le==="code"?c.jsx("pre",{className:"cmd-block",children:c.jsx("code",{children:String(Te)})}):c.jsx("span",{className:"mcp-arg-value",children:typeof Te=="string"?Te:JSON.stringify(Te,null,2)})]},le))}),ce.length>0&&ce.map((le,Te)=>c.jsx("pre",{className:"cmd-output",children:c.jsx("code",{children:le})},Te)),U&&c.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:c.jsx("code",{children:U})})]})}case"web_search":{const C=((v=s.data)==null?void 0:v.query)||"";return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Bm,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Web Search"})]}),c.jsx("p",{className:"user-message",children:C})]})}case"todo_list":{const C=((k=s.data)==null?void 0:k.items)||[];return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Im,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Todo List"})]}),c.jsx("ul",{className:"todo-list",children:C.map((z,q)=>c.jsxs("li",{className:z.completed?"todo-done":"todo-pending",children:[z.completed?c.jsx(yl,{size:14}):c.jsx(Hi,{size:14})," ",z.text]},q))})]})}case"background_task":{const C=s.data||{},z=C.task_type||"unknown",q=C.subagent_type||null,G=C.description||"",Y=C.status||"running",U=C.last_tool_name||null,ae=C.token_count||null,fe=z==="local_agent",ce=z==="local_bash",le=fe?Oa:ce?Af:Rf,Te=fe?`Subagent${q?`: ${q}`:""}`:ce?"Monitor":"Background Task",Z=Y==="running"?"running…":Y==="completed"?"done":Y==="failed"?"failed":Y==="stopped"?"stopped":Y,_e=s.status==="failed"||Y==="failed";return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(le,{size:14})}),c.jsx("span",{className:"turn-header-title",children:Te}),c.jsx("span",{className:"turn-header-meta",style:_e?{color:"var(--red)"}:void 0,children:Z})]}),G&&c.jsx("p",{className:"user-message",style:{fontSize:"13px"},children:G}),U&&d&&c.jsxs("div",{className:"cmd-output",style:{color:"var(--text-3)",fontSize:"12px"},children:["last tool: ",U,ae!=null&&` · ${ae.toLocaleString()} tokens`]}),c.jsx("div",{className:"cmd-output",style:{color:"var(--text-muted)",fontSize:"11px"},children:"Output available in Tasks panel — click the status bar indicator or the Tasks tab."})]})}case"context_compaction":{const C=((S=s.data)==null?void 0:S.trigger)??"auto",z=((w=s.data)==null?void 0:w.pre_tokens)??0,q=((D=s.data)==null?void 0:D.post_tokens)??0,G=z>0?Math.round((1-q/z)*100):0,Y=C==="manual"?"Context compacted (/compact)":"Context auto-compacted";return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(zm,{size:14})}),c.jsx("span",{className:"turn-header-title",children:Y})]}),c.jsxs("div",{className:"cmd-output",style:{color:"var(--text-3)"},children:[z.toLocaleString()," → ",q.toLocaleString()," tokens (",G,"% reduction)"]})]})}case"error":{const C=((I=s.data)==null?void 0:I.message)||"Unknown error";return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--red)",color:"#fff"},children:c.jsx(tu,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Error"})]}),c.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:c.jsx("code",{children:C})})]})}default:return null}}const vl=M.memo(xv);function kv({turn:s,runtimeType:i,threads:l=[]}){const[a,d]=M.useState(!1);M.useEffect(()=>{const I=s.items.some(C=>C.type==="background_task"&&C.status==="in_progress");s.status==="running"||s.status==="pending"?d(!0):s.status==="completed"&&!I&&d(!1)},[s.status,s.items]);let f=-1;for(let I=s.items.length-1;I>=0;I--)if(s.items[I].type==="agent_message"){f=I;break}const h=f>=0,v=(h?s.items.slice(0,f):s.items).filter(I=>{var C;return!(I.type==="reasoning"&&(!((C=I.data)!=null&&C.text)||I.data.text===""))}).filter(I=>I.type!=="background_task"),k=[];let S=null;for(const I of v)I.type==="agent_message"?(S&&k.push(S),S={agentMessage:I,toolItems:[],otherItems:[]}):(S||(S={agentMessage:null,toolItems:[],otherItems:[]}),ff(I)?S.toolItems.push(I):S.otherItems.push(I));S&&k.push(S);const w=v.filter(I=>ff(I)).length,D=w>0||v.length>0&&(s.status==="running"||s.status==="pending");return c.jsxs("div",{className:"turn-group",children:[c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),c.jsx("span",{className:"turn-header-title",children:"You"})]}),c.jsx("p",{className:"user-message",children:s.user_prompt}),Array.isArray(s.attachments)&&s.attachments.length>0&&c.jsx(gv,{attachments:s.attachments})]}),D&&c.jsxs("div",{className:"tool-calls",children:[c.jsxs("div",{className:"tool-calls-header",onClick:()=>d(I=>!I),children:[c.jsx("span",{className:"tool-calls-icon",children:c.jsx(Lm,{size:12})}),c.jsx("span",{className:"tool-calls-summary",children:w>0?`${w} tool call${w>1?"s":""}`:"thinking…"}),c.jsx(eu,{size:14,className:"tool-calls-chevron",style:{transform:a?"rotate(90deg)":"none"}})]}),a&&c.jsx("div",{className:"tool-calls-body",children:k.map((I,C)=>c.jsxs("div",{className:"intermediate-segment",children:[I.agentMessage&&c.jsx(vl,{item:I.agentMessage,runtimeType:i,turn:s,threads:l}),I.otherItems.map(z=>c.jsx(vl,{item:z,runtimeType:i,turn:s,threads:l},z.id)),I.toolItems.length>0&&c.jsx(dv,{items:I.toolItems,runtimeType:i,turn:s,threads:l})]},C))})]}),h&&c.jsx(vl,{item:s.items[f],runtimeType:i,turn:s,threads:l},s.items[f].id),h&&s.items.slice(f+1).map(I=>c.jsx(vl,{item:I,runtimeType:i,turn:s,threads:l},I.id)),s.items.length===0&&!s.error&&(s.status==="pending"||s.status==="running")&&c.jsx("div",{className:"render-content",children:c.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:s.status==="running"?"Agent is thinking…":"Waiting to start…"})}),s.error&&c.jsx("div",{className:"render-content",children:c.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:c.jsx("code",{children:s.error})})})]})}const wv=M.memo(kv);function qf(s,i="session",l=0){const a=[];if(i==="session")s.forEach((f,h)=>gf(f,h,a));else{const f=s[l];f&&gf(f,l,a)}const d=new Map;for(const f of a)d.set(f.path,f);return Array.from(d.values())}function gf(s,i,l){var a;for(const d of s.items)if(d.type==="file_change"&&((a=d.data)!=null&&a.changes)){const f=d.data.changes;for(const h of f)l.push({path:h.path,kind:h.kind,turnIdx:i})}}function Sv(){const{activeSessionId:s,sessionDetails:i,activeTurnIndex:l,activeRightTab:a,changesScope:d,submittingPrompt:f,loading:h,selectedChangePath:m,setSelectedChangePath:x}=K(),v=s?i[s]:null,k=(v==null?void 0:v.turns)??[],S=M.useRef(null);if(M.useEffect(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight)},[s,k.length]),M.useEffect(()=>{if(!m||a!=="changes")return;const w=setTimeout(()=>{const D=m.replace(/[^a-zA-Z0-9]/g,"-"),I=document.getElementById(`diff-${D}`);I&&(I.scrollIntoView({behavior:"smooth",block:"start"}),I.classList.add("diff-highlight"),setTimeout(()=>I.classList.remove("diff-highlight"),1500)),x(null)},50);return()=>clearTimeout(w)},[m,a,x]),a==="changes"){if(!v)return c.jsx("div",{className:"render-scroll",children:c.jsx("div",{className:"empty-state",children:"No session selected"})});const w=qf(k,d,l);return w.length===0?c.jsx("div",{className:"render-scroll",children:c.jsx("div",{className:"render-content",children:c.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"No file changes in this scope."})})}):c.jsx("div",{className:"render-scroll",ref:S,children:c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{style:{marginBottom:"20px"},children:[c.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"var(--text)"},children:d==="session"?"All Session Changes":"Current Turn Changes"}),c.jsxs("span",{style:{fontSize:"12px",color:"var(--text-muted)",marginLeft:"8px"},children:[w.length," file",w.length>1?"s":""]})]}),w.map(D=>{const I=D.path.split("/").pop()||D.path,C=D.path.replace("/"+I,""),z=D.kind==="add"?"Added":D.kind==="delete"?"Deleted":"Modified",q=D.kind==="add"?"fc-add":D.kind==="delete"?"fc-del":"fc-mod",G=D.kind==="add"?"A":D.kind==="delete"?"D":"M",Y=D.path.replace(/[^a-zA-Z0-9]/g,"-");return c.jsxs("div",{children:[c.jsxs("div",{className:"diff-file-header",id:`diff-${Y}`,children:[c.jsx("span",{className:`diff-file-status ${q}`,children:G}),c.jsxs("span",{className:"diff-file-name",children:[C&&c.jsxs("span",{style:{color:"var(--text-muted)"},children:[C,"/"]}),I]}),c.jsx("span",{className:"diff-file-stats",children:c.jsx("span",{className:`diff-file-badge ${q}`,children:z})})]}),c.jsx("p",{style:{color:"var(--text-muted)",fontSize:"12px",fontStyle:"italic",padding:"8px 16px"},children:"Diff content not available (Codex SDK limitation)."})]},D.path)})]})})}return h&&!v?c.jsx("div",{className:"render-scroll",children:c.jsxs("div",{className:"skeleton-bars",children:[c.jsx("div",{className:"skeleton-bar"}),c.jsx("div",{className:"skeleton-bar"}),c.jsx("div",{className:"skeleton-bar"}),c.jsx("div",{className:"skeleton-bar"}),c.jsx("div",{className:"skeleton-bar"})]})}):v?c.jsxs("div",{className:"render-scroll",ref:S,children:[f&&c.jsx("div",{className:"turn-block",children:c.jsxs("div",{className:"turn-group",children:[c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),c.jsx("span",{className:"turn-header-title",children:"You"})]}),c.jsx("p",{className:"user-message",children:f})]}),c.jsx("div",{className:"render-content",children:c.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"Sending…"})})]})}),k.length===0&&!f&&c.jsx("div",{className:"empty-state",children:"No turns yet. Send a message below to start."}),k.filter(w=>!w.thread_id).map((w,D)=>c.jsx("div",{id:`turn-${D}`,className:"turn-block",children:c.jsx(wv,{turn:w,runtimeType:v.runtime_type,threads:v.threads??[]})},w.id))]}):c.jsx("div",{className:"render-scroll",children:c.jsx("div",{className:"empty-state",children:"No session selected"})})}const Tv=M.memo(Sv),_v=[{id:"model",label:"/model",hint:"Change model",capability:"dynamicModels"},{id:"sandbox",label:"/sandbox",hint:"Sandbox mode",capability:"sandbox",subPopup:"sandbox"},{id:"websearch",label:"/websearch",hint:"Web search mode",capability:"webSearch",subPopup:"websearch"},{id:"network",label:"/network",hint:"Network access",capability:"networkAccess",subPopup:"network"},{id:"skills",label:"/skills",hint:"Browse skills",capability:"skills"},{id:"plugins",label:"/plugins",hint:"Browse plugins",capability:"plugins"},{id:"mcp",label:"/mcp",hint:"Browse MCP servers",capability:"mcpServers"}];function Nv(s){return s.map(i=>({id:i.name,label:`/${i.name}`,hint:i.description,capability:null,insertAsText:!0}))}function Ev(s,i,l=[]){const a=[..._v,...Nv(l)],d=new Set;return a.filter(f=>!(d.has(f.label)||(d.add(f.label),f.capability&&!i[f.capability])||s&&!f.label.toLowerCase().includes(s.toLowerCase())))}function Cv({commands:s,selectedIndex:i,onSelect:l,onHover:a}){return c.jsxs("div",{className:"slash-popup",children:[c.jsx("div",{className:"slash-popup-header",children:"Commands"}),s.length===0&&c.jsx("div",{className:"slash-popup-empty",children:"No matching commands"}),s.map((d,f)=>c.jsxs("div",{className:`slash-popup-item ${f===i?"selected":""}`,onMouseEnter:()=>a(f),onClick:()=>l(d),children:[c.jsx("span",{className:"slash-popup-label",children:d.label}),c.jsx("span",{className:"slash-popup-hint",children:d.hint})]},d.id))]})}function za({title:s,options:i,currentValue:l,onSelect:a,onClose:d}){return c.jsxs("div",{className:"slash-popup",children:[c.jsxs("div",{className:"slash-popup-header",children:[c.jsx("button",{className:"slash-popup-back",onClick:d,children:"← Back"}),c.jsx("span",{children:s})]}),i.map(f=>c.jsxs("div",{className:`slash-popup-item ${f.value===l?"selected":""}`,onClick:()=>a(f.value),children:[c.jsxs("div",{className:"slash-popup-item-main",children:[c.jsx("span",{className:"slash-popup-label",children:f.label}),f.description&&c.jsx("span",{className:"slash-popup-hint",children:f.description})]}),f.value===l&&c.jsx("span",{className:"slash-popup-check",children:"✓"})]},f.value))]})}function jv(){return Hr("/skills")}function Rv({filter:s,onSelect:i,onClose:l}){const[a,d]=M.useState([]),[f,h]=M.useState(!0),[m,x]=M.useState(0),v=M.useRef(null);M.useEffect(()=>{jv().then(d).catch(()=>d([])).finally(()=>h(!1))},[]);const k=a.filter(S=>S.name.toLowerCase().includes(s.toLowerCase())||S.description.toLowerCase().includes(s.toLowerCase()));return M.useEffect(()=>{x(0)},[s]),M.useEffect(()=>{function S(w){w.key==="ArrowDown"?(w.preventDefault(),x(D=>Math.min(D+1,k.length-1))):w.key==="ArrowUp"?(w.preventDefault(),x(D=>Math.max(D-1,0))):w.key==="Enter"?(w.preventDefault(),k[m]&&i(k[m])):w.key==="Escape"&&(w.preventDefault(),l())}return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[k,m,i,l]),c.jsxs("div",{className:"slash-popup",ref:v,children:[c.jsxs("div",{className:"slash-popup-header",children:[c.jsx("button",{className:"slash-popup-back",onClick:l,children:"← Back"}),c.jsx("span",{children:"Skills"})]}),f&&c.jsx("div",{className:"slash-popup-empty",children:"Loading skills…"}),!f&&k.length===0&&c.jsx("div",{className:"slash-popup-empty",children:"No matching skills"}),k.map((S,w)=>c.jsxs("div",{className:`slash-popup-item ${w===m?"selected":""}`,onMouseEnter:()=>x(w),onClick:()=>i(S),children:[c.jsxs("div",{className:"slash-popup-item-main",children:[c.jsx("span",{className:"slash-popup-label",children:S.name}),S.description&&c.jsx("span",{className:"slash-popup-hint",children:S.description})]}),!!S.metadata.isSystem&&c.jsx("span",{className:"slash-popup-hint",children:"system"})]},S.id))]})}function Lv(){return Hr("/providers")}function Iv(s){return Hr(`/providers/${s}/commands`)}const Av={dynamicModels:!1,skills:!1,plugins:!1,mcpServers:!1,imageAttachments:!1,sandbox:!1,webSearch:!1,networkAccess:!1,fileReferences:!1};function Dv(s){const[i,l]=M.useState([]),[a,d]=M.useState(!0);M.useEffect(()=>{Lv().then(l).catch(()=>l([])).finally(()=>d(!1))},[]);const f=i.find(h=>h.id===s)??null;return{provider:f,capabilities:(f==null?void 0:f.capabilities)??Av,loading:a}}const zi=32,hl=200;function vf(s){if(!s)return{};try{return JSON.parse(s)}catch{return{}}}function yf(s){return s<1024?`${s}B`:s<1024*1024?`${(s/1024).toFixed(1)}KB`:`${(s/(1024*1024)).toFixed(1)}MB`}let xf=0;function Pv(){return xf+=1,`att-${Date.now()}-${xf}`}function Mv(){const[s,i]=M.useState(""),l=M.useRef(null),a=M.useRef(null),{submitPrompt:d,cancelTurn:f,updateRuntimeConfig:h,setShowModelSelector:m}=K(),x=K(P=>P.activeSessionId),v=K(P=>P.activeSessionId?P.sessionDetails[P.activeSessionId]:null),k=K(P=>P.restoredPrompt),S=K(P=>P.quotedText),w=(v==null?void 0:v.is_running)===1,D=!x,{capabilities:I}=Dv(v==null?void 0:v.runtime_type),C=(v==null?void 0:v.runtime_type)??null,z=I.imageAttachments,[q,G]=M.useState([]),[Y,U]=M.useState(!1),[ae,fe]=M.useState(null),[ce,le]=M.useState([]);M.useEffect(()=>{if(!C){le([]);return}let P=!1;return Iv(C).then(pe=>{P||le(pe)}).catch(()=>{P||le([])}),()=>{P=!0}},[C]);const[Te,Z]=M.useState(!1),[_e,ie]=M.useState(""),[ye,re]=M.useState(0),[b,ee]=M.useState(void 0),[ge,B]=M.useState(!1),[ue,Q]=M.useState(""),[N,A]=M.useState([]),xe=Te?Ev(_e,I,ce):[];M.useEffect(()=>{k!==null&&(i(k),requestAnimationFrame(()=>{l.current&&(l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,hl)+"px")}),K.setState({restoredPrompt:null}))},[k]),M.useEffect(()=>{S!==null&&(i(P=>P+S),setTimeout(()=>{if(l.current){l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,hl)+"px",l.current.focus();const P=l.current.value.length;l.current.setSelectionRange(P,P)}},0),K.setState({quotedText:null}))},[S]),M.useEffect(()=>{if(!w)return;function P(pe){pe.key==="Escape"&&(pe.preventDefault(),f())}return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[w,f]),M.useEffect(()=>{Z(!1),ee(void 0),B(!1),A([]),G(P=>{for(const pe of P)pe.previewUrl&&URL.revokeObjectURL(pe.previewUrl);return[]})},[x]),M.useEffect(()=>{if(!ae)return;function P(pe){pe.key==="Escape"&&(pe.preventDefault(),fe(null))}return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[ae]);const Se=M.useCallback(P=>{if(!P)return;const pe=Array.from(P);for(const He of pe){const Ve=new FileReader;Ve.onload=()=>{const kt=Ve.result.split(",")[1]??"",At=He.type.startsWith("image/")?URL.createObjectURL(He):void 0;G(nn=>[...nn,{id:Pv(),name:He.name,media_type:He.type||"application/octet-stream",data:kt,previewUrl:At,size:He.size}])},Ve.readAsDataURL(He)}},[]),Ee=M.useCallback(P=>{G(pe=>{const He=pe.find(Ve=>Ve.id===P);return He!=null&&He.previewUrl&&URL.revokeObjectURL(He.previewUrl),pe.filter(Ve=>Ve.id!==P)})},[]),Ce=M.useCallback(P=>{P.preventDefault(),P.stopPropagation(),!(!z||w)&&U(!0)},[z,w]),$e=M.useCallback(P=>{P.preventDefault(),P.stopPropagation(),U(!1)},[]),Ie=M.useCallback(P=>{P.preventDefault(),P.stopPropagation(),U(!1),!(!z||w)&&Se(P.dataTransfer.files)},[z,w,Se]),Be=M.useCallback(P=>{var Ve;if(!z)return;const pe=(Ve=P.clipboardData)==null?void 0:Ve.items;if(!pe)return;const He=[];for(let ot=0;ot<pe.length;ot++){const kt=pe[ot];if(kt.type.startsWith("image/")){const At=kt.getAsFile();At&&He.push(At)}}He.length>0&&(P.preventDefault(),Se(He))},[z,Se]);function mt(){const P=l.current;P&&(P.style.height="auto",P.style.height=Math.min(P.scrollHeight,hl)+"px")}function dn(){const P=s.trim();if(!P||w)return;let pe=P;N.length>0&&(pe=`${N.map(ot=>`$${ot.name}`).join(" ")}
|
|
355
|
-
|
|
356
|
-
${P}`);const He=q.map(({id:Ve,previewUrl:ot,size:kt,...At})=>At);i(""),A([]),l.current&&(l.current.style.height=zi+"px"),Z(!1),ee(void 0),B(!1);for(const Ve of q)Ve.previewUrl&&URL.revokeObjectURL(Ve.previewUrl);G([]),d(pe,He.length>0?He:void 0)}function Fe(P){if(P.insertAsText){const pe=`/${P.id} `;i(pe),Z(!1),ee(void 0),requestAnimationFrame(()=>{if(l.current){l.current.focus();const He=pe.length;l.current.setSelectionRange(He,He),l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,hl)+"px"}});return}P.subPopup?ee(P.subPopup):P.id==="skills"?(B(!0),Q(""),Z(!1),i("")):P.id==="model"?(m(!0),Z(!1),i("")):(Z(!1),i(""))}function fn(P){A(pe=>[...pe,P]),B(!1),i(""),l.current&&(l.current.style.height=zi+"px")}function Me(P){const pe=vf(v==null?void 0:v.runtime_config);b==="sandbox"?pe.sandboxMode=P:b==="websearch"?pe.webSearchMode=P:b==="network"&&(pe.networkAccessEnabled=P==="true"),h(pe),ee(void 0),Z(!1),i(""),l.current&&(l.current.style.height=zi+"px")}function Un(P){if(Te&&!b){if(P.key==="ArrowDown"){P.preventDefault(),re(pe=>Math.min(pe+1,xe.length-1));return}if(P.key==="ArrowUp"){P.preventDefault(),re(pe=>Math.max(pe-1,0));return}if(P.key==="Enter"){P.preventDefault(),xe[ye]&&Fe(xe[ye]);return}if(P.key==="Escape"){P.preventDefault(),Z(!1),i("");return}}if(b&&P.key==="Escape"){P.preventDefault(),ee(void 0);return}if(P.key==="Enter"&&(P.metaKey||P.ctrlKey)&&!w){P.preventDefault(),dn();return}P.key==="Escape"&&w&&(P.preventDefault(),f())}function We(P){const pe=P.target.value;i(pe),mt(),pe.startsWith("/")&&!pe.includes(" ")&&!w?(Z(!0),ie(pe.slice(1)),re(0)):(Z(!1),ee(void 0)),pe.startsWith("$")&&!w?(B(!0),Q(pe.slice(1))):pe.startsWith("$")||B(!1)}const Ut=vf(v==null?void 0:v.runtime_config),pr=[{value:"read-only",label:"Read Only",description:"Agent can only read files"},{value:"workspace-write",label:"Workspace Write",description:"Agent can read and write in workspace"},{value:"danger-full-access",label:"Danger Full Access",description:"Agent has unrestricted access"}],It=[{value:"disabled",label:"Disabled",description:"No web search"},{value:"cached",label:"Cached",description:"Use cached search results"},{value:"live",label:"Live",description:"Perform live web searches"}],pn=[{value:"false",label:"Disabled",description:"No network access"},{value:"true",label:"Enabled",description:"Allow network access in sandbox"}];return c.jsxs("div",{className:`cmd-bar${Y?" drag-over":""}`,onDragOver:Ce,onDragLeave:$e,onDrop:Ie,children:[Te&&!b&&c.jsx(Cv,{commands:xe,selectedIndex:ye,onSelect:Fe,onHover:re}),Te&&b==="sandbox"&&c.jsx(za,{title:"Sandbox Mode",options:pr,currentValue:Ut.sandboxMode,onSelect:Me,onClose:()=>ee(void 0)}),Te&&b==="websearch"&&c.jsx(za,{title:"Web Search",options:It,currentValue:Ut.webSearchMode,onSelect:Me,onClose:()=>ee(void 0)}),Te&&b==="network"&&c.jsx(za,{title:"Network Access",options:pn,currentValue:Ut.networkAccessEnabled===!0?"true":"false",onSelect:Me,onClose:()=>ee(void 0)}),ge&&c.jsx(Rv,{filter:ue,onSelect:fn,onClose:()=>{B(!1),i("")}}),N.length>0&&c.jsx("div",{className:"skill-badges",children:N.map(P=>c.jsxs("span",{className:"skill-badge",children:["$",P.name,c.jsx("button",{className:"skill-badge-remove",onClick:()=>A(pe=>pe.filter(He=>He.id!==P.id)),children:"×"})]},P.id))}),q.length>0&&c.jsx("div",{className:"attachment-preview-area",children:q.map(P=>c.jsxs("div",{className:"attachment-chip",title:P.name,children:[P.previewUrl?c.jsx("img",{src:P.previewUrl,alt:P.name,className:"attachment-thumb",onClick:()=>fe(P),style:{cursor:"pointer"}}):c.jsx(Lf,{size:20,className:"attachment-file-icon"}),c.jsxs("div",{className:"attachment-info",children:[c.jsx("span",{className:"attachment-name",children:P.name}),c.jsx("span",{className:"attachment-size",children:yf(P.size)})]}),c.jsx("button",{className:"attachment-remove",onClick:()=>Ee(P.id),title:"Remove attachment",children:c.jsx(fr,{size:14})})]},P.id))}),z&&!w&&!D&&c.jsx("input",{ref:a,type:"file",multiple:!0,accept:"image/*,application/pdf,text/*,.ts,.js,.tsx,.jsx,.py,.go,.rs,.java,.c,.cpp,.h,.css,.html,.xml,.yml,.yaml,.toml,.ini,.sh,.sql",style:{display:"none"},onChange:P=>{Se(P.target.files),P.target.value=""}}),c.jsxs("div",{className:"cmd-input-row",children:[z&&!w&&!D&&c.jsx("button",{className:"attachment-clip-btn",onClick:()=>{var P;return(P=a.current)==null?void 0:P.click()},title:"Attach files",disabled:w,children:c.jsx(Om,{size:16})}),c.jsx("textarea",{ref:l,className:"cmd-textarea",placeholder:D?"Select or create a session…":w?"Agent is running…":"Type a message… Use / for commands",autoComplete:"off",value:s,disabled:w||D,rows:1,style:{minHeight:zi,maxHeight:hl},onChange:We,onKeyDown:Un,onPaste:Be}),w?c.jsx("button",{className:"cmd-stop-btn",onClick:()=>f(),title:"Stop (Esc)",children:c.jsx(Hi,{size:15})}):c.jsx("button",{className:"cmd-send-btn",onClick:dn,disabled:!s.trim()||D,title:"Send (⌘↵)",children:c.jsx(km,{size:16})})]}),ae&&c.jsx("div",{className:"image-preview-modal",onClick:()=>fe(null),children:c.jsxs("div",{className:"image-preview-content",onClick:P=>P.stopPropagation(),children:[c.jsx("img",{src:ae.previewUrl,alt:ae.name}),c.jsxs("div",{className:"image-preview-info",children:[c.jsx("span",{children:ae.name}),c.jsx("span",{children:yf(ae.size)})]}),c.jsx("button",{className:"image-preview-close",onClick:()=>fe(null),children:c.jsx(fr,{size:20})})]})})]})}function zv(){const s=K(C=>C.activeSessionId),i=K(C=>C.sessionDetails),l=K(C=>C.activeTurnIndex),a=K(C=>C.setActiveTurnIndex),d=K(C=>C.rewindToTurn),f=K(C=>C.restoreSession),h=K(C=>C.branchFromTurn),m=s?i[s]:null,x=(m==null?void 0:m.turns)??[],v=(m==null?void 0:m.is_running)===1,k=!!(m!=null&&m.rewound_at_turn_id),[S,w]=M.useState(null),D=M.useRef(null);if(Xa(D,()=>w(null),!!S),Za(()=>w(null),!!S),x.length===0)return c.jsx("div",{className:"empty-state",children:"No turns yet"});function I(C){a(C),requestAnimationFrame(()=>{var z;(z=document.getElementById(`turn-${C}`))==null||z.scrollIntoView({behavior:"smooth",block:"start"})})}return c.jsxs("div",{className:"right-section",children:[c.jsx("div",{className:"right-section-title",children:"Conversation"}),x.map((C,z)=>{const q=z===l,G=C.user_prompt.length>50?C.user_prompt.slice(0,50)+"…":C.user_prompt,Y=C.status==="running"||C.status==="pending";return c.jsx("div",{children:c.jsxs("div",{className:`turn-item ${q?"active":""}`,onClick:()=>I(z),onContextMenu:U=>{U.preventDefault(),w({x:U.clientX,y:U.clientY,turnId:C.id,turnIndex:z,isLast:z===x.length-1,isSlashCommand:C.user_prompt.trimStart().startsWith("/")})},children:[c.jsx("span",{className:"turn-item-icon",style:{background:"var(--amber)",color:"#fff"},children:c.jsx(Vm,{size:12})}),c.jsx("span",{className:"turn-item-label",children:G}),Y&&c.jsx("span",{className:"turn-item-status",children:"running…"})]})},C.id)}),S&&c.jsxs("div",{ref:D,className:"ctx-menu",style:{position:"fixed",left:S.x,top:S.y,zIndex:500},children:[c.jsxs("div",{className:`ctx-menu-item ${S.isLast||v||S.isSlashCommand?"ctx-disabled":""}`,onClick:()=>{S.isLast||v||S.isSlashCommand||(window.confirm("Rewind to this turn? Hidden turns can be restored later.")&&d(s,S.turnId),w(null))},children:[c.jsx(Um,{size:12})," Rewind to Here",S.isSlashCommand?" (slash command)":""]}),k&&c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{f(s),w(null)},children:[c.jsx(nu,{size:12})," Restore Rewind"]}),c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{h(s,S.turnId),w(null)},children:[c.jsx(jm,{size:12})," Branch from Here"]})]})]})}function bv(){const{activeSessionId:s,sessionDetails:i,changesScope:l,setChangesScope:a,activeTurnIndex:d,setSelectedChangePath:f}=K(),h=s?i[s]:null,m=(h==null?void 0:h.turns)??[],x=qf(m,l,d);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"changes-scope-toggle",children:[c.jsx("button",{className:`scope-btn ${l==="session"?"active":""}`,onClick:()=>a("session"),children:"Session"}),c.jsx("button",{className:`scope-btn ${l==="turngroup"?"active":""}`,onClick:()=>a("turngroup"),children:"Current Turn"})]}),x.length===0?c.jsx("div",{className:"empty-state",children:"No file changes in this scope"}):c.jsxs("div",{className:"right-section",children:[c.jsxs("div",{className:"right-section-title",children:["Changed Files (",x.length,")"]}),x.map(v=>{const k=v.kind==="add"?"fc-add":v.kind==="delete"?"fc-del":"fc-mod",S=v.kind==="add"?"A":v.kind==="delete"?"D":"M",w=v.path.split("/").pop()||v.path,D=v.path.replace("/"+w,"");return c.jsxs("div",{className:"file-change clickable",onClick:()=>f(v.path),children:[c.jsx("span",{className:`fc-status ${k}`,children:S}),c.jsxs("span",{className:"fc-name",children:[D&&c.jsxs("span",{style:{color:"var(--text-muted)"},children:[D,"/"]}),w]})]},v.path)})]})]})}const kf=2e4;function Ov(s){const i=[];return s.forEach((l,a)=>{var d;for(const f of l.items)if(f.type==="background_task"){if((((d=f.data)==null?void 0:d.task_type)||"unknown")==="local_agent")continue;i.push({item:f,turnIndex:a,turnPrompt:l.user_prompt})}}),i}function $v({entry:s}){const{item:i,turnIndex:l,turnPrompt:a}=s,d=i.data||{},f=d.task_type||"unknown",h=d.subagent_type||null,m=d.description||"",x=d.status||"running",v=d.summary||null,k=d.last_tool_name||null,S=d.token_count||null,w=d.output||"",D=i.status==="in_progress",I=f==="local_agent",C=f==="local_bash",z=I?Oa:C?Af:Rf,q=I?`Subagent${h?`: ${h}`:""}`:C?"Monitor":"Background Task",G=x==="running"?"running…":x==="completed"?"done":x==="failed"?"failed":x==="stopped"?"stopped":x,Y=i.status==="failed"||x==="failed",[U,ae]=M.useState(D),[fe,ce]=M.useState(!1),le=M.useRef(null);M.useEffect(()=>{D&&ae(!0)},[D]),M.useEffect(()=>{U&&D&&le.current&&(le.current.scrollTop=le.current.scrollHeight)},[U,D,w]);const Te=w.length>kf,Z=Te&&!fe?w.slice(0,kf)+`
|
|
357
|
-
… (truncated, click to expand)`:w,_e=D?null:x==="completed"?c.jsx(yl,{size:12}):Y?c.jsx(tu,{size:12}):c.jsx(Hi,{size:12});return c.jsxs("div",{className:`task-card ${D?"task-running":""} ${Y?"task-failed":""}`,children:[c.jsxs("div",{className:"task-card-header",onClick:()=>ae(ie=>!ie),style:{cursor:"pointer"},children:[c.jsx("span",{className:"task-card-icon",children:c.jsx(z,{size:14})}),c.jsx("span",{className:"task-card-type",children:q}),c.jsxs("span",{className:`task-card-status ${Y?"task-status-failed":D?"task-status-running":"task-status-done"}`,children:[_e," ",G]}),c.jsx(eu,{size:14,className:"task-card-chevron",style:{transform:U?"rotate(90deg)":"none",marginLeft:"auto"}})]}),m&&c.jsx("div",{className:"task-card-desc",children:m}),D&&k&&c.jsxs("div",{className:"task-card-meta",children:["last tool: ",k,S!=null&&` · ${S.toLocaleString()} tokens`]}),U&&c.jsxs("div",{className:"task-card-body",children:[w?c.jsxs(c.Fragment,{children:[c.jsx("pre",{className:"cmd-output task-output",ref:le,children:c.jsx("code",{children:Z})}),Te&&c.jsx("button",{className:"cmd-output-toggle",onClick:()=>ce(ie=>!ie),children:fe?"Show less":`Show full output (${(w.length/1024).toFixed(0)}KB)`})]}):v?c.jsx("pre",{className:"cmd-output task-output",children:c.jsx("code",{children:v})}):D?c.jsx("div",{className:"task-card-placeholder",children:"Waiting for output…"}):c.jsx("div",{className:"task-card-placeholder",children:"No output captured."}),c.jsxs("div",{className:"task-card-context",title:a,children:["from turn ",l+1,": ",a.length>60?a.slice(0,60)+"…":a]})]})]})}const Fv=M.memo($v);function Uv(){var v,k;const s=K(S=>S.activeSessionId),i=K(S=>S.sessionDetails),l=s?i[s]:null,a=(l==null?void 0:l.turns)??[],d=(l==null?void 0:l.backgroundTasks)??[],f=Ov(a),h=[...f].sort((S,w)=>{const D=S.item.status==="in_progress",I=w.item.status==="in_progress";return D&&!I?-1:!D&&I?1:w.turnIndex-S.turnIndex}),m=new Map;for(const S of d)S.task_type==="local_bash"&&m.set(S.task_id,S.task_type);for(const S of f)if(S.item.status==="in_progress"){const w=((v=S.item.data)==null?void 0:v.task_id)??S.item.external_item_id,D=((k=S.item.data)==null?void 0:k.task_type)??"unknown";m.set(w,D)}const x=[...m.values()].filter(S=>S==="local_bash").length;return f.length===0?c.jsx("div",{className:"empty-state",children:"No background tasks yet"}):c.jsxs("div",{className:"right-section",children:[c.jsxs("div",{className:"right-section-title",children:["Background Tasks (",f.length,")",x>0&&c.jsxs("span",{className:"task-count-badge",style:{color:"var(--amber)"},children:[" ",x," running"]})]}),h.map(S=>c.jsx(Fv,{entry:S},S.item.id))]})}const Bv=M.memo(Uv);Le.setOptions({breaks:!0,gfm:!0});function Hv(s){const i=Le.parse(s);return pu.sanitize(i)}function Wv(s){var i;return(i=s.data)!=null&&i.text?s.data.text:""}function Vv(s){const i=s.match(/^\[Quoting from your previous response\]:\n> .*\n\n([\s\S]*)$/);return i?i[1]:s}function Gv({turn:s}){const i=s.items.filter(a=>a.type==="agent_message"),l=Vv(s.user_prompt);return c.jsxs("div",{className:"thread-card-turn",children:[c.jsx("div",{className:"thread-card-user-message",children:l}),i.map(a=>c.jsx("div",{className:"thread-card-ai-response",dangerouslySetInnerHTML:{__html:Hv(Wv(a))}},a.id)),s.items.length===0&&(s.status==="pending"||s.status==="running")&&c.jsx("div",{className:"thread-card-pending",children:s.status==="running"?"AI is responding…":"Waiting…"})]})}function Qv({thread:s,isRunning:i,threadTurns:l,onResolve:a,onReopen:d,onDelete:f,onFollowup:h,onLocate:m}){const[x,v]=M.useState(""),[k,S]=M.useState(!0),w=M.useRef(null),D=M.useRef(null),[I,C]=M.useState(!1),[z,q]=M.useState({x:0,y:0}),[G,Y]=M.useState(""),U=28,ae=120;M.useEffect(()=>{const Z=D.current;Z&&(Z.scrollTop=Z.scrollHeight)},[l.length,k]);function fe(){const Z=w.current;Z&&(Z.style.height="auto",Z.style.height=Math.min(Z.scrollHeight,ae)+"px")}const ce=M.useCallback(()=>{C(!1)},[]),le=M.useCallback(()=>{const Z=D.current;if(!Z)return;const _e=window.getSelection();if(!_e||_e.rangeCount===0||_e.isCollapsed){C(!1);return}const ie=_e.getRangeAt(0);if(!Z.contains(ie.commonAncestorContainer)){C(!1);return}const ye=ie.commonAncestorContainer.nodeType===Node.TEXT_NODE?ie.commonAncestorContainer.parentElement:ie.commonAncestorContainer;if(!(ye!=null&&ye.closest(".thread-card-ai-response"))){C(!1);return}const re=_e.toString();if(!re.trim()){C(!1);return}const b=ie.getBoundingClientRect(),ee=28,ge=6;let B=b.top-ee-ge;B<8&&(B=b.bottom+ge),q({x:b.right,y:B}),Y(re),C(!0)},[]),Te=M.useCallback(()=>{var _e;const Z=`
|
|
358
|
-
\`\`\`QUOTE
|
|
359
|
-
${G}
|
|
360
|
-
\`\`\`
|
|
361
|
-
|
|
362
|
-
`;v(ie=>ie+Z),C(!1),Y(""),(_e=window.getSelection())==null||_e.removeAllRanges(),setTimeout(()=>{if(w.current){w.current.style.height="auto",w.current.style.height=Math.min(w.current.scrollHeight,ae)+"px",w.current.focus();const ie=w.current.value.length;w.current.setSelectionRange(ie,ie)}},0)},[G]);return c.jsxs("div",{className:`thread-card ${s.status==="resolved"?"thread-resolved":""}`,id:`thread-${s.id}`,children:[c.jsxs("div",{className:"thread-card-header",onClick:()=>S(Z=>!Z),children:[c.jsxs("div",{className:"thread-card-quote",children:["“",s.selected_text.slice(0,100),s.selected_text.length>100?"…":"","”"]}),c.jsxs("div",{className:"thread-card-header-right",children:[c.jsx("button",{className:"thread-locate-btn",onClick:Z=>{Z.stopPropagation(),m()},title:"Scroll to text",children:c.jsx(bm,{size:12})}),c.jsx("span",{className:`thread-status-badge ${s.status==="open"?"thread-status-open":"thread-status-resolved"}`,children:s.status==="open"?"Open":"Resolved"})]})]}),k&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"thread-card-conversation",ref:D,onMouseDown:ce,onMouseUp:le,children:[l.map(Z=>c.jsx(Gv,{turn:Z},Z.id)),l.length===0&&c.jsx("div",{className:"thread-card-placeholder",children:"No messages yet."})]}),I&&c.jsx("div",{className:"selection-actions",style:{left:z.x,top:z.y},children:c.jsxs("button",{className:"discuss-button",onClick:Te,title:"Quote this text in your follow-up",children:[c.jsx(If,{size:14}),c.jsx("span",{children:"Quote"})]})}),s.status==="open"&&c.jsxs("div",{className:"thread-card-followup",children:[c.jsx("textarea",{ref:w,className:"thread-card-followup-input",placeholder:i?"Agent is running…":"Type a follow-up…",value:x,onChange:Z=>{v(Z.target.value),fe()},disabled:i,rows:1,style:{minHeight:U,maxHeight:ae},onKeyDown:Z=>{Z.key==="Enter"&&(Z.metaKey||Z.ctrlKey)&&!i&&x.trim()&&(Z.preventDefault(),h(x.trim()),v(""),w.current&&(w.current.style.height=U+"px"))}}),c.jsx("button",{className:"thread-card-followup-send",disabled:i||!x.trim(),onClick:()=>{h(x.trim()),v("")},children:c.jsx(ru,{size:13})})]}),c.jsxs("div",{className:"thread-card-actions",children:[s.status==="open"?c.jsxs("button",{className:"thread-action-btn",onClick:a,title:"Resolve thread",children:[c.jsx(jf,{size:13})," Resolve"]}):c.jsxs("button",{className:"thread-action-btn",onClick:d,title:"Reopen thread",children:[c.jsx(nu,{size:13})," Reopen"]}),c.jsxs("button",{className:"thread-action-btn thread-action-danger",onClick:f,title:"Delete thread",children:[c.jsx(kl,{size:13})," Delete"]})]})]})]})}function qv(){const{activeSessionId:s,sessionDetails:i,followupThread:l,resolveThread:a,reopenThread:d,deleteThread:f,activeRightTab:h,switchRightTab:m}=K(),[x,v]=M.useState("open"),k=s?i[s]:null,S=(k==null?void 0:k.threads)??[],w=(k==null?void 0:k.turns)??[],D=(k==null?void 0:k.is_running)===1,I=S.filter(G=>x==="open"?G.status==="open":x==="resolved"?G.status==="resolved":!0),C=S.filter(G=>G.status==="open").length,z=S.filter(G=>G.status==="resolved").length;function q(G){h==="changes"&&m("turns"),setTimeout(()=>{const Y=document.querySelector(`mark[data-thread-id="${G}"]`);Y&&(Y.scrollIntoView({behavior:"smooth",block:"center"}),Y.classList.add("thread-mark-flash"),setTimeout(()=>Y.classList.remove("thread-mark-flash"),1500))},h==="changes"?150:50)}return s?S.length===0?c.jsxs("div",{className:"empty-state",children:[c.jsx(Mm,{size:24,style:{opacity:.3,marginBottom:8}}),c.jsx("div",{children:"No threads yet."}),c.jsx("div",{style:{fontSize:"11px",marginTop:"4px"},children:"Select text in an agent response to start a discussion."})]}):c.jsxs("div",{children:[c.jsxs("div",{className:"thread-filter-tabs",children:[c.jsxs("button",{className:`thread-filter-tab ${x==="open"?"active":""}`,onClick:()=>v("open"),children:["Open (",C,")"]}),c.jsxs("button",{className:`thread-filter-tab ${x==="resolved"?"active":""}`,onClick:()=>v("resolved"),children:["Resolved (",z,")"]}),c.jsxs("button",{className:`thread-filter-tab ${x==="all"?"active":""}`,onClick:()=>v("all"),children:["All (",S.length,")"]})]}),I.length===0?c.jsxs("div",{className:"empty-state",style:{padding:"20px 0"},children:["No ",x," threads."]}):I.map(G=>c.jsx(Qv,{thread:G,isRunning:D,threadTurns:w.filter(Y=>Y.thread_id===G.id),onResolve:()=>a(s,G.id),onReopen:()=>d(s,G.id),onDelete:()=>f(s,G.id),onFollowup:Y=>l(s,G.id,Y),onLocate:()=>q(G.id)},G.id))]}):c.jsx("div",{className:"empty-state",children:"No session selected"})}function Kv(){var x,v;const{activeRightTab:s,switchRightTab:i,activeSessionId:l,sessionDetails:a}=K(),d=l?a[l]:null,f=((x=d==null?void 0:d.backgroundTasks)==null?void 0:x.length)??0,h=((v=d==null?void 0:d.threads)==null?void 0:v.filter(k=>k.status==="open").length)??0,m=[{id:"turns",label:"Turns"},{id:"changes",label:"Changes"},{id:"tasks",label:"Tasks",badge:f||void 0},{id:"threads",label:"Threads",badge:h||void 0}];return c.jsxs("div",{className:"ide-right",children:[c.jsx("div",{className:"right-tabs",children:m.map(k=>c.jsxs("div",{className:`right-tab ${s===k.id?"active":""}`,onClick:()=>i(k.id),children:[k.label,k.badge?c.jsx("span",{className:"right-tab-badge",children:k.badge}):null]},k.id))}),c.jsxs("div",{className:"right-content",children:[s==="turns"&&c.jsx(zv,{}),s==="changes"&&c.jsx(bv,{}),s==="tasks"&&c.jsx(Bv,{}),s==="threads"&&c.jsx(qv,{})]})]})}const je={low:{effort:"low",label:"Low"},medium:{effort:"medium",label:"Medium"},high:{effort:"high",label:"High"},xhigh:{effort:"xhigh",label:"Extra High"},max:{effort:"max",label:"Max"},ultra:{effort:"ultra",label:"Ultra"}},Va=[{id:"codex",label:"Codex",available:!0,models:[{slug:"gpt-5.6-sol",displayName:"GPT-5.6-Sol",description:"Flagship — complex, open-ended work",defaultReasoning:"low",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max,je.ultra]},{slug:"gpt-5.6-terra",displayName:"GPT-5.6-Terra",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max,je.ultra]},{slug:"gpt-5.6-luna",displayName:"GPT-5.6-Luna",description:"Fast, affordable — clear, repeatable tasks",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max]},{slug:"gpt-5.5",displayName:"GPT-5.5",description:"Previous-gen frontier model",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh]}]},{id:"claude",label:"Claude",available:!0,models:[{slug:"claude-sonnet-5",displayName:"Claude Sonnet 5",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max]},{slug:"claude-opus-5",displayName:"Claude Opus 5",description:"Deep reasoning for complex tasks",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max]},{slug:"claude-fable-5",displayName:"Claude Fable 5",description:"Fast and efficient for simple tasks",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max]}]}];function Yv(s){return Va.find(i=>i.id===s)}function hu(s){const i=Yv(s);return(i==null?void 0:i.models)??[]}function Kf(s,i){return hu(s).find(l=>l.slug===i)}function Ga(s,i){var l;return((l=Kf(s,i))==null?void 0:l.reasoningLevels)??[]}function Qa(s,i){var l;return(l=Kf(s,i))==null?void 0:l.defaultReasoning}function Xv(){const{activeSessionId:s,sessions:i,updateModelConfig:l}=K(),a=K(b=>b.showModelSelector),d=K(b=>b.setShowModelSelector),f=i.find(b=>b.id===s),h=K(b=>b.models),m=K(b=>b.modelsLoading),x=K(b=>b.loadModels),[v,k]=M.useState(!1),S=M.useRef(null);if(Xa(S,()=>k(!1),v),Za(()=>k(!1),v),M.useEffect(()=>{a&&(k(!0),d(!1))},[a,d]),M.useEffect(()=>{f!=null&&f.runtime_type&&x(f.runtime_type)},[f==null?void 0:f.runtime_type,x]),!f)return null;const w=f.runtime_type,D=f.model??"",I=f.model_reasoning_effort??"",C=h.length>0?h:[],z=hu(w),G=[...C.length>0?C:z];if(D&&!G.some(b=>b.slug===D)){const b=z[0];G.unshift({slug:D,displayName:D,description:"Custom model",defaultReasoning:(b==null?void 0:b.defaultReasoning)??"medium",reasoningLevels:(b==null?void 0:b.reasoningLevels)??[]})}function Y(b){return G.find(ee=>ee.slug===b)}function U(b){var ee;return C.length>0?((ee=Y(b))==null?void 0:ee.reasoningLevels)??[]:Ga(w,b)}function ae(b){var ee;return C.length>0?(ee=Y(b))==null?void 0:ee.defaultReasoning:Qa(w,b)}const fe=Va.find(b=>b.id===w),ce=Y(D),le=D?U(D):[],Te=(fe==null?void 0:fe.label)??w,Z=(ce==null?void 0:ce.displayName)??(D||"Default"),_e=le.find(b=>b.effort===I),ie=(_e==null?void 0:_e.label)??(I||"Default");function ye(b){var ue;const ee=U(b),B=ee.some(Q=>Q.effort===I)?I:ae(b)??((ue=ee[0])==null?void 0:ue.effort)??"";l(b,B),k(!1)}function re(b){l(D,b),k(!1)}return c.jsxs("div",{className:"model-selector",ref:S,children:[c.jsxs("button",{className:"model-selector-btn",onClick:()=>k(!v),title:"Change model and thinking level",children:[c.jsx("span",{className:"model-selector-provider",children:Te}),c.jsx("span",{className:"model-selector-sep",children:"›"}),c.jsx("span",{className:"model-selector-model",children:Z}),ie!=="Default"&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"model-selector-sep",children:"›"}),c.jsx("span",{className:"model-selector-reasoning",children:ie})]}),c.jsx($a,{size:12,className:"model-selector-chevron"})]}),v&&c.jsxs("div",{className:"model-selector-popover",children:[c.jsxs("div",{className:"model-selector-column",children:[c.jsx("div",{className:"model-selector-col-header",children:"Provider"}),Va.map(b=>c.jsxs("div",{className:`model-selector-item ${b.id===w?"selected":""} ${b.available?"":"disabled"}`,onClick:()=>{if(b.available){if(b.id===w){k(!1);return}l("","",b.id)}},children:[c.jsx("span",{children:b.label}),!b.available&&c.jsxs("span",{className:"model-selector-coming-soon",children:[c.jsx(Dm,{size:10})," Soon"]}),b.id===w&&c.jsx(yl,{size:12})]},b.id))]}),c.jsxs("div",{className:"model-selector-column",children:[c.jsx("div",{className:"model-selector-col-header",children:"Model"}),m&&c.jsx("div",{className:"model-selector-empty",children:"Loading models…"}),!m&&G.length===0&&c.jsx("div",{className:"model-selector-empty",children:"No models available"}),G.map(b=>c.jsxs("div",{className:`model-selector-item ${b.slug===D?"selected":""}`,onClick:()=>ye(b.slug),children:[c.jsxs("div",{className:"model-selector-item-main",children:[c.jsx("span",{className:"model-selector-item-name",children:b.displayName}),c.jsx("span",{className:"model-selector-item-desc",children:b.description})]}),b.slug===D&&c.jsx(yl,{size:12})]},b.slug))]}),c.jsxs("div",{className:"model-selector-column",children:[c.jsx("div",{className:"model-selector-col-header",children:"Thinking"}),le.length===0&&c.jsx("div",{className:"model-selector-empty",children:"Select a model first"}),le.map(b=>c.jsxs("div",{className:`model-selector-item ${b.effort===I?"selected":""}`,onClick:()=>re(b.effort),children:[c.jsx("span",{children:b.label}),b.effort===I&&c.jsx(yl,{size:12})]},b.effort))]})]})]})}function Zv(s,i){if(!s||s.turns.length===0)return"—";const l=s.turns[0],a=s.turns[s.turns.length-1],d=i?null:a.updated_at;return hm(l.created_at,d)}function bi(s){return s>=1e6?`${(s/1e6).toFixed(s%1e6===0?0:1)}M`:s>=1e3?`${Math.round(s/1e3)}K`:String(s)}function Jv(){var w,D;const s=K(I=>I.activeSessionId),i=K(I=>s?I.sessions.find(C=>C.id===s)??null:null),l=K(I=>s?I.sessionDetails[s]??null:null),a=K(I=>I.wsConnected),d=K(I=>I.switchRightTab),f=(l==null?void 0:l.contextUsage)??null;if(!i)return c.jsxs("div",{className:"ide-statusbar",children:[c.jsxs("div",{className:"sb-item",children:[c.jsx(Wd,{size:14})," AgentPane"]}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsxs("div",{className:"sb-item",title:a?"WebSocket connected":"WebSocket disconnected",children:[c.jsx("span",{className:`status-dot ${a?"done":"error"}`}),a?"Live":"Offline"]}),c.jsx("div",{className:"sb-spacer"}),c.jsxs("div",{className:"sb-item",children:[c.jsx(Hd,{size:14})," K"]})]});const h=Ya(i),m=Zv(l,h.isRunning),x=(l==null?void 0:l.backgroundTasks)??[],v=new Set,k=new Map;for(const I of x)v.add(I.task_id),k.set(I.task_id,I.task_type);for(const I of(l==null?void 0:l.turns)??[])for(const C of I.items)if(C.type==="background_task"&&C.status==="in_progress"){const z=((w=C.data)==null?void 0:w.task_id)??C.external_item_id,q=((D=C.data)==null?void 0:D.task_type)??"unknown";v.add(z),k.set(z,q)}const S=[...k.values()].filter(I=>I==="local_bash").length;return c.jsxs("div",{className:"ide-statusbar",children:[c.jsxs("div",{className:"sb-item",children:[c.jsx(Wd,{size:14})," AgentPane"]}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsx(Xv,{}),S>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"sb-divider",children:"|"}),c.jsxs("div",{className:"sb-item",style:{color:"var(--amber)",cursor:"pointer"},title:`${S} Monitor task${S>1?"s":""} running — click to view`,onClick:()=>d("tasks"),children:[c.jsx(Df,{size:14})," ",S]})]}),c.jsx("div",{className:"sb-spacer"}),c.jsxs("div",{className:"sb-item",title:a?"WebSocket connected":"WebSocket disconnected",children:[c.jsx("span",{className:`status-dot ${a?"done":"error"}`}),a?"Live":"Offline"]}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsxs("div",{className:"sb-item",style:i.status==="failed"?{color:"var(--red)"}:void 0,children:[c.jsx(Ja,{status:h.dot})," ",h.label]}),f&&c.jsx(ey,{usage:f}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsx("div",{className:"sb-item",children:m}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsxs("div",{className:"sb-item",children:[c.jsx(Hd,{size:14})," K"]})]})}function ey({usage:s}){const i=s.percentage>=85?"var(--red)":s.percentage>=60?"var(--amber)":"var(--green)",l=`${bi(s.totalTokens)} / ${bi(s.contextWindow)} tokens`;return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"sb-divider",children:"|"}),c.jsx("div",{className:"sb-context",title:l,children:c.jsxs("span",{className:"sb-context-text",style:{color:i},children:[Math.round(s.percentage),"% / ",bi(s.totalTokens)," / ",bi(s.contextWindow)]})})]})}function ty(){return c.jsxs("div",{className:"ide-root",children:[c.jsxs("div",{className:"ide-layout",children:[c.jsx(qm,{}),c.jsxs("div",{className:"ide-center",children:[c.jsx(Km,{}),c.jsx("div",{className:"ide-render",children:c.jsx(Tv,{})}),c.jsx(Mv,{})]}),c.jsx(Kv,{})]}),c.jsx(Jv,{})]})}function ny(){const{showNewSessionDialog:s,setShowNewSessionDialog:i,createSession:l,lastModelConfig:a}=K(),d=(a==null?void 0:a.provider)??"codex",f=(a==null?void 0:a.model)??"",h=(a==null?void 0:a.reasoning)??"",[m,x]=M.useState(""),[v,k]=M.useState(f),[S,w]=M.useState(h),[D,I]=M.useState("");if(!s)return null;const C=hu(d),z=v?Ga(d,v):[];function q(){l({title:m.trim()||void 0,model:v||void 0,model_reasoning_effort:S||void 0,cwd:D.trim()||void 0,runtime_type:d}),x(""),I("")}function G(U){U.key==="Escape"&&i(!1)}function Y(U){var ce;k(U);const ae=Ga(d,U);ae.some(le=>le.effort===S)||w(Qa(d,U)??((ce=ae[0])==null?void 0:ce.effort)??"")}return c.jsx("div",{className:"dialog-overlay",onClick:()=>i(!1),children:c.jsxs("div",{className:"dialog",onClick:U=>U.stopPropagation(),onKeyDown:G,children:[c.jsxs("div",{className:"dialog-header",children:[c.jsx("span",{className:"dialog-title",children:"New Session"}),c.jsx("button",{className:"dialog-close",onClick:()=>i(!1),children:c.jsx(fr,{size:16})})]}),c.jsxs("div",{className:"dialog-body",children:[c.jsxs("label",{className:"dialog-label",children:["Title (optional)",c.jsx("input",{className:"dialog-input",type:"text",value:m,onChange:U=>x(U.target.value),placeholder:"e.g. refactor auth module",autoFocus:!0})]}),c.jsxs("label",{className:"dialog-label",children:["Model",c.jsxs("select",{className:"dialog-input dialog-select",value:v,onChange:U=>Y(U.target.value),children:[c.jsx("option",{value:"",children:"Default (Codex picks)"}),C.map(U=>c.jsxs("option",{value:U.slug,children:[U.displayName," — ",U.description]},U.slug))]})]}),z.length>0&&c.jsxs("label",{className:"dialog-label",children:["Thinking Level",c.jsxs("select",{className:"dialog-input dialog-select",value:S,onChange:U=>w(U.target.value),children:[c.jsxs("option",{value:"",children:["Default (",Qa(d,v),")"]}),z.map(U=>c.jsx("option",{value:U.effort,children:U.label},U.effort))]})]}),c.jsxs("label",{className:"dialog-label",children:["Working Directory (optional)",c.jsx("input",{className:"dialog-input",type:"text",value:D,onChange:U=>I(U.target.value),placeholder:"e.g. /Users/me/projects/my-app"})]})]}),c.jsxs("div",{className:"dialog-footer",children:[c.jsx("button",{className:"dialog-btn-cancel",onClick:()=>i(!1),children:"Cancel"}),c.jsx("button",{className:"dialog-btn-create",onClick:q,children:"Create"})]})]})})}function ry(){const s=K(S=>S.showCommandPalette),i=K(S=>S.setShowCommandPalette),l=K(),[a,d]=M.useState(""),[f,h]=M.useState(0),m=M.useRef(null),x=M.useMemo(()=>{const S=l.activeSessionId?l.sessionDetails[l.activeSessionId]:null,w=(S==null?void 0:S.is_running)===1;return[{id:"new-session",label:"New Session",hint:"Create a new Codex session",icon:xl,action:()=>l.setShowNewSessionDialog(!0),available:!0},{id:"delete-session",label:"Delete Session",hint:"Delete the active session",icon:kl,action:()=>{l.activeSessionId&&l.deleteSession(l.activeSessionId)},available:!!l.activeSessionId},{id:"send-message",label:"Send Message",hint:"Focus the message input",icon:ru,action:()=>{const D=document.querySelector(".cmd-input");D==null||D.focus()},available:!!l.activeSessionId&&!w},{id:"cancel-turn",label:"Cancel Turn",hint:"Cancel the running turn",icon:Hi,action:()=>l.cancelTurn(),available:w},{id:"tab-turns",label:"Switch to Turns Tab",hint:"View conversation timeline",icon:Am,action:()=>l.switchRightTab("turns"),available:!!l.activeSessionId},{id:"tab-changes",label:"Switch to Changes Tab",hint:"View file changes",icon:_m,action:()=>l.switchRightTab("changes"),available:!!l.activeSessionId},{id:"close-tab",label:"Close Tab",hint:"Close the active session tab",icon:fr,action:()=>{l.activeSessionId&&l.closeTab(l.activeSessionId)},available:!!l.activeSessionId}]},[l]),v=M.useMemo(()=>{const S=a.toLowerCase().trim(),w=x.filter(D=>D.available);return S?w.filter(D=>D.label.toLowerCase().includes(S)||D.hint.toLowerCase().includes(S)):w},[x,a]);M.useEffect(()=>{s&&(d(""),h(0),setTimeout(()=>{var S;return(S=m.current)==null?void 0:S.focus()},50))},[s]);function k(S){if(S.key==="ArrowDown")S.preventDefault(),h(w=>Math.min(w+1,v.length-1));else if(S.key==="ArrowUp")S.preventDefault(),h(w=>Math.max(w-1,0));else if(S.key==="Enter"){S.preventDefault();const w=v[f];w&&(w.action(),i(!1))}else S.key==="Escape"&&i(!1)}return s?c.jsx("div",{className:"palette-overlay",onClick:()=>i(!1),children:c.jsxs("div",{className:"palette",onClick:S=>S.stopPropagation(),children:[c.jsxs("div",{className:"palette-search",children:[c.jsx("input",{ref:m,type:"text",placeholder:"Type a command…",value:a,onChange:S=>{d(S.target.value),h(0)},onKeyDown:k}),c.jsx("span",{className:"palette-esc",children:"ESC"})]}),v.length===0?c.jsx("div",{className:"palette-empty",children:"No matching commands"}):c.jsx("div",{className:"palette-list",children:v.map((S,w)=>{const D=S.icon;return c.jsxs("div",{className:`palette-item ${w===f?"selected":""}`,onClick:()=>{S.action(),i(!1)},onMouseEnter:()=>h(w),children:[c.jsx("span",{className:"palette-item-icon",children:c.jsx(D,{size:16})}),c.jsx("span",{className:"palette-item-label",children:S.label}),c.jsx("span",{className:"palette-item-hint",children:S.hint}),w===f&&c.jsx(Tm,{size:12,className:"palette-item-enter"})]},S.id)})}),c.jsxs("div",{className:"palette-footer",children:[c.jsxs("span",{className:"palette-footer-hint",children:[c.jsx("span",{className:"kbd",children:"↑"}),c.jsx("span",{className:"kbd",children:"↓"})," Navigate"]}),c.jsxs("span",{className:"palette-footer-hint",children:[c.jsx("span",{className:"kbd",children:"↵"})," Select"]}),c.jsxs("span",{className:"palette-footer-hint",children:[c.jsx("span",{className:"kbd",children:"Esc"})," Close"]})]})]})}):null}const sy={success:Sm,error:tu,info:Rm,warn:Hm},ly=4e3;function iy({toast:s}){const i=K(h=>h.removeToast),l=sy[s.type],a=M.useRef(null);M.useEffect(()=>{function h(){a.current=setTimeout(()=>i(s.id),ly)}return h(),()=>{a.current&&clearTimeout(a.current)}},[s.id,i]);function d(){a.current&&(clearTimeout(a.current),a.current=null)}function f(){a.current=setTimeout(()=>i(s.id),2e3)}return c.jsxs("div",{className:`toast toast-${s.type}`,onMouseEnter:d,onMouseLeave:f,children:[c.jsx(l,{size:16}),c.jsx("span",{className:"toast-message",children:s.message}),s.undoAction&&c.jsxs("button",{className:"toast-undo",onClick:()=>{var h;(h=s.undoAction)==null||h.call(s),i(s.id)},children:[c.jsx(Wm,{size:12})," ",s.undoLabel||"Undo"]}),c.jsx("button",{className:"toast-close",onClick:()=>i(s.id),children:c.jsx(fr,{size:14})})]})}function oy(){const s=K(i=>i.toasts);return s.length===0?null:c.jsx("div",{className:"toast-container",children:s.map(i=>c.jsx(iy,{toast:i},i.id))})}let tn=null,_s=null,Sl=1e3;const ay=1e4;function uy(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function qa(){tn&&(tn.readyState===WebSocket.OPEN||tn.readyState===WebSocket.CONNECTING)||(tn=new WebSocket(uy()),tn.onopen=()=>{const s=Sl>1e3;if(Sl=1e3,K.getState().setWsConnected(!0),K.getState().addLogEntry("INFO","WebSocket connected"),s){const i=K.getState();i.activeSessionId&&(i.refreshActiveSession(),i.addToast("info","WebSocket reconnected — session state reconciled"))}},tn.onclose=()=>{K.getState().setWsConnected(!1),K.getState().addLogEntry("WARN","WebSocket disconnected"),K.getState().addToast("warn","WebSocket disconnected — reconnecting…"),dy()},tn.onerror=()=>{},tn.onmessage=s=>{try{const i=JSON.parse(s.data),l=fy[i.event];l&&l(i.data)}catch{}})}function cy(){_s&&(clearTimeout(_s),_s=null),tn&&(tn.onclose=null,tn.close(),tn=null),K.getState().setWsConnected(!1)}function dy(){_s||(_s=window.setTimeout(()=>{_s=null,qa()},Sl),Sl=Math.min(Sl*2,ay))}const fy={"turn:started":s=>{const i=s;K.getState().onTurnStarted(i.sessionId,i.turnId)},"item:started":s=>{const i=s;K.getState().onItemStarted(i.sessionId,i.turnId,i.item)},"item:updated":s=>{const i=s;K.getState().onItemUpdated(i.sessionId,i.turnId,i.item)},"item:completed":s=>{const i=s;K.getState().onItemCompleted(i.sessionId,i.turnId,i.item)},"item:delta":s=>{const i=s;K.getState().onItemDelta(i.sessionId,i.turnId,i.itemId,i.delta)},"turn:completed":s=>{const i=s;K.getState().onTurnCompleted(i.sessionId,i.turnId,i.usage,i.hasUnreviewed)},"turn:tokenUsage":s=>{const i=s;K.getState().onTokenUsageUpdated(i.sessionId,i.turnId,i.usage)},"turn:contextUsage":s=>{const i=s,l={totalTokens:i.totalTokens,contextWindow:i.contextWindow,percentage:i.percentage};K.getState().onContextUsageUpdated(i.sessionId,l)},"turn:failed":s=>{const i=s;K.getState().onTurnFailed(i.sessionId,i.turnId,i.error)},"turn:cancelled":s=>{const i=s;K.getState().onTurnCancelled(i.sessionId,i.turnId)},"session:title":s=>{const i=s;K.getState().onSessionTitle(i.sessionId,i.title)},background_tasks:s=>{const i=s;K.getState().onBackgroundTasksChanged(i.sessionId,i.tasks)},"thread:created":s=>{const i=s;K.getState().onThreadCreated(i.sessionId,i.thread,i.turn)},"thread:followup":s=>{const i=s;K.getState().onThreadFollowup(i.sessionId,i.threadId,i.turn)},"thread:resolved":s=>{const i=s;K.getState().onThreadResolved(i.sessionId,i.threadId,i.status)},"thread:deleted":s=>{const i=s;K.getState().onThreadDeleted(i.sessionId,i.threadId)}};function py(){const s=K(i=>i.init);return M.useEffect(()=>{s(),qa();function i(){if(document.visibilityState!=="visible")return;const l=K.getState(),a=l.activeSessionId;if(!a)return;const d=l.sessionDetails[a];l.wsConnected||qa(),d&&d.is_running===1&&(l.refreshActiveSession(),l.addLogEntry("INFO","Tab returned — reconciling session state"))}return document.addEventListener("visibilitychange",i),()=>{cy(),document.removeEventListener("visibilitychange",i)}},[s]),null}function hy(){const s=K(d=>d.loading),i=K(d=>d.error),l=K(d=>d.sessions),a=K(d=>d.setShowCommandPalette);return M.useEffect(()=>{function d(f){(f.metaKey||f.ctrlKey)&&f.key==="k"&&(f.preventDefault(),a(!0))}return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[a]),c.jsxs(c.Fragment,{children:[c.jsx(py,{}),s&&l.length===0?c.jsx("div",{className:"empty-state",children:"Loading sessions…"}):i&&l.length===0?c.jsxs("div",{className:"empty-state",children:["Error: ",i]}):c.jsxs(c.Fragment,{children:[c.jsx(ty,{}),c.jsx(ny,{}),c.jsx(ry,{}),c.jsx(oy,{})]})]})}$h.createRoot(document.getElementById("root")).render(c.jsx(ml.StrictMode,{children:c.jsx(hy,{})}));
|