@i14ks/ccv 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/ccv.mjs +741 -129
- package/package.json +1 -1
- package/web/assets/{codemirror-02hKfv-c.js → codemirror-4gviWJRD.js} +1 -1
- package/web/assets/{index-BybHqs37.js → index-B-8FWzpe.js} +1 -1
- package/web/assets/{index-DRMnPfA3.js → index-BiBGEAPz.js} +1 -1
- package/web/assets/{index-Bm6PUpXb.js → index-BjCwOpLW.js} +1 -1
- package/web/assets/{index-BBkJ4cEk.js → index-BleqvvQk.js} +1 -1
- package/web/assets/{index-BxcnR7Nj.js → index-Bv8vIAVO.js} +1 -1
- package/web/assets/index-Bzq-v0Dg.js +134 -0
- package/web/assets/{index-sQrmYdbi.css → index-CE1G7QxT.css} +1 -1
- package/web/assets/{index-VSDVirVT.js → index-CJo5aeRL.js} +1 -1
- package/web/assets/{index-C-8irjwh.js → index-CKz5fHXP.js} +1 -1
- package/web/assets/{index-BC8gj6P7.js → index-CR_zbJ-Z.js} +1 -1
- package/web/assets/{index-C2nhZ-ID.js → index-CYwf9t3p.js} +1 -1
- package/web/assets/{index-DZXdWq9L.js → index-C_LuD9HT.js} +1 -1
- package/web/assets/{index-ChKrBnaf.js → index-Cid3pp7b.js} +1 -1
- package/web/assets/{index-Clyg5z5Z.js → index-CkSGxu2i.js} +1 -1
- package/web/assets/{index-KEWrG50i.js → index-CrX9ldma.js} +1 -1
- package/web/assets/{index-BorlqgNX.js → index-Depy6k3N.js} +1 -1
- package/web/assets/{index-zDoB4KM7.js → index-DklW2LtN.js} +1 -1
- package/web/assets/{index-B5hgDwts.js → index-DmEjP2AP.js} +1 -1
- package/web/assets/{index-DpZcQOqI.js → index-fWVyTiSX.js} +1 -1
- package/web/assets/{index-D0UkSEon.js → index-hElc3lLb.js} +1 -1
- package/web/assets/{index-i-F6wQDa.js → index-kMdLDVpb.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/index-DFJbTCVa.js +0 -129
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BybHqs37.js","./index-DRMnPfA3.js","./index-C2nhZ-ID.js","./index-BHot-lnj.js","./index-891wE-Rj.js","./index-Bm6PUpXb.js","./index-BorlqgNX.js","./index-BxcnR7Nj.js","./index-ChKrBnaf.js","./index-BBkJ4cEk.js","./index-Clyg5z5Z.js","./index-VSDVirVT.js","./index-C-8irjwh.js","./index-BC8gj6P7.js","./index-D0UkSEon.js","./index-zDoB4KM7.js","./index-B5hgDwts.js","./index-DpZcQOqI.js","./index-i-F6wQDa.js","./index-DZXdWq9L.js","./index-KEWrG50i.js","./codemirror-02hKfv-c.js","./xterm-D6Mng-DB.js","./_commonjsHelpers-CqkleIqs.js","./addon-fit-CevVMrUA.js","./addon-web-links-CnB65OV_.js","./xterm-DYP7pi_n.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var N0=Object.defineProperty;var Ig=s=>{throw TypeError(s)};var T0=(s,l,i)=>l in s?N0(s,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[l]=i;var wt=(s,l,i)=>T0(s,typeof l!="symbol"?l+"":l,i),Bd=(s,l,i)=>l.has(s)||Ig("Cannot "+i);var Ue=(s,l,i)=>(Bd(s,l,"read from private field"),i?i.call(s):l.get(s)),$t=(s,l,i)=>l.has(s)?Ig("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(s):l.set(s,i),ft=(s,l,i,r)=>(Bd(s,l,"write to private field"),r?r.call(s,i):l.set(s,i),i),un=(s,l,i)=>(Bd(s,l,"access private method"),i);(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=i(o);fetch(o.href,d)}})();var qd={exports:{}},vc={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Xg;function E0(){if(Xg)return vc;Xg=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var g in o)g!=="key"&&(d[g]=o[g])}else d=o;return o=d.ref,{$$typeof:s,type:r,key:h,ref:o!==void 0?o:null,props:d}}return vc.Fragment=l,vc.jsx=i,vc.jsxs=i,vc}var Vg;function A0(){return Vg||(Vg=1,qd.exports=E0()),qd.exports}var c=A0(),Gd={exports:{}},Ie={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Qg;function C0(){if(Qg)return Ie;Qg=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),_=Symbol.iterator;function C(j){return j===null||typeof j!="object"?null:(j=_&&j[_]||j["@@iterator"],typeof j=="function"?j:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,B={};function K(j,V,ce){this.props=j,this.context=V,this.refs=B,this.updater=ce||N}K.prototype.isReactComponent={},K.prototype.setState=function(j,V){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,V,"setState")},K.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function O(){}O.prototype=K.prototype;function $(j,V,ce){this.props=j,this.context=V,this.refs=B,this.updater=ce||N}var A=$.prototype=new O;A.constructor=$,H(A,K.prototype),A.isPureReactComponent=!0;var Q=Array.isArray;function L(){}var M={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function re(j,V,ce){var oe=ce.ref;return{$$typeof:s,type:j,key:V,ref:oe!==void 0?oe:null,props:ce}}function he(j,V){return re(j.type,V,j.props)}function F(j){return typeof j=="object"&&j!==null&&j.$$typeof===s}function ae(j){var V={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ce){return V[ce]})}var me=/\/+/g;function Ne(j,V){return typeof j=="object"&&j!==null&&j.key!=null?ae(""+j.key):V.toString(36)}function pe(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(L,L):(j.status="pending",j.then(function(V){j.status==="pending"&&(j.status="fulfilled",j.value=V)},function(V){j.status==="pending"&&(j.status="rejected",j.reason=V)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function z(j,V,ce,oe,ve){var Te=typeof j;(Te==="undefined"||Te==="boolean")&&(j=null);var Re=!1;if(j===null)Re=!0;else switch(Te){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(j.$$typeof){case s:case l:Re=!0;break;case x:return Re=j._init,z(Re(j._payload),V,ce,oe,ve)}}if(Re)return ve=ve(j),Re=oe===""?"."+Ne(j,0):oe,Q(ve)?(ce="",Re!=null&&(ce=Re.replace(me,"$&/")+"/"),z(ve,V,ce,"",function(st){return st})):ve!=null&&(F(ve)&&(ve=he(ve,ce+(ve.key==null||j&&j.key===ve.key?"":(""+ve.key).replace(me,"$&/")+"/")+Re)),V.push(ve)),1;Re=0;var it=oe===""?".":oe+":";if(Q(j))for(var Ze=0;Ze<j.length;Ze++)oe=j[Ze],Te=it+Ne(oe,Ze),Re+=z(oe,V,ce,Te,ve);else if(Ze=C(j),typeof Ze=="function")for(j=Ze.call(j),Ze=0;!(oe=j.next()).done;)oe=oe.value,Te=it+Ne(oe,Ze++),Re+=z(oe,V,ce,Te,ve);else if(Te==="object"){if(typeof j.then=="function")return z(pe(j),V,ce,oe,ve);throw V=String(j),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Re}function P(j,V,ce){if(j==null)return j;var oe=[],ve=0;return z(j,oe,"","",function(Te){return V.call(ce,Te,ve++)}),oe}function te(j){if(j._status===-1){var V=j._result;V=V(),V.then(function(ce){(j._status===0||j._status===-1)&&(j._status=1,j._result=ce)},function(ce){(j._status===0||j._status===-1)&&(j._status=2,j._result=ce)}),j._status===-1&&(j._status=0,j._result=V)}if(j._status===1)return j._result.default;throw j._result}var xe=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},we={map:P,forEach:function(j,V,ce){P(j,function(){V.apply(this,arguments)},ce)},count:function(j){var V=0;return P(j,function(){V++}),V},toArray:function(j){return P(j,function(V){return V})||[]},only:function(j){if(!F(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Ie.Activity=k,Ie.Children=we,Ie.Component=K,Ie.Fragment=i,Ie.Profiler=o,Ie.PureComponent=$,Ie.StrictMode=r,Ie.Suspense=m,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(j){return M.H.useMemoCache(j)}},Ie.cache=function(j){return function(){return j.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(j,V,ce){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var oe=H({},j.props),ve=j.key;if(V!=null)for(Te in V.key!==void 0&&(ve=""+V.key),V)!W.call(V,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&V.ref===void 0||(oe[Te]=V[Te]);var Te=arguments.length-2;if(Te===1)oe.children=ce;else if(1<Te){for(var Re=Array(Te),it=0;it<Te;it++)Re[it]=arguments[it+2];oe.children=Re}return re(j.type,ve,oe)},Ie.createContext=function(j){return j={$$typeof:h,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:d,_context:j},j},Ie.createElement=function(j,V,ce){var oe,ve={},Te=null;if(V!=null)for(oe in V.key!==void 0&&(Te=""+V.key),V)W.call(V,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(ve[oe]=V[oe]);var Re=arguments.length-2;if(Re===1)ve.children=ce;else if(1<Re){for(var it=Array(Re),Ze=0;Ze<Re;Ze++)it[Ze]=arguments[Ze+2];ve.children=it}if(j&&j.defaultProps)for(oe in Re=j.defaultProps,Re)ve[oe]===void 0&&(ve[oe]=Re[oe]);return re(j,Te,ve)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(j){return{$$typeof:g,render:j}},Ie.isValidElement=F,Ie.lazy=function(j){return{$$typeof:x,_payload:{_status:-1,_result:j},_init:te}},Ie.memo=function(j,V){return{$$typeof:b,type:j,compare:V===void 0?null:V}},Ie.startTransition=function(j){var V=M.T,ce={};M.T=ce;try{var oe=j(),ve=M.S;ve!==null&&ve(ce,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(L,xe)}catch(Te){xe(Te)}finally{V!==null&&ce.types!==null&&(V.types=ce.types),M.T=V}},Ie.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ie.use=function(j){return M.H.use(j)},Ie.useActionState=function(j,V,ce){return M.H.useActionState(j,V,ce)},Ie.useCallback=function(j,V){return M.H.useCallback(j,V)},Ie.useContext=function(j){return M.H.useContext(j)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(j,V){return M.H.useDeferredValue(j,V)},Ie.useEffect=function(j,V){return M.H.useEffect(j,V)},Ie.useEffectEvent=function(j){return M.H.useEffectEvent(j)},Ie.useId=function(){return M.H.useId()},Ie.useImperativeHandle=function(j,V,ce){return M.H.useImperativeHandle(j,V,ce)},Ie.useInsertionEffect=function(j,V){return M.H.useInsertionEffect(j,V)},Ie.useLayoutEffect=function(j,V){return M.H.useLayoutEffect(j,V)},Ie.useMemo=function(j,V){return M.H.useMemo(j,V)},Ie.useOptimistic=function(j,V){return M.H.useOptimistic(j,V)},Ie.useReducer=function(j,V,ce){return M.H.useReducer(j,V,ce)},Ie.useRef=function(j){return M.H.useRef(j)},Ie.useState=function(j){return M.H.useState(j)},Ie.useSyncExternalStore=function(j,V,ce){return M.H.useSyncExternalStore(j,V,ce)},Ie.useTransition=function(){return M.H.useTransition()},Ie.version="19.2.8",Ie}var $g;function kh(){return $g||($g=1,Gd.exports=C0()),Gd.exports}var S=kh(),Yd={exports:{}},Sc={},Id={exports:{}},Xd={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Zg;function R0(){return Zg||(Zg=1,(function(s){function l(z,P){var te=z.length;z.push(P);e:for(;0<te;){var xe=te-1>>>1,we=z[xe];if(0<o(we,P))z[xe]=P,z[te]=we,te=xe;else break e}}function i(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var P=z[0],te=z.pop();if(te!==P){z[0]=te;e:for(var xe=0,we=z.length,j=we>>>1;xe<j;){var V=2*(xe+1)-1,ce=z[V],oe=V+1,ve=z[oe];if(0>o(ce,te))oe<we&&0>o(ve,ce)?(z[xe]=ve,z[oe]=te,xe=oe):(z[xe]=ce,z[V]=te,xe=V);else if(oe<we&&0>o(ve,te))z[xe]=ve,z[oe]=te,xe=oe;else break e}}return P}function o(z,P){var te=z.sortIndex-P.sortIndex;return te!==0?te:z.id-P.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;s.unstable_now=function(){return d.now()}}else{var h=Date,g=h.now();s.unstable_now=function(){return h.now()-g}}var m=[],b=[],x=1,k=null,_=3,C=!1,N=!1,H=!1,B=!1,K=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function A(z){for(var P=i(b);P!==null;){if(P.callback===null)r(b);else if(P.startTime<=z)r(b),P.sortIndex=P.expirationTime,l(m,P);else break;P=i(b)}}function Q(z){if(H=!1,A(z),!N)if(i(m)!==null)N=!0,L||(L=!0,ae());else{var P=i(b);P!==null&&pe(Q,P.startTime-z)}}var L=!1,M=-1,W=5,re=-1;function he(){return B?!0:!(s.unstable_now()-re<W)}function F(){if(B=!1,L){var z=s.unstable_now();re=z;var P=!0;try{e:{N=!1,H&&(H=!1,O(M),M=-1),C=!0;var te=_;try{t:{for(A(z),k=i(m);k!==null&&!(k.expirationTime>z&&he());){var xe=k.callback;if(typeof xe=="function"){k.callback=null,_=k.priorityLevel;var we=xe(k.expirationTime<=z);if(z=s.unstable_now(),typeof we=="function"){k.callback=we,A(z),P=!0;break t}k===i(m)&&r(m),A(z)}else r(m);k=i(m)}if(k!==null)P=!0;else{var j=i(b);j!==null&&pe(Q,j.startTime-z),P=!1}}break e}finally{k=null,_=te,C=!1}P=void 0}}finally{P?ae():L=!1}}}var ae;if(typeof $=="function")ae=function(){$(F)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,Ne=me.port2;me.port1.onmessage=F,ae=function(){Ne.postMessage(null)}}else ae=function(){K(F,0)};function pe(z,P){M=K(function(){z(s.unstable_now())},P)}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(z){z.callback=null},s.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<z?Math.floor(1e3/z):5},s.unstable_getCurrentPriorityLevel=function(){return _},s.unstable_next=function(z){switch(_){case 1:case 2:case 3:var P=3;break;default:P=_}var te=_;_=P;try{return z()}finally{_=te}},s.unstable_requestPaint=function(){B=!0},s.unstable_runWithPriority=function(z,P){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var te=_;_=z;try{return P()}finally{_=te}},s.unstable_scheduleCallback=function(z,P,te){var xe=s.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?xe+te:xe):te=xe,z){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=te+we,z={id:x++,callback:P,priorityLevel:z,startTime:te,expirationTime:we,sortIndex:-1},te>xe?(z.sortIndex=te,l(b,z),i(m)===null&&z===i(b)&&(H?(O(M),M=-1):H=!0,pe(Q,te-xe))):(z.sortIndex=we,l(m,z),N||C||(N=!0,L||(L=!0,ae()))),z},s.unstable_shouldYield=he,s.unstable_wrapCallback=function(z){var P=_;return function(){var te=_;_=P;try{return z.apply(this,arguments)}finally{_=te}}}})(Xd)),Xd}var Kg;function M0(){return Kg||(Kg=1,Id.exports=R0()),Id.exports}var Vd={exports:{}},Bn={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var Jg;function O0(){if(Jg)return Bn;Jg=1;var s=kh();function l(m){var b="https://react.dev/errors/"+m;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)b+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function d(m,b,x){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:k==null?null:""+k,children:m,containerInfo:b,implementation:x}}var h=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(m,b){if(m==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return Bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Bn.createPortal=function(m,b){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(l(299));return d(m,b,null,x)},Bn.flushSync=function(m){var b=h.T,x=r.p;try{if(h.T=null,r.p=2,m)return m()}finally{h.T=b,r.p=x,r.d.f()}},Bn.preconnect=function(m,b){typeof m=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,r.d.C(m,b))},Bn.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},Bn.preinit=function(m,b){if(typeof m=="string"&&b&&typeof b.as=="string"){var x=b.as,k=g(x,b.crossOrigin),_=typeof b.integrity=="string"?b.integrity:void 0,C=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;x==="style"?r.d.S(m,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:k,integrity:_,fetchPriority:C}):x==="script"&&r.d.X(m,{crossOrigin:k,integrity:_,fetchPriority:C,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},Bn.preinitModule=function(m,b){if(typeof m=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var x=g(b.as,b.crossOrigin);r.d.M(m,{crossOrigin:x,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&r.d.M(m)},Bn.preload=function(m,b){if(typeof m=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var x=b.as,k=g(x,b.crossOrigin);r.d.L(m,x,{crossOrigin:k,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},Bn.preloadModule=function(m,b){if(typeof m=="string")if(b){var x=g(b.as,b.crossOrigin);r.d.m(m,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:x,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else r.d.m(m)},Bn.requestFormReset=function(m){r.d.r(m)},Bn.unstable_batchedUpdates=function(m,b){return m(b)},Bn.useFormState=function(m,b,x){return h.H.useFormState(m,b,x)},Bn.useFormStatus=function(){return h.H.useHostTransitionStatus()},Bn.version="19.2.8",Bn}var Fg;function D0(){if(Fg)return Vd.exports;Fg=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(l){console.error(l)}}return s(),Vd.exports=O0(),Vd.exports}/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-dom-client.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var Wg;function z0(){if(Wg)return Sc;Wg=1;var s=M0(),l=kh(),i=D0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(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 h(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 g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(d(e)!==e)throw Error(r(188))}function b(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,a=t;;){var u=n.return;if(u===null)break;var f=u.alternate;if(f===null){if(a=u.return,a!==null){n=a;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===n)return m(u),e;if(f===a)return m(u),t;f=f.sibling}throw Error(r(188))}if(n.return!==a.return)n=u,a=f;else{for(var p=!1,v=u.child;v;){if(v===n){p=!0,n=u,a=f;break}if(v===a){p=!0,a=u,n=f;break}v=v.sibling}if(!p){for(v=f.child;v;){if(v===n){p=!0,n=f,a=u;break}if(v===a){p=!0,a=f,n=u;break}v=v.sibling}if(!p)throw Error(r(189))}}if(n.alternate!==a)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var k=Object.assign,_=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),$=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),he=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function Ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case K:return"Profiler";case B:return"StrictMode";case Q:return"Suspense";case L:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case $:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case M:return t=e.displayName||null,t!==null?t:Ne(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return Ne(e(t))}catch{}}return null}var pe=Array.isArray,z=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},xe=[],we=-1;function j(e){return{current:e}}function V(e){0>we||(e.current=xe[we],xe[we]=null,we--)}function ce(e,t){we++,xe[we]=e.current,e.current=t}var oe=j(null),ve=j(null),Te=j(null),Re=j(null);function it(e,t){switch(ce(Te,t),ce(ve,e),ce(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dg(t),e=hg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(oe),ce(oe,e)}function Ze(){V(oe),V(ve),V(Te)}function st(e){e.memoizedState!==null&&ce(Re,e);var t=oe.current,n=hg(t,e.type);t!==n&&(ce(ve,e),ce(oe,n))}function He(e){ve.current===e&&(V(oe),V(ve)),Re.current===e&&(V(Re),yc._currentValue=te)}var Ct,Je;function Ke(e){if(Ct===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ct=t&&t[1]||"",Je=-1<n.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+Ct+e+Je}var Fe=!1;function dt(e,t){if(!e||Fe)return"";Fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(Z){var X=Z}Reflect.construct(e,[],le)}else{try{le.call()}catch(Z){X=Z}e.call(le.prototype)}}else{try{throw Error()}catch(Z){X=Z}(le=e())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(Z){if(Z&&X&&typeof Z.stack=="string")return[Z.stack,X.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=a.DetermineComponentFrameRoot(),p=f[0],v=f[1];if(p&&v){var E=p.split(`
|
|
45
|
-
`),Y=v.split(`
|
|
46
|
-
`);for(u=a=0;a<E.length&&!E[a].includes("DetermineComponentFrameRoot");)a++;for(;u<Y.length&&!Y[u].includes("DetermineComponentFrameRoot");)u++;if(a===E.length||u===Y.length)for(a=E.length-1,u=Y.length-1;1<=a&&0<=u&&E[a]!==Y[u];)u--;for(;1<=a&&0<=u;a--,u--)if(E[a]!==Y[u]){if(a!==1||u!==1)do if(a--,u--,0>u||E[a]!==Y[u]){var ee=`
|
|
47
|
-
`+E[a].replace(" at new "," at ");return e.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",e.displayName)),ee}while(1<=a&&0<=u);break}}}finally{Fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ke(n):""}function Wn(e,t){switch(e.tag){case 26:case 27:case 5:return Ke(e.type);case 16:return Ke("Lazy");case 13:return e.child!==t&&t!==null?Ke("Suspense Fallback"):Ke("Suspense");case 19:return Ke("SuspenseList");case 0:case 15:return dt(e.type,!1);case 11:return dt(e.type.render,!1);case 1:return dt(e.type,!0);case 31:return Ke("Activity");default:return""}}function Bt(e){try{var t="",n=null;do t+=Wn(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
48
|
-
Error generating stack: `+a.message+`
|
|
49
|
-
`+a.stack}}var Tn=Object.prototype.hasOwnProperty,bn=s.unstable_scheduleCallback,fn=s.unstable_cancelCallback,Un=s.unstable_shouldYield,Zt=s.unstable_requestPaint,ut=s.unstable_now,dn=s.unstable_getCurrentPriorityLevel,J=s.unstable_ImmediatePriority,fe=s.unstable_UserBlockingPriority,Ee=s.unstable_NormalPriority,Qe=s.unstable_LowPriority,Tt=s.unstable_IdlePriority,Et=s.log,xn=s.unstable_setDisableYieldValue,en=null,qt=null;function En(e){if(typeof Et=="function"&&xn(e),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(en,e)}catch{}}var pt=Math.clz32?Math.clz32:I,_n=Math.log,T=Math.LN2;function I(e){return e>>>=0,e===0?32:31-(_n(e)/T|0)|0}var _e=256,Me=262144,Le=4194304;function An(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Gl(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var u=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var v=a&134217727;return v!==0?(a=v&~f,a!==0?u=An(a):(p&=v,p!==0?u=An(p):n||(n=v&~e,n!==0&&(u=An(n))))):(v=a&~f,v!==0?u=An(v):p!==0?u=An(p):n||(n=a&~e,n!==0&&(u=An(n)))),u===0?0:t!==0&&t!==u&&(t&f)===0&&(f=u&-u,n=t&-t,f>=n||f===32&&(n&4194048)!==0)?t:u}function Yn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Hn(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hn(){var e=Le;return Le<<=1,(Le&62914560)===0&&(Le=4194304),e}function Gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Tl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ka(e,t,n,a,u,f){var p=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var v=e.entanglements,E=e.expirationTimes,Y=e.hiddenUpdates;for(n=p&~n;0<n;){var ee=31-pt(n),le=1<<ee;v[ee]=0,E[ee]=-1;var X=Y[ee];if(X!==null)for(Y[ee]=null,ee=0;ee<X.length;ee++){var Z=X[ee];Z!==null&&(Z.lane&=-536870913)}n&=~le}a!==0&&wa(e,a,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~t))}function wa(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-pt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function Ys(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-pt(n),u=1<<a;u&t|e[a]&t&&(e[a]|=t),n&=~u}}function Yl(e,t){var n=t&-t;return n=(n&42)!==0?1:Pa(n),(n&(e.suspendedLanes|t))!==0?0:n}function Pa(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Il(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ja(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Lg(e.type))}function fl(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Yt=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Yt,Be="__reactProps$"+Yt,pn="__reactContainer$"+Yt,ta="__reactEvents$"+Yt,Na="__reactListeners$"+Yt,dl="__reactHandles$"+Yt,In="__reactResources$"+Yt,hl="__reactMarker$"+Yt;function pl(e){delete e[Rt],delete e[Be],delete e[ta],delete e[Na],delete e[dl]}function na(e){var t=e[Rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[Rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_g(e);e!==null;){if(n=e[Rt])return n;e=_g(e)}return t}e=n,n=e.parentNode}return null}function Cn(e){if(e=e[Rt]||e[pn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ml(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function tn(e){var t=e[In];return t||(t=e[In]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[hl]=!0}var Xn=new Set,Ti={};function Vn(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(Ti[e]=t,e=0;e<t.length;e++)Xn.add(t[e])}var Is=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),la={},aa={};function yl(e){return Tn.call(aa,e)?!0:Tn.call(la,e)?!1:Is.test(e)?aa[e]=!0:(la[e]=!0,!1)}function Qn(e,t,n){if(yl(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function bl(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function mn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function _t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function es(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ei(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(p){n=""+p,f.call(this,p)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xl(e){if(!e._valueTracker){var t=es(e)?"checked":"value";e._valueTracker=Ei(e,t,""+e[t])}}function El(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=es(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function sa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ta=/[\n"\\]/g;function nn(e){return e.replace(Ta,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xs(e,t,n,a,u,f,p,v){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+_t(t)):e.value!==""+_t(t)&&(e.value=""+_t(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?xl(e,p,_t(t)):n!=null?xl(e,p,_t(n)):a!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+_t(v):e.removeAttribute("name")}function ia(e,t,n,a,u,f,p,v){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||n!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){Xl(e);return}n=n!=null?""+_t(n):"",t=t!=null?""+_t(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}a=a??u,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=v?e.checked:!!a,e.defaultChecked=!!a,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),Xl(e)}function xl(e,t,n){t==="number"&&sa(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Pn(e,t,n,a){if(e=e.options,t){t={};for(var u=0;u<n.length;u++)t["$"+n[u]]=!0;for(n=0;n<e.length;n++)u=t.hasOwnProperty("$"+e[n].value),e[n].selected!==u&&(e[n].selected=u),u&&a&&(e[n].defaultSelected=!0)}else{for(n=""+_t(n),t=null,u=0;u<e.length;u++){if(e[u].value===n){e[u].selected=!0,a&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function ue(e,t,n){if(t!=null&&(t=""+_t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+_t(n):""}function w(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(r(92));if(pe(a)){if(1<a.length)throw Error(r(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=_t(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Xl(e)}function U(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var se=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Se(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||se.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ce(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var u in t)a=t[u],t.hasOwnProperty(u)&&n[u]!==a&&Se(e,u,a)}else for(var f in t)t.hasOwnProperty(f)&&Se(e,f,t[f])}function De(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Qt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function gn(e){return Qt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function gt(){}var Mt=null;function It(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Al=null,el=null;function ts(e){var t=Cn(e);if(t&&(e=t.stateNode)){var n=e[Be]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xs(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+nn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var u=a[Be]||null;if(!u)throw Error(r(90));Xs(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&El(a)}break e;case"textarea":ue(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Pn(e,!!n.multiple,t,!1)}}}var At=!1;function Ai(e,t,n){if(At)return e(t,n);At=!0;try{var a=e(t);return a}finally{if(At=!1,(Al!==null||el!==null)&&(Uu(),Al&&(t=Al,e=el,el=Al=null,ts(t),e)))for(t=0;t<e.length;t++)ts(e[t])}}function Vs(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Be]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Vl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ci=!1;if(Vl)try{var ra={};Object.defineProperty(ra,"passive",{get:function(){Ci=!0}}),window.addEventListener("test",ra,ra),window.removeEventListener("test",ra,ra)}catch{Ci=!1}var Xt=null,vn=null,Qs=null;function Cl(){if(Qs)return Qs;var e,t=vn,n=t.length,a,u="value"in Xt?Xt.value:Xt.textContent,f=u.length;for(e=0;e<n&&t[e]===u[e];e++);var p=n-e;for(a=1;a<=p&&t[n-a]===u[f-a];a++);return Qs=u.slice(e,1<a?1-a:void 0)}function $s(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 Ea(){return!0}function Zs(){return!1}function ln(e){function t(n,a,u,f,p){this._reactName=n,this._targetInst=u,this.type=a,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(f):f[v]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ea:Zs,this.isPropagationStopped=Zs,this}return k(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=Ea)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ea)},persist:function(){},isPersistent:Ea}),t}var $n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ks=ln($n),Ql=k({},$n,{view:0,detail:0}),Ri=ln(Ql),Aa,Ca,ns,Mi=k({},Ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rr,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!==ns&&(ns&&e.type==="mousemove"?(Aa=e.screenX-ns.screenX,Ca=e.screenY-ns.screenY):Ca=Aa=0,ns=e),Aa)},movementY:function(e){return"movementY"in e?e.movementY:Ca}}),ie=ln(Mi),ls=k({},Mi,{dataTransfer:0}),Er=ln(ls),Do=k({},Ql,{relatedTarget:0}),Ar=ln(Do),zo=k({},$n,{animationName:0,elapsedTime:0,pseudoElement:0}),ye=ln(zo),Cr=k({},$n,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lo=ln(Cr),Uo=k({},$n,{data:0}),Hc=ln(Uo),Ho={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bo={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"},Js={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Js[e])?!!t[e]:!1}function Rr(){return qo}var Go=k({},Ql,{key:function(e){if(e.key){var t=Ho[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rr,charCode:function(e){return e.type==="keypress"?$s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Bc=ln(Go),Yo=k({},Mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qc=ln(Yo),Mr=k({},Ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rr}),Gc=ln(Mr),Yc=k({},$n,{propertyName:0,elapsedTime:0,pseudoElement:0}),Io=ln(Yc),Ic=k({},Mi,{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}),Or=ln(Ic),Xo=k({},$n,{newState:0,oldState:0}),Vo=ln(Xo),Qo=[9,13,27,32],Dr=Vl&&"CompositionEvent"in window,$l=null;Vl&&"documentMode"in document&&($l=document.documentMode);var Xc=Vl&&"TextEvent"in window&&!$l,Vc=Vl&&(!Dr||$l&&8<$l&&11>=$l),zr=" ",Qc=!1;function $c(e,t){switch(e){case"keyup":return Qo.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var as=!1;function Kc(e,t){switch(e){case"compositionend":return Zc(t);case"keypress":return t.which!==32?null:(Qc=!0,zr);case"textInput":return e=t.data,e===zr&&Qc?null:e;default:return null}}function $o(e,t){if(as)return e==="compositionend"||!Dr&&$c(e,t)?(e=Cl(),Qs=vn=Xt=null,as=!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 Vc&&t.locale!=="ko"?null:t.data;default:return null}}var Zo={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 Jc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zo[e.type]:t==="textarea"}function Fc(e,t,n,a){Al?el?el.push(a):el=[a]:Al=a,t=Xu(t,"onChange"),0<t.length&&(n=new Ks("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Ra=null,Ma=null;function Oi(e){ig(e,0)}function Di(e){var t=ml(e);if(El(t))return e}function Wc(e,t){if(e==="change")return t}var Pc=!1;if(Vl){var Lr;if(Vl){var Ur="oninput"in document;if(!Ur){var eu=document.createElement("div");eu.setAttribute("oninput","return;"),Ur=typeof eu.oninput=="function"}Lr=Ur}else Lr=!1;Pc=Lr&&(!document.documentMode||9<document.documentMode)}function tu(){Ra&&(Ra.detachEvent("onpropertychange",nu),Ma=Ra=null)}function nu(e){if(e.propertyName==="value"&&Di(Ma)){var t=[];Fc(t,Ma,e,It(e)),Ai(Oi,t)}}function Ko(e,t,n){e==="focusin"?(tu(),Ra=t,Ma=n,Ra.attachEvent("onpropertychange",nu)):e==="focusout"&&tu()}function Jo(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Di(Ma)}function Fo(e,t){if(e==="click")return Di(t)}function Wo(e,t){if(e==="input"||e==="change")return Di(t)}function Po(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zn=typeof Object.is=="function"?Object.is:Po;function ss(e,t){if(Zn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var u=n[a];if(!Tn.call(t,u)||!Zn(e[u],t[u]))return!1}return!0}function Hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fs(e,t){var n=Hr(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Hr(n)}}function tl(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tl(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nl(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=sa(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=sa(e.document)}return t}function Rl(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")}var Br=Vl&&"documentMode"in document&&11>=document.documentMode,Oa=null,is=null,rs=null,qr=!1;function cs(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Oa==null||Oa!==sa(a)||(a=Oa,"selectionStart"in a&&Rl(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),rs&&ss(rs,a)||(rs=a,a=Xu(is,"onSelect"),0<a.length&&(t=new Ks("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Oa)))}function ca(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var us={animationend:ca("Animation","AnimationEnd"),animationiteration:ca("Animation","AnimationIteration"),animationstart:ca("Animation","AnimationStart"),transitionrun:ca("Transition","TransitionRun"),transitionstart:ca("Transition","TransitionStart"),transitioncancel:ca("Transition","TransitionCancel"),transitionend:ca("Transition","TransitionEnd")},Ws={},lu={};Vl&&(lu=document.createElement("div").style,"AnimationEvent"in window||(delete us.animationend.animation,delete us.animationiteration.animation,delete us.animationstart.animation),"TransitionEvent"in window||delete us.transitionend.transition);function _l(e){if(Ws[e])return Ws[e];if(!us[e])return e;var t=us[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in lu)return Ws[e]=t[n];return e}var Da=_l("animationend"),Gr=_l("animationiteration"),Yr=_l("animationstart"),au=_l("transitionrun"),su=_l("transitionstart"),ef=_l("transitioncancel"),iu=_l("transitionend"),zi=new Map,Li="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Li.push("scrollEnd");function ll(e,t){zi.set(e,t),Vn(t,[e])}var y=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},q=[],de=0,qe=0;function Ot(){for(var e=de,t=qe=de=0;t<e;){var n=q[t];q[t++]=null;var a=q[t];q[t++]=null;var u=q[t];q[t++]=null;var f=q[t];if(q[t++]=null,a!==null&&u!==null){var p=a.pending;p===null?u.next=u:(u.next=p.next,p.next=u),a.pending=u}f!==0&&Ge(n,u,f)}}function Sn(e,t,n,a){q[de++]=e,q[de++]=t,q[de++]=n,q[de++]=a,qe|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Kn(e,t,n,a){return Sn(e,t,n,a),Ye(e)}function je(e,t){return Sn(e,null,null,t),Ye(e)}function Ge(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var u=!1,f=e.return;f!==null;)f.childLanes|=n,a=f.alternate,a!==null&&(a.childLanes|=n),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&t!==null&&(u=31-pt(n),e=f.hiddenUpdates,a=e[u],a===null?e[u]=[t]:a.push(t),t.lane=n|536870912),f):null}function Ye(e){if(50<oc)throw oc=0,ud=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yt={};function kn(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,t,n,a){return new kn(e,t,n,a)}function Ps(e){return e=e.prototype,!(!e||!e.isReactComponent)}function za(e,t){var n=e.alternate;return n===null?(n=Ft(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&65011712,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.refCleanup=e.refCleanup,n}function Yh(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ru(e,t,n,a,u,f){var p=0;if(a=e,typeof e=="function")Ps(e)&&(p=1);else if(typeof e=="string")p=p0(e,n,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=Ft(31,n,t,u),e.elementType=re,e.lanes=f,e;case H:return ei(n.children,u,f,t);case B:p=8,u|=24;break;case K:return e=Ft(12,n,t,u|2),e.elementType=K,e.lanes=f,e;case Q:return e=Ft(13,n,t,u),e.elementType=Q,e.lanes=f,e;case L:return e=Ft(19,n,t,u),e.elementType=L,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:p=10;break e;case O:p=9;break e;case A:p=11;break e;case M:p=14;break e;case W:p=16,a=null;break e}p=29,n=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Ft(p,n,t,u),t.elementType=e,t.type=a,t.lanes=f,t}function ei(e,t,n,a){return e=Ft(7,e,a,t),e.lanes=n,e}function tf(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function Ih(e){var t=Ft(18,null,null,0);return t.stateNode=e,t}function nf(e,t,n){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xh=new WeakMap;function Ml(e,t){if(typeof e=="object"&&e!==null){var n=Xh.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Bt(t)},Xh.set(e,t),t)}return{value:e,source:t,stack:Bt(t)}}var Ui=[],Hi=0,cu=null,Ir=0,Ol=[],Dl=0,os=null,ua=1,oa="";function La(e,t){Ui[Hi++]=Ir,Ui[Hi++]=cu,cu=e,Ir=t}function Vh(e,t,n){Ol[Dl++]=ua,Ol[Dl++]=oa,Ol[Dl++]=os,os=e;var a=ua;e=oa;var u=32-pt(a)-1;a&=~(1<<u),n+=1;var f=32-pt(t)+u;if(30<f){var p=u-u%5;f=(a&(1<<p)-1).toString(32),a>>=p,u-=p,ua=1<<32-pt(t)+u|n<<u|a,oa=f+e}else ua=1<<f|n<<u|a,oa=e}function lf(e){e.return!==null&&(La(e,1),Vh(e,1,0))}function af(e){for(;e===cu;)cu=Ui[--Hi],Ui[Hi]=null,Ir=Ui[--Hi],Ui[Hi]=null;for(;e===os;)os=Ol[--Dl],Ol[Dl]=null,oa=Ol[--Dl],Ol[Dl]=null,ua=Ol[--Dl],Ol[Dl]=null}function Qh(e,t){Ol[Dl++]=ua,Ol[Dl++]=oa,Ol[Dl++]=os,ua=t.id,oa=t.overflow,os=e}var Rn=null,Dt=null,nt=!1,fs=null,zl=!1,sf=Error(r(519));function ds(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xr(Ml(t,e)),sf}function $h(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Rt]=e,t[Be]=a,n){case"dialog":Pe("cancel",t),Pe("close",t);break;case"iframe":case"object":case"embed":Pe("load",t);break;case"video":case"audio":for(n=0;n<dc.length;n++)Pe(dc[n],t);break;case"source":Pe("error",t);break;case"img":case"image":case"link":Pe("error",t),Pe("load",t);break;case"details":Pe("toggle",t);break;case"input":Pe("invalid",t),ia(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),w(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||og(t.textContent,n)?(a.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),a.onScroll!=null&&Pe("scroll",t),a.onScrollEnd!=null&&Pe("scrollend",t),a.onClick!=null&&(t.onclick=gt),t=!0):t=!1,t||ds(e,!0)}function Zh(e){for(Rn=e.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:zl=!1;return;case 27:case 3:zl=!0;return;default:Rn=Rn.return}}function Bi(e){if(e!==Rn)return!1;if(!nt)return Zh(e),nt=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||wd(e.type,e.memoizedProps)),n=!n),n&&Dt&&ds(e),Zh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Dt=xg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Dt=xg(e)}else t===27?(t=Dt,Ns(e.type)?(e=Ad,Ad=null,Dt=e):Dt=t):Dt=Rn?Ul(e.stateNode.nextSibling):null;return!0}function ti(){Dt=Rn=null,nt=!1}function rf(){var e=fs;return e!==null&&(rl===null?rl=e:rl.push.apply(rl,e),fs=null),e}function Xr(e){fs===null?fs=[e]:fs.push(e)}var cf=j(null),ni=null,Ua=null;function hs(e,t,n){ce(cf,t._currentValue),t._currentValue=n}function Ha(e){e._currentValue=cf.current,V(cf)}function uf(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function of(e,t,n,a){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var p=u.child;f=f.firstContext;e:for(;f!==null;){var v=f;f=u;for(var E=0;E<t.length;E++)if(v.context===t[E]){f.lanes|=n,v=f.alternate,v!==null&&(v.lanes|=n),uf(f.return,n,e),a||(p=null);break e}f=v.next}}else if(u.tag===18){if(p=u.return,p===null)throw Error(r(341));p.lanes|=n,f=p.alternate,f!==null&&(f.lanes|=n),uf(p,n,e),p=null}else p=u.child;if(p!==null)p.return=u;else for(p=u;p!==null;){if(p===e){p=null;break}if(u=p.sibling,u!==null){u.return=p.return,p=u;break}p=p.return}u=p}}function qi(e,t,n,a){e=null;for(var u=t,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var p=u.alternate;if(p===null)throw Error(r(387));if(p=p.memoizedProps,p!==null){var v=u.type;Zn(u.pendingProps.value,p.value)||(e!==null?e.push(v):e=[v])}}else if(u===Re.current){if(p=u.alternate,p===null)throw Error(r(387));p.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(yc):e=[yc])}u=u.return}e!==null&&of(t,e,n,a),t.flags|=262144}function uu(e){for(e=e.firstContext;e!==null;){if(!Zn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function li(e){ni=e,Ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mn(e){return Kh(ni,e)}function ou(e,t){return ni===null&&li(e),Kh(e,t)}function Kh(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ua===null){if(e===null)throw Error(r(308));Ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ua=Ua.next=t;return n}var ox=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},fx=s.unstable_scheduleCallback,dx=s.unstable_NormalPriority,an={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ff(){return{controller:new ox,data:new Map,refCount:0}}function Vr(e){e.refCount--,e.refCount===0&&fx(dx,function(){e.controller.abort()})}var Qr=null,df=0,Gi=0,Yi=null;function hx(e,t){if(Qr===null){var n=Qr=[];df=0,Gi=md(),Yi={status:"pending",value:void 0,then:function(a){n.push(a)}}}return df++,t.then(Jh,Jh),t}function Jh(){if(--df===0&&Qr!==null){Yi!==null&&(Yi.status="fulfilled");var e=Qr;Qr=null,Gi=0,Yi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function px(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(u){n.push(u)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var u=0;u<n.length;u++)(0,n[u])(t)},function(u){for(a.status="rejected",a.reason=u,u=0;u<n.length;u++)(0,n[u])(void 0)}),a}var Fh=z.S;z.S=function(e,t){Dm=ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&hx(e,t),Fh!==null&&Fh(e,t)};var ai=j(null);function hf(){var e=ai.current;return e!==null?e:Nt.pooledCache}function fu(e,t){t===null?ce(ai,ai.current):ce(ai,t.pool)}function Wh(){var e=hf();return e===null?null:{parent:an._currentValue,pool:e}}var Ii=Error(r(460)),pf=Error(r(474)),du=Error(r(542)),hu={then:function(){}};function Ph(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ep(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gt,gt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,np(e),e;default:if(typeof t.status=="string")t.then(gt,gt);else{if(e=Nt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=a}},function(a){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,np(e),e}throw ii=t,Ii}}function si(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ii=n,Ii):n}}var ii=null;function tp(){if(ii===null)throw Error(r(459));var e=ii;return ii=null,e}function np(e){if(e===Ii||e===du)throw Error(r(483))}var Xi=null,$r=0;function pu(e){var t=$r;return $r+=1,Xi===null&&(Xi=[]),ep(Xi,e,t)}function Zr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function mu(e,t){throw t.$$typeof===_?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lp(e){function t(D,R){if(e){var G=D.deletions;G===null?(D.deletions=[R],D.flags|=16):G.push(R)}}function n(D,R){if(!e)return null;for(;R!==null;)t(D,R),R=R.sibling;return null}function a(D){for(var R=new Map;D!==null;)D.key!==null?R.set(D.key,D):R.set(D.index,D),D=D.sibling;return R}function u(D,R){return D=za(D,R),D.index=0,D.sibling=null,D}function f(D,R,G){return D.index=G,e?(G=D.alternate,G!==null?(G=G.index,G<R?(D.flags|=67108866,R):G):(D.flags|=67108866,R)):(D.flags|=1048576,R)}function p(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function v(D,R,G,ne){return R===null||R.tag!==6?(R=tf(G,D.mode,ne),R.return=D,R):(R=u(R,G),R.return=D,R)}function E(D,R,G,ne){var Oe=G.type;return Oe===H?ee(D,R,G.props.children,ne,G.key):R!==null&&(R.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===W&&si(Oe)===R.type)?(R=u(R,G.props),Zr(R,G),R.return=D,R):(R=ru(G.type,G.key,G.props,null,D.mode,ne),Zr(R,G),R.return=D,R)}function Y(D,R,G,ne){return R===null||R.tag!==4||R.stateNode.containerInfo!==G.containerInfo||R.stateNode.implementation!==G.implementation?(R=nf(G,D.mode,ne),R.return=D,R):(R=u(R,G.children||[]),R.return=D,R)}function ee(D,R,G,ne,Oe){return R===null||R.tag!==7?(R=ei(G,D.mode,ne,Oe),R.return=D,R):(R=u(R,G),R.return=D,R)}function le(D,R,G){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=tf(""+R,D.mode,G),R.return=D,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case C:return G=ru(R.type,R.key,R.props,null,D.mode,G),Zr(G,R),G.return=D,G;case N:return R=nf(R,D.mode,G),R.return=D,R;case W:return R=si(R),le(D,R,G)}if(pe(R)||ae(R))return R=ei(R,D.mode,G,null),R.return=D,R;if(typeof R.then=="function")return le(D,pu(R),G);if(R.$$typeof===$)return le(D,ou(D,R),G);mu(D,R)}return null}function X(D,R,G,ne){var Oe=R!==null?R.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Oe!==null?null:v(D,R,""+G,ne);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case C:return G.key===Oe?E(D,R,G,ne):null;case N:return G.key===Oe?Y(D,R,G,ne):null;case W:return G=si(G),X(D,R,G,ne)}if(pe(G)||ae(G))return Oe!==null?null:ee(D,R,G,ne,null);if(typeof G.then=="function")return X(D,R,pu(G),ne);if(G.$$typeof===$)return X(D,R,ou(D,G),ne);mu(D,G)}return null}function Z(D,R,G,ne,Oe){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return D=D.get(G)||null,v(R,D,""+ne,Oe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case C:return D=D.get(ne.key===null?G:ne.key)||null,E(R,D,ne,Oe);case N:return D=D.get(ne.key===null?G:ne.key)||null,Y(R,D,ne,Oe);case W:return ne=si(ne),Z(D,R,G,ne,Oe)}if(pe(ne)||ae(ne))return D=D.get(G)||null,ee(R,D,ne,Oe,null);if(typeof ne.then=="function")return Z(D,R,G,pu(ne),Oe);if(ne.$$typeof===$)return Z(D,R,G,ou(R,ne),Oe);mu(R,ne)}return null}function ke(D,R,G,ne){for(var Oe=null,rt=null,Ae=R,$e=R=0,tt=null;Ae!==null&&$e<G.length;$e++){Ae.index>$e?(tt=Ae,Ae=null):tt=Ae.sibling;var ct=X(D,Ae,G[$e],ne);if(ct===null){Ae===null&&(Ae=tt);break}e&&Ae&&ct.alternate===null&&t(D,Ae),R=f(ct,R,$e),rt===null?Oe=ct:rt.sibling=ct,rt=ct,Ae=tt}if($e===G.length)return n(D,Ae),nt&&La(D,$e),Oe;if(Ae===null){for(;$e<G.length;$e++)Ae=le(D,G[$e],ne),Ae!==null&&(R=f(Ae,R,$e),rt===null?Oe=Ae:rt.sibling=Ae,rt=Ae);return nt&&La(D,$e),Oe}for(Ae=a(Ae);$e<G.length;$e++)tt=Z(Ae,D,$e,G[$e],ne),tt!==null&&(e&&tt.alternate!==null&&Ae.delete(tt.key===null?$e:tt.key),R=f(tt,R,$e),rt===null?Oe=tt:rt.sibling=tt,rt=tt);return e&&Ae.forEach(function(Rs){return t(D,Rs)}),nt&&La(D,$e),Oe}function ze(D,R,G,ne){if(G==null)throw Error(r(151));for(var Oe=null,rt=null,Ae=R,$e=R=0,tt=null,ct=G.next();Ae!==null&&!ct.done;$e++,ct=G.next()){Ae.index>$e?(tt=Ae,Ae=null):tt=Ae.sibling;var Rs=X(D,Ae,ct.value,ne);if(Rs===null){Ae===null&&(Ae=tt);break}e&&Ae&&Rs.alternate===null&&t(D,Ae),R=f(Rs,R,$e),rt===null?Oe=Rs:rt.sibling=Rs,rt=Rs,Ae=tt}if(ct.done)return n(D,Ae),nt&&La(D,$e),Oe;if(Ae===null){for(;!ct.done;$e++,ct=G.next())ct=le(D,ct.value,ne),ct!==null&&(R=f(ct,R,$e),rt===null?Oe=ct:rt.sibling=ct,rt=ct);return nt&&La(D,$e),Oe}for(Ae=a(Ae);!ct.done;$e++,ct=G.next())ct=Z(Ae,D,$e,ct.value,ne),ct!==null&&(e&&ct.alternate!==null&&Ae.delete(ct.key===null?$e:ct.key),R=f(ct,R,$e),rt===null?Oe=ct:rt.sibling=ct,rt=ct);return e&&Ae.forEach(function(j0){return t(D,j0)}),nt&&La(D,$e),Oe}function kt(D,R,G,ne){if(typeof G=="object"&&G!==null&&G.type===H&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case C:e:{for(var Oe=G.key;R!==null;){if(R.key===Oe){if(Oe=G.type,Oe===H){if(R.tag===7){n(D,R.sibling),ne=u(R,G.props.children),ne.return=D,D=ne;break e}}else if(R.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===W&&si(Oe)===R.type){n(D,R.sibling),ne=u(R,G.props),Zr(ne,G),ne.return=D,D=ne;break e}n(D,R);break}else t(D,R);R=R.sibling}G.type===H?(ne=ei(G.props.children,D.mode,ne,G.key),ne.return=D,D=ne):(ne=ru(G.type,G.key,G.props,null,D.mode,ne),Zr(ne,G),ne.return=D,D=ne)}return p(D);case N:e:{for(Oe=G.key;R!==null;){if(R.key===Oe)if(R.tag===4&&R.stateNode.containerInfo===G.containerInfo&&R.stateNode.implementation===G.implementation){n(D,R.sibling),ne=u(R,G.children||[]),ne.return=D,D=ne;break e}else{n(D,R);break}else t(D,R);R=R.sibling}ne=nf(G,D.mode,ne),ne.return=D,D=ne}return p(D);case W:return G=si(G),kt(D,R,G,ne)}if(pe(G))return ke(D,R,G,ne);if(ae(G)){if(Oe=ae(G),typeof Oe!="function")throw Error(r(150));return G=Oe.call(G),ze(D,R,G,ne)}if(typeof G.then=="function")return kt(D,R,pu(G),ne);if(G.$$typeof===$)return kt(D,R,ou(D,G),ne);mu(D,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,R!==null&&R.tag===6?(n(D,R.sibling),ne=u(R,G),ne.return=D,D=ne):(n(D,R),ne=tf(G,D.mode,ne),ne.return=D,D=ne),p(D)):n(D,R)}return function(D,R,G,ne){try{$r=0;var Oe=kt(D,R,G,ne);return Xi=null,Oe}catch(Ae){if(Ae===Ii||Ae===du)throw Ae;var rt=Ft(29,Ae,null,D.mode);return rt.lanes=ne,rt.return=D,rt}finally{}}}var ri=lp(!0),ap=lp(!1),ps=!1;function mf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ms(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function gs(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ot&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=Ye(e),Ge(e,null,n),t}return Sn(e,a,t,n),Ye(e)}function Kr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Ys(e,n)}}function yf(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var u=null,f=null;if(n=n.firstBaseUpdate,n!==null){do{var p={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};f===null?u=f=p:f=f.next=p,n=n.next}while(n!==null);f===null?u=f=t:f=f.next=t}else u=f=t;n={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var bf=!1;function Jr(){if(bf){var e=Yi;if(e!==null)throw e}}function Fr(e,t,n,a){bf=!1;var u=e.updateQueue;ps=!1;var f=u.firstBaseUpdate,p=u.lastBaseUpdate,v=u.shared.pending;if(v!==null){u.shared.pending=null;var E=v,Y=E.next;E.next=null,p===null?f=Y:p.next=Y,p=E;var ee=e.alternate;ee!==null&&(ee=ee.updateQueue,v=ee.lastBaseUpdate,v!==p&&(v===null?ee.firstBaseUpdate=Y:v.next=Y,ee.lastBaseUpdate=E))}if(f!==null){var le=u.baseState;p=0,ee=Y=E=null,v=f;do{var X=v.lane&-536870913,Z=X!==v.lane;if(Z?(et&X)===X:(a&X)===X){X!==0&&X===Gi&&(bf=!0),ee!==null&&(ee=ee.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ke=e,ze=v;X=t;var kt=n;switch(ze.tag){case 1:if(ke=ze.payload,typeof ke=="function"){le=ke.call(kt,le,X);break e}le=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=ze.payload,X=typeof ke=="function"?ke.call(kt,le,X):ke,X==null)break e;le=k({},le,X);break e;case 2:ps=!0}}X=v.callback,X!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[X]:Z.push(X))}else Z={lane:X,tag:v.tag,payload:v.payload,callback:v.callback,next:null},ee===null?(Y=ee=Z,E=le):ee=ee.next=Z,p|=X;if(v=v.next,v===null){if(v=u.shared.pending,v===null)break;Z=v,v=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);ee===null&&(E=le),u.baseState=E,u.firstBaseUpdate=Y,u.lastBaseUpdate=ee,f===null&&(u.shared.lanes=0),vs|=p,e.lanes=p,e.memoizedState=le}}function sp(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function ip(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)sp(n[e],t)}var Vi=j(null),gu=j(0);function rp(e,t){e=$a,ce(gu,e),ce(Vi,t),$a=e|t.baseLanes}function xf(){ce(gu,$a),ce(Vi,Vi.current)}function _f(){$a=gu.current,V(Vi),V(gu)}var vl=j(null),Ll=null;function ys(e){var t=e.alternate;ce(Wt,Wt.current&1),ce(vl,e),Ll===null&&(t===null||Vi.current!==null||t.memoizedState!==null)&&(Ll=e)}function vf(e){ce(Wt,Wt.current),ce(vl,e),Ll===null&&(Ll=e)}function cp(e){e.tag===22?(ce(Wt,Wt.current),ce(vl,e),Ll===null&&(Ll=e)):bs()}function bs(){ce(Wt,Wt.current),ce(vl,vl.current)}function Sl(e){V(vl),Ll===e&&(Ll=null),V(Wt)}var Wt=j(0);function yu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Td(n)||Ed(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ba=0,Ve=null,vt=null,sn=null,bu=!1,Qi=!1,ci=!1,xu=0,Wr=0,$i=null,mx=0;function Kt(){throw Error(r(321))}function Sf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zn(e[n],t[n]))return!1;return!0}function kf(e,t,n,a,u,f){return Ba=f,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Vp:Hf,ci=!1,f=n(a,u),ci=!1,Qi&&(f=op(t,n,a,u)),up(e),f}function up(e){z.H=tc;var t=vt!==null&&vt.next!==null;if(Ba=0,sn=vt=Ve=null,bu=!1,Wr=0,$i=null,t)throw Error(r(300));e===null||rn||(e=e.dependencies,e!==null&&uu(e)&&(rn=!0))}function op(e,t,n,a){Ve=e;var u=0;do{if(Qi&&($i=null),Wr=0,Qi=!1,25<=u)throw Error(r(301));if(u+=1,sn=vt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=Qp,f=t(n,a)}while(Qi);return f}function gx(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Pr(t):t,e=e.useState()[0],(vt!==null?vt.memoizedState:null)!==e&&(Ve.flags|=1024),t}function wf(){var e=xu!==0;return xu=0,e}function jf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Nf(e){if(bu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bu=!1}Ba=0,sn=vt=Ve=null,Qi=!1,Wr=xu=0,$i=null}function Jn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?Ve.memoizedState=sn=e:sn=sn.next=e,sn}function Pt(){if(vt===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=vt.next;var t=sn===null?Ve.memoizedState:sn.next;if(t!==null)sn=t,vt=e;else{if(e===null)throw Ve.alternate===null?Error(r(467)):Error(r(310));vt=e,e={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},sn===null?Ve.memoizedState=sn=e:sn=sn.next=e}return sn}function _u(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pr(e){var t=Wr;return Wr+=1,$i===null&&($i=[]),e=ep($i,e,t),t=Ve,(sn===null?t.memoizedState:sn.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Vp:Hf),e}function vu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pr(e);if(e.$$typeof===$)return Mn(e)}throw Error(r(438,String(e)))}function Tf(e){var t=null,n=Ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Ve.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=_u(),Ve.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=he;return t.index++,n}function qa(e,t){return typeof t=="function"?t(e):t}function Su(e){var t=Pt();return Ef(t,vt,e)}function Ef(e,t,n){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var u=e.baseQueue,f=a.pending;if(f!==null){if(u!==null){var p=u.next;u.next=f.next,f.next=p}t.baseQueue=u=f,a.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{t=u.next;var v=p=null,E=null,Y=t,ee=!1;do{var le=Y.lane&-536870913;if(le!==Y.lane?(et&le)===le:(Ba&le)===le){var X=Y.revertLane;if(X===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),le===Gi&&(ee=!0);else if((Ba&X)===X){Y=Y.next,X===Gi&&(ee=!0);continue}else le={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},E===null?(v=E=le,p=f):E=E.next=le,Ve.lanes|=X,vs|=X;le=Y.action,ci&&n(f,le),f=Y.hasEagerState?Y.eagerState:n(f,le)}else X={lane:le,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},E===null?(v=E=X,p=f):E=E.next=X,Ve.lanes|=le,vs|=le;Y=Y.next}while(Y!==null&&Y!==t);if(E===null?p=f:E.next=v,!Zn(f,e.memoizedState)&&(rn=!0,ee&&(n=Yi,n!==null)))throw n;e.memoizedState=f,e.baseState=p,e.baseQueue=E,a.lastRenderedState=f}return u===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Af(e){var t=Pt(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var a=n.dispatch,u=n.pending,f=t.memoizedState;if(u!==null){n.pending=null;var p=u=u.next;do f=e(f,p.action),p=p.next;while(p!==u);Zn(f,t.memoizedState)||(rn=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),n.lastRenderedState=f}return[f,a]}function fp(e,t,n){var a=Ve,u=Pt(),f=nt;if(f){if(n===void 0)throw Error(r(407));n=n()}else n=t();var p=!Zn((vt||u).memoizedState,n);if(p&&(u.memoizedState=n,rn=!0),u=u.queue,Mf(pp.bind(null,a,u,e),[e]),u.getSnapshot!==t||p||sn!==null&&sn.memoizedState.tag&1){if(a.flags|=2048,Zi(9,{destroy:void 0},hp.bind(null,a,u,n,t),null),Nt===null)throw Error(r(349));f||(Ba&127)!==0||dp(a,t,n)}return n}function dp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t=_u(),Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hp(e,t,n,a){t.value=n,t.getSnapshot=a,mp(t)&&gp(e)}function pp(e,t,n){return n(function(){mp(t)&&gp(e)})}function mp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zn(e,n)}catch{return!0}}function gp(e){var t=je(e,2);t!==null&&cl(t,e,2)}function Cf(e){var t=Jn();if(typeof e=="function"){var n=e;if(e=n(),ci){En(!0);try{n()}finally{En(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:e},t}function yp(e,t,n,a){return e.baseState=n,Ef(e,vt,typeof a=="function"?a:qa)}function yx(e,t,n,a,u){if(ju(e))throw Error(r(485));if(e=t.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};z.T!==null?n(!0):f.isTransition=!1,a(f),n=t.pending,n===null?(f.next=t.pending=f,bp(t,f)):(f.next=n.next,t.pending=n.next=f)}}function bp(e,t){var n=t.action,a=t.payload,u=e.state;if(t.isTransition){var f=z.T,p={};z.T=p;try{var v=n(u,a),E=z.S;E!==null&&E(p,v),xp(e,t,v)}catch(Y){Rf(e,t,Y)}finally{f!==null&&p.types!==null&&(f.types=p.types),z.T=f}}else try{f=n(u,a),xp(e,t,f)}catch(Y){Rf(e,t,Y)}}function xp(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){_p(e,t,a)},function(a){return Rf(e,t,a)}):_p(e,t,n)}function _p(e,t,n){t.status="fulfilled",t.value=n,vp(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,bp(e,n)))}function Rf(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,vp(t),t=t.next;while(t!==a)}e.action=null}function vp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sp(e,t){return t}function kp(e,t){if(nt){var n=Nt.formState;if(n!==null){e:{var a=Ve;if(nt){if(Dt){t:{for(var u=Dt,f=zl;u.nodeType!==8;){if(!f){u=null;break t}if(u=Ul(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Dt=Ul(u.nextSibling),a=u.data==="F!";break e}}ds(a)}a=!1}a&&(t=n[0])}}return n=Jn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sp,lastRenderedState:t},n.queue=a,n=Yp.bind(null,Ve,a),a.dispatch=n,a=Cf(!1),f=Uf.bind(null,Ve,!1,a.queue),a=Jn(),u={state:t,dispatch:null,action:e,pending:null},a.queue=u,n=yx.bind(null,Ve,u,f,n),u.dispatch=n,a.memoizedState=e,[t,n,!1]}function wp(e){var t=Pt();return jp(t,vt,e)}function jp(e,t,n){if(t=Ef(e,t,Sp)[0],e=Su(qa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Pr(t)}catch(p){throw p===Ii?du:p}else a=t;t=Pt();var u=t.queue,f=u.dispatch;return n!==t.memoizedState&&(Ve.flags|=2048,Zi(9,{destroy:void 0},bx.bind(null,u,n),null)),[a,f,e]}function bx(e,t){e.action=t}function Np(e){var t=Pt(),n=vt;if(n!==null)return jp(t,n,e);Pt(),t=t.memoizedState,n=Pt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Zi(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=_u(),Ve.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Tp(){return Pt().memoizedState}function ku(e,t,n,a){var u=Jn();Ve.flags|=e,u.memoizedState=Zi(1|t,{destroy:void 0},n,a===void 0?null:a)}function wu(e,t,n,a){var u=Pt();a=a===void 0?null:a;var f=u.memoizedState.inst;vt!==null&&a!==null&&Sf(a,vt.memoizedState.deps)?u.memoizedState=Zi(t,f,n,a):(Ve.flags|=e,u.memoizedState=Zi(1|t,f,n,a))}function Ep(e,t){ku(8390656,8,e,t)}function Mf(e,t){wu(2048,8,e,t)}function xx(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=_u(),Ve.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ap(e){var t=Pt().memoizedState;return xx({ref:t,nextImpl:e}),function(){if((ot&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Cp(e,t){return wu(4,2,e,t)}function Rp(e,t){return wu(4,4,e,t)}function Mp(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Op(e,t,n){n=n!=null?n.concat([e]):null,wu(4,4,Mp.bind(null,t,e),n)}function Of(){}function Dp(e,t){var n=Pt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Sf(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function zp(e,t){var n=Pt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Sf(t,a[1]))return a[0];if(a=e(),ci){En(!0);try{e()}finally{En(!1)}}return n.memoizedState=[a,t],a}function Df(e,t,n){return n===void 0||(Ba&1073741824)!==0&&(et&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Lm(),Ve.lanes|=e,vs|=e,n)}function Lp(e,t,n,a){return Zn(n,t)?n:Vi.current!==null?(e=Df(e,n,a),Zn(e,t)||(rn=!0),e):(Ba&42)===0||(Ba&1073741824)!==0&&(et&261930)===0?(rn=!0,e.memoizedState=n):(e=Lm(),Ve.lanes|=e,vs|=e,t)}function Up(e,t,n,a,u){var f=P.p;P.p=f!==0&&8>f?f:8;var p=z.T,v={};z.T=v,Uf(e,!1,t,n);try{var E=u(),Y=z.S;if(Y!==null&&Y(v,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var ee=px(E,a);ec(e,t,ee,jl(e))}else ec(e,t,a,jl(e))}catch(le){ec(e,t,{then:function(){},status:"rejected",reason:le},jl())}finally{P.p=f,p!==null&&v.types!==null&&(p.types=v.types),z.T=p}}function _x(){}function zf(e,t,n,a){if(e.tag!==5)throw Error(r(476));var u=Hp(e).queue;Up(e,u,t,te,n===null?_x:function(){return Bp(e),n(a)})}function Hp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bp(e){var t=Hp(e);t.next===null&&(t=e.alternate.memoizedState),ec(e,t.next.queue,{},jl())}function Lf(){return Mn(yc)}function qp(){return Pt().memoizedState}function Gp(){return Pt().memoizedState}function vx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jl();e=ms(n);var a=gs(t,e,n);a!==null&&(cl(a,t,n),Kr(a,t,n)),t={cache:ff()},e.payload=t;return}t=t.return}}function Sx(e,t,n){var a=jl();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ju(e)?Ip(t,n):(n=Kn(e,t,n,a),n!==null&&(cl(n,e,a),Xp(n,t,a)))}function Yp(e,t,n){var a=jl();ec(e,t,n,a)}function ec(e,t,n,a){var u={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ju(e))Ip(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var p=t.lastRenderedState,v=f(p,n);if(u.hasEagerState=!0,u.eagerState=v,Zn(v,p))return Sn(e,t,u,0),Nt===null&&Ot(),!1}catch{}finally{}if(n=Kn(e,t,u,a),n!==null)return cl(n,e,a),Xp(n,t,a),!0}return!1}function Uf(e,t,n,a){if(a={lane:2,revertLane:md(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ju(e)){if(t)throw Error(r(479))}else t=Kn(e,n,a,2),t!==null&&cl(t,e,2)}function ju(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Ip(e,t){Qi=bu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xp(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Ys(e,n)}}var tc={readContext:Mn,use:vu,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useLayoutEffect:Kt,useInsertionEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useSyncExternalStore:Kt,useId:Kt,useHostTransitionStatus:Kt,useFormState:Kt,useActionState:Kt,useOptimistic:Kt,useMemoCache:Kt,useCacheRefresh:Kt};tc.useEffectEvent=Kt;var Vp={readContext:Mn,use:vu,useCallback:function(e,t){return Jn().memoizedState=[e,t===void 0?null:t],e},useContext:Mn,useEffect:Ep,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ku(4194308,4,Mp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ku(4194308,4,e,t)},useInsertionEffect:function(e,t){ku(4,2,e,t)},useMemo:function(e,t){var n=Jn();t=t===void 0?null:t;var a=e();if(ci){En(!0);try{e()}finally{En(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Jn();if(n!==void 0){var u=n(t);if(ci){En(!0);try{n(t)}finally{En(!1)}}}else u=t;return a.memoizedState=a.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},a.queue=e,e=e.dispatch=Sx.bind(null,Ve,e),[a.memoizedState,e]},useRef:function(e){var t=Jn();return e={current:e},t.memoizedState=e},useState:function(e){e=Cf(e);var t=e.queue,n=Yp.bind(null,Ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Of,useDeferredValue:function(e,t){var n=Jn();return Df(n,e,t)},useTransition:function(){var e=Cf(!1);return e=Up.bind(null,Ve,e.queue,!0,!1),Jn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Ve,u=Jn();if(nt){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Nt===null)throw Error(r(349));(et&127)!==0||dp(a,t,n)}u.memoizedState=n;var f={value:n,getSnapshot:t};return u.queue=f,Ep(pp.bind(null,a,f,e),[e]),a.flags|=2048,Zi(9,{destroy:void 0},hp.bind(null,a,f,n,t),null),n},useId:function(){var e=Jn(),t=Nt.identifierPrefix;if(nt){var n=oa,a=ua;n=(a&~(1<<32-pt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=xu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=mx++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lf,useFormState:kp,useActionState:kp,useOptimistic:function(e){var t=Jn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Uf.bind(null,Ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:Tf,useCacheRefresh:function(){return Jn().memoizedState=vx.bind(null,Ve)},useEffectEvent:function(e){var t=Jn(),n={impl:e};return t.memoizedState=n,function(){if((ot&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Hf={readContext:Mn,use:vu,useCallback:Dp,useContext:Mn,useEffect:Mf,useImperativeHandle:Op,useInsertionEffect:Cp,useLayoutEffect:Rp,useMemo:zp,useReducer:Su,useRef:Tp,useState:function(){return Su(qa)},useDebugValue:Of,useDeferredValue:function(e,t){var n=Pt();return Lp(n,vt.memoizedState,e,t)},useTransition:function(){var e=Su(qa)[0],t=Pt().memoizedState;return[typeof e=="boolean"?e:Pr(e),t]},useSyncExternalStore:fp,useId:qp,useHostTransitionStatus:Lf,useFormState:wp,useActionState:wp,useOptimistic:function(e,t){var n=Pt();return yp(n,vt,e,t)},useMemoCache:Tf,useCacheRefresh:Gp};Hf.useEffectEvent=Ap;var Qp={readContext:Mn,use:vu,useCallback:Dp,useContext:Mn,useEffect:Mf,useImperativeHandle:Op,useInsertionEffect:Cp,useLayoutEffect:Rp,useMemo:zp,useReducer:Af,useRef:Tp,useState:function(){return Af(qa)},useDebugValue:Of,useDeferredValue:function(e,t){var n=Pt();return vt===null?Df(n,e,t):Lp(n,vt.memoizedState,e,t)},useTransition:function(){var e=Af(qa)[0],t=Pt().memoizedState;return[typeof e=="boolean"?e:Pr(e),t]},useSyncExternalStore:fp,useId:qp,useHostTransitionStatus:Lf,useFormState:Np,useActionState:Np,useOptimistic:function(e,t){var n=Pt();return vt!==null?yp(n,vt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Tf,useCacheRefresh:Gp};Qp.useEffectEvent=Ap;function Bf(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:k({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qf={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=jl(),u=ms(a);u.payload=t,n!=null&&(u.callback=n),t=gs(e,u,a),t!==null&&(cl(t,e,a),Kr(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=jl(),u=ms(a);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=gs(e,u,a),t!==null&&(cl(t,e,a),Kr(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jl(),a=ms(n);a.tag=2,t!=null&&(a.callback=t),t=gs(e,a,n),t!==null&&(cl(t,e,n),Kr(t,e,n))}};function $p(e,t,n,a,u,f,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,p):t.prototype&&t.prototype.isPureReactComponent?!ss(n,a)||!ss(u,f):!0}function Zp(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&qf.enqueueReplaceState(t,t.state,null)}function ui(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=k({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function Kp(e){y(e)}function Jp(e){console.error(e)}function Fp(e){y(e)}function Nu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Wp(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Gf(e,t,n){return n=ms(n),n.tag=3,n.payload={element:null},n.callback=function(){Nu(e,t)},n}function Pp(e){return e=ms(e),e.tag=3,e}function em(e,t,n,a){var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var f=a.value;e.payload=function(){return u(f)},e.callback=function(){Wp(t,n,a)}}var p=n.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Wp(t,n,a),typeof u!="function"&&(Ss===null?Ss=new Set([this]):Ss.add(this));var v=a.stack;this.componentDidCatch(a.value,{componentStack:v!==null?v:""})})}function kx(e,t,n,a,u){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&qi(t,n,u,!0),n=vl.current,n!==null){switch(n.tag){case 31:case 13:return Ll===null?Hu():n.alternate===null&&Jt===0&&(Jt=3),n.flags&=-257,n.flags|=65536,n.lanes=u,a===hu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),dd(e,a,u)),!1;case 22:return n.flags|=65536,a===hu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),dd(e,a,u)),!1}throw Error(r(435,n.tag))}return dd(e,a,u),Hu(),!1}if(nt)return t=vl.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,a!==sf&&(e=Error(r(422),{cause:a}),Xr(Ml(e,n)))):(a!==sf&&(t=Error(r(423),{cause:a}),Xr(Ml(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,a=Ml(a,n),u=Gf(e.stateNode,a,u),yf(e,u),Jt!==4&&(Jt=2)),!1;var f=Error(r(520),{cause:a});if(f=Ml(f,n),uc===null?uc=[f]:uc.push(f),Jt!==4&&(Jt=2),t===null)return!0;a=Ml(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=Gf(n.stateNode,a,e),yf(n,e),!1;case 1:if(t=n.type,f=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ss===null||!Ss.has(f))))return n.flags|=65536,u&=-u,n.lanes|=u,u=Pp(u),em(u,e,n,a),yf(n,u),!1}n=n.return}while(n!==null);return!1}var Yf=Error(r(461)),rn=!1;function On(e,t,n,a){t.child=e===null?ap(t,null,n,a):ri(t,e.child,n,a)}function tm(e,t,n,a,u){n=n.render;var f=t.ref;if("ref"in a){var p={};for(var v in a)v!=="ref"&&(p[v]=a[v])}else p=a;return li(t),a=kf(e,t,n,p,f,u),v=wf(),e!==null&&!rn?(jf(e,t,u),Ga(e,t,u)):(nt&&v&&lf(t),t.flags|=1,On(e,t,a,u),t.child)}function nm(e,t,n,a,u){if(e===null){var f=n.type;return typeof f=="function"&&!Ps(f)&&f.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=f,lm(e,t,f,a,u)):(e=ru(n.type,null,a,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Jf(e,u)){var p=f.memoizedProps;if(n=n.compare,n=n!==null?n:ss,n(p,a)&&e.ref===t.ref)return Ga(e,t,u)}return t.flags|=1,e=za(f,a),e.ref=t.ref,e.return=t,t.child=e}function lm(e,t,n,a,u){if(e!==null){var f=e.memoizedProps;if(ss(f,a)&&e.ref===t.ref)if(rn=!1,t.pendingProps=a=f,Jf(e,u))(e.flags&131072)!==0&&(rn=!0);else return t.lanes=e.lanes,Ga(e,t,u)}return If(e,t,n,a,u)}function am(e,t,n,a){var u=a.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|n:n,e!==null){for(a=t.child=e.child,u=0;a!==null;)u=u|a.lanes|a.childLanes,a=a.sibling;a=u&~f}else a=0,t.child=null;return sm(e,t,f,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fu(t,f!==null?f.cachePool:null),f!==null?rp(t,f):xf(),cp(t);else return a=t.lanes=536870912,sm(e,t,f!==null?f.baseLanes|n:n,n,a)}else f!==null?(fu(t,f.cachePool),rp(t,f),bs(),t.memoizedState=null):(e!==null&&fu(t,null),xf(),bs());return On(e,t,u,n),t.child}function nc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sm(e,t,n,a,u){var f=hf();return f=f===null?null:{parent:an._currentValue,pool:f},t.memoizedState={baseLanes:n,cachePool:f},e!==null&&fu(t,null),xf(),cp(t),e!==null&&qi(e,t,a,!0),t.childLanes=u,null}function Tu(e,t){return t=Au({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function im(e,t,n){return ri(t,e.child,null,n),e=Tu(t,t.pendingProps),e.flags|=2,Sl(t),t.memoizedState=null,e}function wx(e,t,n){var a=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(nt){if(a.mode==="hidden")return e=Tu(t,a),t.lanes=536870912,nc(null,e);if(vf(t),(e=Dt)?(e=bg(e,zl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:os!==null?{id:ua,overflow:oa}:null,retryLane:536870912,hydrationErrors:null},n=Ih(e),n.return=t,t.child=n,Rn=t,Dt=null)):e=null,e===null)throw ds(t);return t.lanes=536870912,null}return Tu(t,a)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(vf(t),u)if(t.flags&256)t.flags&=-257,t=im(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(rn||qi(e,t,n,!1),u=(n&e.childLanes)!==0,rn||u){if(a=Nt,a!==null&&(p=Yl(a,n),p!==0&&p!==f.retryLane))throw f.retryLane=p,je(e,p),cl(a,e,p),Yf;Hu(),t=im(e,t,n)}else e=f.treeContext,Dt=Ul(p.nextSibling),Rn=t,nt=!0,fs=null,zl=!1,e!==null&&Qh(t,e),t=Tu(t,a),t.flags|=4096;return t}return e=za(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Eu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function If(e,t,n,a,u){return li(t),n=kf(e,t,n,a,void 0,u),a=wf(),e!==null&&!rn?(jf(e,t,u),Ga(e,t,u)):(nt&&a&&lf(t),t.flags|=1,On(e,t,n,u),t.child)}function rm(e,t,n,a,u,f){return li(t),t.updateQueue=null,n=op(t,a,n,u),up(e),a=wf(),e!==null&&!rn?(jf(e,t,f),Ga(e,t,f)):(nt&&a&&lf(t),t.flags|=1,On(e,t,n,f),t.child)}function cm(e,t,n,a,u){if(li(t),t.stateNode===null){var f=yt,p=n.contextType;typeof p=="object"&&p!==null&&(f=Mn(p)),f=new n(a,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=qf,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=a,f.state=t.memoizedState,f.refs={},mf(t),p=n.contextType,f.context=typeof p=="object"&&p!==null?Mn(p):yt,f.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(Bf(t,n,p,a),f.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(p=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&qf.enqueueReplaceState(f,f.state,null),Fr(t,a,f,u),Jr(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){f=t.stateNode;var v=t.memoizedProps,E=ui(n,v);f.props=E;var Y=f.context,ee=n.contextType;p=yt,typeof ee=="object"&&ee!==null&&(p=Mn(ee));var le=n.getDerivedStateFromProps;ee=typeof le=="function"||typeof f.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,ee||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v||Y!==p)&&Zp(t,f,a,p),ps=!1;var X=t.memoizedState;f.state=X,Fr(t,a,f,u),Jr(),Y=t.memoizedState,v||X!==Y||ps?(typeof le=="function"&&(Bf(t,n,le,a),Y=t.memoizedState),(E=ps||$p(t,n,E,a,X,Y,p))?(ee||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=Y),f.props=a,f.state=Y,f.context=p,a=E):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{f=t.stateNode,gf(e,t),p=t.memoizedProps,ee=ui(n,p),f.props=ee,le=t.pendingProps,X=f.context,Y=n.contextType,E=yt,typeof Y=="object"&&Y!==null&&(E=Mn(Y)),v=n.getDerivedStateFromProps,(Y=typeof v=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(p!==le||X!==E)&&Zp(t,f,a,E),ps=!1,X=t.memoizedState,f.state=X,Fr(t,a,f,u),Jr();var Z=t.memoizedState;p!==le||X!==Z||ps||e!==null&&e.dependencies!==null&&uu(e.dependencies)?(typeof v=="function"&&(Bf(t,n,v,a),Z=t.memoizedState),(ee=ps||$p(t,n,ee,a,X,Z,E)||e!==null&&e.dependencies!==null&&uu(e.dependencies))?(Y||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(a,Z,E),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(a,Z,E)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=Z),f.props=a,f.state=Z,f.context=E,a=ee):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),a=!1)}return f=a,Eu(e,t),a=(t.flags&128)!==0,f||a?(f=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&a?(t.child=ri(t,e.child,null,u),t.child=ri(t,null,n,u)):On(e,t,n,u),t.memoizedState=f.state,e=t.child):e=Ga(e,t,u),e}function um(e,t,n,a){return ti(),t.flags|=256,On(e,t,n,a),t.child}var Xf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vf(e){return{baseLanes:e,cachePool:Wh()}}function Qf(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=wl),e}function om(e,t,n){var a=t.pendingProps,u=!1,f=(t.flags&128)!==0,p;if((p=f)||(p=e!==null&&e.memoizedState===null?!1:(Wt.current&2)!==0),p&&(u=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(nt){if(u?ys(t):bs(),(e=Dt)?(e=bg(e,zl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:os!==null?{id:ua,overflow:oa}:null,retryLane:536870912,hydrationErrors:null},n=Ih(e),n.return=t,t.child=n,Rn=t,Dt=null)):e=null,e===null)throw ds(t);return Ed(e)?t.lanes=32:t.lanes=536870912,null}var v=a.children;return a=a.fallback,u?(bs(),u=t.mode,v=Au({mode:"hidden",children:v},u),a=ei(a,u,n,null),v.return=t,a.return=t,v.sibling=a,t.child=v,a=t.child,a.memoizedState=Vf(n),a.childLanes=Qf(e,p,n),t.memoizedState=Xf,nc(null,a)):(ys(t),$f(t,v))}var E=e.memoizedState;if(E!==null&&(v=E.dehydrated,v!==null)){if(f)t.flags&256?(ys(t),t.flags&=-257,t=Zf(e,t,n)):t.memoizedState!==null?(bs(),t.child=e.child,t.flags|=128,t=null):(bs(),v=a.fallback,u=t.mode,a=Au({mode:"visible",children:a.children},u),v=ei(v,u,n,null),v.flags|=2,a.return=t,v.return=t,a.sibling=v,t.child=a,ri(t,e.child,null,n),a=t.child,a.memoizedState=Vf(n),a.childLanes=Qf(e,p,n),t.memoizedState=Xf,t=nc(null,a));else if(ys(t),Ed(v)){if(p=v.nextSibling&&v.nextSibling.dataset,p)var Y=p.dgst;p=Y,a=Error(r(419)),a.stack="",a.digest=p,Xr({value:a,source:null,stack:null}),t=Zf(e,t,n)}else if(rn||qi(e,t,n,!1),p=(n&e.childLanes)!==0,rn||p){if(p=Nt,p!==null&&(a=Yl(p,n),a!==0&&a!==E.retryLane))throw E.retryLane=a,je(e,a),cl(p,e,a),Yf;Td(v)||Hu(),t=Zf(e,t,n)}else Td(v)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Dt=Ul(v.nextSibling),Rn=t,nt=!0,fs=null,zl=!1,e!==null&&Qh(t,e),t=$f(t,a.children),t.flags|=4096);return t}return u?(bs(),v=a.fallback,u=t.mode,E=e.child,Y=E.sibling,a=za(E,{mode:"hidden",children:a.children}),a.subtreeFlags=E.subtreeFlags&65011712,Y!==null?v=za(Y,v):(v=ei(v,u,n,null),v.flags|=2),v.return=t,a.return=t,a.sibling=v,t.child=a,nc(null,a),a=t.child,v=e.child.memoizedState,v===null?v=Vf(n):(u=v.cachePool,u!==null?(E=an._currentValue,u=u.parent!==E?{parent:E,pool:E}:u):u=Wh(),v={baseLanes:v.baseLanes|n,cachePool:u}),a.memoizedState=v,a.childLanes=Qf(e,p,n),t.memoizedState=Xf,nc(e.child,a)):(ys(t),n=e.child,e=n.sibling,n=za(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=n,t.memoizedState=null,n)}function $f(e,t){return t=Au({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Au(e,t){return e=Ft(22,e,null,t),e.lanes=0,e}function Zf(e,t,n){return ri(t,e.child,null,n),e=$f(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fm(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),uf(e.return,t,n)}function Kf(e,t,n,a,u,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:u,treeForkCount:f}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=a,p.tail=n,p.tailMode=u,p.treeForkCount=f)}function dm(e,t,n){var a=t.pendingProps,u=a.revealOrder,f=a.tail;a=a.children;var p=Wt.current,v=(p&2)!==0;if(v?(p=p&1|2,t.flags|=128):p&=1,ce(Wt,p),On(e,t,a,n),a=nt?Ir:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fm(e,n,t);else if(e.tag===19)fm(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}switch(u){case"forwards":for(n=t.child,u=null;n!==null;)e=n.alternate,e!==null&&yu(e)===null&&(u=n),n=n.sibling;n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),Kf(t,!1,u,n,f,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&yu(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}Kf(t,!0,n,null,f,a);break;case"together":Kf(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Ga(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vs|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(qi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=za(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=za(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Jf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&uu(e)))}function jx(e,t,n){switch(t.tag){case 3:it(t,t.stateNode.containerInfo),hs(t,an,e.memoizedState.cache),ti();break;case 27:case 5:st(t);break;case 4:it(t,t.stateNode.containerInfo);break;case 10:hs(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,vf(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ys(t),t.flags|=128,null):(n&t.child.childLanes)!==0?om(e,t,n):(ys(t),e=Ga(e,t,n),e!==null?e.sibling:null);ys(t);break;case 19:var u=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(qi(e,t,n,!1),a=(n&t.childLanes)!==0),u){if(a)return dm(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ce(Wt,Wt.current),a)break;return null;case 22:return t.lanes=0,am(e,t,n,t.pendingProps);case 24:hs(t,an,e.memoizedState.cache)}return Ga(e,t,n)}function hm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rn=!0;else{if(!Jf(e,n)&&(t.flags&128)===0)return rn=!1,jx(e,t,n);rn=(e.flags&131072)!==0}else rn=!1,nt&&(t.flags&1048576)!==0&&Vh(t,Ir,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=si(t.elementType),t.type=e,typeof e=="function")Ps(e)?(a=ui(e,a),t.tag=1,t=cm(null,t,e,a,n)):(t.tag=0,t=If(null,t,e,a,n));else{if(e!=null){var u=e.$$typeof;if(u===A){t.tag=11,t=tm(null,t,e,a,n);break e}else if(u===M){t.tag=14,t=nm(null,t,e,a,n);break e}}throw t=Ne(e)||e,Error(r(306,t,""))}}return t;case 0:return If(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,u=ui(a,t.pendingProps),cm(e,t,a,u,n);case 3:e:{if(it(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var f=t.memoizedState;u=f.element,gf(e,t),Fr(t,a,null,n);var p=t.memoizedState;if(a=p.cache,hs(t,an,a),a!==f.cache&&of(t,[an],n,!0),Jr(),a=p.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=um(e,t,a,n);break e}else if(a!==u){u=Ml(Error(r(424)),t),Xr(u),t=um(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Dt=Ul(e.firstChild),Rn=t,nt=!0,fs=null,zl=!0,n=ap(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ti(),a===u){t=Ga(e,t,n);break e}On(e,t,a,n)}t=t.child}return t;case 26:return Eu(e,t),e===null?(n=wg(t.type,null,t.pendingProps,null))?t.memoizedState=n:nt||(n=t.type,e=t.pendingProps,a=Vu(Te.current).createElement(n),a[Rt]=t,a[Be]=e,Dn(a,n,e),mt(a),t.stateNode=a):t.memoizedState=wg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return st(t),e===null&&nt&&(a=t.stateNode=vg(t.type,t.pendingProps,Te.current),Rn=t,zl=!0,u=Dt,Ns(t.type)?(Ad=u,Dt=Ul(a.firstChild)):Dt=u),On(e,t,t.pendingProps.children,n),Eu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&nt&&((u=a=Dt)&&(a=t0(a,t.type,t.pendingProps,zl),a!==null?(t.stateNode=a,Rn=t,Dt=Ul(a.firstChild),zl=!1,u=!0):u=!1),u||ds(t)),st(t),u=t.type,f=t.pendingProps,p=e!==null?e.memoizedProps:null,a=f.children,wd(u,f)?a=null:p!==null&&wd(u,p)&&(t.flags|=32),t.memoizedState!==null&&(u=kf(e,t,gx,null,null,n),yc._currentValue=u),Eu(e,t),On(e,t,a,n),t.child;case 6:return e===null&&nt&&((e=n=Dt)&&(n=n0(n,t.pendingProps,zl),n!==null?(t.stateNode=n,Rn=t,Dt=null,e=!0):e=!1),e||ds(t)),null;case 13:return om(e,t,n);case 4:return it(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ri(t,null,a,n):On(e,t,a,n),t.child;case 11:return tm(e,t,t.type,t.pendingProps,n);case 7:return On(e,t,t.pendingProps,n),t.child;case 8:return On(e,t,t.pendingProps.children,n),t.child;case 12:return On(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,hs(t,t.type,a.value),On(e,t,a.children,n),t.child;case 9:return u=t.type._context,a=t.pendingProps.children,li(t),u=Mn(u),a=a(u),t.flags|=1,On(e,t,a,n),t.child;case 14:return nm(e,t,t.type,t.pendingProps,n);case 15:return lm(e,t,t.type,t.pendingProps,n);case 19:return dm(e,t,n);case 31:return wx(e,t,n);case 22:return am(e,t,n,t.pendingProps);case 24:return li(t),a=Mn(an),e===null?(u=hf(),u===null&&(u=Nt,f=ff(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=n),u=f),t.memoizedState={parent:a,cache:u},mf(t),hs(t,an,u)):((e.lanes&n)!==0&&(gf(e,t),Fr(t,null,null,n),Jr()),u=e.memoizedState,f=t.memoizedState,u.parent!==a?(u={parent:a,cache:a},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),hs(t,an,a)):(a=f.cache,hs(t,an,a),a!==u.cache&&of(t,[an],n,!0))),On(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Ya(e){e.flags|=4}function Ff(e,t,n,a,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(qm())e.flags|=8192;else throw ii=hu,pf}else e.flags&=-16777217}function pm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ag(t))if(qm())e.flags|=8192;else throw ii=hu,pf}function Cu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hn():536870912,e.lanes|=t,Wi|=t)}function lc(e,t){if(!nt)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 a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function zt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var u=e.child;u!==null;)n|=u.lanes|u.childLanes,a|=u.subtreeFlags&65011712,a|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)n|=u.lanes|u.childLanes,a|=u.subtreeFlags,a|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function Nx(e,t,n){var a=t.pendingProps;switch(af(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(t),null;case 1:return zt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ha(an),Ze(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?Ya(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rf())),zt(t),null;case 26:var u=t.type,f=t.memoizedState;return e===null?(Ya(t),f!==null?(zt(t),pm(t,f)):(zt(t),Ff(t,u,null,a,n))):f?f!==e.memoizedState?(Ya(t),zt(t),pm(t,f)):(zt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Ya(t),zt(t),Ff(t,u,e,a,n)),null;case 27:if(He(t),n=Te.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ya(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return zt(t),null}e=oe.current,Bi(t)?$h(t):(e=vg(u,a,n),t.stateNode=e,Ya(t))}return zt(t),null;case 5:if(He(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ya(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return zt(t),null}if(f=oe.current,Bi(t))$h(t);else{var p=Vu(Te.current);switch(f){case 1:f=p.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=p.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=p.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=p.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=p.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof a.is=="string"?p.createElement("select",{is:a.is}):p.createElement("select"),a.multiple?f.multiple=!0:a.size&&(f.size=a.size);break;default:f=typeof a.is=="string"?p.createElement(u,{is:a.is}):p.createElement(u)}}f[Rt]=t,f[Be]=a;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=f;e:switch(Dn(f,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Ya(t)}}return zt(t),Ff(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Ya(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=Te.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,u=Rn,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}e[Rt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||og(e.nodeValue,n)),e||ds(t,!0)}else e=Vu(e).createTextNode(a),e[Rt]=t,t.stateNode=e}return zt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Bi(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Rt]=t}else ti(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;zt(t),e=!1}else n=rf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Sl(t),t):(Sl(t),null);if((t.flags&128)!==0)throw Error(r(558))}return zt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Bi(t),a!==null&&a.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[Rt]=t}else ti(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;zt(t),u=!1}else u=rf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Sl(t),t):(Sl(t),null)}return Sl(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==u&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Cu(t,t.updateQueue),zt(t),null);case 4:return Ze(),e===null&&xd(t.stateNode.containerInfo),zt(t),null;case 10:return Ha(t.type),zt(t),null;case 19:if(V(Wt),a=t.memoizedState,a===null)return zt(t),null;if(u=(t.flags&128)!==0,f=a.rendering,f===null)if(u)lc(a,!1);else{if(Jt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=yu(e),f!==null){for(t.flags|=128,lc(a,!1),e=f.updateQueue,t.updateQueue=e,Cu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Yh(n,e),n=n.sibling;return ce(Wt,Wt.current&1|2),nt&&La(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ut()>zu&&(t.flags|=128,u=!0,lc(a,!1),t.lanes=4194304)}else{if(!u)if(e=yu(f),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Cu(t,e),lc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!nt)return zt(t),null}else 2*ut()-a.renderingStartTime>zu&&n!==536870912&&(t.flags|=128,u=!0,lc(a,!1),t.lanes=4194304);a.isBackwards?(f.sibling=t.child,t.child=f):(e=a.last,e!==null?e.sibling=f:t.child=f,a.last=f)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ut(),e.sibling=null,n=Wt.current,ce(Wt,u?n&1|2:n&1),nt&&La(t,a.treeForkCount),e):(zt(t),null);case 22:case 23:return Sl(t),_f(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(zt(t),t.subtreeFlags&6&&(t.flags|=8192)):zt(t),n=t.updateQueue,n!==null&&Cu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&V(ai),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ha(an),zt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Tx(e,t){switch(af(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ha(an),Ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return He(t),null;case 31:if(t.memoizedState!==null){if(Sl(t),t.alternate===null)throw Error(r(340));ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Sl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Wt),null;case 4:return Ze(),null;case 10:return Ha(t.type),null;case 22:case 23:return Sl(t),_f(),e!==null&&V(ai),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ha(an),null;case 25:return null;default:return null}}function mm(e,t){switch(af(t),t.tag){case 3:Ha(an),Ze();break;case 26:case 27:case 5:He(t);break;case 4:Ze();break;case 31:t.memoizedState!==null&&Sl(t);break;case 13:Sl(t);break;case 19:V(Wt);break;case 10:Ha(t.type);break;case 22:case 23:Sl(t),_f(),e!==null&&V(ai);break;case 24:Ha(an)}}function ac(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var u=a.next;n=u;do{if((n.tag&e)===e){a=void 0;var f=n.create,p=n.inst;a=f(),p.destroy=a}n=n.next}while(n!==u)}}catch(v){xt(t,t.return,v)}}function xs(e,t,n){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&e)===e){var p=a.inst,v=p.destroy;if(v!==void 0){p.destroy=void 0,u=t;var E=n,Y=v;try{Y()}catch(ee){xt(u,E,ee)}}}a=a.next}while(a!==f)}}catch(ee){xt(t,t.return,ee)}}function gm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ip(t,n)}catch(a){xt(e,e.return,a)}}}function ym(e,t,n){n.props=ui(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){xt(e,t,a)}}function sc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(u){xt(e,t,u)}}function fa(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(u){xt(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){xt(e,t,u)}else n.current=null}function bm(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(u){xt(e,e.return,u)}}function Wf(e,t,n){try{var a=e.stateNode;Kx(a,e.type,n,t),a[Be]=t}catch(u){xt(e,e.return,u)}}function xm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ns(e.type)||e.tag===4}function Pf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ns(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ed(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gt));else if(a!==4&&(a===27&&Ns(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ed(e,t,n),e=e.sibling;e!==null;)ed(e,t,n),e=e.sibling}function Ru(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Ns(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ru(e,t,n),e=e.sibling;e!==null;)Ru(e,t,n),e=e.sibling}function _m(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Dn(t,a,n),t[Rt]=e,t[Be]=n}catch(f){xt(e,e.return,f)}}var Ia=!1,cn=!1,td=!1,vm=typeof WeakSet=="function"?WeakSet:Set,wn=null;function Ex(e,t){if(e=e.containerInfo,Sd=Wu,e=nl(e),Rl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var u=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{n.nodeType,f.nodeType}catch{n=null;break e}var p=0,v=-1,E=-1,Y=0,ee=0,le=e,X=null;t:for(;;){for(var Z;le!==n||u!==0&&le.nodeType!==3||(v=p+u),le!==f||a!==0&&le.nodeType!==3||(E=p+a),le.nodeType===3&&(p+=le.nodeValue.length),(Z=le.firstChild)!==null;)X=le,le=Z;for(;;){if(le===e)break t;if(X===n&&++Y===u&&(v=p),X===f&&++ee===a&&(E=p),(Z=le.nextSibling)!==null)break;le=X,X=le.parentNode}le=Z}n=v===-1||E===-1?null:{start:v,end:E}}else n=null}n=n||{start:0,end:0}}else n=null;for(kd={focusedElem:e,selectionRange:n},Wu=!1,wn=t;wn!==null;)if(t=wn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wn=e;else for(;wn!==null;){switch(t=wn,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)u=e[n],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,n=t,u=f.memoizedProps,f=f.memoizedState,a=n.stateNode;try{var ke=ui(n.type,u);e=a.getSnapshotBeforeUpdate(ke,f),a.__reactInternalSnapshotBeforeUpdate=e}catch(ze){xt(n,n.return,ze)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Nd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,wn=e;break}wn=t.return}}function Sm(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Va(e,n),a&4&&ac(5,n);break;case 1:if(Va(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(p){xt(n,n.return,p)}else{var u=ui(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){xt(n,n.return,p)}}a&64&&gm(n),a&512&&sc(n,n.return);break;case 3:if(Va(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ip(e,t)}catch(p){xt(n,n.return,p)}}break;case 27:t===null&&a&4&&_m(n);case 26:case 5:Va(e,n),t===null&&a&4&&bm(n),a&512&&sc(n,n.return);break;case 12:Va(e,n);break;case 31:Va(e,n),a&4&&jm(e,n);break;case 13:Va(e,n),a&4&&Nm(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ux.bind(null,n),l0(e,n))));break;case 22:if(a=n.memoizedState!==null||Ia,!a){t=t!==null&&t.memoizedState!==null||cn,u=Ia;var f=cn;Ia=a,(cn=t)&&!f?Qa(e,n,(n.subtreeFlags&8772)!==0):Va(e,n),Ia=u,cn=f}break;case 30:break;default:Va(e,n)}}function km(e){var t=e.alternate;t!==null&&(e.alternate=null,km(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pl(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Vt=null,al=!1;function Xa(e,t,n){for(n=n.child;n!==null;)wm(e,t,n),n=n.sibling}function wm(e,t,n){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(en,n)}catch{}switch(n.tag){case 26:cn||fa(n,t),Xa(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:cn||fa(n,t);var a=Vt,u=al;Ns(n.type)&&(Vt=n.stateNode,al=!1),Xa(e,t,n),pc(n.stateNode),Vt=a,al=u;break;case 5:cn||fa(n,t);case 6:if(a=Vt,u=al,Vt=null,Xa(e,t,n),Vt=a,al=u,Vt!==null)if(al)try{(Vt.nodeType===9?Vt.body:Vt.nodeName==="HTML"?Vt.ownerDocument.body:Vt).removeChild(n.stateNode)}catch(f){xt(n,t,f)}else try{Vt.removeChild(n.stateNode)}catch(f){xt(n,t,f)}break;case 18:Vt!==null&&(al?(e=Vt,gg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ir(e)):gg(Vt,n.stateNode));break;case 4:a=Vt,u=al,Vt=n.stateNode.containerInfo,al=!0,Xa(e,t,n),Vt=a,al=u;break;case 0:case 11:case 14:case 15:xs(2,n,t),cn||xs(4,n,t),Xa(e,t,n);break;case 1:cn||(fa(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&ym(n,t,a)),Xa(e,t,n);break;case 21:Xa(e,t,n);break;case 22:cn=(a=cn)||n.memoizedState!==null,Xa(e,t,n),cn=a;break;default:Xa(e,t,n)}}function jm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ir(e)}catch(n){xt(t,t.return,n)}}}function Nm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ir(e)}catch(n){xt(t,t.return,n)}}function Ax(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vm),t;default:throw Error(r(435,e.tag))}}function Mu(e,t){var n=Ax(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var u=Hx.bind(null,e,a);a.then(u,u)}})}function sl(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var u=n[a],f=e,p=t,v=p;e:for(;v!==null;){switch(v.tag){case 27:if(Ns(v.type)){Vt=v.stateNode,al=!1;break e}break;case 5:Vt=v.stateNode,al=!1;break e;case 3:case 4:Vt=v.stateNode.containerInfo,al=!0;break e}v=v.return}if(Vt===null)throw Error(r(160));wm(f,p,u),Vt=null,al=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tm(t,e),t=t.sibling}var Zl=null;function Tm(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sl(t,e),il(e),a&4&&(xs(3,e,e.return),ac(3,e),xs(5,e,e.return));break;case 1:sl(t,e),il(e),a&512&&(cn||n===null||fa(n,n.return)),a&64&&Ia&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var u=Zl;if(sl(t,e),il(e),a&512&&(cn||n===null||fa(n,n.return)),a&4){var f=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,u=u.ownerDocument||u;t:switch(a){case"title":f=u.getElementsByTagName("title")[0],(!f||f[hl]||f[Rt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(a),u.head.insertBefore(f,u.querySelector("head > title"))),Dn(f,a,n),f[Rt]=e,mt(f),a=f;break e;case"link":var p=Tg("link","href",u).get(a+(n.href||""));if(p){for(var v=0;v<p.length;v++)if(f=p[v],f.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&f.getAttribute("rel")===(n.rel==null?null:n.rel)&&f.getAttribute("title")===(n.title==null?null:n.title)&&f.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){p.splice(v,1);break t}}f=u.createElement(a),Dn(f,a,n),u.head.appendChild(f);break;case"meta":if(p=Tg("meta","content",u).get(a+(n.content||""))){for(v=0;v<p.length;v++)if(f=p[v],f.getAttribute("content")===(n.content==null?null:""+n.content)&&f.getAttribute("name")===(n.name==null?null:n.name)&&f.getAttribute("property")===(n.property==null?null:n.property)&&f.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&f.getAttribute("charset")===(n.charSet==null?null:n.charSet)){p.splice(v,1);break t}}f=u.createElement(a),Dn(f,a,n),u.head.appendChild(f);break;default:throw Error(r(468,a))}f[Rt]=e,mt(f),a=f}e.stateNode=a}else Eg(u,e.type,e.stateNode);else e.stateNode=Ng(u,a,e.memoizedProps);else f!==a?(f===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):f.count--,a===null?Eg(u,e.type,e.stateNode):Ng(u,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Wf(e,e.memoizedProps,n.memoizedProps)}break;case 27:sl(t,e),il(e),a&512&&(cn||n===null||fa(n,n.return)),n!==null&&a&4&&Wf(e,e.memoizedProps,n.memoizedProps);break;case 5:if(sl(t,e),il(e),a&512&&(cn||n===null||fa(n,n.return)),e.flags&32){u=e.stateNode;try{U(u,"")}catch(ke){xt(e,e.return,ke)}}a&4&&e.stateNode!=null&&(u=e.memoizedProps,Wf(e,u,n!==null?n.memoizedProps:u)),a&1024&&(td=!0);break;case 6:if(sl(t,e),il(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ke){xt(e,e.return,ke)}}break;case 3:if(Zu=null,u=Zl,Zl=Qu(t.containerInfo),sl(t,e),Zl=u,il(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ir(t.containerInfo)}catch(ke){xt(e,e.return,ke)}td&&(td=!1,Em(e));break;case 4:a=Zl,Zl=Qu(e.stateNode.containerInfo),sl(t,e),il(e),Zl=a;break;case 12:sl(t,e),il(e);break;case 31:sl(t,e),il(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Mu(e,a)));break;case 13:sl(t,e),il(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Du=ut()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Mu(e,a)));break;case 22:u=e.memoizedState!==null;var E=n!==null&&n.memoizedState!==null,Y=Ia,ee=cn;if(Ia=Y||u,cn=ee||E,sl(t,e),cn=ee,Ia=Y,il(e),a&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||E||Ia||cn||oi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){E=n=t;try{if(f=E.stateNode,u)p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{v=E.stateNode;var le=E.memoizedProps.style,X=le!=null&&le.hasOwnProperty("display")?le.display:null;v.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ke){xt(E,E.return,ke)}}}else if(t.tag===6){if(n===null){E=t;try{E.stateNode.nodeValue=u?"":E.memoizedProps}catch(ke){xt(E,E.return,ke)}}}else if(t.tag===18){if(n===null){E=t;try{var Z=E.stateNode;u?yg(Z,!0):yg(E.stateNode,!1)}catch(ke){xt(E,E.return,ke)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Mu(e,n))));break;case 19:sl(t,e),il(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Mu(e,a)));break;case 30:break;case 21:break;default:sl(t,e),il(e)}}function il(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(xm(a)){n=a;break}a=a.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var u=n.stateNode,f=Pf(e);Ru(e,f,u);break;case 5:var p=n.stateNode;n.flags&32&&(U(p,""),n.flags&=-33);var v=Pf(e);Ru(e,v,p);break;case 3:case 4:var E=n.stateNode.containerInfo,Y=Pf(e);ed(e,Y,E);break;default:throw Error(r(161))}}catch(ee){xt(e,e.return,ee)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Em(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Em(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Va(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sm(e,t.alternate,t),t=t.sibling}function oi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xs(4,t,t.return),oi(t);break;case 1:fa(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ym(t,t.return,n),oi(t);break;case 27:pc(t.stateNode);case 26:case 5:fa(t,t.return),oi(t);break;case 22:t.memoizedState===null&&oi(t);break;case 30:oi(t);break;default:oi(t)}e=e.sibling}}function Qa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,u=e,f=t,p=f.flags;switch(f.tag){case 0:case 11:case 15:Qa(u,f,n),ac(4,f);break;case 1:if(Qa(u,f,n),a=f,u=a.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(Y){xt(a,a.return,Y)}if(a=f,u=a.updateQueue,u!==null){var v=a.stateNode;try{var E=u.shared.hiddenCallbacks;if(E!==null)for(u.shared.hiddenCallbacks=null,u=0;u<E.length;u++)sp(E[u],v)}catch(Y){xt(a,a.return,Y)}}n&&p&64&&gm(f),sc(f,f.return);break;case 27:_m(f);case 26:case 5:Qa(u,f,n),n&&a===null&&p&4&&bm(f),sc(f,f.return);break;case 12:Qa(u,f,n);break;case 31:Qa(u,f,n),n&&p&4&&jm(u,f);break;case 13:Qa(u,f,n),n&&p&4&&Nm(u,f);break;case 22:f.memoizedState===null&&Qa(u,f,n),sc(f,f.return);break;case 30:break;default:Qa(u,f,n)}t=t.sibling}}function nd(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Vr(n))}function ld(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vr(e))}function Kl(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Am(e,t,n,a),t=t.sibling}function Am(e,t,n,a){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Kl(e,t,n,a),u&2048&&ac(9,t);break;case 1:Kl(e,t,n,a);break;case 3:Kl(e,t,n,a),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vr(e)));break;case 12:if(u&2048){Kl(e,t,n,a),e=t.stateNode;try{var f=t.memoizedProps,p=f.id,v=f.onPostCommit;typeof v=="function"&&v(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){xt(t,t.return,E)}}else Kl(e,t,n,a);break;case 31:Kl(e,t,n,a);break;case 13:Kl(e,t,n,a);break;case 23:break;case 22:f=t.stateNode,p=t.alternate,t.memoizedState!==null?f._visibility&2?Kl(e,t,n,a):ic(e,t):f._visibility&2?Kl(e,t,n,a):(f._visibility|=2,Ki(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),u&2048&&nd(p,t);break;case 24:Kl(e,t,n,a),u&2048&&ld(t.alternate,t);break;default:Kl(e,t,n,a)}}function Ki(e,t,n,a,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,p=t,v=n,E=a,Y=p.flags;switch(p.tag){case 0:case 11:case 15:Ki(f,p,v,E,u),ac(8,p);break;case 23:break;case 22:var ee=p.stateNode;p.memoizedState!==null?ee._visibility&2?Ki(f,p,v,E,u):ic(f,p):(ee._visibility|=2,Ki(f,p,v,E,u)),u&&Y&2048&&nd(p.alternate,p);break;case 24:Ki(f,p,v,E,u),u&&Y&2048&&ld(p.alternate,p);break;default:Ki(f,p,v,E,u)}t=t.sibling}}function ic(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,u=a.flags;switch(a.tag){case 22:ic(n,a),u&2048&&nd(a.alternate,a);break;case 24:ic(n,a),u&2048&&ld(a.alternate,a);break;default:ic(n,a)}t=t.sibling}}var rc=8192;function Ji(e,t,n){if(e.subtreeFlags&rc)for(e=e.child;e!==null;)Cm(e,t,n),e=e.sibling}function Cm(e,t,n){switch(e.tag){case 26:Ji(e,t,n),e.flags&rc&&e.memoizedState!==null&&m0(n,Zl,e.memoizedState,e.memoizedProps);break;case 5:Ji(e,t,n);break;case 3:case 4:var a=Zl;Zl=Qu(e.stateNode.containerInfo),Ji(e,t,n),Zl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=rc,rc=16777216,Ji(e,t,n),rc=a):Ji(e,t,n));break;default:Ji(e,t,n)}}function Rm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function cc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];wn=a,Om(a,e)}Rm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mm(e),e=e.sibling}function Mm(e){switch(e.tag){case 0:case 11:case 15:cc(e),e.flags&2048&&xs(9,e,e.return);break;case 3:cc(e);break;case 12:cc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ou(e)):cc(e);break;default:cc(e)}}function Ou(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];wn=a,Om(a,e)}Rm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xs(8,t,t.return),Ou(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ou(t));break;default:Ou(t)}e=e.sibling}}function Om(e,t){for(;wn!==null;){var n=wn;switch(n.tag){case 0:case 11:case 15:xs(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Vr(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,wn=a;else e:for(n=e;wn!==null;){a=wn;var u=a.sibling,f=a.return;if(km(a),a===n){wn=null;break e}if(u!==null){u.return=f,wn=u;break e}wn=f}}}var Cx={getCacheForType:function(e){var t=Mn(an),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Mn(an).controller.signal}},Rx=typeof WeakMap=="function"?WeakMap:Map,ot=0,Nt=null,We=null,et=0,bt=0,kl=null,_s=!1,Fi=!1,ad=!1,$a=0,Jt=0,vs=0,fi=0,sd=0,wl=0,Wi=0,uc=null,rl=null,id=!1,Du=0,Dm=0,zu=1/0,Lu=null,Ss=null,yn=0,ks=null,Pi=null,Za=0,rd=0,cd=null,zm=null,oc=0,ud=null;function jl(){return(ot&2)!==0&&et!==0?et&-et:z.T!==null?md():ja()}function Lm(){if(wl===0)if((et&536870912)===0||nt){var e=Me;Me<<=1,(Me&3932160)===0&&(Me=262144),wl=e}else wl=536870912;return e=vl.current,e!==null&&(e.flags|=32),wl}function cl(e,t,n){(e===Nt&&(bt===2||bt===9)||e.cancelPendingCommit!==null)&&(er(e,0),ws(e,et,wl,!1)),Tl(e,n),((ot&2)===0||e!==Nt)&&(e===Nt&&((ot&2)===0&&(fi|=n),Jt===4&&ws(e,et,wl,!1)),da(e))}function Um(e,t,n){if((ot&6)!==0)throw Error(r(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Yn(e,t),u=a?Dx(e,t):fd(e,t,!0),f=a;do{if(u===0){Fi&&!a&&ws(e,t,0,!1);break}else{if(n=e.current.alternate,f&&!Mx(n)){u=fd(e,t,!1),f=!1;continue}if(u===2){if(f=t,e.errorRecoveryDisabledLanes&f)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var v=e;u=uc;var E=v.current.memoizedState.isDehydrated;if(E&&(er(v,p).flags|=256),p=fd(v,p,!1),p!==2){if(ad&&!E){v.errorRecoveryDisabledLanes|=f,fi|=f,u=4;break e}f=rl,rl=u,f!==null&&(rl===null?rl=f:rl.push.apply(rl,f))}u=p}if(f=!1,u!==2)continue}}if(u===1){er(e,0),ws(e,t,0,!0);break}e:{switch(a=e,f=u,f){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:ws(a,t,wl,!_s);break e;case 2:rl=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Du+300-ut(),10<u)){if(ws(a,t,wl,!_s),Gl(a,0,!0)!==0)break e;Za=t,a.timeoutHandle=pg(Hm.bind(null,a,n,rl,Lu,id,t,wl,fi,Wi,_s,f,"Throttled",-0,0),u);break e}Hm(a,n,rl,Lu,id,t,wl,fi,Wi,_s,f,null,-0,0)}}break}while(!0);da(e)}function Hm(e,t,n,a,u,f,p,v,E,Y,ee,le,X,Z){if(e.timeoutHandle=-1,le=t.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gt},Cm(t,f,le);var ke=(f&62914560)===f?Du-ut():(f&4194048)===f?Dm-ut():0;if(ke=g0(le,ke),ke!==null){Za=f,e.cancelPendingCommit=ke(Qm.bind(null,e,t,f,n,a,u,p,v,E,ee,le,null,X,Z)),ws(e,f,p,!Y);return}}Qm(e,t,f,n,a,u,p,v,E)}function Mx(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var u=n[a],f=u.getSnapshot;u=u.value;try{if(!Zn(f(),u))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 ws(e,t,n,a){t&=~sd,t&=~fi,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var u=t;0<u;){var f=31-pt(u),p=1<<f;a[f]=-1,u&=~p}n!==0&&wa(e,n,t)}function Uu(){return(ot&6)===0?(fc(0),!1):!0}function od(){if(We!==null){if(bt===0)var e=We.return;else e=We,Ua=ni=null,Nf(e),Xi=null,$r=0,e=We;for(;e!==null;)mm(e.alternate,e),e=e.return;We=null}}function er(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Wx(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Za=0,od(),Nt=e,We=n=za(e.current,null),et=t,bt=0,kl=null,_s=!1,Fi=Yn(e,t),ad=!1,Wi=wl=sd=fi=vs=Jt=0,rl=uc=null,id=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var u=31-pt(a),f=1<<u;t|=e[u],a&=~f}return $a=t,Ot(),n}function Bm(e,t){Ve=null,z.H=tc,t===Ii||t===du?(t=tp(),bt=3):t===pf?(t=tp(),bt=4):bt=t===Yf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,kl=t,We===null&&(Jt=1,Nu(e,Ml(t,e.current)))}function qm(){var e=vl.current;return e===null?!0:(et&4194048)===et?Ll===null:(et&62914560)===et||(et&536870912)!==0?e===Ll:!1}function Gm(){var e=z.H;return z.H=tc,e===null?tc:e}function Ym(){var e=z.A;return z.A=Cx,e}function Hu(){Jt=4,_s||(et&4194048)!==et&&vl.current!==null||(Fi=!0),(vs&134217727)===0&&(fi&134217727)===0||Nt===null||ws(Nt,et,wl,!1)}function fd(e,t,n){var a=ot;ot|=2;var u=Gm(),f=Ym();(Nt!==e||et!==t)&&(Lu=null,er(e,t)),t=!1;var p=Jt;e:do try{if(bt!==0&&We!==null){var v=We,E=kl;switch(bt){case 8:od(),p=6;break e;case 3:case 2:case 9:case 6:vl.current===null&&(t=!0);var Y=bt;if(bt=0,kl=null,tr(e,v,E,Y),n&&Fi){p=0;break e}break;default:Y=bt,bt=0,kl=null,tr(e,v,E,Y)}}Ox(),p=Jt;break}catch(ee){Bm(e,ee)}while(!0);return t&&e.shellSuspendCounter++,Ua=ni=null,ot=a,z.H=u,z.A=f,We===null&&(Nt=null,et=0,Ot()),p}function Ox(){for(;We!==null;)Im(We)}function Dx(e,t){var n=ot;ot|=2;var a=Gm(),u=Ym();Nt!==e||et!==t?(Lu=null,zu=ut()+500,er(e,t)):Fi=Yn(e,t);e:do try{if(bt!==0&&We!==null){t=We;var f=kl;t:switch(bt){case 1:bt=0,kl=null,tr(e,t,f,1);break;case 2:case 9:if(Ph(f)){bt=0,kl=null,Xm(t);break}t=function(){bt!==2&&bt!==9||Nt!==e||(bt=7),da(e)},f.then(t,t);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:Ph(f)?(bt=0,kl=null,Xm(t)):(bt=0,kl=null,tr(e,t,f,7));break;case 5:var p=null;switch(We.tag){case 26:p=We.memoizedState;case 5:case 27:var v=We;if(p?Ag(p):v.stateNode.complete){bt=0,kl=null;var E=v.sibling;if(E!==null)We=E;else{var Y=v.return;Y!==null?(We=Y,Bu(Y)):We=null}break t}}bt=0,kl=null,tr(e,t,f,5);break;case 6:bt=0,kl=null,tr(e,t,f,6);break;case 8:od(),Jt=6;break e;default:throw Error(r(462))}}zx();break}catch(ee){Bm(e,ee)}while(!0);return Ua=ni=null,z.H=a,z.A=u,ot=n,We!==null?0:(Nt=null,et=0,Ot(),Jt)}function zx(){for(;We!==null&&!Un();)Im(We)}function Im(e){var t=hm(e.alternate,e,$a);e.memoizedProps=e.pendingProps,t===null?Bu(e):We=t}function Xm(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=rm(n,t,t.pendingProps,t.type,void 0,et);break;case 11:t=rm(n,t,t.pendingProps,t.type.render,t.ref,et);break;case 5:Nf(t);default:mm(n,t),t=We=Yh(t,$a),t=hm(n,t,$a)}e.memoizedProps=e.pendingProps,t===null?Bu(e):We=t}function tr(e,t,n,a){Ua=ni=null,Nf(t),Xi=null,$r=0;var u=t.return;try{if(kx(e,u,t,n,et)){Jt=1,Nu(e,Ml(n,e.current)),We=null;return}}catch(f){if(u!==null)throw We=u,f;Jt=1,Nu(e,Ml(n,e.current)),We=null;return}t.flags&32768?(nt||a===1?e=!0:Fi||(et&536870912)!==0?e=!1:(_s=e=!0,(a===2||a===9||a===3||a===6)&&(a=vl.current,a!==null&&a.tag===13&&(a.flags|=16384))),Vm(t,e)):Bu(t)}function Bu(e){var t=e;do{if((t.flags&32768)!==0){Vm(t,_s);return}e=t.return;var n=Nx(t.alternate,t,$a);if(n!==null){We=n;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Jt===0&&(Jt=5)}function Vm(e,t){do{var n=Tx(e.alternate,e);if(n!==null){n.flags&=32767,We=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){We=e;return}We=e=n}while(e!==null);Jt=6,We=null}function Qm(e,t,n,a,u,f,p,v,E){e.cancelPendingCommit=null;do qu();while(yn!==0);if((ot&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=qe,ka(e,n,f,p,v,E),e===Nt&&(We=Nt=null,et=0),Pi=t,ks=e,Za=n,rd=f,cd=u,zm=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Bx(Ee,function(){return Fm(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,u=P.p,P.p=2,p=ot,ot|=4;try{Ex(e,t,n)}finally{ot=p,P.p=u,z.T=a}}yn=1,$m(),Zm(),Km()}}function $m(){if(yn===1){yn=0;var e=ks,t=Pi,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=z.T,z.T=null;var a=P.p;P.p=2;var u=ot;ot|=4;try{Tm(t,e);var f=kd,p=nl(e.containerInfo),v=f.focusedElem,E=f.selectionRange;if(p!==v&&v&&v.ownerDocument&&tl(v.ownerDocument.documentElement,v)){if(E!==null&&Rl(v)){var Y=E.start,ee=E.end;if(ee===void 0&&(ee=Y),"selectionStart"in v)v.selectionStart=Y,v.selectionEnd=Math.min(ee,v.value.length);else{var le=v.ownerDocument||document,X=le&&le.defaultView||window;if(X.getSelection){var Z=X.getSelection(),ke=v.textContent.length,ze=Math.min(E.start,ke),kt=E.end===void 0?ze:Math.min(E.end,ke);!Z.extend&&ze>kt&&(p=kt,kt=ze,ze=p);var D=Fs(v,ze),R=Fs(v,kt);if(D&&R&&(Z.rangeCount!==1||Z.anchorNode!==D.node||Z.anchorOffset!==D.offset||Z.focusNode!==R.node||Z.focusOffset!==R.offset)){var G=le.createRange();G.setStart(D.node,D.offset),Z.removeAllRanges(),ze>kt?(Z.addRange(G),Z.extend(R.node,R.offset)):(G.setEnd(R.node,R.offset),Z.addRange(G))}}}}for(le=[],Z=v;Z=Z.parentNode;)Z.nodeType===1&&le.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<le.length;v++){var ne=le[v];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}Wu=!!Sd,kd=Sd=null}finally{ot=u,P.p=a,z.T=n}}e.current=t,yn=2}}function Zm(){if(yn===2){yn=0;var e=ks,t=Pi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=z.T,z.T=null;var a=P.p;P.p=2;var u=ot;ot|=4;try{Sm(e,t.alternate,t)}finally{ot=u,P.p=a,z.T=n}}yn=3}}function Km(){if(yn===4||yn===3){yn=0,Zt();var e=ks,t=Pi,n=Za,a=zm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?yn=5:(yn=0,Pi=ks=null,Jm(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Ss=null),Il(n),t=t.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(en,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=z.T,u=P.p,P.p=2,z.T=null;try{for(var f=e.onRecoverableError,p=0;p<a.length;p++){var v=a[p];f(v.value,{componentStack:v.stack})}}finally{z.T=t,P.p=u}}(Za&3)!==0&&qu(),da(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===ud?oc++:(oc=0,ud=e):oc=0,fc(0)}}function Jm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Vr(t)))}function qu(){return $m(),Zm(),Km(),Fm()}function Fm(){if(yn!==5)return!1;var e=ks,t=rd;rd=0;var n=Il(Za),a=z.T,u=P.p;try{P.p=32>n?32:n,z.T=null,n=cd,cd=null;var f=ks,p=Za;if(yn=0,Pi=ks=null,Za=0,(ot&6)!==0)throw Error(r(331));var v=ot;if(ot|=4,Mm(f.current),Am(f,f.current,p,n),ot=v,fc(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(en,f)}catch{}return!0}finally{P.p=u,z.T=a,Jm(e,t)}}function Wm(e,t,n){t=Ml(n,t),t=Gf(e.stateNode,t,2),e=gs(e,t,2),e!==null&&(Tl(e,2),da(e))}function xt(e,t,n){if(e.tag===3)Wm(e,e,n);else for(;t!==null;){if(t.tag===3){Wm(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ss===null||!Ss.has(a))){e=Ml(n,e),n=Pp(2),a=gs(t,n,2),a!==null&&(em(n,a,t,e),Tl(a,2),da(a));break}}t=t.return}}function dd(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new Rx;var u=new Set;a.set(t,u)}else u=a.get(t),u===void 0&&(u=new Set,a.set(t,u));u.has(n)||(ad=!0,u.add(n),e=Lx.bind(null,e,t,n),t.then(e,e))}function Lx(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Nt===e&&(et&n)===n&&(Jt===4||Jt===3&&(et&62914560)===et&&300>ut()-Du?(ot&2)===0&&er(e,0):sd|=n,Wi===et&&(Wi=0)),da(e)}function Pm(e,t){t===0&&(t=hn()),e=je(e,t),e!==null&&(Tl(e,t),da(e))}function Ux(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Pm(e,n)}function Hx(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Pm(e,n)}function Bx(e,t){return bn(e,t)}var Gu=null,nr=null,hd=!1,Yu=!1,pd=!1,js=0;function da(e){e!==nr&&e.next===null&&(nr===null?Gu=nr=e:nr=nr.next=e),Yu=!0,hd||(hd=!0,Gx())}function fc(e,t){if(!pd&&Yu){pd=!0;do for(var n=!1,a=Gu;a!==null;){if(e!==0){var u=a.pendingLanes;if(u===0)var f=0;else{var p=a.suspendedLanes,v=a.pingedLanes;f=(1<<31-pt(42|e)+1)-1,f&=u&~(p&~v),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(n=!0,lg(a,f))}else f=et,f=Gl(a,a===Nt?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(f&3)===0||Yn(a,f)||(n=!0,lg(a,f));a=a.next}while(n);pd=!1}}function qx(){eg()}function eg(){Yu=hd=!1;var e=0;js!==0&&Fx()&&(e=js);for(var t=ut(),n=null,a=Gu;a!==null;){var u=a.next,f=tg(a,t);f===0?(a.next=null,n===null?Gu=u:n.next=u,u===null&&(nr=n)):(n=a,(e!==0||(f&3)!==0)&&(Yu=!0)),a=u}yn!==0&&yn!==5||fc(e),js!==0&&(js=0)}function tg(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var p=31-pt(f),v=1<<p,E=u[p];E===-1?((v&n)===0||(v&a)!==0)&&(u[p]=Hn(v,t)):E<=t&&(e.expiredLanes|=v),f&=~v}if(t=Nt,n=et,n=Gl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(bt===2||bt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&fn(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Yn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&fn(a),Il(n)){case 2:case 8:n=fe;break;case 32:n=Ee;break;case 268435456:n=Tt;break;default:n=Ee}return a=ng.bind(null,e),n=bn(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&fn(a),e.callbackPriority=2,e.callbackNode=null,2}function ng(e,t){if(yn!==0&&yn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(qu()&&e.callbackNode!==n)return null;var a=et;return a=Gl(e,e===Nt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Um(e,a,t),tg(e,ut()),e.callbackNode!=null&&e.callbackNode===n?ng.bind(null,e):null)}function lg(e,t){if(qu())return null;Um(e,t,!0)}function Gx(){Px(function(){(ot&6)!==0?bn(J,qx):eg()})}function md(){if(js===0){var e=Gi;e===0&&(e=_e,_e<<=1,(_e&261888)===0&&(_e=256)),js=e}return js}function ag(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:gn(""+e)}function sg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Yx(e,t,n,a,u){if(t==="submit"&&n&&n.stateNode===u){var f=ag((u[Be]||null).action),p=a.submitter;p&&(t=(t=p[Be]||null)?ag(t.formAction):p.getAttribute("formAction"),t!==null&&(f=t,p=null));var v=new Ks("action","action",null,a,u);e.push({event:v,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(js!==0){var E=p?sg(u,p):new FormData(u);zf(n,{pending:!0,data:E,method:u.method,action:f},null,E)}}else typeof f=="function"&&(v.preventDefault(),E=p?sg(u,p):new FormData(u),zf(n,{pending:!0,data:E,method:u.method,action:f},f,E))},currentTarget:u}]})}}for(var gd=0;gd<Li.length;gd++){var yd=Li[gd],Ix=yd.toLowerCase(),Xx=yd[0].toUpperCase()+yd.slice(1);ll(Ix,"on"+Xx)}ll(Da,"onAnimationEnd"),ll(Gr,"onAnimationIteration"),ll(Yr,"onAnimationStart"),ll("dblclick","onDoubleClick"),ll("focusin","onFocus"),ll("focusout","onBlur"),ll(au,"onTransitionRun"),ll(su,"onTransitionStart"),ll(ef,"onTransitionCancel"),ll(iu,"onTransitionEnd"),gl("onMouseEnter",["mouseout","mouseover"]),gl("onMouseLeave",["mouseout","mouseover"]),gl("onPointerEnter",["pointerout","pointerover"]),gl("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dc="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(" "),Vx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(dc));function ig(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],u=a.event;a=a.listeners;e:{var f=void 0;if(t)for(var p=a.length-1;0<=p;p--){var v=a[p],E=v.instance,Y=v.currentTarget;if(v=v.listener,E!==f&&u.isPropagationStopped())break e;f=v,u.currentTarget=Y;try{f(u)}catch(ee){y(ee)}u.currentTarget=null,f=E}else for(p=0;p<a.length;p++){if(v=a[p],E=v.instance,Y=v.currentTarget,v=v.listener,E!==f&&u.isPropagationStopped())break e;f=v,u.currentTarget=Y;try{f(u)}catch(ee){y(ee)}u.currentTarget=null,f=E}}}}function Pe(e,t){var n=t[ta];n===void 0&&(n=t[ta]=new Set);var a=e+"__bubble";n.has(a)||(rg(t,e,2,!1),n.add(a))}function bd(e,t,n){var a=0;t&&(a|=4),rg(n,e,a,t)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function xd(e){if(!e[Iu]){e[Iu]=!0,Xn.forEach(function(n){n!=="selectionchange"&&(Vx.has(n)||bd(n,!1,e),bd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Iu]||(t[Iu]=!0,bd("selectionchange",!1,t))}}function rg(e,t,n,a){switch(Lg(t)){case 2:var u=x0;break;case 8:u=_0;break;default:u=Dd}n=u.bind(null,t,n,e),u=void 0,!Ci||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),a?u!==void 0?e.addEventListener(t,n,{capture:!0,passive:u}):e.addEventListener(t,n,!0):u!==void 0?e.addEventListener(t,n,{passive:u}):e.addEventListener(t,n,!1)}function _d(e,t,n,a,u){var f=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var p=a.tag;if(p===3||p===4){var v=a.stateNode.containerInfo;if(v===u)break;if(p===4)for(p=a.return;p!==null;){var E=p.tag;if((E===3||E===4)&&p.stateNode.containerInfo===u)return;p=p.return}for(;v!==null;){if(p=na(v),p===null)return;if(E=p.tag,E===5||E===6||E===26||E===27){a=f=p;continue e}v=v.parentNode}}a=a.return}Ai(function(){var Y=f,ee=It(n),le=[];e:{var X=zi.get(e);if(X!==void 0){var Z=Ks,ke=e;switch(e){case"keypress":if($s(n)===0)break e;case"keydown":case"keyup":Z=Bc;break;case"focusin":ke="focus",Z=Ar;break;case"focusout":ke="blur",Z=Ar;break;case"beforeblur":case"afterblur":Z=Ar;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":Z=ie;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=Er;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Gc;break;case Da:case Gr:case Yr:Z=ye;break;case iu:Z=Io;break;case"scroll":case"scrollend":Z=Ri;break;case"wheel":Z=Or;break;case"copy":case"cut":case"paste":Z=Lo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=qc;break;case"toggle":case"beforetoggle":Z=Vo}var ze=(t&4)!==0,kt=!ze&&(e==="scroll"||e==="scrollend"),D=ze?X!==null?X+"Capture":null:X;ze=[];for(var R=Y,G;R!==null;){var ne=R;if(G=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||G===null||D===null||(ne=Vs(R,D),ne!=null&&ze.push(hc(R,ne,G))),kt)break;R=R.return}0<ze.length&&(X=new Z(X,ke,null,n,ee),le.push({event:X,listeners:ze}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",X&&n!==Mt&&(ke=n.relatedTarget||n.fromElement)&&(na(ke)||ke[pn]))break e;if((Z||X)&&(X=ee.window===ee?ee:(X=ee.ownerDocument)?X.defaultView||X.parentWindow:window,Z?(ke=n.relatedTarget||n.toElement,Z=Y,ke=ke?na(ke):null,ke!==null&&(kt=d(ke),ze=ke.tag,ke!==kt||ze!==5&&ze!==27&&ze!==6)&&(ke=null)):(Z=null,ke=Y),Z!==ke)){if(ze=ie,ne="onMouseLeave",D="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(ze=qc,ne="onPointerLeave",D="onPointerEnter",R="pointer"),kt=Z==null?X:ml(Z),G=ke==null?X:ml(ke),X=new ze(ne,R+"leave",Z,n,ee),X.target=kt,X.relatedTarget=G,ne=null,na(ee)===Y&&(ze=new ze(D,R+"enter",ke,n,ee),ze.target=G,ze.relatedTarget=kt,ne=ze),kt=ne,Z&&ke)t:{for(ze=Qx,D=Z,R=ke,G=0,ne=D;ne;ne=ze(ne))G++;ne=0;for(var Oe=R;Oe;Oe=ze(Oe))ne++;for(;0<G-ne;)D=ze(D),G--;for(;0<ne-G;)R=ze(R),ne--;for(;G--;){if(D===R||R!==null&&D===R.alternate){ze=D;break t}D=ze(D),R=ze(R)}ze=null}else ze=null;Z!==null&&cg(le,X,Z,ze,!1),ke!==null&&kt!==null&&cg(le,kt,ke,ze,!0)}}e:{if(X=Y?ml(Y):window,Z=X.nodeName&&X.nodeName.toLowerCase(),Z==="select"||Z==="input"&&X.type==="file")var rt=Wc;else if(Jc(X))if(Pc)rt=Wo;else{rt=Jo;var Ae=Ko}else Z=X.nodeName,!Z||Z.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Y&&De(Y.elementType)&&(rt=Wc):rt=Fo;if(rt&&(rt=rt(e,Y))){Fc(le,rt,n,ee);break e}Ae&&Ae(e,X,Y),e==="focusout"&&Y&&X.type==="number"&&Y.memoizedProps.value!=null&&xl(X,"number",X.value)}switch(Ae=Y?ml(Y):window,e){case"focusin":(Jc(Ae)||Ae.contentEditable==="true")&&(Oa=Ae,is=Y,rs=null);break;case"focusout":rs=is=Oa=null;break;case"mousedown":qr=!0;break;case"contextmenu":case"mouseup":case"dragend":qr=!1,cs(le,n,ee);break;case"selectionchange":if(Br)break;case"keydown":case"keyup":cs(le,n,ee)}var $e;if(Dr)e:{switch(e){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else as?$c(e,n)&&(tt="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(tt="onCompositionStart");tt&&(Vc&&n.locale!=="ko"&&(as||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&as&&($e=Cl()):(Xt=ee,vn="value"in Xt?Xt.value:Xt.textContent,as=!0)),Ae=Xu(Y,tt),0<Ae.length&&(tt=new Hc(tt,e,null,n,ee),le.push({event:tt,listeners:Ae}),$e?tt.data=$e:($e=Zc(n),$e!==null&&(tt.data=$e)))),($e=Xc?Kc(e,n):$o(e,n))&&(tt=Xu(Y,"onBeforeInput"),0<tt.length&&(Ae=new Hc("onBeforeInput","beforeinput",null,n,ee),le.push({event:Ae,listeners:tt}),Ae.data=$e)),Yx(le,e,Y,n,ee)}ig(le,t)})}function hc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xu(e,t){for(var n=t+"Capture",a=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=Vs(e,n),u!=null&&a.unshift(hc(e,u,f)),u=Vs(e,t),u!=null&&a.push(hc(e,u,f))),e.tag===3)return a;e=e.return}return[]}function Qx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cg(e,t,n,a,u){for(var f=t._reactName,p=[];n!==null&&n!==a;){var v=n,E=v.alternate,Y=v.stateNode;if(v=v.tag,E!==null&&E===a)break;v!==5&&v!==26&&v!==27||Y===null||(E=Y,u?(Y=Vs(n,f),Y!=null&&p.unshift(hc(n,Y,E))):u||(Y=Vs(n,f),Y!=null&&p.push(hc(n,Y,E)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var $x=/\r\n?/g,Zx=/\u0000|\uFFFD/g;function ug(e){return(typeof e=="string"?e:""+e).replace($x,`
|
|
50
|
-
`).replace(Zx,"")}function og(e,t){return t=ug(t),ug(e)===t}function St(e,t,n,a,u,f){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||U(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&U(e,""+a);break;case"className":bl(e,"class",a);break;case"tabIndex":bl(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":bl(e,n,a);break;case"style":Ce(e,a,f);break;case"data":if(t!=="object"){bl(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=gn(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(n==="formAction"?(t!=="input"&&St(e,t,"name",u.name,u,null),St(e,t,"formEncType",u.formEncType,u,null),St(e,t,"formMethod",u.formMethod,u,null),St(e,t,"formTarget",u.formTarget,u,null)):(St(e,t,"encType",u.encType,u,null),St(e,t,"method",u.method,u,null),St(e,t,"target",u.target,u,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=gn(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=gt);break;case"onScroll":a!=null&&Pe("scroll",e);break;case"onScrollEnd":a!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=gn(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),Qn(e,"popover",a);break;case"xlinkActuate":mn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":mn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":mn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":mn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":mn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":mn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":mn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":mn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":mn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Qn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=jt.get(n)||n,Qn(e,n,a))}}function vd(e,t,n,a,u,f){switch(n){case"style":Ce(e,a,f);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof a=="string"?U(e,a):(typeof a=="number"||typeof a=="bigint")&&U(e,""+a);break;case"onScroll":a!=null&&Pe("scroll",e);break;case"onScrollEnd":a!=null&&Pe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=gt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ti.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(u=n.endsWith("Capture"),t=n.slice(2,u?n.length-7:void 0),f=e[Be]||null,f=f!=null?f[n]:null,typeof f=="function"&&e.removeEventListener(t,f,u),typeof a=="function")){typeof f!="function"&&f!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,u);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Qn(e,n,a)}}}function Dn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var a=!1,u=!1,f;for(f in n)if(n.hasOwnProperty(f)){var p=n[f];if(p!=null)switch(f){case"src":a=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:St(e,t,f,p,n,null)}}u&&St(e,t,"srcSet",n.srcSet,n,null),a&&St(e,t,"src",n.src,n,null);return;case"input":Pe("invalid",e);var v=f=p=u=null,E=null,Y=null;for(a in n)if(n.hasOwnProperty(a)){var ee=n[a];if(ee!=null)switch(a){case"name":u=ee;break;case"type":p=ee;break;case"checked":E=ee;break;case"defaultChecked":Y=ee;break;case"value":f=ee;break;case"defaultValue":v=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,t));break;default:St(e,t,a,ee,n,null)}}ia(e,f,v,E,Y,p,u,!1);return;case"select":Pe("invalid",e),a=p=f=null;for(u in n)if(n.hasOwnProperty(u)&&(v=n[u],v!=null))switch(u){case"value":f=v;break;case"defaultValue":p=v;break;case"multiple":a=v;default:St(e,t,u,v,n,null)}t=f,n=p,e.multiple=!!a,t!=null?Pn(e,!!a,t,!1):n!=null&&Pn(e,!!a,n,!0);return;case"textarea":Pe("invalid",e),f=u=a=null;for(p in n)if(n.hasOwnProperty(p)&&(v=n[p],v!=null))switch(p){case"value":a=v;break;case"defaultValue":u=v;break;case"children":f=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:St(e,t,p,v,n,null)}w(e,a,u,f);return;case"option":for(E in n)if(n.hasOwnProperty(E)&&(a=n[E],a!=null))switch(E){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:St(e,t,E,a,n,null)}return;case"dialog":Pe("beforetoggle",e),Pe("toggle",e),Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(a=0;a<dc.length;a++)Pe(dc[a],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in n)if(n.hasOwnProperty(Y)&&(a=n[Y],a!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:St(e,t,Y,a,n,null)}return;default:if(De(t)){for(ee in n)n.hasOwnProperty(ee)&&(a=n[ee],a!==void 0&&vd(e,t,ee,a,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(a=n[v],a!=null&&St(e,t,v,a,n,null))}function Kx(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,p=null,v=null,E=null,Y=null,ee=null;for(Z in n){var le=n[Z];if(n.hasOwnProperty(Z)&&le!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":E=le;default:a.hasOwnProperty(Z)||St(e,t,Z,null,a,le)}}for(var X in a){var Z=a[X];if(le=n[X],a.hasOwnProperty(X)&&(Z!=null||le!=null))switch(X){case"type":f=Z;break;case"name":u=Z;break;case"checked":Y=Z;break;case"defaultChecked":ee=Z;break;case"value":p=Z;break;case"defaultValue":v=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,t));break;default:Z!==le&&St(e,t,X,Z,a,le)}}Xs(e,p,v,E,Y,ee,f,u);return;case"select":Z=p=v=X=null;for(f in n)if(E=n[f],n.hasOwnProperty(f)&&E!=null)switch(f){case"value":break;case"multiple":Z=E;default:a.hasOwnProperty(f)||St(e,t,f,null,a,E)}for(u in a)if(f=a[u],E=n[u],a.hasOwnProperty(u)&&(f!=null||E!=null))switch(u){case"value":X=f;break;case"defaultValue":v=f;break;case"multiple":p=f;default:f!==E&&St(e,t,u,f,a,E)}t=v,n=p,a=Z,X!=null?Pn(e,!!n,X,!1):!!a!=!!n&&(t!=null?Pn(e,!!n,t,!0):Pn(e,!!n,n?[]:"",!1));return;case"textarea":Z=X=null;for(v in n)if(u=n[v],n.hasOwnProperty(v)&&u!=null&&!a.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:St(e,t,v,null,a,u)}for(p in a)if(u=a[p],f=n[p],a.hasOwnProperty(p)&&(u!=null||f!=null))switch(p){case"value":X=u;break;case"defaultValue":Z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==f&&St(e,t,p,u,a,f)}ue(e,X,Z);return;case"option":for(var ke in n)if(X=n[ke],n.hasOwnProperty(ke)&&X!=null&&!a.hasOwnProperty(ke))switch(ke){case"selected":e.selected=!1;break;default:St(e,t,ke,null,a,X)}for(E in a)if(X=a[E],Z=n[E],a.hasOwnProperty(E)&&X!==Z&&(X!=null||Z!=null))switch(E){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:St(e,t,E,X,a,Z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ze in n)X=n[ze],n.hasOwnProperty(ze)&&X!=null&&!a.hasOwnProperty(ze)&&St(e,t,ze,null,a,X);for(Y in a)if(X=a[Y],Z=n[Y],a.hasOwnProperty(Y)&&X!==Z&&(X!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,t));break;default:St(e,t,Y,X,a,Z)}return;default:if(De(t)){for(var kt in n)X=n[kt],n.hasOwnProperty(kt)&&X!==void 0&&!a.hasOwnProperty(kt)&&vd(e,t,kt,void 0,a,X);for(ee in a)X=a[ee],Z=n[ee],!a.hasOwnProperty(ee)||X===Z||X===void 0&&Z===void 0||vd(e,t,ee,X,a,Z);return}}for(var D in n)X=n[D],n.hasOwnProperty(D)&&X!=null&&!a.hasOwnProperty(D)&&St(e,t,D,null,a,X);for(le in a)X=a[le],Z=n[le],!a.hasOwnProperty(le)||X===Z||X==null&&Z==null||St(e,t,le,X,a,Z)}function fg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var u=n[a],f=u.transferSize,p=u.initiatorType,v=u.duration;if(f&&v&&fg(p)){for(p=0,v=u.responseEnd,a+=1;a<n.length;a++){var E=n[a],Y=E.startTime;if(Y>v)break;var ee=E.transferSize,le=E.initiatorType;ee&&fg(le)&&(E=E.responseEnd,p+=ee*(E<v?1:(v-Y)/(E-Y)))}if(--a,t+=8*(f+p)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Sd=null,kd=null;function Vu(e){return e.nodeType===9?e:e.ownerDocument}function dg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function wd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var jd=null;function Fx(){var e=window.event;return e&&e.type==="popstate"?e===jd?!1:(jd=e,!0):(jd=null,!1)}var pg=typeof setTimeout=="function"?setTimeout:void 0,Wx=typeof clearTimeout=="function"?clearTimeout:void 0,mg=typeof Promise=="function"?Promise:void 0,Px=typeof queueMicrotask=="function"?queueMicrotask:typeof mg<"u"?function(e){return mg.resolve(null).then(e).catch(e0)}:pg;function e0(e){setTimeout(function(){throw e})}function Ns(e){return e==="head"}function gg(e,t){var n=t,a=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(u),ir(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")pc(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,pc(n);for(var f=n.firstChild;f;){var p=f.nextSibling,v=f.nodeName;f[hl]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&f.rel.toLowerCase()==="stylesheet"||n.removeChild(f),f=p}}else n==="body"&&pc(e.ownerDocument.body);n=u}while(n);ir(t)}function yg(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Nd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Nd(n),pl(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function t0(e,t,n,a){for(;e.nodeType===1;){var u=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[hl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Ul(e.nextSibling),e===null)break}return null}function n0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ul(e.nextSibling),e===null))return null;return e}function bg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ul(e.nextSibling),e===null))return null;return e}function Td(e){return e.data==="$?"||e.data==="$~"}function Ed(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function l0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Ul(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ad=null;function xg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ul(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function _g(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function vg(e,t,n){switch(t=Vu(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function pc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pl(e)}var Hl=new Map,Sg=new Set;function Qu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ka=P.d;P.d={f:a0,r:s0,D:i0,C:r0,L:c0,m:u0,X:f0,S:o0,M:d0};function a0(){var e=Ka.f(),t=Uu();return e||t}function s0(e){var t=Cn(e);t!==null&&t.tag===5&&t.type==="form"?Bp(t):Ka.r(e)}var lr=typeof document>"u"?null:document;function kg(e,t,n){var a=lr;if(a&&typeof t=="string"&&t){var u=nn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),Sg.has(u)||(Sg.add(u),e={rel:e,crossOrigin:n,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),Dn(t,"link",e),mt(t),a.head.appendChild(t)))}}function i0(e){Ka.D(e),kg("dns-prefetch",e,null)}function r0(e,t){Ka.C(e,t),kg("preconnect",e,t)}function c0(e,t,n){Ka.L(e,t,n);var a=lr;if(a&&e&&t){var u='link[rel="preload"][as="'+nn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+nn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+nn(n.imageSizes)+'"]')):u+='[href="'+nn(e)+'"]';var f=u;switch(t){case"style":f=ar(e);break;case"script":f=sr(e)}Hl.has(f)||(e=k({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Hl.set(f,e),a.querySelector(u)!==null||t==="style"&&a.querySelector(mc(f))||t==="script"&&a.querySelector(gc(f))||(t=a.createElement("link"),Dn(t,"link",e),mt(t),a.head.appendChild(t)))}}function u0(e,t){Ka.m(e,t);var n=lr;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+nn(a)+'"][href="'+nn(e)+'"]',f=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=sr(e)}if(!Hl.has(f)&&(e=k({rel:"modulepreload",href:e},t),Hl.set(f,e),n.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gc(f)))return}a=n.createElement("link"),Dn(a,"link",e),mt(a),n.head.appendChild(a)}}}function o0(e,t,n){Ka.S(e,t,n);var a=lr;if(a&&e){var u=tn(a).hoistableStyles,f=ar(e);t=t||"default";var p=u.get(f);if(!p){var v={loading:0,preload:null};if(p=a.querySelector(mc(f)))v.loading=5;else{e=k({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Hl.get(f))&&Cd(e,n);var E=p=a.createElement("link");mt(E),Dn(E,"link",e),E._p=new Promise(function(Y,ee){E.onload=Y,E.onerror=ee}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,$u(p,t,a)}p={type:"stylesheet",instance:p,count:1,state:v},u.set(f,p)}}}function f0(e,t){Ka.X(e,t);var n=lr;if(n&&e){var a=tn(n).hoistableScripts,u=sr(e),f=a.get(u);f||(f=n.querySelector(gc(u)),f||(e=k({src:e,async:!0},t),(t=Hl.get(u))&&Rd(e,t),f=n.createElement("script"),mt(f),Dn(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}function d0(e,t){Ka.M(e,t);var n=lr;if(n&&e){var a=tn(n).hoistableScripts,u=sr(e),f=a.get(u);f||(f=n.querySelector(gc(u)),f||(e=k({src:e,async:!0,type:"module"},t),(t=Hl.get(u))&&Rd(e,t),f=n.createElement("script"),mt(f),Dn(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}function wg(e,t,n,a){var u=(u=Te.current)?Qu(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ar(n.href),n=tn(u).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ar(n.href);var f=tn(u).hoistableStyles,p=f.get(e);if(p||(u=u.ownerDocument||u,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,p),(f=u.querySelector(mc(e)))&&!f._p&&(p.instance=f,p.state.loading=5),Hl.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Hl.set(e,n),f||h0(u,e,n,p.state))),t&&a===null)throw Error(r(528,""));return p}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=sr(n),n=tn(u).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ar(e){return'href="'+nn(e)+'"'}function mc(e){return'link[rel="stylesheet"]['+e+"]"}function jg(e){return k({},e,{"data-precedence":e.precedence,precedence:null})}function h0(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Dn(t,"link",n),mt(t),e.head.appendChild(t))}function sr(e){return'[src="'+nn(e)+'"]'}function gc(e){return"script[async]"+e}function Ng(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+nn(n.href)+'"]');if(a)return t.instance=a,mt(a),a;var u=k({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),mt(a),Dn(a,"style",u),$u(a,n.precedence,e),t.instance=a;case"stylesheet":u=ar(n.href);var f=e.querySelector(mc(u));if(f)return t.state.loading|=4,t.instance=f,mt(f),f;a=jg(n),(u=Hl.get(u))&&Cd(a,u),f=(e.ownerDocument||e).createElement("link"),mt(f);var p=f;return p._p=new Promise(function(v,E){p.onload=v,p.onerror=E}),Dn(f,"link",a),t.state.loading|=4,$u(f,n.precedence,e),t.instance=f;case"script":return f=sr(n.src),(u=e.querySelector(gc(f)))?(t.instance=u,mt(u),u):(a=n,(u=Hl.get(f))&&(a=k({},n),Rd(a,u)),e=e.ownerDocument||e,u=e.createElement("script"),mt(u),Dn(u,"link",a),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,$u(a,n.precedence,e));return t.instance}function $u(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,f=u,p=0;p<a.length;p++){var v=a[p];if(v.dataset.precedence===t)f=v;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Cd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Rd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zu=null;function Tg(e,t,n){if(Zu===null){var a=new Map,u=Zu=new Map;u.set(n,a)}else u=Zu,a=u.get(n),a||(a=new Map,u.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),u=0;u<n.length;u++){var f=n[u];if(!(f[hl]||f[Rt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var p=f.getAttribute(t)||"";p=e+p;var v=a.get(p);v?v.push(f):a.set(p,[f])}}return a}function Eg(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function p0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ag(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function m0(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=ar(a.href),f=t.querySelector(mc(u));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ku.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=f,mt(f);return}f=t.ownerDocument||t,a=jg(a),(u=Hl.get(u))&&Cd(a,u),f=f.createElement("link"),mt(f);var p=f;p._p=new Promise(function(v,E){p.onload=v,p.onerror=E}),Dn(f,"link",a),n.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ku.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Md=0;function g0(e,t){return e.stylesheets&&e.count===0&&Fu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Fu(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Md===0&&(Md=62500*Jx());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Fu(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Md?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Ku(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ju=null;function Fu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ju=new Map,t.forEach(y0,e),Ju=null,Ku.call(e))}function y0(e,t){if(!(t.state.loading&4)){var n=Ju.get(e);if(n)var a=n.get(null);else{n=new Map,Ju.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var p=u[f];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(n.set(p.dataset.precedence,p),a=p)}a&&n.set(null,a)}u=t.instance,p=u.getAttribute("data-precedence"),f=n.get(p)||a,f===a&&n.set(null,u),n.set(p,u),this.count++,a=Ku.bind(this),u.addEventListener("load",a),u.addEventListener("error",a),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var yc={$$typeof:$,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function b0(e,t,n,a,u,f,p,v,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.hiddenUpdates=Gt(null),this.identifierPrefix=a,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Cg(e,t,n,a,u,f,p,v,E,Y,ee,le){return e=new b0(e,t,n,p,E,Y,ee,le,v),t=1,f===!0&&(t|=24),f=Ft(3,null,null,t),e.current=f,f.stateNode=e,t=ff(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:a,isDehydrated:n,cache:t},mf(f),e}function Rg(e){return e?(e=yt,e):yt}function Mg(e,t,n,a,u,f){u=Rg(u),a.context===null?a.context=u:a.pendingContext=u,a=ms(t),a.payload={element:n},f=f===void 0?null:f,f!==null&&(a.callback=f),n=gs(e,a,t),n!==null&&(cl(n,e,t),Kr(n,e,t))}function Og(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Od(e,t){Og(e,t),(e=e.alternate)&&Og(e,t)}function Dg(e){if(e.tag===13||e.tag===31){var t=je(e,67108864);t!==null&&cl(t,e,67108864),Od(e,67108864)}}function zg(e){if(e.tag===13||e.tag===31){var t=jl();t=Pa(t);var n=je(e,t);n!==null&&cl(n,e,t),Od(e,t)}}var Wu=!0;function x0(e,t,n,a){var u=z.T;z.T=null;var f=P.p;try{P.p=2,Dd(e,t,n,a)}finally{P.p=f,z.T=u}}function _0(e,t,n,a){var u=z.T;z.T=null;var f=P.p;try{P.p=8,Dd(e,t,n,a)}finally{P.p=f,z.T=u}}function Dd(e,t,n,a){if(Wu){var u=zd(a);if(u===null)_d(e,t,a,Pu,n),Ug(e,a);else if(S0(u,e,t,n,a))a.stopPropagation();else if(Ug(e,a),t&4&&-1<v0.indexOf(e)){for(;u!==null;){var f=Cn(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=An(f.pendingLanes);if(p!==0){var v=f;for(v.pendingLanes|=2,v.entangledLanes|=2;p;){var E=1<<31-pt(p);v.entanglements[1]|=E,p&=~E}da(f),(ot&6)===0&&(zu=ut()+500,fc(0))}}break;case 31:case 13:v=je(f,2),v!==null&&cl(v,f,2),Uu(),Od(f,2)}if(f=zd(a),f===null&&_d(e,t,a,Pu,n),f===u)break;u=f}u!==null&&a.stopPropagation()}else _d(e,t,a,null,n)}}function zd(e){return e=It(e),Ld(e)}var Pu=null;function Ld(e){if(Pu=null,e=na(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=g(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 Pu=e,null}function Lg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(dn()){case J:return 2;case fe:return 8;case Ee:case Qe:return 32;case Tt:return 268435456;default:return 32}default:return 32}}var Ud=!1,Ts=null,Es=null,As=null,bc=new Map,xc=new Map,Cs=[],v0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ug(e,t){switch(e){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":Es=null;break;case"mouseover":case"mouseout":As=null;break;case"pointerover":case"pointerout":bc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xc.delete(t.pointerId)}}function _c(e,t,n,a,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:f,targetContainers:[u]},t!==null&&(t=Cn(t),t!==null&&Dg(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function S0(e,t,n,a,u){switch(t){case"focusin":return Ts=_c(Ts,e,t,n,a,u),!0;case"dragenter":return Es=_c(Es,e,t,n,a,u),!0;case"mouseover":return As=_c(As,e,t,n,a,u),!0;case"pointerover":var f=u.pointerId;return bc.set(f,_c(bc.get(f)||null,e,t,n,a,u)),!0;case"gotpointercapture":return f=u.pointerId,xc.set(f,_c(xc.get(f)||null,e,t,n,a,u)),!0}return!1}function Hg(e){var t=na(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,fl(e.priority,function(){zg(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,fl(e.priority,function(){zg(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 eo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=zd(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Mt=a,n.target.dispatchEvent(a),Mt=null}else return t=Cn(n),t!==null&&Dg(t),e.blockedOn=n,!1;t.shift()}return!0}function Bg(e,t,n){eo(e)&&n.delete(t)}function k0(){Ud=!1,Ts!==null&&eo(Ts)&&(Ts=null),Es!==null&&eo(Es)&&(Es=null),As!==null&&eo(As)&&(As=null),bc.forEach(Bg),xc.forEach(Bg)}function to(e,t){e.blockedOn===t&&(e.blockedOn=null,Ud||(Ud=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,k0)))}var no=null;function qg(e){no!==e&&(no=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){no===e&&(no=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],u=e[t+2];if(typeof a!="function"){if(Ld(a||n)===null)continue;break}var f=Cn(n);f!==null&&(e.splice(t,3),t-=3,zf(f,{pending:!0,data:u,method:n.method,action:a},a,u))}}))}function ir(e){function t(E){return to(E,e)}Ts!==null&&to(Ts,e),Es!==null&&to(Es,e),As!==null&&to(As,e),bc.forEach(t),xc.forEach(t);for(var n=0;n<Cs.length;n++){var a=Cs[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Cs.length&&(n=Cs[0],n.blockedOn===null);)Hg(n),n.blockedOn===null&&Cs.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var u=n[a],f=n[a+1],p=u[Be]||null;if(typeof f=="function")p||qg(n);else if(p){var v=null;if(f&&f.hasAttribute("formAction")){if(u=f,p=f[Be]||null)v=p.formAction;else if(Ld(u)!==null)continue}else v=p.action;typeof v=="function"?n[a+1]=v:(n.splice(a,3),a-=3),qg(n)}}}function Gg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return u=p})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Hd(e){this._internalRoot=e}lo.prototype.render=Hd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,a=jl();Mg(n,a,e,t,null,null)},lo.prototype.unmount=Hd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mg(e.current,2,null,e,null,null),Uu(),t[pn]=null}};function lo(e){this._internalRoot=e}lo.prototype.unstable_scheduleHydration=function(e){if(e){var t=ja();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cs.length&&t!==0&&t<Cs[n].priority;n++);Cs.splice(n,0,e),n===0&&Hg(e)}};var Yg=l.version;if(Yg!=="19.2.8")throw Error(r(527,Yg,"19.2.8"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=b(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var w0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ao=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ao.isDisabled&&ao.supportsFiber)try{en=ao.inject(w0),qt=ao}catch{}}return Sc.createRoot=function(e,t){if(!o(e))throw Error(r(299));var n=!1,a="",u=Kp,f=Jp,p=Fp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=Cg(e,1,!1,null,null,n,a,null,u,f,p,Gg),e[pn]=t.current,xd(e),new Hd(t)},Sc.hydrateRoot=function(e,t,n){if(!o(e))throw Error(r(299));var a=!1,u="",f=Kp,p=Jp,v=Fp,E=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(E=n.formState)),t=Cg(e,1,!0,t,n??null,a,u,E,f,p,v,Gg),t.context=Rg(null),n=t.current,a=jl(),a=Pa(a),u=ms(a),u.callback=null,gs(n,u,a),n=a,t.current.lanes=n,Tl(t,n),da(t),e[pn]=t.current,xd(e),new lo(t)},Sc.version="19.2.8",Sc}var Pg;function L0(){if(Pg)return Yd.exports;Pg=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(l){console.error(l)}}return s(),Yd.exports=z0(),Yd.exports}var U0=L0();const hb=1;var Wa,yr,br,xr,_r,zc,vr,Ro,pb;class H0{constructor(l){$t(this,Ro);$t(this,Wa,null);$t(this,yr,new Set);$t(this,br,500);$t(this,xr,null);$t(this,_r,!1);$t(this,zc,null);$t(this,vr,null);this.url=l}get statusText(){return this.connected?"Хост на связи":"Нет связи с хостом"}onStatus(l){ft(this,vr,l)}connect(){if(Ue(this,_r))return;const l=new WebSocket(this.url);ft(this,Wa,l),l.addEventListener("open",()=>{var i,r;ft(this,br,500),this.send({type:"hello",protocol:hb,clientName:"ccv-web"}),(i=Ue(this,zc))==null||i.call(this),(r=Ue(this,vr))==null||r.call(this)}),l.addEventListener("message",i=>{let r;try{r=JSON.parse(String(i.data))}catch{return}for(const o of Ue(this,yr))o(r)}),l.addEventListener("close",()=>{var i;ft(this,Wa,null),(i=Ue(this,vr))==null||i.call(this),un(this,Ro,pb).call(this)}),l.addEventListener("error",()=>l.close())}onReconnect(l){ft(this,zc,l)}on(l){return Ue(this,yr).add(l),()=>Ue(this,yr).delete(l)}send(l){var i;((i=Ue(this,Wa))==null?void 0:i.readyState)===WebSocket.OPEN&&Ue(this,Wa).send(JSON.stringify(l))}get connected(){var l;return((l=Ue(this,Wa))==null?void 0:l.readyState)===WebSocket.OPEN}close(){var l;ft(this,_r,!0),(l=Ue(this,Wa))==null||l.close()}}Wa=new WeakMap,yr=new WeakMap,br=new WeakMap,xr=new WeakMap,_r=new WeakMap,zc=new WeakMap,vr=new WeakMap,Ro=new WeakSet,pb=function(){if(Ue(this,_r)||Ue(this,xr)!==null)return;const l=Ue(this,br);ft(this,br,Math.min(l*2,1e4)),ft(this,xr,window.setTimeout(()=>{ft(this,xr,null),this.connect()},l))};const B0=1,mb="ccv:relay",bo="ccv:relay.host";function q0(){try{const s=localStorage.getItem(mb);if(!s)return null;const l=JSON.parse(s);return typeof(l==null?void 0:l.token)!="string"||typeof l.expiresAt=="number"&&l.expiresAt<=Date.now()?null:l}catch{return null}}function gb(){localStorage.removeItem(mb)}var _a,Sr,va,kr,wr,Hs,yi,bi,Bs,xi,jr,_i,vi,Ut,Ds,oh,yb,mi,fh;class G0{constructor(l){$t(this,Ut);$t(this,_a,null);$t(this,Sr,new Set);$t(this,va,null);$t(this,kr,null);$t(this,wr,500);$t(this,Hs,null);$t(this,yi,!1);$t(this,bi,!1);$t(this,Bs,!1);$t(this,xi,null);$t(this,jr,"Подключаемся…");$t(this,_i,0);$t(this,vi,[]);this.session=l}get connected(){return Ue(this,bi)&&Ue(this,Bs)}get statusText(){return Ue(this,jr)}get hostId(){return Ue(this,xi)}on(l){return Ue(this,Sr).add(l),()=>Ue(this,Sr).delete(l)}onReconnect(l){ft(this,kr,l)}onStatus(l){ft(this,va,l)}connect(){Ue(this,yi)||un(this,Ut,oh).call(this)}send(l){if(!Ue(this,bi)){Ue(this,vi).length<64&&Ue(this,vi).push(l);return}un(this,Ut,mi).call(this,{t:"client.frame",body:l})}close(){var l;ft(this,yi,!0),Ue(this,Hs)!==null&&window.clearTimeout(Ue(this,Hs)),(l=Ue(this,_a))==null||l.close()}}_a=new WeakMap,Sr=new WeakMap,va=new WeakMap,kr=new WeakMap,wr=new WeakMap,Hs=new WeakMap,yi=new WeakMap,bi=new WeakMap,Bs=new WeakMap,xi=new WeakMap,jr=new WeakMap,_i=new WeakMap,vi=new WeakMap,Ut=new WeakSet,Ds=function(l){var i;Ue(this,jr)!==l&&(ft(this,jr,l),(i=Ue(this,va))==null||i.call(this))},oh=async function(){if(Ue(this,_a))return;if(!Ue(this,xi))try{ft(this,xi,await Y0(this.session.token))}catch(r){un(this,Ut,Ds).call(this,r instanceof Error?r.message:String(r)),un(this,Ut,fh).call(this);return}const l=location.protocol==="https:"?"wss":"ws",i=new WebSocket(`${l}://${location.host}/relay/client`);ft(this,_a,i),i.addEventListener("open",()=>{un(this,Ut,mi).call(this,{t:"client.hello",protocol:B0,token:this.session.token})}),i.addEventListener("message",r=>{let o;try{o=JSON.parse(String(r.data))}catch{return}un(this,Ut,yb).call(this,o)}),i.addEventListener("close",()=>{var r;ft(this,_a,null),ft(this,bi,!1),ft(this,Bs,!1),un(this,Ut,Ds).call(this,"Нет связи с сервером"),(r=Ue(this,va))==null||r.call(this),un(this,Ut,fh).call(this)}),i.addEventListener("error",()=>i.close())},yb=function(l){var i,r,o,d,h,g,m;switch(l.t){case"client.ok":ft(this,wr,500),un(this,Ut,mi).call(this,{t:"client.attach",hostId:Ue(this,xi)??"",...Ue(this,_i)>0?{sinceRseq:Ue(this,_i)}:{}});return;case"client.attached":ft(this,bi,!0),ft(this,Bs,l.online),ft(this,_i,l.rseq),un(this,Ut,Ds).call(this,l.online?"Хост на связи":"Компьютер не на связи"),un(this,Ut,mi).call(this,{t:"client.frame",body:{type:"hello",protocol:hb,clientName:"ccv-web-relay"}});const b=Ue(this,vi);ft(this,vi,[]);for(const x of b)un(this,Ut,mi).call(this,{t:"client.frame",body:x});(i=Ue(this,kr))==null||i.call(this),(r=Ue(this,va))==null||r.call(this);return;case"host.frame":{l.rseq>0&&ft(this,_i,l.rseq);const x=l.body;for(const k of Ue(this,Sr))k(x);return}case"host.online":ft(this,Bs,!0),un(this,Ut,Ds).call(this,"Хост на связи"),(o=Ue(this,kr))==null||o.call(this),(d=Ue(this,va))==null||d.call(this);return;case"host.offline":ft(this,Bs,!1),un(this,Ut,Ds).call(this,"Компьютер не на связи"),(h=Ue(this,va))==null||h.call(this);return;case"ping":un(this,Ut,mi).call(this,{t:"pong",nonce:l.nonce});return;case"error":if(l.code==="auth"){gb(),location.href="/login";return}if(l.code==="not_found"){localStorage.removeItem(bo),un(this,Ut,Ds).call(this,"Этот компьютер отвязан от аккаунта"),ft(this,yi,!0),(g=Ue(this,_a))==null||g.close();return}l.code!=="offline"&&un(this,Ut,Ds).call(this,l.message),(m=Ue(this,va))==null||m.call(this);return}},mi=function(l){var i;((i=Ue(this,_a))==null?void 0:i.readyState)===WebSocket.OPEN&&Ue(this,_a).send(JSON.stringify(l))},fh=function(){if(Ue(this,yi)||Ue(this,Hs)!==null)return;const l=Ue(this,wr);ft(this,wr,Math.min(l*2,1e4)),ft(this,Hs,window.setTimeout(()=>{ft(this,Hs,null),un(this,Ut,oh).call(this)},l))};async function Y0(s){const l=new URLSearchParams(location.search).get("host");if(l)return localStorage.setItem(bo,l),l;const i=localStorage.getItem(bo);if(i)return i;const r=await fetch("/api/hosts",{headers:{authorization:`Bearer ${s}`}});if(r.status===401)throw gb(),location.href="/login",new Error("нужен вход");const d=(await r.json()).hosts??[];if(d.length===1&&d[0])return localStorage.setItem(bo,d[0].id),d[0].id;throw location.href="/hosts",new Error("выберите компьютер")}function xo(){return location.pathname==="/app"||location.pathname.startsWith("/app/")?"relay":"local"}const I0=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws`;function X0(){if(xo()==="local")return new H0(I0);const s=q0();return s?new G0(s):(location.replace(`/login?next=${encodeURIComponent(location.pathname+location.search)}`),null)}const ul={items:[],pending:[],lastSeq:0,contextTokens:null},Qd={entries:[],total:0,loading:!1};function bb(s){var l;return((l=s.entries[0])==null?void 0:l.seq)??1}function ey(s){return s.total>0&&bb(s)>1}function V0(s,l){const i=new Set(s.entries.map(o=>o.seq));return{entries:[...s.entries,...l.entries.filter(o=>!i.has(o.seq))].sort((o,d)=>o.seq-d.seq),total:l.total,loading:!1}}function Q0(s){return _o(ul,s).items.map(l=>({...l,id:`h:${l.id}`}))}function _o(s,l){let i=s;for(const r of l)r.seq<=i.lastSeq||(i={...$0(i,r.event,r.seq),lastSeq:r.seq});return i}function $0(s,l,i){var o,d;const r=s.items;switch(l.kind){case"user.message":return ha(s,{id:`u${i}`,kind:"user",text:l.text});case"assistant.delta":{const h=r.findIndex(m=>m.id===l.blockId);if(h===-1)return ha(s,{id:l.blockId,kind:"assistant",text:l.text,streaming:!0});const g=r[h];return rr(s,h,{...g,text:g.text+l.text})}case"assistant.text":{const h=r.findIndex(m=>m.id===l.blockId),g={id:l.blockId,kind:"assistant",text:l.text,streaming:!1};return h===-1?ha(s,g):rr(s,h,g)}case"thinking.delta":{const h=r.findIndex(m=>m.id===l.blockId);if(h===-1)return ha(s,{id:l.blockId,kind:"thinking",text:l.text});const g=r[h];return rr(s,h,{...g,text:g.text+l.text})}case"assistant.thinking":{const h=r.findIndex(m=>m.id===l.blockId),g={id:l.blockId,kind:"thinking",text:l.text};return h===-1?ha(s,g):rr(s,h,g)}case"tool.use":return ha(s,{id:`t${l.toolUseId}`,kind:"tool",toolUseId:l.toolUseId,name:l.name,input:l.input,result:null,isError:!1,awaitingPermission:!1});case"tool.result":{const h=r.findIndex(m=>m.kind==="tool"&&m.toolUseId===l.toolUseId);if(h===-1)return s;const g=r[h];return rr(s,h,{...g,result:l.content,isError:l.isError,awaitingPermission:!1})}case"permission.request":return{...s,pending:[...s.pending,{requestId:l.requestId,toolName:l.toolName,input:l.input,...l.reason?{reason:l.reason}:{},...l.questions?{questions:l.questions}:{},...l.toolUseId?{toolUseId:l.toolUseId}:{}}]};case"permission.resolved":{const h=s.pending.find(m=>m.requestId===l.requestId),g=s.pending.filter(m=>m.requestId!==l.requestId);if(l.answers&&(h!=null&&h.toolUseId)){const m=r.findIndex(b=>b.kind==="tool"&&b.toolUseId===h.toolUseId);if(m!==-1){const b=r[m];return rr({...s,pending:g},m,{...b,answers:l.answers})}}return l.decision==="allow"?{...s,pending:g}:ha({...s,pending:g},{id:`p${i}`,kind:"notice",tone:"info",text:`Отклонено${l.reason?`: ${l.reason}`:""}`})}case"result":{const h=s.items.map(m=>m.kind==="assistant"&&m.streaming?{...m,streaming:!1}:m),g=l.contextTokens??s.contextTokens;return ha({...s,items:h,contextTokens:g},{id:`r${i}`,kind:"result",subtype:l.subtype,isError:l.isError,durationMs:l.durationMs,costUsd:l.costUsd,inputTokens:((o=l.usage)==null?void 0:o.inputTokens)??0,outputTokens:((d=l.usage)==null?void 0:d.outputTokens)??0})}case"system":return l.subtype!=="compact_boundary"?s:ha(s,{id:`s${i}`,kind:"notice",tone:"info",text:"Контекст сжат"});case"error":return ha(s,{id:`e${i}`,kind:"notice",tone:"error",text:l.message});case"state":return s;default:return s}}function ha(s,l){return{...s,items:[...s.items,l]}}function rr(s,l,i){const r=s.items.slice();return r[l]=i,{...s,items:r}}const dh="ccv:theme",$d=["system","light","dark"];function Z0(){const[s,l]=S.useState(K0);S.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{const h=s==="dark"||s==="system"&&o.matches;document.documentElement.dataset.theme=h?"dark":"light"};return d(),o.addEventListener("change",d),()=>o.removeEventListener("change",d)},[s]);const i=S.useCallback(o=>{try{localStorage.setItem(dh,o)}catch{}l(o)},[]),r=S.useCallback(()=>{l(o=>{const d=$d[($d.indexOf(o)+1)%$d.length];try{localStorage.setItem(dh,d)}catch{}return d})},[]);return[s,i,r]}function K0(){try{const s=localStorage.getItem(dh);if(s==="light"||s==="dark"||s==="system")return s}catch{}return"system"}const xb=[{value:"default",hint:"спрашивать перед каждым действием"},{value:"acceptEdits",hint:"правки файлов без подтверждения"},{value:"plan",hint:"только чтение и план, без изменений"},{value:"auto",hint:"спрашивать только о рискованном — решает сам"},{value:"bypassPermissions",hint:"ничего не спрашивать"}],Si={sidebar:{side:"left",min:200,max:520,width:276,label:"сессий"},files:{side:"left",min:180,max:560,width:260,label:"файлов"},search:{side:"left",min:220,max:640,width:320,label:"поиска"},git:{side:"left",min:220,max:640,width:320,label:"истории"},ask:{side:"right",min:260,max:720,width:380,label:"вопроса"}},J0=320,_b="ccv:panes";function F0(s){return`--${s}-w`}function vb(s,l){const i=Si[s];return Math.round(Math.min(i.max,Math.max(i.min,l)))}function W0(){const s={};for(const l of Object.keys(Si))s[l]=Si[l].width;try{const l=localStorage.getItem(_b);if(l){const i=JSON.parse(l);for(const r of Object.keys(Si)){const o=i[r];typeof o=="number"&&Number.isFinite(o)&&(s[r]=vb(r,o))}}}catch{}return s}function P0(){const[s,l]=S.useState(W0),i=S.useCallback(h=>{try{localStorage.setItem(_b,JSON.stringify(h))}catch{}},[]),r=S.useCallback((h,g)=>{l(m=>{const b=vb(h,g);if(m[h]===b)return m;const x={...m,[h]:b};return i(x),x})},[i]),o=S.useCallback(h=>{l(g=>{const m={...g,[h]:Si[h].width};return i(m),m})},[i]),d={};for(const h of Object.keys(Si))d[F0(h)]=`${s[h]}px`;return{widths:s,style:d,setWidth:r,reset:o}}const Zd=260,Sb=120,e_=200,ty="ccv:terminal-h";function ny(s,l){return Math.round(Math.min(l,Math.max(Sb,s)))}function t_(){const[s,l]=S.useState(()=>{try{const d=localStorage.getItem(ty);if(d){const h=Number(d);if(Number.isFinite(h))return ny(h,1/0)}}catch{}return Zd}),i=S.useCallback(d=>{try{localStorage.setItem(ty,String(d))}catch{}},[]),r=S.useCallback((d,h)=>{const g=ny(d,h);l(m=>m===g?m:(i(g),g))},[i]),o=S.useCallback(()=>{l(Zd),i(Zd)},[i]);return{height:s,setHeight:r,reset:o}}function wh(s){const[l,i]=S.useState(()=>typeof window>"u"?!1:window.matchMedia(s).matches);return S.useEffect(()=>{const r=window.matchMedia(s),o=()=>i(r.matches);return o(),r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[s]),l}const n_={height:0,offsetTop:0,offsetLeft:0};function ly(){if(typeof window>"u")return n_;const s=window.visualViewport;return s?{height:s.height,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft}:{height:window.innerHeight,offsetTop:0,offsetLeft:0}}function l_(s){const[l,i]=S.useState(ly);return S.useEffect(()=>{if(!s)return;const r=window.visualViewport,o=()=>{const d=ly();i(h=>h.height===d.height&&h.offsetTop===d.offsetTop&&h.offsetLeft===d.offsetLeft?h:d)};return o(),r?(r.addEventListener("resize",o),r.addEventListener("scroll",o),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o)}):(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o))},[s]),l}function jh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ni=jh();function kb(s){Ni=s}var gi={exec:()=>null};function cr(s){let l=[];return i=>{let r=Math.max(0,Math.min(3,i-1)),o=l[r];return o||(o=s(r),l[r]=o),o}}function at(s,l=""){let i=typeof s=="string"?s:s.source,r={replace:(o,d)=>{let h=typeof d=="string"?d:d.source;return h=h.replace(qn.caret,"$1"),i=i.replace(o,h),r},getRegex:()=>new RegExp(i,l)};return r}var a_=((s="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+s)}catch{return!1}})(),qn={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,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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,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:cr(s=>new RegExp(`^ {0,${s}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:cr(s=>new RegExp(`^ {0,${s}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:cr(s=>new RegExp(`^ {0,${s}}(?:\`\`\`|~~~)`)),headingBeginRegex:cr(s=>new RegExp(`^ {0,${s}}#`)),htmlBeginRegex:cr(s=>new RegExp(`^ {0,${s}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:cr(s=>new RegExp(`^ {0,${s}}>`))},s_=/^(?:[ \t]*(?:\n|$))+/,i_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,r_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Lc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Nh=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,wb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jb=at(wb).replace(/bull/g,Nh).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),u_=at(wb).replace(/bull/g,Nh).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Th=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,o_=/^[^\n]+/,Eh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,f_=at(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),d_=at(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Nh).getRegex(),Mo="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",Ah=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,h_=at("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\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",Ah).replace("tag",Mo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Nb=s=>at(Th).replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",s).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex(),p_=Nb(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),m_=Nb(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),g_=at(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",m_).getRegex(),Ch={blockquote:g_,code:i_,def:f_,fences:r_,heading:c_,hr:Lc,html:h_,lheading:jb,list:d_,newline:s_,paragraph:p_,table:gi,text:o_},ay=at("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex(),y_={...Ch,lheading:u_,table:ay,paragraph:at(Th).replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ay).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex()},b_={...Ch,html:at(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ah).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:gi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:at(Th).replace("hr",Lc).replace("heading",` *#{1,6} *[^
|
|
51
|
-
]`).replace("lheading",jb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},x_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,__=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Tb=/^( {2,}|\\)\n(?!\s*$)/,v_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Nr=/[\p{P}\p{S}]/u,Oo=/[\s\p{P}\p{S}]/u,Rh=/[^\s\p{P}\p{S}]/u,S_=at(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Oo).getRegex(),Eb=/(?!~)[\p{P}\p{S}]/u,k_=/(?!~)[\s\p{P}\p{S}]/u,w_=/(?:[^\s\p{P}\p{S}]|~)/u,j_=at(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",a_?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ab=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,N_=at(Ab,"u").replace(/punct/g,Nr).getRegex(),T_=at(Ab,"u").replace(/punct/g,Eb).getRegex(),Cb="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",E_=at(Cb,"gu").replace(/notPunctSpace/g,Rh).replace(/punctSpace/g,Oo).replace(/punct/g,Nr).getRegex(),A_=at(Cb,"gu").replace(/notPunctSpace/g,w_).replace(/punctSpace/g,k_).replace(/punct/g,Eb).getRegex(),C_=at("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Rh).replace(/punctSpace/g,Oo).replace(/punct/g,Nr).getRegex(),R_=at(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Nr).getRegex(),M_="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",O_=at(M_,"gu").replace(/notPunctSpace/g,Rh).replace(/punctSpace/g,Oo).replace(/punct/g,Nr).getRegex(),D_=at(/\\(punct)/,"gu").replace(/punct/g,Nr).getRegex(),z_=at(/^<(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(),L_=at(Ah).replace("(?:-->|$)","-->").getRegex(),U_=at("^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",L_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ko=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,H_=at(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ko).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Rb=at(/^!?\[(label)\]\[(ref)\]/).replace("label",ko).replace("ref",Eh).getRegex(),Mb=at(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eh).getRegex(),B_=at("reflink|nolink(?!\\()","g").replace("reflink",Rb).replace("nolink",Mb).getRegex(),sy=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Mh={_backpedal:gi,anyPunctuation:D_,autolink:z_,blockSkip:j_,br:Tb,code:__,del:gi,delLDelim:gi,delRDelim:gi,emStrongLDelim:N_,emStrongRDelimAst:E_,emStrongRDelimUnd:C_,escape:x_,link:H_,nolink:Mb,punctuation:S_,reflink:Rb,reflinkSearch:B_,tag:U_,text:v_,url:gi},q_={...Mh,link:at(/^!?\[(label)\]\((.*?)\)/).replace("label",ko).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ko).getRegex()},hh={...Mh,emStrongRDelimAst:A_,emStrongLDelim:T_,delLDelim:R_,delRDelim:O_,url:at(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",sy).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:at(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",sy).getRegex()},G_={...hh,br:at(Tb).replace("{2,}","*").getRegex(),text:at(hh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},so={normal:Ch,gfm:y_,pedantic:b_},kc={normal:Mh,gfm:hh,breaks:G_,pedantic:q_},Y_={"&":"&","<":"<",">":">",'"':""","'":"'"},iy=s=>Y_[s];function ya(s,l){if(l){if(qn.escapeTest.test(s))return s.replace(qn.escapeReplace,iy)}else if(qn.escapeTestNoEncode.test(s))return s.replace(qn.escapeReplaceNoEncode,iy);return s}function ry(s){try{s=encodeURI(s).replace(qn.percentDecode,"%")}catch{return null}return s}function cy(s,l){var d;let i=s.replace(qn.findPipe,(h,g,m)=>{let b=!1,x=g;for(;--x>=0&&m[x]==="\\";)b=!b;return b?"|":" |"}),r=i.split(qn.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((d=r.at(-1))!=null&&d.trim())&&r.pop(),l)if(r.length>l)r.splice(l);else for(;r.length<l;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(qn.slashPipe,"|");return r}function Ms(s,l,i){let r=s.length;if(r===0)return"";let o=0;for(;o<r&&s.charAt(r-o-1)===l;)o++;return s.slice(0,r-o)}function uy(s){let l=s.split(`
|
|
52
|
-
`),i=l.length-1;for(;i>=0&&qn.blankLine.test(l[i]);)i--;return l.length-i<=2?s:l.slice(0,i+1).join(`
|
|
53
|
-
`)}function I_(s,l){if(s.indexOf(l[1])===-1)return-1;let i=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===l[0])i++;else if(s[r]===l[1]&&(i--,i<0))return r;return i>0?-2:-1}function X_(s,l=0){let i=l,r="";for(let o of s)if(o===" "){let d=4-i%4;r+=" ".repeat(d),i+=d}else r+=o,i++;return r}function oy(s,l,i,r,o){let d=l.href,h=l.title||null,g=s[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let m={type:s[0].charAt(0)==="!"?"image":"link",raw:i,href:d,title:h,text:g,tokens:r.inlineTokens(g)};return r.state.inLink=!1,m}function V_(s,l,i){let r=s.match(i.other.indentCodeCompensation);if(r===null)return l;let o=r[1];return l.split(`
|
|
54
|
-
`).map(d=>{let h=d.match(i.other.beginningSpace);if(h===null)return d;let[g]=h;return g.length>=o.length?d.slice(o.length):d}).join(`
|
|
55
|
-
`)}var wo=class{constructor(s){wt(this,"options");wt(this,"rules");wt(this,"lexer");this.options=s||Ni}space(s){let l=this.rules.block.newline.exec(s);if(l&&l[0].length>0)return{type:"space",raw:l[0]}}code(s){let l=this.rules.block.code.exec(s);if(l){let i=this.options.pedantic?l[0]:uy(l[0]),r=i.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i,codeBlockStyle:"indented",text:r}}}fences(s){let l=this.rules.block.fences.exec(s);if(l){let i=l[0],r=V_(i,l[3]||"",this.rules);return{type:"code",raw:i,lang:l[2]?l[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):l[2],text:r}}}heading(s){let l=this.rules.block.heading.exec(s);if(l){let i=l[2].trim();if(this.rules.other.endingHash.test(i)){let r=Ms(i,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(i=r.trim())}return{type:"heading",raw:Ms(l[0],`
|
|
56
|
-
`),depth:l[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(s){let l=this.rules.block.hr.exec(s);if(l)return{type:"hr",raw:Ms(l[0],`
|
|
57
|
-
`)}}blockquote(s){let l=this.rules.block.blockquote.exec(s);if(l){let i=Ms(l[0],`
|
|
58
|
-
`).split(`
|
|
59
|
-
`),r="",o="",d=[];for(;i.length>0;){let h=!1,g=[],m;for(m=0;m<i.length;m++)if(this.rules.other.blockquoteStart.test(i[m]))g.push(i[m]),h=!0;else if(!h)g.push(i[m]);else break;i=i.slice(m);let b=g.join(`
|
|
60
|
-
`),x=b.replace(this.rules.other.blockquoteSetextReplace,`
|
|
61
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
62
|
-
${b}`:b,o=o?`${o}
|
|
63
|
-
${x}`:x;let k=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(x,d,!0),this.lexer.state.top=k,i.length===0)break;let _=d.at(-1);if((_==null?void 0:_.type)==="code")break;if((_==null?void 0:_.type)==="blockquote"){let C=_,N=C.raw+`
|
|
64
|
-
`+i.join(`
|
|
65
|
-
`),H=this.blockquote(N);d[d.length-1]=H,r=r.substring(0,r.length-C.raw.length)+H.raw,o=o.substring(0,o.length-C.text.length)+H.text;break}else if((_==null?void 0:_.type)==="list"){let C=_,N=C.raw+`
|
|
66
|
-
`+i.join(`
|
|
67
|
-
`),H=this.list(N);d[d.length-1]=H,r=r.substring(0,r.length-_.raw.length)+H.raw,o=o.substring(0,o.length-C.raw.length)+H.raw,i=N.substring(d.at(-1).raw.length).split(`
|
|
68
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:d,text:o}}}list(s){let l=this.rules.block.list.exec(s);if(l){let i=l[1].trim(),r=i.length>1,o={type:"list",raw:"",ordered:r,start:r?+i.slice(0,-1):"",loose:!1,items:[]};i=r?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=r?i:"[*+-]");let d=this.rules.other.listItemRegex(i),h=!1;for(;s;){let m=!1,b="",x="";if(!(l=d.exec(s))||this.rules.block.hr.test(s))break;b=l[0],s=s.substring(b.length);let k=X_(l[2].split(`
|
|
69
|
-
`,1)[0],l[1].length),_=s.split(`
|
|
70
|
-
`,1)[0],C=!k.trim(),N=0;if(this.options.pedantic?(N=2,x=k.trimStart()):C?N=l[1].length+1:(N=k.search(this.rules.other.nonSpaceChar),N=N>4?1:N,x=k.slice(N),N+=l[1].length),C&&this.rules.other.blankLine.test(_)&&(b+=_+`
|
|
71
|
-
`,s=s.substring(_.length+1),m=!0),!m){let H=this.rules.other.nextBulletRegex(N),B=this.rules.other.hrRegex(N),K=this.rules.other.fencesBeginRegex(N),O=this.rules.other.headingBeginRegex(N),$=this.rules.other.htmlBeginRegex(N),A=this.rules.other.blockquoteBeginRegex(N);for(;s;){let Q=s.split(`
|
|
72
|
-
`,1)[0],L;if(_=Q,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),L=_):L=_.replace(this.rules.other.tabCharGlobal," "),K.test(_)||O.test(_)||$.test(_)||A.test(_)||H.test(_)||B.test(_))break;if(L.search(this.rules.other.nonSpaceChar)>=N||!_.trim())x+=`
|
|
73
|
-
`+L.slice(N);else{if(C||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||K.test(k)||O.test(k)||B.test(k))break;x+=`
|
|
74
|
-
`+_}C=!_.trim(),b+=Q+`
|
|
75
|
-
`,s=s.substring(Q.length+1),k=L.slice(N)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(b)&&(h=!0)),o.items.push({type:"list_item",raw:b,task:!!this.options.gfm&&this.rules.other.listIsTask.test(x),loose:!1,text:x,tokens:[]}),o.raw+=b}let g=o.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let m of o.items){this.lexer.state.top=!1,m.tokens=this.lexer.blockTokens(m.text,[]);let b=m.tokens[0];if(m.task&&((b==null?void 0:b.type)==="text"||(b==null?void 0:b.type)==="paragraph")){m.text=m.text.replace(this.rules.other.listReplaceTask,""),b.raw=b.raw.replace(this.rules.other.listReplaceTask,""),b.text=b.text.replace(this.rules.other.listReplaceTask,"");for(let k=this.lexer.inlineQueue.length-1;k>=0;k--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[k].src)){this.lexer.inlineQueue[k].src=this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask,"");break}let x=this.rules.other.listTaskCheckbox.exec(m.raw);if(x){let k={type:"checkbox",raw:x[0]+" ",checked:x[0]!=="[ ]"};m.checked=k.checked,o.loose?m.tokens[0]&&["paragraph","text"].includes(m.tokens[0].type)&&"tokens"in m.tokens[0]&&m.tokens[0].tokens?(m.tokens[0].raw=k.raw+m.tokens[0].raw,m.tokens[0].text=k.raw+m.tokens[0].text,m.tokens[0].tokens.unshift(k)):m.tokens.unshift({type:"paragraph",raw:k.raw,text:k.raw,tokens:[k]}):m.tokens.unshift(k)}}else m.task&&(m.task=!1);if(!o.loose){let x=m.tokens.filter(_=>_.type==="space"),k=x.length>0&&x.some(_=>this.rules.other.anyLine.test(_.raw));o.loose=k}}if(o.loose)for(let m of o.items){m.loose=!0;for(let b of m.tokens)b.type==="text"&&(b.type="paragraph")}return o}}html(s){let l=this.rules.block.html.exec(s);if(l){let i=uy(l[0]);return{type:"html",block:!0,raw:i,pre:l[1]==="pre"||l[1]==="script"||l[1]==="style",text:i}}}def(s){let l=this.rules.block.def.exec(s);if(l){let i=l[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=l[2]?l[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=l[3]?l[3].substring(1,l[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):l[3];return{type:"def",tag:i,raw:Ms(l[0],`
|
|
76
|
-
`),href:r,title:o}}}table(s){var h;let l=this.rules.block.table.exec(s);if(!l||!this.rules.other.tableDelimiter.test(l[2]))return;let i=cy(l[1]),r=l[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=l[3])!=null&&h.trim()?l[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
77
|
-
`):[],d={type:"table",raw:Ms(l[0],`
|
|
78
|
-
`),header:[],align:[],rows:[]};if(i.length===r.length){for(let g of r)this.rules.other.tableAlignRight.test(g)?d.align.push("right"):this.rules.other.tableAlignCenter.test(g)?d.align.push("center"):this.rules.other.tableAlignLeft.test(g)?d.align.push("left"):d.align.push(null);for(let g=0;g<i.length;g++)d.header.push({text:i[g],tokens:this.lexer.inline(i[g]),header:!0,align:d.align[g]});for(let g of o)d.rows.push(cy(g,d.header.length).map((m,b)=>({text:m,tokens:this.lexer.inline(m),header:!1,align:d.align[b]})));return d}}lheading(s){let l=this.rules.block.lheading.exec(s);if(l){let i=l[1].trim();return{type:"heading",raw:Ms(l[0],`
|
|
79
|
-
`),depth:l[2].charAt(0)==="="?1:2,text:i,tokens:this.lexer.inline(i)}}}paragraph(s){let l=this.rules.block.paragraph.exec(s);if(l){let i=l[1].charAt(l[1].length-1)===`
|
|
80
|
-
`?l[1].slice(0,-1):l[1];return{type:"paragraph",raw:l[0],text:i,tokens:this.lexer.inline(i)}}}text(s){let l=this.rules.block.text.exec(s);if(l)return{type:"text",raw:l[0],text:l[0],tokens:this.lexer.inline(l[0])}}escape(s){let l=this.rules.inline.escape.exec(s);if(l)return{type:"escape",raw:l[0],text:l[1]}}tag(s){let l=this.rules.inline.tag.exec(s);if(l)return!this.lexer.state.inLink&&this.rules.other.startATag.test(l[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(l[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(l[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(l[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:l[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:l[0]}}link(s){let l=this.rules.inline.link.exec(s);if(l){let i=l[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let d=Ms(i.slice(0,-1),"\\");if((i.length-d.length)%2===0)return}else{let d=I_(l[2],"()");if(d===-2)return;if(d>-1){let h=(l[0].indexOf("!")===0?5:4)+l[1].length+d;l[2]=l[2].substring(0,d),l[0]=l[0].substring(0,h).trim(),l[3]=""}}let r=l[2],o="";if(this.options.pedantic){let d=this.rules.other.pedanticHrefTitle.exec(r);d&&(r=d[1],o=d[3])}else o=l[3]?l[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?r=r.slice(1):r=r.slice(1,-1)),oy(l,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},l[0],this.lexer,this.rules)}}reflink(s,l){let i;if((i=this.rules.inline.reflink.exec(s))||(i=this.rules.inline.nolink.exec(s))){let r=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=l[r.toLowerCase()];if(!o){let d=i[0].charAt(0);return{type:"text",raw:d,text:d}}return oy(i,o,i[0],this.lexer,this.rules)}}emStrong(s,l,i=""){let r=this.rules.inline.emStrongLDelim.exec(s);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!i||this.rules.inline.punctuation.exec(i))){let o=[...r[0]].length-1,d,h,g=o,m=0,b=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(b.lastIndex=0,l=l.slice(-1*s.length+o);(r=b.exec(l))!==null;){if(d=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!d)continue;if(h=[...d].length,r[3]||r[4]){g+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){m+=h;continue}if(g-=h,g>0)continue;h=Math.min(h,h+g+m);let x=[...r[0]][0].length,k=s.slice(0,o+r.index+x+h);if(Math.min(o,h)%2){let C=k.slice(1,-1);return{type:"em",raw:k,text:C,tokens:this.lexer.inlineTokens(C)}}let _=k.slice(2,-2);return{type:"strong",raw:k,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(s){let l=this.rules.inline.code.exec(s);if(l){let i=l[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return r&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:l[0],text:i}}}br(s){let l=this.rules.inline.br.exec(s);if(l)return{type:"br",raw:l[0]}}del(s,l,i=""){let r=this.rules.inline.delLDelim.exec(s);if(r&&(!r[1]||!i||this.rules.inline.punctuation.exec(i))){let o=[...r[0]].length-1,d,h,g=o,m=this.rules.inline.delRDelim;for(m.lastIndex=0,l=l.slice(-1*s.length+o);(r=m.exec(l))!==null;){if(d=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!d||(h=[...d].length,h!==o))continue;if(r[3]||r[4]){g+=h;continue}if(g-=h,g>0)continue;h=Math.min(h,h+g);let b=[...r[0]][0].length,x=s.slice(0,o+r.index+b+h),k=x.slice(o,-o);return{type:"del",raw:x,text:k,tokens:this.lexer.inlineTokens(k)}}}}autolink(s){let l=this.rules.inline.autolink.exec(s);if(l){let i,r;return l[2]==="@"?(i=l[1],r="mailto:"+i):(i=l[1],r=i),{type:"link",raw:l[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}url(s){var i;let l;if(l=this.rules.inline.url.exec(s)){let r,o;if(l[2]==="@")r=l[0],o="mailto:"+r;else{let d;do d=l[0],l[0]=((i=this.rules.inline._backpedal.exec(l[0]))==null?void 0:i[0])??"";while(d!==l[0]);r=l[0],l[1]==="www."?o="http://"+l[0]:o=l[0]}return{type:"link",raw:l[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(s){let l=this.rules.inline.text.exec(s);if(l){let i=this.lexer.state.inRawBlock;return{type:"text",raw:l[0],text:l[0],escaped:i}}}},Fl=class ph{constructor(l){wt(this,"tokens");wt(this,"options");wt(this,"state");wt(this,"inlineQueue");wt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=l||Ni,this.options.tokenizer=this.options.tokenizer||new wo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:qn,block:so.normal,inline:kc.normal};this.options.pedantic?(i.block=so.pedantic,i.inline=kc.pedantic):this.options.gfm&&(i.block=so.gfm,this.options.breaks?i.inline=kc.breaks:i.inline=kc.gfm),this.tokenizer.rules=i}static get rules(){return{block:so,inline:kc}}static lex(l,i){return new ph(i).lex(l)}static lexInline(l,i){return new ph(i).inlineTokens(l)}lex(l){l=l.replace(qn.carriageReturn,`
|
|
81
|
-
`),this.blockTokens(l,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let r=this.inlineQueue[i];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(l,i=[],r=!1){var d,h,g;this.tokenizer.lexer=this,this.options.pedantic&&(l=l.replace(qn.tabCharGlobal," ").replace(qn.spaceLine,""));let o=1/0;for(;l;){if(l.length<o)o=l.length;else{this.infiniteLoopError(l.charCodeAt(0));break}let m;if((h=(d=this.options.extensions)==null?void 0:d.block)!=null&&h.some(x=>(m=x.call({lexer:this},l,i))?(l=l.substring(m.raw.length),i.push(m),!0):!1))continue;if(m=this.tokenizer.space(l)){l=l.substring(m.raw.length);let x=i.at(-1);m.raw.length===1&&x!==void 0?x.raw+=`
|
|
82
|
-
`:i.push(m);continue}if(m=this.tokenizer.code(l)){l=l.substring(m.raw.length);let x=i.at(-1);(x==null?void 0:x.type)==="paragraph"||(x==null?void 0:x.type)==="text"?(x.raw+=(x.raw.endsWith(`
|
|
83
|
-
`)?"":`
|
|
84
|
-
`)+m.raw,x.text+=`
|
|
85
|
-
`+m.text,this.inlineQueue.at(-1).src=x.text):i.push(m);continue}if(m=this.tokenizer.fences(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.heading(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.hr(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.blockquote(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.list(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.html(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.def(l)){l=l.substring(m.raw.length);let x=i.at(-1);(x==null?void 0:x.type)==="paragraph"||(x==null?void 0:x.type)==="text"?(x.raw+=(x.raw.endsWith(`
|
|
86
|
-
`)?"":`
|
|
87
|
-
`)+m.raw,x.text+=`
|
|
88
|
-
`+m.raw,this.inlineQueue.at(-1).src=x.text):this.tokens.links[m.tag]||(this.tokens.links[m.tag]={href:m.href,title:m.title},i.push(m));continue}if(m=this.tokenizer.table(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.lheading(l)){l=l.substring(m.raw.length),i.push(m);continue}let b=l;if((g=this.options.extensions)!=null&&g.startBlock){let x=1/0,k=l.slice(1),_;this.options.extensions.startBlock.forEach(C=>{_=C.call({lexer:this},k),typeof _=="number"&&_>=0&&(x=Math.min(x,_))}),x<1/0&&x>=0&&(b=l.substring(0,x+1))}if(this.state.top&&(m=this.tokenizer.paragraph(b))){let x=i.at(-1);r&&(x==null?void 0:x.type)==="paragraph"?(x.raw+=(x.raw.endsWith(`
|
|
89
|
-
`)?"":`
|
|
90
|
-
`)+m.raw,x.text+=`
|
|
91
|
-
`+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):i.push(m),r=b.length!==l.length,l=l.substring(m.raw.length);continue}if(m=this.tokenizer.text(l)){l=l.substring(m.raw.length);let x=i.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=(x.raw.endsWith(`
|
|
92
|
-
`)?"":`
|
|
93
|
-
`)+m.raw,x.text+=`
|
|
94
|
-
`+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):i.push(m);continue}if(l){this.infiniteLoopError(l.charCodeAt(0));break}}return this.state.top=!0,i}inline(l,i=[]){return this.inlineQueue.push({src:l,tokens:i}),i}inlineTokens(l,i=[]){var g,m,b,x,k;this.tokenizer.lexer=this;let r=l;if(this.tokens.links){let _=Object.keys(this.tokens.links);_.length>0&&(r=r.replace(this.tokenizer.rules.inline.reflinkSearch,C=>_.includes(C.slice(C.lastIndexOf("[")+1,-1))?"["+"a".repeat(C.length-2)+"]":C))}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),r=r.replace(this.tokenizer.rules.inline.blockSkip,(_,C,N)=>{let H=N?N.length:0;return _.slice(0,H)+"["+"a".repeat(_.length-H-2)+"]"}),r=((m=(g=this.options.hooks)==null?void 0:g.emStrongMask)==null?void 0:m.call({lexer:this},r))??r;let o=!1,d="",h=1/0;for(;l;){if(l.length<h)h=l.length;else{this.infiniteLoopError(l.charCodeAt(0));break}o||(d=""),o=!1;let _;if((x=(b=this.options.extensions)==null?void 0:b.inline)!=null&&x.some(N=>(_=N.call({lexer:this},l,i))?(l=l.substring(_.raw.length),i.push(_),!0):!1))continue;if(_=this.tokenizer.escape(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.tag(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.link(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.reflink(l,this.tokens.links)){l=l.substring(_.raw.length);let N=i.at(-1);_.type==="text"&&(N==null?void 0:N.type)==="text"?(N.raw+=_.raw,N.text+=_.text):i.push(_);continue}if(_=this.tokenizer.emStrong(l,r,d)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.codespan(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.br(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.del(l,r,d)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.autolink(l)){l=l.substring(_.raw.length),i.push(_);continue}if(!this.state.inLink&&(_=this.tokenizer.url(l))){l=l.substring(_.raw.length),i.push(_);continue}let C=l;if((k=this.options.extensions)!=null&&k.startInline){let N=1/0,H=l.slice(1),B;this.options.extensions.startInline.forEach(K=>{B=K.call({lexer:this},H),typeof B=="number"&&B>=0&&(N=Math.min(N,B))}),N<1/0&&N>=0&&(C=l.substring(0,N+1))}if(_=this.tokenizer.inlineText(C)){l=l.substring(_.raw.length),_.raw.slice(-1)!=="_"&&(d=_.raw.slice(-1)),o=!0;let N=i.at(-1);(N==null?void 0:N.type)==="text"?(N.raw+=_.raw,N.text+=_.text):i.push(_);continue}if(l){this.infiniteLoopError(l.charCodeAt(0));break}}return i}infiniteLoopError(l){let i="Infinite loop on byte: "+l;if(this.options.silent)console.error(i);else throw new Error(i)}},jo=class{constructor(s){wt(this,"options");wt(this,"parser");this.options=s||Ni}space(s){return""}code({text:s,lang:l,escaped:i}){var d;let r=(d=(l||"").match(qn.notSpaceStart))==null?void 0:d[0],o=s.replace(qn.endingNewline,"")+`
|
|
95
|
-
`;return r?'<pre><code class="language-'+ya(r)+'">'+(i?o:ya(o,!0))+`</code></pre>
|
|
96
|
-
`:"<pre><code>"+(i?o:ya(o,!0))+`</code></pre>
|
|
97
|
-
`}blockquote({tokens:s}){return`<blockquote>
|
|
98
|
-
${this.parser.parse(s)}</blockquote>
|
|
99
|
-
`}html({text:s}){return s}def(s){return""}heading({tokens:s,depth:l}){return`<h${l}>${this.parser.parseInline(s)}</h${l}>
|
|
100
|
-
`}hr(s){return`<hr>
|
|
101
|
-
`}list(s){let l=s.ordered,i=s.start,r="";for(let h=0;h<s.items.length;h++){let g=s.items[h];r+=this.listitem(g)}let o=l?"ol":"ul",d=l&&i!==1?' start="'+i+'"':"";return"<"+o+d+`>
|
|
102
|
-
`+r+"</"+o+`>
|
|
103
|
-
`}listitem(s){return`<li>${this.parser.parse(s.tokens)}</li>
|
|
104
|
-
`}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
|
|
105
|
-
`}table(s){let l="",i="";for(let o=0;o<s.header.length;o++)i+=this.tablecell(s.header[o]);l+=this.tablerow({text:i});let r="";for(let o=0;o<s.rows.length;o++){let d=s.rows[o];i="";for(let h=0;h<d.length;h++)i+=this.tablecell(d[h]);r+=this.tablerow({text:i})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
106
|
-
<thead>
|
|
107
|
-
`+l+`</thead>
|
|
108
|
-
`+r+`</table>
|
|
109
|
-
`}tablerow({text:s}){return`<tr>
|
|
110
|
-
${s}</tr>
|
|
111
|
-
`}tablecell(s){let l=this.parser.parseInline(s.tokens),i=s.header?"th":"td";return(s.align?`<${i} align="${s.align}">`:`<${i}>`)+l+`</${i}>
|
|
112
|
-
`}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>${ya(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:l,tokens:i}){let r=this.parser.parseInline(i),o=ry(s);if(o===null)return r;s=o;let d='<a href="'+s+'"';return l&&(d+=' title="'+ya(l)+'"'),d+=">"+r+"</a>",d}image({href:s,title:l,text:i,tokens:r}){r&&(i=this.parser.parseInline(r,this.parser.textRenderer));let o=ry(s);if(o===null)return ya(i);s=o;let d=`<img src="${s}" alt="${ya(i)}"`;return l&&(d+=` title="${ya(l)}"`),d+=">",d}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:ya(s.text)}},Oh=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""}checkbox({raw:s}){return s}},Wl=class mh{constructor(l){wt(this,"options");wt(this,"renderer");wt(this,"textRenderer");this.options=l||Ni,this.options.renderer=this.options.renderer||new jo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Oh}static parse(l,i){return new mh(i).parse(l)}static parseInline(l,i){return new mh(i).parseInline(l)}parse(l){var r,o;this.renderer.parser=this;let i="";for(let d=0;d<l.length;d++){let h=l[d];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[h.type]){let m=h,b=this.options.extensions.renderers[m.type].call({parser:this},m);if(b!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(m.type)){i+=b||"";continue}}let g=h;switch(g.type){case"space":{i+=this.renderer.space(g);break}case"hr":{i+=this.renderer.hr(g);break}case"heading":{i+=this.renderer.heading(g);break}case"code":{i+=this.renderer.code(g);break}case"table":{i+=this.renderer.table(g);break}case"blockquote":{i+=this.renderer.blockquote(g);break}case"list":{i+=this.renderer.list(g);break}case"checkbox":{i+=this.renderer.checkbox(g);break}case"html":{i+=this.renderer.html(g);break}case"def":{i+=this.renderer.def(g);break}case"paragraph":{i+=this.renderer.paragraph(g);break}case"text":{i+=this.renderer.text(g);break}default:{let m='Token with "'+g.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return i}parseInline(l,i=this.renderer){var o,d;this.renderer.parser=this;let r="";for(let h=0;h<l.length;h++){let g=l[h];if((d=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&d[g.type]){let b=this.options.extensions.renderers[g.type].call({parser:this},g);if(b!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(g.type)){r+=b||"";continue}}let m=g;switch(m.type){case"escape":{r+=i.text(m);break}case"html":{r+=i.html(m);break}case"link":{r+=i.link(m);break}case"image":{r+=i.image(m);break}case"checkbox":{r+=i.checkbox(m);break}case"strong":{r+=i.strong(m);break}case"em":{r+=i.em(m);break}case"codespan":{r+=i.codespan(m);break}case"br":{r+=i.br(m);break}case"del":{r+=i.del(m);break}case"text":{r+=i.text(m);break}default:{let b='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(b),"";throw new Error(b)}}}return r}},yo,Ac=(yo=class{constructor(s){wt(this,"options");wt(this,"block");this.options=s||Ni}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(s=this.block){return s?Fl.lex:Fl.lexInline}provideParser(s=this.block){return s?Wl.parse:Wl.parseInline}},wt(yo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),wt(yo,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),yo),Q_=class{constructor(...s){wt(this,"defaults",jh());wt(this,"options",this.setOptions);wt(this,"parse",this.parseMarkdown(!0));wt(this,"parseInline",this.parseMarkdown(!1));wt(this,"Parser",Wl);wt(this,"Renderer",jo);wt(this,"TextRenderer",Oh);wt(this,"Lexer",Fl);wt(this,"Tokenizer",wo);wt(this,"Hooks",Ac);this.use(...s)}walkTokens(s,l){var r,o;let i=[];for(let d of s)switch(i=i.concat(l.call(this,d)),d.type){case"table":{let h=d;for(let g of h.header)i=i.concat(this.walkTokens(g.tokens,l));for(let g of h.rows)for(let m of g)i=i.concat(this.walkTokens(m.tokens,l));break}case"list":{let h=d;i=i.concat(this.walkTokens(h.items,l));break}default:{let h=d;(o=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(g=>{let m=h[g].flat(1/0);i=i.concat(this.walkTokens(m,l))}):h.tokens&&(i=i.concat(this.walkTokens(h.tokens,l)))}}return i}use(...s){let l=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(i=>{let r={...i};if(r.async=this.defaults.async||r.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let d=l.renderers[o.name];d?l.renderers[o.name]=function(...h){let g=o.renderer.apply(this,h);return g===!1&&(g=d.apply(this,h)),g}:l.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let d=l[o.level];d?d.unshift(o.tokenizer):l[o.level]=[o.tokenizer],o.start&&(o.level==="block"?l.startBlock?l.startBlock.push(o.start):l.startBlock=[o.start]:o.level==="inline"&&(l.startInline?l.startInline.push(o.start):l.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(l.childTokens[o.name]=o.childTokens)}),r.extensions=l),i.renderer){let o=this.defaults.renderer||new jo(this.defaults);for(let d in i.renderer){if(!(d in o))throw new Error(`renderer '${d}' does not exist`);if(["options","parser"].includes(d))continue;let h=d,g=i.renderer[h],m=o[h];o[h]=(...b)=>{let x=g.apply(o,b);return x===!1&&(x=m.apply(o,b)),x||""}}r.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new wo(this.defaults);for(let d in i.tokenizer){if(!(d in o))throw new Error(`tokenizer '${d}' does not exist`);if(["options","rules","lexer"].includes(d))continue;let h=d,g=i.tokenizer[h],m=o[h];o[h]=(...b)=>{let x=g.apply(o,b);return x===!1&&(x=m.apply(o,b)),x}}r.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Ac;for(let d in i.hooks){if(!(d in o))throw new Error(`hook '${d}' does not exist`);if(["options","block"].includes(d))continue;let h=d,g=i.hooks[h],m=o[h];Ac.passThroughHooks.has(d)?o[h]=b=>{if(this.defaults.async&&Ac.passThroughHooksRespectAsync.has(d))return(async()=>{let k=await g.call(o,b);return m.call(o,k)})();let x=g.call(o,b);return m.call(o,x)}:o[h]=(...b)=>{if(this.defaults.async)return(async()=>{let k=await g.apply(o,b);return k===!1&&(k=await m.apply(o,b)),k})();let x=g.apply(o,b);return x===!1&&(x=m.apply(o,b)),x}}r.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,d=i.walkTokens;r.walkTokens=function(h){let g=[];return g.push(d.call(this,h)),o&&(g=g.concat(o.call(this,h))),g}}this.defaults={...this.defaults,...r}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,l){return Fl.lex(s,l??this.defaults)}parser(s,l){return Wl.parse(s,l??this.defaults)}parseMarkdown(s){return(l,i)=>{let r={...i},o={...this.defaults,...r},d=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return d(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 d(new Error("marked(): input parameter is undefined or null"));if(typeof l!="string")return d(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=s),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(l):l,g=await(o.hooks?await o.hooks.provideLexer(s):s?Fl.lex:Fl.lexInline)(h,o),m=o.hooks?await o.hooks.processAllTokens(g):g;o.walkTokens&&await Promise.all(this.walkTokens(m,o.walkTokens));let b=await(o.hooks?await o.hooks.provideParser(s):s?Wl.parse:Wl.parseInline)(m,o);return o.hooks?await o.hooks.postprocess(b):b})().catch(d);try{o.hooks&&(l=o.hooks.preprocess(l));let h=(o.hooks?o.hooks.provideLexer(s):s?Fl.lex:Fl.lexInline)(l,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let g=(o.hooks?o.hooks.provideParser(s):s?Wl.parse:Wl.parseInline)(h,o);return o.hooks&&(g=o.hooks.postprocess(g)),g}catch(h){return d(h)}}}onError(s,l){return i=>{if(i.message+=`
|
|
113
|
-
Please report this to https://github.com/markedjs/marked.`,s){let r="<p>An error occurred:</p><pre>"+ya(i.message+"",!0)+"</pre>";return l?Promise.resolve(r):r}if(l)return Promise.reject(i);throw i}}},ji=new Q_;function ht(s,l){return ji.parse(s,l)}ht.options=ht.setOptions=function(s){return ji.setOptions(s),ht.defaults=ji.defaults,kb(ht.defaults),ht};ht.getDefaults=jh;ht.defaults=Ni;ht.use=function(...s){return ji.use(...s),ht.defaults=ji.defaults,kb(ht.defaults),ht};ht.walkTokens=function(s,l){return ji.walkTokens(s,l)};ht.parseInline=ji.parseInline;ht.Parser=Wl;ht.parser=Wl.parse;ht.Renderer=jo;ht.TextRenderer=Oh;ht.Lexer=Fl;ht.lexer=Fl.lex;ht.Tokenizer=wo;ht.Hooks=Ac;ht.parse=ht;ht.options;ht.setOptions;ht.use;ht.walkTokens;ht.parseInline;Wl.parse;Fl.lex;/*! @license DOMPurify 3.4.12 | (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.12/LICENSE */function fy(s,l){(l==null||l>s.length)&&(l=s.length);for(var i=0,r=Array(l);i<l;i++)r[i]=s[i];return r}function $_(s){if(Array.isArray(s))return s}function Z_(s,l){var i=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(i!=null){var r,o,d,h,g=[],m=!0,b=!1;try{if(d=(i=i.call(s)).next,l!==0)for(;!(m=(r=d.call(i)).done)&&(g.push(r.value),g.length!==l);m=!0);}catch(x){b=!0,o=x}finally{try{if(!m&&i.return!=null&&(h=i.return(),Object(h)!==h))return}finally{if(b)throw o}}return g}}function K_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
114
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J_(s,l){return $_(s)||Z_(s,l)||F_(s,l)||K_()}function F_(s,l){if(s){if(typeof s=="string")return fy(s,l);var i={}.toString.call(s).slice(8,-1);return i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set"?Array.from(s):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?fy(s,l):void 0}}const Ob=Object.entries,dy=Object.setPrototypeOf,W_=Object.isFrozen,P_=Object.getPrototypeOf,ev=Object.getOwnPropertyDescriptor;let zn=Object.freeze,Ln=Object.seal,dr=Object.create,Db=typeof Reflect<"u"&&Reflect,gh=Db.apply,yh=Db.construct;zn||(zn=function(l){return l});Ln||(Ln=function(l){return l});gh||(gh=function(l,i){for(var r=arguments.length,o=new Array(r>2?r-2:0),d=2;d<r;d++)o[d-2]=arguments[d];return l.apply(i,o)});yh||(yh=function(l){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return new l(...r)});const ur=on(Array.prototype.forEach),tv=on(Array.prototype.lastIndexOf),hy=on(Array.prototype.pop),or=on(Array.prototype.push),nv=on(Array.prototype.splice),Us=Array.isArray,Cc=on(String.prototype.toLowerCase),Kd=on(String.prototype.toString),py=on(String.prototype.match),wc=on(String.prototype.replace),my=on(String.prototype.indexOf),lv=on(String.prototype.trim),av=on(Number.prototype.toString),sv=on(Boolean.prototype.toString),gy=typeof BigInt>"u"?null:on(BigInt.prototype.toString),yy=typeof Symbol>"u"?null:on(Symbol.prototype.toString),Nn=on(Object.prototype.hasOwnProperty),jc=on(Object.prototype.toString),jn=on(RegExp.prototype.test),di=iv(TypeError);function on(s){return function(l){l instanceof RegExp&&(l.lastIndex=0);for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return gh(s,l,r)}}function iv(s){return function(){for(var l=arguments.length,i=new Array(l),r=0;r<l;r++)i[r]=arguments[r];return yh(s,i)}}function lt(s,l){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Cc;if(dy&&dy(s,null),!Us(l))return s;let r=l.length;for(;r--;){let o=l[r];if(typeof o=="string"){const d=i(o);d!==o&&(W_(l)||(l[r]=d),o=d)}s[o]=!0}return s}function rv(s){for(let l=0;l<s.length;l++)Nn(s,l)||(s[l]=null);return s}function Fn(s){const l=dr(null);for(const r of Ob(s)){var i=J_(r,2);const o=i[0],d=i[1];Nn(s,o)&&(Us(d)?l[o]=rv(d):d&&typeof d=="object"&&d.constructor===Object?l[o]=Fn(d):l[o]=d)}return l}function cv(s){switch(typeof s){case"string":return s;case"number":return av(s);case"boolean":return sv(s);case"bigint":return gy?gy(s):"0";case"symbol":return yy?yy(s):"Symbol()";case"undefined":return jc(s);case"function":case"object":{if(s===null)return jc(s);const l=s,i=ba(l,"toString");if(typeof i=="function"){const r=i(l);return typeof r=="string"?r:jc(r)}return jc(s)}default:return jc(s)}}function ba(s,l){for(;s!==null;){const r=ev(s,l);if(r){if(r.get)return on(r.get);if(typeof r.value=="function")return on(r.value)}s=P_(s)}function i(){return null}return i}function uv(s){try{return jn(s,""),!0}catch{return!1}}const by=zn(["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"]),Jd=zn(["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"]),Fd=zn(["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"]),ov=zn(["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"]),Wd=zn(["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"]),fv=zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xy=zn(["#text"]),_y=zn(["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"]),Pd=zn(["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"]),vy=zn(["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"]),io=zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dv=Ln(/{{[\w\W]*|^[\w\W]*}}/g),hv=Ln(/<%[\w\W]*|^[\w\W]*%>/g),pv=Ln(/\${[\w\W]*/g),mv=Ln(/^data-[\-\w.\u00B7-\uFFFF]+$/),gv=Ln(/^aria-[\-\w]+$/),Sy=Ln(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yv=Ln(/^(?:\w+script|data):/i),bv=Ln(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xv=Ln(/^html$/i),_v=Ln(/^[a-z][.\w]*(-[.\w]+)+$/i),ky=Ln(/<[/\w!]/g),wy=Ln(/<[/\w]/g),vv=Ln(/<\/no(script|embed|frames)/i),Sv=Ln(/\/>/i),Nl={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},kv=function(){return typeof window>"u"?null:window},wv=function(l,i){if(typeof l!="object"||typeof l.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";i&&i.hasAttribute(o)&&(r=i.getAttribute(o));const d="dompurify"+(r?"#"+r:"");try{return l.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},jy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Os=function(l,i,r,o){return Nn(l,i)&&Us(l[i])?lt(o.base?Fn(o.base):{},l[i],o.transform):r};function zb(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kv();const l=ue=>zb(ue);if(l.version="3.4.12",l.removed=[],!s||!s.document||s.document.nodeType!==Nl.document||!s.Element)return l.isSupported=!1,l;let i=s.document;const r=i,o=r.currentScript;s.DocumentFragment;const d=s.HTMLTemplateElement,h=s.Node,g=s.Element,m=s.NodeFilter,b=s.NamedNodeMap;b===void 0&&(s.NamedNodeMap||s.MozNamedAttrMap),s.HTMLFormElement;const x=s.DOMParser,k=s.trustedTypes,_=g.prototype,C=ba(_,"cloneNode"),N=ba(_,"remove"),H=ba(_,"nextSibling"),B=ba(_,"childNodes"),K=ba(_,"parentNode"),O=ba(_,"shadowRoot"),$=ba(_,"attributes"),A=h&&h.prototype?ba(h.prototype,"nodeType"):null,Q=h&&h.prototype?ba(h.prototype,"nodeName"):null;if(typeof d=="function"){const ue=i.createElement("template");ue.content&&ue.content.ownerDocument&&(i=ue.content.ownerDocument)}let L,M="",W,re=!1,he=0;const F=function(){if(he>0)throw di('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.')},ae=function(w){F(),he++;try{return L.createHTML(w)}finally{he--}},me=function(w){F(),he++;try{return L.createScriptURL(w)}finally{he--}},Ne=function(){return re||(W=wv(k,o),re=!0),W},pe=i,z=pe.implementation,P=pe.createNodeIterator,te=pe.createDocumentFragment,xe=pe.getElementsByTagName,we=r.importNode;let j=jy();l.isSupported=typeof Ob=="function"&&typeof K=="function"&&z&&z.createHTMLDocument!==void 0;const V=dv,ce=hv,oe=pv,ve=mv,Te=gv,Re=yv,it=bv,Ze=_v;let st=Sy,He=null;const Ct=lt({},[...by,...Jd,...Fd,...Wd,...xy]);let Je=null;const Ke=lt({},[..._y,...Pd,...vy,...io]);let Fe=Object.seal(dr(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}})),dt=null,Wn=null;const Bt=Object.seal(dr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Tn=!0,bn=!0,fn=!1,Un=!0,Zt=!1,ut=!0,dn=!1,J=!1,fe=null,Ee=null,Qe=!1,Tt=!1,Et=!1,xn=!1,en=!0,qt=!1;const En="user-content-";let pt=!0,_n=!1,T={},I=null;const _e=lt({},["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 Me=null;const Le=lt({},["audio","video","img","source","image","track"]);let An=null;const Gl=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Yn="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",hn="http://www.w3.org/1999/xhtml";let Gt=hn,Tl=!1,ka=null;const wa=lt({},[Yn,Hn,hn],Kd),Ys=zn(["mi","mo","mn","ms","mtext"]);let Yl=lt({},Ys);const Pa=zn(["annotation-xml"]);let Il=lt({},Pa);const ja=lt({},["title","style","font","a","script"]);let fl=null;const Yt=["application/xhtml+xml","text/html"],Rt="text/html";let Be=null,pn=null;const ta=i.createElement("form"),Na=function(w){return w instanceof RegExp||w instanceof Function},dl=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pn&&pn===w)return;(!w||typeof w!="object")&&(w={}),w=Fn(w),fl=Yt.indexOf(w.PARSER_MEDIA_TYPE)===-1?Rt:w.PARSER_MEDIA_TYPE,Be=fl==="application/xhtml+xml"?Kd:Cc,He=Os(w,"ALLOWED_TAGS",Ct,{transform:Be}),Je=Os(w,"ALLOWED_ATTR",Ke,{transform:Be}),ka=Os(w,"ALLOWED_NAMESPACES",wa,{transform:Kd}),An=Os(w,"ADD_URI_SAFE_ATTR",Gl,{transform:Be,base:Gl}),Me=Os(w,"ADD_DATA_URI_TAGS",Le,{transform:Be,base:Le}),I=Os(w,"FORBID_CONTENTS",_e,{transform:Be}),dt=Os(w,"FORBID_TAGS",Fn({}),{transform:Be}),Wn=Os(w,"FORBID_ATTR",Fn({}),{transform:Be}),T=Nn(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Fn(w.USE_PROFILES):w.USE_PROFILES:!1,Tn=w.ALLOW_ARIA_ATTR!==!1,bn=w.ALLOW_DATA_ATTR!==!1,fn=w.ALLOW_UNKNOWN_PROTOCOLS||!1,Un=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Zt=w.SAFE_FOR_TEMPLATES||!1,ut=w.SAFE_FOR_XML!==!1,dn=w.WHOLE_DOCUMENT||!1,Tt=w.RETURN_DOM||!1,Et=w.RETURN_DOM_FRAGMENT||!1,xn=w.RETURN_TRUSTED_TYPE||!1,Qe=w.FORCE_BODY||!1,en=w.SANITIZE_DOM!==!1,qt=w.SANITIZE_NAMED_PROPS||!1,pt=w.KEEP_CONTENT!==!1,_n=w.IN_PLACE||!1,st=uv(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:Sy,Gt=typeof w.NAMESPACE=="string"?w.NAMESPACE:hn,Yl=Nn(w,"MATHML_TEXT_INTEGRATION_POINTS")&&w.MATHML_TEXT_INTEGRATION_POINTS&&typeof w.MATHML_TEXT_INTEGRATION_POINTS=="object"?Fn(w.MATHML_TEXT_INTEGRATION_POINTS):lt({},Ys),Il=Nn(w,"HTML_INTEGRATION_POINTS")&&w.HTML_INTEGRATION_POINTS&&typeof w.HTML_INTEGRATION_POINTS=="object"?Fn(w.HTML_INTEGRATION_POINTS):lt({},Pa);const U=Nn(w,"CUSTOM_ELEMENT_HANDLING")&&w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING=="object"?Fn(w.CUSTOM_ELEMENT_HANDLING):dr(null);if(Fe=dr(null),Nn(U,"tagNameCheck")&&Na(U.tagNameCheck)&&(Fe.tagNameCheck=U.tagNameCheck),Nn(U,"attributeNameCheck")&&Na(U.attributeNameCheck)&&(Fe.attributeNameCheck=U.attributeNameCheck),Nn(U,"allowCustomizedBuiltInElements")&&typeof U.allowCustomizedBuiltInElements=="boolean"&&(Fe.allowCustomizedBuiltInElements=U.allowCustomizedBuiltInElements),Ln(Fe),Zt&&(bn=!1),Et&&(Tt=!0),T&&(He=lt({},xy),Je=dr(null),T.html===!0&&(lt(He,by),lt(Je,_y)),T.svg===!0&&(lt(He,Jd),lt(Je,Pd),lt(Je,io)),T.svgFilters===!0&&(lt(He,Fd),lt(Je,Pd),lt(Je,io)),T.mathMl===!0&&(lt(He,Wd),lt(Je,vy),lt(Je,io))),Bt.tagCheck=null,Bt.attributeCheck=null,Nn(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?Bt.tagCheck=w.ADD_TAGS:Us(w.ADD_TAGS)&&(He===Ct&&(He=Fn(He)),lt(He,w.ADD_TAGS,Be))),Nn(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?Bt.attributeCheck=w.ADD_ATTR:Us(w.ADD_ATTR)&&(Je===Ke&&(Je=Fn(Je)),lt(Je,w.ADD_ATTR,Be))),Nn(w,"ADD_URI_SAFE_ATTR")&&Us(w.ADD_URI_SAFE_ATTR)&<(An,w.ADD_URI_SAFE_ATTR,Be),Nn(w,"FORBID_CONTENTS")&&Us(w.FORBID_CONTENTS)&&(I===_e&&(I=Fn(I)),lt(I,w.FORBID_CONTENTS,Be)),Nn(w,"ADD_FORBID_CONTENTS")&&Us(w.ADD_FORBID_CONTENTS)&&(I===_e&&(I=Fn(I)),lt(I,w.ADD_FORBID_CONTENTS,Be)),pt&&(He["#text"]=!0),dn&<(He,["html","head","body"]),He.table&&(lt(He,["tbody"]),delete dt.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw di('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw di('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const se=L;L=w.TRUSTED_TYPES_POLICY;try{M=ae("")}catch(Se){throw L=se,Se}}else w.TRUSTED_TYPES_POLICY===null?(L=void 0,M=""):(L===void 0&&(L=Ne()),L&&typeof M=="string"&&(M=ae("")));zn&&zn(w),pn=w},In=lt({},[...Jd,...Fd,...ov]),hl=lt({},[...Wd,...fv]),pl=function(w,U,se){return U.namespaceURI===hn?w==="svg":U.namespaceURI===Yn?w==="svg"&&(se==="annotation-xml"||Yl[se]):!!In[w]},na=function(w,U,se){return U.namespaceURI===hn?w==="math":U.namespaceURI===Hn?w==="math"&&Il[se]:!!hl[w]},Cn=function(w,U,se){return U.namespaceURI===Hn&&!Il[se]||U.namespaceURI===Yn&&!Yl[se]?!1:!hl[w]&&(ja[w]||!In[w])},ml=function(w){let U=K(w);(!U||!U.tagName)&&(U={namespaceURI:Gt,tagName:"template"});const se=Cc(w.tagName),Se=Cc(U.tagName);return ka[w.namespaceURI]?w.namespaceURI===Hn?pl(se,U,Se):w.namespaceURI===Yn?na(se,U,Se):w.namespaceURI===hn?Cn(se,U,Se):!!(fl==="application/xhtml+xml"&&ka[w.namespaceURI]):!1},tn=function(w){or(l.removed,{element:w});try{K(w).removeChild(w)}catch{if(N(w),!K(w))throw di("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},mt=function(w){Vn(w);const U=B(w);if(U){const Se=[];ur(U,Ce=>{or(Se,Ce)}),ur(Se,Ce=>{try{N(Ce)}catch{}})}const se=$(w);if(se)for(let Se=se.length-1;Se>=0;--Se){const Ce=se[Se],De=Ce&&Ce.name;if(typeof De=="string")try{w.removeAttribute(De)}catch{}}},Xn=function(w,U){try{or(l.removed,{attribute:U.getAttributeNode(w),from:U})}catch{or(l.removed,{attribute:null,from:U})}if(U.removeAttribute(w),w==="is")if(Tt||Et)try{tn(U)}catch{}else try{U.setAttribute(w,"")}catch{}},Ti=function(w){const U=$(w);if(U)for(let se=U.length-1;se>=0;--se){const Se=U[se],Ce=Se&&Se.name;if(!(typeof Ce!="string"||Je[Be(Ce)]))try{w.removeAttribute(Ce)}catch{}}},Vn=function(w){const U=[w];for(;U.length>0;){const se=U.pop();(A?A(se):se.nodeType)===Nl.element&&Ti(se);const Ce=B(se);if(Ce)for(let De=Ce.length-1;De>=0;--De)U.push(Ce[De])}},gl=function(w){if(!ut)return;const U=[w];for(;U.length>0;){const se=U.pop(),Se=A?A(se):se.nodeType;if(Se===Nl.processingInstruction||Se===Nl.comment&&jn(wy,se.data)){try{N(se)}catch{}continue}if(Se===Nl.element){const De=se,jt=Be(Q?Q(se):se.nodeName);try{De.hasAttribute&&De.hasAttribute("patchsrc")&&De.removeAttribute("patchsrc"),De.hasAttribute&&De.hasAttribute("for")&&jt!=="label"&&jt!=="output"&&De.removeAttribute("for")}catch{}}const Ce=B(se);if(Ce)for(let De=Ce.length-1;De>=0;--De)U.push(Ce[De])}},Is=function(w){let U=null,se=null;if(Qe)w="<remove></remove>"+w;else{const De=py(w,/^[\r\n\t ]+/);se=De&&De[0]}fl==="application/xhtml+xml"&&Gt===hn&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const Se=L?ae(w):w;if(Gt===hn)try{U=new x().parseFromString(Se,fl)}catch{}if(!U||!U.documentElement){U=z.createDocument(Gt,"template",null);try{U.documentElement.innerHTML=Tl?M:Se}catch{}}const Ce=U.body||U.documentElement;return w&&se&&Ce.insertBefore(i.createTextNode(se),Ce.childNodes[0]||null),Gt===hn?xe.call(U,dn?"html":"body")[0]:dn?U.documentElement:Ce},la=function(w){return P.call(w.ownerDocument||w,w,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},aa=function(w){return w=wc(w,V," "),w=wc(w,ce," "),w=wc(w,oe," "),w},yl=function(w){var U;w.normalize();const se=P.call(w.ownerDocument||w,w,m.SHOW_TEXT|m.SHOW_COMMENT|m.SHOW_CDATA_SECTION|m.SHOW_PROCESSING_INSTRUCTION,null);let Se=se.nextNode();for(;Se;)Se.data=aa(Se.data),Se=se.nextNode();const Ce=(U=w.querySelectorAll)===null||U===void 0?void 0:U.call(w,"template");Ce&&ur(Ce,De=>{bl(De.content)&&yl(De.content)})},Qn=function(w){const U=Q?Q(w):null;return typeof U!="string"||Be(U)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==$(w)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==A(w)||w.childNodes!==B(w)},bl=function(w){if(!A||typeof w!="object"||w===null)return!1;try{return A(w)===Nl.documentFragment}catch{return!1}},mn=function(w){if(!A||typeof w!="object"||w===null)return!1;try{return typeof A(w)=="number"}catch{return!1}};function _t(ue,w,U){ue.length!==0&&ur(ue,se=>{se.call(l,w,U,pn)})}const es=function(w,U){return!!(ut&&w.hasChildNodes()&&!mn(w.firstElementChild)&&jn(ky,w.textContent)&&jn(ky,w.innerHTML)||ut&&w.namespaceURI===hn&&U==="style"&&mn(w.firstElementChild)||w.nodeType===Nl.processingInstruction||ut&&w.nodeType===Nl.comment&&jn(wy,w.data))},Ei=function(w,U){if(!dt[U]&&Ta(U)&&(Fe.tagNameCheck instanceof RegExp&&jn(Fe.tagNameCheck,U)||Fe.tagNameCheck instanceof Function&&Fe.tagNameCheck(U)))return!1;if(pt&&!I[U]){const se=K(w),Se=B(w);if(Se&&se){const Ce=Se.length;for(let De=Ce-1;De>=0;--De){const jt=_n?Se[De]:C(Se[De],!0);se.insertBefore(jt,H(w))}}}return tn(w),!0},Xl=function(w,U){if(_t(j.beforeSanitizeElements,w,null),w!==U&&K(w)===null)return!0;if(Qn(w))return tn(w),!0;const se=Be(Q?Q(w):w.nodeName);if(_t(j.uponSanitizeElement,w,{tagName:se,allowedTags:He}),w!==U&&K(w)===null)return!0;if(es(w,se))return tn(w),!0;if(dt[se]||!(Bt.tagCheck instanceof Function&&Bt.tagCheck(se))&&!He[se]){const Ce=Ei(w,se);return Ce===!1&&_t(j.afterSanitizeElements,w,null),Ce}if((A?A(w):w.nodeType)===Nl.element&&!ml(w)||(se==="noscript"||se==="noembed"||se==="noframes")&&jn(vv,w.innerHTML))return tn(w),!0;if(Zt&&w.nodeType===Nl.text){const Ce=aa(w.textContent);w.textContent!==Ce&&(or(l.removed,{element:w.cloneNode()}),w.textContent=Ce)}return _t(j.afterSanitizeElements,w,null),!1},El=function(w,U,se){if(Wn[U]||ut&&U==="patchsrc"||ut&&U==="for"&&w!=="label"&&w!=="output"||en&&(U==="id"||U==="name")&&(se in i||se in ta))return!1;const Se=Je[U]||Bt.attributeCheck instanceof Function&&Bt.attributeCheck(U,w);if(!(bn&&jn(ve,U))){if(!(Tn&&jn(Te,U))){if(Se){if(!An[U]){if(!jn(st,wc(se,it,""))){if(!((U==="src"||U==="xlink:href"||U==="href")&&w!=="script"&&my(se,"data:")===0&&Me[w])){if(!(fn&&!jn(Re,wc(se,it,"")))){if(se)return!1}}}}}else if(!(Ta(w)&&(Fe.tagNameCheck instanceof RegExp&&jn(Fe.tagNameCheck,w)||Fe.tagNameCheck instanceof Function&&Fe.tagNameCheck(w))&&(Fe.attributeNameCheck instanceof RegExp&&jn(Fe.attributeNameCheck,U)||Fe.attributeNameCheck instanceof Function&&Fe.attributeNameCheck(U,w))||U==="is"&&Fe.allowCustomizedBuiltInElements&&(Fe.tagNameCheck instanceof RegExp&&jn(Fe.tagNameCheck,se)||Fe.tagNameCheck instanceof Function&&Fe.tagNameCheck(se))))return!1}}return!0},sa=lt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ta=function(w){return!sa[Cc(w)]&&jn(Ze,w)},nn=function(w,U,se,Se){if(L&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!se)switch(k.getAttributeType(w,U)){case"TrustedHTML":return ae(Se);case"TrustedScriptURL":return me(Se)}return Se},Xs=function(w,U,se,Se){try{se?w.setAttributeNS(se,U,Se):w.setAttribute(U,Se),Qn(w)?tn(w):hy(l.removed)}catch{Xn(U,w)}},ia=function(w){_t(j.beforeSanitizeAttributes,w,null);const U=w.attributes;if(!U||Qn(w))return;const se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Je,forceKeepAttr:void 0};let Se=U.length;const Ce=Be(w.nodeName);for(;Se--;){const De=U[Se],jt=De.name,Qt=De.namespaceURI,gn=De.value,gt=Be(jt),Mt=gn;let It=jt==="value"?Mt:lv(Mt);if(se.attrName=gt,se.attrValue=It,se.keepAttr=!0,se.forceKeepAttr=void 0,_t(j.uponSanitizeAttribute,w,se),It=se.attrValue,qt&&(gt==="id"||gt==="name")&&my(It,En)!==0&&(Xn(jt,w),It=En+It),ut&&jn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,It)){Xn(jt,w);continue}if(gt==="attributename"&&py(It,"href")){Xn(jt,w);continue}if(!se.forceKeepAttr){if(!se.keepAttr){Xn(jt,w);continue}if(!Un&&jn(Sv,It)){Xn(jt,w);continue}if(Zt&&(It=aa(It)),!El(Ce,gt,It)){Xn(jt,w);continue}It=nn(Ce,gt,Qt,It),It!==Mt&&Xs(w,jt,Qt,It)}}_t(j.afterSanitizeAttributes,w,null)},xl=function(w){let U=null;const se=la(w);for(_t(j.beforeSanitizeShadowDOM,w,null);U=se.nextNode();)if(_t(j.uponSanitizeShadowNode,U,null),Xl(U,w),ia(U),bl(U.content)&&xl(U.content),(A?A(U):U.nodeType)===Nl.element){const Ce=O(U);bl(Ce)&&(Pn(Ce),xl(Ce))}_t(j.afterSanitizeShadowDOM,w,null)},Pn=function(w){const U=[{node:w,shadow:null}];for(;U.length>0;){const se=U.pop();if(se.shadow){xl(se.shadow);continue}const Se=se.node,De=(A?A(Se):Se.nodeType)===Nl.element,jt=B(Se);if(jt)for(let Qt=jt.length-1;Qt>=0;--Qt)U.push({node:jt[Qt],shadow:null});if(De){const Qt=Q?Q(Se):null;if(typeof Qt=="string"&&Be(Qt)==="template"){const gn=Se.content;bl(gn)&&U.push({node:gn,shadow:null})}}if(De){const Qt=O(Se);bl(Qt)&&U.push({node:null,shadow:Qt},{node:Qt,shadow:null})}}};return l.sanitize=function(ue){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=null,se=null,Se=null,Ce=null;if(Tl=!ue,Tl&&(ue="<!-->"),typeof ue!="string"&&!mn(ue)&&(ue=cv(ue),typeof ue!="string"))throw di("dirty is not a string, aborting");if(!l.isSupported)return ue;J?(He=fe,Je=Ee):dl(w),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(He=Fn(He)),j.uponSanitizeAttribute.length>0&&(Je=Fn(Je)),l.removed=[];const De=_n&&typeof ue!="string"&&mn(ue);if(De){gl(ue);const gt=Q?Q(ue):ue.nodeName;if(typeof gt=="string"){const Mt=Be(gt);if(!He[Mt]||dt[Mt])throw mt(ue),di("root node is forbidden and cannot be sanitized in-place")}if(Qn(ue))throw mt(ue),di("root node is clobbered and cannot be sanitized in-place");try{Pn(ue)}catch(Mt){throw mt(ue),Mt}}else if(mn(ue))U=Is("<!---->"),se=U.ownerDocument.importNode(ue,!0),se.nodeType===Nl.element&&se.nodeName==="BODY"||se.nodeName==="HTML"?U=se:U.appendChild(se),Pn(se);else{if(!Tt&&!Zt&&!dn&&ue.indexOf("<")===-1)return L&&xn?ae(ue):ue;if(U=Is(ue),!U)return Tt?null:xn?M:""}U&&Qe&&tn(U.firstChild);const jt=De?ue:U,Qt=la(jt);try{for(;Se=Qt.nextNode();)Xl(Se,jt),ia(Se),bl(Se.content)&&xl(Se.content)}catch(gt){throw De&&(mt(ue),ur(l.removed,Mt=>{Mt.element&&Vn(Mt.element)})),gt}if(De)return ur(l.removed,gt=>{gt.element&&Vn(gt.element)}),Zt&&yl(ue),ue;if(Tt){if(Zt&&yl(U),Et)for(Ce=te.call(U.ownerDocument);U.firstChild;)Ce.appendChild(U.firstChild);else Ce=U;return(Je.shadowroot||Je.shadowrootmode)&&(Ce=we.call(r,Ce,!0)),Ce}let gn=dn?U.outerHTML:U.innerHTML;return dn&&He["!doctype"]&&U.ownerDocument&&U.ownerDocument.doctype&&U.ownerDocument.doctype.name&&jn(xv,U.ownerDocument.doctype.name)&&(gn="<!DOCTYPE "+U.ownerDocument.doctype.name+`>
|
|
115
|
-
`+gn),Zt&&(gn=aa(gn)),L&&xn?ae(gn):gn},l.setConfig=function(){let ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dl(ue),J=!0,fe=He,Ee=Je},l.clearConfig=function(){pn=null,J=!1,fe=null,Ee=null,L=W,M=""},l.isValidAttribute=function(ue,w,U){pn||dl({});const se=Be(ue),Se=Be(w);return El(se,Se,U)},l.addHook=function(ue,w){typeof w=="function"&&Nn(j,ue)&&or(j[ue],w)},l.removeHook=function(ue,w){if(Nn(j,ue)){if(w!==void 0){const U=tv(j[ue],w);return U===-1?void 0:nv(j[ue],U,1)[0]}return hy(j[ue])}},l.removeHooks=function(ue){Nn(j,ue)&&(j[ue]=[])},l.removeAllHooks=function(){j=jy()},l}var jv=zb();const Nv=1024;let Tv=0;class ql{constructor(l,i){this.from=l,this.to=i}}class Ht{constructor(l={}){this.id=Tv++,this.perNode=!!l.perNode,this.deserialize=l.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=l.combine||null}add(l){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof l!="function"&&(l=ea.match(l)),i=>{let r=l(i);return r===void 0?null:[this,r]}}}Ht.closedBy=new Ht({deserialize:s=>s.split(" ")});Ht.openedBy=new Ht({deserialize:s=>s.split(" ")});Ht.group=new Ht({deserialize:s=>s.split(" ")});Ht.isolate=new Ht({deserialize:s=>{if(s&&s!="rtl"&&s!="ltr"&&s!="auto")throw new RangeError("Invalid value for isolate: "+s);return s||"auto"}});Ht.contextHash=new Ht({perNode:!0});Ht.lookAhead=new Ht({perNode:!0});Ht.mounted=new Ht({perNode:!0});class mr{constructor(l,i,r,o=!1){this.tree=l,this.overlay=i,this.parser=r,this.bracketed=o}static get(l){return l&&l.props&&l.props[Ht.mounted.id]}}const Ev=Object.create(null);class ea{constructor(l,i,r,o=0){this.name=l,this.props=i,this.id=r,this.flags=o}static define(l){let i=l.props&&l.props.length?Object.create(null):Ev,r=(l.top?1:0)|(l.skipped?2:0)|(l.error?4:0)|(l.name==null?8:0),o=new ea(l.name||"",i,l.id,r);if(l.props){for(let d of l.props)if(Array.isArray(d)||(d=d(o)),d){if(d[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");i[d[0].id]=d[1]}}return o}prop(l){return this.props[l.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(l){if(typeof l=="string"){if(this.name==l)return!0;let i=this.prop(Ht.group);return i?i.indexOf(l)>-1:!1}return this.id==l}static match(l){let i=Object.create(null);for(let r in l)for(let o of r.split(" "))i[o]=l[r];return r=>{for(let o=r.prop(Ht.group),d=-1;d<(o?o.length:0);d++){let h=i[d<0?r.name:o[d]];if(h)return h}}}}ea.none=new ea("",Object.create(null),0,8);class Lb{constructor(l){this.types=l;for(let i=0;i<l.length;i++)if(l[i].id!=i)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...l){let i=[];for(let r of this.types){let o=null;for(let d of l){let h=d(r);if(h){o||(o=Object.assign({},r.props));let g=h[1],m=h[0];m.combine&&m.id in o&&(g=m.combine(o[m.id],g)),o[m.id]=g}}i.push(o?new ea(r.name,o,r.id,r.flags):r)}return new Lb(i)}}const ro=new WeakMap,Ny=new WeakMap;var Lt;(function(s){s[s.ExcludeBuffers=1]="ExcludeBuffers",s[s.IncludeAnonymous=2]="IncludeAnonymous",s[s.IgnoreMounts=4]="IgnoreMounts",s[s.IgnoreOverlays=8]="IgnoreOverlays",s[s.EnterBracketed=16]="EnterBracketed"})(Lt||(Lt={}));class ol{constructor(l,i,r,o,d){if(this.type=l,this.children=i,this.positions=r,this.length=o,this.props=null,d&&d.length){this.props=Object.create(null);for(let[h,g]of d)this.props[typeof h=="number"?h:h.id]=g}}toString(){let l=mr.get(this);if(l&&!l.overlay)return l.tree.toString();let i="";for(let r of this.children){let o=r.toString();o&&(i&&(i+=","),i+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(i.length?"("+i+")":""):i}cursor(l=0){return new No(this.topNode,l)}cursorAt(l,i=0,r=0){let o=ro.get(this)||this.topNode,d=new No(o);return d.moveTo(l,i),ro.set(this,d._tree),d}get topNode(){return new Gn(this,0,0,null)}resolve(l,i=0){let r=Rc(ro.get(this)||this.topNode,l,i,!1);return ro.set(this,r),r}resolveInner(l,i=0){let r=Rc(Ny.get(this)||this.topNode,l,i,!0);return Ny.set(this,r),r}resolveStack(l,i=0){return Rv(this,l,i)}iterate(l){let{enter:i,leave:r,from:o=0,to:d=this.length}=l,h=l.mode||0,g=(h&Lt.IncludeAnonymous)>0;for(let m=this.cursor(h|Lt.IncludeAnonymous);;){let b=!1;if(m.from<=d&&m.to>=o&&(!g&&m.type.isAnonymous||i(m)!==!1)){if(m.firstChild())continue;b=!0}for(;b&&r&&(g||!m.type.isAnonymous)&&r(m),!m.nextSibling();){if(!m.parent())return;b=!0}}}prop(l){return l.perNode?this.props?this.props[l.id]:void 0:this.type.prop(l)}get propValues(){let l=[];if(this.props)for(let i in this.props)l.push([+i,this.props[i]]);return l}balance(l={}){return this.children.length<=8?this:Lh(ea.none,this.children,this.positions,0,this.children.length,0,this.length,(i,r,o)=>new ol(this.type,i,r,o,this.propValues),l.makeTree||((i,r,o)=>new ol(ea.none,i,r,o)))}static build(l){return Mv(l)}}ol.empty=new ol(ea.none,[],[],0);class Dh{constructor(l,i){this.buffer=l,this.index=i}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Dh(this.buffer,this.index)}}class Gs{constructor(l,i,r){this.buffer=l,this.length=i,this.set=r}get type(){return ea.none}toString(){let l=[];for(let i=0;i<this.buffer.length;)l.push(this.childString(i)),i=this.buffer[i+3];return l.join(",")}childString(l){let i=this.buffer[l],r=this.buffer[l+3],o=this.set.types[i],d=o.name;if(/\W/.test(d)&&!o.isError&&(d=JSON.stringify(d)),l+=4,r==l)return d;let h=[];for(;l<r;)h.push(this.childString(l)),l=this.buffer[l+3];return d+"("+h.join(",")+")"}findChild(l,i,r,o,d){let{buffer:h}=this,g=-1;for(let m=l;m!=i&&!(Ub(d,o,h[m+1],h[m+2])&&(g=m,r>0));m=h[m+3]);return g}slice(l,i,r){let o=this.buffer,d=new Uint16Array(i-l),h=0;for(let g=l,m=0;g<i;){d[m++]=o[g++],d[m++]=o[g++]-r;let b=d[m++]=o[g++]-r;d[m++]=o[g++]-l,h=Math.max(h,b)}return new Gs(d,h,this.set)}}function Ub(s,l,i,r){switch(s){case-2:return i<l;case-1:return r>=l&&i<l;case 0:return i<l&&r>l;case 1:return i<=l&&r>l;case 2:return r>l;case 4:return!0}}function Rc(s,l,i,r){for(var o;s.from==s.to||(i<1?s.from>=l:s.from>l)||(i>-1?s.to<=l:s.to<l);){let h=!r&&s instanceof Gn&&s.index<0?null:s.parent;if(!h)return s;s=h}let d=r?0:Lt.IgnoreOverlays;if(r)for(let h=s,g=h.parent;g;h=g,g=h.parent)h instanceof Gn&&h.index<0&&((o=g.enter(l,i,d))===null||o===void 0?void 0:o.from)!=h.from&&(s=g);for(;;){let h=s.enter(l,i,d);if(!h)return s;s=h}}class Hb{cursor(l=0){return new No(this,l)}getChild(l,i=null,r=null){let o=Ty(this,l,i,r);return o.length?o[0]:null}getChildren(l,i=null,r=null){return Ty(this,l,i,r)}resolve(l,i=0){return Rc(this,l,i,!1)}resolveInner(l,i=0){return Rc(this,l,i,!0)}matchContext(l){return bh(this.parent,l)}enterUnfinishedNodesBefore(l){let i=this.childBefore(l),r=this;for(;i;){let o=i.lastChild;if(!o||o.to!=i.to)break;o.type.isError&&o.from==o.to?(r=i,i=o.prevSibling):i=o}return r}get node(){return this}get next(){return this.parent}}class Gn extends Hb{constructor(l,i,r,o){super(),this._tree=l,this.from=i,this.index=r,this._parent=o}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(l,i,r,o,d=0){for(let h=this;;){for(let{children:g,positions:m}=h._tree,b=i>0?g.length:-1;l!=b;l+=i){let x=g[l],k=m[l]+h.from,_;if(!(!(d&Lt.EnterBracketed&&x instanceof ol&&(_=mr.get(x))&&!_.overlay&&_.bracketed&&r>=k&&r<=k+x.length)&&!Ub(o,r,k,k+x.length))){if(x instanceof Gs){if(d&Lt.ExcludeBuffers)continue;let C=x.findChild(0,x.buffer.length,i,r-k,o);if(C>-1)return new Sa(new Av(h,x,l,k),null,C)}else if(d&Lt.IncludeAnonymous||!x.type.isAnonymous||zh(x)){let C;if(!(d&Lt.IgnoreMounts)&&(C=mr.get(x))&&!C.overlay)return new Gn(C.tree,k,l,h);let N=new Gn(x,k,l,h);return d&Lt.IncludeAnonymous||!N.type.isAnonymous?N:N.nextChild(i<0?x.children.length-1:0,i,r,o,d)}}}if(d&Lt.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?l=h.index+i:l=i<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(l){return this.nextChild(0,1,l,2)}childBefore(l){return this.nextChild(this._tree.children.length-1,-1,l,-2)}prop(l){return this._tree.prop(l)}enter(l,i,r=0){let o;if(!(r&Lt.IgnoreOverlays)&&(o=mr.get(this._tree))&&o.overlay){let d=l-this.from,h=r&Lt.EnterBracketed&&o.bracketed;for(let{from:g,to:m}of o.overlay)if((i>0||h?g<=d:g<d)&&(i<0||h?m>=d:m>d))return new Gn(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,l,i,r)}nextSignificantParent(){let l=this;for(;l.type.isAnonymous&&l._parent;)l=l._parent;return l}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Ty(s,l,i,r){let o=s.cursor(),d=[];if(!o.firstChild())return d;if(i!=null){for(let h=!1;!h;)if(h=o.type.is(i),!o.nextSibling())return d}for(;;){if(r!=null&&o.type.is(r))return d;if(o.type.is(l)&&d.push(o.node),!o.nextSibling())return r==null?d:[]}}function bh(s,l,i=l.length-1){for(let r=s;i>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(l[i]&&l[i]!=r.name)return!1;i--}}return!0}class Av{constructor(l,i,r,o){this.parent=l,this.buffer=i,this.index=r,this.start=o}}class Sa extends Hb{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(l,i,r){super(),this.context=l,this._parent=i,this.index=r,this.type=l.buffer.set.types[l.buffer.buffer[r]]}child(l,i,r){let{buffer:o}=this.context,d=o.findChild(this.index+4,o.buffer[this.index+3],l,i-this.context.start,r);return d<0?null:new Sa(this.context,this,d)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(l){return this.child(1,l,2)}childBefore(l){return this.child(-1,l,-2)}prop(l){return this.type.prop(l)}enter(l,i,r=0){if(r&Lt.ExcludeBuffers)return null;let{buffer:o}=this.context,d=o.findChild(this.index+4,o.buffer[this.index+3],i>0?1:-1,l-this.context.start,i);return d<0?null:new Sa(this.context,this,d)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(l){return this._parent?null:this.context.parent.nextChild(this.context.index+l,l,0,4)}get nextSibling(){let{buffer:l}=this.context,i=l.buffer[this.index+3];return i<(this._parent?l.buffer[this._parent.index+3]:l.buffer.length)?new Sa(this.context,this._parent,i):this.externalSibling(1)}get prevSibling(){let{buffer:l}=this.context,i=this._parent?this._parent.index+4:0;return this.index==i?this.externalSibling(-1):new Sa(this.context,this._parent,l.findChild(i,this.index,-1,0,4))}get tree(){return null}toTree(){let l=[],i=[],{buffer:r}=this.context,o=this.index+4,d=r.buffer[this.index+3];if(d>o){let h=r.buffer[this.index+1];l.push(r.slice(o,d,h)),i.push(0)}return new ol(this.type,l,i,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Bb(s){if(!s.length)return null;let l=0,i=s[0];for(let d=1;d<s.length;d++){let h=s[d];(h.from>i.from||h.to<i.to)&&(i=h,l=d)}let r=i instanceof Gn&&i.index<0?null:i.parent,o=s.slice();return r?o[l]=r:o.splice(l,1),new Cv(o,i)}class Cv{constructor(l,i){this.heads=l,this.node=i}get next(){return Bb(this.heads)}}function Rv(s,l,i){let r=s.resolveInner(l,i),o=null;for(let d=r instanceof Gn?r:r.context.parent;d;d=d.parent)if(d.index<0){let h=d.parent;(o||(o=[r])).push(h.resolve(l,i)),d=h}else{let h=mr.get(d.tree);if(h&&h.overlay&&h.overlay[0].from<=l&&h.overlay[h.overlay.length-1].to>=l){let g=new Gn(h.tree,h.overlay[0].from+d.from,-1,d);(o||(o=[r])).push(Rc(g,l,i,!1))}}return o?Bb(o):r}class No{get name(){return this.type.name}constructor(l,i=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=i&~Lt.EnterBracketed,l instanceof Gn)this.yieldNode(l);else{this._tree=l.context.parent,this.buffer=l.context;for(let r=l._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=l,this.yieldBuf(l.index)}}yieldNode(l){return l?(this._tree=l,this.type=l.type,this.from=l.from,this.to=l.to,!0):!1}yieldBuf(l,i){this.index=l;let{start:r,buffer:o}=this.buffer;return this.type=i||o.set.types[o.buffer[l]],this.from=r+o.buffer[l+1],this.to=r+o.buffer[l+2],!0}yield(l){return l?l instanceof Gn?(this.buffer=null,this.yieldNode(l)):(this.buffer=l.context,this.yieldBuf(l.index,l.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(l,i,r){if(!this.buffer)return this.yield(this._tree.nextChild(l<0?this._tree._tree.children.length-1:0,l,i,r,this.mode));let{buffer:o}=this.buffer,d=o.findChild(this.index+4,o.buffer[this.index+3],l,i-this.buffer.start,r);return d<0?!1:(this.stack.push(this.index),this.yieldBuf(d))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(l){return this.enterChild(1,l,2)}childBefore(l){return this.enterChild(-1,l,-2)}enter(l,i,r=this.mode){return this.buffer?r&Lt.ExcludeBuffers?!1:this.enterChild(1,l,i):this.yield(this._tree.enter(l,i,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Lt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let l=this.mode&Lt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(l)}sibling(l){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+l,l,0,4,this.mode)):!1;let{buffer:i}=this.buffer,r=this.stack.length-1;if(l<0){let o=r<0?0:this.stack[r]+4;if(this.index!=o)return this.yieldBuf(i.findChild(o,this.index,-1,0,4))}else{let o=i.buffer[this.index+3];if(o<(r<0?i.buffer.length:i.buffer[this.stack[r]+3]))return this.yieldBuf(o)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+l,l,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(l){let i,r,{buffer:o}=this;if(o){if(l>0){if(this.index<o.buffer.buffer.length)return!1}else for(let d=0;d<this.index;d++)if(o.buffer.buffer[d+3]<this.index)return!1;({index:i,parent:r}=o)}else({index:i,_parent:r}=this._tree);for(;r;{index:i,_parent:r}=r)if(i>-1)for(let d=i+l,h=l<0?-1:r._tree.children.length;d!=h;d+=l){let g=r._tree.children[d];if(this.mode&Lt.IncludeAnonymous||g instanceof Gs||!g.type.isAnonymous||zh(g))return!1}return!0}move(l,i){if(i&&this.enterChild(l,0,4))return!0;for(;;){if(this.sibling(l))return!0;if(this.atLastNode(l)||!this.parent())return!1}}next(l=!0){return this.move(1,l)}prev(l=!0){return this.move(-1,l)}moveTo(l,i=0){for(;(this.from==this.to||(i<1?this.from>=l:this.from>l)||(i>-1?this.to<=l:this.to<l))&&this.parent(););for(;this.enterChild(1,l,i););return this}get node(){if(!this.buffer)return this._tree;let l=this.bufferNode,i=null,r=0;if(l&&l.context==this.buffer)e:for(let o=this.index,d=this.stack.length;d>=0;){for(let h=l;h;h=h._parent)if(h.index==o){if(o==this.index)return h;i=h,r=d+1;break e}o=this.stack[--d]}for(let o=r;o<this.stack.length;o++)i=new Sa(this.buffer,i,this.stack[o]);return this.bufferNode=new Sa(this.buffer,i,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(l,i){for(let r=0;;){let o=!1;if(this.type.isAnonymous||l(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(o=!0)}for(;;){if(o&&i&&i(this),o=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,o=!0}}}matchContext(l){if(!this.buffer)return bh(this.node.parent,l);let{buffer:i}=this.buffer,{types:r}=i.set;for(let o=l.length-1,d=this.stack.length-1;o>=0;d--){if(d<0)return bh(this._tree,l,o);let h=r[i.buffer[this.stack[d]]];if(!h.isAnonymous){if(l[o]&&l[o]!=h.name)return!1;o--}}return!0}}function zh(s){return s.children.some(l=>l instanceof Gs||!l.type.isAnonymous||zh(l))}function Mv(s){var l;let{buffer:i,nodeSet:r,maxBufferLength:o=Nv,reused:d=[],minRepeatType:h=r.types.length}=s,g=Array.isArray(i)?new Dh(i,i.length):i,m=r.types,b=0,x=0;function k(Q,L,M,W,re,he){let{id:F,start:ae,end:me,size:Ne}=g,pe=x,z=b;if(Ne<0)if(g.next(),Ne==-1){let j=d[F];M.push(j),W.push(ae-Q);return}else if(Ne==-3){b=F;return}else if(Ne==-4){x=F;return}else throw new RangeError(`Unrecognized record size: ${Ne}`);let P=m[F],te,xe,we=ae-Q;if(me-ae<=o&&(xe=B(g.pos-L,re))){let j=new Uint16Array(xe.size-xe.skip),V=g.pos-xe.size,ce=j.length;for(;g.pos>V;)ce=K(xe.start,j,ce);te=new Gs(j,me-xe.start,r),we=xe.start-Q}else{let j=g.pos-Ne;g.next();let V=[],ce=[],oe=F>=h?F:-1,ve=0,Te=me;for(;g.pos>j;)oe>=0&&g.id==oe&&g.size>=0?(g.end<=Te-o&&(N(V,ce,ae,ve,g.end,Te,oe,pe,z),ve=V.length,Te=g.end),g.next()):he>2500?_(ae,j,V,ce):k(ae,j,V,ce,oe,he+1);if(oe>=0&&ve>0&&ve<V.length&&N(V,ce,ae,ve,ae,Te,oe,pe,z),V.reverse(),ce.reverse(),oe>-1&&ve>0){let Re=C(P,z);te=Lh(P,V,ce,0,V.length,0,me-ae,Re,Re)}else te=H(P,V,ce,me-ae,pe-me,z)}M.push(te),W.push(we)}function _(Q,L,M,W){let re=[],he=0,F=-1;for(;g.pos>L;){let{id:ae,start:me,end:Ne,size:pe}=g;if(pe>4)g.next();else{if(F>-1&&me<F)break;F<0&&(F=Ne-o),re.push(ae,me,Ne),he++,g.next()}}if(he){let ae=new Uint16Array(he*4),me=re[re.length-2];for(let Ne=re.length-3,pe=0;Ne>=0;Ne-=3)ae[pe++]=re[Ne],ae[pe++]=re[Ne+1]-me,ae[pe++]=re[Ne+2]-me,ae[pe++]=pe;M.push(new Gs(ae,re[2]-me,r)),W.push(me-Q)}}function C(Q,L){return(M,W,re)=>{let he=0,F=M.length-1,ae,me;if(F>=0&&(ae=M[F])instanceof ol){if(!F&&ae.type==Q&&ae.length==re)return ae;(me=ae.prop(Ht.lookAhead))&&(he=W[F]+ae.length+me)}return H(Q,M,W,re,he,L)}}function N(Q,L,M,W,re,he,F,ae,me){let Ne=[],pe=[];for(;Q.length>W;)Ne.push(Q.pop()),pe.push(L.pop()+M-re);Q.push(H(r.types[F],Ne,pe,he-re,ae-he,me)),L.push(re-M)}function H(Q,L,M,W,re,he,F){if(he){let ae=[Ht.contextHash,he];F=F?[ae].concat(F):[ae]}if(re>25){let ae=[Ht.lookAhead,re];F=F?[ae].concat(F):[ae]}return new ol(Q,L,M,W,F)}function B(Q,L){let M=g.fork(),W=0,re=0,he=0,F=M.end-o,ae={size:0,start:0,skip:0};e:for(let me=M.pos-Q;M.pos>me;){let Ne=M.size;if(M.id==L&&Ne>=0){ae.size=W,ae.start=re,ae.skip=he,he+=4,W+=4,M.next();continue}let pe=M.pos-Ne;if(Ne<0||pe<me||M.start<F)break;let z=M.id>=h?4:0,P=M.start;for(M.next();M.pos>pe;){if(M.size<0)if(M.size==-3||M.size==-4)z+=4;else break e;else M.id>=h&&(z+=4);M.next()}re=P,W+=Ne,he+=z}return(L<0||W==Q)&&(ae.size=W,ae.start=re,ae.skip=he),ae.size>4?ae:void 0}function K(Q,L,M){let{id:W,start:re,end:he,size:F}=g;if(g.next(),F>=0&&W<h){let ae=M;if(F>4){let me=g.pos-(F-4);for(;g.pos>me;)M=K(Q,L,M)}L[--M]=ae,L[--M]=he-Q,L[--M]=re-Q,L[--M]=W}else F==-3?b=W:F==-4&&(x=W);return M}let O=[],$=[];for(;g.pos>0;)k(s.start||0,s.bufferStart||0,O,$,-1,0);let A=(l=s.length)!==null&&l!==void 0?l:O.length?$[0]+O[0].length:0;return new ol(m[s.topID],O.reverse(),$.reverse(),A)}const Ey=new WeakMap;function vo(s,l){if(!s.isAnonymous||l instanceof Gs||l.type!=s)return 1;let i=Ey.get(l);if(i==null){i=1;for(let r of l.children){if(r.type!=s||!(r instanceof ol)){i=1;break}i+=vo(s,r)}Ey.set(l,i)}return i}function Lh(s,l,i,r,o,d,h,g,m){let b=0;for(let N=r;N<o;N++)b+=vo(s,l[N]);let x=Math.ceil(b*1.5/8),k=[],_=[];function C(N,H,B,K,O){for(let $=B;$<K;){let A=$,Q=H[$],L=vo(s,N[$]);for($++;$<K;$++){let M=vo(s,N[$]);if(L+M>=x)break;L+=M}if($==A+1){if(L>x){let M=N[A];C(M.children,M.positions,0,M.children.length,H[A]+O);continue}k.push(N[A])}else{let M=H[$-1]+N[$-1].length-Q;k.push(Lh(s,N,H,A,$,Q,M,null,m))}_.push(Q+O-d)}}return C(l,i,r,o,0),(g||m)(k,_,h)}class fw{constructor(){this.map=new WeakMap}setBuffer(l,i,r){let o=this.map.get(l);o||this.map.set(l,o=new Map),o.set(i,r)}getBuffer(l,i){let r=this.map.get(l);return r&&r.get(i)}set(l,i){l instanceof Sa?this.setBuffer(l.context.buffer,l.index,i):l instanceof Gn&&this.map.set(l.tree,i)}get(l){return l instanceof Sa?this.getBuffer(l.context.buffer,l.index):l instanceof Gn?this.map.get(l.tree):void 0}cursorSet(l,i){l.buffer?this.setBuffer(l.buffer.buffer,l.index,i):this.map.set(l.tree,i)}cursorGet(l){return l.buffer?this.getBuffer(l.buffer.buffer,l.index):this.map.get(l.tree)}}class Mc{constructor(l,i,r,o,d=!1,h=!1){this.from=l,this.to=i,this.tree=r,this.offset=o,this.open=(d?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(l,i=[],r=!1){let o=[new Mc(0,l.length,l,0,!1,r)];for(let d of i)d.to>l.length&&o.push(d);return o}static applyChanges(l,i,r=128){if(!i.length)return l;let o=[],d=1,h=l.length?l[0]:null;for(let g=0,m=0,b=0;;g++){let x=g<i.length?i[g]:null,k=x?x.fromA:1e9;if(k-m>=r)for(;h&&h.from<k;){let _=h;if(m>=_.from||k<=_.to||b){let C=Math.max(_.from,m)-b,N=Math.min(_.to,k)-b;_=C>=N?null:new Mc(C,N,_.tree,_.offset+b,g>0,!!x)}if(_&&o.push(_),h.to>k)break;h=d<l.length?l[d++]:null}if(!x)break;m=x.toA,b=x.toA-x.toB}return o}}class dw{startParse(l,i,r){return typeof l=="string"&&(l=new Ov(l)),r=r?r.length?r.map(o=>new ql(o.from,o.to)):[new ql(0,0)]:[new ql(0,l.length)],this.createParse(l,i||[],r)}parse(l,i,r){let o=this.startParse(l,i,r);for(;;){let d=o.advance();if(d)return d}}}class Ov{constructor(l){this.string=l}get length(){return this.string.length}chunk(l){return this.string.slice(l)}get lineChunks(){return!1}read(l,i){return this.string.slice(l,i)}}function hw(s){return(l,i,r,o)=>new zv(l,s,i,r,o)}class Ay{constructor(l,i,r,o,d,h){this.parser=l,this.parse=i,this.overlay=r,this.bracketed=o,this.target=d,this.from=h}}function Cy(s){if(!s.length||s.some(l=>l.from>=l.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(s))}class Dv{constructor(l,i,r,o,d,h,g,m){this.parser=l,this.predicate=i,this.mounts=r,this.index=o,this.start=d,this.bracketed=h,this.target=g,this.prev=m,this.depth=0,this.ranges=[]}}const xh=new Ht({perNode:!0});class zv{constructor(l,i,r,o,d){this.nest=i,this.input=r,this.fragments=o,this.ranges=d,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=l}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let o of this.inner)o.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new ol(r.type,r.children,r.positions,r.length,r.propValues.concat([[xh,this.stoppedAt]]))),r}let l=this.inner[this.innerDone],i=l.parse.advance();if(i){this.innerDone++;let r=Object.assign(Object.create(null),l.target.props);r[Ht.mounted.id]=new mr(i,l.overlay,l.parser,l.bracketed),l.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let l=this.input.length;for(let i=this.innerDone;i<this.inner.length;i++)this.inner[i].from<l&&(l=Math.min(l,this.inner[i].parse.parsedPos));return l}stopAt(l){if(this.stoppedAt=l,this.baseParse)this.baseParse.stopAt(l);else for(let i=this.innerDone;i<this.inner.length;i++)this.inner[i].parse.stopAt(l)}startInner(){let l=new Hv(this.fragments),i=null,r=null,o=new No(new Gn(this.baseTree,this.ranges[0].from,0,null),Lt.IncludeAnonymous|Lt.IgnoreMounts);e:for(let d,h;;){let g=!0,m;if(this.stoppedAt!=null&&o.from>=this.stoppedAt)g=!1;else if(l.hasNode(o)){if(i){let b=i.mounts.find(x=>x.frag.from<=o.from&&x.frag.to>=o.to&&x.mount.overlay);if(b)for(let x of b.mount.overlay){let k=x.from+b.pos,_=x.to+b.pos;k>=o.from&&_<=o.to&&!i.ranges.some(C=>C.from<_&&C.to>k)&&i.ranges.push({from:k,to:_})}}g=!1}else if(r&&(h=Lv(r.ranges,o.from,o.to)))g=h!=2;else if(!o.type.isAnonymous&&(d=this.nest(o,this.input))&&(o.from<o.to||!d.overlay)){o.tree||(Uv(o),i&&i.depth++,r&&r.depth++);let b=l.findMounts(o.from,d.parser);if(typeof d.overlay=="function")i=new Dv(d.parser,d.overlay,b,this.inner.length,o.from,!!d.bracketed,o.tree,i);else{let x=Oy(this.ranges,d.overlay||(o.from<o.to?[new ql(o.from,o.to)]:[]));x.length&&Cy(x),(x.length||!d.overlay)&&this.inner.push(new Ay(d.parser,x.length?d.parser.startParse(this.input,Dy(b,x),x):d.parser.startParse(""),d.overlay?d.overlay.map(k=>new ql(k.from-o.from,k.to-o.from)):null,!!d.bracketed,o.tree,x.length?x[0].from:o.from)),d.overlay?x.length&&(r={ranges:x,depth:0,prev:r}):g=!1}}else if(i&&(m=i.predicate(o))&&(m===!0&&(m=new ql(o.from,o.to)),m.from<m.to)){let b=i.ranges.length-1;b>=0&&i.ranges[b].to==m.from?i.ranges[b]={from:i.ranges[b].from,to:m.to}:i.ranges.push(m)}if(g&&o.firstChild())i&&i.depth++,r&&r.depth++;else for(;!o.nextSibling();){if(!o.parent())break e;if(i&&!--i.depth){let b=Oy(this.ranges,i.ranges);b.length&&(Cy(b),this.inner.splice(i.index,0,new Ay(i.parser,i.parser.startParse(this.input,Dy(i.mounts,b),b),i.ranges.map(x=>new ql(x.from-i.start,x.to-i.start)),i.bracketed,i.target,b[0].from))),i=i.prev}r&&!--r.depth&&(r=r.prev)}}}}function Lv(s,l,i){for(let r of s){if(r.from>=i)break;if(r.to>l)return r.from<=l&&r.to>=i?2:1}return 0}function Ry(s,l,i,r,o,d){if(l<i){let h=s.buffer[l+1];r.push(s.slice(l,i,h)),o.push(h-d)}}function Uv(s){let{node:l}=s,i=[],r=l.context.buffer;do i.push(s.index),s.parent();while(!s.tree);let o=s.tree,d=o.children.indexOf(r),h=o.children[d],g=h.buffer,m=[d];function b(x,k,_,C,N,H){let B=i[H],K=[],O=[];Ry(h,x,B,K,O,C);let $=g[B+1],A=g[B+2];m.push(K.length);let Q=H?b(B+4,g[B+3],h.set.types[g[B]],$,A-$,H-1):l.toTree();return K.push(Q),O.push($-C),Ry(h,g[B+3],k,K,O,C),new ol(_,K,O,N)}o.children[d]=b(0,g.length,ea.none,0,h.length,i.length-1);for(let x of m){let k=s.tree.children[x],_=s.tree.positions[x];s.yield(new Gn(k,_+s.from,x,s._tree))}}class My{constructor(l,i){this.offset=i,this.done=!1,this.cursor=l.cursor(Lt.IncludeAnonymous|Lt.IgnoreMounts)}moveTo(l){let{cursor:i}=this,r=l-this.offset;for(;!this.done&&i.from<r;)if(!(i.to>=l&&i.enter(r,1,Lt.IgnoreOverlays|Lt.ExcludeBuffers)))if(i.to<=l)i.next(!1)||(this.done=!0);else break}hasNode(l){if(this.moveTo(l.from),!this.done&&this.cursor.from+this.offset==l.from&&this.cursor.tree)for(let i=this.cursor.tree;;){if(i==l.tree)return!0;if(i.children.length&&i.positions[0]==0&&i.children[0]instanceof ol)i=i.children[0];else break}return!1}}class Hv{constructor(l){var i;if(this.fragments=l,this.curTo=0,this.fragI=0,l.length){let r=this.curFrag=l[0];this.curTo=(i=r.tree.prop(xh))!==null&&i!==void 0?i:r.to,this.inner=new My(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(l){for(;this.curFrag&&l.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=l.from&&this.curTo>=l.to&&this.inner.hasNode(l)}nextFrag(){var l;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let i=this.curFrag=this.fragments[this.fragI];this.curTo=(l=i.tree.prop(xh))!==null&&l!==void 0?l:i.to,this.inner=new My(i.tree,-i.offset)}}findMounts(l,i){var r;let o=[];if(this.inner){this.inner.cursor.moveTo(l,1);for(let d=this.inner.cursor.node;d;d=d.parent){let h=(r=d.tree)===null||r===void 0?void 0:r.prop(Ht.mounted);if(h&&h.parser==i)for(let g=this.fragI;g<this.fragments.length;g++){let m=this.fragments[g];if(m.from>=d.to)break;m.tree==this.curFrag.tree&&o.push({frag:m,pos:d.from-m.offset,mount:h})}}}return o}}function Oy(s,l){let i=null,r=l;for(let o=1,d=0;o<s.length;o++){let h=s[o-1].to,g=s[o].from;for(;d<r.length;d++){let m=r[d];if(m.from>=g)break;m.to<=h||(i||(r=i=l.slice()),m.from<h?(i[d]=new ql(m.from,h),m.to>g&&i.splice(d+1,0,new ql(g,m.to))):m.to>g?i[d--]=new ql(g,m.to):i.splice(d--,1))}}return r}function Bv(s,l,i,r){let o=0,d=0,h=!1,g=!1,m=-1e9,b=[];for(;;){let x=o==s.length?1e9:h?s[o].to:s[o].from,k=d==l.length?1e9:g?l[d].to:l[d].from;if(h!=g){let _=Math.max(m,i),C=Math.min(x,k,r);_<C&&b.push(new ql(_,C))}if(m=Math.min(x,k),m==1e9)break;x==m&&(h?(h=!1,o++):h=!0),k==m&&(g?(g=!1,d++):g=!0)}return b}function Dy(s,l){let i=[];for(let{pos:r,mount:o,frag:d}of s){let h=r+(o.overlay?o.overlay[0].from:0),g=h+o.tree.length,m=Math.max(d.from,h),b=Math.min(d.to,g);if(o.overlay){let x=o.overlay.map(_=>new ql(_.from+r,_.to+r)),k=Bv(l,x,m,b);for(let _=0,C=m;;_++){let N=_==k.length,H=N?b:k[_].from;if(H>C&&i.push(new Mc(C,H,o.tree,-h,d.from>=C||d.openStart,d.to<=H||d.openEnd)),N)break;C=k[_].to}}else i.push(new Mc(m,b,o.tree,-h,d.from>=h||d.openStart,d.to<=g||d.openEnd))}return i}let qv=0;class Bl{constructor(l,i,r,o){this.name=l,this.set=i,this.base=r,this.modified=o,this.id=qv++}toString(){let{name:l}=this;for(let i of this.modified)i.name&&(l=`${i.name}(${l})`);return l}static define(l,i){let r=typeof l=="string"?l:"?";if(l instanceof Bl&&(i=l),i!=null&&i.base)throw new Error("Can not derive from a modified tag");let o=new Bl(r,[],null,[]);if(o.set.push(o),i)for(let d of i.set)o.set.push(d);return o}static defineModifier(l){let i=new To(l);return r=>r.modified.indexOf(i)>-1?r:To.get(r.base||r,r.modified.concat(i).sort((o,d)=>o.id-d.id))}}let Gv=0;class To{constructor(l){this.name=l,this.instances=[],this.id=Gv++}static get(l,i){if(!i.length)return l;let r=i[0].instances.find(g=>g.base==l&&Yv(i,g.modified));if(r)return r;let o=[],d=new Bl(l.name,o,l,i);for(let g of i)g.instances.push(d);let h=Iv(i);for(let g of l.set)if(!g.modified.length)for(let m of h)o.push(To.get(g,m));return d}}function Yv(s,l){return s.length==l.length&&s.every((i,r)=>i==l[r])}function Iv(s){let l=[[]];for(let i=0;i<s.length;i++)for(let r=0,o=l.length;r<o;r++)l.push(l[r].concat(s[i]));return l.sort((i,r)=>r.length-i.length)}function pw(s){let l=Object.create(null);for(let i in s){let r=s[i];Array.isArray(r)||(r=[r]);for(let o of i.split(" "))if(o){let d=[],h=2,g=o;for(let k=0;;){if(g=="..."&&k>0&&k+3==o.length){h=1;break}let _=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(g);if(!_)throw new RangeError("Invalid path: "+o);if(d.push(_[0]=="*"?"":_[0][0]=='"'?JSON.parse(_[0]):_[0]),k+=_[0].length,k==o.length)break;let C=o[k++];if(k==o.length&&C=="!"){h=0;break}if(C!="/")throw new RangeError("Invalid path: "+o);g=o.slice(k)}let m=d.length-1,b=d[m];if(!b)throw new RangeError("Invalid path: "+o);let x=new Oc(r,h,m>0?d.slice(0,m):null);l[b]=x.sort(l[b])}}return qb.add(l)}const qb=new Ht({combine(s,l){let i,r,o;for(;s||l;){if(!s||l&&s.depth>=l.depth?(o=l,l=l.next):(o=s,s=s.next),i&&i.mode==o.mode&&!o.context&&!i.context)continue;let d=new Oc(o.tags,o.mode,o.context);i?i.next=d:r=d,i=d}return r}});class Oc{constructor(l,i,r,o){this.tags=l,this.mode=i,this.context=r,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(l){return!l||l.depth<this.depth?(this.next=l,this):(l.next=this.sort(l.next),l)}get depth(){return this.context?this.context.length:0}}Oc.empty=new Oc([],2,null);function Gb(s,l){let i=Object.create(null);for(let d of s)if(!Array.isArray(d.tag))i[d.tag.id]=d.class;else for(let h of d.tag)i[h.id]=d.class;let{scope:r,all:o=null}=l||{};return{style:d=>{let h=o;for(let g of d)for(let m of g.set){let b=i[m.id];if(b){h=h?h+" "+b:b;break}}return h},scope:r}}function Xv(s,l){let i=null;for(let r of s){let o=r.style(l);o&&(i=i?i+" "+o:o)}return i}function Vv(s,l,i,r=0,o=s.length){let d=new $v(r,Array.isArray(l)?l:[l],i);d.highlightRange(s.cursor(),r,o,"",d.highlighters),d.flush(o)}function Qv(s,l,i,r,o,d=0,h=s.length){let g=d;function m(b,x){if(!(b<=g)){for(let k=s.slice(g,b),_=0;;){let C=k.indexOf(`
|
|
116
|
-
`,_),N=C<0?k.length:C;if(N>_&&r(k.slice(_,N),x),C<0)break;o(),_=C+1}g=b}}Vv(l,i,(b,x,k)=>{m(b,""),m(x,k)},d,h),m(h,"")}class $v{constructor(l,i,r){this.at=l,this.highlighters=i,this.span=r,this.class=""}startSpan(l,i){i!=this.class&&(this.flush(l),l>this.at&&(this.at=l),this.class=i)}flush(l){l>this.at&&this.class&&this.span(this.at,l,this.class)}highlightRange(l,i,r,o,d){let{type:h,from:g,to:m}=l;if(g>=r||m<=i)return;h.isTop&&(d=this.highlighters.filter(C=>!C.scope||C.scope(h)));let b=o,x=Zv(l)||Oc.empty,k=Xv(d,x.tags);if(k&&(b&&(b+=" "),b+=k,x.mode==1&&(o+=(o?" ":"")+k)),this.startSpan(Math.max(i,g),b),x.opaque)return;let _=l.tree&&l.tree.prop(Ht.mounted);if(_&&_.overlay){let C=l.node.enter(_.overlay[0].from+g,1),N=this.highlighters.filter(B=>!B.scope||B.scope(_.tree.type)),H=l.firstChild();for(let B=0,K=g;;B++){let O=B<_.overlay.length?_.overlay[B]:null,$=O?O.from+g:m,A=Math.max(i,K),Q=Math.min(r,$);if(A<Q&&H)for(;l.from<Q&&(this.highlightRange(l,A,Q,o,d),this.startSpan(Math.min(Q,l.to),b),!(l.to>=$||!l.nextSibling())););if(!O||$>r)break;K=O.to+g,K>i&&(this.highlightRange(C.cursor(),Math.max(i,O.from+g),Math.min(r,K),"",N),this.startSpan(Math.min(r,K),b))}H&&l.parent()}else if(l.firstChild()){_&&(o="");do if(!(l.to<=i)){if(l.from>=r)break;this.highlightRange(l,i,r,o,d),this.startSpan(Math.min(r,l.to),b)}while(l.nextSibling());l.parent()}}}function Zv(s){let l=s.type.prop(qb);for(;l&&l.context&&!s.matchContext(l.context);)l=l.next;return l||null}const ge=Bl.define,co=ge(),zs=ge(),zy=ge(zs),Ly=ge(zs),Ls=ge(),uo=ge(Ls),eh=ge(Ls),xa=ge(),hi=ge(xa),pa=ge(),ma=ge(),_h=ge(),Nc=ge(_h),oo=ge(),be={comment:co,lineComment:ge(co),blockComment:ge(co),docComment:ge(co),name:zs,variableName:ge(zs),typeName:zy,tagName:ge(zy),propertyName:Ly,attributeName:ge(Ly),className:ge(zs),labelName:ge(zs),namespace:ge(zs),macroName:ge(zs),literal:Ls,string:uo,docString:ge(uo),character:ge(uo),attributeValue:ge(uo),number:eh,integer:ge(eh),float:ge(eh),bool:ge(Ls),regexp:ge(Ls),escape:ge(Ls),color:ge(Ls),url:ge(Ls),keyword:pa,self:ge(pa),null:ge(pa),atom:ge(pa),unit:ge(pa),modifier:ge(pa),operatorKeyword:ge(pa),controlKeyword:ge(pa),definitionKeyword:ge(pa),moduleKeyword:ge(pa),operator:ma,derefOperator:ge(ma),arithmeticOperator:ge(ma),logicOperator:ge(ma),bitwiseOperator:ge(ma),compareOperator:ge(ma),updateOperator:ge(ma),definitionOperator:ge(ma),typeOperator:ge(ma),controlOperator:ge(ma),punctuation:_h,separator:ge(_h),bracket:Nc,angleBracket:ge(Nc),squareBracket:ge(Nc),paren:ge(Nc),brace:ge(Nc),content:xa,heading:hi,heading1:ge(hi),heading2:ge(hi),heading3:ge(hi),heading4:ge(hi),heading5:ge(hi),heading6:ge(hi),contentSeparator:ge(xa),list:ge(xa),quote:ge(xa),emphasis:ge(xa),strong:ge(xa),link:ge(xa),monospace:ge(xa),strikethrough:ge(xa),inserted:ge(),deleted:ge(),changed:ge(),invalid:ge(),meta:oo,documentMeta:ge(oo),annotation:ge(oo),processingInstruction:ge(oo),definition:Bl.defineModifier("definition"),constant:Bl.defineModifier("constant"),function:Bl.defineModifier("function"),standard:Bl.defineModifier("standard"),local:Bl.defineModifier("local"),special:Bl.defineModifier("special")};for(let s in be){let l=be[s];l instanceof Bl&&(l.name=s)}Gb([{tag:be.link,class:"tok-link"},{tag:be.heading,class:"tok-heading"},{tag:be.emphasis,class:"tok-emphasis"},{tag:be.strong,class:"tok-strong"},{tag:be.keyword,class:"tok-keyword"},{tag:be.atom,class:"tok-atom"},{tag:be.bool,class:"tok-bool"},{tag:be.url,class:"tok-url"},{tag:be.labelName,class:"tok-labelName"},{tag:be.inserted,class:"tok-inserted"},{tag:be.deleted,class:"tok-deleted"},{tag:be.literal,class:"tok-literal"},{tag:be.string,class:"tok-string"},{tag:be.number,class:"tok-number"},{tag:[be.regexp,be.escape,be.special(be.string)],class:"tok-string2"},{tag:be.variableName,class:"tok-variableName"},{tag:be.local(be.variableName),class:"tok-variableName tok-local"},{tag:be.definition(be.variableName),class:"tok-variableName tok-definition"},{tag:be.special(be.variableName),class:"tok-variableName2"},{tag:be.definition(be.propertyName),class:"tok-propertyName tok-definition"},{tag:be.typeName,class:"tok-typeName"},{tag:be.namespace,class:"tok-namespace"},{tag:be.className,class:"tok-className"},{tag:be.macroName,class:"tok-macroName"},{tag:be.propertyName,class:"tok-propertyName"},{tag:be.operator,class:"tok-operator"},{tag:be.comment,class:"tok-comment"},{tag:be.meta,class:"tok-meta"},{tag:be.invalid,class:"tok-invalid"},{tag:be.punctuation,class:"tok-punctuation"}]);const Kv="modulepreload",Jv=function(s,l){return new URL(s,l).href},Uy={},Xe=function(l,i,r){let o=Promise.resolve();if(i&&i.length>0){let h=function(x){return Promise.all(x.map(k=>Promise.resolve(k).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};const g=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),b=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));o=h(i.map(x=>{if(x=Jv(x,r),x in Uy)return;Uy[x]=!0;const k=x.endsWith(".css"),_=k?'[rel="stylesheet"]':"";if(!!r)for(let H=g.length-1;H>=0;H--){const B=g[H];if(B.href===x&&(!k||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${x}"]${_}`))return;const N=document.createElement("link");if(N.rel=k?"stylesheet":Kv,k||(N.as="script"),N.crossOrigin="",N.href=x,b&&N.setAttribute("nonce",b),document.head.appendChild(N),k)return new Promise((H,B)=>{N.addEventListener("load",H),N.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${x}`)))})}))}function d(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return o.then(h=>{for(const g of h||[])g.status==="rejected"&&d(g.reason);return l().catch(d)})},Yb={js:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-BybHqs37.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({jsx:!0}),cjs:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-BybHqs37.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript(),mjs:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-BybHqs37.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript(),jsx:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-BybHqs37.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({jsx:!0}),ts:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-BybHqs37.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),mts:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-BybHqs37.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),cts:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-BybHqs37.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),tsx:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-BybHqs37.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0,jsx:!0}),json:async()=>(await Xe(async()=>{const{json:s}=await import("./index-BorlqgNX.js");return{json:s}},__vite__mapDeps([6,1,2,3,4]),import.meta.url)).json(),jsonc:async()=>(await Xe(async()=>{const{json:s}=await import("./index-BorlqgNX.js");return{json:s}},__vite__mapDeps([6,1,2,3,4]),import.meta.url)).json(),css:async()=>(await Xe(async()=>{const{css:s}=await import("./index-BxcnR7Nj.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),scss:async()=>(await Xe(async()=>{const{css:s}=await import("./index-BxcnR7Nj.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),less:async()=>(await Xe(async()=>{const{css:s}=await import("./index-BxcnR7Nj.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),html:async()=>(await Xe(async()=>{const{html:s}=await import("./index-ChKrBnaf.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),htm:async()=>(await Xe(async()=>{const{html:s}=await import("./index-ChKrBnaf.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),vue:async()=>(await Xe(async()=>{const{html:s}=await import("./index-ChKrBnaf.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),svelte:async()=>(await Xe(async()=>{const{html:s}=await import("./index-ChKrBnaf.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),md:async()=>(await Xe(async()=>{const{markdown:s}=await import("./index-BBkJ4cEk.js");return{markdown:s}},__vite__mapDeps([9,3,4,2,5,8,1,7,0]),import.meta.url)).markdown(),markdown:async()=>(await Xe(async()=>{const{markdown:s}=await import("./index-BBkJ4cEk.js");return{markdown:s}},__vite__mapDeps([9,3,4,2,5,8,1,7,0]),import.meta.url)).markdown(),py:async()=>(await Xe(async()=>{const{python:s}=await import("./index-Clyg5z5Z.js");return{python:s}},__vite__mapDeps([10,1,2,3,4,5]),import.meta.url)).python(),pyi:async()=>(await Xe(async()=>{const{python:s}=await import("./index-Clyg5z5Z.js");return{python:s}},__vite__mapDeps([10,1,2,3,4,5]),import.meta.url)).python(),yaml:async()=>(await Xe(async()=>{const{yaml:s}=await import("./index-VSDVirVT.js");return{yaml:s}},__vite__mapDeps([11,1,2,3,4]),import.meta.url)).yaml(),yml:async()=>(await Xe(async()=>{const{yaml:s}=await import("./index-VSDVirVT.js");return{yaml:s}},__vite__mapDeps([11,1,2,3,4]),import.meta.url)).yaml(),rs:async()=>(await Xe(async()=>{const{rust:s}=await import("./index-C-8irjwh.js");return{rust:s}},__vite__mapDeps([12,1,2,3,4]),import.meta.url)).rust(),c:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-BC8gj6P7.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),h:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-BC8gj6P7.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),cc:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-BC8gj6P7.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),cpp:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-BC8gj6P7.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),hpp:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-BC8gj6P7.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),java:async()=>(await Xe(async()=>{const{java:s}=await import("./index-D0UkSEon.js");return{java:s}},__vite__mapDeps([14,1,2,3,4]),import.meta.url)).java(),go:async()=>(await Xe(async()=>{const{go:s}=await import("./index-zDoB4KM7.js");return{go:s}},__vite__mapDeps([15,1,2,3,4,5]),import.meta.url)).go(),php:async()=>(await Xe(async()=>{const{php:s}=await import("./index-B5hgDwts.js");return{php:s}},__vite__mapDeps([16,1,8,7,2,3,4,0,5]),import.meta.url)).php(),sql:async()=>(await Xe(async()=>{const{sql:s}=await import("./index-DpZcQOqI.js");return{sql:s}},__vite__mapDeps([17,2,3,4,1,5]),import.meta.url)).sql(),xml:async()=>(await Xe(async()=>{const{xml:s}=await import("./index-i-F6wQDa.js");return{xml:s}},__vite__mapDeps([18,1,2,3,4]),import.meta.url)).xml(),svg:async()=>(await Xe(async()=>{const{xml:s}=await import("./index-i-F6wQDa.js");return{xml:s}},__vite__mapDeps([18,1,2,3,4]),import.meta.url)).xml()},Fv={".mcp.json":"json",dockerfile:"yaml",makefile:"yaml"},Wv={javascript:"js",node:"js",typescript:"ts",python:"py",python3:"py",yml:"yaml",rust:"rs",golang:"go","c++":"cpp",cplusplus:"cpp"};async function Pv(s){const l=Wv[s.toLowerCase()]??s.toLowerCase(),i=Yb[l];return i?i().catch(()=>null):null}async function e1(s){const l=(s.split("/").pop()??"").toLowerCase(),i=Fv[l]??l.split(".").pop()??"",r=Yb[i];return r?r().catch(()=>null):null}const t1=Gb([{tag:[be.keyword,be.modifier,be.controlKeyword,be.moduleKeyword],class:"cmh-key"},{tag:[be.propertyName],class:"cmh-prop"},{tag:[be.function(be.variableName),be.labelName],class:"cmh-fn"},{tag:[be.color,be.constant(be.name),be.standard(be.name),be.bool],class:"cmh-const"},{tag:[be.typeName,be.className,be.changed,be.annotation,be.self,be.namespace],class:"cmh-type"},{tag:[be.number,be.integer,be.float],class:"cmh-num"},{tag:[be.string,be.special(be.string),be.regexp],class:"cmh-str"},{tag:[be.operator,be.operatorKeyword,be.escape],class:"cmh-op"},{tag:[be.meta,be.comment],class:"cmh-comment"},{tag:be.invalid,class:"cmh-invalid"}]);function fo(s){return s.replace(/[&<>]/g,l=>l==="&"?"&":l==="<"?"<":">")}async function n1(s,l){const i=l?await Pv(l):null;if(!i)return fo(s);try{const r=i.language.parser.parse(s);let o="";return Qv(s,r,t1,(d,h)=>{o+=h?`<span class="${h}">${fo(d)}</span>`:fo(d)},()=>{o+=`
|
|
117
|
-
`}),o}catch{return fo(s)}}ht.setOptions({gfm:!0,breaks:!1});function Ib(s){var i;const l=(i=s.split(".").pop())==null?void 0:i.toLowerCase();return l==="md"||l==="markdown"}async function Xb(s){const l=await ht.parse(s,{async:!0,walkTokens:async i=>{if(i.type!=="code")return;const r=i;r.text=await n1(r.text,r.lang??""),r.escaped=!0}});return jv.sanitize(l)}function Hy(s,l){return{path:s.path,text:s.content,saved:s.content,eol:s.eol,encoding:s.encoding,mtime:s.mtime,size:s.size,binary:s.binary,tooLarge:s.tooLarge,stale:!1,revision:l,previewMode:Ib(s.path)}}function Ja(s){return!s.binary&&!s.tooLarge&&s.text!==s.saved}function l1(s){return s.split("/").pop()??s}function ki(s){const l=s.lastIndexOf("/");return l===-1?"":s.slice(0,l)}function th(s){return s<1024?`${s} Б`:s<1024*1024?`${(s/1024).toFixed(1)} КБ`:`${(s/1024/1024).toFixed(1)} МБ`}function So({x:s,y:l,items:i,note:r,onClose:o}){const d=S.useRef(null),[h,g]=S.useState({left:s,top:l}),[m,b]=S.useState(()=>{const _=i.findIndex(C=>!C.disabled);return _===-1?0:_});S.useLayoutEffect(()=>{const _=d.current;if(!_)return;const C=_.getBoundingClientRect(),N=8,H=Math.max(N,Math.min(s,window.innerWidth-C.width-N)),B=Math.max(N,Math.min(l,window.innerHeight-C.height-N));g({left:H,top:B})},[s,l]),S.useLayoutEffect(()=>{var _;(_=d.current)==null||_.focus()},[]),S.useLayoutEffect(()=>{function _(N){var H;(H=d.current)!=null&&H.contains(N.target)||o()}function C(){o()}return document.addEventListener("mousedown",_),document.addEventListener("scroll",C,!0),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("scroll",C,!0)}},[o]);function x(_){_.disabled||(_.onSelect(),o())}function k(_){if(_.key==="Escape"){_.preventDefault(),_.stopPropagation(),o();return}const C=i.map((N,H)=>({item:N,index:H})).filter(N=>!N.item.disabled);if(C.length!==0){if(_.key==="ArrowDown"||_.key==="ArrowUp"){_.preventDefault();const N=_.key==="ArrowDown"?1:-1,H=C.findIndex(K=>K.index===m),B=C[(((H===-1?0:H)+N)%C.length+C.length)%C.length];B&&b(B.index);return}if(_.key==="Enter"||_.key===" "){_.preventDefault();const N=i[m];N&&x(N)}}}return c.jsxs("div",{ref:d,className:"ctxmenu",style:{left:h.left,top:h.top},role:"menu",tabIndex:-1,onKeyDown:k,children:[r&&c.jsx("div",{className:"ctxmenu__note",children:r}),i.map((_,C)=>c.jsxs("button",{type:"button",role:"menuitem","aria-disabled":_.disabled,className:"ctxmenu__item"+(C===m?" is-cursor":""),onMouseEnter:()=>b(C),onClick:()=>x(_),children:[c.jsx("span",{className:"ctxmenu__label",children:_.label}),_.hint&&c.jsx("span",{className:"ctxmenu__hint",children:_.hint})]},_.id))]})}const a1=3500,s1=9e3,i1=220;function Uc({result:s}){const[l,i]=S.useState(s),[r,o]=S.useState(!1);return S.useEffect(()=>{if(!s){i(null),o(!1);return}i(s),o(!1);const d=s.ok?a1:s1,h=setTimeout(()=>o(!0),d),g=setTimeout(()=>i(null),d+i1);return()=>{clearTimeout(h),clearTimeout(g)}},[s]),l?c.jsx("div",{className:"oplog "+(l.ok?"oplog--ok":"oplog--bad")+(r?" oplog--leaving":""),role:"status","aria-live":l.ok?"polite":"assertive",children:l.message}):null}function Dc({value:s,className:l,placeholder:i="Название сессии",onCommit:r,onCancel:o}){const[d,h]=S.useState(s),g=S.useRef(null);S.useEffect(()=>{var b;(b=g.current)==null||b.select()},[]);function m(){const b=d.trim();if(!b||b===s)return o();r(b)}return c.jsx("input",{ref:g,className:l?`rename ${l}`:"rename",value:d,autoFocus:!0,spellCheck:!1,placeholder:i,onChange:b=>h(b.target.value),onBlur:m,onKeyDown:b=>{b.stopPropagation(),b.key==="Enter"?(b.preventDefault(),m()):b.key==="Escape"&&(b.preventDefault(),o())}})}function Tr({active:s}){return s?c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M2 5h3V2"}),c.jsx("path",{d:"M14 5h-3V2"}),c.jsx("path",{d:"M2 11h3v3"}),c.jsx("path",{d:"M14 11h-3v3"})]}):c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M5 2H2v3"}),c.jsx("path",{d:"M11 2h3v3"}),c.jsx("path",{d:"M2 11v3h3"}),c.jsx("path",{d:"M14 11v3h-3"})]})}const r1=500,pi="application/x-ccv-fs-path",c1=200;function u1({open:s,tree:l,expanded:i,activePath:r,dirty:o,gitChanges:d,result:h,searchResult:g,onSearch:m,onReveal:b,onToggle:x,onOpen:k,onCreate:_,onRename:C,onMove:N,onCopy:H,onDelete:B,onRefresh:K,onClose:O,zoomed:$,onToggleZoom:A}){const[Q,L]=S.useState(""),[M,W]=S.useState(null),[re,he]=S.useState(null),[F,ae]=S.useState(null),[me,Ne]=S.useState(null),[pe,z]=S.useState(null),[P,te]=S.useState(null),xe=wh("(hover: hover)"),we=S.useRef(null),j=S.useMemo(()=>d1(d),[d]);function V(T){return!(!F||T===F.path||F.kind==="dir"&&T.startsWith(`${F.path}/`)||T===ki(F.path))}function ce(T){return!(!pe||T===pe.path||pe.kind==="dir"&&T.startsWith(`${pe.path}/`)||pe.mode==="cut"&&T===ki(pe.path))}function oe(T){z({path:T.path,kind:T.kind,mode:"copy"})}function ve(T){z({path:T.path,kind:T.kind,mode:"cut"})}function Te(T){!pe||!ce(T)||(T&&!i.has(T)&&x(T),pe.mode==="cut"?(N(pe.path,T),z(null)):H(pe.path,T))}function Re(T,I){const _e=T.touches[0];if(!_e)return;const Me={timer:0,x:_e.clientX,y:_e.clientY,el:T.currentTarget,fired:!1};Me.timer=window.setTimeout(()=>{Me.fired=!0,I(Me.x,Me.y,Me.el)},r1),we.current=Me}function it(T){const I=we.current,_e=T.touches[0];!I||!_e||Math.hypot(_e.clientX-I.x,_e.clientY-I.y)>10&&(window.clearTimeout(I.timer),we.current=null)}function Ze(T){const I=we.current;I&&(window.clearTimeout(I.timer),I.fired&&T.preventDefault())}function st(){var T;return(T=we.current)!=null&&T.fired?(we.current=null,!0):!1}function He(T,I,_e,Me){L((Me==null?void 0:Me.path)??""),te({x:T,y:I,opener:_e,entry:Me})}function Ct(){const T=P==null?void 0:P.opener;te(null),T!=null&&T.isConnected&&T.focus()}function Je(T){return{onContextMenu:I=>{I.preventDefault(),He(I.clientX,I.clientY,I.currentTarget,T)},onTouchStart:I=>Re(I,(_e,Me,Le)=>He(_e,Me,Le,T)),onTouchMove:it,onTouchEnd:Ze,onTouchCancel:Ze}}function Ke(T){T.target===T.currentTarget&&(T.preventDefault(),He(T.clientX,T.clientY,T.currentTarget,null))}function Fe(T){T.target===T.currentTarget&&Re(T,(I,_e,Me)=>He(I,_e,Me,null))}function dt(T){if(!(T.ctrlKey||T.metaKey)||T.target instanceof HTMLInputElement)return;const I=T.key.toLowerCase();if(I==="v"){T.preventDefault(),Te(xn());return}if(!Q)return;const _e=By(l,Q);_e&&(I==="c"?(T.preventDefault(),oe(_e)):I==="x"&&(T.preventDefault(),ve(_e)))}function Wn(T){return I=>{I.dataTransfer.effectAllowed="move",I.dataTransfer.setData(pi,T.path),ae({path:T.path,kind:T.kind})}}function Bt(){ae(null),Ne(null)}function Tn(T){return I=>{I.dataTransfer.types.includes(pi)&&(I.stopPropagation(),!(T.kind!=="dir"||!V(T.path))&&(I.preventDefault(),Ne(T.path)))}}function bn(T){return I=>{if(!I.dataTransfer.types.includes(pi)||(I.stopPropagation(),T.kind!=="dir"||!V(T.path)))return;I.preventDefault();const _e=I.dataTransfer.getData(pi);Ne(null),_e&&N(_e,T.path)}}function fn(T){!T.dataTransfer.types.includes(pi)||!V("")||(T.preventDefault(),Ne(""))}function Un(T){if(!T.dataTransfer.types.includes(pi)||!V(""))return;T.preventDefault();const I=T.dataTransfer.getData(pi);Ne(null),I&&N(I,"")}const[Zt,ut]=S.useState(""),dn=Zt.trim(),J=dn.length>0,fe=S.useRef(null),Ee=S.useRef(m);Ee.current=m;function Qe(T){ut(T),fe.current&&clearTimeout(fe.current);const I=T.trim();if(!I){Ee.current("");return}fe.current=setTimeout(()=>Ee.current(I),c1)}function Tt(T){fe.current&&clearTimeout(fe.current),ut(""),Ee.current(""),L(T.path),b(T)}const Et=J&&(g==null?void 0:g.query)===dn?g:null;function xn(){if(Q==="")return"";const T=By(l,Q);if((T==null?void 0:T.kind)==="dir")return Q;const I=Q.lastIndexOf("/");return I===-1?"":Q.slice(0,I)}function en(T,I){const _e=I??xn();_e&&!i.has(_e)&&x(_e),he({parent:_e,kind:T})}function qt(){if(!P)return[];const T=Me=>xe?Me:void 0;if(!P.entry)return[{id:"paste",label:"Вставить в корень проекта",hint:T("Ctrl+V"),disabled:!ce(""),onSelect:()=>Te("")},{id:"new-file",label:"Создать файл",onSelect:()=>en("file","")},{id:"new-dir",label:"Создать каталог",onSelect:()=>en("dir","")}];const I=P.entry,_e=[I.kind==="file"?{id:"open",label:"Открыть",onSelect:()=>k(I.path)}:{id:"toggle",label:i.has(I.path)?"Свернуть":"Развернуть",onSelect:()=>x(I.path)},{id:"copy",label:"Копировать",hint:T("Ctrl+C"),onSelect:()=>oe(I)},{id:"cut",label:"Вырезать",hint:T("Ctrl+X"),onSelect:()=>ve(I)}];return I.kind==="dir"&&(_e.push({id:"paste",label:"Вставить",hint:T("Ctrl+V"),disabled:!ce(I.path),onSelect:()=>Te(I.path)}),_e.push({id:"new-file",label:"Создать файл",onSelect:()=>en("file",I.path)}),_e.push({id:"new-dir",label:"Создать каталог",onSelect:()=>en("dir",I.path)})),_e.push({id:"rename",label:"Переименовать",onSelect:()=>W(I.path)}),_e.push({id:"delete",label:"Удалить",onSelect:()=>B(I)}),_e}const En=J?[]:pt("",0);function pt(T,I){const _e=l[T],Me=[];if(re&&re.parent===T&&Me.push(c.jsxs("div",{className:"fsrow fsrow--draft",style:Fa(I),children:[c.jsx("span",{className:"fsrow__icon",children:re.kind==="dir"?c.jsx(Ao,{}):c.jsx(Co,{})}),c.jsx(Dc,{className:"rename--file",value:"",placeholder:re.kind==="dir"?"имя каталога":"имя файла",onCommit:Le=>{he(null),_(T,re.kind,Le)},onCancel:()=>he(null)})]},`draft:${T}`)),!_e)return Me.push(c.jsx("p",{className:"fsrow__pending",style:Fa(I),children:"читаем…"},`wait:${T}`)),Me;_e.length===0&&!re&&Me.push(c.jsx("p",{className:"fsrow__pending",style:Fa(I),children:"пусто"},`empty:${T}`));for(const Le of _e){const An=Le.kind==="dir"&&i.has(Le.path);Me.push(M===Le.path?c.jsxs("div",{className:"fsrow fsrow--draft",style:Fa(I),children:[c.jsx("span",{className:"fsrow__icon",children:Le.kind==="dir"?c.jsx(Ao,{open:An}):c.jsx(Co,{})}),c.jsx(Dc,{className:"rename--file",value:Le.name,placeholder:"новое имя",onCommit:Gl=>{W(null),C(Le.path,Gl)},onCancel:()=>W(null)})]},Le.path):c.jsx(o1,{entry:Le,depth:I,open:An,active:Le.path===r,selected:Le.path===Q,dirty:o.has(Le.path),gitStatus:j.get(Le.path),dragging:(F==null?void 0:F.path)===Le.path,dropTarget:me===Le.path,cut:(pe==null?void 0:pe.mode)==="cut"&&pe.path===Le.path,onClick:()=>{st()||(L(Le.path),Le.kind==="dir"?x(Le.path):k(Le.path))},onRename:()=>W(Le.path),onDelete:()=>B(Le),onDragStart:Wn(Le),onDragEnd:Bt,onDragOver:Tn(Le),onDrop:bn(Le),...Je(Le)},Le.path)),An&&Me.push(...pt(Le.path,I+1))}return Me}function _n(){if(!Et)return[c.jsx("p",{className:"fsrow__pending",style:Fa(0),children:"ищем…"},"search:wait")];if(Et.entries.length===0)return[c.jsx("p",{className:"fsrow__pending",style:Fa(0),children:"ничего не найдено"},"search:empty")];const T=Et.entries.map(I=>c.jsx(f1,{entry:I,gitStatus:j.get(I.path),onClick:()=>Tt(I)},I.path));return Et.truncated&&T.push(c.jsxs("p",{className:"fsrow__pending",style:Fa(0),children:["показаны первые ",Et.entries.length," — уточните запрос"]},"search:truncated")),T}return c.jsxs("aside",{className:(s?"sidepane sidepane--files sidepane--open":"sidepane sidepane--files")+($?" sidepane--zoomed":""),"aria-label":"Файлы проекта",onKeyDown:dt,children:[c.jsxs("div",{className:"sidepane__head",onDoubleClick:T=>{A&&(T.target.closest("button")||A())},children:[c.jsx(g1,{}),c.jsx("span",{className:"sidepane__title",children:"Файлы"}),c.jsx("button",{className:"sidepane__btn",title:"Новый файл","aria-label":"Новый файл",onClick:()=>en("file"),children:c.jsx(p1,{})}),c.jsx("button",{className:"sidepane__btn",title:"Новый каталог","aria-label":"Новый каталог",onClick:()=>en("dir"),children:c.jsx(m1,{})}),c.jsx("button",{className:"sidepane__btn",title:"Перечитать дерево","aria-label":"Перечитать дерево",onClick:K,children:"↻"}),A&&c.jsx("button",{className:"sidepane__btn",title:$?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":$?"Свернуть панель файлов":"Развернуть панель файлов на весь экран","aria-pressed":$,onClick:A,children:c.jsx(Tr,{active:$})}),c.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель файлов",onClick:O,children:"✕"})]}),c.jsxs("div",{className:"fssearch",children:[c.jsx(y1,{}),c.jsx("input",{className:"fssearch__input",type:"text",value:Zt,spellCheck:!1,placeholder:"Поиск файлов и папок…","aria-label":"Поиск файлов и папок",onChange:T=>Qe(T.target.value),onKeyDown:T=>{T.stopPropagation(),T.key==="Escape"&&(T.preventDefault(),Zt?Qe(""):T.currentTarget.blur())}}),Zt&&c.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>Qe(""),children:"✕"})]}),c.jsx("div",{className:"sidepane__scroll fstree"+(me===""?" fstree--drop-target":""),tabIndex:-1,onDragOver:fn,onDrop:Un,onContextMenu:Ke,onTouchStart:Fe,onTouchMove:it,onTouchEnd:Ze,onTouchCancel:Ze,children:J?_n():En}),c.jsx(Uc,{result:h}),P&&c.jsx(So,{x:P.x,y:P.y,items:qt(),onClose:Ct})]})}function o1({entry:s,depth:l,open:i,active:r,selected:o,dirty:d,gitStatus:h,dragging:g,dropTarget:m,cut:b,onClick:x,onRename:k,onDelete:_,onDragStart:C,onDragEnd:N,onDragOver:H,onDrop:B,onContextMenu:K,onTouchStart:O,onTouchMove:$,onTouchEnd:A,onTouchCancel:Q}){const L="fsrow"+(r?" is-open":"")+(o&&!r?" is-selected":"")+(s.ignored?" fsrow--ignored":"")+(g?" fsrow--dragging":"")+(m?" fsrow--drop-target":"")+(b?" fsrow--cut":"");return c.jsxs("div",{className:L,style:Fa(l),draggable:!0,onDragStart:C,onDragEnd:N,onDragOver:H,onDrop:B,onContextMenu:K,onTouchStart:O,onTouchMove:$,onTouchEnd:A,onTouchCancel:Q,children:[c.jsxs("button",{className:"fsrow__main",onClick:x,title:Vb(s),children:[c.jsx("span",{className:"fsrow__icon"+Eo("fsrow__icon",h),children:s.kind==="dir"?c.jsx(Ao,{open:i}):c.jsx(Co,{})}),c.jsx("span",{className:"fsrow__name"+Eo("fsrow__name",h),children:s.name}),s.ignored&&c.jsx("span",{className:"fsrow__tag",title:"Игнорируется git (.gitignore)",children:"git-ignore"}),d&&c.jsx("span",{className:"fsrow__dot",title:"Есть несохранённые правки"})]}),c.jsx("button",{className:"fsrow__act",title:"Переименовать","aria-label":`Переименовать ${s.name}`,onClick:k,children:"✎"}),c.jsx("button",{className:"fsrow__act",title:"Удалить","aria-label":`Удалить ${s.name}`,onClick:_,children:"✕"})]})}function f1({entry:s,gitStatus:l,onClick:i}){const r=s.path.slice(0,s.path.length-s.name.length-1);return c.jsxs("button",{className:"fsrow fsrow--search"+(s.ignored?" fsrow--ignored":""),style:Fa(0),onClick:i,title:Vb(s),children:[c.jsx("span",{className:"fsrow__icon"+Eo("fsrow__icon",l),children:s.kind==="dir"?c.jsx(Ao,{}):c.jsx(Co,{})}),c.jsx("span",{className:"fsrow__name"+Eo("fsrow__name",l),children:s.name}),s.ignored&&c.jsx("span",{className:"fsrow__tag",children:"git-ignore"}),r&&c.jsx("span",{className:"fsrow__path",children:r})]})}function Vb(s){return s.ignored?`${s.path} — игнорируется git (.gitignore)`:s.path}function Fa(s){return{"--depth":s}}function By(s,l){var o;const i=l.lastIndexOf("/"),r=i===-1?"":l.slice(0,i);return((o=s[r])==null?void 0:o.find(d=>d.path===l))??null}function d1(s){const l=new Map,i={added:1,modified:2},r=(o,d)=>{const h=l.get(o);(!h||i[d]>i[h])&&l.set(o,d)};for(const o of s){const d=h1(o.status);if(!d)continue;r(o.path,d);let h=ki(o.path);for(;r(h,d),!!h;)h=ki(h)}return l}function h1(s){if(s==="??")return"added";const[l="",i=""]=s;return l==="A"||l==="R"||l==="C"?"added":l==="M"||i==="M"?"modified":null}function Eo(s,l){return l?` ${s}--git-${l}`:""}function Ao({open:s=!1}){return c.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:s?c.jsx("path",{d:"M2 12.5V4.2a.7.7 0 0 1 .7-.7h3.1l1.5 1.6h4.4a.7.7 0 0 1 .7.7v1.2M2 12.5l1.7-4.6a.7.7 0 0 1 .66-.46h9.2a.5.5 0 0 1 .47.66L12.4 12.5Z"}):c.jsx("path",{d:"M2 12.4V4.2a.7.7 0 0 1 .7-.7h3.1l1.5 1.6h5.9a.7.7 0 0 1 .7.7v6.6a.7.7 0 0 1-.7.7H2.7a.7.7 0 0 1-.7-.7Z"})})}function Co(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M9 2H4.4a.7.7 0 0 0-.7.7v10.6a.7.7 0 0 0 .7.7h7.2a.7.7 0 0 0 .7-.7V5.2Z"}),c.jsx("path",{d:"M9 2v3.2h3.3"})]})}function p1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:[c.jsxs("g",{transform:"translate(-1.3,-1.6) scale(0.78)",strokeLinejoin:"round",children:[c.jsx("path",{d:"M9 2H4.4a.7.7 0 0 0-.7.7v10.6a.7.7 0 0 0 .7.7h7.2a.7.7 0 0 0 .7-.7V5.2Z"}),c.jsx("path",{d:"M9 2v3.2h3.3"})]}),c.jsx("path",{d:"M12.2 10.3v3.8M10.3 12.2h3.8",strokeLinecap:"round"})]})}function m1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:[c.jsx("g",{transform:"translate(-1.3,-1.6) scale(0.78)",children:c.jsx("path",{d:"M2 12.4V4.2a.7.7 0 0 1 .7-.7h3.1l1.5 1.6h5.9a.7.7 0 0 1 .7.7v6.6a.7.7 0 0 1-.7.7H2.7a.7.7 0 0 1-.7-.7Z"})}),c.jsx("path",{d:"M12.2 10.3v3.8M10.3 12.2h3.8",strokeLinecap:"round"})]})}function g1(){return c.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M2 4.1V3a.6.6 0 0 1 .6-.6h2.6l1.2 1.4h5a.6.6 0 0 1 .6.6v1.1"}),c.jsx("path",{d:"M2 12.6V5.7h11.4a.6.6 0 0 1 .58.75l-1.5 6.2a.6.6 0 0 1-.58.45H2.6a.6.6 0 0 1-.6-.5Z"})]})}function y1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}const b1=200;function x1({open:s,result:l,onSearch:i,onOpenMatch:r,onClose:o,zoomed:d,onToggleZoom:h}){const[g,m]=S.useState(""),b=g.trim(),x=b.length>0,k=S.useRef(null),_=S.useRef(i);_.current=i;function C(B){m(B),k.current&&clearTimeout(k.current);const K=B.trim();if(!K){_.current("");return}k.current=setTimeout(()=>_.current(K),b1)}const N=x&&(l==null?void 0:l.query)===b?l:null;function H(){if(!N)return[c.jsx("p",{className:"fsrow__pending",children:"ищем…"},"grep:wait")];if(N.matches.length===0)return[c.jsx("p",{className:"fsrow__pending",children:"ничего не найдено"},"grep:empty")];const B=[];let K="";for(const O of N.matches)O.path!==K&&(K=O.path,B.push(c.jsx("p",{className:"searchgroup__path",title:O.path,children:O.path},`path:${O.path}`))),B.push(c.jsx(_1,{match:O,onClick:()=>r(O)},`${O.path}:${O.line}:${O.column}`));return N.truncated&&B.push(c.jsxs("p",{className:"fsrow__pending",children:["показаны первые ",N.matches.length," — уточните запрос"]},"grep:truncated")),B}return c.jsxs("aside",{className:(s?"sidepane sidepane--search sidepane--open":"sidepane sidepane--search")+(d?" sidepane--zoomed":""),"aria-label":"Поиск по тексту в проекте",children:[c.jsxs("div",{className:"sidepane__head",onDoubleClick:B=>{h&&(B.target.closest("button")||h())},children:[c.jsx(v1,{}),c.jsx("span",{className:"sidepane__title",children:"Поиск по тексту"}),h&&c.jsx("button",{className:"sidepane__btn",title:d?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":d?"Свернуть панель поиска":"Развернуть панель поиска на весь экран","aria-pressed":d,onClick:h,children:c.jsx(Tr,{active:d})}),c.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель поиска",onClick:o,children:"✕"})]}),c.jsxs("div",{className:"fssearch",children:[c.jsx(S1,{}),c.jsx("input",{className:"fssearch__input",type:"text",value:g,spellCheck:!1,placeholder:"Поиск по тексту во всех файлах…","aria-label":"Поиск по тексту во всех файлах",onChange:B=>C(B.target.value),onKeyDown:B=>{B.stopPropagation(),B.key==="Escape"&&(B.preventDefault(),g?C(""):B.currentTarget.blur())}}),g&&c.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>C(""),children:"✕"})]}),c.jsx("div",{className:"sidepane__scroll fstree",children:x?H():c.jsx("p",{className:"sidepane__empty",children:"Введите текст, чтобы найти его во всех файлах проекта."})})]})}function _1({match:s,onClick:l}){const i=s.lineText.slice(0,s.column-1),r=s.lineText.slice(s.column-1,s.column-1+s.matchLength),o=s.lineText.slice(s.column-1+s.matchLength);return c.jsxs("button",{className:"searchmatch",onClick:l,title:`${s.path}:${s.line}`,children:[c.jsx("span",{className:"searchmatch__line",children:s.line}),c.jsxs("span",{className:"searchmatch__text",children:[i,c.jsx("mark",{children:r}),o]})]})}function v1(){return c.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[c.jsx("circle",{cx:"6.8",cy:"6.8",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1"})]})}function S1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}let ho=null;function k1(){return ho||(ho=Promise.all([Xe(()=>import("./index-DZXdWq9L.js"),__vite__mapDeps([19,4,3,2,20,5]),import.meta.url),Xe(()=>import("./index-891wE-Rj.js").then(s=>s.v),__vite__mapDeps([4,3]),import.meta.url),Xe(()=>import("./index-BHot-lnj.js"),[],import.meta.url),Xe(()=>import("./index-KEWrG50i.js"),__vite__mapDeps([20,3,4,2]),import.meta.url),Xe(()=>import("./codemirror-02hKfv-c.js"),__vite__mapDeps([21,2,3,4]),import.meta.url)]).then(([s,l,i,r,o])=>({EditorView:l.EditorView,EditorState:i.EditorState,Compartment:i.Compartment,EditorSelection:i.EditorSelection,Prec:i.Prec,keymap:l.keymap,indentWithTab:r.indentWithTab,basicSetup:s.basicSetup,editorTheme:o.editorTheme,editorHighlight:o.editorHighlight})).catch(s=>{throw ho=null,s})),ho}function w1({path:s,doc:l,revision:i,goto:r,onChange:o,onSave:d}){const h=S.useRef(null),g=S.useRef(null),m=S.useRef(null),b=S.useRef(new Map),x=S.useRef(new Map),k=S.useRef(new Set),_=S.useRef(null),C=S.useRef(o),N=S.useRef(d),H=S.useRef(s),B=S.useRef(i),K=S.useRef(l);C.current=o,N.current=d,H.current=s,B.current=i,K.current=l;const[O,$]=S.useState("loading"),[A,Q]=S.useState(!1);function L(W,re,he,F,ae){const me=b.current.get(F),Ne=x.current.get(F)===ae;if(me&&Ne)he.setState(me);else{const z=W.EditorState.create({doc:K.current,extensions:[W.basicSetup,W.Prec.highest(W.keymap.of([{key:"Mod-s",preventDefault:!0,run:()=>(N.current(H.current),!0)}])),W.keymap.of([W.indentWithTab]),re.of([]),W.editorTheme,W.editorHighlight,W.EditorView.updateListener.of(P=>{P.docChanged&&C.current(H.current,P.state.doc.toString())})]});b.current.set(F,z),x.current.set(F,ae),he.setState(z),k.current.delete(F)}if(k.current.has(F))return()=>{};let pe=!1;return e1(F).then(z=>{pe||!z||H.current!==F||(he.dispatch({effects:re.reconfigure(z)}),b.current.set(F,he.state),k.current.add(F))}),()=>{pe=!0}}S.useEffect(()=>{if(!h.current)return;let re=!1,he=null,F=null;$("loading"),Q(!1);const ae=window.setTimeout(()=>{re||Q(!0)},200);return(async()=>{let me;try{me=await k1()}catch{window.clearTimeout(ae),re||$("error");return}if(re||!h.current)return;window.clearTimeout(ae);const Ne=new me.Compartment;_.current=Ne,m.current=me,F=new me.EditorView({parent:h.current}),g.current=F,he=L(me,Ne,F,H.current,B.current),$("ready")})(),()=>{re=!0,window.clearTimeout(ae),he==null||he(),F==null||F.destroy(),g.current===F&&(g.current=null),m.current=null,_.current=null}},[]),S.useEffect(()=>{const W=m.current,re=g.current,he=_.current;if(!(!W||!re||!he))return L(W,he,re,s,i)},[s,i]);const M=S.useRef(0);return S.useEffect(()=>{const W=g.current,re=m.current;if(!W||!re||!r||r.token===M.current)return;M.current=r.token;const he=W.state.doc.lines,F=Math.min(Math.max(r.line,1),he),ae=W.state.doc.line(F),me=Math.min(ae.from+Math.max(r.column-1,0),ae.to);W.dispatch({selection:re.EditorSelection.cursor(me),effects:re.EditorView.scrollIntoView(me,{y:"center"})}),W.focus()},[r]),S.useEffect(()=>()=>{const W=g.current;W&&b.current.set(s,W.state)},[s]),c.jsxs("div",{className:"editor__code",children:[c.jsx("div",{ref:h,className:"editor__code-surface"+(O==="ready"?"":" is-hidden")}),O==="loading"&&A&&c.jsxs("div",{className:"editor__state work",role:"status",children:[c.jsxs("div",{className:"work__dots",children:[c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"})]}),c.jsx("span",{className:"work__label",children:"Загружается редактор…"})]}),O==="error"&&c.jsxs("div",{className:"editor__fallback",children:[c.jsxs("div",{className:"editor__fallback-banner",role:"alert",children:[c.jsx("span",{children:"Редактор не загрузился — ниже только просмотр, без сохранения правок."}),c.jsx("button",{className:"btn btn--sm btn--primary",onClick:()=>window.location.reload(),children:"Перезагрузить страницу"})]}),c.jsx("pre",{className:"editor__fallback-text",children:l})]})]})}function j1({file:s,goto:l,onChange:i,onSave:r,onReload:o,onOverwrite:d,onTogglePreview:h}){const g=Ja(s),m=Ib(s.path)&&!s.binary&&!s.tooLarge;return c.jsxs("div",{className:"editor",children:[c.jsxs("div",{className:"editor__bar",children:[c.jsx("span",{className:"editor__path",title:s.path,children:s.path}),c.jsxs("span",{className:"editor__meta",children:[th(s.size),s.eol==="crlf"&&" · CRLF"]}),m&&c.jsxs("div",{className:"editor__viewtoggle",role:"tablist","aria-label":"Режим просмотра",children:[c.jsx("button",{className:"btn btn--sm"+(s.previewMode?" is-on":""),role:"tab","aria-selected":s.previewMode,onClick:()=>!s.previewMode&&h(s.path),children:"Просмотр"}),c.jsx("button",{className:"btn btn--sm"+(s.previewMode?"":" is-on"),role:"tab","aria-selected":!s.previewMode,onClick:()=>s.previewMode&&h(s.path),children:"Код"})]}),c.jsx("button",{className:"btn btn--sm",disabled:!g,title:"Сохранить (Ctrl+S)",onClick:()=>r(s.path),children:g?"Сохранить":"Сохранено"})]}),s.stale&&c.jsxs("div",{className:"editor__warn",children:[c.jsxs("span",{children:["Файл изменился на диске",g?" — а здесь есть несохранённые правки.":"."]}),c.jsx("button",{className:"btn btn--sm",onClick:()=>o(s.path),children:"Взять с диска"}),g&&c.jsx("button",{className:"btn btn--sm btn--danger",onClick:()=>d(s.path),children:"Сохранить поверх"})]}),s.binary?c.jsxs("p",{className:"editor__empty",children:["Это не текстовый файл — редактировать его здесь нечем. ",th(s.size)," на диске."]}):s.tooLarge?c.jsxs("p",{className:"editor__empty",children:["Файл слишком велик для редактора (",th(s.size),"). Такие правит агент, а не браузер."]}):m&&s.previewMode?c.jsx(N1,{text:s.text}):c.jsx(w1,{path:s.path,doc:s.text,revision:s.revision,goto:l,onChange:i,onSave:r})]})}function N1({text:s}){const[l,i]=S.useState("");return S.useEffect(()=>{let r=!1;return Xb(s).then(o=>{r||i(o)}),()=>{r=!0}},[s]),c.jsx("div",{className:"markdown-preview",dangerouslySetInnerHTML:{__html:l}})}function T1({files:s,activePath:l,busy:i,onSelect:r,onClose:o,zoomed:d,onToggleZoom:h}){return c.jsxs("div",{className:"worktabs",role:"tablist",onDoubleClick:g=>{h&&(g.target.closest("button")||h())},children:[c.jsxs("button",{className:"worktab"+(l===null?" is-on":""),role:"tab","aria-selected":l===null,onClick:()=>r(null),onDoubleClick:()=>h==null?void 0:h(),children:[c.jsx("span",{className:"worktab__name",children:"Разговор"}),i&&c.jsx("span",{className:"worktab__dot worktab__dot--busy",title:"Агент работает"})]}),s.map(g=>c.jsxs("div",{className:"worktab"+(g.path===l?" is-on":""),role:"tab","aria-selected":g.path===l,onDoubleClick:m=>{h&&(m.target.closest(".worktab__close, .worktab__dot")||h())},children:[c.jsx("button",{className:"worktab__name",title:g.path,onClick:()=>r(g.path),children:l1(g.path)}),Ja(g)?c.jsx("button",{className:"worktab__dot",title:"Не сохранено — закрыть","aria-label":`Закрыть ${g.path}`,onClick:()=>o(g.path)}):c.jsx("button",{className:"worktab__close",title:"Закрыть","aria-label":`Закрыть ${g.path}`,onClick:()=>o(g.path),children:"✕"})]},g.path)),c.jsx("div",{className:"worktabs__spacer"}),h&&c.jsx("button",{className:"worktabs__zoom",title:d?"Свернуть — то же самое, что двойной клик по вкладке":"Развернуть на весь экран — то же самое, что двойной клик по вкладке","aria-label":d?"Свернуть колонку разговора":"Развернуть колонку разговора на весь экран","aria-pressed":d,onClick:h,children:c.jsx(Tr,{active:d})})]})}const Qb="ccv:sidebar.collapsed",$b="ccv:sidebar.mode",E1=500,qy="транскрипт остаётся на диске — сессию можно вернуть из архива в любой момент.";function A1({open:s,connected:l,status:i,workspaces:r,sessions:o,archived:d,pinned:h,activeWorkspaceId:g,activeSessionId:m,onSelectWorkspace:b,onSelectSession:x,onRenameSession:k,onPinSessions:_,onSelectPinned:C,onCloseWorkspaces:N,onArchiveSessions:H,onUnarchiveSessions:B,onOpenWorkspace:K,onNewSession:O,onOpenExtensions:$,account:A,onOpenAccount:Q,relay:L,onOpenRelay:M,onOpenSettings:W,themeMode:re,onCycleTheme:he}){const[F,ae]=S.useState(null),[me,Ne]=S.useState(""),[pe,z]=S.useState(M1),[P,te]=S.useState(O1);function xe(){te(T=>{const I=T==="pinned"?"default":"pinned";try{localStorage.setItem($b,I)}catch{}return I})}const we=me.trim().toLowerCase(),j=we!=="",V=S.useMemo(()=>j?r.filter(T=>T.name.toLowerCase().includes(we)||T.path.toLowerCase().includes(we)):r,[r,we,j]),ce=S.useMemo(()=>j?o.filter(T=>(T.title??"").toLowerCase().includes(we)):o,[o,we,j]),oe=S.useMemo(()=>j?d.filter(T=>(T.title??"").toLowerCase().includes(we)):d,[d,we,j]),ve=T=>{var I;return((I=r.find(_e=>_e.id===T))==null?void 0:I.name)??"—"},Te=T=>{var I;return(I=r.find(_e=>_e.id===T))==null?void 0:I.path},Re=S.useMemo(()=>j?h.filter(T=>(T.title??"").toLowerCase().includes(we)||ve(T.workspaceId).toLowerCase().includes(we)):h,[h,r,we,j]);function it(T){z(I=>{const _e=I.includes(T)?I.filter(Me=>Me!==T):[...I,T];try{localStorage.setItem(Qb,JSON.stringify(_e))}catch{}return _e})}const Ze=T=>!pe.includes(T),st=Yy(V),He=Yy(ce),[Ct,Je]=S.useState(null),[Ke,Fe]=S.useState(null),[dt,Wn]=S.useState(null),Bt=S.useRef(null);function Tn(T,I){const _e=T.touches[0];if(!_e)return;const Me={timer:0,x:_e.clientX,y:_e.clientY,el:T.currentTarget,fired:!1};Me.timer=window.setTimeout(()=>{Me.fired=!0,I(Me.x,Me.y,Me.el)},E1),Bt.current=Me}function bn(T){const I=Bt.current,_e=T.touches[0];!I||!_e||Math.hypot(_e.clientX-I.x,_e.clientY-I.y)>10&&(window.clearTimeout(I.timer),Bt.current=null)}function fn(T){const I=Bt.current;I&&(window.clearTimeout(I.timer),I.fired&&T.preventDefault())}function Un(){var T;return(T=Bt.current)!=null&&T.fired?(Bt.current=null,!0):!1}function Zt(){const T=Ct==null?void 0:Ct.opener;Je(null),T!=null&&T.isConnected&&T.focus()}function ut(){const T=Ke==null?void 0:Ke.opener;Fe(null),T!=null&&T.isConnected&&T.focus()}function dn(){const T=dt==null?void 0:dt.opener;Wn(null),T!=null&&T.isConnected&&T.focus()}function J(T){return{onContextMenu:I=>{I.preventDefault(),Je({x:I.clientX,y:I.clientY,opener:I.currentTarget,ids:st.targetsFor(T)})},onTouchStart:I=>Tn(I,(_e,Me,Le)=>Je({x:_e,y:Me,opener:Le,ids:st.targetsFor(T)})),onTouchMove:bn,onTouchEnd:fn,onTouchCancel:fn}}function fe(T){return{onContextMenu:I=>{I.preventDefault(),Fe({x:I.clientX,y:I.clientY,opener:I.currentTarget,ids:He.targetsFor(T)})},onTouchStart:I=>Tn(I,(_e,Me,Le)=>Fe({x:_e,y:Me,opener:Le,ids:He.targetsFor(T)})),onTouchMove:bn,onTouchEnd:fn,onTouchCancel:fn}}function Ee(T){return{onContextMenu:I=>{I.preventDefault(),Wn({x:I.clientX,y:I.clientY,opener:I.currentTarget,ids:[T.id]})},onTouchStart:I=>Tn(I,(_e,Me,Le)=>Wn({x:_e,y:Me,opener:Le,ids:[T.id]})),onTouchMove:bn,onTouchEnd:fn,onTouchCancel:fn}}const Qe=o.filter(T=>T.state!=="closed").length,Tt=Ct?[{id:"close",label:Ct.ids.length>1?`Закрыть проекты (${Ct.ids.length})`:"Закрыть проект",onSelect:()=>{N(Ct.ids),st.clear()}}]:[],Et=Ct?"закрытие не удаляет проект: каталог и история сессий остаются на диске — открыть его снова можно кнопкой «+ Проект»."+(g&&Ct.ids.includes(g)&&Qe>0?` в нём сейчас незавершённых сессий: ${Qe} — при закрытии они остановятся на хосте.`:""):void 0,xn=Ke?ce.find(T=>T.id===Ke.ids[0]):void 0,en=(xn==null?void 0:xn.pinned)!==!0,qt=Ke?[...Ke.ids.length===1?[{id:"rename",label:"Переименовать",onSelect:()=>ae(Ke.ids[0])}]:[],{id:"pin",label:en?Ke.ids.length>1?`Закрепить (${Ke.ids.length})`:"Закрепить":Ke.ids.length>1?`Открепить (${Ke.ids.length})`:"Открепить",onSelect:()=>{xn&&_(xn.workspaceId,Ke.ids,en),He.clear()}},{id:"archive",label:Ke.ids.length>1?`Убрать в архив (${Ke.ids.length})`:"Убрать в архив",onSelect:()=>{H(g,Ke.ids),He.clear()}}]:[],En=Ke?qy:void 0,pt=dt?Re.find(T=>T.id===dt.ids[0]):void 0,_n=dt?[{id:"rename",label:"Переименовать",onSelect:()=>ae(dt.ids[0])},{id:"unpin",label:"Открепить",onSelect:()=>{pt&&_(pt.workspaceId,[pt.id],!1)}},{id:"archive",label:"Убрать в архив",onSelect:()=>{pt&&H(pt.workspaceId,[pt.id])}}]:[];return c.jsxs("aside",{className:s?"sidebar sidebar--open":"sidebar",children:[c.jsxs("div",{className:"sidebar__head",children:[c.jsx("span",{className:l?"dot dot--on":"dot",title:i}),c.jsx("span",{className:"brand",children:"Claude Code Visual"}),c.jsx("button",{className:"theme-btn","aria-pressed":P==="pinned",title:P==="pinned"?"Показать все проекты и сессии":"Показать только закреплённые","aria-label":P==="pinned"?"Панель закреплённых сессий включена. Показать все проекты и сессии":"Показать только закреплённые сессии",onClick:xe,children:c.jsx(Zb,{})}),c.jsx("button",{className:"theme-btn",title:`Тема: ${Iy[re]}`,"aria-label":`Тема: ${Iy[re]}. Переключить`,onClick:he,children:c.jsx(D1,{mode:re})})]}),c.jsxs("div",{className:"fssearch fssearch--sidebar",children:[c.jsx(R1,{}),c.jsx("input",{className:"fssearch__input",type:"text",value:me,spellCheck:!1,placeholder:"Проект или сессия…","aria-label":"Поиск по проектам и сессиям",onChange:T=>Ne(T.target.value),onKeyDown:T=>{T.stopPropagation(),T.key==="Escape"&&(T.preventDefault(),me?Ne(""):T.currentTarget.blur())}}),me&&c.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>Ne(""),children:"✕"})]}),c.jsx("div",{className:"sidebar__scroll",children:P==="pinned"?c.jsxs(c.Fragment,{children:[Re.length===0&&c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:j?"Ничего не найдено":"закрепите сессию через её меню (правый клик или долгое нажатие) — она останется под рукой из любого проекта"})}),Re.map(T=>c.jsx("div",{className:T.id===m?"row row--active":"row",...F===T.id?{}:{title:"Действия со строкой — правый клик или долгое нажатие",...Ee(T)},children:F===T.id?c.jsx("div",{className:"row__main",children:c.jsx(Dc,{value:T.title??"",onCommit:I=>{k(T,I),ae(null)},onCancel:()=>ae(null)})}):c.jsxs("button",{className:"row__main",onClick:()=>{Un()||C(T)},children:[c.jsx(lh,{title:T.title??"Без названия",pinned:!1,projectName:ve(T.workspaceId),projectPath:Te(T.workspaceId)}),c.jsx(Xy,{session:T,tail:new Date(T.updatedAt).toLocaleString()})]})},T.id))]}):c.jsxs(c.Fragment,{children:[c.jsx(nh,{title:"Проекты",count:V.length,open:Ze("workspaces"),onToggle:()=>it("workspaces")}),Ze("workspaces")&&c.jsxs(c.Fragment,{children:[V.length===0&&c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:j?"Ничего не найдено":"Пока ни одного"})}),V.map(T=>c.jsx("div",{className:Gy(T.id===g,st.selected.includes(T.id)),...J(T),children:c.jsxs("button",{className:"row__main",onClick:I=>{Un()||st.click(I,T,()=>b(T.id))},children:[c.jsxs("span",{className:"row__title",children:[T.name,T.hasClaudeMd&&" ·"]}),c.jsx("span",{className:"row__meta",title:T.path,children:T.path})]})},T.id))]}),g&&c.jsxs(c.Fragment,{children:[c.jsx(nh,{title:"Сессии",count:ce.length,open:Ze("sessions"),onToggle:()=>it("sessions")}),Ze("sessions")&&c.jsxs(c.Fragment,{children:[ce.length===0&&c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:j?"Ничего не найдено":"Пока ни одной"})}),ce.map(T=>c.jsx("div",{className:Gy(T.id===m,He.selected.includes(T.id)),...F===T.id?{}:fe(T),children:F===T.id?c.jsx("div",{className:"row__main",children:c.jsx(Dc,{value:T.title??"",onCommit:I=>{k(T,I),ae(null)},onCancel:()=>ae(null)})}):c.jsxs(c.Fragment,{children:[c.jsxs("button",{className:"row__main",onClick:I=>{Un()||He.click(I,T,()=>x(T))},children:[c.jsx(lh,{title:T.title??"Без названия",pinned:T.pinned===!0,projectName:ve(T.workspaceId),projectPath:Te(T.workspaceId)}),c.jsx(Xy,{session:T,tail:new Date(T.updatedAt).toLocaleString()})]}),c.jsx("button",{className:"row__edit",title:"Переименовать","aria-label":"Переименовать сессию",onClick:()=>{Un()||ae(T.id)},children:"✎"})]})},T.id))]}),d.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(nh,{title:"Архив",count:oe.length,open:Ze("archive"),onToggle:()=>it("archive"),hint:"сессии без обращения дольше двух суток уезжают сюда сами; ничего не удаляется"}),Ze("archive")&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:"сюда сами уезжают сессии без обращения дольше двух суток; транскрипт остаётся на диске, ничего не удаляется"})}),oe.length===0&&c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:j?"Ничего не найдено":"Пока пусто"})}),oe.map(T=>c.jsxs("div",{className:T.id===m?"row row--active":"row",children:[c.jsxs("button",{className:"row__main",onClick:()=>x(T),children:[c.jsx(lh,{title:T.title??"Без названия",pinned:!1,projectName:ve(T.workspaceId),projectPath:Te(T.workspaceId)}),c.jsx("span",{className:"row__meta",children:B1(T)})]}),c.jsx("button",{className:"row__restore",title:"Вернуть сессию из архива",onClick:()=>B([T.id]),children:"Вернуть"})]},T.id))]})]})]})]})}),c.jsxs("div",{className:"sidebar__foot",children:[c.jsxs("button",{className:"account-btn sidebar__wide",title:"Аккаунт Claude",onClick:Q,children:[c.jsx("span",{className:A!=null&&A.loggedIn?"dot dot--on":"dot"}),c.jsx("span",{className:"account-btn__id",children:A===null?"Аккаунт":A.loggedIn?A.email||"Вход выполнен":"Войти в аккаунт"}),(A==null?void 0:A.plan)&&c.jsx("span",{className:"chip",children:A.plan})]}),M&&c.jsxs("button",{className:"account-btn sidebar__wide",title:"Доступ с телефона и из браузера",onClick:M,children:[c.jsx("span",{className:L!=null&&L.connected?"dot dot--on":"dot"}),c.jsx("span",{className:"account-btn__id",children:L===null?"Удалённый доступ":L.paired?L.connected?L.name||"Удалённый доступ включён":"Удалённый доступ · нет связи":"Удалённый доступ"}),(L==null?void 0:L.connected)&&L.clients>0&&c.jsx("span",{className:"chip",children:L.clients})]}),c.jsx("button",{className:"btn btn--ghost sidebar__wide",disabled:!$,title:"MCP-серверы и плагины",onClick:()=>$==null?void 0:$(),children:"Расширения"}),c.jsx("button",{className:"btn btn--ghost sidebar__wide",title:"Настройки приложения",onClick:W,children:"Настройки"}),c.jsx("button",{className:"btn btn--ghost",onClick:K,children:"+ Проект"}),c.jsx("button",{className:"btn btn--primary",onClick:O,disabled:!g,children:"+ Сессия"})]}),Ct&&c.jsx(So,{x:Ct.x,y:Ct.y,items:Tt,note:Et,onClose:Zt}),Ke&&c.jsx(So,{x:Ke.x,y:Ke.y,items:qt,note:En,onClose:ut}),dt&&c.jsx(So,{x:dt.x,y:dt.y,items:_n,note:qy,onClose:dn})]})}function Gy(s,l){const i=["row"];return s&&i.push("row--active"),l&&i.push("row--selected"),i.join(" ")}function Yy(s){const[l,i]=S.useState([]),r=S.useRef(null);function o(){i([]),r.current=null}function d(g,m,b){if(g.ctrlKey||g.metaKey){i(x=>x.includes(m.id)?x.filter(k=>k!==m.id):[...x,m.id]),r.current=m.id;return}if(g.shiftKey&&r.current){const x=s.findIndex(_=>_.id===r.current),k=s.findIndex(_=>_.id===m.id);if(x!==-1&&k!==-1){const[_,C]=x<k?[x,k]:[k,x];i(s.slice(_,C+1).map(N=>N.id));return}}o(),r.current=m.id,b()}function h(g){return l.includes(g.id)?l:(i([g.id]),r.current=g.id,[g.id])}return{selected:l,click:d,targetsFor:h,clear:o}}function nh({title:s,count:l,open:i,onToggle:r,hint:o}){const d=i?`Свернуть «${s}»`:`Развернуть «${s}»`;return c.jsxs("button",{className:"sidebar__section sidebar__section--btn","aria-expanded":i,title:o?`${d} — ${o}`:d,onClick:r,children:[c.jsx(C1,{open:i}),c.jsx("span",{className:"sidebar__section-name",children:s}),c.jsx("span",{className:"sidebar__count",children:l})]})}function C1({open:s}){return c.jsx("svg",{className:s?"sidebar__chev sidebar__chev--open":"sidebar__chev",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:c.jsx("path",{d:"M6 3.5 10.5 8 6 12.5"})})}function Zb({className:s}){return c.jsxs("svg",{className:s,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("rect",{x:"4.5",y:"2.4",width:"7",height:"4.2",rx:"1.6"}),c.jsx("path",{d:"M5.4 6.6 8 12.2 10.6 6.6"}),c.jsx("path",{d:"M8 12.2v1.4"})]})}function R1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}function M1(){try{const s=localStorage.getItem(Qb);if(s===null)return["archive"];const l=JSON.parse(s);return Array.isArray(l)?l.filter(i=>i==="workspaces"||i==="sessions"||i==="archive"):["archive"]}catch{return["archive"]}}function O1(){try{return localStorage.getItem($b)==="pinned"?"pinned":"default"}catch{return"default"}}const Iy={system:"как в системе",light:"светлая",dark:"тёмная"};function D1({mode:s}){const l={viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};return s==="dark"?c.jsx("svg",{...l,children:c.jsx("path",{d:"M13.2 9.7A5.4 5.4 0 0 1 6.3 2.8a5.6 5.6 0 1 0 6.9 6.9Z"})}):s==="light"?c.jsxs("svg",{...l,children:[c.jsx("circle",{cx:"8",cy:"8",r:"3.1"}),c.jsx("path",{d:"M8 1.4v1.4M8 13.2v1.4M2.4 8H1M15 8h-1.4M4 4l-1-1M13 13l-1-1M12 4l1-1M3 13l1-1"})]}):c.jsxs("svg",{...l,children:[c.jsx("rect",{x:"1.8",y:"2.6",width:"12.4",height:"8.4",rx:"1.4"}),c.jsx("path",{d:"M5.6 13.4h4.8"})]})}function z1(s){switch(s.state){case"running":return"работает";case"waiting_permission":return"ждёт разрешения";case"idle":return L1(s.lastTurn);case"starting":return"запускается";case"reconnecting":return"переподключается";case"error":return"ошибка";case"closed":return"на диске"}}function L1(s){switch(s){case"interrupted":return"прервана";case"stopped":return"остановлена";case"failed":return"оборвалась";case"completed":return"готова";case null:return"ждёт задачу"}}function U1(s){switch(s.state){case"running":return"running";case"starting":return"starting";case"reconnecting":return"reconnecting";case"waiting_permission":return"waiting";case"idle":return H1(s.lastTurn);case"error":return"error";case"closed":return"closed"}}function H1(s){switch(s){case"interrupted":case"stopped":return"halted";case"failed":return"error";case"completed":return"ready";case null:return"fresh"}}function Xy({session:s,tail:l}){return c.jsxs("span",{className:"row__meta",children:[c.jsxs("span",{className:`row__state row__state--${U1(s)}`,children:[c.jsx("span",{className:"row__state-dot","aria-hidden":"true"}),z1(s)]})," · ",l]})}function lh({title:s,pinned:l,projectName:i,projectPath:r}){return c.jsxs("span",{className:"row__head",children:[c.jsxs("span",{className:"row__title",children:[l&&c.jsx(Zb,{className:"row__pin"}),s]}),c.jsx("span",{className:"row__project",title:r,children:i})]})}function B1(s){const l=s.archivedAuto?"сама, по сроку молчания":"убрана вручную";return s.archivedAt?`${new Date(s.archivedAt).toLocaleString()} · ${l}`:l}const Vy=3,q1=15e5;function Kb(s,l){if(!l||typeof l!="object")return null;const i=l,r=typeof i.file_path=="string"?i.file_path:"";if(!r)return null;if(s==="Write"){if(typeof i.content!="string")return null;const o=ah(i.content).map(d=>({type:"add",text:d}));return{kind:"create",filePath:r,rows:o,added:o.length,removed:0,note:"файл записывается целиком"}}if(s==="Edit"){if(typeof i.old_string!="string"||typeof i.new_string!="string")return null;const o=X1(G1(ah(i.old_string),ah(i.new_string)));return{kind:"edit",filePath:r,rows:o,added:o.filter(d=>d.type==="add").length,removed:o.filter(d=>d.type==="del").length,note:i.replace_all===!0?"все вхождения":null}}return null}function ah(s){if(s==="")return[];const l=s.split(/\r?\n/);return l.length>1&&l[l.length-1]===""&&l.pop(),l}function G1(s,l){let i=0;for(;i<s.length&&i<l.length&&s[i]===l[i];)i++;let r=s.length,o=l.length;for(;r>i&&o>i&&s[r-1]===l[o-1];)r--,o--;const d=h=>({type:"ctx",text:h});return[...s.slice(0,i).map(d),...Y1(s.slice(i,r),l.slice(i,o)),...s.slice(r).map(d)]}function Y1(s,l){if(s.length===0&&l.length===0)return[];if(s.length===0)return l.map(x=>({type:"add",text:x}));if(l.length===0)return s.map(x=>({type:"del",text:x}));if((s.length+1)*(l.length+1)>q1)return[...s.map(x=>({type:"del",text:x})),...l.map(x=>({type:"add",text:x}))];const i=s.length,r=l.length,o=r+1,d=new Uint32Array((i+1)*o),h=(x,k)=>d[x*o+k]??0;for(let x=i-1;x>=0;x--)for(let k=r-1;k>=0;k--)d[x*o+k]=s[x]===l[k]?h(x+1,k+1)+1:Math.max(h(x+1,k),h(x,k+1));const g=[];let m=0,b=0;for(;m<i&&b<r;){const x=s[m],k=l[b];x===k?(g.push({type:"ctx",text:x}),m++,b++):h(m+1,b)>=h(m,b+1)?(g.push({type:"del",text:x}),m++):(g.push({type:"add",text:k}),b++)}for(;m<i;)g.push({type:"del",text:s[m++]});for(;b<r;)g.push({type:"add",text:l[b++]});return I1(g)}function I1(s){const l=[];let i=[];function r(){l.push(...i.filter(o=>o.type==="del")),l.push(...i.filter(o=>o.type==="add")),i=[]}for(const o of s)o.type==="ctx"?(r(),l.push(o)):i.push(o);return r(),l}function X1(s){if(!s.some(d=>d.type!=="ctx"))return s;const l=s.map(()=>!1);s.forEach((d,h)=>{if(d.type!=="ctx")for(let g=Math.max(0,h-Vy);g<=Math.min(s.length-1,h+Vy);g++)l[g]=!0});const i=[];let r=[];function o(){r.length===1?i.push(...r):r.length>1&&i.push({type:"gap",text:`⋯ ${r.length} ${V1(r.length)} без изменений`}),r=[]}return s.forEach((d,h)=>{l[h]?(o(),i.push(d)):r.push(d)}),o(),i}function V1(s){const l=s%100;if(l>=11&&l<=14)return"строк";switch(s%10){case 1:return"строка";case 2:case 3:case 4:return"строки";default:return"строк"}}async function Uh(s){try{return await navigator.clipboard.writeText(s),!0}catch{}const l=document.createElement("textarea");l.value=s,l.setAttribute("readonly",""),l.style.position="fixed",l.style.opacity="0",document.body.appendChild(l);try{return l.select(),document.execCommand("copy")}catch{return!1}finally{l.remove()}}const Hh=1600,wi="Копировать",gr="Скопировано";function Jb({text:s,hint:l,className:i}){const[r,o]=S.useState(!1);return S.useEffect(()=>{if(!r)return;const d=setTimeout(()=>o(!1),Hh);return()=>clearTimeout(d)},[r]),S.useEffect(()=>o(!1),[s]),c.jsx("button",{type:"button",className:"copybtn"+(r?" copybtn--done":"")+(i?` ${i}`:""),"aria-label":r?gr:`${wi} ${l}`,title:r?gr:`${wi} ${l}`,onClick:()=>{Uh(s).then(d=>{d&&o(!0)})},children:r?gr:wi})}function Bh({diff:s}){return c.jsxs("div",{className:"diff",children:[c.jsxs("div",{className:"diff__head",children:[c.jsx("span",{className:"diff__path",title:s.filePath,children:s.filePath}),c.jsxs("span",{className:"diff__stat",children:[s.added>0&&c.jsxs("span",{className:"diff__stat--add",children:["+",s.added]}),s.removed>0&&c.jsxs("span",{className:"diff__stat--del",children:["−",s.removed]})]})]}),s.note&&c.jsx("div",{className:"diff__note",children:s.note}),c.jsx("div",{className:"diff__body",children:s.rows.length===0?c.jsx("div",{className:"diff__row diff__row--gap",children:c.jsx("span",{className:"diff__text",children:"пустое содержимое"})}):s.rows.map((l,i)=>c.jsxs("div",{className:`diff__row diff__row--${l.type}`,children:[c.jsx("span",{className:"diff__mark","aria-hidden":"true",children:l.type==="add"?"+":l.type==="del"?"−":""}),c.jsx("span",{className:"diff__text",children:l.text===""?" ":l.text})]},i))})]})}function Q1({waiting:s}){const[l,i]=S.useState(0);return S.useEffect(()=>{const r=window.setInterval(()=>i(o=>o+1),1e3);return()=>window.clearInterval(r)},[]),c.jsxs("div",{className:s?"work work--wait":"work",children:[c.jsxs("span",{className:"work__dots","aria-hidden":"true",children:[c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"})]}),c.jsx("span",{className:"work__label",children:s?"ждёт разрешения":"думает"}),!s&&c.jsxs("span",{className:"work__time",children:[l," с"]})]})}function qh({items:s,busy:l,waiting:i,history:r=[],historyHasMore:o=!1,historyLoading:d=!1,onLoadHistory:h,sessionId:g,empty:m="Сессия пуста. Опишите задачу — Claude Code работает в каталоге проекта с полным набором инструментов."}){const b=S.useRef(null),x=S.useRef(null),k=S.useRef(!0),_=S.useRef(null),C=S.useRef(null),N=S.useRef(!1);S.useEffect(()=>{k.current=!0,_.current=null,N.current=!1,C.current!==null&&(clearTimeout(C.current),C.current=null)},[g]),S.useEffect(()=>{const K=b.current,O=x.current;if(!K||!O)return;function $(L){!K||L===K.scrollTop||(N.current=!0,K.scrollTop=L)}function A(){if(!K)return;const L=_.current;if(L){const M=$y(K,L.id);if(M){const W=M.getBoundingClientRect().top-K.getBoundingClientRect().top;$(K.scrollTop+(W-L.top))}C.current!==null&&clearTimeout(C.current),C.current=setTimeout(()=>{_.current=null},500);return}k.current&&$(K.scrollHeight)}const Q=new ResizeObserver(A);return Q.observe(O),()=>{Q.disconnect(),C.current!==null&&clearTimeout(C.current)}},[]);function H(){const K=b.current;if(K){if(N.current){N.current=!1;return}k.current=K.scrollHeight-K.scrollTop-K.clientHeight<80}}function B(){if(d)return;const K=b.current,O=r[0];if(K&&O){const $=$y(K,O.id);$&&(_.current={id:O.id,top:$.getBoundingClientRect().top-K.getBoundingClientRect().top})}h==null||h()}return c.jsx("div",{className:"transcript",ref:b,onScroll:H,children:c.jsxs("div",{className:"stream",ref:x,children:[o&&c.jsx("button",{type:"button",className:"transcript__more",onClick:B,disabled:d,children:d?"Загружаем…":"Показать более раннее"}),r.map(K=>c.jsx(Qy,{item:K},K.id)),r.length>0&&s.length>0&&c.jsx("div",{className:"transcript__divider",children:c.jsx("span",{children:"дальше — сессия открыта заново"})}),r.length===0&&s.length===0&&c.jsx("p",{className:"empty",children:m}),s.map(K=>c.jsx(Qy,{item:K},K.id)),l&&c.jsx(Q1,{waiting:i})]})})}function Qy({item:s}){switch(s.kind){case"user":return c.jsx("div",{className:"msg--user","data-item-id":s.id,children:s.text});case"assistant":return c.jsxs("div",{className:"msg--assistant","data-item-id":s.id,children:[c.jsx($1,{text:s.text}),s.streaming&&c.jsx("span",{className:"caret"}),s.text.trim()!==""&&c.jsx("div",{className:"msg--assistant__foot",children:c.jsx(Jb,{text:s.text,hint:"ответ целиком"})})]});case"thinking":return c.jsx("div",{className:"thinking","data-item-id":s.id,children:s.text});case"tool":return c.jsx(K1,{item:s});case"result":return c.jsxs("div",{className:"result-line","data-item-id":s.id,children:[c.jsx("span",{children:s.isError?"✗ "+s.subtype:"✓ готово"}),c.jsxs("span",{children:[(s.durationMs/1e3).toFixed(1)," с"]}),s.costUsd!==null&&c.jsxs("span",{children:["$",s.costUsd.toFixed(4)]}),c.jsxs("span",{children:["↑",Ky(s.inputTokens)," ↓",Ky(s.outputTokens)]})]});case"notice":return c.jsx("div",{className:s.tone==="error"?"notice notice--error":"notice","data-item-id":s.id,children:s.text})}}function $y(s,l){const i=s.querySelectorAll("[data-item-id]");for(const r of i)if(r.dataset.itemId===l)return r;return null}function $1({text:s}){const[l,i]=S.useState(""),r=S.useRef([]);S.useEffect(()=>{let d=!1;return Xb(s).then(h=>{d||i(Z1(h))}),()=>{d=!0}},[s]),S.useEffect(()=>{const d=r.current;return()=>d.forEach(h=>clearTimeout(h))},[]);function o(d){var m,b;const h=d.target.closest(".codeblock__copy");if(!(h instanceof HTMLElement))return;const g=((b=(m=h.parentElement)==null?void 0:m.querySelector("pre"))==null?void 0:b.textContent)??"";g!==""&&Uh(g).then(x=>{if(!x)return;h.textContent=gr,h.setAttribute("aria-label",gr),h.classList.add("copybtn--done");const k=window.setTimeout(()=>{h.isConnected&&(h.textContent=wi,h.setAttribute("aria-label",vh),h.classList.remove("copybtn--done"))},Hh);r.current.push(k)})}return c.jsx("div",{className:"markdown-preview msg--assistant__body",onClick:o,dangerouslySetInnerHTML:{__html:l}})}const vh=`${wi} блок кода`;function Z1(s){if(!s.includes("<pre"))return s;const l=new DOMParser().parseFromString(s,"text/html");for(const i of l.body.querySelectorAll("pre")){const r=l.createElement("div");r.className="codeblock",i.replaceWith(r),r.append(i);const o=l.createElement("button");o.type="button",o.className="copybtn codeblock__copy",o.setAttribute("aria-label",vh),o.title=vh,o.textContent=wi,r.append(o)}return l.body.innerHTML}function K1({item:s}){const[l,i]=S.useState(!1),r=s.result===null,o=Kb(s.name,s.input),d=s.name==="AskUserQuestion"?W1(s.input):null;return c.jsxs("div",{className:"tool"+(s.isError?" tool--error":"")+(s.awaitingPermission?" tool--wait":""),"data-item-id":s.id,children:[c.jsxs("button",{className:"tool__head",onClick:()=>i(h=>!h),children:[c.jsx("span",{className:"tool__name",children:s.name}),c.jsx("span",{className:"tool__arg",children:d?F1(d):J1(s.input)}),c.jsx("span",{className:"tool__status",children:r?"…":s.isError?"ошибка":l?"▴":"▾"})]}),l&&c.jsxs("div",{className:"tool__body",children:[d?c.jsx(P1,{questions:d,answers:s.answers}):o?c.jsx(Bh,{diff:o}):c.jsx(Zy,{text:JSON.stringify(s.input,null,2),hint:"аргументы вызова"}),s.result!==null&&(!d||s.isError)&&c.jsx(Zy,{text:s.result,hint:"результат вызова",style:{marginTop:10}})]})]})}function Zy({text:s,hint:l,style:i}){return c.jsxs("div",{className:"codeblock",style:i,children:[c.jsx("pre",{className:"code",children:s}),c.jsx(Jb,{text:s,hint:l,className:"codeblock__copy"})]})}function J1(s){if(!s||typeof s!="object")return"";const l=s;for(const i of["file_path","command","pattern","path","url","prompt"]){const r=l[i];if(typeof r=="string")return r.replace(/\s+/g," ").slice(0,160)}return JSON.stringify(l).slice(0,160)}function F1(s){var i;const l=s.map(r=>r.header).filter(r=>r.length>0);return l.length===s.length?l.join(" · "):((i=s[0])==null?void 0:i.question.replace(/\s+/g," ").slice(0,160))??""}function W1(s){if(typeof s!="object"||s===null)return null;const l=s.questions;if(!Array.isArray(l)||l.length===0)return null;const i=[];for(const r of l){if(typeof r!="object"||r===null)return null;const{question:o,header:d,options:h,multiSelect:g}=r;if(typeof o!="string"||!Array.isArray(h)||h.length===0)return null;const m=[];for(const b of h){if(typeof b!="object"||b===null)return null;const{label:x,description:k,preview:_}=b;if(typeof x!="string"||typeof k!="string")return null;m.push({label:x,description:k,...typeof _=="string"?{preview:_}:{}})}i.push({question:o,header:typeof d=="string"?d:"",options:m,multiSelect:g===!0})}return i}function P1({questions:s,answers:l}){return c.jsx("div",{className:"tool__questions",children:s.map((i,r)=>c.jsxs("div",{className:"tool__question",children:[c.jsxs("div",{className:"tool__question-head",children:[i.header&&c.jsx("span",{className:"chip chip--accent",children:i.header}),c.jsx("span",{className:"tool__question-text",children:i.question})]}),c.jsx("div",{className:"tool__question-answer",children:l!=null&&l[i.question]?c.jsx("span",{className:"tool__answer-value",children:l[i.question]}):c.jsx("span",{className:"tool__answer-empty",children:"не отвечено"})})]},r))})}function Ky(s){return s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}const eS="ccv.dictation.lang",Jy="ru-RU";function tS(s){try{return Function.prototype.toString.call(s).includes("[native code]")}catch{return!1}}function Fy(){const s=window,l=[s.SpeechRecognition,s.webkitSpeechRecognition].filter(r=>typeof r=="function"),i=l.find(tS);return!i&&l.length>0&&Jl("распознавание подменено: родной реализации в странице нет"),i??l[0]??null}function Fb(){var s;try{return((s=localStorage.getItem(eS))==null?void 0:s.trim())||Jy}catch{return Jy}}function Jl(s,l){l===void 0?console.debug(`[dictation] ${s}`):console.debug(`[dictation] ${s}`,l)}const nS=3,lS=400,aS=5,sS=250,iS=2e3,rS=2e4;async function cS(){try{return(await navigator.permissions.query({name:"microphone"})).state==="granted"}catch{return!1}}const uS={"not-allowed":"Браузер не дал доступ к микрофону","service-not-allowed":"Браузер не дал доступ к микрофону","audio-capture":"Микрофон не найден",network:"Сервис распознавания недоступен","language-not-supported":`Распознавание не знает языка ${Fb()}`};function oS(s){const[l]=S.useState(()=>Fy()!==null),[i,r]=S.useState(!1),[o,d]=S.useState(null),h=S.useRef(null),g=S.useRef(!1),m=S.useRef(!1),b=S.useRef(s),x=S.useRef({openedAt:0,audio:!1,heard:!1,everHeard:!1,silent:0,dead:0,lastError:"",warned:!1}),k=S.useRef(null),_=S.useRef(!1),C=S.useRef(null),N=S.useCallback(()=>{C.current&&clearTimeout(C.current),C.current=null},[]),H=S.useCallback(()=>{N();const A=async Q=>{if(C.current=null,!(!g.current||_.current)){if(!Q&&!await cS()){if(Jl("ждём ответа на запрос доступа к микрофону"),!g.current||_.current)return;C.current=setTimeout(()=>void A(!0),rS);return}Jl("движок не ответил на start()"),g.current=!1,r(!1),d("Распознавание не отвечает — проверьте расширения браузера и доступ к микрофону")}};C.current=setTimeout(()=>void A(!1),iS)},[N]);S.useEffect(()=>{b.current=s}),S.useEffect(()=>{const A=Fy();if(!A)return;const Q=new A;return Q.lang=Fb(),Q.continuous=!0,Q.interimResults=!0,Q.onstart=()=>{Jl("сессия открыта"),_.current=!0,N(),r(!0)},Q.onaudiostart=()=>{Jl("пошёл звук с микрофона"),x.current.audio=!0},Q.onresult=L=>{var he;if(m.current)return;let M="",W="";for(let F=L.resultIndex;F<L.results.length;F++){const ae=L.results[F];if(!ae)continue;const me=((he=ae[0])==null?void 0:he.transcript)??"";ae.isFinal?M+=me:W+=me}const re=x.current;re.heard=!0,re.everHeard=!0,Jl("распознано",{final:M,interim:W}),b.current(M,W)},Q.onerror=L=>{x.current.lastError=L.error,Jl("ошибка движка",L.error),!(L.error==="no-speech"||L.error==="aborted")&&(g.current=!1,r(!1),d(uS[L.error]??`Распознавание не работает: ${L.error}`))},Q.onend=()=>{m.current=!1,_.current=!1;const L=x.current,M=Date.now()-L.openedAt;if(Jl("сессия закрыта",{мс:M,звук:L.audio,слова:L.heard,ошибка:L.lastError||null}),!g.current){r(!1);return}if(L.dead=!L.audio&&M<lS?L.dead+1:0,L.dead>=aS){g.current=!1,r(!1),d(L.lastError?`Распознавание не работает: ${L.lastError}`:"Распознавание закрывается сразу после запуска — проверьте доступ к микрофону в настройках сайта");return}L.silent=L.heard?0:L.silent+1,!L.everHeard&&!L.warned&&L.silent>=nS&&(L.warned=!0,d(L.audio?"Микрофон слушает, но речь не распознаётся — проверьте язык диктовки и уровень звука":"С микрофона не идёт звук — проверьте устройство ввода в настройках сайта в браузере")),k.current=setTimeout(()=>{if(k.current=null,!!g.current){L.openedAt=Date.now(),L.audio=!1,L.heard=!1,L.lastError="",H();try{Q.start()}catch{}}},sS)},h.current=Q,()=>{g.current=!1,k.current&&clearTimeout(k.current),k.current=null,N(),Q.onend=null,Q.onresult=null,Q.onerror=null,Q.onstart=null,Q.onaudiostart=null,Q.abort(),h.current=null}},[]);const B=S.useCallback(()=>{var A;if(g.current){if(g.current=!1,Jl("выключение микрофона"),k.current&&clearTimeout(k.current),k.current=null,N(),!_.current){r(!1);return}(A=h.current)==null||A.stop()}},[]),K=S.useCallback(()=>{const A=h.current;if(A){if(!window.isSecureContext){d("Микрофон доступен только по https или с localhost");return}d(null),g.current=!0,m.current=!1,k.current&&clearTimeout(k.current),k.current=null,x.current={openedAt:Date.now(),audio:!1,heard:!1,everHeard:!1,silent:0,dead:0,lastError:"",warned:!1},r(!0),Jl("включение микрофона",{язык:A.lang}),H();try{A.start()}catch(Q){Jl("start() не прошёл",Q)}}},[H]),O=S.useCallback(()=>{g.current?B():K()},[K,B]),$=S.useCallback(()=>{var A;g.current&&_.current&&(m.current=!0,(A=h.current)==null||A.abort())},[]);return{supported:l,listening:i,error:o,toggle:O,stop:B,drop:$}}const fS="(max-width: 860px)",Wy=/^\/(\S*)$/,dS=new Set(["model","permissions"]);function hS(s){return dS.has(s.name)||s.name.startsWith("__")}const pS=new Set(["clear","rename"]),Py=/(?:^|\s)@([^\s@]*)$/,mS=200,gS=100,yS=190;function Wb({disabled:s,busy:l,commands:i,sessionTitle:r,contextResult:o,className:d,placeholder:h,sendLabel:g="Отправить",autoFocus:m=!1,onContextSearch:b,onCommand:x,onSend:k,onInterrupt:_,onEscape:C}){var dn;const N=wh(fS),[H,B]=S.useState(""),[K,O]=S.useState(!1),[$,A]=S.useState(0),Q=S.useRef(null),L=S.useRef(null),M=S.useRef(null),[W,re]=S.useState(0),[he,F]=S.useState([]),[ae,me]=S.useState(-1),Ne=S.useRef(""),[pe,z]=S.useState(""),P=oS(S.useCallback((J,fe)=>{J&&B(Ee=>sh(Ee,J)),z(fe.trim())},[])),te=pe?sh(H,pe):H;S.useEffect(()=>{P.listening||pe===""||(B(J=>sh(J,pe)),z(""))},[P.listening,pe]),S.useEffect(()=>{var J;m&&((J=Q.current)==null||J.focus())},[m]);const xe=s?"Выберите сессию":h??"Опишите задачу… («/» — команды, «@» — файлы)",we=S.useRef(0),j=S.useCallback(J=>{const fe=parseFloat(getComputedStyle(J).maxHeight),Ee=Number.isFinite(fe)&&fe>0?fe:yS;J.style.height="auto";const Qe=J.scrollHeight;J.style.height=`${Math.min(Qe,Ee)}px`,J.style.overflowY=Qe>Ee?"auto":"hidden";const Tt=M.current;Tt&&(M.current=null,J.setSelectionRange(Tt[0],Tt[1]))},[]);S.useEffect(()=>{const J=Q.current;J&&j(J)},[te,xe,s,j]),S.useEffect(()=>{const J=Q.current;if(!J)return;const fe=new ResizeObserver(([Ee])=>{const Qe=Ee==null?void 0:Ee.contentRect.width;Qe===void 0||Math.abs(Qe-we.current)<1||(we.current=Qe,j(J))});return fe.observe(J),()=>fe.disconnect()},[j]);const V=P.stop;S.useEffect(()=>{s&&V()},[s,V]);const ce=S.useMemo(()=>P.error?{ok:!1,message:P.error}:null,[P.error]),oe=S.useMemo(()=>{var Ee;const J=(Ee=Wy.exec(H))==null?void 0:Ee[1];if(J===void 0)return[];const fe=J.toLowerCase();return i.filter(Qe=>!hS(Qe)&&ih(Qe,fe)<Pb).sort((Qe,Tt)=>ih(Qe,fe)-ih(Tt,fe))},[H,i]),ve=!K&&oe.length>0,Te=Math.min($,oe.length-1),Re=K?null:((dn=Py.exec(te.slice(0,W)))==null?void 0:dn[1])??null,it=S.useRef(b);it.current=b,S.useEffect(()=>{if(Re===null||Re===""||Re.endsWith("/")){it.current(Re);return}const J=setTimeout(()=>it.current(Re),mS);return()=>clearTimeout(J)},[Re]);const Ze=Re!==null&&(o==null?void 0:o.query)===Re,st=Ze?o.entries:[],He=Re!==null,Ct=He&&!Ze,Je=Math.min($,Math.max(st.length-1,0));S.useEffect(()=>{var fe,Ee;if(!ve&&!He)return;const J=ve?Te:Je;(Ee=(fe=L.current)==null?void 0:fe.children[J])==null||Ee.scrollIntoView({block:"nearest"})},[ve,He,Te,Je]);function Ke(J,fe){var Ee;B(J),re(fe),M.current=[fe,fe],A(0),O(!1),pe!==""&&(z(""),P.drop()),(Ee=Q.current)==null||Ee.focus()}function Fe(){B(""),z(""),A(0),re(0),O(!1),me(-1),Ne.current="",P.drop()}function dt(J){const fe=J.trim();!fe||s||(k(fe),F(Ee=>[fe,...Ee.filter(Qe=>Qe!==fe)].slice(0,gS)),Fe())}function Wn(J){if(J<-1||J>=he.length)return;ae===-1&&(Ne.current=H);const fe=J===-1?Ne.current:he[J]??"";me(J),Ke(fe,fe.length)}function Bt(){var Qe;const J=((Qe=Q.current)==null?void 0:Qe.selectionStart)??te.length,Ee=`${J>0&&!/\s$/.test(te.slice(0,J))?" ":""}@`;Ke(te.slice(0,J)+Ee+te.slice(J),J+Ee.length)}function Tn(J){var Tt;const fe=(Tt=Py.exec(te.slice(0,W)))==null?void 0:Tt[1];if(fe===void 0)return;const Ee=W-fe.length-1,Qe=J.kind==="dir"?`@${J.path}/`:`@${J.path} `;Ke(te.slice(0,Ee)+Qe+te.slice(W),Ee+Qe.length)}function bn(){var fe;const J=(fe=Wy.exec(te.trim()))==null?void 0:fe[1];if(J&&x(J)){Fe();return}dt(te)}function fn(J,fe){B(J),re(fe),A(0),O(!1),me(-1),pe!==""&&(z(""),P.drop())}function Un(J){var Qe;const fe=pS.has(J.name)?r:null,Ee=`/${J.name} `;B(Ee+(fe??"")),re(Ee.length+((fe==null?void 0:fe.length)??0)),fe&&(M.current=[Ee.length,Ee.length+fe.length]),A(0),(Qe=Q.current)==null||Qe.focus()}function Zt(J){if(x(J.name)){B(""),A(0),O(!1);return}J.argumentHint?Un(J):dt(`/${J.name}`)}function ut(J){if(ve){if(J.key==="ArrowDown")return J.preventDefault(),A(fe=>(Math.min(fe,oe.length-1)+1)%oe.length);if(J.key==="ArrowUp"){J.preventDefault();const fe=oe.length-1;return A(Ee=>(Math.min(Ee,fe)+fe)%oe.length)}if(J.key==="Enter"&&!J.shiftKey){J.preventDefault();const fe=oe[Te];fe&&Zt(fe);return}if(J.key==="Tab"){J.preventDefault();const fe=oe[Te];fe&&Un(fe);return}if(J.key==="Escape"){J.preventDefault(),J.stopPropagation(),O(!0);return}}if(He){if(J.key==="ArrowDown"&&st.length>0)return J.preventDefault(),A(fe=>(Math.min(fe,st.length-1)+1)%st.length);if(J.key==="ArrowUp"&&st.length>0){J.preventDefault();const fe=st.length-1;return A(Ee=>(Math.min(Ee,fe)+fe)%st.length)}if(J.key==="Enter"&&!J.shiftKey||J.key==="Tab"){const fe=st[Je];if(fe){J.preventDefault(),Tn(fe);return}if(J.key==="Tab")return}if(J.key==="Escape"){J.preventDefault(),J.stopPropagation(),O(!0);return}}if((J.key==="ArrowUp"||J.key==="ArrowDown")&&!J.shiftKey){const fe=J.currentTarget,Ee=fe.selectionStart;if(fe.selectionEnd===Ee){const Qe=J.key==="ArrowUp",Tt=Qe?!te.slice(0,Ee).includes(`
|
|
118
|
-
`):!te.slice(Ee).includes(`
|
|
119
|
-
`),Et=Qe?ae+1:ae-1;if(Tt&&Et>=-1&&Et<he.length){J.preventDefault(),Wn(Et);return}}}if(J.key==="Escape"&&C){J.preventDefault(),J.stopPropagation(),C();return}J.key==="Enter"&&!J.shiftKey&&!N&&(J.preventDefault(),bn())}return c.jsx("div",{className:d?`composer ${d}`:"composer",children:c.jsxs("div",{className:"composer__inner",children:[c.jsx(Uc,{result:ce}),He&&!ve&&c.jsxs("div",{className:"cmdmenu",role:"listbox",ref:L,children:[st.map((J,fe)=>c.jsxs("button",{role:"option","aria-selected":fe===Je,className:fe===Je?"cmdmenu__row is-on":"cmdmenu__row",onMouseEnter:()=>A(fe),onMouseDown:Ee=>{Ee.preventDefault(),Tn(J)},children:[c.jsxs("span",{className:"cmdmenu__name",children:[J.name,J.kind==="dir"?"/":""]}),c.jsx("span",{className:"cmdmenu__desc",children:J.path}),J.ignored&&c.jsx("span",{className:"cmdmenu__tag",children:"git-ignore"})]},J.path)),st.length===0&&c.jsx("div",{className:"cmdmenu__empty",children:Ct?"ищем…":Re?"Ничего не нашлось":"Наберите имя файла или каталога"})]}),ve&&c.jsx("div",{className:"cmdmenu",role:"listbox",ref:L,children:oe.map((J,fe)=>c.jsxs("button",{role:"option","aria-selected":fe===Te,className:fe===Te?"cmdmenu__row is-on":"cmdmenu__row",onMouseEnter:()=>A(fe),onMouseDown:Ee=>{Ee.preventDefault(),Zt(J)},children:[c.jsxs("span",{className:"cmdmenu__name",children:["/",J.name]}),J.argumentHint&&c.jsx("span",{className:"cmdmenu__hint",children:J.argumentHint}),c.jsx("span",{className:"cmdmenu__desc",children:J.description})]},J.name))}),c.jsxs("div",{className:"composer__field",children:[c.jsx("button",{type:"button",className:"addbtn",title:"Добавить контекст — файл проекта («@»)","aria-label":"Добавить контекст",disabled:s,onClick:Bt,children:c.jsx(_S,{})}),c.jsx("textarea",{ref:Q,value:te,disabled:s,placeholder:xe,onChange:J=>fn(J.target.value,J.target.selectionStart),onSelect:J=>re(J.currentTarget.selectionStart),onKeyDown:ut}),P.supported&&c.jsx("button",{type:"button",className:P.listening?"micbtn is-on":"micbtn",title:P.listening?"Остановить диктовку":"Продиктовать промпт","aria-label":P.listening?"Остановить диктовку":"Продиктовать промпт","aria-pressed":P.listening,disabled:s,onClick:P.toggle,children:c.jsx(SS,{on:P.listening})}),l?c.jsx("button",{className:"btn",onClick:_,title:"Прервать (Esc)",children:"Стоп"}):c.jsxs("button",{className:"btn btn--primary sendbtn",onClick:bn,disabled:s||te.trim()==="","aria-label":g,title:g,children:[c.jsx("span",{className:"sendbtn__label",children:g}),c.jsx(vS,{})]})]})]})})}function sh(s,l){const i=l.trim();if(i==="")return s;const r=Sh(i).slice(bS(s,i)).join(" ");return r===""?s:s===""||/\s$/.test(s)?s+r:`${s} ${r}`}function bS(s,l){const i=Sh(s),r=Sh(l);for(let o=Math.min(i.length,r.length);o>0;o--)if(i.slice(i.length-o).every((d,h)=>xS(d,r[h]??"")))return o;return 0}function Sh(s){return s.split(/\s+/).filter(l=>l!=="")}function xS(s,l){const i=r=>r.toLowerCase().replace(/[.,!?;:…]+$/u,"");return i(s)===i(l)}function _S(){return c.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round","aria-hidden":"true",children:c.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2"})})}function vS(){return c.jsx("svg",{className:"sendbtn__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:c.jsx("path",{d:"M8 12.5V3.5M4 7.5 8 3.5l4 4"})})}function SS({on:s}){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("rect",{x:"5.9",y:"1.7",width:"4.2",height:"7.6",rx:"2.1",fill:s?"currentColor":"none"}),c.jsx("path",{d:"M3.3 7.3v.8a4.7 4.7 0 0 0 9.4 0v-.8"}),c.jsx("path",{d:"M8 12.8v1.5"})]})}const Pb=4;function ih(s,l){const i=s.name.toLowerCase();return i===l?0:i.startsWith(l)?1:s.aliases.some(r=>r.toLowerCase().startsWith(l))?2:i.includes(l)?3:Pb}function kS({request:s,queued:l,onDecide:i}){const r=Kb(s.toolName,s.input);return c.jsx("div",{className:"modal-backdrop modal-backdrop--sheet",children:c.jsxs("div",{className:"sheet",role:"dialog","aria-modal":"true",children:[c.jsxs("div",{className:"sheet__head",children:["Разрешить действие?",l>0&&` (ещё ${l} в очереди)`]}),c.jsxs("div",{className:"sheet__body",children:[c.jsx("div",{className:"sheet__tool",children:s.toolName}),s.reason&&c.jsx("p",{className:"sheet__reason",children:s.reason}),r?c.jsx(Bh,{diff:r}):c.jsx("pre",{className:"code",children:JSON.stringify(s.input,null,2)})]}),c.jsxs("div",{className:"sheet__actions",children:[c.jsx("button",{className:"btn",onClick:()=>i(s.requestId,"deny"),children:"Отклонить"}),c.jsx("button",{className:"btn btn--warn",autoFocus:!0,onClick:()=>i(s.requestId,"allow"),children:"Разрешить"})]})]})})}function wS({request:s,queued:l,onAnswer:i,onDecline:r}){const{questions:o}=s,[d,h]=S.useState(()=>o.map(()=>new Set)),[g,m]=S.useState(()=>o.map(()=>"")),[b,x]=S.useState(()=>eb(o));S.useEffect(()=>{h(o.map(()=>new Set)),m(o.map(()=>"")),x(eb(o))},[s.requestId]);const k=S.useMemo(()=>NS(o,d,g),[o,d,g]),_=k!==null;function C($,A){var Q,L;(L=(Q=o[$])==null?void 0:Q.options[A])!=null&&L.preview&&x(M=>{const W=M.slice();return W[$]=A,W})}function N($,A,Q){h(L=>{const M=L.slice(),W=new Set(M[$]);return Q?W.has(A)?W.delete(A):W.add(A):W.has(A)||(W.clear(),W.add(A)),M[$]=W,M}),A!=="other"&&C($,A)}function H($,A){m(Q=>{const L=Q.slice();return L[$]=A,L})}function B(){k&&i(s.requestId,k)}function K($){$.key==="Enter"&&($.target.closest("button")||_&&($.preventDefault(),B()))}function O($){var M;if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes($.key))return;const A=Array.from($.currentTarget.querySelectorAll("button.qsheet__option")),Q=A.indexOf(document.activeElement);if(Q===-1)return;$.preventDefault();const L=$.key==="ArrowDown"||$.key==="ArrowRight"?1:-1;(M=A[(Q+L+A.length)%A.length])==null||M.focus()}return c.jsx("div",{className:"modal-backdrop modal-backdrop--sheet",children:c.jsxs("div",{className:"qsheet",role:"dialog","aria-modal":"true","aria-label":"Вопрос от Claude",onKeyDown:K,children:[c.jsxs("div",{className:"qsheet__head",children:[c.jsx("span",{className:"qsheet__head-icon","aria-hidden":"true",children:"?"}),c.jsxs("span",{children:[o.length===1?"Уточняющий вопрос":`Уточняющие вопросы (${o.length})`,l>0&&` — ещё ${l} в очереди`]})]}),c.jsxs("div",{className:"qsheet__body",children:[s.reason&&c.jsx("p",{className:"qsheet__reason",children:s.reason}),o.map(($,A)=>c.jsx(jS,{q:$,qi:A,selected:d[A]??new Set,otherText:g[A]??"",previewIndex:b[A]??null,onToggle:N,onFocusOption:C,onOtherText:H,onOptionsKeyDown:O},A))]}),c.jsxs("div",{className:"qsheet__actions",children:[c.jsx("button",{className:"btn",onClick:()=>r(s.requestId),children:"Не отвечать"}),c.jsx("button",{className:"btn btn--primary",disabled:!_,onClick:B,children:"Ответить"})]})]})})}function jS({q:s,qi:l,selected:i,otherText:r,previewIndex:o,onToggle:d,onFocusOption:h,onOtherText:g,onOptionsKeyDown:m}){var C;const b=s.options.some(N=>N.preview),x=o!==null?(C=s.options[o])==null?void 0:C.preview:void 0,k=i.has("other"),_=s.multiSelect?"checkbox":"radio";return c.jsxs("div",{className:"qsheet__question",children:[c.jsxs("div",{className:"qsheet__qhead",children:[c.jsx("span",{className:"chip chip--accent",children:s.header}),c.jsx("span",{className:"qsheet__qtext",children:s.question})]}),c.jsxs("div",{className:"qsheet__options"+(s.multiSelect?"":" qsheet__options--radio"),role:s.multiSelect?"group":"radiogroup","aria-label":s.question,onKeyDown:m,children:[s.options.map((N,H)=>{const B=i.has(H);return c.jsxs("button",{type:"button",role:_,"aria-checked":B,className:"qsheet__option"+(B?" is-selected":""),onClick:()=>d(l,H,s.multiSelect),onFocus:()=>h(l,H),onMouseEnter:()=>h(l,H),children:[c.jsx("span",{className:"qsheet__opt-mark","aria-hidden":"true"}),c.jsxs("span",{className:"qsheet__opt-body",children:[c.jsx("span",{className:"qsheet__opt-label",children:N.label}),c.jsx("span",{className:"qsheet__opt-desc",children:N.description})]})]},H)}),c.jsxs("div",{className:"qsheet__other",children:[c.jsxs("button",{type:"button",role:_,"aria-checked":k,className:"qsheet__option qsheet__option--other"+(k?" is-selected":""),onClick:()=>d(l,"other",s.multiSelect),children:[c.jsx("span",{className:"qsheet__opt-mark","aria-hidden":"true"}),c.jsxs("span",{className:"qsheet__opt-body",children:[c.jsx("span",{className:"qsheet__opt-label",children:"Другое"}),c.jsx("span",{className:"qsheet__opt-desc",children:"Свой вариант ответа"})]})]}),k&&c.jsx("input",{type:"text",className:"qsheet__other-input",placeholder:"Впишите свой вариант…","aria-label":`Свой вариант ответа на вопрос «${s.question}»`,value:r,onChange:N=>g(l,N.target.value),autoFocus:!0})]})]}),b&&c.jsx("pre",{className:"qsheet__preview",children:x??""})]})}function eb(s){return s.map(l=>{const i=l.options.findIndex(r=>r.preview);return i===-1?null:i})}function NS(s,l,i){const r={};for(let o=0;o<s.length;o++){const d=s[o];if(!d)continue;const h=l[o]??new Set,g=[];for(let m=0;m<d.options.length;m++){const b=d.options[m];b&&h.has(m)&&g.push(b.label)}if(h.has("other")){const m=(i[o]??"").trim();m&&g.push(m)}if(g.length===0)return null;r[d.question]=g.join(", ")}return r}function ex({path:s}){const[l,i]=S.useState(!1),[r,o]=S.useState(!1),d=S.useRef(null);S.useEffect(()=>{if(!l)return;function g(m){var b;(b=d.current)!=null&&b.contains(m.target)||i(!1)}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[l]),S.useEffect(()=>{if(!r)return;const g=setTimeout(()=>o(!1),Hh);return()=>clearTimeout(g)},[r]),S.useEffect(()=>i(!1),[s]);async function h(){await Uh(s)&&o(!0)}return c.jsxs("div",{ref:d,className:"cwd",children:[c.jsxs("button",{type:"button",className:"cwd__toggle","aria-expanded":l,title:l?"Свернуть путь":`Полный путь: ${s}`,onClick:()=>i(g=>!g),onKeyDown:g=>{g.key!=="Escape"||!l||(g.preventDefault(),g.stopPropagation(),i(!1))},children:[c.jsx(TS,{open:l}),c.jsx("span",{className:"cwd__short",children:s})]}),l&&c.jsxs("div",{className:"cwd__pop",children:[c.jsx("span",{className:"cwd__full",children:s}),c.jsx("button",{type:"button",className:"btn btn--ghost cwd__copy",onClick:()=>void h(),children:r?gr:wi})]})]})}function TS({open:s}){return c.jsx("svg",{className:s?"cwd__chev cwd__chev--open":"cwd__chev",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:c.jsx("path",{d:"M6 3.5 10.5 8 6 12.5"})})}function qs({value:s,options:l,onChange:i,className:r,title:o,ariaLabel:d,placeholder:h="—"}){const[g,m]=S.useState(!1),[b,x]=S.useState(0),k=S.useRef(null),_=S.useRef(null),C=l.find(B=>B.value===s)??null;S.useEffect(()=>{if(!g)return;const B=l.findIndex(K=>K.value===s);x(B===-1?0:B)},[g]),S.useEffect(()=>{if(!g)return;function B(K){var O;(O=k.current)!=null&&O.contains(K.target)||m(!1)}return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[g]),S.useEffect(()=>{var B,K;g&&((K=(B=_.current)==null?void 0:B.querySelector(".is-cursor"))==null||K.scrollIntoView({block:"nearest"}))},[g,b]),S.useEffect(()=>{if(!g)return;const B=_.current,K=ES(k.current);if(!B||!K)return;const O=B.getBoundingClientRect().bottom-K.getBoundingClientRect().bottom;O>0&&(K.scrollTop+=Math.min(O+8,B.offsetHeight))},[g]);function N(B){m(!1),B.value!==s&&i(B.value)}function H(B){if(B.key==="Escape"){if(!g)return;B.preventDefault(),B.stopPropagation(),m(!1);return}if(B.key==="ArrowDown"||B.key==="ArrowUp"){if(B.preventDefault(),!g)return m(!0);const K=B.key==="ArrowDown"?1:l.length-1;return x(O=>(O+K)%l.length)}if(B.key==="Enter"||B.key===" "){if(B.preventDefault(),!g)return m(!0);const K=l[b];K&&N(K)}}return c.jsxs("div",{ref:k,className:"select"+(g?" select--open":"")+(r?` ${r}`:""),children:[c.jsxs("button",{type:"button",className:"select__trigger",title:o,"aria-label":d??o,"aria-haspopup":"listbox","aria-expanded":g,onClick:()=>m(B=>!B),onKeyDown:H,children:[c.jsx("span",{className:"select__value",children:(C==null?void 0:C.label)??h}),c.jsx(AS,{})]}),g&&c.jsx("div",{ref:_,className:"select__menu",role:"listbox","aria-label":d??o,children:l.map((B,K)=>c.jsxs("button",{type:"button",role:"option","aria-selected":B.value===s,className:"select__option"+(K===b?" is-cursor":"")+(B.value===s?" is-on":""),onMouseEnter:()=>x(K),onClick:()=>N(B),children:[c.jsx("span",{className:"select__check","aria-hidden":"true",children:B.value===s?"✓":""}),c.jsx("span",{className:"select__label",children:B.label}),B.hint&&c.jsx("span",{className:"select__hint",children:B.hint})]},B.value))})]})}function ES(s){let l=(s==null?void 0:s.parentElement)??null;for(;l;){if(l.scrollHeight>l.clientHeight&&getComputedStyle(l).overflowY!=="visible")return l;l=l.parentElement}return null}function AS(){return c.jsx("svg",{className:"select__chev",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:c.jsx("path",{d:"M3 4.5 6 7.5 9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const CS=["low","medium","high"];function tx({models:s,value:l,effort:i,ultracode:r,thinking:o,switchOnFlag:d,className:h,onModel:g,onEffort:m,onUltracode:b,onThinking:x,onSwitchOnFlag:k}){const[_,C]=S.useState(!1),[N,H]=S.useState(0),B=S.useRef(null),K=S.useRef(null),O=s.find(M=>M.value===l)??null,$=O&&O.supportsEffort?O.effortLevels.length>0?O.effortLevels:CS:[],A=$.includes("xhigh");S.useEffect(()=>{if(!_)return;const M=s.findIndex(W=>W.value===l);H(M===-1?0:M)},[_]),S.useEffect(()=>{if(!_)return;function M(W){var re;(re=B.current)!=null&&re.contains(W.target)||C(!1)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[_]),S.useEffect(()=>{var M,W;_&&((W=(M=K.current)==null?void 0:M.querySelector(".is-cursor"))==null||W.scrollIntoView({block:"nearest"}))},[_,N]);function Q(M){C(!1),M.value!==l&&g(M.value)}function L(M){if(M.key==="Escape"){if(!_)return;M.preventDefault(),M.stopPropagation(),C(!1);return}if(M.key==="ArrowDown"||M.key==="ArrowUp"){if(M.preventDefault(),!_)return C(!0);if(s.length===0)return;const W=M.key==="ArrowDown"?1:s.length-1;return H(re=>(re+W)%s.length)}if(M.key==="Enter"||M.key===" "){if(M.preventDefault(),!_)return C(!0);const W=s[N];W&&Q(W)}}return c.jsxs("div",{ref:B,className:"select"+(_?" select--open":"")+(h?` ${h}`:""),children:[c.jsxs("button",{type:"button",className:"select__trigger",title:"Модель, усилие и размышления","aria-label":"Модель, усилие и размышления","aria-haspopup":"menu","aria-expanded":_,onClick:()=>C(M=>!M),onKeyDown:L,children:[c.jsx("span",{className:"select__value",children:(O==null?void 0:O.displayName)??l??"—"}),r?c.jsx("span",{className:"select__suffix select__suffix--hot",children:"ultracode"}):$.length>0&&i&&c.jsx("span",{className:"select__suffix",children:i}),c.jsx(RS,{})]}),_&&c.jsxs("div",{ref:K,className:"select__menu modelmenu",role:"menu",children:[c.jsx("div",{className:"modelmenu__head",children:"Модель"}),s.map((M,W)=>c.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":M.value===l,className:"select__option"+(W===N?" is-cursor":"")+(M.value===l?" is-on":""),onMouseEnter:()=>H(W),onClick:()=>Q(M),children:[c.jsx("span",{className:"select__check","aria-hidden":"true",children:M.value===l?"✓":""}),c.jsx("span",{className:"select__label",children:M.displayName}),M.description&&c.jsx("span",{className:"select__hint",children:M.description})]},M.value)),$.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"modelmenu__sep",role:"separator"}),c.jsxs("div",{className:"modelmenu__row",children:[c.jsxs("span",{className:"modelmenu__label",children:["Усилие",c.jsx("span",{className:"modelmenu__desc",children:"насколько усердно модель думает"})]}),c.jsx("span",{className:"modelmenu__levels",children:$.map(M=>c.jsx("button",{type:"button",role:"menuitemradio","aria-checked":M===i,className:M===i?"modelmenu__level is-on":"modelmenu__level",onClick:()=>m(M),children:M},M))})]}),A&&c.jsx(rh,{label:"Ultracode",desc:"xhigh и постоянная оркестрация подагентами",on:r,onToggle:()=>b(!r)})]}),c.jsx("div",{className:"modelmenu__sep",role:"separator"}),(O==null?void 0:O.supportsThinking)!==!1&&c.jsx(rh,{label:"Размышления",desc:"расширенное обдумывание перед ответом",on:o,onToggle:()=>x(!o)}),c.jsx(rh,{label:"Менять модель по флагу",desc:"иначе помеченный ход встаёт на паузу",on:d,onToggle:()=>k(!d)})]})]})}function rh({label:s,desc:l,on:i,onToggle:r}){return c.jsxs("button",{type:"button",role:"menuitemcheckbox","aria-checked":i,className:"modelmenu__row modelmenu__row--btn",onClick:r,children:[c.jsxs("span",{className:"modelmenu__label",children:[s,c.jsx("span",{className:"modelmenu__desc",children:l})]}),c.jsx("span",{className:i?"switch is-on":"switch","aria-hidden":"true",children:c.jsx("span",{className:"switch__knob"})})]})}function RS(){return c.jsx("svg",{className:"select__chev",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:c.jsx("path",{d:"M3 4.5 6 7.5 9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Pl({title:s,children:l,actions:i,className:r,sheet:o=!1,onClose:d}){const h=S.useRef(null);return S.useEffect(()=>{function g(m){if(m.key==="Escape"){m.preventDefault(),m.stopPropagation(),d();return}if(m.key!=="Tab")return;const b=h.current;if(!b)return;const x=b.querySelectorAll('button, input, textarea, select, a[href], [tabindex]:not([tabindex="-1"])'),k=x[0],_=x[x.length-1];!k||!_||(m.shiftKey&&document.activeElement===k?(m.preventDefault(),_.focus()):!m.shiftKey&&document.activeElement===_&&(m.preventDefault(),k.focus()))}return document.addEventListener("keydown",g,!0),()=>document.removeEventListener("keydown",g,!0)},[d]),c.jsx("div",{className:o?"modal-backdrop modal-backdrop--sheet":"modal-backdrop",onMouseDown:g=>{g.target===g.currentTarget&&d()},children:c.jsxs("div",{ref:h,className:r?`modal ${r}`:"modal",role:"dialog","aria-modal":"true","aria-label":s,children:[c.jsxs("div",{className:"modal__head",children:[c.jsx("h2",{className:"modal__title",children:s}),c.jsx("button",{className:"modal__close","aria-label":"Закрыть",onClick:d,children:"✕"})]}),c.jsx("div",{className:"modal__body",children:l}),i&&c.jsx("div",{className:"modal__actions",children:i})]})})}function MS({candidates:s,searching:l,agentItems:i,agentBusy:r,error:o,roots:d,created:h,onSearch:g,onAskAgent:m,onInterrupt:b,onSubmit:x,onCreate:k,onClose:_}){const[C,N]=S.useState("open"),[H,B]=S.useState(""),[K,O]=S.useState(!1),[$,A]=S.useState(""),[Q,L]=S.useState(""),[M,W]=S.useState({git:!0,claudeMd:!0,readme:!0}),re=H.trim(),he=re!=="",F=$.trim(),ae=Q.trim(),me=F!==""&&ae!=="";S.useEffect(()=>{$===""&&d.length>0&&A(d[0])},[d]);const Ne=S.useRef(g);Ne.current=g,S.useEffect(()=>{if(C!=="open")return;const te=H.trim(),xe=setTimeout(()=>Ne.current(te),200);return()=>clearTimeout(xe)},[H,C]);function pe(){he&&x(re)}function z(){me&&k(F,ae,M)}function P(){he&&(O(!0),m(re))}return h?c.jsxs(Pl,{title:"Новый проект",onClose:_,actions:c.jsx("button",{className:"btn btn--primary",onClick:_,autoFocus:!0,children:"Понятно"}),children:[c.jsx("p",{className:"modal__text",children:"Каталог создан и открыт как проект, но часть шагов не удалась."}),c.jsx("p",{className:"newproj__preview",children:h.path}),c.jsx("div",{className:"modal__error",children:c.jsx("ul",{className:"newproj__warnings",children:h.warnings.map(te=>c.jsx("li",{children:te},te))})}),c.jsx("p",{className:"modal__text modal__text--dim",children:"Проект открыт и работает — недостающее можно добавить руками, в дереве файлов или из терминала."})]}):c.jsxs(Pl,{title:"Новый проект",className:K&&C==="open"?"modal--wide":void 0,onClose:_,actions:c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:_,children:"Отмена"}),C==="open"?c.jsxs(c.Fragment,{children:[r?c.jsx("button",{className:"btn",onClick:b,children:"Остановить"}):c.jsx("button",{className:"btn",disabled:!he,onClick:P,title:"Найти по описанию",children:"Попросить агента"}),c.jsx("button",{className:"btn btn--primary",disabled:!he,onClick:pe,children:"Открыть"})]}):c.jsx("button",{className:"btn btn--primary",disabled:!me,onClick:z,children:"Создать"})]}),children:[c.jsxs("div",{className:"tabs",children:[c.jsx(tb,{label:"Открыть",on:C==="open",onClick:()=>N("open")}),c.jsx(tb,{label:"Создать",on:C==="create",onClick:()=>N("create")})]}),C==="open"?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"modal__text",children:"Каталог, в котором будет работать агент. Введите путь или часть имени — подходящие каталоги появятся ниже."}),c.jsx("label",{className:"field",htmlFor:"workspace-path",children:"Путь или название"}),c.jsx("input",{id:"workspace-path",className:"input input--mono",value:H,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"C:\\Projects\\my-app",onChange:te=>B(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),pe())}}),o&&c.jsx("p",{className:"modal__error",children:o}),s.length>0&&c.jsx("ul",{className:"finds",children:s.map(te=>c.jsx("li",{children:c.jsxs("button",{className:"find",disabled:te.open,title:te.open?"Этот проект уже открыт":te.path,onClick:()=>B(te.path),onDoubleClick:()=>x(te.path),children:[c.jsx("span",{className:"find__name",children:te.name}),c.jsx("span",{className:"find__path",children:te.path}),c.jsx("span",{className:"find__note",children:zS(te)})]})},te.path))}),s.length===0&&he&&!l&&!K&&c.jsx("p",{className:"modal__text modal__text--dim",children:"Ничего похожего среди каталогов, где вы работали. Если помните не имя, а суть проекта — опишите его и нажмите «Попросить агента». Проекта ещё нет вовсе — рядом вкладка «Создать»."}),K&&c.jsx("div",{className:"finds__agent",children:c.jsx(qh,{items:i,busy:r,waiting:!1,empty:"Агент ищет…"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"modal__text",children:"Пустой каталог для нового проекта. Дальше в нём работает агент — с первого промпта, без отдельной настройки."}),c.jsx("label",{className:"field",htmlFor:"workspace-parent",children:"Где создать"}),c.jsx("input",{id:"workspace-parent",className:"input input--mono",value:$,spellCheck:!1,autoComplete:"off",placeholder:"C:\\Projects",onChange:te=>A(te.target.value)}),d.length>0&&c.jsx("div",{className:"newproj__roots",children:d.map(te=>c.jsx("button",{type:"button",className:te===F?"newproj__root is-on":"newproj__root",title:te,onClick:()=>A(te),children:DS(te)},te))}),c.jsx("label",{className:"field newproj__field",htmlFor:"workspace-name",children:"Имя проекта"}),c.jsx("input",{id:"workspace-name",className:"input input--mono",value:Q,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"my-app",onChange:te=>L(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),z())}}),c.jsx("p",{className:"newproj__preview",children:me?OS(F,ae):"Каталог появится здесь"}),o&&c.jsx("p",{className:"modal__error",children:o}),c.jsxs("div",{className:"newproj__opts",children:[c.jsx(ch,{label:"git init",desc:"панель истории работает сразу",on:M.git,onToggle:()=>W(te=>({...te,git:!te.git}))}),c.jsx(ch,{label:"CLAUDE.md",desc:"заготовка инструкций для агента",on:M.claudeMd,onToggle:()=>W(te=>({...te,claudeMd:!te.claudeMd}))}),c.jsx(ch,{label:"README.md",desc:"по нему проект потом узнаёт поиск",on:M.readme,onToggle:()=>W(te=>({...te,readme:!te.readme}))})]})]})]})}function tb({label:s,on:l,onClick:i}){return c.jsx("button",{type:"button",className:l?"tabs__tab is-on":"tabs__tab","aria-pressed":l,onClick:i,children:s})}function ch({label:s,desc:l,on:i,onToggle:r}){return c.jsxs("button",{type:"button",role:"checkbox","aria-checked":i,className:"newproj__opt",onClick:r,children:[c.jsxs("span",{className:"newproj__optlabel",children:[s,c.jsx("span",{className:"newproj__optdesc",children:l})]}),c.jsx("span",{className:i?"switch is-on":"switch","aria-hidden":"true",children:c.jsx("span",{className:"switch__knob"})})]})}function OS(s,l){const i=s.includes("\\")?"\\":"/";return s.replace(/[\\/]+$/,"")+i+l}function DS(s){const l=s.includes("\\")?"\\":"/",i=s.split(/[\\/]/).filter(Boolean);return i.length<=2?s:`…${l}${i.slice(-2).join(l)}`}function zS(s){return s.open?"уже открыт":s.why?s.why:s.sessions===0?"рядом с вашими проектами":`${LS(s.sessions)}${US(s.lastUsedAt)}`}function LS(s){const l=s%10,i=s%100;return i>=11&&i<=14?`${s} сессий`:l===1?`${s} сессия`:l>=2&&l<=4?`${s} сессии`:`${s} сессий`}function US(s){if(!s)return"";const l=Math.floor((Date.now()-s)/864e5);return l<=0?" · сегодня":l===1?" · вчера":l<30?` · ${l} дн. назад`:` · ${new Date(s).toLocaleDateString("ru-RU")}`}const Gh=7;function HS(s){const l=[],i=[];let r=1;for(const o of s){const d=l.slice();let h=l.indexOf(o.hash);h===-1&&(h=nb(l),l[h]=o.hash);const[g,...m]=o.parents;l[h]=g??null;const b=[];g!==void 0&&b.push({from:h,to:h});for(const _ of m){let C=l.indexOf(_);C===-1&&(C=nb(l),l[C]=_),b.push({from:h,to:C})}const x=[];for(let _=0;_<d.length;_++)d[_]===o.hash&&(x.push({from:_,to:h}),_!==h&&(l[_]=null));const k=[];for(let _=0;_<d.length;_++){const C=d[_];!C||C===o.hash||_===h||l[_]===C&&k.push(_)}BS(l),r=Math.max(r,l.length,h+1),i.push({commit:o,col:h,up:x,down:b,through:k})}return{rows:i,columns:Math.min(r,Gh)}}function nb(s){const l=s.indexOf(null);return l!==-1?l:(s.push(null),s.length-1)}function BS(s){for(;s.length>0&&s[s.length-1]===null;)s.pop()}const nx=1500;function qS(s){const l=[];let i=!1;for(const r of s.patch.split(`
|
|
120
|
-
`)){if(l.length>=nx){i=!0;break}if(r.startsWith("@@"))l.push({type:"gap",text:GS(r)});else if(r.startsWith("+"))l.push({type:"add",text:r.slice(1)});else if(r.startsWith("-"))l.push({type:"del",text:r.slice(1)});else{if(r.startsWith("\\"))continue;(r!==""||l.length>0)&&l.push({type:"ctx",text:r.startsWith(" ")?r.slice(1):r})}}return{kind:"patch",filePath:s.path||s.oldPath,rows:l,added:s.added,removed:s.removed,note:YS(s,i)}}function GS(s){const l=/^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@ ?(.*)$/.exec(s);if(!l)return s;const i=Number(l[1]),r=l[2]===void 0?1:Number(l[2]),o=(l[3]??"").trim(),d=r>1?`строки ${i}–${i+r-1}`:`строка ${i}`;return o?`⋯ ${d} · ${o}`:`⋯ ${d}`}function YS(s,l){const i=[];return s.status==="added"&&i.push("новый файл"),s.status==="deleted"&&i.push("файл удалён"),s.status==="renamed"&&i.push(`переименован из ${s.oldPath}`),s.binary?i.push("двоичный файл"):s.patch===""&&i.push("содержимое не показано"),l&&i.push(`показаны первые ${nx} строк`),i.length>0?i.join(" · "):null}function IS({open:s,state:l,result:i,selected:r,onRefresh:o,onShow:d,onCheckout:h,onClose:g,zoomed:m,onToggleZoom:b}){const x=HS((l==null?void 0:l.commits)??[]),k=[...l!=null&&l.detached?[{value:"",label:`отделён · ${l.head.slice(0,8)}`}]:[],...((l==null?void 0:l.branches)??[]).map(_=>({value:_.name,label:_.name,hint:_.hash.slice(0,8)}))];return c.jsxs("aside",{className:(s?"sidepane sidepane--git sidepane--open":"sidepane sidepane--git")+(m?" sidepane--zoomed":""),"aria-label":"История git",children:[c.jsxs("div",{className:"sidepane__head",onDoubleClick:_=>{b&&(_.target.closest("button")||b())},children:[c.jsx(ZS,{}),c.jsx("span",{className:"sidepane__title",children:"История"}),c.jsx("button",{className:"sidepane__btn",title:"Обновить","aria-label":"Обновить историю",onClick:o,children:"↻"}),b&&c.jsx("button",{className:"sidepane__btn",title:m?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":m?"Свернуть панель истории":"Развернуть панель истории на весь экран","aria-pressed":m,onClick:b,children:c.jsx(Tr,{active:m})}),c.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель истории",onClick:g,children:"✕"})]}),l===null?c.jsx("p",{className:"sidepane__empty",children:"Читаем репозиторий…"}):l.available?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"gitbar",children:[c.jsx(qs,{className:"gitbar__branch",title:"Ветка — выбрать значит переключиться",value:l.detached?"":l.branch,options:k,onChange:_=>{_&&h(_,`ветку ${_}`)}}),l.ahead>0&&c.jsxs("span",{className:"chip",title:`${l.ahead} — столько коммитов не отправлено`,children:["↑",l.ahead]}),l.behind>0&&c.jsxs("span",{className:"chip",title:`${l.behind} — столько коммитов не забрано`,children:["↓",l.behind]})]}),l.detached&&c.jsx("p",{className:"gitbar__note",children:"HEAD отделён от ветки. Выберите ветку в списке, чтобы вернуться."}),c.jsxs("div",{className:"sidepane__scroll",children:[c.jsx("button",{className:"gitrow gitrow--work"+(r===""?" is-on":""),onClick:()=>d(""),children:c.jsxs("span",{className:"gitrow__body",children:[c.jsx("span",{className:"gitrow__subject",children:l.changed.length>0?`Рабочее дерево · ${l.changed.length} ${FS(l.changed.length)}`:"Рабочее дерево чистое"}),c.jsx("span",{className:"gitrow__meta",children:l.changed.length>0?l.changed.slice(0,4).map(_=>JS(_.path)).join(", "):"незакоммиченных изменений нет"})]})}),x.rows.map(_=>c.jsx(XS,{row:_,columns:x.columns,head:_.commit.hash===l.head,local:l.hasRemote&&!_.commit.pushed,active:r===_.commit.hash,onOpen:()=>d(_.commit.hash)},_.commit.hash)),x.rows.length===0&&c.jsx("p",{className:"sidepane__empty",children:"В репозитории ещё нет коммитов"})]})]}):c.jsx("p",{className:"sidepane__empty",children:l.message||"Это не git-репозиторий"}),c.jsx(Uc,{result:i})]})}const Tc=50,lb=13;function XS({row:s,columns:l,head:i,local:r,active:o,onOpen:d}){const{commit:h}=s,g=h.refs.map(KS).filter(Boolean);return c.jsxs("button",{className:"gitrow"+(o?" is-on":""),title:r?"Коммит ещё не отправлен на удалённый репозиторий":void 0,onClick:d,children:[c.jsx(VS,{row:s,columns:l,head:i,local:r}),c.jsxs("span",{className:"gitrow__body",children:[c.jsxs("span",{className:"gitrow__subject",children:[g.map(m=>c.jsx("span",{className:"gitrow__ref",children:m},m)),h.subject]}),c.jsxs("span",{className:"gitrow__meta",children:[h.shortHash," · ",h.author," · ",WS(h.date),r&&c.jsx("span",{className:"gitrow__local",children:"· не отправлен"})]})]})]})}function VS({row:s,columns:l,head:i,local:r}){const o=l*lb+6,d=Tc/2,h=b=>8+Math.min(b,Gh-1)*lb,g=r?"3.5 2.5":void 0,m=po(s.col);return c.jsxs("svg",{className:"gitgraph",width:o,height:Tc,viewBox:`0 0 ${o} ${Tc}`,"aria-hidden":"true",children:[s.through.map(b=>c.jsx("line",{x1:h(b),y1:0,x2:h(b),y2:Tc,style:{stroke:po(b)}},`t${b}`)),s.up.map((b,x)=>c.jsx("path",{d:`M${h(b.from)} 0 L${h(b.from)} ${d-12} L${h(b.to)} ${d}`,fill:"none",style:{stroke:po(b.from),strokeDasharray:g}},`u${x}`)),s.down.map((b,x)=>c.jsx("path",{d:`M${h(b.from)} ${d} L${h(b.to)} ${d+12} L${h(b.to)} ${Tc}`,fill:"none",style:{stroke:po(b.to),strokeDasharray:g}},`d${x}`)),i&&c.jsx("circle",{className:"gitgraph__head",cx:h(s.col),cy:d,r:s.commit.parents.length>1?7.4:6.6}),c.jsx("circle",{className:"gitgraph__dot",cx:h(s.col),cy:d,r:s.commit.parents.length>1?4.6:3.6,style:{stroke:m,fill:r?void 0:m}})]})}function po(s){return`var(--lane-${s%Gh})`}function QS({detail:s,local:l,onCheckout:i,onClose:r}){const o=s.hash==="";return c.jsxs(Pl,{className:"modal--wide",title:o?"Незакоммиченные изменения":`Коммит ${s.shortHash}`,onClose:r,actions:c.jsxs(c.Fragment,{children:[!o&&c.jsx("button",{className:"btn",onClick:()=>i(s.hash,`коммит ${s.shortHash} (HEAD отделится от ветки)`),children:"Переключиться сюда"}),c.jsx("button",{className:"btn btn--primary",onClick:r,children:"Закрыть"})]}),children:[!o&&c.jsxs("div",{className:"commit__head",children:[c.jsx("p",{className:"commit__subject",children:s.subject}),c.jsxs("p",{className:"commit__meta",children:[s.author,s.email&&` <${s.email}>`," · ",PS(s.date)," ·"," ",c.jsx("span",{className:"commit__hash",children:s.hash})]}),l&&c.jsx("p",{className:"commit__meta commit__meta--local",children:"Не отправлен: этого коммита нет ни в одной удалённой ветке."}),s.parents.length>0&&c.jsxs("p",{className:"commit__meta",children:[s.parents.length>1?"слияние: ":"родитель: ",s.parents.map(d=>d.slice(0,8)).join(", ")]}),s.body&&c.jsx("pre",{className:"commit__body",children:s.body})]}),s.truncated&&c.jsx("p",{className:"modal__text",children:"Изменения слишком велики — часть патча не показана."}),s.files.length===0?c.jsx("p",{className:"modal__text",children:"Изменений нет."}):s.files.map(d=>c.jsx($S,{file:d,defaultOpen:s.files.length<=3},d.path+d.oldPath))]})}function $S({file:s,defaultOpen:l}){const[i,r]=S.useState(l);return c.jsxs("div",{className:"commit__file",children:[c.jsxs("button",{className:"commit__filehead",onClick:()=>r(o=>!o),children:[c.jsx("span",{className:"commit__filepath",children:s.path||s.oldPath}),c.jsxs("span",{className:"diff__stat",children:[s.added>0&&c.jsxs("span",{className:"diff__stat--add",children:["+",s.added]}),s.removed>0&&c.jsxs("span",{className:"diff__stat--del",children:["−",s.removed]})]}),c.jsx("span",{className:"tool__status",children:i?"▴":"▾"})]}),i&&c.jsx(Bh,{diff:qS(s)})]})}function ZS(){return c.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[c.jsx("circle",{cx:"4.5",cy:"3.5",r:"1.9"}),c.jsx("circle",{cx:"4.5",cy:"12.5",r:"1.9"}),c.jsx("circle",{cx:"11.5",cy:"8",r:"1.9"}),c.jsx("path",{d:"M4.5 5.4v5.2M6.4 3.9h2.2a1.6 1.6 0 0 1 1.6 1.6v.8"})]})}function KS(s){return s.replace(/^HEAD -> /,"").replace(/^tag: /,"⌂ ").trim()}function JS(s){const l=s.split("/");return l[l.length-1]??s}function FS(s){const l=s%100;if(l>=11&&l<=14)return"файлов";switch(s%10){case 1:return"файл";case 2:case 3:case 4:return"файла";default:return"файлов"}}function WS(s){const l=Date.parse(s);if(Number.isNaN(l))return s;const i=Math.round((Date.now()-l)/6e4);if(i<1)return"только что";if(i<60)return`${i} мин назад`;const r=Math.round(i/60);if(r<24)return`${r} ч назад`;const o=Math.round(r/24);return o<30?`${o} дн назад`:new Date(l).toLocaleDateString()}function PS(s){const l=Date.parse(s);return Number.isNaN(l)?s:new Date(l).toLocaleString()}function ek({open:s,items:l,busy:i,ready:r,commands:o,contextResult:d,models:h,model:g,effort:m,ultracode:b,thinking:x,switchOnFlag:k,onContextSearch:_,onCommand:C,onModel:N,onEffort:H,onUltracode:B,onThinking:K,onSwitchOnFlag:O,onAsk:$,onInterrupt:A,onReset:Q,onClose:L,zoomed:M,onToggleZoom:W}){return c.jsxs("aside",{className:(s?"sidepane sidepane--ask sidepane--open":"sidepane sidepane--ask")+(M?" sidepane--zoomed":""),"aria-label":"Вопрос на полях",children:[c.jsxs("div",{className:"sidepane__head",onDoubleClick:re=>{W&&(re.target.closest("button")||W())},children:[c.jsx(tk,{}),c.jsx("span",{className:"sidepane__title",children:"Вопрос на полях"}),c.jsx("button",{className:"sidepane__btn",title:"Начать заново — следующий вопрос возьмёт свежий контекст","aria-label":"Начать боковой разговор заново",disabled:l.length===0,onClick:Q,children:"↻"}),W&&c.jsx("button",{className:"sidepane__btn",title:M?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":M?"Свернуть панель вопроса":"Развернуть панель вопроса на весь экран","aria-pressed":M,onClick:W,children:c.jsx(Tr,{active:M})}),c.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель вопроса",onClick:L,children:"✕"})]}),h.length>0&&c.jsxs("div",{className:"sidepane__tools",children:[c.jsx(tx,{className:"select--compact",models:h,value:g,effort:m,ultracode:b,thinking:x,switchOnFlag:k,onModel:N,onEffort:H,onUltracode:B,onThinking:K,onSwitchOnFlag:O}),c.jsx("span",{className:"sidepane__note",title:"Боковой вопрос работает только на чтение",children:"только чтение"})]}),c.jsx(qh,{items:l,busy:i,waiting:!1,empty:r?"Спросите о том, что происходит: вопрос уйдёт в сторону от основного разговора и не попадёт в его контекст. Отвечающий видит сессию и проект, но ничего не меняет.":"Откройте сессию — вопрос задаётся о ней."}),c.jsx(Wb,{className:"composer--side",disabled:!r,busy:i,commands:o,sessionTitle:null,contextResult:d,placeholder:"Спросить, не мешая работе…",sendLabel:"Спросить",autoFocus:s,onContextSearch:_,onCommand:C,onSend:$,onInterrupt:A,onEscape:i?A:L})]})}function tk(){return c.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M13.6 9.4a1.6 1.6 0 0 1-1.6 1.6H6.2L3.2 13.4V4.2a1.6 1.6 0 0 1 1.6-1.6h7.2a1.6 1.6 0 0 1 1.6 1.6Z"}),c.jsx("path",{d:"M8.4 8.5v-.3c0-.7.9-.9.9-1.7a1 1 0 0 0-1.9-.4"})]})}const nk=75,lk=90;function lx({usage:s}){if(!(s!=null&&s.available))return null;const l=[];return s.fiveHour&&l.push({key:"five",label:"5 ч",window:s.fiveHour}),s.sevenDay&&l.push({key:"week",label:"нед",window:s.sevenDay}),l.length===0?null:c.jsx("div",{className:"usage",title:ik(s),"aria-label":`Расход лимитов плана${s.plan?` ${s.plan}`:""}`,children:l.map(i=>c.jsx(ak,{label:i.label,window:i.window},i.key))})}function ak({label:s,window:l}){const i=Math.round(l.utilization),r=rk(l.resetsAt);return c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"usage__label",children:s}),c.jsx("span",{className:"usage__track",role:"progressbar","aria-label":s,"aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:c.jsx("span",{className:`usage__fill${sk(i)}`,style:{width:`${i}%`}})}),c.jsxs("span",{className:"usage__pct",children:[i,"%"]}),c.jsx("span",{className:"usage__reset",title:ix(l.resetsAt)||void 0,children:r&&`↻ ${r}`})]})}function sk(s){return s>=lk?" usage__fill--over":s>=nk?" usage__fill--warn":""}function ik(s){const l=[s.plan?`Лимиты плана ${s.plan}`:"Лимиты плана"],i=(r,o)=>{if(!o)return;const d=ix(o.resetsAt);l.push(`${r}: ${Math.round(o.utilization)}%${d?`, ${d}`:""}`)};return i("5 часов",s.fiveHour),i("Неделя",s.sevenDay),i("Неделя, Opus",s.sevenDayOpus),l.join(`
|
|
121
|
-
`)}function ax(s){if(!s)return null;const l=new Date(s);return Number.isNaN(l.getTime())?null:l}function sx(s){return s.getTime()-Date.now()<1440*60*1e3}function rk(s){const l=ax(s);return l?sx(l)?l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):l.toLocaleDateString(void 0,{day:"numeric",month:"short"}):""}function ix(s){const l=ax(s);return l?`обнулится ${sx(l)?`в ${l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:l.toLocaleDateString(void 0,{day:"numeric",month:"long"})}`:""}function rx(){const[s,l]=S.useState(()=>new Date);return S.useEffect(()=>{let i=0;const r=()=>{const d=new Date;l(d),i=window.setTimeout(r,6e4-(d.getSeconds()*1e3+d.getMilliseconds()))};r();const o=()=>{document.hidden||(window.clearTimeout(i),r())};return document.addEventListener("visibilitychange",o),()=>{window.clearTimeout(i),document.removeEventListener("visibilitychange",o)}},[]),c.jsxs("time",{className:"clock",dateTime:s.toISOString(),title:ck(s),children:[c.jsx("span",{className:"clock__time",children:s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}),c.jsx("span",{className:"clock__date",children:s.toLocaleDateString(void 0,{weekday:"short",day:"numeric",month:"short"})})]})}function ck(s){return s.toLocaleDateString(void 0,{weekday:"long",day:"numeric",month:"long",year:"numeric"})}function uk({onClose:s,permission:l,model:i,usage:r,cwd:o,costLabel:d,onRefresh:h,refreshing:g,metersFetchedAt:m,onRename:b}){return c.jsx(Pl,{title:"Настройки сессии",className:"modal--sheet",sheet:!0,onClose:s,children:c.jsxs("div",{className:"sessionmenu",children:[l&&c.jsx(fr,{label:"Режим прав",children:l}),c.jsx(fr,{label:"Модель",children:i}),(r==null?void 0:r.available)&&(r.fiveHour||r.sevenDay)&&c.jsx(fr,{label:"Лимиты плана",children:c.jsx(lx,{usage:r})}),c.jsxs("button",{type:"button",className:g?"sessionmenu__refresh is-busy":"sessionmenu__refresh","aria-busy":g,disabled:g,onClick:h,children:[c.jsx(ok,{}),c.jsxs("span",{className:"sessionmenu__refresh-text",children:["Обновить показания",m&&c.jsxs("span",{className:"sessionmenu__refresh-time",children:["обновлено в"," ",new Date(m).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})]})]})]}),c.jsx(fr,{label:"Время",children:c.jsx(rx,{})}),d&&c.jsx(fr,{label:"Стоимость хода",children:c.jsx("span",{className:"badge badge--cost",children:d})}),o&&c.jsx(fr,{label:"Каталог проекта",children:c.jsx(ex,{path:o})}),b&&c.jsx("button",{type:"button",className:"sessionmenu__rename",onClick:b,children:"Переименовать сессию"})]})})}function fr({label:s,children:l}){return c.jsxs("div",{className:"sessionmenu__row",children:[c.jsx("span",{className:"sessionmenu__label",children:s}),l]})}function ok(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),c.jsx("path",{d:"M14 2v3.33h-3.33"})]})}function fk({tab:s,servers:l,plugins:i,marketplaces:r,catalog:o,result:d,actions:h,onTab:g,onClose:m}){const b=[{id:"mcp",label:"MCP-серверы",count:l.length},{id:"plugins",label:"Плагины",count:i.length},{id:"catalog",label:"Каталог",count:o.length}];return c.jsxs(Pl,{title:"Расширения",className:"modal--wide",onClose:m,children:[c.jsx("div",{className:"tabs",role:"tablist",children:b.map(x=>c.jsxs("button",{role:"tab","aria-selected":s===x.id,className:s===x.id?"tabs__tab is-on":"tabs__tab",onClick:()=>g(x.id),children:[x.label,c.jsx("span",{className:"tabs__count",children:x.count})]},x.id))}),s==="mcp"&&c.jsx(dk,{servers:l,actions:h}),s==="plugins"&&c.jsx(yk,{plugins:i,marketplaces:r,actions:h}),s==="catalog"&&c.jsx(bk,{catalog:o,hasMarketplaces:r.length>0,actions:h,onMarketplaces:()=>g("plugins")}),c.jsx(Uc,{result:d})]})}function dk({servers:s,actions:l}){const[i,r]=S.useState(!1);return c.jsxs(c.Fragment,{children:[s.length===0&&!i&&c.jsxs("p",{className:"modal__text",children:["Ни одного MCP-сервера. Добавленный здесь попадёт в ",c.jsx("code",{children:".mcp.json"})," ","проекта — его увидит и консольный ",c.jsx("code",{children:"claude mcp list"}),"."]}),c.jsx("ul",{className:"extlist",children:s.map(o=>c.jsxs("li",{className:"extlist__row",children:[c.jsxs("div",{className:"extlist__head",children:[c.jsx("span",{className:"extlist__name",children:o.name}),c.jsx("span",{className:`chip chip--${pk(o.status)}`,children:hk[o.status]}),o.scope&&c.jsx("span",{className:"chip",children:o.scope}),o.transport&&c.jsx("span",{className:"chip",children:o.transport})]}),o.target&&c.jsx("div",{className:"extlist__meta",title:o.target,children:o.target}),o.error&&c.jsx("div",{className:"extlist__error",children:o.error}),o.tools.length>0&&c.jsxs("div",{className:"extlist__meta",children:["Инструментов: ",o.tools.length," · ",o.tools.slice(0,6).join(", "),o.tools.length>6&&"…"]}),c.jsxs("div",{className:"extlist__actions",children:[c.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"reconnect"),children:"Переподключить"}),o.status==="disabled"?c.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"enable"),children:"Включить"}):c.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"disable"),children:"Выключить"}),o.editable&&c.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>l.mcpRemove(o.name),children:"Удалить"})]})]},o.name))}),i?c.jsx(mk,{onCancel:()=>r(!1),onSubmit:(o,d)=>{l.mcpAdd(o,d),r(!1)}}):c.jsx("div",{className:"extbar",children:c.jsx("button",{className:"btn btn--primary",onClick:()=>r(!0),children:"+ Сервер"})})]})}const hk={connected:"подключён",failed:"ошибка","needs-auth":"нужна авторизация",pending:"подключается",disabled:"выключен",unknown:"неизвестно"};function pk(s){return s==="connected"?"ok":s==="failed"?"bad":s==="needs-auth"?"warn":"mute"}function mk({onSubmit:s,onCancel:l}){const[i,r]=S.useState(""),[o,d]=S.useState("stdio"),[h,g]=S.useState(""),[m,b]=S.useState(""),[x,k]=S.useState(""),_=o==="stdio",C=i.trim()!==""&&(_?h.trim()!=="":m.trim()!=="");function N(){if(C)if(_){const[H,...B]=gk(h);s(i.trim(),{transport:"stdio",command:H??"",args:B,env:ab(x)})}else s(i.trim(),{transport:o,url:m.trim(),headers:ab(x)})}return c.jsxs("div",{className:"extform extform--card",children:[c.jsx("label",{className:"field",htmlFor:"mcp-name",children:"Имя сервера"}),c.jsx("input",{id:"mcp-name",className:"input input--mono",value:i,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"context7",onChange:H=>r(H.target.value)}),c.jsx("label",{className:"field",children:"Транспорт"}),c.jsx(qs,{title:"Транспорт",value:o,options:[{value:"stdio",label:"stdio",hint:"локальный процесс"},{value:"http",label:"http",hint:"удалённый сервер"},{value:"sse",label:"sse",hint:"удалённый, поток событий"}],onChange:H=>d(H)}),_?c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"field",htmlFor:"mcp-command",children:"Команда с аргументами"}),c.jsx("input",{id:"mcp-command",className:"input input--mono",value:h,spellCheck:!1,autoComplete:"off",placeholder:"npx -y @upstash/context7-mcp",onChange:H=>g(H.target.value)})]}):c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"field",htmlFor:"mcp-url",children:"URL"}),c.jsx("input",{id:"mcp-url",className:"input input--mono",value:m,spellCheck:!1,autoComplete:"off",placeholder:"https://mcp.example.dev/mcp",onChange:H=>b(H.target.value)})]}),c.jsxs("label",{className:"field",htmlFor:"mcp-pairs",children:[_?"Переменные окружения":"Заголовки"," — по одной на строку, необязательно"]}),c.jsx("textarea",{id:"mcp-pairs",className:"input input--mono input--area",value:x,spellCheck:!1,placeholder:_?"API_KEY=xxx":"Authorization: Bearer xxx",onChange:H=>k(H.target.value)}),c.jsxs("div",{className:"extbar",children:[c.jsx("button",{className:"btn",onClick:l,children:"Отмена"}),c.jsx("button",{className:"btn btn--primary",disabled:!C,onClick:N,children:"Подключить"})]})]})}function ab(s){const l={};for(const i of s.split(`
|
|
122
|
-
`)){const r=i.trim();if(!r)continue;const o=r.indexOf("="),d=r.indexOf(":"),h=o===-1?d:d===-1?o:Math.min(o,d);h<=0||(l[r.slice(0,h).trim()]=r.slice(h+1).trim())}return l}function gk(s){return(s.trim().match(/"[^"]*"|'[^']*'|\S+/g)??[]).map(l=>l.replace(/^["']|["']$/g,""))}function yk({plugins:s,marketplaces:l,actions:i}){const[r,o]=S.useState("");return c.jsxs(c.Fragment,{children:[s.length===0&&c.jsx("p",{className:"modal__text",children:"Ни одного установленного плагина. Что можно поставить — на вкладке «Каталог»."}),c.jsx("ul",{className:"extlist",children:s.map(d=>c.jsxs("li",{className:"extlist__row",children:[c.jsxs("div",{className:"extlist__head",children:[c.jsx("span",{className:"extlist__name",children:d.name}),c.jsx("span",{className:d.enabled?"chip chip--ok":"chip chip--mute",children:d.enabled?"включён":"выключен"}),d.version&&d.version!=="unknown"&&c.jsx("span",{className:"chip",children:d.version}),d.scope&&c.jsx("span",{className:"chip",children:d.scope})]}),d.marketplace&&c.jsx("div",{className:"extlist__meta",children:d.marketplace}),d.mcpServers.length>0&&c.jsxs("div",{className:"extlist__meta",children:["MCP-серверы: ",d.mcpServers.join(", ")]}),c.jsxs("div",{className:"extlist__actions",children:[c.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>i.pluginToggle(d.id,!d.enabled),children:d.enabled?"Выключить":"Включить"}),c.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>i.pluginUninstall(d.id),children:"Удалить"})]})]},d.id))}),c.jsx("div",{className:"sidebar__section",children:"Маркетплейсы"}),c.jsx("ul",{className:"extlist",children:l.map(d=>c.jsxs("li",{className:"extlist__row",children:[c.jsx("div",{className:"extlist__head",children:c.jsx("span",{className:"extlist__name",children:d.name})}),d.source&&c.jsx("div",{className:"extlist__meta",children:d.source}),c.jsx("div",{className:"extlist__actions",children:c.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>i.marketplaceRemove(d.name),children:"Отключить"})})]},d.name))}),c.jsxs("div",{className:"extform__row",children:[c.jsx("input",{className:"input input--mono",value:r,spellCheck:!1,autoComplete:"off","aria-label":"Источник маркетплейса",placeholder:"owner/repo, URL или путь",onChange:d=>o(d.target.value),onKeyDown:d=>{d.key!=="Enter"||r.trim()===""||(d.preventDefault(),i.marketplaceAdd(r.trim()),o(""))}}),c.jsx("button",{className:"btn",disabled:r.trim()==="",onClick:()=>{i.marketplaceAdd(r.trim()),o("")},children:"Добавить"})]})]})}const Ec=30;function bk({catalog:s,hasMarketplaces:l,actions:i,onMarketplaces:r}){const[o,d]=S.useState(""),[h,g]=S.useState(""),[m,b]=S.useState(Ec),[x,k]=S.useState(""),_=S.useMemo(()=>[...new Set(s.map(H=>H.category).filter(Boolean))].sort(),[s]),C=S.useMemo(()=>{const N=o.trim().toLowerCase();return s.filter(H=>h&&H.category!==h?!1:N?`${H.name} ${H.displayName} ${H.description} ${H.author}`.toLowerCase().includes(N):!0)},[s,o,h]);return s.length===0?c.jsxs("p",{className:"modal__text",children:[l?"Маркетплейсы подключены, но их каталог ещё не выкачан. Попробуйте открыть окно ещё раз через минуту.":"Ни одного маркетплейса — ставить нечего."," ",c.jsx("button",{className:"linkish",onClick:r,children:"Подключить маркетплейс"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"catalog__filters",children:[c.jsx("input",{className:"input",value:o,spellCheck:!1,autoComplete:"off","aria-label":"Поиск по каталогу",placeholder:"Поиск: имя, описание, автор",onChange:N=>{d(N.target.value),b(Ec)}}),c.jsx(qs,{title:"Категория",value:h,options:[{value:"",label:"все категории"},..._.map(N=>({value:N,label:N}))],onChange:N=>{g(N),b(Ec)}})]}),C.length===0?c.jsx("p",{className:"modal__text",children:"Ничего не нашлось."}):c.jsx("ul",{className:"extlist",children:C.slice(0,m).map(N=>c.jsxs("li",{className:"extlist__row",children:[c.jsxs("div",{className:"extlist__head",children:[c.jsx("span",{className:"extlist__name",children:N.name}),N.installed&&c.jsx("span",{className:"chip chip--ok",children:"установлен"}),N.version&&c.jsx("span",{className:"chip",children:N.version}),N.category&&c.jsx("span",{className:"chip",children:N.category})]}),N.description&&c.jsx("div",{className:"catalog__desc",children:N.description}),c.jsxs("div",{className:"extlist__meta",children:[N.author&&`${N.author} · `,N.marketplace]}),c.jsxs("div",{className:"extlist__actions",children:[c.jsx("button",{className:"btn btn--ghost btn--sm",disabled:N.installed,onClick:()=>i.pluginInstall(N.id),children:N.installed?"Уже стоит":"Установить"}),N.homepage&&c.jsx("a",{className:"btn btn--ghost btn--sm",href:N.homepage,target:"_blank",rel:"noreferrer",children:"Страница"})]})]},N.id))}),C.length>m&&c.jsx("div",{className:"extbar",children:c.jsxs("button",{className:"btn",onClick:()=>b(N=>N+Ec),children:["Ещё ",Math.min(Ec,C.length-m)," из ",C.length-m]})}),c.jsxs("div",{className:"extform",children:[c.jsx("label",{className:"field",htmlFor:"plugin-spec",children:"Или установить по имени — если нужного в каталоге нет"}),c.jsxs("div",{className:"extform__row",children:[c.jsx("input",{id:"plugin-spec",className:"input input--mono",value:x,spellCheck:!1,autoComplete:"off",placeholder:"имя или имя@маркетплейс",onChange:N=>k(N.target.value),onKeyDown:N=>{N.key!=="Enter"||x.trim()===""||(N.preventDefault(),i.pluginInstall(x.trim()),k(""))}}),c.jsx("button",{className:"btn",disabled:x.trim()==="",onClick:()=>{i.pluginInstall(x.trim()),k("")},children:"Установить"})]})]})]})}function xk({status:s,login:l,actions:i,runningSessions:r,onReconnect:o,reconnectBlocked:d,reconnectHint:h,onClose:g}){const[m,b]=S.useState(""),[x,k]=S.useState(!1),[_,C]=S.useState(!1),N=o!==null&&(s==null?void 0:s.loggedIn)===!0&&!_&&!x,H=S.useMemo(()=>{if(l.error)return{ok:!1,message:l.error};const O=l.output.trim();return O===""?null:{ok:!0,message:O}},[l.error,l.output]);function B(){m.trim()!==""&&(i.submitCode(m.trim()),b(""))}function K(){if(r>0){k(!1),C(!0);return}i.login("claudeai",!0)}return c.jsxs(Pl,{title:"Аккаунт",onClose:g,children:[s===null?c.jsx("p",{className:"modal__text",children:"Спрашиваем у хоста…"}):s.loggedIn?c.jsxs("div",{className:"account",children:[c.jsx("div",{className:"account__id",children:s.email||"Вход выполнен"}),c.jsxs("div",{className:"account__chips",children:[c.jsx("span",{className:"chip chip--ok",children:Sk[s.method]??s.method}),s.plan&&c.jsx("span",{className:"chip",children:s.plan})]}),s.organization&&c.jsx("div",{className:"extlist__meta",children:s.organization})]}):c.jsxs("p",{className:"modal__text",children:["Вход не выполнен. Сессии не запустятся, пока аккаунт не подключён — или пока в окружении хоста нет ",c.jsx("code",{children:"ANTHROPIC_API_KEY"}),"."]}),l.active?c.jsx(kk,{login:l,code:m,onCode:b,onSubmit:B,onCancel:i.cancel}):c.jsxs(c.Fragment,{children:[c.jsx(Uc,{result:H}),_&&c.jsx("p",{className:"account__warn",role:"alert",children:_k(r)}),N&&d&&c.jsx("p",{className:"account__note",children:h}),c.jsx("div",{className:`extbar${s!=null&&s.loggedIn?" account__bar":""}`,children:s!=null&&s.loggedIn?c.jsxs(c.Fragment,{children:[N&&c.jsxs("button",{type:"button",className:"btn account__relink",title:`Переподключить сессию
|
|
123
|
-
${h}`,"aria-label":"Переподключить сессию",disabled:d,onClick:o,children:[c.jsx(vk,{}),"Переподключить"]}),_?c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>C(!1),children:"Отмена"}),c.jsx("button",{className:"btn btn--warn",autoFocus:!0,onClick:()=>{C(!1),i.login("claudeai",!0)},children:"Всё равно сменить"})]}):c.jsx("button",{className:"btn",onClick:K,children:"Сменить аккаунт"}),x?c.jsx("button",{className:"btn btn--danger",autoFocus:!0,onClick:()=>{k(!1),i.logout()},children:"Точно выйти?"}):c.jsx("button",{className:"btn",onClick:()=>{C(!1),k(!0)},children:"Выйти"})]}):c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>i.login("console",!1),children:"Через Console"}),c.jsx("button",{className:"btn btn--primary",onClick:()=>i.login("claudeai",!1),children:"Войти"})]})})]})]})}function _k(s){const l=s%10,i=s%100,r=l===1&&i!==11,o=r?"сессия":l>=2&&l<=4&&(i<12||i>14)?"сессии":"сессий";return`${s} ${o} сейчас ${r?"работает":"работают"} — смена аккаунта может ${r?"её":"их"} прервать.`}function vk(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),c.jsx("path",{d:"M14 2v3.33h-3.33"})]})}const Sk={"claude.ai":"подписка Claude",console:"Anthropic Console",apiKey:"API-ключ",none:"нет"};function kk({login:s,code:l,onCode:i,onSubmit:r,onCancel:o}){return c.jsxs("div",{className:"account__flow",children:[s.url?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"field",children:"Откройте ссылку и подтвердите вход"}),c.jsx("a",{className:"account__link",href:s.url,target:"_blank",rel:"noreferrer",children:s.url})]}):c.jsx("p",{className:"modal__text",children:"Запускаем вход…"}),s.awaitingCode&&c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"field",htmlFor:"auth-code",children:"Код со страницы авторизации"}),c.jsxs("div",{className:"extform__row",children:[c.jsx("input",{id:"auth-code",className:"input input--mono",value:l,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"вставьте код",onChange:d=>i(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),r())}}),c.jsx("button",{className:"btn btn--primary",disabled:l.trim()==="",onClick:r,children:"Готово"})]})]}),s.output.trim()!==""&&c.jsx("pre",{className:"account__log",children:s.output.trim()}),c.jsx("div",{className:"extbar",children:c.jsx("button",{className:"btn",onClick:o,children:"Отменить вход"})})]})}function wk({state:s,onPair:l,onUnpair:i,onClose:r}){const[o,d]=S.useState(""),[h,g]=S.useState(""),[m,b]=S.useState(!1),x=S.useRef(null),k=(s==null?void 0:s.paired)===!0;S.useEffect(()=>{var C;k||(C=x.current)==null||C.focus()},[k]),S.useEffect(()=>{b(!1),k&&d("")},[k,s==null?void 0:s.error]);const _=(s==null?void 0:s.url)??"https://claudevisual.com";return c.jsx(Pl,{title:"Удалённый доступ",onClose:r,children:k?c.jsxs("div",{className:"relay",children:[c.jsxs("p",{className:"relay__lede",children:["Компьютер связан с аккаунтом на ",c.jsx("b",{children:sb(_)}),". Открывайте его оттуда с любого устройства — с телефона в том числе."]}),c.jsxs("dl",{className:"relay__facts",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Имя"}),c.jsx("dd",{children:(s==null?void 0:s.name)??"—"})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Связь"}),c.jsxs("dd",{children:[c.jsx("span",{className:s!=null&&s.connected?"dot dot--on":"dot"})," ",s!=null&&s.connected?"на связи":"нет связи, пробуем переподключиться"]})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Подключено"}),c.jsxs("dd",{children:[(s==null?void 0:s.clients)??0," вкладок"]})]})]}),(s==null?void 0:s.error)&&c.jsx("p",{className:"relay__error",children:s.error}),c.jsx("p",{className:"relay__note",children:"Терминал с удалённых устройств настраивается в настройках приложения, раздел «Терминал»."}),c.jsx("p",{className:"relay__note",children:"Отвязка гасит токен этой машины: чтобы вернуть доступ, понадобится новый код. Сессии Claude Code это не трогает."}),c.jsx("button",{className:"btn btn--danger",onClick:i,children:"Отвязать компьютер"})]}):c.jsxs("div",{className:"relay",children:[c.jsx("p",{className:"relay__lede",children:"Чтобы работать с этим компьютером из браузера и с телефона, свяжите его с аккаунтом."}),c.jsxs("ol",{className:"relay__steps",children:[c.jsxs("li",{children:["Откройте ",c.jsx("b",{children:sb(_)})," и войдите (или зарегистрируйтесь)."]}),c.jsxs("li",{children:["Нажмите ",c.jsx("b",{children:"«Подключить ПК»"})," — появится код из восьми знаков."]}),c.jsx("li",{children:"Введите его сюда."})]}),c.jsxs("form",{className:"relay__form",onSubmit:C=>{C.preventDefault(),o.trim()&&(b(!0),l(o.trim(),h.trim()))},children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Код сопряжения"}),c.jsx("input",{ref:x,className:"input relay__code",value:o,onChange:C=>d(C.target.value.toUpperCase()),placeholder:"XXXX-XXXX",autoComplete:"off",spellCheck:!1,maxLength:12})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Как назвать этот компьютер"}),c.jsx("input",{className:"input",value:h,onChange:C=>g(C.target.value),placeholder:"имя машины",autoComplete:"off",maxLength:64})]}),(s==null?void 0:s.error)&&c.jsx("p",{className:"relay__error",children:s.error}),c.jsx("button",{className:"btn btn--primary",type:"submit",disabled:!o.trim()||m,children:m?"Связываем…":"Связать"})]})]})})}function sb(s){try{return new URL(s).host}catch{return s}}const uh="",jk=[{value:"opus",label:"Opus",hint:"полный список моделей виден, когда открыта сессия"},{value:"sonnet",label:"Sonnet",hint:"полный список моделей виден, когда открыта сессия"},{value:"haiku",label:"Haiku",hint:"полный список моделей виден, когда открыта сессия"}],Nk=xb.map(s=>({value:s.value,label:s.value,hint:s.hint})),mo=3600*1e3,Tk=[{value:"6h",label:"6 часов"},{value:"24h",label:"Сутки"},{value:"48h",label:"Двое суток"},{value:"168h",label:"Неделя"},{value:"never",label:"Никогда"}],hr={"6h":6*mo,"24h":24*mo,"48h":48*mo,"168h":168*mo,never:0};function Ek(s){return hr[s]??hr["48h"]}function Ak(s){const l=Object.entries(hr).find(([,i])=>i===s);return l?l[0]:Object.keys(hr).reduce((i,r)=>Math.abs(hr[r]-s)<Math.abs(hr[i]-s)?r:i)}const Ck=[{value:"off",label:"Выключено"},{value:"500",label:"0.5 с"},{value:"1500",label:"1.5 с"},{value:"3000",label:"3 с"},{value:"10000",label:"10 с"}],pr={off:0,500:500,1500:1500,3e3:3e3,1e4:1e4};function Rk(s){return pr[s]??pr.off}function Mk(s){const l=Object.entries(pr).find(([,i])=>i===s);return l?l[0]:Object.keys(pr).reduce((i,r)=>Math.abs(pr[r]-s)<Math.abs(pr[i]-s)?r:i)}const Ok=[{value:"project",title:"Только текущий проект",description:"Агент молча пишет файлы в открытом проекте и в ~/.claude — настройках самого Claude Code. Чужой проект и любая новая папка — только с явного разрешения."},{value:"projects",title:"Папка с проектами",description:"То же плюс каталог, где лежат открытые проекты, — то есть и соседний проект тоже. Всё остальное — с разрешения."},{value:"all",title:"Все папки на компьютере",description:"Агент пишет файлы куда угодно на диске — вопросов про место записи не будет.",risky:!0}];function Dk({settings:s,models:l,relayState:i,local:r,onChange:o,onEnableShell:d,onDisableShell:h,onOpenRelay:g,onClose:m}){const b=s===null,x=!b&&s.terminalEnabled===!0,k=!x,_=S.useMemo(()=>{const N=[{value:uh,label:"Как в Claude Code",hint:"модель определят настройки самого Claude Code"},...l.length>0?l.map(H=>({value:H.value,label:H.displayName,hint:H.description})):jk];return s&&s.startModel!==null&&!N.some(H=>H.value===s.startModel)&&N.push({value:s.startModel,label:s.startModel}),N},[l,s]);function C(){var N,H;return(i==null?void 0:i.paired)!==!0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"settings__hint",children:"Компьютер не связан с аккаунтом — включать удалённый доступ пока не к чему: без пары ни телефон, ни другое устройство этот компьютер вообще не видят."}),c.jsx("button",{type:"button",className:"btn",disabled:k,onClick:g,children:"Связать компьютер"})]}):(N=i.shell)!=null&&N.enabled?c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"settings__hint",children:["Разрешён: с телефона и любого другого устройства этого аккаунта можно открыть терминал и выполнить на этом компьютере что угодно — как если бы сидели за ним.",i.shell.confirmedAt&&` Включено ${new Date(i.shell.confirmedAt).toLocaleString()}.`]}),c.jsx("button",{type:"button",className:"btn btn--danger",disabled:k,onClick:h,children:"Запретить"})]}):(H=i.shell)!=null&&H.pending?c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"settings__hint",children:["Письмо ушло на ",c.jsx("b",{children:i.shell.email}),". Перейдите по ссылке из него — терминал заработает удалённо."]}),c.jsx("p",{className:"settings__hint",children:"Повторная отправка ограничена раз в минуту — если жали кнопку только что, письмо не придёт и от повторного нажатия тоже. Если сейчас доберётесь до самого компьютера, там разрешение включится сразу, без письма."}),c.jsx("button",{type:"button",className:"btn",disabled:k,onClick:d,children:"Отправить письмо ещё раз"})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"settings__hint",children:"Сейчас с телефона можно смотреть разговоры и файлы, но не запускать команды. Разрешение даёт полный доступ к терминалу этого компьютера: с телефона станет можно выполнить любую команду, как в обычной консоли за этой машиной."}),r?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"settings__hint",children:"Включится сразу — вы уже за этим компьютером, подтверждать доступ к нему нечем и незачем."}),c.jsx("button",{type:"button",className:"btn",disabled:k,onClick:d,children:"Разрешить с телефона"})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"settings__hint",children:"Отсюда мгновенно не включится: на почту аккаунта уйдёт письмо, и терминал заработает только после перехода по ссылке из него."}),c.jsx("button",{type:"button",className:"btn",disabled:k,onClick:d,children:"Прислать письмо"})]})]})}return c.jsx(Pl,{title:"Настройки",onClose:m,children:c.jsxs("div",{className:"settings",children:[c.jsxs("section",{className:"settings__section",children:[c.jsx("h3",{className:"settings__heading",children:"Архивация молчащих сессий"}),c.jsx("p",{className:"settings__hint",children:"Сессия, к которой долго не возвращались, сама уезжает в архив — на диске ничего не удаляется, транскрипт остаётся, и её можно вернуть обратно в любой момент."}),b?c.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):c.jsx(qs,{className:"settings__select",value:Ak(s.autoArchiveAfterMs),options:Tk,onChange:N=>o({autoArchiveAfterMs:Ek(N)}),ariaLabel:"Через сколько молчащая сессия уезжает в архив"})]}),c.jsxs("section",{className:"settings__section",children:[c.jsx("h3",{className:"settings__heading",children:"Автосохранение"}),c.jsx("p",{className:"settings__hint",children:"Открытый файл сам уезжает на диск, если немного постоять без ввода — ручное сохранение, кнопкой или Ctrl+S, при этом всегда работает как обычно, независимо от этой настройки."}),b?c.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):c.jsx(qs,{className:"settings__select",value:Mk(s.autoSaveAfterPauseMs),options:Ck,onChange:N=>o({autoSaveAfterPauseMs:Rk(N)}),ariaLabel:"Пауза перед автосохранением открытого файла"})]}),c.jsxs("section",{className:"settings__section",children:[c.jsx("h3",{className:"settings__heading",children:"Старт новой сессии"}),c.jsx("p",{className:"settings__hint",children:"Модель и режим прав, с которыми поднимается новая сессия. Уже открытую это не меняет — у неё свои переключатели в шапке."}),c.jsxs("div",{className:"settings__field",children:[c.jsx("span",{className:"settings__field-label",children:"Модель"}),b?c.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):c.jsx(qs,{className:"settings__select",value:s.startModel??uh,options:_,onChange:N=>o({startModel:N===uh?null:N}),ariaLabel:"Модель, с которой поднимается новая сессия"})]}),c.jsxs("div",{className:"settings__field",children:[c.jsx("span",{className:"settings__field-label",children:"Режим прав при старте"}),b?c.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):c.jsx(qs,{className:"settings__select",value:s.startPermissionMode,options:Nk,onChange:N=>o({startPermissionMode:N}),ariaLabel:"Режим прав, с которым поднимается новая сессия"})]})]}),c.jsxs("section",{className:"settings__section",children:[c.jsx("h3",{className:"settings__heading",children:"Доступ к папкам"}),c.jsx("p",{className:"settings__hint",children:"Это про то, где агент пишет файлы (Write, Edit, NotebookEdit), не спрашивая разрешения, — не про чтение: читает он в любом случае. Ничего не запрещается наглухо — выход за выбранную границу просто превращается в обычный запрос прав, который остаётся подтвердить или отклонить."}),c.jsx("div",{className:"access",role:"radiogroup","aria-label":"Доступ к папкам",children:Ok.map(N=>{const H=!b&&s.folderAccess===N.value;return c.jsxs("button",{type:"button",role:"radio","aria-checked":H,disabled:b,className:"access__card"+(H?" is-on":"")+(N.risky?" access__card--risky":""),onClick:()=>o({folderAccess:N.value}),children:[c.jsx("span",{className:"access__radio","aria-hidden":"true"}),c.jsxs("span",{className:"access__body",children:[c.jsxs("span",{className:"access__title",children:[N.title,N.risky&&c.jsx("span",{className:"access__risk",children:"самое широкое"})]}),c.jsx("span",{className:"access__desc",children:N.description})]})]},N.value)})})]}),c.jsxs("section",{className:"settings__section",children:[c.jsxs("div",{className:"settings__switch-row",children:[c.jsxs("div",{className:"settings__switch-copy",children:[c.jsx("h3",{className:"settings__heading",children:"Терминал"}),c.jsx("p",{className:"settings__hint",children:"Панель терминала под лентой разговора: команда, которую там набрали, выполняется прямо на этом компьютере с правами вашего пользователя — не в песочнице агента, как Bash-инструмент в разговоре. Выключите — и все открытые вкладки терминала закроются, а процессы в них не переживут закрытия."})]}),b?c.jsx("div",{className:"settings__switch-skeleton","aria-hidden":"true"}):c.jsx("button",{type:"button",role:"switch","aria-checked":x,"aria-label":"Терминал",className:x?"switch is-on":"switch",onClick:()=>o({terminalEnabled:!x}),children:c.jsx("span",{className:"switch__knob"})})]}),c.jsxs("div",{className:"settings__nested"+(k?" is-disabled":""),children:[c.jsx("h4",{className:"settings__nested-heading",children:"Удалённый доступ к терминалу"}),b?c.jsx("p",{className:"settings__hint",children:"Загрузка…"}):c.jsxs(c.Fragment,{children:[k&&c.jsx("p",{className:"settings__hint",children:"Сначала включите терминал выше — удалённый доступ выдаётся к тому, что на этой машине уже разрешено, а не поверх выключенного рубильника."}),C()]})]})]})]})})}const zk=16;function Lk({pane:s,width:l,onResize:i,onReset:r}){const o=Si[s],d=S.useRef(null);function h(x){if(x.button!==0)return;const k=document.querySelector(".main"),_=k?Math.max(0,k.getBoundingClientRect().width-J0):0;d.current={x:x.clientX,width:l,max:Math.min(o.max,l+_)},x.currentTarget.setPointerCapture(x.pointerId),document.body.classList.add("is-resizing"),x.preventDefault()}function g(x){const k=d.current;if(!k)return;const _=o.side==="left"?x.clientX-k.x:k.x-x.clientX;i(Math.min(k.max,k.width+_))}function m(x){d.current&&(d.current=null,x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),document.body.classList.remove("is-resizing"))}function b(x){const k=x.key==="ArrowRight"?1:x.key==="ArrowLeft"?-1:0;k!==0&&(x.preventDefault(),i(l+k*zk*(o.side==="left"?1:-1)))}return c.jsx("div",{className:`pane-resizer pane-resizer--${s} pane-resizer--${o.side}`,role:"separator","aria-orientation":"vertical","aria-label":`Ширина панели ${o.label}`,"aria-valuenow":l,"aria-valuemin":o.min,"aria-valuemax":o.max,tabIndex:0,title:"Потяните, чтобы изменить ширину; двойной щелчок — ширина по умолчанию",onPointerDown:h,onPointerMove:g,onPointerUp:m,onPointerCancel:m,onDoubleClick:r,onKeyDown:b,children:c.jsx("span",{className:"pane-resizer__line","aria-hidden":"true"})})}const Uk=16;function Hk({height:s,onResize:l,onReset:i}){const r=S.useRef(null);function o(){const b=document.querySelector(".main .transcript, .main .editor");if(!b)return 1/0;const x=b.getBoundingClientRect().height-e_;return Math.round(s+Math.max(0,x))}function d(b){b.button===0&&(r.current={y:b.clientY,height:s,max:o()},b.currentTarget.setPointerCapture(b.pointerId),document.body.classList.add("is-resizing-row"),b.preventDefault())}function h(b){const x=r.current;if(!x)return;const k=x.y-b.clientY;l(x.height+k,x.max)}function g(b){r.current&&(r.current=null,b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId),document.body.classList.remove("is-resizing-row"))}function m(b){const x=b.key==="ArrowUp"?1:b.key==="ArrowDown"?-1:0;x!==0&&(b.preventDefault(),l(s+x*Uk,o()))}return c.jsx("div",{className:"term-resizer",role:"separator","aria-orientation":"horizontal","aria-label":"Высота панели терминала","aria-valuenow":s,"aria-valuemin":Sb,tabIndex:0,title:"Потяните, чтобы изменить высоту; двойной щелчок — высота по умолчанию",onPointerDown:d,onPointerMove:h,onPointerUp:g,onPointerCancel:g,onDoubleClick:i,onKeyDown:m,children:c.jsx("span",{className:"term-resizer__line","aria-hidden":"true"})})}function ib(){const s=document.documentElement,l=getComputedStyle(s),i=O=>l.getPropertyValue(O).trim(),r=i("--surface"),o=i("--text"),d=i("--text-2"),h=i("--muted"),g=i("--accent"),m=i("--accent-fg"),b=i("--select"),x=i("--danger"),k=i("--ok"),_=i("--warn"),C=i("--cm-fn"),N=i("--cm-key"),H=i("--cm-type"),B=rb(o,r,55),K=O=>rb(O,"#ffffff",25);return{background:r,foreground:o,cursor:g,cursorAccent:m,selectionBackground:b,black:B,brightBlack:h,red:x,brightRed:K(x),green:k,brightGreen:K(k),yellow:_,brightYellow:K(_),blue:C,brightBlue:K(C),magenta:N,brightMagenta:K(N),cyan:H,brightCyan:K(H),white:d,brightWhite:o}}function Bk(){return getComputedStyle(document.documentElement).getPropertyValue("--mono").trim()}let ga=null;function qk(s){return ga||(ga=document.createElement("span"),ga.style.position="fixed",ga.style.width="0",ga.style.height="0",ga.style.opacity="0",ga.style.pointerEvents="none",document.body.appendChild(ga)),ga.style.color=s,getComputedStyle(ga).color}function rb(s,l,i){return qk(`color-mix(in srgb, ${s} ${100-i}%, ${l} ${i}%)`)}let go=null;function Gk(){return go||(go=Promise.all([Xe(()=>import("./xterm-D6Mng-DB.js").then(s=>s.x),__vite__mapDeps([22,23]),import.meta.url),Xe(()=>import("./addon-fit-CevVMrUA.js").then(s=>s.a),__vite__mapDeps([24,23]),import.meta.url),Xe(()=>import("./addon-web-links-CnB65OV_.js").then(s=>s.a),__vite__mapDeps([25,23]),import.meta.url),Xe(()=>Promise.resolve({}),__vite__mapDeps([26]),import.meta.url)]).then(([s,l,i])=>({Terminal:s.Terminal,FitAddon:l.FitAddon,WebLinksAddon:i.WebLinksAddon})).catch(s=>{throw go=null,s})),go}function Yk({terminals:s,activeId:l,blocked:i,height:r,offset:o,mobile:d=!1,zoomed:h,onToggleZoom:g,onSelect:m,onOpen:b,onClose:x,onInput:k,onResize:_,onAttach:C,onHide:N,registerSink:H}){const[B,K]=S.useState(()=>ib());return S.useEffect(()=>{const O=new MutationObserver(()=>K(ib()));return O.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>O.disconnect()},[]),c.jsxs("div",{className:"termpanel"+(d?" termpanel--mobile":"")+(!d&&h?" termpanel--zoomed":""),style:d?{height:r,top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0}:h?void 0:{height:r},children:[c.jsxs("div",{className:"termpanel__tabbar",onDoubleClick:O=>{g&&(O.target.closest("button")||g())},children:[c.jsx("div",{className:"termpanel__tabs",role:"tablist","aria-label":"Открытые терминалы",children:s.map(O=>c.jsxs("div",{role:"tab","aria-selected":O.id===l,className:"termtab"+(O.id===l?" is-on":"")+(O.exitCode!==null?" termtab--exited":""),onDoubleClick:$=>{g&&($.target.closest(".termtab__close")||g())},children:[c.jsx("button",{className:"termtab__name",title:O.cwd,onClick:()=>m(O.id),children:O.title}),O.exitCode!==null&&c.jsx("span",{className:"termtab__code",title:`Оболочка завершилась с кодом ${O.exitCode}`,children:O.exitCode}),c.jsx("button",{className:"termtab__close",title:"Закрыть терминал","aria-label":`Закрыть терминал «${O.title}»`,onClick:()=>x(O.id),children:"✕"})]},O.id))}),c.jsx("button",{className:"termpanel__add",title:"Новый терминал","aria-label":"Новый терминал",disabled:i,onClick:b,children:"+"}),c.jsx("div",{className:"termpanel__spacer"}),g&&c.jsx("button",{className:"termpanel__zoom",title:h?"Свернуть терминал — то же самое, что двойной клик по вкладке":"Развернуть терминал на весь экран — то же самое, что двойной клик по вкладке","aria-label":h?"Свернуть терминал":"Развернуть терминал на весь экран","aria-pressed":h,onClick:g,children:c.jsx(Tr,{active:h})}),c.jsx("button",{className:"termpanel__hide",title:"Скрыть панель","aria-label":"Скрыть панель терминала",onClick:N,children:"✕"})]}),c.jsxs("div",{className:"termpanel__body",children:[i?c.jsxs("div",{className:"termpanel__empty",children:[c.jsx("p",{children:"Терминал с удалённых устройств выключен"}),c.jsx("p",{className:"termpanel__hint",children:"Откройте «Удалённый доступ» → «Прислать письмо»: на почту аккаунта придёт ссылка, и после перехода по ней терминал заработает прямо здесь. Если сейчас доберётесь до самого компьютера — там разрешение включается сразу, без письма."})]}):s.length===0&&c.jsxs("div",{className:"termpanel__empty",children:[c.jsx("p",{children:"Терминалов не открыто"}),c.jsx("button",{className:"btn btn--primary",onClick:b,children:"Открыть терминал"})]}),s.map(O=>c.jsx(Ik,{id:O.id,exitCode:O.exitCode,active:O.id===l,theme:B,mobile:d,onInput:k,onResize:_,onAttach:C,registerSink:H},O.id))]})]})}function Ik({id:s,exitCode:l,active:i,theme:r,mobile:o,onInput:d,onResize:h,onAttach:g,registerSink:m}){const b=S.useRef(null),x=S.useRef(null),k=S.useRef(!1),_=S.useRef(o);_.current=o;const C=S.useRef(r),N=S.useRef(l),[H,B]=S.useState("loading"),[K,O]=S.useState(!1);return S.useEffect(()=>{if(!b.current)return;let A=!1,Q=null;B("loading"),O(!1);const L=window.setTimeout(()=>{A||O(!0)},200);return(async()=>{let M;try{M=await Gk()}catch{window.clearTimeout(L),A||B("error");return}if(A||!b.current)return;window.clearTimeout(L);const{Terminal:W,FitAddon:re,WebLinksAddon:he}=M,F=new W({fontFamily:Bk()||"monospace",fontSize:13,lineHeight:1.2,cursorBlink:!0,cursorStyle:"bar",scrollback:5e3,theme:C.current}),ae=new re;F.loadAddon(ae),F.loadAddon(new he),F.open(b.current),x.current=F,F.attachCustomKeyEventHandler(xe=>{if(xe.type!=="keydown"||!(xe.ctrlKey||xe.metaKey))return!0;if(xe.key==="`")return!1;if(xe.key==="c"||xe.key==="C"){const j=F.getSelection();return j?(navigator.clipboard.writeText(j),!1):!xe.shiftKey}return xe.shiftKey&&(xe.key==="v"||xe.key==="V")?(navigator.clipboard.readText().then(j=>{j&&F.paste(j)}),!1):!0});const me=F.onData(xe=>d(s,xe));let Ne={cols:F.cols,rows:F.rows},pe=null;const z=F.onResize(({cols:xe,rows:we})=>{pe!==null&&window.clearTimeout(pe),pe=window.setTimeout(()=>{pe=null,!(xe===Ne.cols&&we===Ne.rows)&&(Ne={cols:xe,rows:we},h(s,xe,we))},100)}),P=new ResizeObserver(()=>{try{ae.fit()}catch{return}_.current&&F.scrollToBottom()});P.observe(b.current);const te=m(s,xe=>{xe.kind==="buffer"&&F.reset(),F.write(xe.data)});g(s),N.current!==null&&!k.current&&(k.current=!0,F.write(`\r
|
|
124
|
-
\x1B[2m— Процесс завершён (код ${N.current}) —\x1B[0m\r
|
|
125
|
-
`)),i&&F.focus(),Q=()=>{pe!==null&&window.clearTimeout(pe),P.disconnect(),me.dispose(),z.dispose(),te(),F.dispose(),x.current=null},B("ready")})(),()=>{A=!0,window.clearTimeout(L),Q==null||Q(),Q=null}},[s]),S.useEffect(()=>{if(!o)return;const $=b.current;if(!$)return;let A=null,Q=0,L=!1;const M=F=>{F.pointerType==="mouse"||A!==null||(A=F.pointerId,Q=F.clientY,L=!1)},W=F=>{if(F.pointerId!==A)return;const ae=Q-F.clientY;if(!L){if(Math.abs(ae)<4)return;L=!0,$.setPointerCapture(F.pointerId)}Q=F.clientY;const me=$.querySelector(".xterm-viewport");me&&(me.scrollTop+=ae)},re=F=>{F.pointerId===A&&($.hasPointerCapture(F.pointerId)&&$.releasePointerCapture(F.pointerId),A=null,L=!1)},he=F=>F.stopPropagation();return $.addEventListener("pointerdown",M),$.addEventListener("pointermove",W),$.addEventListener("pointerup",re),$.addEventListener("pointercancel",re),$.addEventListener("touchmove",he,{capture:!0}),()=>{$.removeEventListener("pointerdown",M),$.removeEventListener("pointermove",W),$.removeEventListener("pointerup",re),$.removeEventListener("pointercancel",re),$.removeEventListener("touchmove",he,{capture:!0}),A!==null&&$.hasPointerCapture(A)&&$.releasePointerCapture(A)}},[o]),S.useEffect(()=>{C.current=r,x.current&&(x.current.options.theme=r)},[r]),S.useEffect(()=>{var $;i&&(($=x.current)==null||$.focus())},[i]),S.useEffect(()=>{if(N.current=l,l===null){k.current=!1;return}if(k.current)return;const $=x.current;$&&(k.current=!0,$.write(`\r
|
|
126
|
-
\x1B[2m— Процесс завершён (код ${l}) —\x1B[0m\r
|
|
127
|
-
`))},[l]),c.jsxs("div",{className:"termview"+(i?" is-active":""),children:[c.jsx("div",{ref:b,className:"termview__surface"+(H==="ready"?"":" is-hidden")}),H==="loading"&&K&&c.jsxs("div",{className:"termview__state work",role:"status",children:[c.jsxs("div",{className:"work__dots",children:[c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"})]}),c.jsx("span",{className:"work__label",children:"Загружается терминал…"})]}),H==="error"&&c.jsxs("div",{className:"termview__state termview__state--error",role:"alert",children:[c.jsx("p",{children:"Не удалось загрузить терминал"}),c.jsx("p",{className:"termpanel__hint",children:"Соединение оборвалось раньше, чем приехал нужный модуль — на мобильном relay это обычное дело на слабой сети. Ниже — перезагрузка страницы, а не тихий повтор: открытые терминалы и их содержимое приедут обратно с хоста, а вот черновик в поле ввода внизу — нет."}),c.jsx("button",{className:"btn btn--primary",onClick:()=>window.location.reload(),children:"Перезагрузить страницу"})]})]})}const Xk=2e5,Vk=75,Qk=90;function $k({tokens:s,maxTokens:l,fetchedAt:i}){if(s===null)return null;const r=l??Xk,o=Math.min(100,Math.round(s/r*100)),d=`${s.toLocaleString()} из ${r.toLocaleString()} токенов${i?`
|
|
128
|
-
обновлено в ${new Date(i).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:""}`;return c.jsxs("div",{className:"contextbar","aria-label":`Занято контекста: ${o}%`,title:d,children:[c.jsx("span",{className:"contextbar__label",children:"контекст"}),c.jsx("span",{className:"contextbar__track",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,children:c.jsx("span",{className:`contextbar__fill${Zk(o)}`,style:{width:`${o}%`}})}),c.jsxs("span",{className:"contextbar__pct",children:[o,"%"]})]})}function Zk(s){return s>=Qk?" contextbar__fill--over":s>=Vk?" contextbar__fill--warn":""}const cx="ccv:last-session",Kk=300*1e3,Jk=1e4;function Fk(){try{const s=localStorage.getItem(cx);if(!s)return null;const l=JSON.parse(s);if(typeof l!="object"||l===null)return null;const{workspaceId:i,sessionId:r,claudeSessionId:o}=l;return typeof i!="string"||typeof r!="string"?null:{workspaceId:i,sessionId:r,claudeSessionId:typeof o=="string"?o:null}}catch{return null}}function Wk(s,l){return s.id===l.sessionId?!0:l.claudeSessionId?s.id===l.claudeSessionId||s.claudeSessionId===l.claudeSessionId:!1}const Pk={mcp:"mcp",plugins:"plugins",plugin:"plugins"},cb=[{name:"login",description:"Войти в аккаунт Claude — окно приложения",argumentHint:"",aliases:["signin","вход"]},{name:"switch-account",description:"Сменить аккаунт: выйти и войти заново",argumentHint:"",aliases:["account","аккаунт"]},{name:"logout",description:"Выйти из аккаунта Claude",argumentHint:"",aliases:["signout","выход"]}],ew={active:!1,url:"",awaitingCode:!1,output:"",error:null};function ub(s,l,i){if(s===null)return null;const r=s.lastIndexOf("/");if(r===-1&&s!=="")return l;const o=i[r===-1?"":s.slice(0,r)];if(!o)return null;const d=s.slice(r+1).toLowerCase();return d===""?{query:s,entries:o}:{query:s,entries:o.filter(h=>h.name.toLowerCase().includes(d)).sort((h,g)=>ob(h.name,d)-ob(g.name,d))}}function ob(s,l){return s.toLowerCase().startsWith(l)?0:1}function fb(s,l){const i=s.find(o=>o.value===l)??s.find(o=>o.resolvedModel===l),r=l&&!i?l:null;return{rows:[...r?[{value:r,resolvedModel:r,displayName:r,description:"задана в настройках",supportsEffort:!1,effortLevels:[],supportsThinking:!0,supportsAutoMode:!1}]:[],...s],selected:(i==null?void 0:i.value)??r??(s.some(o=>o.value==="default")?"default":"")}}function tw(){var ll;const s=S.useRef(null),[l,i]=S.useState(!1),[r,o]=S.useState("Нет связи с хостом"),[d,h]=S.useState(null),[g,m]=S.useState(!1),b=S.useMemo(()=>xo()==="relay",[]),[x,k]=S.useState([]),[_,C]=S.useState([]),[N,H]=S.useState([]),[B,K]=S.useState([]),[O,$]=S.useState(null),[A,Q]=S.useState(null),[L,M]=S.useState(null),[W,re]=S.useState(ul),[he,F]=S.useState(Qd),[ae,me]=S.useState(!1),[Ne,pe]=S.useState(!1),z=wh("(max-width: 860px)"),[P,te]=S.useState(!1);S.useEffect(()=>{z||te(!1)},[z]);const[xe,we]=S.useState(!1),[j,V]=S.useState([]),[ce,oe]=S.useState(!1),[ve,Te]=S.useState(ul),[Re,it]=S.useState(null),[Ze,st]=S.useState(null),[He,Ct]=S.useState([]),[Je,Ke]=S.useState(null),[Fe,dt]=S.useState(null),[Wn,Bt]=S.useState([]),[Tn,bn]=S.useState([]),[fn,Un]=S.useState([]),[Zt,ut]=S.useState([]),[dn,J]=S.useState(null),[fe,Ee]=S.useState(!1),[Qe,Tt]=S.useState(null),[Et,xn]=S.useState(null),[en,qt]=S.useState(!1),[En,pt]=S.useState(ew),[_n,T]=S.useState(null),[I,_e]=S.useState(null),[Me,Le]=S.useState(!1),[An,,Gl]=Z0(),Yn=P0(),[Hn,hn]=S.useState(!1),[Gt,Tl]=S.useState(null),[ka,wa]=S.useState(null),[Ys,Yl]=S.useState(null),[Pa,Il]=S.useState(null),[ja,fl]=S.useState(null),[Yt,Rt]=S.useState(!1),[Be,pn]=S.useState({}),[ta,Na]=S.useState([""]),[dl,In]=S.useState([]),[hl,pl]=S.useState(null),[na,Cn]=S.useState(null),[ml,tn]=S.useState(null),[mt,Xn]=S.useState(null),[Ti,Vn]=S.useState(null),[gl,Is]=S.useState({}),[la,aa]=S.useState({}),[yl,Qn]=S.useState(!1),[bl,mn]=S.useState(null),[_t,es]=S.useState(null),Ei=S.useRef(0),Xl=S.useRef(null),[El,sa]=S.useState(!1),[Ta,nn]=S.useState([]),[Xs,ia]=S.useState(null),xl=t_(),Pn=l_(z&&El),ue=S.useRef(new Map),w=(Et==null?void 0:Et.terminalEnabled)===!0,U=xo()==="relay"&&((ll=d==null?void 0:d.shell)==null?void 0:ll.enabled)!==!0,se=S.useRef(!1),Se=S.useCallback((y,q)=>(ue.current.set(y,q),()=>{ue.current.get(y)===q&&ue.current.delete(y)}),[]),[Ce,De]=S.useState(!1),[jt,Qt]=S.useState(null),[gn,gt]=S.useState(ul),[Mt,It]=S.useState(null),[Al,el]=S.useState({}),ts=S.useRef([]),[At,Ai]=S.useState(null);function Vs(y){Ai(q=>q===y?null:y)}S.useEffect(()=>{(z||At==="terminal"&&!El||At==="files"&&!Yt||At==="search"&&!yl||At==="git"&&!Hn||At==="ask"&&!Ce||At==="main"&&dl.length===0)&&Ai(null)},[At,z,El,Yt,yl,Hn,Ce,dl.length]);const[Vl]=S.useState(Fk),Ci=S.useRef(Vl),ra=S.useRef(!1),Xt=S.useRef(null),vn=S.useRef(null),Qs=S.useRef(0);Xt.current=A,vn.current=O,Qs.current=W.lastSeq;const Cl=S.useRef(null),$s=S.useRef(0);$s.current=gn.lastSeq;const Ea=S.useRef(null),Zs=S.useRef(""),ln=S.useRef(null),$n=S.useRef([]),Ks=S.useRef([""]);$n.current=dl,Ks.current=ta;const Ql=S.useRef(new Map),Ri=S.useRef(new Set),Aa=S.useRef(null),Ca=S.useRef(null),ns=S.useRef(0);S.useEffect(()=>{const y=X0();if(!y)return;s.current=y;const q=()=>{i(y.connected),o(y.statusText)};y.onStatus(q),y.onReconnect(()=>{q();const Ot=Xt.current;Ot&&y.send({type:"session.sync",sessionId:Ot,sinceSeq:Qs.current});const Sn=Cl.current;Sn&&y.send({type:"session.sync",sessionId:Sn,sinceSeq:$s.current})});const de=y.on(Ot=>Mi(Ot));y.connect();const qe=window.setInterval(()=>{q(),y.connected&&y.send({type:"ping",nonce:Date.now()})},15e3);return()=>{de(),window.clearInterval(qe),y.close()}},[]);const Mi=S.useCallback(y=>{var q,de,qe,Ot,Sn,Kn;switch(y.type){case"hello.ok":i(!0);break;case"workspace.list":{k(y.workspaces),$(Ye=>{var Ft;if(Ye)return Ye;const yt=Ci.current,kn=yt&&y.workspaces.find(Ps=>Ps.id===yt.workspaceId);return(kn==null?void 0:kn.id)??((Ft=y.workspaces[0])==null?void 0:Ft.id)??null});const je=ln.current;if(!je)break;const Ge=y.workspaces.find(Ye=>sw(Ye.path,je));if(!Ge)break;ln.current=null,we(!1),$(Ge.id);break}case"workspace.candidates":if(y.query.trim()!==Zs.current)break;V(y.candidates),y.source==="host"&&oe(!1);break;case"finder.opened":Ea.current=y.sessionId;break;case"workspace.roots":Ct(y.roots);break;case"workspace.created":if($(y.workspace.id),y.warnings.length===0){we(!1),st(null);break}Ke({path:y.workspace.path,warnings:y.warnings});break;case"session.list":if(y.workspaceId!==vn.current)break;C(y.sessions),H(y.archived);break;case"session.pinned":K(y.sessions);break;case"session.summary":if(y.session.id===Ea.current){it(y.session);break}if(y.session.parentSessionId){y.session.id===Cl.current&&It(y.session);break}C(je=>{const Ge=je.findIndex(yt=>yt.id===y.session.id);if(Ge===-1)return[y.session,...je];const Ye=je.slice();return Ye[Ge]=y.session,Ye}),K(je=>{const Ge=je.findIndex(yt=>yt.id===y.session.id);if(Ge===-1)return je;const Ye=je.slice();return Ye[Ge]={...y.session,pinned:!0,...je[Ge].pinnedAt?{pinnedAt:je[Ge].pinnedAt}:{}},Ye}),Q(je=>je??y.session.id);break;case"usage.state":y.sessionId===Xt.current&&(T(y.usage),Le(!1));break;case"context.state":y.sessionId===Xt.current&&(_e(y.context),Le(!1));break;case"session.capabilities":y.sessionId===Xt.current&&M(y.capabilities);break;case"session.events":if(y.sessionId===Cl.current){gt(je=>_o(je,y.entries));break}if(y.sessionId===Ea.current){Te(je=>_o(je,y.entries));break}if(y.sessionId!==Xt.current)break;re(je=>_o(je,y.entries));break;case"session.history":if(y.sessionId!==Xt.current)break;F(je=>V0(je,y));break;case"side.opened":{if(y.parentSessionId!==Xt.current)break;Cl.current=y.sessionId,Qt(y.sessionId);const je=ts.current;ts.current=[];for(const Ge of je)Ge(y.sessionId);break}case"side.closed":if(y.parentSessionId!==Xt.current)break;Cl.current=null,Qt(null),gt(ul),It(null);break;case"git.state":if(y.workspaceId!==vn.current)break;Tl(y.state);break;case"git.commit":if(y.workspaceId!==vn.current)break;wa(y.detail);break;case"git.result":if(y.workspaceId!==vn.current)break;Il({ok:y.ok,message:y.message}),y.ok&&(wa(null),Yl(null));break;case"fs.dir":if(y.workspaceId!==vn.current)break;pn(je=>({...je,[y.path]:y.entries}));break;case"fs.search":if(y.workspaceId!==vn.current)break;if(y.scope!=="tree"){const je=y.scope;aa(Ge=>({...Ge,[je]:{query:y.query,entries:y.entries}}));break}Vn({query:y.query,entries:y.entries,truncated:y.truncated});break;case"fs.grep":if(y.workspaceId!==vn.current)break;mn({query:y.query,matches:y.matches,truncated:y.truncated});break;case"fs.file":{if(y.workspaceId!==vn.current)break;const je=Ri.current.delete(y.file.path);In(Ye=>{const yt=Ye.findIndex(Ps=>Ps.path===y.file.path);if(yt===-1)return[...Ye,Hy(y.file,++ns.current)];const kn=Ye[yt],Ft=Ye.slice();return Ft[yt]=kn.saved===y.file.content&&!Ja(kn)?{...kn,mtime:y.file.mtime,size:y.file.size,stale:!1}:Hy(y.file,++ns.current),Ft}),je&&pl(y.file.path);const Ge=Xl.current;Ge&&Ge.path===y.file.path&&(Xl.current=null,es({...Ge,token:++Ei.current}));break}case"fs.saved":{if(y.workspaceId!==vn.current)break;const je=Ql.current.get(y.path);Ql.current.delete(y.path);const Ge=je!==void 0;In(yt=>yt.map(kn=>kn.path!==y.path?kn:Ge?{...kn,saved:je,mtime:y.mtime,size:y.size,stale:!1}:{...kn,stale:!0}));const Ye=$n.current.find(yt=>yt.path===y.path);!Ge&&Ye&&!Ja(Ye)&&((q=s.current)==null||q.send({type:"fs.read",workspaceId:y.workspaceId,path:y.path})),(de=s.current)==null||de.send({type:"git.state",workspaceId:y.workspaceId});break}case"fs.result":{if(y.workspaceId!==vn.current)break;if(Cn({ok:y.ok,message:y.message}),y.ok||Ql.current.delete(y.path),y.conflict&&In(Ge=>Ge.map(Ye=>Ye.path===y.path?{...Ye,stale:!0}:Ye)),Ca.current===y.path){const Ge=Ca.current;Ca.current=null,y.ok&&(Ri.current.add(Ge),(qe=s.current)==null||qe.send({type:"fs.read",workspaceId:y.workspaceId,path:Ge}))}const je=Aa.current;if(y.ok&&je&&je.to===y.path){Aa.current=null;const Ge=Ye=>Ye===je.from?je.to:Ye.startsWith(`${je.from}/`)?je.to+Ye.slice(je.from.length):Ye;In(Ye=>Ye.map(yt=>({...yt,path:Ge(yt.path)}))),pl(Ye=>Ye===null?null:Ge(Ye)),Na(Ye=>Ye.map(Ge)),pn(Ye=>{const yt={};for(const[kn,Ft]of Object.entries(Ye))kn===je.from||kn.startsWith(`${je.from}/`)||(yt[kn]=Ft);return yt})}y.ok&&((Ot=s.current)==null||Ot.send({type:"git.state",workspaceId:y.workspaceId}));break}case"term.list":if(y.workspaceId!==vn.current)break;nn(y.terminals);break;case"term.opened":if(y.terminal.workspaceId!==vn.current)break;nn(je=>{const Ge=je.findIndex(yt=>yt.id===y.terminal.id);if(Ge===-1)return[...je,y.terminal];const Ye=je.slice();return Ye[Ge]=y.terminal,Ye}),se.current&&(se.current=!1,ia(y.terminal.id));break;case"term.buffer":(Sn=ue.current.get(y.id))==null||Sn({kind:"buffer",data:y.data});break;case"term.data":(Kn=ue.current.get(y.id))==null||Kn({kind:"data",data:y.data});break;case"term.exit":nn(je=>je.map(Ge=>Ge.id===y.id?{...Ge,exitCode:y.exitCode}:Ge));break;case"term.closed":nn(je=>je.filter(Ge=>Ge.id!==y.id));break;case"mcp.list":y.sessionId===Xt.current&&Bt(y.servers);break;case"plugin.list":if(y.sessionId!==Xt.current)break;bn(y.plugins),Un(y.marketplaces),ut(y.catalog);break;case"operation.result":y.sessionId===Xt.current&&J(y.result);break;case"auth.status":Tt(y.status);break;case"relay.state":h(y.state);break;case"settings.state":xn(y.settings);break;case"auth.login":pt(y.state),y.state.active&&Ee(!0);break;case"session.closed":C(je=>je.map(Ge=>Ge.id===y.sessionId?{...Ge,state:"closed"}:Ge));break;case"error":console.error("[host]",y.message,y.context??""),(y.context==="workspace.open"||y.context==="workspace.create")&&(ln.current=null,st(y.message));break}},[]),ie=S.useCallback(y=>{var q;(q=s.current)==null||q.send(y)},[]);S.useEffect(()=>{O&&ie({type:"session.list",workspaceId:O})},[O,ie]),S.useEffect(()=>{l&&ie({type:"session.pins"})},[l,ie]),S.useEffect(()=>{l&&ie({type:"settings.get"})},[l,ie]),S.useEffect(()=>{if(ra.current)return;const y=Ci.current;if(!y||!O)return;if(O!==y.workspaceId){ra.current=!0;return}if(A){ra.current=!0;return}if(_.length===0)return;const q=_.find(de=>Wk(de,y));ra.current=!0,q&&Mr(q)},[_,O,A]),S.useEffect(()=>{!O||U||!w||ie({type:"term.list",workspaceId:O})},[O,U,w,ie]),S.useEffect(()=>{ia(y=>{var q;return y&&Ta.some(de=>de.id===y)?y:((q=Ta[0])==null?void 0:q.id)??null})},[Ta]),S.useEffect(()=>{xe&&ie({type:"workspace.roots"})},[xe,ie]);const ls=S.useCallback(()=>{const y=Xt.current;y&&(Le(!0),ie({type:"usage.get",sessionId:y}),ie({type:"context.get",sessionId:y}))},[ie]);S.useEffect(()=>{if(!Me)return;const y=window.setTimeout(()=>Le(!1),Jk);return()=>window.clearTimeout(y)},[Me]);const Er=S.useMemo(()=>{const y=Math.max((_n==null?void 0:_n.fetchedAt)??0,(I==null?void 0:I.fetchedAt)??0);return y>0?y:null},[_n==null?void 0:_n.fetchedAt,I==null?void 0:I.fetchedAt]),Do="Обновить лимиты и контекст"+(Er?`
|
|
129
|
-
обновлено в ${new Date(Er).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:"");S.useEffect(()=>{if(_e(null),!A)return;ls();const y=()=>{document.hidden||ls()},q=window.setInterval(y,Kk),de=()=>{document.hidden||ls()};return document.addEventListener("visibilitychange",de),()=>{window.clearInterval(q),document.removeEventListener("visibilitychange",de)}},[A,ls]),S.useEffect(()=>{if(!A){F(Qd);return}F({...Qd,loading:!0}),ie({type:"session.history",sessionId:A})},[A,ie]);const Ar=S.useCallback(()=>{!A||he.loading||!ey(he)||(F(y=>({...y,loading:!0})),ie({type:"session.history",sessionId:A,before:bb(he)}))},[A,he,ie]),zo=S.useMemo(()=>Q0(he.entries),[he.entries]),ye=S.useMemo(()=>_.find(y=>y.id===A)??null,[_,A]),Cr=x.find(y=>y.id===O)??null;S.useEffect(()=>{if(!O||!A)return;const y={workspaceId:O,sessionId:A,claudeSessionId:(ye==null?void 0:ye.claudeSessionId)??null};try{localStorage.setItem(cx,JSON.stringify(y))}catch{}},[O,A,ye==null?void 0:ye.claudeSessionId]);function Lo(y){ln.current=y,st(null),ie({type:"workspace.open",path:y})}function Uo(y,q,de){st(null),ie({type:"workspace.create",parent:y,name:q,init:de})}function Hc(y){if(Zs.current=y,!y){V([]),oe(!1);return}oe(!0),ie({type:"workspace.find",query:y})}function Ho(y){Zs.current=y,Te(ul),ie({type:"workspace.find.agent",query:y})}function Bo(){we(!1),st(null),Ke(null),V([]),Te(ul),it(null),Zs.current="",ln.current=null}function Js(){const y=Xt.current;y&&Cl.current&&ie({type:"side.reset",sessionId:y}),Cl.current=null,Qt(null),gt(ul),It(null),el({}),ts.current=[]}function qo(y){ie({type:"workspace.close",workspaceIds:y}),!(!O||!y.includes(O))&&(Js(),$(null),Q(null),C([]),H([]),re(ul),M(null),pe(!1))}function Rr(y,q){ie({type:"session.archive",workspaceId:y,sessionIds:q}),A&&(q.includes(A)||ye!=null&&ye.claudeSessionId&&q.includes(ye.claudeSessionId))&&(Js(),Q(null),re(ul),M(null),pe(!1))}function Go(){O&&(Js(),Q(null),M(null),re(ul),pe(!1),ie({type:"session.start",workspaceId:O}),me(!1))}function Bc(y){Js(),Ko(),$(y),Q(null),re(ul),M(null),pe(!1),Tl(null),wa(null),Yl(null),Il(null),nn([]),ia(null)}function Yo(y,q,de){ie({type:"session.pin",workspaceId:y,sessionIds:q,pinned:de})}function qc(y){y.workspaceId!==O&&Bc(y.workspaceId),Mr(y)}function Mr(y){if(me(!1),Js(),re(ul),M(null),pe(!1),y.state==="closed"){Q(null),ie({type:"session.start",workspaceId:y.workspaceId,resume:y.id});return}Q(y.id),ie({type:"session.sync",sessionId:y.id,sinceSeq:0})}function Gc(y,q){ie({type:"session.rename",sessionId:y.id,title:q,workspaceId:y.workspaceId}),C(de=>de.map(qe=>qe.id===y.id?{...qe,title:q}:qe))}function Yc(y){A&&(me(!1),J(null),dt(y),ie({type:"mcp.list",sessionId:A}),ie({type:"plugin.list",sessionId:A}))}const Io={mcpAction:(y,q)=>{A&&(ie({type:"mcp.action",sessionId:A,name:y,action:q}),dt(null))},mcpAdd:(y,q)=>{A&&ie({type:"mcp.add",sessionId:A,name:y,draft:q})},mcpRemove:y=>{A&&ie({type:"mcp.remove",sessionId:A,name:y})},pluginInstall:y=>{A&&ie({type:"plugin.install",sessionId:A,spec:y})},pluginUninstall:y=>{A&&ie({type:"plugin.uninstall",sessionId:A,id:y})},pluginToggle:(y,q)=>{A&&ie({type:"plugin.toggle",sessionId:A,id:y,enabled:q})},marketplaceAdd:y=>{A&&ie({type:"marketplace.add",sessionId:A,source:y})},marketplaceRemove:y=>{A&&ie({type:"marketplace.remove",sessionId:A,name:y})}};function Ic(){me(!1),Ee(!0),ie({type:"auth.status"})}const Or={login:(y,q)=>ie({type:"auth.login",mode:y,switchAccount:q}),submitCode:y=>ie({type:"auth.code",code:y}),cancel:()=>ie({type:"auth.cancel"}),logout:()=>ie({type:"auth.logout"})};function Xo(){me(!1),qt(!0),ie({type:"settings.get"})}function Vo(y){xn(q=>q&&{...q,...y}),ie({type:"settings.update",settings:y})}function Qo(y){A&&ie({type:"side.ask",sessionId:A,text:y})}function Dr(){A&&(ie({type:"side.reset",sessionId:A}),Cl.current=null,Qt(null),gt(ul),It(null),el({}),ts.current=[])}function $l(y){const q=Cl.current;if(q){y(q);return}const de=Xt.current;de&&(ts.current.push(y),ie({type:"side.open",sessionId:de}))}function Xc(){O&&ie({type:"git.state",workspaceId:O})}function Vc(y){O&&(Yl(y),ie({type:"git.show",workspaceId:O,ref:y}))}function zr(y,q){Il(null),fl({target:y,label:q})}function Qc(){!O||!ja||(ie({type:"git.checkout",workspaceId:O,target:ja.target}),fl(null))}S.useEffect(()=>{if(!(!Yt||!O))for(const y of ta)y in Be||ie({type:"fs.list",workspaceId:O,path:y})},[Yt,ta,Be,O,ie]);function $c(y){Na(q=>q.includes(y)?q.filter(de=>de!==y):[...q,y])}function Zc(y){if(!y){Vn(null);return}O&&ie({type:"fs.search",workspaceId:O,query:y})}function as(y){if(!y){mn(null);return}O&&ie({type:"fs.grep",workspaceId:O,query:y})}const Kc=S.useCallback((y,q)=>{Is(Ot=>({...Ot,[y]:q}));const de=vn.current;if(q===null||!de)return;const qe=q.lastIndexOf("/");if(qe!==-1){ie({type:"fs.list",workspaceId:de,path:q.slice(0,qe)});return}if(q===""){ie({type:"fs.list",workspaceId:de,path:""});return}ie({type:"fs.search",workspaceId:de,query:q,scope:y})},[ie]),$o=S.useMemo(()=>ub(gl.mention??null,la.mention??null,Be),[gl.mention,la.mention,Be]),Zo=S.useMemo(()=>ub(gl.side??null,la.side??null,Be),[gl.side,la.side,Be]);function Jc(y){Ra(y.path,{line:y.line,column:y.column})}function Fc(y){const q=[];let de=ki(y.path);for(;q.push(de),!!de;)de=ki(de);Na(qe=>{const Ot=new Set(qe);for(const Sn of q)Ot.add(Sn);return y.kind==="dir"&&Ot.add(y.path),[...Ot]}),y.kind==="file"&&Ra(y.path)}function Ra(y,q){if($n.current.find(qe=>qe.path===y)){pl(y),q&&es({path:y,...q,token:++Ei.current});return}O&&(q&&(Xl.current={path:y,...q}),Ri.current.add(y),ie({type:"fs.read",workspaceId:O,path:y}))}function Ma(y,q=!1){const de=$n.current,qe=de.find(Kn=>Kn.path===y);if(qe&&Ja(qe)&&!q){Xn(y);return}Xn(null);const Ot=de.findIndex(Kn=>Kn.path===y),Sn=de.filter(Kn=>Kn.path!==y);In(Sn),pl(Kn=>{var je;return Kn===y?((je=Sn[Math.min(Ot,Sn.length-1)])==null?void 0:je.path)??null:Kn})}function Oi(y,q=!1){const de=$n.current.find(qe=>qe.path===y);!de||!O||!q&&!Ja(de)||(Ql.current.set(y,de.text),ie({type:"fs.write",workspaceId:O,path:y,content:de.text,eol:de.eol,encoding:de.encoding,baseMtime:de.mtime,...q?{force:!0}:{}}))}function Di(y){O&&ie({type:"fs.read",workspaceId:O,path:y})}const Wc=S.useRef(new Map);function Pc(y){const q=Wc.current,de=q.get(y);de&&clearTimeout(de);const qe=(Et==null?void 0:Et.autoSaveAfterPauseMs)??0;qe<=0||q.set(y,setTimeout(()=>{q.delete(y);const Ot=$n.current.find(Sn=>Sn.path===y);Ot&&Ja(Ot)&&!Ot.stale&&Oi(y)},qe))}function Lr(y,q,de){if(!O)return;const qe=y?`${y}/${de}`:de;Cn(null),q==="file"&&(Ca.current=qe),ie({type:"fs.create",workspaceId:O,path:qe,kind:q})}function Ur(y,q){if(!O)return;const de=ki(y),qe=de?`${de}/${q}`:q;Cn(null),Aa.current={from:y,to:qe},ie({type:"fs.rename",workspaceId:O,path:y,to:qe})}function eu(y,q){if(!O)return;const de=y.slice(y.lastIndexOf("/")+1),qe=q?`${q}/${de}`:de;qe!==y&&(Cn(null),Aa.current={from:y,to:qe},ie({type:"fs.rename",workspaceId:O,path:y,to:qe}))}function tu(y,q){O&&(Cn(null),ie({type:"fs.copy",workspaceId:O,path:y,toDir:q}))}function nu(y){O&&(Cn(null),tn(null),ie({type:"fs.delete",workspaceId:O,path:y.path}),In(q=>q.filter(de=>de.path!==y.path&&!de.path.startsWith(`${y.path}/`))),pl(q=>q&&(q===y.path||q.startsWith(`${y.path}/`))?null:q))}function Ko(){pn({}),Na([""]),In([]),pl(null),Cn(null),Vn(null),mn(null),Is({}),aa({}),es(null),Ri.current.clear(),Ql.current.clear(),Xl.current=null,Aa.current=null,Ca.current=null}function Jo(){!O||U||!w||(se.current=!0,ie({type:"term.open",workspaceId:O,cols:80,rows:24}))}function Fo(y){ie({type:"term.close",id:y})}function Wo(y,q){A&&ie({type:"permission.respond",sessionId:A,requestId:y,decision:q})}function Po(y,q){A&&ie({type:"permission.respond",sessionId:A,requestId:y,decision:"allow",answers:q})}function Zn(y){A&&ie({type:"permission.respond",sessionId:A,requestId:y,decision:"deny",reason:"Пользователь не стал отвечать на вопросы"})}S.useEffect(()=>{function y(q){if(q.key!=="Escape")return;if(At!==null){const qe=q.target;if(!(qe instanceof HTMLElement&&qe.closest(".termview, .editor, .sidepane"))){Ai(null);return}}if(!A||W.pending.length>0)return;const de=q.target;de instanceof HTMLElement&&de.closest(".sidepane, .editor")||ie({type:"control.interrupt",sessionId:A})}return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[A,W.pending.length,ie,At]),S.useEffect(()=>{function y(q){q.key!=="`"||!(q.ctrlKey||q.metaKey)||w&&(q.preventDefault(),sa(de=>!de))}return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[w]);const ss=S.useMemo(()=>{const y=(L==null?void 0:L.commands)??[];return y.length===0?y:[...y,{name:"plugins",description:"Плагины и маркетплейсы — окно приложения",argumentHint:"",aliases:["plugin"]},...cb]},[L]);function Hr(y){const q=Pk[y];return q?(Yc(q),!0):cb.some(de=>de.name===y)?(Ic(),y==="logout"&&Or.logout(),y==="switch-account"&&Or.login("claudeai",!0),!0):!1}const Fs=(ye==null?void 0:ye.state)==="waiting_permission",tl=(ye==null?void 0:ye.state)==="reconnecting",nl=(ye==null?void 0:ye.state)==="running"||tl||Fs,Rl=W.pending[0]??null;S.useEffect(()=>{!Hn&&!Yt||!O||nl||ie({type:"git.state",workspaceId:O})},[Hn,Yt,O,nl,ie]),S.useEffect(()=>{if(!(nl||!O)){Yt&&pn(y=>{const q={};for(const[de,qe]of Object.entries(y))Ks.current.includes(de)||(q[de]=qe);return q});for(const y of $n.current)Ja(y)||ie({type:"fs.read",workspaceId:O,path:y.path})}},[nl,O,Yt,ie]);const Br=(ye==null?void 0:ye.cwd)??(L==null?void 0:L.cwd)??null,Oa=(L==null?void 0:L.models)??[],is=(ye==null?void 0:ye.model)??(L==null?void 0:L.model)??null,{rows:rs,selected:qr}=fb(Oa,is),cs=Mt?{model:Mt.model,effort:Mt.effort,ultracode:Mt.ultracode,thinking:Mt.thinking,switchOnFlag:Mt.switchModelsOnFlag}:{model:Al.model??is,effort:Al.effort??(ye==null?void 0:ye.effort)??null,ultracode:Al.ultracode??(ye==null?void 0:ye.ultracode)??!1,thinking:Al.thinking??(ye==null?void 0:ye.thinking)??!0,switchOnFlag:Al.switchOnFlag??(ye==null?void 0:ye.switchModelsOnFlag)??!0},ca=fb(Oa,cs.model),us=(Mt==null?void 0:Mt.state)==="running",Ws=hl?dl.find(y=>y.path===hl)??null:null,lu=new Set(dl.filter(Ja).map(y=>y.path)),_l=y=>c.jsx(Lk,{pane:y,width:Yn.widths[y],onResize:q=>Yn.setWidth(y,q),onReset:()=>Yn.reset(y)}),Da=y=>z?null:()=>Vs(y),Gr=L&&c.jsx(qs,{title:"Режим прав",value:(ye==null?void 0:ye.permissionMode)??"default",options:xb.map(y=>({value:y.value,label:y.value,hint:y.hint})),onChange:y=>{A&&ie({type:"control.set_mode",sessionId:A,mode:y})}}),Yr=rs.length>0?c.jsx(tx,{models:rs,value:qr,effort:(ye==null?void 0:ye.effort)??null,ultracode:(ye==null?void 0:ye.ultracode)??!1,thinking:(ye==null?void 0:ye.thinking)??!0,switchOnFlag:(ye==null?void 0:ye.switchModelsOnFlag)??!0,onModel:y=>{!A||!y||ie({type:"control.set_model",sessionId:A,model:y})},onEffort:y=>{A&&ie({type:"control.set_effort",sessionId:A,effort:y})},onUltracode:y=>{A&&ie({type:"control.set_ultracode",sessionId:A,enabled:y})},onThinking:y=>{A&&ie({type:"control.set_thinking",sessionId:A,enabled:y})},onSwitchOnFlag:y=>{A&&ie({type:"control.set_flag_switch",sessionId:A,enabled:y})}}):is&&c.jsx("span",{className:"badge",children:is}),au=nl&&c.jsx("span",{className:Fs?"badge badge--wait":"badge badge--live",children:Fs?"ждёт":tl?"переподключается":"работает"}),su=()=>{A&&ie({type:"session.reconnect",sessionId:A})},ef=tl?"Сессия уже поднимает новый процесс":nl?"Недоступно, пока идёт ход":"Поднять сессии новый процесс — разговор сохранён",iu=A&&(tl||(ye==null?void 0:ye.state)==="error")?c.jsxs("div",{className:tl?"relink":"relink relink--error",role:"status",children:[c.jsxs("span",{className:"relink__msg",children:[c.jsx("span",{className:"relink__dot","aria-hidden":"true"}),tl?"Связь оборвалась. Сессия поднимает новый процесс — разговор сохранён.":"Переподключиться не удалось. Разговор сохранён — сессия продолжит с этого места."]}),c.jsx("button",{className:"btn btn--sm",title:tl?"Не ждать паузы между попытками — попробовать сейчас":"Поднять сессии новый процесс и продолжить разговор",onClick:su,children:tl?"Переподключить сейчас":"Переподключить"})]}):null,zi=ye&&ye.totalCostUsd>0?`$${ye.totalCostUsd.toFixed(3)}`:null,Li=c.jsx("button",{className:Ce?"pane-btn is-on":"pane-btn",title:"Вопрос на полях — спросить, не мешая работе","aria-label":"Вопрос на полях","aria-pressed":Ce,onClick:()=>De(y=>!y),children:c.jsx(rw,{})});return c.jsxs("div",{className:"app",style:Yn.style,children:[c.jsx(A1,{open:ae,connected:l,status:r,workspaces:x,sessions:_.filter(y=>y.workspaceId===O),archived:N.filter(y=>y.workspaceId===O),pinned:B,activeWorkspaceId:O,activeSessionId:A,onPinSessions:Yo,onSelectPinned:qc,onCloseWorkspaces:qo,onArchiveSessions:Rr,onUnarchiveSessions:y=>{O&&ie({type:"session.unarchive",workspaceId:O,sessionIds:y})},onSelectWorkspace:Bc,onSelectSession:Mr,onRenameSession:Gc,onOpenWorkspace:()=>we(!0),onNewSession:Go,onOpenExtensions:A?()=>Yc("mcp"):null,account:Qe,onOpenAccount:Ic,relay:d,onOpenRelay:b?null:()=>m(!0),onOpenSettings:Xo,themeMode:An,onCycleTheme:Gl}),_l("sidebar"),ae&&c.jsx("div",{className:"scrim",onClick:()=>me(!1)}),c.jsx(u1,{open:Yt,tree:Be,expanded:new Set(ta),activePath:hl,dirty:lu,gitChanges:(Gt==null?void 0:Gt.changed)??[],result:na,searchResult:Ti,onSearch:Zc,onReveal:Fc,onToggle:$c,onOpen:Ra,onCreate:Lr,onRename:Ur,onMove:eu,onCopy:tu,onDelete:tn,onRefresh:()=>{Cn(null),pn({}),Xc()},onClose:()=>Rt(!1),zoomed:At==="files",onToggleZoom:Da("files")}),Yt&&At!=="files"&&_l("files"),c.jsx(x1,{open:yl,result:bl,onSearch:as,onOpenMatch:Jc,onClose:()=>Qn(!1),zoomed:At==="search",onToggleZoom:Da("search")}),yl&&At!=="search"&&_l("search"),c.jsx(IS,{open:Hn,state:Gt,result:Pa,selected:Ys,onRefresh:Xc,onShow:Vc,onCheckout:zr,onClose:()=>hn(!1),zoomed:At==="git",onToggleZoom:Da("git")}),Hn&&At!=="git"&&_l("git"),c.jsxs("main",{className:At==="main"||At==="terminal"?"main main--zoomed":"main",children:[c.jsxs("header",{className:"topbar",children:[c.jsx("button",{className:"btn btn--ghost menu-btn",onClick:()=>me(!0),children:"☰"}),c.jsx("button",{className:Yt?"pane-btn is-on":"pane-btn",title:"Файлы проекта","aria-label":"Файлы проекта","aria-pressed":Yt,onClick:()=>{Rt(y=>!y),hn(!1),Qn(!1)},children:c.jsx(nw,{})}),c.jsx("button",{className:yl?"pane-btn is-on":"pane-btn",title:"Поиск по тексту в проекте","aria-label":"Поиск по тексту в проекте","aria-pressed":yl,onClick:()=>{Qn(y=>!y),Rt(!1),hn(!1)},children:c.jsx(lw,{})}),c.jsx("button",{className:Hn?"pane-btn is-on":"pane-btn",title:"История git","aria-label":"История git","aria-pressed":Hn,onClick:()=>{hn(y=>!y),Rt(!1),Qn(!1)},children:c.jsx(aw,{})}),w&&c.jsx("button",{className:El?"pane-btn is-on":"pane-btn",title:"Терминал (Ctrl+`)","aria-label":"Терминал","aria-pressed":El,onClick:()=>sa(y=>!y),children:c.jsx(iw,{})}),z&&Li,z&&c.jsx("button",{className:P?"pane-btn is-on":"pane-btn",title:"Ещё","aria-label":"Ещё","aria-haspopup":"menu","aria-pressed":P,onClick:()=>te(!0),children:c.jsx(cw,{})}),c.jsxs("div",{className:"topbar__id",children:[Ne&&ye?c.jsx(Dc,{className:"rename--title",value:ye.title??"",onCommit:y=>{Gc(ye,y),pe(!1)},onCancel:()=>pe(!1)}):c.jsxs("div",{className:"topbar__head",children:[c.jsx("button",{className:"topbar__title",disabled:!ye||z,title:ye&&!z?"Переименовать сессию":void 0,onClick:()=>pe(!0),children:(ye==null?void 0:ye.title)??"Claude Code Visual"}),Cr&&c.jsx("span",{className:"topbar__project",title:Cr.path,children:Cr.name})]}),z?au:Br&&c.jsx(ex,{path:Br})]}),!z&&c.jsxs("div",{className:"topbar__tools",children:[c.jsx("button",{type:"button",className:Me?"meters-refresh is-busy":"meters-refresh",title:Do,"aria-label":"Обновить лимиты и контекст","aria-busy":Me,disabled:!A||Me,onClick:ls,children:c.jsx(uw,{})}),c.jsx(lx,{usage:_n}),c.jsx(rx,{}),Gr,Yr,au,zi&&c.jsx("span",{className:"badge badge--cost",children:zi}),Li]})]}),c.jsx($k,{tokens:(I==null?void 0:I.tokens)??W.contextTokens,maxTokens:(I==null?void 0:I.maxTokens)??null,fetchedAt:(I==null?void 0:I.fetchedAt)??null}),z&&P&&c.jsx(uk,{onClose:()=>te(!1),permission:Gr,model:Yr,usage:_n,cwd:Br,costLabel:zi,onRefresh:ls,refreshing:Me,metersFetchedAt:Er,onRename:ye?()=>{pe(!0),te(!1)}:null}),dl.length>0&&c.jsx(T1,{files:dl,activePath:hl,busy:nl,onSelect:pl,onClose:y=>Ma(y),zoomed:At==="main",onToggleZoom:Da("main")}),Ws?c.jsx(j1,{file:Ws,goto:(_t==null?void 0:_t.path)===Ws.path?_t:null,onChange:(y,q)=>{In(de=>de.map(qe=>qe.path===y?{...qe,text:q}:qe)),Pc(y)},onSave:y=>Oi(y),onReload:Di,onOverwrite:y=>Oi(y,!0),onTogglePreview:y=>In(q=>q.map(de=>de.path===y?{...de,previewMode:!de.previewMode}:de))}):c.jsxs(c.Fragment,{children:[c.jsx(qh,{items:W.items,busy:nl&&!tl,waiting:Fs,history:zo,historyHasMore:ey(he),historyLoading:he.loading,onLoadHistory:Ar,sessionId:A??void 0}),iu,c.jsx(Wb,{disabled:!A,busy:nl&&!tl,placeholder:tl?"Промпт уйдёт, как только связь вернётся":void 0,commands:ss,sessionTitle:(ye==null?void 0:ye.title)??null,contextResult:$o,onContextSearch:y=>Kc("mention",y),onCommand:Hr,onSend:y=>{A&&ie({type:"prompt.send",sessionId:A,text:y})},onInterrupt:()=>{A&&ie({type:"control.interrupt",sessionId:A})}})]}),El&&w&&c.jsxs(c.Fragment,{children:[!z&&At!=="terminal"&&c.jsx(Hk,{height:xl.height,onResize:xl.setHeight,onReset:xl.reset}),c.jsx(Yk,{mobile:z,zoomed:At==="terminal",onToggleZoom:Da("terminal"),terminals:Ta,activeId:Xs,blocked:U,height:z?Pn.height:xl.height,offset:z?{top:Pn.offsetTop,left:Pn.offsetLeft}:void 0,onSelect:ia,onOpen:Jo,onClose:Fo,onInput:(y,q)=>ie({type:"term.input",id:y,data:q}),onResize:(y,q,de)=>ie({type:"term.resize",id:y,cols:q,rows:de}),onAttach:y=>ie({type:"term.attach",id:y}),onHide:()=>sa(!1),registerSink:Se})]})]}),c.jsx(ek,{open:Ce,items:gn.items,busy:us,ready:A!==null,commands:ss,contextResult:Zo,models:ca.rows,model:ca.selected,effort:cs.effort,ultracode:cs.ultracode,thinking:cs.thinking,switchOnFlag:cs.switchOnFlag,onContextSearch:y=>Kc("side",y),onCommand:Hr,onModel:y=>{y&&(el(q=>({...q,model:y})),$l(q=>ie({type:"control.set_model",sessionId:q,model:y})))},onEffort:y=>{el(q=>({...q,effort:y,ultracode:!1})),$l(q=>ie({type:"control.set_effort",sessionId:q,effort:y}))},onUltracode:y=>{el(q=>({...q,ultracode:y,...y?{effort:"xhigh"}:{}})),$l(q=>ie({type:"control.set_ultracode",sessionId:q,enabled:y}))},onThinking:y=>{el(q=>({...q,thinking:y})),$l(q=>ie({type:"control.set_thinking",sessionId:q,enabled:y}))},onSwitchOnFlag:y=>{el(q=>({...q,switchOnFlag:y})),$l(q=>ie({type:"control.set_flag_switch",sessionId:q,enabled:y}))},onAsk:Qo,onInterrupt:()=>{jt&&ie({type:"control.interrupt",sessionId:jt})},onReset:Dr,onClose:()=>De(!1),zoomed:At==="ask",onToggleZoom:Da("ask")}),Ce&&At!=="ask"&&_l("ask"),(Hn||Ce||Yt||yl)&&c.jsx("div",{className:"scrim scrim--pane",onClick:()=>{hn(!1),De(!1),Rt(!1),Qn(!1)}}),ka&&c.jsx(QS,{detail:ka,local:((Gt==null?void 0:Gt.hasRemote)??!1)&&(Gt==null?void 0:Gt.commits.some(y=>y.hash===ka.hash&&!y.pushed))===!0,onCheckout:zr,onClose:()=>{wa(null),Yl(null)}}),ja&&c.jsxs(Pl,{title:"Переключить рабочее дерево?",onClose:()=>fl(null),actions:c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>fl(null),children:"Отмена"}),c.jsx("button",{className:"btn btn--warn",onClick:Qc,children:"Переключиться"})]}),children:[c.jsxs("p",{className:"modal__text",children:["git переключится на ",ja.label,". Файлы в каталоге проекта изменятся — это тот же каталог, в котором работает агент."]}),nl&&c.jsx("p",{className:"modal__text",children:"Сейчас идёт ход агента: он читает и правит файлы прямо сейчас."}),Gt&&Gt.changed.length>0&&c.jsxs("p",{className:"modal__text",children:["Незакоммиченных изменений: ",Gt.changed.length,". Git откажется переключаться, если они будут затёрты."]})]}),ml&&c.jsx(Pl,{title:ml.kind==="dir"?"Удалить каталог?":"Удалить файл?",onClose:()=>tn(null),actions:c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>tn(null),children:"Отмена"}),c.jsx("button",{className:"btn btn--warn",onClick:()=>nu(ml),children:"Удалить"})]}),children:c.jsxs("p",{className:"modal__text",children:[ml.path," будет удалён с диска",ml.kind==="dir"?" вместе со всем содержимым":"",". Корзины здесь нет: это тот же каталог, в котором работает агент."]})}),mt&&c.jsx(Pl,{title:"Закрыть без сохранения?",onClose:()=>Xn(null),actions:c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>Xn(null),children:"Отмена"}),c.jsx("button",{className:"btn btn--warn",onClick:()=>Ma(mt,!0),children:"Закрыть"}),c.jsx("button",{className:"btn btn--primary",onClick:()=>{Oi(mt),Ma(mt,!0)},children:"Сохранить и закрыть"})]}),children:c.jsxs("p",{className:"modal__text",children:["В ",mt," есть несохранённые правки."]})}),Fe&&c.jsx(fk,{tab:Fe,servers:Wn,plugins:Tn,marketplaces:fn,catalog:Zt,result:dn,actions:Io,onTab:dt,onClose:()=>dt(null)}),fe&&c.jsx(xk,{status:Qe,login:En,actions:Or,runningSessions:_.filter(y=>y.state==="running"||y.state==="waiting_permission").length,onReconnect:A?()=>{su(),Ee(!1)}:null,reconnectBlocked:nl,reconnectHint:ef,onClose:()=>Ee(!1)}),g&&c.jsx(wk,{state:d,onPair:(y,q)=>ie({type:"relay.pair",code:y,...q?{name:q}:{}}),onUnpair:()=>ie({type:"relay.unpair"}),onClose:()=>m(!1)}),en&&c.jsx(Dk,{settings:Et,models:(L==null?void 0:L.models)??[],relayState:d,local:xo()==="local",onChange:Vo,onEnableShell:()=>ie({type:"relay.shell.enable"}),onDisableShell:()=>ie({type:"relay.shell.disable"}),onOpenRelay:()=>{qt(!1),m(!0)},onClose:()=>qt(!1)}),xe&&c.jsx(MS,{candidates:j,searching:ce,agentItems:ve.items,agentBusy:(Re==null?void 0:Re.state)==="running",error:Ze,roots:He,created:Je,onSearch:Hc,onAskAgent:Ho,onInterrupt:()=>{const y=Ea.current;y&&ie({type:"control.interrupt",sessionId:y})},onSubmit:Lo,onCreate:Uo,onClose:Bo}),Rl!=null&&Rl.questions&&Rl.questions.length>0?c.jsx(wS,{request:{...Rl,questions:Rl.questions},queued:W.pending.length-1,onAnswer:Po,onDecline:Zn}):Rl&&c.jsx(kS,{request:Rl,queued:W.pending.length-1,onDecide:Wo})]})}function nw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M2 4.1V3a.6.6 0 0 1 .6-.6h2.6l1.2 1.4h5a.6.6 0 0 1 .6.6v1.1"}),c.jsx("path",{d:"M2 12.6V5.7h11.4a.6.6 0 0 1 .58.75l-1.5 6.2a.6.6 0 0 1-.58.45H2.6a.6.6 0 0 1-.6-.5Z"})]})}function lw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}function aw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[c.jsx("circle",{cx:"4.5",cy:"3.5",r:"1.9"}),c.jsx("circle",{cx:"4.5",cy:"12.5",r:"1.9"}),c.jsx("circle",{cx:"11.5",cy:"8",r:"1.9"}),c.jsx("path",{d:"M4.5 5.4v5.2M6.4 3.9h2.2a1.6 1.6 0 0 1 1.6 1.6v.8"})]})}function sw(s,l){return db(s)===db(l)}function db(s){return s.replace(/[\\/]+/g,"/").replace(/\/+$/,"").toLowerCase()}function iw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("rect",{x:"1.6",y:"2.6",width:"12.8",height:"10.8",rx:"1.7"}),c.jsx("path",{d:"M4.3 6 6.6 8l-2.3 2"}),c.jsx("path",{d:"M8.2 10h3.1"})]})}function rw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M13.6 9.4a1.6 1.6 0 0 1-1.6 1.6H6.2L3.2 13.4V4.2a1.6 1.6 0 0 1 1.6-1.6h7.2a1.6 1.6 0 0 1 1.6 1.6Z"}),c.jsx("path",{d:"M8.4 8.5v-.3c0-.7.9-.9.9-1.7a1 1 0 0 0-1.9-.4"})]})}function cw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[c.jsx("circle",{cx:"3.2",cy:"8",r:"1.5"}),c.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),c.jsx("circle",{cx:"12.8",cy:"8",r:"1.5"})]})}function uw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),c.jsx("path",{d:"M14 2v3.33h-3.33"})]})}const ux=document.getElementById("root");if(!ux)throw new Error("#root not found");U0.createRoot(ux).render(c.jsx(S.StrictMode,{children:c.jsx(tw,{})}));export{Nv as D,Lt as I,Ht as N,dw as P,Bl as T,ea as a,Lb as b,ol as c,fw as d,Gb as e,Mc as f,Vv as h,hw as p,pw as s,be as t};
|