@goodfish/jarvy 0.13.0 → 0.14.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/CHANGELOG.md +34 -0
- package/THIRD_PARTY_NOTICE.md +4 -2
- package/dist/server/cli.js +1903 -631
- package/dist/web/assets/index-CjRgnPY8.js +846 -0
- package/dist/web/assets/index-DYCjMJlL.css +1 -0
- package/dist/web/index.html +2 -2
- package/licenses/PI-ANTIGRAVITY-MIT.txt +21 -0
- package/licenses/PI-MIT.txt +21 -0
- package/package.json +1 -1
- package/dist/web/assets/index-BcbJAN1a.js +0 -832
- package/dist/web/assets/index-CTxxtQcU.css +0 -1
|
@@ -0,0 +1,846 @@
|
|
|
1
|
+
var f7=Object.defineProperty;var Nx=e=>{throw TypeError(e)};var h7=(e,n,a)=>n in e?f7(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;var qe=(e,n,a)=>h7(e,typeof n!="symbol"?n+"":n,a),Ex=(e,n,a)=>n.has(e)||Nx("Cannot "+a);var li=(e,n,a)=>(Ex(e,n,"read from private field"),a?a.call(e):n.get(e)),Tx=(e,n,a)=>n.has(e)?Nx("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),pp=(e,n,a,r)=>(Ex(e,n,"write to private field"),r?r.call(e,a):n.set(e,a),a);function m7(e,n){for(var a=0;a<n.length;a++){const r=n[a];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const c=Object.getOwnPropertyDescriptor(r,o);c&&Object.defineProperty(e,o,c.get?c:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function a(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(o){if(o.ep)return;o.ep=!0;const c=a(o);fetch(o.href,c)}})();function d1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gp={exports:{}},Ac={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Mx;function p7(){if(Mx)return Ac;Mx=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(r,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:e,type:r,key:d,ref:o!==void 0?o:null,props:c}}return Ac.Fragment=n,Ac.jsx=a,Ac.jsxs=a,Ac}var Ax;function g7(){return Ax||(Ax=1,gp.exports=p7()),gp.exports}var l=g7(),vp={exports:{}},at={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var _x;function v7(){if(_x)return at;_x=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),j=Symbol.for("react.view_transition"),b=Symbol.iterator;function k(F){return F===null||typeof F!="object"?null:(F=b&&F[b]||F["@@iterator"],typeof F=="function"?F:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,C={};function M(F,ee,W){this.props=F,this.context=ee,this.refs=C,this.updater=W||S}M.prototype.isReactComponent={},M.prototype.setState=function(F,ee){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,ee,"setState")},M.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function E(){}E.prototype=M.prototype;function T(F,ee,W){this.props=F,this.context=ee,this.refs=C,this.updater=W||S}var R=T.prototype=new E;R.constructor=T,N(R,M.prototype),R.isPureReactComponent=!0;var _=Array.isArray;function z(){}var P={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function O(F,ee,W){var de=W.ref;return{$$typeof:e,type:F,key:ee,ref:de!==void 0?de:null,props:W}}function I(F,ee){return O(F.type,ee,F.props)}function $(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function Q(F){var ee={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(W){return ee[W]})}var Y=/\/+/g;function q(F,ee){return typeof F=="object"&&F!==null&&F.key!=null?Q(""+F.key):ee.toString(36)}function K(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(z,z):(F.status="pending",F.then(function(ee){F.status==="pending"&&(F.status="fulfilled",F.value=ee)},function(ee){F.status==="pending"&&(F.status="rejected",F.reason=ee)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function V(F,ee,W,de,oe){var be=typeof F;(be==="undefined"||be==="boolean")&&(F=null);var we=!1;if(F===null)we=!0;else switch(be){case"bigint":case"string":case"number":we=!0;break;case"object":switch(F.$$typeof){case e:case n:we=!0;break;case v:return we=F._init,V(we(F._payload),ee,W,de,oe)}}if(we)return oe=oe(F),we=de===""?"."+q(F,0):de,_(oe)?(W="",we!=null&&(W=we.replace(Y,"$&/")+"/"),V(oe,ee,W,"",function(Ce){return Ce})):oe!=null&&($(oe)&&(oe=I(oe,W+(oe.key==null||F&&F.key===oe.key?"":(""+oe.key).replace(Y,"$&/")+"/")+we)),ee.push(oe)),1;we=0;var ve=de===""?".":de+":";if(_(F))for(var re=0;re<F.length;re++)de=F[re],be=ve+q(de,re),we+=V(de,ee,W,be,oe);else if(re=k(F),typeof re=="function")for(F=re.call(F),re=0;!(de=F.next()).done;)de=de.value,be=ve+q(de,re++),we+=V(de,ee,W,be,oe);else if(be==="object"){if(typeof F.then=="function")return V(K(F),ee,W,de,oe);throw ee=String(F),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return we}function X(F,ee,W){if(F==null)return F;var de=[],oe=0;return V(F,de,"","",function(be){return ee.call(W,be,oe++)}),de}function Z(F){if(F._status===-1){var ee=F._result,W=ee();W.then(function(de){(F._status===0||F._status===-1)&&(F._status=1,F._result=de,W.status===void 0&&(W.status="fulfilled",W.value=de))},function(de){(F._status===0||F._status===-1)&&(F._status=2,F._result=de,W.status===void 0&&(W.status="rejected",W.reason=de))}),F._status===-1&&(F._status=0,F._result=W)}if(F._status===1)return F._result.default;throw F._result}var D=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(ee))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)};function se(F){var ee=P.T,W={};W.types=ee!==null?ee.types:null,P.T=W;try{var de=F(),oe=P.S;oe!==null&&oe(W,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(z,D)}catch(be){D(be)}finally{ee!==null&&W.types!==null&&(ee.types=W.types),P.T=ee}}function ne(F){var ee=P.T;if(ee!==null){var W=ee.types;W===null?ee.types=[F]:W.indexOf(F)===-1&&W.push(F)}else se(ne.bind(null,F))}var B={map:X,forEach:function(F,ee,W){X(F,function(){ee.apply(this,arguments)},W)},count:function(F){var ee=0;return X(F,function(){ee++}),ee},toArray:function(F){return X(F,function(ee){return ee})||[]},only:function(F){if(!$(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return at.Activity=p,at.Children=B,at.Component=M,at.Fragment=a,at.Profiler=o,at.PureComponent=T,at.StrictMode=r,at.Suspense=h,at.ViewTransition=j,at.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,at.__COMPILER_RUNTIME={__proto__:null,c:function(F){return P.H.useMemoCache(F)}},at.addTransitionType=ne,at.cache=function(F){return function(){return F.apply(null,arguments)}},at.cacheSignal=function(){return null},at.cloneElement=function(F,ee,W){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var de=N({},F.props),oe=F.key;if(ee!=null)for(be in ee.key!==void 0&&(oe=""+ee.key),ee)!H.call(ee,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&ee.ref===void 0||(de[be]=ee[be]);var be=arguments.length-2;if(be===1)de.children=W;else if(1<be){for(var we=Array(be),ve=0;ve<be;ve++)we[ve]=arguments[ve+2];de.children=we}return O(F.type,oe,de)},at.createContext=function(F){return F={$$typeof:d,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:c,_context:F},F},at.createElement=function(F,ee,W){var de,oe={},be=null;if(ee!=null)for(de in ee.key!==void 0&&(be=""+ee.key),ee)H.call(ee,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(oe[de]=ee[de]);var we=arguments.length-2;if(we===1)oe.children=W;else if(1<we){for(var ve=Array(we),re=0;re<we;re++)ve[re]=arguments[re+2];oe.children=ve}if(F&&F.defaultProps)for(de in we=F.defaultProps,we)oe[de]===void 0&&(oe[de]=we[de]);return O(F,be,oe)},at.createRef=function(){return{current:null}},at.forwardRef=function(F){return{$$typeof:f,render:F}},at.isValidElement=$,at.lazy=function(F){return{$$typeof:v,_payload:{_status:-1,_result:F},_init:Z}},at.memo=function(F,ee){return{$$typeof:g,type:F,compare:ee===void 0?null:ee}},at.startTransition=se,at.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},at.use=function(F){return P.H.use(F)},at.useActionState=function(F,ee,W){return P.H.useActionState(F,ee,W)},at.useCallback=function(F,ee){return P.H.useCallback(F,ee)},at.useContext=function(F){return P.H.useContext(F)},at.useDebugValue=function(){},at.useDeferredValue=function(F,ee){return P.H.useDeferredValue(F,ee)},at.useEffect=function(F,ee){return P.H.useEffect(F,ee)},at.useEffectEvent=function(F){return P.H.useEffectEvent(F)},at.useId=function(){return P.H.useId()},at.useImperativeHandle=function(F,ee,W){return P.H.useImperativeHandle(F,ee,W)},at.useInsertionEffect=function(F,ee){return P.H.useInsertionEffect(F,ee)},at.useLayoutEffect=function(F,ee){return P.H.useLayoutEffect(F,ee)},at.useMemo=function(F,ee){return P.H.useMemo(F,ee)},at.useOptimistic=function(F,ee){return P.H.useOptimistic(F,ee)},at.useReducer=function(F,ee,W){return P.H.useReducer(F,ee,W)},at.useRef=function(F){return P.H.useRef(F)},at.useState=function(F){return P.H.useState(F)},at.useSyncExternalStore=function(F,ee,W){return P.H.useSyncExternalStore(F,ee,W)},at.useTransition=function(){return P.H.useTransition()},at.version="19.3.0",at}var Rx;function f1(){return Rx||(Rx=1,vp.exports=v7()),vp.exports}var w=f1();const y7=d1(w),Zc=m7({__proto__:null,default:y7},[w]);var yp={exports:{}},_c={},xp={exports:{}},bp={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var zx;function x7(){return zx||(zx=1,(function(e){function n(K,V){var X=K.length;K.push(V);e:for(;0<X;){var Z=X-1>>>1,D=K[Z];if(0<o(D,V))K[Z]=V,K[X]=D,X=Z;else break e}}function a(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var V=K[0],X=K.pop();if(X!==V){K[0]=X;e:for(var Z=0,D=K.length,se=D>>>1;Z<se;){var ne=2*(Z+1)-1,B=K[ne],F=ne+1,ee=K[F];if(0>o(B,X))F<D&&0>o(ee,B)?(K[Z]=ee,K[F]=X,Z=F):(K[Z]=B,K[ne]=X,Z=ne);else if(F<D&&0>o(ee,X))K[Z]=ee,K[F]=X,Z=F;else break e}}return V}function o(K,V){var X=K.sortIndex-V.sortIndex;return X!==0?X:K.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var h=[],g=[],v=1,p=null,j=3,b=!1,k=!1,S=!1,N=!1,C=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function T(K){for(var V=a(g);V!==null;){if(V.callback===null)r(g);else if(V.startTime<=K)r(g),V.sortIndex=V.expirationTime,n(h,V);else break;V=a(g)}}function R(K){if(S=!1,T(K),!k)if(a(h)!==null)k=!0,_||(_=!0,$());else{var V=a(g);V!==null&&q(R,V.startTime-K)}}var _=!1,z=-1,P=5,H=-1;function O(){return N?!0:!(e.unstable_now()-H<P)}function I(){if(N=!1,_){var K=e.unstable_now();H=K;var V=!0;try{e:{k=!1,S&&(S=!1,M(z),z=-1),b=!0;var X=j;try{t:{for(T(K),p=a(h);p!==null&&!(p.expirationTime>K&&O());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,j=p.priorityLevel;var D=Z(p.expirationTime<=K);if(K=e.unstable_now(),typeof D=="function"){p.callback=D,T(K),V=!0;break t}p===a(h)&&r(h),T(K)}else r(h);p=a(h)}if(p!==null)V=!0;else{var se=a(g);se!==null&&q(R,se.startTime-K),V=!1}}break e}finally{p=null,j=X,b=!1}V=void 0}}finally{V?$():_=!1}}}var $;if(typeof E=="function")$=function(){E(I)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,Y=Q.port2;Q.port1.onmessage=I,$=function(){Y.postMessage(null)}}else $=function(){C(I,0)};function q(K,V){z=C(function(){K(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function(K){switch(j){case 1:case 2:case 3:var V=3;break;default:V=j}var X=j;j=V;try{return K()}finally{j=X}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(K,V){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var X=j;j=K;try{return V()}finally{j=X}},e.unstable_scheduleCallback=function(K,V,X){var Z=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?Z+X:Z):X=Z,K){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=X+D,K={id:v++,callback:V,priorityLevel:K,startTime:X,expirationTime:D,sortIndex:-1},X>Z?(K.sortIndex=X,n(g,K),a(h)===null&&K===a(g)&&(S?(M(z),z=-1):S=!0,q(R,X-Z))):(K.sortIndex=D,n(h,K),k||b||(k=!0,_||(_=!0,$()))),K},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(K){var V=j;return function(){var X=j;j=V;try{return K.apply(this,arguments)}finally{j=X}}}})(bp)),bp}var Ox;function b7(){return Ox||(Ox=1,xp.exports=x7()),xp.exports}var jp={exports:{}},Jn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Dx;function j7(){if(Dx)return Jn;Dx=1;var e=f1();function n(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)p+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+v+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal"),c=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function f(v,p,j){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:b===d?d:""+b,children:v,containerInfo:p,implementation:j}}var h=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(v,p){if(v==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Jn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Jn.browser=function(v){return{$$typeof:c,_reason:v}},Jn.createPortal=function(v,p){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return f(v,p,null,j)},Jn.flushSync=function(v){var p=h.T,j=r.p;try{if(h.T=null,r.p=2,v)return v()}finally{h.T=p,r.p=j,r.d.f()}},Jn.preconnect=function(v,p){typeof v=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(v,p))},Jn.prefetchDNS=function(v){typeof v=="string"&&r.d.D(v)},Jn.preinit=function(v,p){if(typeof v=="string"&&p&&typeof p.as=="string"){var j=p.as,b=g(j,p.crossOrigin),k=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;j==="style"?r.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:k,fetchPriority:S}):j==="script"&&r.d.X(v,{crossOrigin:b,integrity:k,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Jn.preinitModule=function(v,p){if(typeof v=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var j=g(p.as,p.crossOrigin);r.d.M(v,{crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}}else p==null&&r.d.M(v)},Jn.preload=function(v,p){if(typeof v=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var j=p.as,b=g(j,p.crossOrigin);r.d.L(v,j,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Jn.preloadModule=function(v,p){if(typeof v=="string")if(p){var j=g(p.as,p.crossOrigin);r.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}else r.d.m(v)},Jn.requestFormReset=function(v){r.d.r(v)},Jn.unstable_batchedUpdates=function(v,p){return v(p)},Jn.useFormState=function(v,p,j){return h.H.useFormState(v,p,j)},Jn.useFormStatus=function(){return h.H.useHostTransitionStatus()},Jn.version="19.3.0",Jn}var Lx;function h4(){if(Lx)return jp.exports;Lx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),jp.exports=j7(),jp.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Bx;function w7(){if(Bx)return _c;Bx=1;var e=b7(),n=f1(),a=h4();function r(t){var i="https://react.dev/errors/"+t;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){for(var i=t,s=i;s&&!s.alternate;)i=s,(i.flags&4098)!==0&&(t=i.return),s=i.return;for(;i.return;)i=i.return;return i.tag===3?t:null}function d(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function f(t){if(t.tag===31){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function h(t){if(c(t)!==t)throw Error(r(188))}function g(t){var i=t.alternate;if(!i){if(i=c(t),i===null)throw Error(r(188));return i!==t?null:t}for(var s=t,u=i;;){var m=s.return;if(m===null)break;var x=m.alternate;if(x===null){if(u=m.return,u!==null){s=u;continue}break}if(m.child===x.child){for(x=m.child;x;){if(x===s)return h(m),t;if(x===u)return h(m),i;x=x.sibling}throw Error(r(188))}if(s.return!==u.return)s=m,u=x;else{for(var A=!1,L=m.child;L;){if(L===s){A=!0,s=m,u=x;break}if(L===u){A=!0,u=m,s=x;break}L=L.sibling}if(!A){for(L=x.child;L;){if(L===s){A=!0,s=x,u=m;break}if(L===u){A=!0,u=x,s=m;break}L=L.sibling}if(!A)throw Error(r(189))}}if(s.alternate!==u)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?t:i}function v(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t;for(t=t.child;t!==null;){if(i=v(t),i!==null)return i;t=t.sibling}return null}function p(t,i,s,u,m,x){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&s(t,u,m,x)||(t.tag!==22||t.memoizedState===null)&&(i||t.tag!==5&&t.tag!==27)&&p(t.child,i,s,u,m,x))return!0;t=t.sibling}return!1}function j(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function b(t){var i=!1;for(t=t.return;t!==null&&(t.tag===4&&(i=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return i}function k(t){var i=[null,null],s=j(t);return s===null||S(i,t,s.child,{foundSelf:!1}),i}function S(t,i,s,u){for(;s!==null;){if(s===i)u.foundSelf=!0;else if(s.tag===5||s.tag===27||s.tag===6){if(u.foundSelf)return t[1]=s,!0;t[0]=s}else if((s.tag!==22||s.memoizedState===null)&&S(t,i,s.child,u))return!0;s=s.sibling}return!1}function N(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(r(559))}}var C=null,M=null;function E(t,i,s){return t===s?!0:t===i?(C=t,!0):!1}function T(t,i,s){return t===s?(M=t,!1):t===i?(M!==null&&(C=t),!0):!1}function R(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function _(t,i,s){for(var u=0,m=t;m;m=s(m))u++;m=0;for(var x=i;x;x=s(x))m++;for(;0<u-m;)t=s(t),u--;for(;0<m-u;)i=s(i),m--;for(;u--;){if(t===i||i!==null&&t===i.alternate)return t;t=s(t),i=s(i)}return null}var z=Object.assign,P=Symbol.for("react.element"),H=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),q=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),ne=Symbol.for("react.legacy_hidden"),B=Symbol.for("react.memo_cache_sentinel"),F=Symbol.for("react.view_transition"),ee=Symbol.for("react.recoverable"),W=Symbol.iterator;function de(t){return t===null||typeof t!="object"?null:(t=W&&t[W]||t["@@iterator"],typeof t=="function"?t:null)}var oe=Symbol.for("react.client.reference");function be(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===oe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case I:return"Fragment";case Q:return"Profiler";case $:return"StrictMode";case V:return"Suspense";case X:return"SuspenseList";case se:return"Activity";case F:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case O:return"Portal";case q:return t.displayName||"Context";case Y:return(t._context.displayName||"Context")+".Consumer";case K:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return i=t.displayName||null,i!==null?i:be(t.type)||"Memo";case D:i=t._payload,t=t._init;try{return be(t(i))}catch{}}return null}var we=Array.isArray,ve=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ce={pending:!1,data:null,method:null,action:null},Ve=[],He=-1;function Ze(t){return{current:t}}function Fe(t){0>He||(t.current=Ve[He],Ve[He]=null,He--)}function Ke(t,i){He++,Ve[He]=t.current,t.current=i}var gt=Ze(null),qt=Ze(null),Zt=Ze(null),en=Ze(null);function kn(t,i){switch(Ke(Zt,i),Ke(qt,t),Ke(gt,null),i.nodeType){case 9:case 11:t=(t=i.documentElement)&&(t=t.namespaceURI)?Dy(t):0;break;default:if(t=i.tagName,i=i.namespaceURI)i=Dy(i),t=Ly(i,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Fe(gt),Ke(gt,t)}function vn(){Fe(gt),Fe(qt),Fe(Zt)}function rn(t){var i=t.memoizedState;i!==null&&(mo._currentValue=i.memoizedState,Ke(en,t)),i=gt.current;var s=Ly(i,t.type);i!==s&&(Ke(qt,t),Ke(gt,s))}function ge(t){qt.current===t&&(Fe(gt),Fe(qt)),en.current===t&&(Fe(en),mo._currentValue=Ce)}var Me,Xe;function Je(t){if(Me===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Me=i&&i[1]||"",Xe=-1<s.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Me+t+Xe}var rt=!1;function Jt(t,i){if(!t||rt)return"";rt=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ze){var te=ze}Reflect.construct(t,[],xe)}else{try{xe.call()}catch(ze){te=ze}xe=!1;try{var ce=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),xe=!0,new t}finally{xe&&(ce!==void 0?Object.defineProperty(t.prototype,"props",ce):delete t.prototype.props)}}}else{try{throw Error()}catch(ze){te=ze}(xe=t())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(ze){if(ze&&te&&typeof ze.stack=="string")return[ze.stack,te.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=u.DetermineComponentFrameRoot(),A=x[0],L=x[1];if(A&&L){var G=A.split(`
|
|
44
|
+
`),ae=L.split(`
|
|
45
|
+
`);for(m=u=0;u<G.length&&!G[u].includes("DetermineComponentFrameRoot");)u++;for(;m<ae.length&&!ae[m].includes("DetermineComponentFrameRoot");)m++;if(u===G.length||m===ae.length)for(u=G.length-1,m=ae.length-1;1<=u&&0<=m&&G[u]!==ae[m];)m--;for(;1<=u&&0<=m;u--,m--)if(G[u]!==ae[m]){if(u!==1||m!==1)do if(u--,m--,0>m||G[u]!==ae[m]){var fe=`
|
|
46
|
+
`+G[u].replace(" at new "," at ");return t.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",t.displayName)),fe}while(1<=u&&0<=m);break}}}finally{rt=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Je(s):""}function An(t,i){switch(t.tag){case 26:case 27:case 5:return Je(t.type);case 16:return Je("Lazy");case 13:return t.child!==i&&i!==null?Je("Suspense Fallback"):Je("Suspense");case 19:return Je("SuspenseList");case 0:case 15:return Jt(t.type,!1);case 11:return Jt(t.type.render,!1);case 1:return Jt(t.type,!0);case 31:return Je("Activity");case 30:return Je("ViewTransition");default:return""}}function dn(t){try{var i="",s=null;do i+=An(t,s),s=t,t=t.return;while(t);return i}catch(u){return`
|
|
47
|
+
Error generating stack: `+u.message+`
|
|
48
|
+
`+u.stack}}var Ln=Object.prototype.hasOwnProperty,me=e.unstable_scheduleCallback,Ne=e.unstable_cancelCallback,_e=e.unstable_shouldYield,Be=e.unstable_requestPaint,Oe=e.unstable_now,dt=e.unstable_getCurrentPriorityLevel,ti=e.unstable_ImmediatePriority,_n=e.unstable_UserBlockingPriority,yn=e.unstable_NormalPriority,sr=e.unstable_LowPriority,Ra=e.unstable_IdlePriority,Kr=e.log,or=e.unstable_setDisableYieldValue,Gt=null,xn=null;function Yt(t){if(typeof Kr=="function"&&or(t),xn&&typeof xn.setStrictMode=="function")try{xn.setStrictMode(Gt,t)}catch{}}var ln=Math.clz32?Math.clz32:ha,Ii=Math.log,Ci=Math.LN2;function ha(t){return t>>>=0,t===0?32:31-(Ii(t)/Ci|0)|0}var Ni=256,Pi=262144,ui=4194304;function Ji(t){var i=t&42;if(i!==0)return i;switch(t&-t){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 t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ft(t,i,s){var u=t.pendingLanes;if(u===0)return 0;var m=0,x=t.suspendedLanes,A=t.pingedLanes;t=t.warmLanes;var L=u&134217727;return L!==0?(u=L&~x,u!==0?m=Ji(u):(A&=L,A!==0?m=Ji(A):s||(s=L&~t,s!==0&&(m=Ji(s))))):(L=u&~x,L!==0?m=Ji(L):A!==0?m=Ji(A):s||(s=u&~t,s!==0&&(m=Ji(s)))),m===0?0:i!==0&&i!==m&&(i&x)===0&&(x=m&-m,s=i&-i,x>=s||x===32&&(s&4194048)!==0)?i:m}function ni(t,i){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&i)===0}function za(t,i){(i&8)!==0&&(i|=i&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=i;0<s;){var u=31-ln(s),m=1<<u;i|=t[u],s&=~m}return i}function cr(t,i){switch(t){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 di(){var t=ui;return ui<<=1,(ui&62914560)===0&&(ui=4194304),t}function fi(t){for(var i=[],s=0;31>s;s++)i.push(t);return i}function ma(t,i){t.pendingLanes|=i,i!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function $n(t,i,s,u,m,x){var A=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var L=t.entanglements,G=t.expirationTimes,ae=t.hiddenUpdates;for(s=A&~s;0<s;){var fe=31-ln(s),xe=1<<fe;L[fe]=0,G[fe]=-1;var te=ae[fe];if(te!==null)for(ae[fe]=null,fe=0;fe<te.length;fe++){var ce=te[fe];ce!==null&&(ce.lane&=-536870913)}s&=~xe}u!==0&&hi(t,u,0),x!==0&&m===0&&t.tag!==0&&(t.suspendedLanes|=x&~(A&~i))}function hi(t,i,s){t.pendingLanes|=i,t.suspendedLanes&=~i;var u=31-ln(i);t.entangledLanes|=i,t.entanglements[u]=t.entanglements[u]|1073741824|s&261930}function ur(t,i){var s=t.entangledLanes|=i;for(t=t.entanglements;s;){var u=31-ln(s),m=1<<u;m&i|t[u]&i&&(t[u]|=i),s&=~m}}function dr(t,i){var s=i&-i;return s=(s&42)!==0?1:pa(s),(s&(t.suspendedLanes|i))!==0?0:s}function pa(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function mi(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ei(){var t=re.p;return t!==0?t:(t=window.event,t===void 0?32:xx(t.type))}function fr(t,i){var s=re.p;try{return re.p=t,i()}finally{re.p=s}}var tn=Math.random().toString(36).slice(2),Wt="__reactFiber$"+tn,Rn="__reactProps$"+tn,ii="__reactContainer$"+tn,Hl="__reactEvents$"+tn,Xr="__reactListeners$"+tn,Qr="__reactHandles$"+tn,Oa="__reactResources$"+tn,hr="__reactMarker$"+tn,Zr="__reactLoad$"+tn;function Jr(t){delete t[Wt],delete t[Rn],delete t[Xr],delete t[Qr]}function Hi(t){var i;if(i=t[Wt])return i;for(var s=t.parentNode;s;){if(i=s[ii]||s[Wt]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(t=Wy(t);t!==null;){if(s=t[Wt])return s;t=Wy(t)}return i}t=s,s=t.parentNode}return null}function Wi(t){if(t=t[Wt]||t[ii]){var i=t.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return t}return null}function ue(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t.stateNode;throw Error(r(33))}function ke(t){var i=t[Oa];return i||(i=t[Oa]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function je(t){t[hr]=!0}function De(t){t[Zr]=void 0}var it=new Set,et={};function st(t,i){yt(t,i),yt(t+"Capture",i)}function yt(t,i){for(et[t]=i,t=0;t<i.length;t++)it.add(i[t])}var _t=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]*$"),Ye={},nt={};function xt(t){return Ln.call(nt,t)?!0:Ln.call(Ye,t)?!1:_t.test(t)?nt[t]=!0:(Ye[t]=!0,!1)}var Ge=!1;function bn(){var t=Ge;return Ge=!1,t}function Ot(t,i,s){if(xt(i))if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(i);return}}t.setAttribute(i,s)}}function pi(t,i,s){if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttribute(i,s)}}function fn(t,i,s,u){if(u===null)t.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(i,s,u)}}function sn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function mr(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Wr(t,i,s){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);if(!t.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,x=u.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return m.call(this)},set:function(A){s=""+A,x.call(this,A)}}),Object.defineProperty(t,i,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(A){s=""+A},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function ea(t){if(!t._valueTracker){var i=mr(t)?"checked":"value";t._valueTracker=Wr(t,i,""+t[i])}}function pr(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var s=i.getValue(),u="";return t&&(u=mr(t)?t.checked?"true":"false":t.value),t=u,t!==s?(i.setValue(t),!0):!1}var ql=/[\n"\\]/g;function U(t){return t.replace(ql,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function pe(t,i,s,u,m,x,A,L){t.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?t.type=A:t.removeAttribute("type"),i!=null?A==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+sn(i)):t.value!==""+sn(i)&&(t.value=""+sn(i)):A!=="submit"&&A!=="reset"||t.removeAttribute("value"),i!=null?A==="number"&&t.value==i?ot(t,sn(t.value)):ot(t,sn(i)):s!=null?ot(t,sn(s)):u!=null&&t.removeAttribute("value"),m==null&&x!=null&&(t.defaultChecked=!!x),m!=null&&(t.checked=m&&typeof m!="function"&&typeof m!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?t.name=""+sn(L):t.removeAttribute("name")}function Ae(t,i,s,u,m,x,A,L){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.type=x),i!=null||s!=null){if(!(x!=="submit"&&x!=="reset"||i!=null)){ea(t);return}s=s!=null?""+sn(s):"",i=i!=null?""+sn(i):s,L||i===t.value||(t.value=i),t.defaultValue=i}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=L?t.checked:!!u,t.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(t.name=A),ea(t)}function ot(t,i){t.defaultValue!==""+i&&(t.defaultValue=""+i)}function ht(t,i,s,u){if(t=t.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<t.length;s++)m=i.hasOwnProperty("$"+t[s].value),t[s].selected!==m&&(t[s].selected=m),m&&u&&(t[s].defaultSelected=!0)}else{for(s=""+sn(s),i=null,m=0;m<t.length;m++){if(t[m].value===s){t[m].selected=!0,u&&(t[m].defaultSelected=!0);return}i!==null||t[m].disabled||(i=t[m])}i!==null&&(i.selected=!0)}}function hn(t,i,s){if(i!=null&&(i=""+sn(i),i!==t.value&&(t.value=i),s==null)){t.defaultValue!==i&&(t.defaultValue=i);return}t.defaultValue=s!=null?""+sn(s):""}function Ue(t,i,s,u){if(i==null){if(u!=null){if(s!=null)throw Error(r(92));if(we(u)){if(1<u.length)throw Error(r(93));u=u[0]}s=u}s==null&&(s=""),i=s}s=sn(i),t.defaultValue=s,u=t.textContent,u===s&&u!==""&&u!==null&&(t.value=u),ea(t)}function mt(t,i){if(i){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=i;return}}t.textContent=i}var Ft=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 Kt(t,i,s){var u=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="":u?t.setProperty(i,s):typeof s!="number"||s===0||Ft.has(i)?i==="float"?t.cssFloat=s:t[i]=(""+s).trim():t[i]=s+"px"}function mn(t,i,s){if(i!=null&&typeof i!="object")throw Error(r(62));if(t=t.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="",Ge=!0);for(var m in i)u=i[m],i.hasOwnProperty(m)&&s[m]!==u&&(Kt(t,m,u),Ge=!0)}else for(var x in i)i.hasOwnProperty(x)&&Kt(t,x,i[x])}function Bn(t){if(t.indexOf("-")===-1)return!1;switch(t){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 ai=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"],["maskType","mask-type"],["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"]]),Fo=/^[\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 Vn(t){return Fo.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function gi(){}var Fl=null;function Ul(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Et=null,In=null;function ta(t){var i=Wi(t);if(i&&(t=i.stateNode)){var s=t[Rn]||null;e:switch(t=i.stateNode,i.type){case"input":if(pe(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+U(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var u=s[i];if(u!==t&&u.form===t.form){var m=u[Rn]||null;if(!m)throw Error(r(90));pe(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)u=s[i],u.form===t.form&&pr(u)}break e;case"textarea":hn(t,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&ht(t,!!s.multiple,i,!1)}}}var qi=!1;function $l(t,i,s){if(qi)return t(i,s);qi=!0;try{var u=t(i);return u}finally{if(qi=!1,(Et!==null||In!==null)&&(cd(),Et&&(i=Et,t=In,In=Et=null,ta(i),t)))for(i=0;i<t.length;i++)ta(t[i])}}function gr(t,i){var s=t.stateNode;if(s===null)return null;var u=s[Rn]||null;if(u===null)return null;s=u[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(r(231,i,typeof s));return s}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vl=!1;if(Gn)try{var Uo={};Object.defineProperty(Uo,"passive",{get:function(){Vl=!0}}),window.addEventListener("test",Uo,Uo),window.removeEventListener("test",Uo,Uo)}catch{Vl=!1}var el=null,Wf=null,uu=null;function _g(){if(uu)return uu;var t,i=Wf,s=i.length,u,m="value"in el?el.value:el.textContent,x=m.length;for(t=0;t<s&&i[t]===m[t];t++);var A=s-t;for(u=1;u<=A&&i[s-u]===m[x-u];u++);return uu=m.slice(t,1<u?1-u:void 0)}function du(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function fu(){return!0}function Rg(){return!1}function vi(t){function i(s,u,m,x,A){this._reactName=s,this._targetInst=m,this.type=u,this.nativeEvent=x,this.target=A,this.currentTarget=null;for(var L in t)t.hasOwnProperty(L)&&(s=t[L],this[L]=s?s(x):x[L]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?fu:Rg,this.isPropagationStopped=Rg,this}return z(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=fu)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=fu)},persist:function(){},isPersistent:fu}),i}var tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hu=vi(tl),$o=z({},tl,{view:0,detail:0}),B6=vi($o),eh,th,Vo,mu=z({},$o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ih,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vo&&(Vo&&t.type==="mousemove"?(eh=t.screenX-Vo.screenX,th=t.screenY-Vo.screenY):th=eh=0,Vo=t),eh)},movementY:function(t){return"movementY"in t?t.movementY:th}}),zg=vi(mu),I6=z({},mu,{dataTransfer:0}),P6=vi(I6),H6=z({},$o,{relatedTarget:0}),nh=vi(H6),q6=z({},tl,{animationName:0,elapsedTime:0,pseudoElement:0}),F6=vi(q6),U6=z({},tl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),$6=vi(U6),V6=z({},tl,{data:0}),Og=vi(V6),G6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y6={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"},K6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X6(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=K6[t])?!!i[t]:!1}function ih(){return X6}var Q6=z({},$o,{key:function(t){if(t.key){var i=G6[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=du(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Y6[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ih,charCode:function(t){return t.type==="keypress"?du(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?du(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Z6=vi(Q6),J6=z({},mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dg=vi(J6),W6=z({},tl,{submitter:0}),e8=vi(W6),t8=z({},$o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ih}),n8=vi(t8),i8=z({},tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),a8=vi(i8),r8=z({},mu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),l8=vi(r8),s8=z({},tl,{newState:0,oldState:0,source:0}),o8=vi(s8),c8=[9,13,27,32],ah=Gn&&"CompositionEvent"in window,Go=null;Gn&&"documentMode"in document&&(Go=document.documentMode);var u8=Gn&&"TextEvent"in window&&!Go,Lg=Gn&&(!ah||Go&&8<Go&&11>=Go),Bg=" ",Ig=!1;function Pg(t,i){switch(t){case"keyup":return c8.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ds=!1;function d8(t,i){switch(t){case"compositionend":return Hg(i);case"keypress":return i.which!==32?null:(Ig=!0,Bg);case"textInput":return t=i.data,t===Bg&&Ig?null:t;default:return null}}function f8(t,i){if(Ds)return t==="compositionend"||!ah&&Pg(t,i)?(t=_g(),uu=Wf=el=null,Ds=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Lg&&i.locale!=="ko"?null:i.data;default:return null}}var h8={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 qg(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!h8[t.type]:i==="textarea"}function Fg(t,i,s,u){Et?In?In.push(u):In=[u]:Et=u,i=pd(i,"onChange"),0<i.length&&(s=new hu("onChange","change",null,s,u),t.push({event:s,listeners:i}))}var Yo=null,Ko=null;function m8(t){My(t,0)}function pu(t){var i=ue(t);if(pr(i))return t}function Ug(t,i){if(t==="change")return i}var $g=!1;if(Gn){var rh;if(Gn){var lh="oninput"in document;if(!lh){var Vg=document.createElement("div");Vg.setAttribute("oninput","return;"),lh=typeof Vg.oninput=="function"}rh=lh}else rh=!1;$g=rh&&(!document.documentMode||9<document.documentMode)}function Gg(){Yo&&(Yo.detachEvent("onpropertychange",Yg),Ko=Yo=null)}function Yg(t){if(t.propertyName==="value"&&pu(Ko)){var i=[];Fg(i,Ko,t,Ul(t)),$l(m8,i)}}function p8(t,i,s){t==="focusin"?(Gg(),Yo=i,Ko=s,Yo.attachEvent("onpropertychange",Yg)):t==="focusout"&&Gg()}function g8(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return pu(Ko)}function v8(t,i){if(t==="click")return pu(i)}function y8(t,i){if(t==="input"||t==="change")return pu(i)}function x8(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var Fi=typeof Object.is=="function"?Object.is:x8;function Xo(t,i){if(Fi(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var s=Object.keys(t),u=Object.keys(i);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var m=s[u];if(!Ln.call(i,m)||!Fi(t[m],i[m]))return!1}return!0}function sh(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Kg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Xg(t,i){var s=Kg(t);t=0;for(var u;s;){if(s.nodeType===3){if(u=t+s.textContent.length,t<=i&&u>=i)return{node:s,offset:i-t};t=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Kg(s)}}function Qg(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?Qg(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function Zg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var i=sh(t.document);i instanceof t.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)t=i.contentWindow;else break;i=sh(t.document)}return i}function oh(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}var b8=Gn&&"documentMode"in document&&11>=document.documentMode,Ls=null,ch=null,Qo=null,uh=!1;function Jg(t,i,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;uh||Ls==null||Ls!==sh(u)||(u=Ls,"selectionStart"in u&&oh(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Qo&&Xo(Qo,u)||(Qo=u,u=pd(ch,"onSelect"),0<u.length&&(i=new hu("onSelect","select",null,i,s),t.push({event:i,listeners:u}),i.target=Ls)))}function Gl(t,i){var s={};return s[t.toLowerCase()]=i.toLowerCase(),s["Webkit"+t]="webkit"+i,s["Moz"+t]="moz"+i,s}var Bs={animationend:Gl("Animation","AnimationEnd"),animationiteration:Gl("Animation","AnimationIteration"),animationstart:Gl("Animation","AnimationStart"),transitionrun:Gl("Transition","TransitionRun"),transitionstart:Gl("Transition","TransitionStart"),transitioncancel:Gl("Transition","TransitionCancel"),transitionend:Gl("Transition","TransitionEnd")},dh={},Wg={};Gn&&(Wg=document.createElement("div").style,"AnimationEvent"in window||(delete Bs.animationend.animation,delete Bs.animationiteration.animation,delete Bs.animationstart.animation),"TransitionEvent"in window||delete Bs.transitionend.transition);function Yl(t){if(dh[t])return dh[t];if(!Bs[t])return t;var i=Bs[t],s;for(s in i)if(i.hasOwnProperty(s)&&s in Wg)return dh[t]=i[s];return t}var ev=Yl("animationend"),tv=Yl("animationiteration"),nv=Yl("animationstart"),j8=Yl("transitionrun"),w8=Yl("transitionstart"),k8=Yl("transitioncancel"),iv=Yl("transitionend"),av=new Map,fh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");fh.push("scrollEnd");function ga(t,i){av.set(t,i),st(i,[t])}var S8=0;function vr(t,i){if(t.name!=null&&t.name!=="auto")return t.name;if(i.autoName!==null)return i.autoName;t=ba.identifierPrefix;var s=S8++;return t="_"+t+"t_"+s.toString(32)+"_",i.autoName=t}function rv(t){if(t==null||typeof t=="string")return t;var i=null,s=io;if(s!==null)for(var u=0;u<s.length;u++){var m=t[s[u]];if(m!=null){if(m==="none")return"none";i=i==null?m:i+(" "+m)}}return i??t.default}function yr(t,i){return t=rv(t),i=rv(i),i==null?t==="auto"?null:t:i==="auto"?null:i}var gu=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},na=[],Is=0,hh=0;function vu(){for(var t=Is,i=hh=Is=0;i<t;){var s=na[i];na[i++]=null;var u=na[i];na[i++]=null;var m=na[i];na[i++]=null;var x=na[i];if(na[i++]=null,u!==null&&m!==null){var A=u.pending;A===null?m.next=m:(m.next=A.next,A.next=m),u.pending=m}x!==0&&lv(s,m,x)}}function yu(t,i,s,u){na[Is++]=t,na[Is++]=i,na[Is++]=s,na[Is++]=u,hh|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function mh(t,i,s,u){return yu(t,i,s,u),xu(t)}function Kl(t,i){return yu(t,null,null,i),xu(t)}function lv(t,i,s){t.lanes|=s;var u=t.alternate;u!==null&&(u.lanes|=s);for(var m=!1,x=t.return;x!==null;)x.childLanes|=s,u=x.alternate,u!==null&&(u.childLanes|=s),x.tag===22&&(t=x.stateNode,t===null||t._visibility&1||(m=!0)),t=x,x=x.return;return t.tag===3?(x=t.stateNode,m&&i!==null&&(m=31-ln(s),t=x.hiddenUpdates,u=t[m],u===null?t[m]=[i]:u.push(i),i.lane=s|536870912),x):null}function xu(t){if(50<yc)throw yc=0,od=null,Error(r(185));for(var i=t.return;i!==null;)t=i,i=t.return;return t.tag===3?t.stateNode:null}var Ps={};function C8(t,i,s,u){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ti(t,i,s,u){return new C8(t,i,s,u)}function ph(t){return t=t.prototype,!(!t||!t.isReactComponent)}function xr(t,i){var s=t.alternate;return s===null?(s=Ti(t.tag,i,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=i,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&1206910976,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,i=t.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function sv(t,i){t.flags&=1206910978;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=i,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,i=s.dependencies,t.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t}function bu(t,i,s,u,m,x){var A=0;if(u=t,typeof u=="function")ph(u)&&(A=1);else if(typeof u=="string")A=WC(t,s,gt.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(u){case se:return t=Ti(31,s,i,m),t.elementType=se,t.lanes=x,t;case I:return Xl(s.children,m,x,i);case $:A=8,m|=24;break;case Q:return t=Ti(12,s,i,m|2),t.elementType=Q,t.lanes=x,t;case V:return t=Ti(13,s,i,m),t.elementType=V,t.lanes=x,t;case X:return t=Ti(19,s,i,m),t.elementType=X,t.lanes=x,t;case ne:case F:return t=m|32,t=Ti(30,s,i,t),t.elementType=F,t.lanes=x,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case q:A=10;break e;case Y:A=9;break e;case K:A=11;break e;case Z:A=14;break e;case D:A=16,u=null;break e}A=29,s=Error(r(130,t===null?"null":typeof t,"")),u=null}return i=Ti(A,s,i,m),i.elementType=t,i.type=u,i.lanes=x,i}function Xl(t,i,s,u){return t=Ti(7,t,u,i),t.lanes=s,t}function gh(t,i,s){return t=Ti(6,t,null,i),t.lanes=s,t}function ov(t){var i=Ti(18,null,null,0);return i.stateNode=t,i}function vh(t,i,s){return i=Ti(4,t.children!==null?t.children:[],t.key,i),i.lanes=s,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}var cv=new WeakMap;function ia(t,i){if(typeof t=="object"&&t!==null){var s=cv.get(t);return s!==void 0?s:(i={value:t,source:i,stack:dn(i)},cv.set(t,i),i)}return{value:t,source:i,stack:dn(i)}}var Hs=[],qs=0,ju=null,Zo=0,aa=[],ra=0,nl=null,Da=1,La="";function br(t,i){Hs[qs++]=Zo,Hs[qs++]=ju,ju=t,Zo=i}function uv(t,i,s){aa[ra++]=Da,aa[ra++]=La,aa[ra++]=nl,nl=t;var u=Da;t=La;var m=32-ln(u)-1;u&=~(1<<m),s+=1;var x=32-ln(i)+m;if(30<x){var A=m-m%5;x=(u&(1<<A)-1).toString(32),u>>=A,m-=A,Da=1<<32-ln(i)+m|s<<m|u,La=x+t}else Da=1<<x|s<<m|u,La=t}function wu(t){t.return!==null&&(br(t,1),uv(t,1,0))}function yh(t){for(;t===ju;)ju=Hs[--qs],Hs[qs]=null,Zo=Hs[--qs],Hs[qs]=null;for(;t===nl;)nl=aa[--ra],aa[ra]=null,La=aa[--ra],aa[ra]=null,Da=aa[--ra],aa[ra]=null}function dv(t,i){aa[ra++]=Da,aa[ra++]=La,aa[ra++]=nl,Da=i.id,La=i.overflow,nl=t}var Pn=null,Xt=null,pt=!1,il=null,la=!1,xh=Error(r(519));function al(t){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Jo(ia(i,t)),xh}function fv(t){var i=t.stateNode,s=t.type,u=t.memoizedProps;switch(i[Wt]=t,i[Rn]=u,s){case"dialog":jt("cancel",i),jt("close",i);break;case"iframe":case"object":case"embed":jt("load",i);break;case"video":case"audio":for(s=0;s<bc.length;s++)jt(bc[s],i);break;case"source":jt("error",i);break;case"img":case"image":case"link":jt("error",i),jt("load",i);break;case"details":jt("toggle",i);break;case"input":jt("invalid",i),Ae(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":jt("invalid",i);break;case"textarea":jt("invalid",i),Ue(i,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||u.suppressHydrationWarning===!0||zy(i.textContent,s)?(u.popover!=null&&(jt("beforetoggle",i),jt("toggle",i)),u.onScroll!=null&&jt("scroll",i),u.onScrollEnd!=null&&jt("scrollend",i),u.onClick!=null&&(i.onclick=gi),i=!0):i=!1,i||al(t,!0)}function ku(t){for(Pn=t.return;Pn;)switch(Pn.tag){case 5:case 31:case 13:la=!1;return;case 27:case 3:la=!0;return;default:Pn=Pn.return}}function Fs(t){if(t!==Pn)return!1;if(!pt)return ku(t),pt=!0,!1;var i=t.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||Xm(t.type,t.memoizedProps)),s=!s),s&&Xt&&al(t),ku(t),i===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Xt=Jy(t)}else if(i===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Xt=Jy(t)}else i===27?(i=Xt,bl(t.type)?(t=ap,ap=null,Xt=t):Xt=i):Xt=Pn?oa(t.stateNode.nextSibling):null;return!0}function Ql(){Xt=Pn=null,pt=!1}function bh(){var t=il;return t!==null&&(_i===null?_i=t:_i.push.apply(_i,t),il=null),t}function Jo(t){il===null?il=[t]:il.push(t)}var jh=Ze(null),Zl=null,jr=null;function rl(t,i,s){Ke(jh,i._currentValue),i._currentValue=s}function wr(t){t._currentValue=jh.current,Fe(jh)}function Su(t,i,s){for(;t!==null;){var u=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),t===s)break;t=t.return}}function wh(t,i,s,u){var m=t.child;for(m!==null&&(m.return=t);m!==null;){var x=m.dependencies;if(x!==null){var A=m.child;x=x.firstContext;e:for(;x!==null;){var L=x;x=m;for(var G=0;G<i.length;G++)if(L.context===i[G]){x.lanes|=s,L=x.alternate,L!==null&&(L.lanes|=s),Su(x.return,s,t),u||(A=null);break e}x=L.next}}else if(m.tag===18){if(A=m.return,A===null)throw Error(r(341));A.lanes|=s,x=A.alternate,x!==null&&(x.lanes|=s),Su(A,s,t),A=null}else m.tag===13&&m.memoizedState!==null&&m.memoizedState.dehydrated===null?(m.lanes|=s,A=m.alternate,A!==null&&(A.lanes|=s),Su(m.return,s,t),A=m.child,A=A!==null?A.sibling:null):A=m.child;if(A!==null)A.return=m;else for(A=m;A!==null;){if(A===t){A=null;break}if(m=A.sibling,m!==null){m.return=A.return,A=m;break}A=A.return}m=A}}function Jl(t,i,s,u){t=null;for(var m=i,x=!1;m!==null;){if(!x){if((m.flags&524288)!==0)x=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var A=m.alternate;if(A===null)throw Error(r(387));if(A=A.memoizedProps,A!==null){var L=m.type;Fi(m.pendingProps.value,A.value)||(t!==null?t.push(L):t=[L])}}else if(m===en.current){if(A=m.alternate,A===null)throw Error(r(387));A.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(t!==null?t.push(mo):t=[mo])}m=m.return}return t!==null&&wh(i,t,s,u),i.flags|=262144,t!==null}function Cu(t){for(t=t.firstContext;t!==null;){if(!Fi(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Wl(t){Zl=t,jr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Yn(t){return hv(Zl,t)}function Nu(t,i){return Zl===null&&Wl(t),hv(t,i)}function hv(t,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},jr===null){if(t===null)throw Error(r(308));jr=i,t.dependencies={lanes:0,firstContext:i},t.flags|=524288}else jr=jr.next=i;return s}var N8=typeof AbortController<"u"?AbortController:function(){var t=[],i=this.signal={aborted:!1,addEventListener:function(s,u){t.push(u)}};this.abort=function(){i.aborted=!0,t.forEach(function(s){return s()})}},E8=e.unstable_scheduleCallback,T8=e.unstable_NormalPriority,Sn={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function kh(){return{controller:new N8,data:new Map,refCount:0}}function Wo(t){t.refCount--,t.refCount===0&&E8(T8,function(){t.controller.abort()})}function mv(t,i){if((t.pendingLanes&4194048)!==0){var s=t.transitionTypes;for(s===null&&(s=t.transitionTypes=[]),t=0;t<i.length;t++){var u=i[t];s.indexOf(u)===-1&&s.push(u)}}}var ec=null;function M8(t){var i=t.transitionTypes;return t.transitionTypes=null,i}var tc=null,Sh=0,es=0,Us=null;function A8(t,i){if(tc===null){var s=tc=[];Sh=0,es=Hm(),Us={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Sh++,i.then(pv,pv),i}function pv(){if(--Sh===0&&(ec=null,tc!==null)){Us!==null&&(Us.status="fulfilled");var t=tc;tc=null,es=0,Us=null;for(var i=0;i<t.length;i++)(0,t[i])()}}function _8(t,i){var s=[],u={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return t.then(function(){u.status="fulfilled",u.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(u.status="rejected",u.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),u}var gv=ve.S;ve.S=function(t,i){if(oy=Oe(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&A8(t,i),ec!==null)for(var s=so;s!==null;)mv(s,ec),s=s.next;if(s=t.types,s!==null){for(var u=so;u!==null;)mv(u,s),u=u.next;if(es!==0){u=ec,u===null&&(u=ec=[]);for(var m=0;m<s.length;m++){var x=s[m];u.indexOf(x)===-1&&u.push(x)}}}gv!==null&&gv(t,i)};var ts=Ze(null);function Ch(){var t=ts.current;return t!==null?t:Ut.pooledCache}function Eu(t,i){i===null?Ke(ts,ts.current):Ke(ts,i.pool)}function vv(){var t=Ch();return t===null?null:{parent:Sn._currentValue,pool:t}}var $s=Error(r(460)),Nh=Error(r(474)),Tu=Error(r(542)),Mu={then:function(){}};function yv(t){return t=t.status,t==="fulfilled"||t==="rejected"}function xv(t,i,s){switch(s=t[s],s===void 0?t.push(i):s!==i&&(i.then(gi,gi),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,jv(t),t===void 0&&!("reason"in i)?Error(r(600)):t;default:if(typeof i.status=="string")i.then(gi,gi);else{if(t=Ut,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=i,t.status="pending",t.then(function(u){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=u}},function(u){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,jv(t),t}throw is=i,$s}}function ns(t){try{var i=t._init;return i(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(is=s,$s):s}}var is=null;function bv(){if(is===null)throw Error(r(459));var t=is;return is=null,t}function jv(t){if(t===$s||t===Tu)throw Error(r(483))}var Vs=null,nc=0;function Au(t){var i=nc;return nc+=1,Vs===null&&(Vs=[]),xv(Vs,t,i)}function ll(t,i){i=i.props.ref,t.ref=i!==void 0?i:null}function _u(t,i){throw i.$$typeof===P?Error(r(525)):(t=Object.prototype.toString.call(i),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t)))}function wv(t){function i(ie,J){if(t){var le=ie.deletions;le===null?(ie.deletions=[J],ie.flags|=16):le.push(J)}}function s(ie,J){if(!t)return null;for(;J!==null;)i(ie,J),J=J.sibling;return null}function u(ie){for(var J=new Map;ie!==null;)ie.key===null?J.set(ie.index,ie):J.set(ie.key,ie),ie=ie.sibling;return J}function m(ie,J){return ie=xr(ie,J),ie.index=0,ie.sibling=null,ie}function x(ie,J,le){return ie.index=le,t?(le=ie.alternate,le!==null?(le=le.index,le<J?(ie.flags|=2,J):le):(ie.flags|=134217730,J)):(ie.flags|=1048576,J)}function A(ie){return t&&ie.alternate===null&&(ie.flags|=134217730),ie}function L(ie,J,le,ye){return J===null||J.tag!==6?(J=gh(le,ie.mode,ye),J.return=ie,J):(J=m(J,le),J.return=ie,J)}function G(ie,J,le,ye){var Le=le.type;return Le===I?(ie=fe(ie,J,le.props.children,ye,le.key),ll(ie,le),ie):J!==null&&(J.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&ns(Le)===J.type)?(J=m(J,le.props),ll(J,le),J.return=ie,J):(J=bu(le.type,le.key,le.props,null,ie.mode,ye),ll(J,le),J.return=ie,J)}function ae(ie,J,le,ye){return J===null||J.tag!==4||J.stateNode.containerInfo!==le.containerInfo||J.stateNode.implementation!==le.implementation?(J=vh(le,ie.mode,ye),J.return=ie,J):(J=m(J,le.children||[]),J.return=ie,J)}function fe(ie,J,le,ye,Le){return J===null||J.tag!==7?(J=Xl(le,ie.mode,ye,Le),J.return=ie,J):(J=m(J,le),J.return=ie,J)}function xe(ie,J,le){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=gh(""+J,ie.mode,le),J.return=ie,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case H:return le=bu(J.type,J.key,J.props,null,ie.mode,le),ll(le,J),le.return=ie,le;case O:return J=vh(J,ie.mode,le),J.return=ie,J;case D:return J=ns(J),xe(ie,J,le)}if(we(J)||de(J))return J=Xl(J,ie.mode,le,null),J.return=ie,J;if(typeof J.then=="function")return xe(ie,Au(J),le);if(J.$$typeof===q)return xe(ie,Nu(ie,J),le);_u(ie,J)}return null}function te(ie,J,le,ye){var Le=J!==null?J.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Le!==null?null:L(ie,J,""+le,ye);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case H:return le.key===Le?G(ie,J,le,ye):null;case O:return le.key===Le?ae(ie,J,le,ye):null;case D:return le=ns(le),te(ie,J,le,ye)}if(we(le)||de(le))return Le!==null?null:fe(ie,J,le,ye,null);if(typeof le.then=="function")return te(ie,J,Au(le),ye);if(le.$$typeof===q)return te(ie,J,Nu(ie,le),ye);_u(ie,le)}return null}function ce(ie,J,le,ye,Le){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return ie=ie.get(le)||null,L(J,ie,""+ye,Le);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case H:return ie=ie.get(ye.key===null?le:ye.key)||null,G(J,ie,ye,Le);case O:return ie=ie.get(ye.key===null?le:ye.key)||null,ae(J,ie,ye,Le);case D:return ye=ns(ye),ce(ie,J,le,ye,Le)}if(we(ye)||de(ye))return ie=ie.get(le)||null,fe(J,ie,ye,Le,null);if(typeof ye.then=="function")return ce(ie,J,le,Au(ye),Le);if(ye.$$typeof===q)return ce(ie,J,le,Nu(J,ye),Le);_u(J,ye)}return null}function ze(ie,J,le,ye){for(var Le=null,Ct=null,$e=J,We=J=0,En=null;$e!==null&&We<le.length;We++){$e.index>We?(En=$e,$e=null):En=$e.sibling;var Tt=te(ie,$e,le[We],ye);if(Tt===null){$e===null&&($e=En);break}t&&$e&&Tt.alternate===null&&i(ie,$e),J=x(Tt,J,We),Ct===null?Le=Tt:Ct.sibling=Tt,Ct=Tt,$e=En}if(We===le.length)return s(ie,$e),pt&&br(ie,We),Le;if($e===null){for(;We<le.length;We++)$e=xe(ie,le[We],ye),$e!==null&&(J=x($e,J,We),Ct===null?Le=$e:Ct.sibling=$e,Ct=$e);return pt&&br(ie,We),Le}for($e=u($e);We<le.length;We++)En=ce($e,ie,We,le[We],ye),En!==null&&(t&&(Tt=En.alternate,Tt!==null&&$e.delete(Tt.key===null?We:Tt.key)),J=x(En,J,We),Ct===null?Le=En:Ct.sibling=En,Ct=En);return t&&$e.forEach(function(Cl){return i(ie,Cl)}),pt&&br(ie,We),Le}function Ie(ie,J,le,ye){if(le==null)throw Error(r(151));for(var Le=null,Ct=null,$e=J,We=J=0,En=null,Tt=le.next();$e!==null&&!Tt.done;We++,Tt=le.next()){$e.index>We?(En=$e,$e=null):En=$e.sibling;var Cl=te(ie,$e,Tt.value,ye);if(Cl===null){$e===null&&($e=En);break}t&&$e&&Cl.alternate===null&&i(ie,$e),J=x(Cl,J,We),Ct===null?Le=Cl:Ct.sibling=Cl,Ct=Cl,$e=En}if(Tt.done)return s(ie,$e),pt&&br(ie,We),Le;if($e===null){for(;!Tt.done;We++,Tt=le.next())Tt=xe(ie,Tt.value,ye),Tt!==null&&(J=x(Tt,J,We),Ct===null?Le=Tt:Ct.sibling=Tt,Ct=Tt);return pt&&br(ie,We),Le}for($e=u($e);!Tt.done;We++,Tt=le.next())Tt=ce($e,ie,We,Tt.value,ye),Tt!==null&&(t&&(En=Tt.alternate,En!==null&&$e.delete(En.key===null?We:En.key)),J=x(Tt,J,We),Ct===null?Le=Tt:Ct.sibling=Tt,Ct=Tt);return t&&$e.forEach(function(d7){return i(ie,d7)}),pt&&br(ie,We),Le}function ut(ie,J,le,ye){if(typeof le=="object"&&le!==null&&le.type===I&&le.key===null&&le.props.ref===void 0&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case H:e:{for(var Le=le.key;J!==null;){if(J.key===Le){if(Le=le.type,Le===I){if(J.tag===7){s(ie,J.sibling),ye=m(J,le.props.children),ll(ye,le),ye.return=ie,ie=ye;break e}}else if(J.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&ns(Le)===J.type){s(ie,J.sibling),ye=m(J,le.props),ll(ye,le),ye.return=ie,ie=ye;break e}s(ie,J);break}else i(ie,J);J=J.sibling}le.type===I?(ye=Xl(le.props.children,ie.mode,ye,le.key),ll(ye,le),ye.return=ie,ie=ye):(ye=bu(le.type,le.key,le.props,null,ie.mode,ye),ll(ye,le),ye.return=ie,ie=ye)}return A(ie);case O:e:{for(Le=le.key;J!==null;){if(J.key===Le)if(J.tag===4&&J.stateNode.containerInfo===le.containerInfo&&J.stateNode.implementation===le.implementation){s(ie,J.sibling),ye=m(J,le.children||[]),ye.return=ie,ie=ye;break e}else{s(ie,J);break}else i(ie,J);J=J.sibling}ye=vh(le,ie.mode,ye),ye.return=ie,ie=ye}return A(ie);case D:return le=ns(le),ut(ie,J,le,ye)}if(we(le))return ze(ie,J,le,ye);if(de(le)){if(Le=de(le),typeof Le!="function")throw Error(r(150));return le=Le.call(le),Ie(ie,J,le,ye)}if(typeof le.then=="function")return ut(ie,J,Au(le),ye);if(le.$$typeof===q)return ut(ie,J,Nu(ie,le),ye);_u(ie,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,J!==null&&J.tag===6?(s(ie,J.sibling),ye=m(J,le),ye.return=ie,ie=ye):(s(ie,J),ye=gh(le,ie.mode,ye),ye.return=ie,ie=ye),A(ie)):s(ie,J)}return function(ie,J,le,ye){try{nc=0;var Le=ut(ie,J,le,ye);return Vs=null,Le}catch($e){if($e===$s||$e===Tu)throw $e;var Ct=Ti(29,$e,null,ie.mode);return Ct.lanes=ye,Ct.return=ie,Ct}finally{}}}var as=wv(!0),kv=wv(!1),sl=!1;function Eh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Th(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ol(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function cl(t,i,s){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Rt&2)!==0){var m=u.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),u.pending=i,i=xu(t),lv(t,null,s),i}return yu(t,u,i,s),xu(t)}function ic(t,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var u=i.lanes;u&=t.pendingLanes,s|=u,i.lanes=s,ur(t,s)}}function Mh(t,i){var s=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var m=null,x=null;if(s=s.firstBaseUpdate,s!==null){do{var A={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};x===null?m=x=A:x=x.next=A,s=s.next}while(s!==null);x===null?m=x=i:x=x.next=i}else m=x=i;s={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:x,shared:u.shared,callbacks:u.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=i:t.next=i,s.lastBaseUpdate=i}var Ah=!1;function ac(){if(Ah){var t=Us;if(t!==null)throw t}}function rc(t,i,s,u){Ah=!1;var m=t.updateQueue;sl=!1;var x=m.firstBaseUpdate,A=m.lastBaseUpdate,L=m.shared.pending;if(L!==null){m.shared.pending=null;var G=L,ae=G.next;G.next=null,A===null?x=ae:A.next=ae,A=G;var fe=t.alternate;fe!==null&&(fe=fe.updateQueue,L=fe.lastBaseUpdate,L!==A&&(L===null?fe.firstBaseUpdate=ae:L.next=ae,fe.lastBaseUpdate=G))}if(x!==null){var xe=m.baseState;A=0,fe=ae=G=null,L=x;do{var te=L.lane&-536870913,ce=te!==L.lane;if(ce?(St&te)===te:(u&te)===te){te!==0&&te===es&&(Ah=!0),fe!==null&&(fe=fe.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var ze=t,Ie=L;te=i;var ut=s;switch(Ie.tag){case 1:if(ze=Ie.payload,typeof ze=="function"){xe=ze.call(ut,xe,te);break e}xe=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=Ie.payload,te=typeof ze=="function"?ze.call(ut,xe,te):ze,te==null)break e;xe=z({},xe,te);break e;case 2:sl=!0}}te=L.callback,te!==null&&(t.flags|=64,ce&&(t.flags|=8192),ce=m.callbacks,ce===null?m.callbacks=[te]:ce.push(te))}else ce={lane:te,tag:L.tag,payload:L.payload,callback:L.callback,next:null},fe===null?(ae=fe=ce,G=xe):fe=fe.next=ce,A|=te;if(L=L.next,L===null){if(L=m.shared.pending,L===null)break;ce=L,L=ce.next,ce.next=null,m.lastBaseUpdate=ce,m.shared.pending=null}}while(!0);fe===null&&(G=xe),m.baseState=G,m.firstBaseUpdate=ae,m.lastBaseUpdate=fe,x===null&&(m.shared.lanes=0),gl|=A,t.lanes=A,t.memoizedState=xe}}function Sv(t,i){if(typeof t!="function")throw Error(r(191,t));t.call(i)}function Cv(t,i){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)Sv(s[t],i)}var ul=Ze(null),Ru=Ze(0);function Nv(t,i){t=Er,Ke(Ru,t),Ke(ul,i),Er=t|i.baseLanes}function _h(){Ke(Ru,Er),Ke(ul,ul.current)}function Rh(){Er=Ru.current,Fe(ul),Fe(Ru)}var Kn=Ze(null),ri=null;function dl(t){var i=t.alternate;Ke(Xn,Xn.current&1),Ke(Kn,t),ri===null&&(i===null||ul.current!==null||i.memoizedState!==null)&&(ri=t)}function zh(t){Ke(Xn,Xn.current),Ke(Kn,t),ri===null&&(ri=t)}function Ev(t){t.tag===22?(Ke(Xn,Xn.current),Ke(Kn,t),ri===null&&(ri=t)):fl()}function fl(){Ke(Xn,Xn.current),Ke(Kn,Kn.current)}function Ui(t){Fe(Kn),ri===t&&(ri=null),Fe(Xn)}var Xn=Ze(0);function lc(t,i){Ke(Kn,Kn.current),Ke(Xn,i)}function Oh(t){Fe(Xn),Fe(Kn),ri===t&&(ri=null)}function zu(t){for(var i=t;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||np(s)||ip(s)))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!=="independent"){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var kr=0,ct=null,Pt=null,Cn=null,Ou=!1,Gs=!1,rs=!1,Du=0,sc=0,Ys=null,R8=0;function pn(){throw Error(r(321))}function Dh(t,i){if(i===null)return!1;for(var s=0;s<i.length&&s<t.length;s++)if(!Fi(t[s],i[s]))return!1;return!0}function Lh(t,i,s,u,m,x){return kr=x,ct=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,ve.H=t===null||t.memoizedState===null?u2:d2,rs=!1,x=s(u,m),rs=!1,Gs&&(x=Mv(i,s,u,m)),Tv(t),x}function Tv(t){ve.H=Fu;var i=Pt!==null&&Pt.next!==null;if(kr=0,Cn=Pt=ct=null,Ou=!1,sc=0,Ys=null,i)throw Error(r(300));t===null||Nn||(t=t.dependencies,t!==null&&Cu(t)&&(Nn=!0))}function Mv(t,i,s,u){ct=t;var m=0;do{if(Gs&&(Ys=null),sc=0,Gs=!1,25<=m)throw Error(r(301));if(m+=1,Cn=Pt=null,t.updateQueue!=null){var x=t.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}ve.H=H8,x=i(s,u)}while(Gs);return x}function z8(){var t=ve.H,i=t.useState()[0];return i=typeof i.then=="function"?oc(i):i,t=t.useState()[0],(Pt!==null?Pt.memoizedState:null)!==t&&(ct.flags|=1024),i}function Bh(){var t=Du!==0;return Du=0,t}function Ih(t,i,s){i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~s}function Ph(t){if(Ou){for(t=t.memoizedState;t!==null;){var i=t.queue;i!==null&&(i.pending=null),t=t.next}Ou=!1}kr=0,Cn=Pt=ct=null,Gs=!1,sc=Du=0,Ys=null}function yi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Cn===null?ct.memoizedState=Cn=t:Cn=Cn.next=t,Cn}function jn(){if(Pt===null){var t=ct.alternate;t=t!==null?t.memoizedState:null}else t=Pt.next;var i=Cn===null?ct.memoizedState:Cn.next;if(i!==null)Cn=i,Pt=t;else{if(t===null)throw ct.alternate===null?Error(r(467)):Error(r(310));Pt=t,t={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Cn===null?ct.memoizedState=Cn=t:Cn=Cn.next=t}return Cn}function Lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oc(t){var i=sc;return sc+=1,Ys===null&&(Ys=[]),t=xv(Ys,t,i),i=ct,(Cn===null?i.memoizedState:Cn.next)===null&&(i=i.alternate,ve.H=i===null||i.memoizedState===null?u2:d2),t}function Bu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return oc(t);if(t.$$typeof===ee)return;if(t.$$typeof===q)return Yn(t)}throw Error(r(438,String(t)))}function Hh(t){var i=null,s=ct.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var u=ct.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=Lu(),ct.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(t),u=0;u<t;u++)s[u]=B;return i.index++,s}function Sr(t,i){return typeof i=="function"?i(t):i}function Iu(t){var i=jn();return qh(i,Pt,t)}function qh(t,i,s){var u=t.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=s;var m=t.baseQueue,x=u.pending;if(x!==null){if(m!==null){var A=m.next;m.next=x.next,x.next=A}i.baseQueue=m=x,u.pending=null}if(x=t.baseState,m===null)t.memoizedState=x;else{i=m.next;var L=A=null,G=null,ae=i,fe=!1;do{var xe=ae.lane&-536870913;if(xe!==ae.lane?(St&xe)===xe:(kr&xe)===xe){var te=ae.revertLane;if(te===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),xe===es&&(fe=!0);else if((kr&te)===te){ae=ae.next,te===es&&(fe=!0);continue}else xe={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},G===null?(L=G=xe,A=x):G=G.next=xe,ct.lanes|=te,gl|=te;xe=ae.action,rs&&s(x,xe),x=ae.hasEagerState?ae.eagerState:s(x,xe)}else te={lane:xe,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},G===null?(L=G=te,A=x):G=G.next=te,ct.lanes|=xe,gl|=xe;ae=ae.next}while(ae!==null&&ae!==i);if(G===null?A=x:G.next=L,!Fi(x,t.memoizedState)&&(Nn=!0,fe&&(s=Us,s!==null)))throw s;t.memoizedState=x,t.baseState=A,t.baseQueue=G,u.lastRenderedState=x}return m===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function Fh(t){var i=jn(),s=i.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var u=s.dispatch,m=s.pending,x=i.memoizedState;if(m!==null){s.pending=null;var A=m=m.next;do x=t(x,A.action),A=A.next;while(A!==m);Fi(x,i.memoizedState)||(Nn=!0),i.memoizedState=x,i.baseQueue===null&&(i.baseState=x),s.lastRenderedState=x}return[x,u]}function Av(t,i,s){var u=ct,m=jn(),x=pt;if(x){if(s===void 0)throw Error(r(407));s=s()}else s=i();var A=!Fi((Pt||m).memoizedState,s);if(A&&(m.memoizedState=s,Nn=!0),m=m.queue,Vh(zv.bind(null,u,m,t),[t]),t=m.getSnapshot!==i||A||Cn!==null&&(Cn.memoizedState.tag&1)!==0,Ks(t?9:8,{destroy:void 0},Rv.bind(null,u,m,s,i),null),t){if(u.flags|=2048,Ut===null)throw Error(r(349));x||(kr&127)!==0||_v(u,i,s)}return s}function _v(t,i,s){t.flags|=16384,t={getSnapshot:i,value:s},i=ct.updateQueue,i===null?(i=Lu(),ct.updateQueue=i,i.stores=[t]):(s=i.stores,s===null?i.stores=[t]:s.push(t))}function Rv(t,i,s,u){i.value=s,i.getSnapshot=u,Ov(i)&&Dv(t)}function zv(t,i,s){return s(function(){Ov(i)&&Dv(t)})}function Ov(t){var i=t.getSnapshot;t=t.value;try{var s=i();return!Fi(t,s)}catch{return!0}}function Dv(t){var i=Kl(t,2);i!==null&&Ri(i,t,2)}function Uh(t){var i=yi();if(typeof t=="function"){var s=t;if(t=s(),rs){Yt(!0);try{s()}finally{Yt(!1)}}}return i.memoizedState=i.baseState=t,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:t},i}function Lv(t,i,s,u){return t.baseState=s,qh(t,Pt,typeof u=="function"?u:Sr)}function O8(t,i,s,u,m){if(qu(t))throw Error(r(485));if(t=i.action,t!==null){var x={payload:m,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){x.listeners.push(A)}};ve.T!==null?s(!0):x.isTransition=!1,u(x),s=i.pending,s===null?(x.next=i.pending=x,Bv(i,x)):(x.next=s.next,i.pending=s.next=x)}}function Bv(t,i){var s=i.action,u=i.payload,m=t.state;if(i.isTransition){var x=ve.T,A={};A.types=x!==null?x.types:null,ve.T=A;try{var L=s(m,u),G=ve.S;G!==null&&G(A,L),Iv(t,i,L)}catch(ae){$h(t,i,ae)}finally{x!==null&&A.types!==null&&(x.types=A.types),ve.T=x}}else try{x=s(m,u),Iv(t,i,x)}catch(ae){$h(t,i,ae)}}function Iv(t,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){Pv(t,i,u)},function(u){return $h(t,i,u)}):Pv(t,i,s)}function Pv(t,i,s){i.status="fulfilled",i.value=s,Hv(i),t.state=s,i=t.pending,i!==null&&(s=i.next,s===i?t.pending=null:(s=s.next,i.next=s,Bv(t,s)))}function $h(t,i,s){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=s,Hv(i),i=i.next;while(i!==u)}t.action=null}function Hv(t){t=t.listeners;for(var i=0;i<t.length;i++)(0,t[i])()}function qv(t,i){return i}function Fv(t,i){if(pt){var s=Ut.formState;if(s!==null){e:{var u=ct;if(pt){if(Xt){t:{for(var m=Xt,x=la;m.nodeType!==8;){if(!x){m=null;break t}if(m=oa(m.nextSibling),m===null){m=null;break t}}x=m.data,m=x==="F!"||x==="F"?m:null}if(m){Xt=oa(m.nextSibling),u=m.data==="F!";break e}}al(u)}u=!1}u&&(i=s[0])}}return s=yi(),s.memoizedState=s.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qv,lastRenderedState:i},s.queue=u,s=s2.bind(null,ct,u),u.dispatch=s,u=Uh(!1),x=Qh.bind(null,ct,!1,u.queue),u=yi(),m={state:i,dispatch:null,action:t,pending:null},u.queue=m,s=O8.bind(null,ct,m,x,s),m.dispatch=s,u.memoizedState=t,[i,s,!1]}function Uv(t){var i=jn();return $v(i,Pt,t)}function $v(t,i,s){if(i=qh(t,i,qv)[0],t=Iu(Sr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=oc(i)}catch(A){throw A===$s?Tu:A}else u=i;i=jn();var m=i.queue,x=m.dispatch;return s!==i.memoizedState&&(ct.flags|=2048,Ks(9,{destroy:void 0},D8.bind(null,m,s),null)),[u,x,t]}function D8(t,i){t.action=i}function Vv(t){var i=jn(),s=Pt;if(s!==null)return $v(i,s,t);jn(),i=i.memoizedState,s=jn();var u=s.queue.dispatch;return s.memoizedState=t,[i,u,!1]}function Ks(t,i,s,u){return t={tag:t,create:s,deps:u,inst:i,next:null},i=ct.updateQueue,i===null&&(i=Lu(),ct.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=t.next=t:(u=s.next,s.next=t,t.next=u,i.lastEffect=t),t}function Gv(){return jn().memoizedState}function Pu(t,i,s,u){var m=yi();ct.flags|=t,m.memoizedState=Ks(1|i,{destroy:void 0},s,u===void 0?null:u)}function Hu(t,i,s,u){var m=jn();u=u===void 0?null:u;var x=m.memoizedState.inst;Pt!==null&&u!==null&&Dh(u,Pt.memoizedState.deps)?m.memoizedState=Ks(i,x,s,u):(ct.flags|=t,m.memoizedState=Ks(1|i,x,s,u))}function Yv(t,i){Pu(8390656,8,t,i)}function Vh(t,i){Hu(2048,8,t,i)}function L8(t){ct.flags|=4;var i=ct.updateQueue;if(i===null)i=Lu(),ct.updateQueue=i,i.events=[t];else{var s=i.events;s===null?i.events=[t]:s.push(t)}}function Kv(t){var i=jn().memoizedState;return L8({ref:i,nextImpl:t}),function(){if((Rt&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function Xv(t,i){return Hu(4,2,t,i)}function Qv(t,i){return Hu(4,4,t,i)}function Zv(t,i){if(typeof i=="function"){t=t();var s=i(t);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function Jv(t,i,s){s=s!=null?s.concat([t]):null,Hu(4,4,Zv.bind(null,i,t),s)}function Gh(){}function Wv(t,i){var s=jn();i=i===void 0?null:i;var u=s.memoizedState;return i!==null&&Dh(i,u[1])?u[0]:(s.memoizedState=[t,i],t)}function e2(t,i){var s=jn();i=i===void 0?null:i;var u=s.memoizedState;if(i!==null&&Dh(i,u[1]))return u[0];if(u=t(),rs){Yt(!0);try{t()}finally{Yt(!1)}}return s.memoizedState=[u,i],u}function Yh(t,i,s){return s===void 0||(kr&1073741824)!==0&&(St&261930)===0?t.memoizedState=i:(t.memoizedState=s,t=uy(),ct.lanes|=t,gl|=t,s)}function t2(t,i,s,u){return Fi(s,i)?s:ul.current!==null?(t=Yh(t,s,u),Fi(t,i)||(Nn=!0),t):(kr&106)===0||(kr&1073741824)!==0&&(St&261930)===0?(Nn=!0,t.memoizedState=s):(t=uy(),ct.lanes|=t,gl|=t,i)}function n2(t,i,s,u,m){var x=re.p;re.p=x!==0&&8>x?x:8;var A=ve.T,L={};L.types=A!==null?A.types:null,ve.T=L,Qh(t,!1,i,s);try{var G=m(),ae=ve.S;if(ae!==null&&ae(L,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var fe=_8(G,u);cc(t,i,fe,Yi(t))}else cc(t,i,u,Yi(t))}catch(xe){cc(t,i,{then:function(){},status:"rejected",reason:xe},Yi())}finally{re.p=x,A!==null&&L.types!==null&&(A.types=L.types),ve.T=A}}function B8(){}function Kh(t,i,s,u){if(t.tag!==5)throw Error(r(476));var m=i2(t).queue;n2(t,m,i,Ce,s===null?B8:function(){return a2(t),s(u)})}function i2(t){var i=t.memoizedState;if(i!==null)return i;i={memoizedState:Ce,baseState:Ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:Ce},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:s},next:null},t.memoizedState=i,t=t.alternate,t!==null&&(t.memoizedState=i),i}function a2(t){var i=i2(t);i.next===null&&(i=t.alternate.memoizedState),cc(t,i.next.queue,{},Yi())}function Xh(){return Yn(mo)}function r2(){return jn().memoizedState}function l2(){return jn().memoizedState}function I8(t){for(var i=t.return;i!==null;){switch(i.tag){case 24:case 3:var s=Yi();t=ol(s);var u=cl(i,t,s);u!==null&&(Ri(u,i,s),ic(u,i,s)),i={cache:kh()},t.payload=i;return}i=i.return}}function P8(t,i,s){var u=Yi();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},qu(t)?o2(i,s):(s=mh(t,i,s,u),s!==null&&(Ri(s,t,u),c2(s,i,u)))}function s2(t,i,s){var u=Yi();cc(t,i,s,u)}function cc(t,i,s,u){var m={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(qu(t))o2(i,m);else{var x=t.alternate;if(t.lanes===0&&(x===null||x.lanes===0)&&(x=i.lastRenderedReducer,x!==null))try{var A=i.lastRenderedState,L=x(A,s);if(m.hasEagerState=!0,m.eagerState=L,Fi(L,A))return yu(t,i,m,0),Ut===null&&vu(),!1}catch{}finally{}if(s=mh(t,i,m,u),s!==null)return Ri(s,t,u),c2(s,i,u),!0}return!1}function Qh(t,i,s,u){if(u={lane:2,revertLane:Hm(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},qu(t)){if(i)throw Error(r(479))}else i=mh(t,s,u,2),i!==null&&Ri(i,t,2)}function qu(t){var i=t.alternate;return t===ct||i!==null&&i===ct}function o2(t,i){Gs=Ou=!0;var s=t.pending;s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i}function c2(t,i,s){if((s&4194048)!==0){var u=i.lanes;u&=t.pendingLanes,s|=u,i.lanes=s,ur(t,s)}}var Fu={readContext:Yn,use:Bu,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useLayoutEffect:pn,useInsertionEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useSyncExternalStore:pn,useId:pn,useHostTransitionStatus:pn,useFormState:pn,useActionState:pn,useOptimistic:pn,useMemoCache:pn,useCacheRefresh:pn,useEffectEvent:pn},u2={readContext:Yn,use:Bu,useCallback:function(t,i){return yi().memoizedState=[t,i===void 0?null:i],t},useContext:Yn,useEffect:Yv,useImperativeHandle:function(t,i,s){s=s!=null?s.concat([t]):null,Pu(4194308,4,Zv.bind(null,i,t),s)},useLayoutEffect:function(t,i){return Pu(4194308,4,t,i)},useInsertionEffect:function(t,i){Pu(4,2,t,i)},useMemo:function(t,i){var s=yi();i=i===void 0?null:i;var u=t();if(rs){Yt(!0);try{t()}finally{Yt(!1)}}return s.memoizedState=[u,i],u},useReducer:function(t,i,s){var u=yi();if(s!==void 0){var m=s(i);if(rs){Yt(!0);try{s(i)}finally{Yt(!1)}}}else m=i;return u.memoizedState=u.baseState=m,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:m},u.queue=t,t=t.dispatch=P8.bind(null,ct,t),[u.memoizedState,t]},useRef:function(t){var i=yi();return t={current:t},i.memoizedState=t},useState:function(t){t=Uh(t);var i=t.queue,s=s2.bind(null,ct,i);return i.dispatch=s,[t.memoizedState,s]},useDebugValue:Gh,useDeferredValue:function(t,i){var s=yi();return Yh(s,t,i)},useTransition:function(){var t=Uh(!1);return t=n2.bind(null,ct,t.queue,!0,!1),yi().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,i,s){var u=ct,m=yi();if(pt){if(s===void 0)throw Error(r(407));s=s()}else{if(s=i(),Ut===null)throw Error(r(349));(St&127)!==0||_v(u,i,s)}m.memoizedState=s;var x={value:s,getSnapshot:i};return m.queue=x,Yv(zv.bind(null,u,x,t),[t]),u.flags|=2048,Ks(9,{destroy:void 0},Rv.bind(null,u,x,s,i),null),s},useId:function(){var t=yi(),i=Ut.identifierPrefix;if(pt){var s=La,u=Da;s=(u&~(1<<32-ln(u)-1)).toString(32)+s,i="_"+i+"R_"+s,s=Du++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=R8++,i="_"+i+"r_"+s.toString(32)+"_";return t.memoizedState=i},useHostTransitionStatus:Xh,useFormState:Fv,useActionState:Fv,useOptimistic:function(t){var i=yi();i.memoizedState=i.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=Qh.bind(null,ct,!0,s),s.dispatch=i,[t,i]},useMemoCache:Hh,useCacheRefresh:function(){return yi().memoizedState=I8.bind(null,ct)},useEffectEvent:function(t){var i=yi(),s={impl:t};return i.memoizedState=s,function(){if((Rt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},d2={readContext:Yn,use:Bu,useCallback:Wv,useContext:Yn,useEffect:Vh,useImperativeHandle:Jv,useInsertionEffect:Xv,useLayoutEffect:Qv,useMemo:e2,useReducer:Iu,useRef:Gv,useState:function(){return Iu(Sr)},useDebugValue:Gh,useDeferredValue:function(t,i){var s=jn();return t2(s,Pt.memoizedState,t,i)},useTransition:function(){var t=Iu(Sr)[0],i=jn().memoizedState;return[typeof t=="boolean"?t:oc(t),i]},useSyncExternalStore:Av,useId:r2,useHostTransitionStatus:Xh,useFormState:Uv,useActionState:Uv,useOptimistic:function(t,i){var s=jn();return Lv(s,Pt,t,i)},useMemoCache:Hh,useCacheRefresh:l2,useEffectEvent:Kv},H8={readContext:Yn,use:Bu,useCallback:Wv,useContext:Yn,useEffect:Vh,useImperativeHandle:Jv,useInsertionEffect:Xv,useLayoutEffect:Qv,useMemo:e2,useReducer:Fh,useRef:Gv,useState:function(){return Fh(Sr)},useDebugValue:Gh,useDeferredValue:function(t,i){var s=jn();return Pt===null?Yh(s,t,i):t2(s,Pt.memoizedState,t,i)},useTransition:function(){var t=Fh(Sr)[0],i=jn().memoizedState;return[typeof t=="boolean"?t:oc(t),i]},useSyncExternalStore:Av,useId:r2,useHostTransitionStatus:Xh,useFormState:Vv,useActionState:Vv,useOptimistic:function(t,i){var s=jn();return Pt!==null?Lv(s,Pt,t,i):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:Hh,useCacheRefresh:l2,useEffectEvent:Kv};function Zh(t,i,s,u){i=t.memoizedState,s=s(u,i),s=s==null?i:z({},i,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var Jh={enqueueSetState:function(t,i,s){t=t._reactInternals;var u=Yi(),m=ol(u);m.payload=i,s!=null&&(m.callback=s),i=cl(t,m,u),i!==null&&(Ri(i,t,u),ic(i,t,u))},enqueueReplaceState:function(t,i,s){t=t._reactInternals;var u=Yi(),m=ol(u);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=cl(t,m,u),i!==null&&(Ri(i,t,u),ic(i,t,u))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var s=Yi(),u=ol(s);u.tag=2,i!=null&&(u.callback=i),i=cl(t,u,s),i!==null&&(Ri(i,t,s),ic(i,t,s))}};function f2(t,i,s,u,m,x,A){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,x,A):i.prototype&&i.prototype.isPureReactComponent?!Xo(s,u)||!Xo(m,x):!0}function h2(t,i,s,u){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,u),i.state!==t&&Jh.enqueueReplaceState(i,i.state,null)}function ls(t,i){var s=i;if("ref"in i){s={};for(var u in i)u!=="ref"&&(s[u]=i[u])}if(t=t.defaultProps){s===i&&(s=z({},s));for(var m in t)s[m]===void 0&&(s[m]=t[m])}return s}function m2(t){gu(t)}function p2(t){console.error(t)}function g2(t){gu(t)}function Uu(t,i){try{var s=t.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function v2(t,i,s){try{var u=t.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Wh(t,i,s){return s=ol(s),s.tag=3,s.payload={element:null},s.callback=function(){Uu(t,i)},s}function y2(t){return t=ol(t),t.tag=3,t}function x2(t,i,s,u){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var x=u.value;t.payload=function(){return m(x)},t.callback=function(){v2(i,s,u)}}var A=s.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(t.callback=function(){v2(i,s,u),typeof m!="function"&&(vl===null?vl=new Set([this]):vl.add(this));var L=u.stack;this.componentDidCatch(u.value,{componentStack:L!==null?L:""})})}function q8(t,i,s,u,m){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=s.alternate,i!==null&&Jl(i,s,m,!0),s=Kn.current,s!==null){switch(s.tag){case 31:case 13:case 19:return ri===null?ud():s.alternate===null&&gn===0&&(gn=3),s.flags&=-257,s.flags|=65536,s.lanes=m,u===Mu?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([u]):i.add(u),Bm(t,u,m)),!1;case 22:return s.flags|=65536,u===Mu?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([u]):s.add(u)),Bm(t,u,m)),!1}throw Error(r(435,s.tag))}return Bm(t,u,m),ud(),!1}if(pt)return i=Kn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,u!==xh&&(t=Error(r(422),{cause:u}),Jo(ia(t,s)))):(u!==xh&&(i=Error(r(423),{cause:u}),Jo(ia(i,s))),t=t.current.alternate,t.flags|=65536,m&=-m,t.lanes|=m,u=ia(u,s),m=Wh(t.stateNode,u,m),Mh(t,m),gn!==4&&(gn=2)),!1;var x=Error(r(520),{cause:u});if(x=ia(x,s),vc===null?vc=[x]:vc.push(x),gn!==4&&(gn=2),i===null)return!0;u=ia(u,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,t=m&-m,s.lanes|=t,t=Wh(s.stateNode,u,t),Mh(s,t),!1;case 1:if(i=s.type,x=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(vl===null||!vl.has(x))))return s.flags|=65536,m&=-m,s.lanes|=m,m=y2(m),x2(m,t,s,u),Mh(s,m),!1;break;case 22:if(s.memoizedState!==null)return s.flags|=65536,!1}s=s.return}while(s!==null);return!1}var em=Error(r(461)),Nn=!1;function zn(t,i,s,u){i.child=t===null?kv(i,null,s,u):as(i,t.child,s,u)}function b2(t,i,s,u,m){s=s.render;var x=i.ref;if("ref"in u){var A={};for(var L in u)L!=="ref"&&(A[L]=u[L])}else A=u;return Wl(i),u=Lh(t,i,s,A,x,m),L=Bh(),t!==null&&!Nn?(Ih(t,i,m),Cr(t,i,m)):(pt&&L&&wu(i),i.flags|=1,zn(t,i,u,m),i.child)}function j2(t,i,s,u,m){if(t===null){var x=s.type;return typeof x=="function"&&!ph(x)&&x.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=x,w2(t,i,x,u,m)):(t=bu(s.type,null,u,i,i.mode,m),t.ref=i.ref,t.return=i,i.child=t)}if(x=t.child,!om(t,m)){var A=x.memoizedProps;if(s=s.compare,s=s!==null?s:Xo,s(A,u)&&t.ref===i.ref)return Cr(t,i,m)}return i.flags|=1,t=xr(x,u),t.ref=i.ref,t.return=i,i.child=t}function w2(t,i,s,u,m){if(t!==null){var x=t.memoizedProps;if(Xo(x,u)&&t.ref===i.ref)if(Nn=!1,i.pendingProps=u=x,om(t,m))(t.flags&131072)!==0&&(Nn=!0);else return i.lanes=t.lanes,Cr(t,i,m)}return tm(t,i,s,u,m)}function k2(t,i,s,u){var m=u.children,x=t!==null?t.memoizedState:null;if(t===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((i.flags&128)!==0){if(x=x!==null?x.baseLanes|s:s,t!==null){for(u=i.child=t.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~x}else u=0,i.child=null;return S2(t,i,x,s,u)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},t!==null&&Eu(i,x!==null?x.cachePool:null),x!==null?Nv(i,x):_h(),Ev(i);else return u=i.lanes=536870912,S2(t,i,x!==null?x.baseLanes|s:s,s,u)}else x!==null?(Eu(i,x.cachePool),Nv(i,x),fl(),i.memoizedState=null):(t!==null&&Eu(i,null),_h(),fl());return zn(t,i,m,s),i.child}function uc(t,i){return t!==null&&t.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function S2(t,i,s,u,m){var x=Ch();return x=x===null?null:{parent:Sn._currentValue,pool:x},i.memoizedState={baseLanes:s,cachePool:x},t!==null&&Eu(i,null),_h(),Ev(i),t!==null&&Jl(t,i,u,!0),i.childLanes=m,null}function $u(t,i){return i=Vu({mode:i.mode,children:i.children},t.mode),i.ref=t.ref,t.child=i,i.return=t,i}function C2(t,i,s){return as(i,t.child,null,s),t=$u(i,i.pendingProps),t.flags|=2,Ui(i),i.memoizedState=null,t}function F8(t,i,s){var u=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,t===null){if(pt){if(u.mode==="hidden")return t=$u(i,u),i.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},uc(null,t);if(zh(i),(t=Xt)?(t=Zy(t,la),t=t!==null&&t.data==="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:nl!==null?{id:Da,overflow:La}:null,retryLane:536870912,hydrationErrors:null},s=ov(t),s.return=i,i.child=s,Pn=i,Xt=null)):t=null,t===null)throw al(i);return i.lanes=536870912,null}return $u(i,u)}var x=t.memoizedState;if(x!==null){var A=x.dehydrated;if(zh(i),m)if(i.flags&256)i.flags&=-257,i=C2(t,i,s);else if(i.memoizedState!==null)i.child=t.child,i.flags|=128,i=null;else throw Error(r(558));else if(Nn||Jl(t,i,s,!1),m=(s&t.childLanes)!==0,Nn||m){if(ul.current===null){if(u=Ut,u!==null&&(A=dr(u,s),A!==0&&A!==x.retryLane))throw x.retryLane=A,Kl(t,A),Ri(u,t,A),em;ud()}i=C2(t,i,s)}else t=x.treeContext,Xt=oa(A.nextSibling),Pn=i,pt=!0,il=null,la=!1,t!==null&&dv(i,t),i=$u(i,u),i.flags|=134221824;return i}return t=xr(t.child,{mode:u.mode,children:u.children}),t.ref=i.ref,i.child=t,t.return=i,t}function Xs(t,i){var s=i.ref;if(s===null)t!==null&&t.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(t===null||t.ref!==s)&&(i.flags|=4194816)}}function tm(t,i,s,u,m){return Wl(i),s=Lh(t,i,s,u,void 0,m),u=Bh(),t!==null&&!Nn?(Ih(t,i,m),Cr(t,i,m)):(pt&&u&&wu(i),i.flags|=1,zn(t,i,s,m),i.child)}function N2(t,i,s,u,m,x){return Wl(i),i.updateQueue=null,s=Mv(i,u,s,m),Tv(t),u=Bh(),t!==null&&!Nn?(Ih(t,i,x),Cr(t,i,x)):(pt&&u&&wu(i),i.flags|=1,zn(t,i,s,x),i.child)}function E2(t,i,s,u,m){if(Wl(i),i.stateNode===null){var x=Ps,A=s.contextType;typeof A=="object"&&A!==null&&(x=Yn(A)),x=new s(u,x),i.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Jh,i.stateNode=x,x._reactInternals=i,x=i.stateNode,x.props=u,x.state=i.memoizedState,x.refs={},Eh(i),A=s.contextType,x.context=typeof A=="object"&&A!==null?Yn(A):Ps,x.state=i.memoizedState,A=s.getDerivedStateFromProps,typeof A=="function"&&(Zh(i,s,A,u),x.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(A=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),A!==x.state&&Jh.enqueueReplaceState(x,x.state,null),rc(i,u,x,m),ac(),x.state=i.memoizedState),typeof x.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(t===null){x=i.stateNode;var L=i.memoizedProps,G=ls(s,L);x.props=G;var ae=x.context,fe=s.contextType;A=Ps,typeof fe=="object"&&fe!==null&&(A=Yn(fe));var xe=s.getDerivedStateFromProps;fe=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function",L=i.pendingProps!==L,fe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L||ae!==A)&&h2(i,x,u,A),sl=!1;var te=i.memoizedState;x.state=te,rc(i,u,x,m),ac(),ae=i.memoizedState,L||te!==ae||sl?(typeof xe=="function"&&(Zh(i,s,xe,u),ae=i.memoizedState),(G=sl||f2(i,s,G,u,te,ae,A))?(fe||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(i.flags|=4194308)):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=ae),x.props=u,x.state=ae,x.context=A,u=G):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{x=i.stateNode,Th(t,i),A=i.memoizedProps,fe=ls(s,A),x.props=fe,xe=i.pendingProps,te=x.context,ae=s.contextType,G=Ps,typeof ae=="object"&&ae!==null&&(G=Yn(ae)),L=s.getDerivedStateFromProps,(ae=typeof L=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==xe||te!==G)&&h2(i,x,u,G),sl=!1,te=i.memoizedState,x.state=te,rc(i,u,x,m),ac();var ce=i.memoizedState;A!==xe||te!==ce||sl||t!==null&&t.dependencies!==null&&Cu(t.dependencies)?(typeof L=="function"&&(Zh(i,s,L,u),ce=i.memoizedState),(fe=sl||f2(i,s,fe,u,te,ce,G)||t!==null&&t.dependencies!==null&&Cu(t.dependencies))?(ae||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(u,ce,G),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(u,ce,G)),typeof x.componentDidUpdate=="function"&&(i.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof x.componentDidUpdate!="function"||A===t.memoizedProps&&te===t.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===t.memoizedProps&&te===t.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=ce),x.props=u,x.state=ce,x.context=G,u=fe):(typeof x.componentDidUpdate!="function"||A===t.memoizedProps&&te===t.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===t.memoizedProps&&te===t.memoizedState||(i.flags|=1024),u=!1)}return x=u,Xs(t,i),u=(i.flags&128)!==0,x||u?(x=i.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:x.render(),i.flags|=1,t!==null&&u?(i.child=as(i,t.child,null,m),i.child=as(i,null,s,m)):zn(t,i,s,m),i.memoizedState=x.state,t=i.child):t=Cr(t,i,m),t}function T2(t,i,s,u){return Ql(),i.flags|=256,zn(t,i,s,u),i.child}var nm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function im(t){return{baseLanes:t,cachePool:vv()}}function am(t,i,s){return t=t!==null?t.childLanes&~s:0,i&&(t|=Gi),t}function M2(t,i,s){var u=i.pendingProps,m=!1,x=(i.flags&128)!==0,A;if((A=x)||(A=t!==null&&t.memoizedState===null?!1:(Xn.current&2)!==0),A&&(m=!0,i.flags&=-129),A=(i.flags&32)!==0,i.flags&=-33,t===null){if(pt){if(m?dl(i):fl(),(t=Xt)?(t=Zy(t,la),t=t!==null&&t.data!=="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:nl!==null?{id:Da,overflow:La}:null,retryLane:536870912,hydrationErrors:null},s=ov(t),s.return=i,i.child=s,Pn=i,Xt=null)):t=null,t===null)throw al(i);return ip(t)?i.lanes=32:i.lanes=536870912,null}return x=u.children,u=u.fallback,m?(fl(),m=i.mode,x=Vu({mode:"hidden",children:x},m),u=Xl(u,m,s,null),x.return=i,u.return=i,x.sibling=u,i.child=x,u=i.child,u.memoizedState=im(s),u.childLanes=am(t,A,s),i.memoizedState=nm,uc(null,u)):(dl(i),rm(i,x))}var L=t.memoizedState;if(L!==null){var G=L.dehydrated;if(G!==null)return U8(t,i,x,A,u,G,L,s)}return m?(fl(),m=u.fallback,x=i.mode,L=t.child,G=L.sibling,u=xr(L,{mode:"hidden",children:u.children}),u.subtreeFlags=L.subtreeFlags&1206910976,G!==null?m=xr(G,m):(m=Xl(m,x,s,null),m.flags|=2),m.return=i,u.return=i,u.sibling=m,i.child=u,uc(null,u),u=i.child,m=t.child.memoizedState,m===null?m=im(s):(x=m.cachePool,x!==null?(L=Sn._currentValue,x=x.parent!==L?{parent:L,pool:L}:x):x=vv(),m={baseLanes:m.baseLanes|s,cachePool:x}),u.memoizedState=m,u.childLanes=am(t,A,s),i.memoizedState=nm,uc(t.child,u)):(dl(i),s=t.child,t=s.sibling,s=xr(s,{mode:"visible",children:u.children}),s.return=i,s.sibling=null,t!==null&&(A=i.deletions,A===null?(i.deletions=[t],i.flags|=16):A.push(t)),i.child=s,i.memoizedState=null,s)}function rm(t,i){return i=Vu({mode:"visible",children:i},t.mode),i.return=t,t.child=i}function Vu(t,i){return t=Ti(22,t,null,i),t.lanes=0,t}function Gu(t,i,s){return as(i,t.child,null,s),t=rm(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function U8(t,i,s,u,m,x,A,L){if(s)return i.flags&256?(dl(i),i.flags&=-257,Gu(t,i,L)):i.memoizedState!==null?(fl(),i.child=t.child,i.flags|=128,null):(fl(),x=m.fallback,A=i.mode,m=Vu({mode:"visible",children:m.children},A),x=Xl(x,A,L,null),x.flags|=2,m.return=i,x.return=i,m.sibling=x,i.child=m,as(i,t.child,null,L),m=i.child,m.memoizedState=im(L),m.childLanes=am(t,u,L),i.memoizedState=nm,uc(null,m));if(dl(i),ip(x)){if(u=x.nextSibling&&x.nextSibling.dataset,u)var G=u.dgst;return u=G,u!==""&&(m=Error(r(419)),m.stack="",m.digest=u,Jo({value:m,source:null,stack:null})),Gu(t,i,L)}if(Nn||Jl(t,i,L,!1),u=(L&t.childLanes)!==0,Nn||u){if(ul.current!==null)return Gu(t,i,L);if(u=Ut,u!==null&&(m=dr(u,L),m!==0&&m!==A.retryLane))throw A.retryLane=m,Kl(t,m),Ri(u,t,m),em;return np(x)||ud(),Gu(t,i,L)}return np(x)?(i.flags|=192,i.child=t.child,null):(t=A.treeContext,Xt=oa(x.nextSibling),Pn=i,pt=!0,il=null,la=!1,t!==null&&dv(i,t),i=rm(i,m.children),i.flags|=134221824,i)}function A2(t,i,s){t.lanes|=i;var u=t.alternate;u!==null&&(u.lanes|=i),Su(t.return,i,s)}function _2(t){for(var i=null;t!==null;){var s=t.alternate;s!==null&&zu(s)===null&&(i=t),t=t.sibling}return i}function Yu(t,i,s,u,m,x){var A=t.memoizedState;A===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:m,treeForkCount:x}:(A.isBackwards=i,A.rendering=null,A.renderingStartTime=0,A.last=u,A.tail=s,A.tailMode=m,A.treeForkCount=x)}function lm(t){var i=t.child;for(t.child=null;i!==null;){var s=i.sibling;i.sibling=t.child,t.child=i,i=s}}function sm(t,i,s){var u=i.pendingProps,m=u.revealOrder,x=u.tail;u=u.children;var A=Xn.current;if(i.flags&128)return lc(i,A),null;var L=(A&2)!==0;if(L?(A=A&1|2,i.flags|=128):A&=1,lc(i,A),m==="backwards"&&t!==null?(lm(t),zn(t,i,u,s),lm(t)):zn(t,i,u,s),u=pt?Zo:0,!L&&t!==null&&(t.flags&128)!==0)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&A2(t,s,i);else if(t.tag===19)A2(t,s,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(m){case"backwards":s=_2(i.child),s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null,lm(i)),Yu(i,!0,m,null,x,u);break;case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(t=m.alternate,t!==null&&zu(t)===null){i.child=m;break}t=m.sibling,m.sibling=s,s=m,m=t}Yu(i,!0,s,null,x,u);break;case"together":Yu(i,!1,null,null,void 0,u);break;case"independent":i.memoizedState=null;break;default:s=_2(i.child),s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),Yu(i,!1,m,s,x,u)}return i.child}function R2(t,i,s){var u=i.pendingProps;return rl(i,i.type,u.value),zn(t,i,u.children,s),i.child}function Cr(t,i,s){if(t!==null&&(i.dependencies=t.dependencies),gl|=i.lanes,(s&i.childLanes)===0)if(t!==null){if(Jl(t,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(t!==null&&i.child!==t.child)throw Error(r(153));if(i.child!==null){for(t=i.child,s=xr(t,t.pendingProps),i.child=s,s.return=i;t.sibling!==null;)t=t.sibling,s=s.sibling=xr(t,t.pendingProps),s.return=i;s.sibling=null}return i.child}function om(t,i){return(t.lanes&i)!==0?!0:(t=t.dependencies,!!(t!==null&&Cu(t)))}function $8(t,i,s){switch(i.tag){case 3:kn(i,i.stateNode.containerInfo),rl(i,Sn,t.memoizedState.cache),Ql();break;case 27:case 5:rn(i);break;case 4:kn(i,i.stateNode.containerInfo);break;case 10:rl(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,zh(i),null;break;case 13:var u=i.memoizedState;if(u!==null){if(u.dehydrated!==null)return dl(i),i.flags|=128,null;u=Jl(t,i,s,!1);var m=i.child.childLanes;return u||(s&m)!==0?M2(t,i,s):(dl(i),t=Cr(t,i,s),t!==null?t.sibling:null)}dl(i);break;case 19:if(i.flags&128)return sm(t,i,s);if(m=(t.flags&128)!==0,u=(s&i.childLanes)!==0,u||(Jl(t,i,s,!1),u=(s&i.childLanes)!==0),m){if(u)return sm(t,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),lc(i,Xn.current),u)break;return null;case 22:return i.lanes=0,k2(t,i,s,i.pendingProps);case 24:rl(i,Sn,t.memoizedState.cache)}return Cr(t,i,s)}function z2(t,i,s){if(t!==null)if(t.memoizedProps!==i.pendingProps)Nn=!0;else{if(!om(t,s)&&(i.flags&128)===0)return Nn=!1,$8(t,i,s);Nn=(t.flags&131072)!==0}else Nn=!1,pt&&(i.flags&1048576)!==0&&uv(i,Zo,i.index);switch(i.lanes=0,i.tag){case 16:e:{var u=i.pendingProps;if(t=ns(i.elementType),i.type=t,typeof t=="function")ph(t)?(u=ls(t,u),i.tag=1,i=E2(null,i,t,u,s)):(i.tag=0,i=tm(null,i,t,u,s));else{if(t!=null){var m=t.$$typeof;if(m===K){i.tag=11,i=b2(null,i,t,u,s);break e}else if(m===Z){i.tag=14,i=j2(null,i,t,u,s);break e}else if(m===q){i.tag=10,i.type=t,i=R2(null,i,s);break e}}throw i=be(t)||t,Error(r(306,i,""))}}return i;case 0:return tm(t,i,i.type,i.pendingProps,s);case 1:return u=i.type,m=ls(u,i.pendingProps),E2(t,i,u,m,s);case 3:e:{if(kn(i,i.stateNode.containerInfo),t===null)throw Error(r(387));u=i.pendingProps;var x=i.memoizedState;m=x.element,Th(t,i),rc(i,u,null,s);var A=i.memoizedState;if(u=A.cache,rl(i,Sn,u),u!==x.cache&&wh(i,[Sn],s,!0),ac(),u=A.element,x.isDehydrated)if(x={element:u,isDehydrated:!1,cache:A.cache},i.updateQueue.baseState=x,i.memoizedState=x,i.flags&256){i=T2(t,i,u,s);break e}else if(u!==m){m=ia(Error(r(424)),i),Jo(m),i=T2(t,i,u,s);break e}else{switch(t=i.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Xt=oa(t.firstChild),Pn=i,pt=!0,il=null,la=!0,s=kv(i,null,u,s),i.child=s;s;)s.flags=s.flags&-3|134221824,s=s.sibling}else{if(Ql(),u===m){i=Cr(t,i,s);break e}zn(t,i,u,s)}i=i.child}return i;case 26:return Xs(t,i),t===null?(s=ax(i.type,null,i.pendingProps,null))?i.memoizedState=s:pt||(i.stateNode=By(i.type,i.pendingProps,Zt.current,i)):i.memoizedState=ax(i.type,t.memoizedProps,i.pendingProps,t.memoizedState),null;case 27:return rn(i),t===null&&pt&&(u=i.stateNode=ex(i.type,i.pendingProps,Zt.current),Pn=i,la=!0,m=Xt,bl(i.type)?(ap=m,Xt=oa(u.firstChild)):Xt=m),zn(t,i,i.pendingProps.children,s),Xs(t,i),t===null&&(i.flags|=4194304),i.child;case 5:return t===null&&pt&&((m=u=Xt)&&(u=IC(u,i.type,i.pendingProps,la),u!==null?(i.stateNode=u,Pn=i,Xt=oa(u.firstChild),la=!1,m=!0):m=!1),m||al(i)),rn(i),m=i.type,x=i.pendingProps,A=t!==null?t.memoizedProps:null,u=x.children,Xm(m,x)?u=null:A!==null&&Xm(m,A)&&(i.flags|=32),i.memoizedState!==null&&(m=Lh(t,i,z8,null,null,s),mo._currentValue=m),Xs(t,i),zn(t,i,u,s),i.child;case 6:return t===null&&pt&&((t=s=Xt)&&(s=PC(s,i.pendingProps,la),s!==null?(i.stateNode=s,Pn=i,Xt=null,t=!0):t=!1),t||al(i)),null;case 13:return M2(t,i,s);case 4:return kn(i,i.stateNode.containerInfo),u=i.pendingProps,t===null?i.child=as(i,null,u,s):zn(t,i,u,s),i.child;case 11:return b2(t,i,i.type,i.pendingProps,s);case 7:return u=i.pendingProps,Xs(t,i),zn(t,i,u,s),i.child;case 8:return zn(t,i,i.pendingProps.children,s),i.child;case 12:return zn(t,i,i.pendingProps.children,s),i.child;case 10:return R2(t,i,s);case 9:return m=i.type._context,u=i.pendingProps.children,Wl(i),m=Yn(m),u=u(m),i.flags|=1,zn(t,i,u,s),i.child;case 14:return j2(t,i,i.type,i.pendingProps,s);case 15:return w2(t,i,i.type,i.pendingProps,s);case 19:return sm(t,i,s);case 31:return F8(t,i,s);case 22:return k2(t,i,s,i.pendingProps);case 24:return Wl(i),u=Yn(Sn),t===null?(m=Ch(),m===null&&(m=Ut,x=kh(),m.pooledCache=x,x.refCount++,x!==null&&(m.pooledCacheLanes|=s),m=x),i.memoizedState={parent:u,cache:m},Eh(i),rl(i,Sn,m)):((t.lanes&s)!==0&&(Th(t,i),rc(i,null,null,s),ac()),m=t.memoizedState,x=i.memoizedState,m.parent!==u?(m={parent:u,cache:u},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),rl(i,Sn,u)):(u=x.cache,rl(i,Sn,u),u!==m.cache&&wh(i,[Sn],s,!0))),zn(t,i,i.pendingProps.children,s),i.child;case 30:return i.stateNode===null&&(i.stateNode={autoName:null,paired:null,clones:null,ref:null}),u=i.pendingProps,u.name!=null&&u.name!=="auto"?i.flags|=t===null?18882560:18874368:pt&&wu(i),t!==null&&t.memoizedProps.name!==u.name?i.flags|=4194816:Xs(t,i),zn(t,i,u.children,s),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Nr(t){t.flags|=4}function cm(t,i,s,u,m){var x;if((x=(t.mode&32)!==0)&&(x=s===null?ox(i,u):ox(i,u)&&(u.src!==s.src||u.srcSet!==s.srcSet)),x){if(t.flags|=16777216,(m&335544128)===m)if(t.stateNode.complete)t.flags|=8192;else if(my())t.flags|=8192;else throw is=Mu,Nh}else t.flags&=-16777217}function O2(t,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!cx(i))if(my())t.flags|=8192;else throw is=Mu,Nh}function Ku(t,i){i!==null&&(t.flags|=4),t.flags&16384&&(i=t.tag!==22?di():536870912,t.lanes|=i,eo|=i)}function dc(t,i){if(!pt)switch(t.tailMode){case"visible":break;case"collapsed":for(var s=t.tail,u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null;break;default:for(i=t.tail,s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t.tail=null:s.sibling=null}}function Qt(t){var i=t.alternate!==null&&t.alternate.child===t.child,s=0,u=0;if(i)for(var m=t.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags&1206910976,u|=m.flags&1206910976,m.return=t,m=m.sibling;else for(m=t.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=t,m=m.sibling;return t.subtreeFlags|=u,t.childLanes=s,i}function V8(t,i,s){var u=i.pendingProps;switch(yh(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(i),null;case 1:return Qt(i),null;case 3:return s=i.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),wr(Sn),vn(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(Fs(i)?Nr(i):t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,bh())),Qt(i),null;case 26:var m=i.type,x=i.memoizedState;return t===null?(Nr(i),x!==null?(Qt(i),O2(i,x)):(Qt(i),cm(i,m,null,u,s))):x?x!==t.memoizedState?(Nr(i),Qt(i),O2(i,x)):(Qt(i),i.flags&=-16777217):(t=t.memoizedProps,t!==u&&Nr(i),Qt(i),cm(i,m,t,u,s)),null;case 27:if(ge(i),s=Zt.current,m=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==u&&Nr(i);else{if(!u){if(i.stateNode===null)throw Error(r(166));return Qt(i),i.subtreeFlags&=-33554433,null}t=gt.current,Fs(i)?fv(i):(t=ex(m,u,s),i.stateNode=t,Nr(i))}return Qt(i),i.subtreeFlags&=-33554433,null;case 5:if(ge(i),m=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==u&&Nr(i);else{if(!u){if(i.stateNode===null)throw Error(r(166));return Qt(i),i.subtreeFlags&=-33554433,null}if(x=gt.current,Fs(i))fv(i);else{var A=wc(Zt.current);switch(x){case 1:x=A.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:x=A.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":x=A.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":x=A.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":x=A.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?x.multiple=!0:u.size&&(x.size=u.size);break;default:x=typeof u.is=="string"?A.createElement(m,{is:u.is}):A.createElement(m)}}x[Wt]=i,x[Rn]=u;e:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)x.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break e;for(;A.sibling===null;){if(A.return===null||A.return===i)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=x;e:switch(Zn(x,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Nr(i)}}return Qt(i),i.subtreeFlags&=-33554433,cm(i,i.type,t===null?null:t.memoizedProps,i.pendingProps,s),null;case 6:if(t&&i.stateNode!=null)t.memoizedProps!==u&&Nr(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(r(166));if(t=Zt.current,Fs(i)){if(t=i.stateNode,s=i.memoizedProps,u=null,m=Pn,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}t[Wt]=i,t=!!(t.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||zy(t.nodeValue,s)),t||al(i,!0)}else t=wc(t).createTextNode(u),t[Wt]=i,i.stateNode=t}return Qt(i),null;case 31:if(s=i.memoizedState,t===null||t.memoizedState!==null){if(u=Fs(i),s!==null){if(t===null){if(!u)throw Error(r(318));if(t=i.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Wt]=i}else Ql(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Qt(i),t=!1}else s=bh(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return i.flags&256?(Ui(i),i):(Ui(i),null);if((i.flags&128)!==0)throw Error(r(558))}return Qt(i),null;case 13:if(u=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(m=Fs(i),u!==null&&u.dehydrated!==null){if(t===null){if(!m)throw Error(r(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(r(317));m[Wt]=i}else Ql(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Qt(i),m=!1}else m=bh(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(Ui(i),i):(Ui(i),null)}return Ui(i),(i.flags&128)!==0?(i.lanes=s,i):(s=u!==null,t=t!==null&&t.memoizedState!==null,s&&(u=i.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),x=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(x=u.memoizedState.cachePool.pool),x!==m&&(u.flags|=2048)),s!==t&&s&&(i.child.flags|=8192),Ku(i,i.updateQueue),Qt(i),null);case 4:return vn(),t===null&&$m(i.stateNode.containerInfo),i.flags|=67108864,Qt(i),null;case 10:return wr(i.type),Qt(i),null;case 19:if(Oh(i),u=i.memoizedState,u===null)return Qt(i),null;if(m=(i.flags&128)!==0,x=u.rendering,x===null)if(m)dc(u,!1);else{if(gn!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(x=zu(t),x!==null){for(i.flags|=128,dc(u,!1),t=x.updateQueue,i.updateQueue=t,Ku(i,t),i.subtreeFlags=0,t=s,s=i.child;s!==null;)sv(s,t),s=s.sibling;return lc(i,Xn.current&1|2),pt&&br(i,u.treeForkCount),i.child}t=t.sibling}u.tail!==null&&Oe()>ld&&(i.flags|=128,m=!0,dc(u,!1),i.lanes=4194304)}else{if(!m)if(t=zu(x),t!==null){if(i.flags|=128,m=!0,t=t.updateQueue,i.updateQueue=t,Ku(i,t),dc(u,!0),u.tail===null&&u.tailMode!=="collapsed"&&u.tailMode!=="visible"&&!x.alternate&&!pt)return Qt(i),null}else 2*Oe()-u.renderingStartTime>ld&&s!==536870912&&(i.flags|=128,m=!0,dc(u,!1),i.lanes=4194304);u.isBackwards?(x.sibling=i.child,i.child=x):(t=u.last,t!==null?t.sibling=x:i.child=x,u.last=x)}if(u.tail!==null){t=u.tail;e:{for(s=t;s!==null;){if(s.alternate!==null){s=!1;break e}s=s.sibling}s=!0}return u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Oe(),t.sibling=null,x=Xn.current,x=m?x&1|2:x&1,u.tailMode==="visible"||u.tailMode==="collapsed"||!s||pt?lc(i,x):(s=x,Ke(Kn,i),Ke(Xn,s),ri===null&&(ri=i)),pt&&br(i,u.treeForkCount),t}return Qt(i),null;case 22:case 23:return Ui(i),Rh(),u=i.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(s&536870912)!==0&&(i.flags&128)===0&&(Qt(i),i.subtreeFlags&6&&(i.flags|=8192)):Qt(i),s=i.updateQueue,s!==null&&Ku(i,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==s&&(i.flags|=2048),t!==null&&Fe(ts),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),wr(Sn),Qt(i),null;case 25:return null;case 30:return i.flags|=33554432,Qt(i),null}throw Error(r(156,i.tag))}function G8(t,i){switch(yh(i),i.tag){case 1:return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return wr(Sn),vn(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 26:case 27:case 5:return ge(i),null;case 31:if(i.memoizedState!==null){if(Ui(i),i.alternate===null)throw Error(r(340));Ql()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 13:if(Ui(i),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(r(340));Ql()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return Oh(i),t=i.flags,t&65536?(i.flags=t&-65537|128,t=i.memoizedState,t!==null&&(t.rendering=null,t.tail=null),i.flags|=4,i):null;case 4:return vn(),null;case 10:return wr(i.type),null;case 22:case 23:return Ui(i),Rh(),t!==null&&Fe(ts),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 24:return wr(Sn),null;case 25:return null;default:return null}}function D2(t,i){switch(yh(i),i.tag){case 3:wr(Sn),vn();break;case 26:case 27:case 5:ge(i);break;case 4:vn();break;case 31:i.memoizedState!==null&&Ui(i);break;case 13:Ui(i);break;case 19:Oh(i);break;case 10:wr(i.type);break;case 22:case 23:Ui(i),Rh(),t!==null&&Fe(ts);break;case 24:wr(Sn)}}function fc(t,i){try{var s=i.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var m=u.next;s=m;do{if((s.tag&t)===t){u=void 0;var x=s.create,A=s.inst;u=x(),A.destroy=u}s=s.next}while(s!==m)}}catch(L){Lt(i,i.return,L)}}function hl(t,i,s){try{var u=i.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var x=m.next;u=x;do{if((u.tag&t)===t){var A=u.inst,L=A.destroy;if(L!==void 0){A.destroy=void 0,m=i;var G=s,ae=L;try{ae()}catch(fe){Lt(m,G,fe)}}}u=u.next}while(u!==x)}}catch(fe){Lt(i,i.return,fe)}}function L2(t){var i=t.updateQueue;if(i!==null){var s=t.stateNode;try{Cv(i,s)}catch(u){Lt(t,t.return,u)}}}function B2(t,i,s){s.props=ls(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(u){Lt(t,i,u)}}function Ba(t,i){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:var m=t.stateNode,x=vr(t.memoizedProps,m);(m.ref===null||m.ref.name!==x)&&(m.ref=$y(x)),u=m.ref;break;case 7:if(t.stateNode===null){var A=new Ki(t);p(t.child,!1,LC,A,void 0,void 0),t.stateNode=A}u=t.stateNode;break;default:u=t.stateNode}typeof s=="function"?t.refCleanup=s(u):s.current=u}}catch(L){Lt(t,i,L)}}function Qn(t,i){var s=t.ref,u=t.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(m){Lt(t,i,m)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Lt(t,i,m)}else s.current=null}function Xu(t,i){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&i!==null)for(var s=0;s<i.length;s++)Qy(t.stateNode,i[s])}function I2(t){for(var i=t.return;i!==null&&(dm(i)&&Qy(t.stateNode,i.stateNode),!um(i));)i=i.return}function hc(t){for(var i=t.return;i!==null&&(dm(i)&&BC(t.stateNode,i.stateNode),!um(i));)i=i.return}function um(t){return t.tag===5||t.tag===3||t.tag===27}function dm(t){return t&&t.tag===7&&t.stateNode!==null}function fm(t){var i=t.type,s=t.memoizedProps,u=t.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(m){Lt(t,t.return,m)}}function hm(t,i,s){try{var u=t.stateNode;yC(u,t.type,s,i),u[Rn]=i}catch(m){Lt(t,t.return,m)}}function P2(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&bl(t.type)||t.tag===4}function mm(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||P2(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&bl(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function pm(t,i,s,u){var m=t.tag;if(m===5||m===6)m=t.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(m,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(m),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=gi)),Xu(t,u),Ge=!0;else if(m!==4&&(m===27&&(Xu(t,u),u=null,bl(t.type)&&(s=t.stateNode,i=null)),t=t.child,t!==null))for(pm(t,i,s,u),t=t.sibling;t!==null;)pm(t,i,s,u),t=t.sibling}function Qu(t,i,s,u){var m=t.tag;if(m===5||m===6)m=t.stateNode,i?s.insertBefore(m,i):s.appendChild(m),Xu(t,u),Ge=!0;else if(m!==4&&(m===27&&(Xu(t,u),u=null,bl(t.type)&&(s=t.stateNode)),t=t.child,t!==null))for(Qu(t,i,s,u),t=t.sibling;t!==null;)Qu(t,i,s,u),t=t.sibling}function H2(t){var i=t.stateNode,s=t.memoizedProps;try{for(var u=t.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Zn(i,u,s),i[Wt]=t,i[Rn]=s}catch(x){Lt(t,t.return,x)}}var Zu=!1,$i=null;function q2(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Zu=!0)}var Ia=null;function F2(){var t=Ia;return Ia=null,t}var Mi=0;function Qs(t,i,s,u,m){return Mi=0,U2(t.child,i,s,u,m)}function U2(t,i,s,u,m){for(var x=!1;t!==null;){if(t.tag===5){var A=t.stateNode;if(u!==null){var L=Jm(A);u.push(L),L.view&&(x=!0)}else x||Jm(A).view&&(x=!0);Zu=!0,Fy(A,Mi===0?i:i+"_"+Mi,s),Mi++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&m||U2(t.child,i,s,u,m)&&(x=!0));t=t.sibling}return x}function Pa(t,i){for(;t!==null;)t.tag===5?Uy(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&i||Pa(t.child,i)),t=t.sibling}function Ju(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Ju(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var i=t.memoizedProps;if(i.name==null||i.name==="auto")throw Error(r(544));var s=i.name;i=yr(i.default,i.share),i!=="none"&&(Qs(t,s,i,null,!1)||Pa(t.child,!1))}t=t.sibling}}function gm(t,i){if(t.tag===30){var s=t.stateNode,u=t.memoizedProps,m=vr(u,s),x=yr(u.default,s.paired?u.share:u.enter);x!=="none"?Qs(t,m,x,null,!1)?(Ju(t),s.paired||i||ao(t,u.onEnter)):Pa(t.child,!1):Ju(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)gm(t,i),t=t.sibling;else Ju(t)}function vm(t){if($i!==null&&$i.size!==0){var i=$i;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var s=t.memoizedProps,u=s.name;if(u!=null&&u!=="auto"){var m=i.get(u);if(m!==void 0){var x=yr(s.default,s.share);if(x!=="none"&&(Qs(t,u,x,null,!1)?(x=t.stateNode,m.paired=x,x.paired=m,ao(t,s.onShare)):Pa(t.child,!1)),i.delete(u),i.size===0)break}}}vm(t)}t=t.sibling}}}function ym(t){if(t.tag===30){var i=t.memoizedProps,s=vr(i,t.stateNode),u=$i!==null?$i.get(s):void 0,m=yr(i.default,u!==void 0?i.share:i.exit);m!=="none"&&(Qs(t,s,m,null,!1)?u!==void 0?(m=t.stateNode,u.paired=m,m.paired=u,$i.delete(s),ao(t,i.onShare)):ao(t,i.onExit):Pa(t.child,!1)),$i!==null&&vm(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)ym(t),t=t.sibling;else $i!==null&&vm(t)}function $2(t){for(t=t.child;t!==null;){if(t.tag===30){var i=t.memoizedProps,s=vr(i,t.stateNode);i=yr(i.default,i.update),t.flags&=-5,i!=="none"&&Qs(t,s,i,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&$2(t);t=t.sibling}}function xm(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var i=t.stateNode;i.paired!==null&&(i.paired=null,Pa(t.child,!1))}xm(t)}t=t.sibling}}function Wu(t){if(t.tag===30)t.stateNode.paired=null,Pa(t.child,!1),xm(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Wu(t),t=t.sibling;else xm(t)}function V2(t){for(t=t.child;t!==null;)t.tag===30?Pa(t.child,!1):(t.subtreeFlags&33554432)!==0&&V2(t),t=t.sibling}function bm(t,i,s,u,m,x,A){for(var L=!1;i!==null;){if(i.tag===5){var G=i.stateNode;if(x!==null&&Mi<x.length){var ae=x[Mi],fe=Jm(G);(ae.view||fe.view)&&(L=!0);var xe;if(xe=(t.flags&4)===0)if(fe.clip)xe=!0;else{xe=ae.rect;var te=fe.rect;xe=xe.y!==te.y||xe.x!==te.x||xe.height!==te.height||xe.width!==te.width}xe&&(t.flags|=4),fe.abs?fe=!ae.abs:(ae=ae.rect,fe=fe.rect,fe=ae.height!==fe.height||ae.width!==fe.width),fe&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&Fy(G,Mi===0?s:s+"_"+Mi,m),L&&(t.flags&4)!==0||(Ia===null&&(Ia=[]),Ia.push(G,Mi===0?u:u+"_"+Mi,i.memoizedProps)),Mi++}else(i.tag!==22||i.memoizedState===null)&&(i.tag===30&&A?t.flags|=i.flags&32:bm(t,i.child,s,u,m,x,A)&&(L=!0));i=i.sibling}return L}function G2(t,i){for(t=t.child;t!==null;){if(t.tag===30){var s=t.memoizedProps,u=t.stateNode,m=vr(s,u),x=yr(s.default,s.update),A;A=t.memoizedState,t.memoizedState=null,u=t;var L=t.child;Mi=0,m=bm(u,L,m,m,x,A,!1),(t.flags&4)!==0&&m&&ao(t,s.onUpdate)}else(t.subtreeFlags&33554432)!==0&&G2(t);t=t.sibling}}var Hn=!1,zt=!1,Ha=!1,jm=!1,Y2=typeof WeakSet=="function"?WeakSet:Set,qn=null,qa=!1,mc=!1,ed=!1,wm=!1;function Y8(t,i,s){if(t=t.containerInfo,Ym=po,t=Zg(t),oh(t)){if("selectionStart"in t)var u={start:t.selectionStart,end:t.selectionEnd};else e:{u=(u=t.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var x=m.anchorOffset,A=m.focusNode;m=m.focusOffset;try{u.nodeType,A.nodeType}catch{u=null;break e}var L=0,G=-1,ae=-1,fe=0,xe=0,te=t,ce=null;t:for(;;){for(var ze;te!==u||x!==0&&te.nodeType!==3||(G=L+x),te!==A||m!==0&&te.nodeType!==3||(ae=L+m),te.nodeType===3&&(L+=te.nodeValue.length),(ze=te.firstChild)!==null;)ce=te,te=ze;for(;;){if(te===t)break t;if(ce===u&&++fe===x&&(G=L),ce===A&&++xe===m&&(ae=L),(ze=te.nextSibling)!==null)break;te=ce,ce=te.parentNode}te=ze}u=G===-1||ae===-1?null:{start:G,end:ae}}else u=null}u=u||{start:0,end:0}}else u=null;for(Km={focusedElem:t,selectionRange:u},po=!1,s=(s&335544064)===s,qn=i,i=s?9270:1024;qn!==null;){if(t=qn,s&&(u=t.deletions,u!==null))for(x=0;x<u.length;x++)s&&ym(u[x]);if(t.alternate===null&&(t.flags&2)!==0)s&&q2(t),td(s);else{if(t.tag===22){if(u=t.alternate,t.memoizedState!==null){u!==null&&u.memoizedState===null&&s&&ym(u),td(s);continue}else if(u!==null&&u.memoizedState!==null){s&&q2(t),td(s);continue}}u=t.child,(t.subtreeFlags&i)!==0&&u!==null?(u.return=t,qn=u):(s&&$2(t),td(s))}}$i=null}function td(t){for(;qn!==null;){var i=qn,s=t,u=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 15:break;case 1:if((m&1024)!==0&&u!==null){s=void 0,m=u.memoizedProps,u=u.memoizedState;var x=i.stateNode;try{var A=ls(i.type,m);s=x.getSnapshotBeforeUpdate(A,u),x.__reactInternalSnapshotBeforeUpdate=s}catch(L){Lt(i,i.return,L)}}break;case 3:if((m&1024)!==0){if(u=i.stateNode.containerInfo,s=u.nodeType,s===9)tp(u);else if(s===1)switch(u.nodeName){case"HEAD":case"HTML":case"BODY":tp(u);break;default:u.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:s&&u!==null&&(s=vr(u.memoizedProps,u.stateNode),m=i.memoizedProps,m=yr(m.default,m.update),m!=="none"&&Qs(u,s,m,u.memoizedState=[],!0));break;default:if((m&1024)!==0)throw Error(r(163))}if(u=i.sibling,u!==null){u.return=i.return,qn=u;break}qn=i.return}}function K2(t,i,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:Fa(t,s),u&4&&fc(5,s);break;case 1:if(Fa(t,s),u&4)if(t=s.stateNode,i===null)try{t.componentDidMount()}catch(A){Lt(s,s.return,A)}else{var m=ls(s.type,i.memoizedProps);i=i.memoizedState;try{t.componentDidUpdate(m,i,t.__reactInternalSnapshotBeforeUpdate)}catch(A){Lt(s,s.return,A)}}u&64&&L2(s),u&512&&Ba(s,s.return);break;case 3:if(Fa(t,s),u&64&&(t=s.updateQueue,t!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Cv(t,i)}catch(A){Lt(s,s.return,A)}}break;case 27:i===null&&u&4&&H2(s);case 26:case 5:Fa(t,s),i===null&&u&4&&fm(s),u&512&&Ba(s,s.return);break;case 12:Fa(t,s);break;case 31:Fa(t,s),u&4&&J2(t,s);break;case 13:Fa(t,s),u&4&&W2(t,s),u&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=rC.bind(null,s),HC(t,s))));break;case 22:if(u=s.memoizedState!==null||Hn,!u){var x=i!==null&&i.memoizedState!==null||zt;i=Hn,m=zt,Hn=u,(zt=x)&&!m?(u=2,(s.subtreeFlags&8772)!==0&&(u|=1),xa(t,s,u)):Fa(t,s),Hn=i,zt=m}break;case 30:Fa(t,s),u&512&&Ba(s,s.return);break;case 7:u&512&&Ba(s,s.return);default:Fa(t,s)}}function km(t,i){for(t=t.child;t!==null;)X2(t,i),t=t.sibling}function X2(t,i){switch(t.tag){case 5:case 26:try{var s=t.stateNode;if(i){var u=s.style;typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"}else{var m=t.stateNode,x=t.memoizedProps.style,A=x!=null&&x.hasOwnProperty("display")?x.display:null;m.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(G){Lt(t,t.return,G)}Sm(t,i);break;case 6:try{t.stateNode.nodeValue=i?"":t.memoizedProps,Ge=!0}catch(G){Lt(t,t.return,G)}break;case 18:try{var L=t.stateNode;i?qy(L,!0):qy(t.stateNode,!1)}catch(G){Lt(t,t.return,G)}break;case 22:case 23:t.memoizedState===null&&km(t,i);break;default:km(t,i)}}function Sm(t,i){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var s=t,u=i;switch(s.tag){case 4:X2(s,u);break e;case 22:s.memoizedState===null&&Sm(s,u);break e;default:Sm(s,u)}}t=t.sibling}}function Q2(t){var i=t.alternate;i!==null&&(t.alternate=null,Q2(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&Jr(i)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var nn=null,Ai=!1;function va(t,i,s){for(s=s.child;s!==null;)Z2(t,i,s),s=s.sibling}function Z2(t,i,s){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(Gt,s)}catch{}switch(s.tag){case 26:zt||Qn(s,i),va(t,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&!zt&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:zt||Qn(s,i),hc(s);var u=nn,m=Ai;bl(s.type)&&(nn=s.stateNode,Ai=!1),va(t,i,s),tx(s.stateNode,s.type,s.memoizedProps),nn=u,Ai=m;break;case 5:zt||Qn(s,i),hc(s);case 6:if(s.tag===6&&hc(s),u=nn,m=Ai,nn=null,va(t,i,s),nn=u,Ai=m,nn!==null)if(Ai)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(s.stateNode),Ge=!0}catch(x){Lt(s,i,x)}else try{nn.removeChild(s.stateNode),Ge=!0}catch(x){Lt(s,i,x)}break;case 18:nn!==null&&(Ai?(t=nn,Hy(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),go(t)):Hy(nn,s.stateNode));break;case 4:u=nn,m=Ai,nn=s.stateNode.containerInfo,Ai=!0,va(t,i,s),nn=u,Ai=m;break;case 0:case 11:case 14:case 15:hl(2,s,i),zt||hl(4,s,i),va(t,i,s);break;case 1:zt||(Qn(s,i),u=s.stateNode,typeof u.componentWillUnmount=="function"&&B2(s,i,u)),va(t,i,s);break;case 21:va(t,i,s);break;case 22:zt=(u=zt)||s.memoizedState!==null,va(t,i,s),zt=u;break;case 30:Qn(s,i),va(t,i,s);break;case 7:zt||Qn(s,i),va(t,i,s);break;default:va(t,i,s)}}function J2(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{go(t)}catch(s){Lt(i,i.return,s)}}}function W2(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{go(t)}catch(s){Lt(i,i.return,s)}}function K8(t){switch(t.tag){case 31:case 13:case 19:var i=t.stateNode;return i===null&&(i=t.stateNode=new Y2),i;case 22:return t=t.stateNode,i=t._retryCache,i===null&&(i=t._retryCache=new Y2),i;default:throw Error(r(435,t.tag))}}function nd(t,i){var s=K8(t);i.forEach(function(u){if(!s.has(u)){s.add(u);var m=lC.bind(null,t,u);u.then(m,m)}})}function xi(t,i,s){var u=i.deletions;if(u!==null)for(var m=0;m<u.length;m++){var x=u[m],A=t,L=i,G=L;e:for(;G!==null;){switch(G.tag){case 27:if(bl(G.type)){nn=G.stateNode,Ai=!1;break e}break;case 5:nn=G.stateNode,Ai=!1;break e;case 3:case 4:nn=G.stateNode.containerInfo,Ai=!0;break e}G=G.return}if(nn===null)throw Error(r(160));Z2(A,L,x),nn=null,Ai=!1,A=x.alternate,A!==null&&(A.return=null),x.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)ey(i,t,s),i=i.sibling}var ya=null;function ey(t,i,s){var u=t.alternate,m=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(m&4&&(u=t.updateQueue,u=u!==null?u.events:null,u!==null))for(var x=0;x<u.length;x++){var A=u[x];A.ref.impl=A.nextImpl}xi(i,t,s),bi(t),m&4&&(hl(3,t,t.return),fc(3,t),hl(5,t,t.return));break;case 1:xi(i,t,s),bi(t),m&512&&(zt||u===null||Qn(u,u.return)),m&64&&Hn&&(t=t.updateQueue,t!==null&&(i=t.callbacks,i!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?i:s.concat(i))));break;case 26:if(x=ya,xi(i,t,s),bi(t),m&512&&(zt||u===null||Qn(u,u.return)),m&4)if(m=u!==null?u.memoizedState:null,s=t.memoizedState,u===null)if(s===null)if(t.stateNode===null)if(Hn)t.stateNode=By(t.type,t.memoizedProps,i.containerInfo,t);else{e:{i=t.type,s=t.memoizedProps,m=x.ownerDocument||x;t:switch(i){case"title":u=m.getElementsByTagName("title")[0],(!u||u[hr]||u[Wt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=m.createElement(i),m.head.insertBefore(u,m.querySelector("head > title"))),Zn(u,i,s),u[Wt]=t,je(u),i=u;break e;case"link":if(x=sx("link","href",m).get(i+(s.href||""))){for(A=0;A<x.length;A++)if(u=x[A],u.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&u.getAttribute("rel")===(s.rel==null?null:s.rel)&&u.getAttribute("title")===(s.title==null?null:s.title)&&u.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){x.splice(A,1);break t}}u=m.createElement(i),Zn(u,i,s),m.head.appendChild(u);break;case"meta":if(x=sx("meta","content",m).get(i+(s.content||""))){for(A=0;A<x.length;A++)if(u=x[A],u.getAttribute("content")===(s.content==null?null:""+s.content)&&u.getAttribute("name")===(s.name==null?null:s.name)&&u.getAttribute("property")===(s.property==null?null:s.property)&&u.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&u.getAttribute("charset")===(s.charSet==null?null:s.charSet)){x.splice(A,1);break t}}u=m.createElement(i),Zn(u,i,s),m.head.appendChild(u);break;default:throw Error(r(468,i))}u[Wt]=t,je(u),i=u}t.stateNode=i}else Hn||op(x,t.type,t.stateNode);else t.stateNode=lx(x,s,t.memoizedProps);else m!==s?(m===null?(i=u.stateNode,i===null||zt||i.parentNode.removeChild(i)):m.count--,s===null?Hn||op(x,t.type,t.stateNode):lx(x,s,t.memoizedProps)):s===null&&t.stateNode!==null&&hm(t,t.memoizedProps,u.memoizedProps);break;case 27:xi(i,t,s),bi(t),m&512&&(zt||u===null||Qn(u,u.return)),u!==null&&m&4&&hm(t,t.memoizedProps,u.memoizedProps);break;case 5:if(x=Ha,Ha=!1,xi(i,t,s),Ha=x,bi(t),m&512&&(zt||u===null||Qn(u,u.return)),t.flags&32){i=t.stateNode;try{mt(i,""),Ge=!0}catch(fe){Lt(t,t.return,fe)}}m&4&&t.stateNode!=null&&(i=t.memoizedProps,hm(t,i,u!==null?u.memoizedProps:i)),m&1024&&(jm=!0);break;case 6:if(xi(i,t,s),bi(t),m&4){if(t.stateNode===null)throw Error(r(162));i=t.memoizedProps,s=t.stateNode;try{s.nodeValue=i,Ge=!0}catch(fe){Lt(t,t.return,fe)}}break;case 3:if(Ge=!1,vd=null,x=ya,ya=kc(i.containerInfo),xi(i,t,s),ya=x,bi(t),m&4&&u!==null&&u.memoizedState.isDehydrated)try{go(i.containerInfo)}catch(fe){Lt(t,t.return,fe)}jm&&(jm=!1,ty(t)),Ge=!1;break;case 4:m=Ha,Ha=Hn,u=bn(),x=ya,ya=kc(t.stateNode.containerInfo),xi(i,t,s),bi(t),ya=x,Ge&&mc&&(ed=!0),Ge=u,Ha=m;break;case 12:xi(i,t,s),bi(t);break;case 31:xi(i,t,s),bi(t),m&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,nd(t,i)));break;case 13:xi(i,t,s),bi(t),t.child.flags&8192&&t.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(rd=Oe()),m&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,nd(t,i)));break;case 22:x=t.memoizedState!==null,A=u!==null&&u.memoizedState!==null;var L=Hn,G=zt,ae=Ha;Hn=L||x,Ha=ae||x,zt=G||A,xi(i,t,s),zt=G,Ha=ae,Hn=L,bi(t),m&8192&&(i=t.stateNode,i._visibility=x?i._visibility&-2:i._visibility|1,!x||u===null||A||Hn||zt||(i=A||zt,s=Hn,u=zt,Hn=x||Hn,zt=i,ml(t,2),Hn=s,zt=u),!x&&Ha||km(t,x)),m&4&&(i=t.updateQueue,i!==null&&(s=i.retryQueue,s!==null&&(i.retryQueue=null,nd(t,s))));break;case 19:xi(i,t,s),bi(t),m&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,nd(t,i)));break;case 30:m&512&&(zt||u===null||Qn(u,u.return)),m=bn(),x=mc,A=(s&335544064)===s,L=t.memoizedProps,mc=A&&yr(L.default,L.update)!=="none",xi(i,t,s),bi(t),A&&u!==null&&Ge&&(t.flags|=4),mc=x,Ge=m;break;case 21:break;case 7:m&512&&(zt||u===null||Qn(u,u.return)),u&&u.stateNode!==null&&(u.stateNode._fragmentFiber=t);default:xi(i,t,s),bi(t)}}function bi(t){var i=t.flags;if(i&2){try{for(var s,u=t.return;u!==null;){if(P2(u)){s=u;break}u=u.return}u=null;for(var m=t.return;m!==null;){if(dm(m)){var x=m.stateNode;u===null?u=[x]:u.push(x)}if(um(m))break;m=m.return}var A=u;if(s==null)throw Error(r(160));switch(s.tag){case 27:var L=s.stateNode,G=mm(t);Qu(t,G,L,A);break;case 5:var ae=s.stateNode;s.flags&32&&(mt(ae,""),s.flags&=-33);var fe=mm(t);Qu(t,fe,ae,A);break;case 3:case 4:var xe=s.stateNode.containerInfo,te=mm(t);pm(t,te,xe,A);break;default:throw Error(r(161))}}catch(ce){Lt(t,t.return,ce)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function ty(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var i=t;ty(i),i.tag===5&&i.flags&1024&&(i=i.stateNode,po=!0,i.reset(),po=!1),t=t.sibling}}function Zs(t,i){if(i.subtreeFlags&9270)for(i=i.child;i!==null;)ny(i,t),i=i.sibling;else G2(i)}function ny(t,i){var s=t.alternate;if(s===null)gm(t,!1);else switch(t.tag){case 3:if(wm=qa=!1,F2(),Zs(i,t),!qa&&!ed){if(t=Ia,t!==null)for(var u=0;u<t.length;u+=3){s=t[u];var m=t[u+1];Uy(s,t[u+2]),s=s.ownerDocument.documentElement,s!==null&&s.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+m+")"})}t=i.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),wm=!0}Ia=null;break;case 5:Zs(i,t);break;case 4:u=qa,qa=!1,Zs(i,t),qa&&(ed=!0),qa=u;break;case 22:t.memoizedState===null&&(s.memoizedState!==null?gm(t,!1):Zs(i,t));break;case 30:u=qa,m=F2(),qa=!1,Zs(i,t),qa&&(t.flags|=4);var x=t.memoizedProps,A=t.stateNode;i=vr(x,A),A=vr(s.memoizedProps,A);var L=yr(x.default,x.update);L==="none"?i=!1:(x=s.memoizedState,s.memoizedState=null,s=t.child,Mi=0,i=bm(t,s,i,A,L,x,!0),Mi!==(x===null?0:x.length)&&(t.flags|=32)),(t.flags&4)!==0&&i?(ao(t,t.memoizedProps.onUpdate),Ia=m):m!==null&&(m.push.apply(m,Ia),Ia=m),qa=(t.flags&32)!==0?!0:u;break;default:Zs(i,t)}}function Fa(t,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)K2(t,i.alternate,i),i=i.sibling}function ml(t,i){for(t=t.child;t!==null;){var s=t,u=i;switch(s.tag){case 0:case 11:case 14:case 15:hl(4,s,s.return),ml(s,u);break;case 1:Qn(s,s.return);var m=s.stateNode;typeof m.componentWillUnmount=="function"&&B2(s,s.return,m),ml(s,u);break;case 27:(u&2)!==0&&tx(s.stateNode,s.type,s.memoizedProps);case 5:Qn(s,s.return),s.tag!==5&&s.tag!==27||hc(s),ml(s,u);break;case 6:hc(s);break;case 26:Qn(s,s.return),m=s.stateNode,s.memoizedState!==null||m===null||zt||m.parentNode.removeChild(m),ml(s,u);break;case 22:s.memoizedState===null&&ml(s,u);break;case 30:Qn(s,s.return),ml(s,u);break;case 7:Qn(s,s.return);default:ml(s,u)}t=t.sibling}}function xa(t,i,s){for(s=(i.subtreeFlags&8772)!==0?s:s&-2,i=i.child;i!==null;){var u=i.alternate,m=t,x=i,A=x.flags,L=(s&1)!==0;switch(x.tag){case 0:case 11:case 15:xa(m,x,s),fc(4,x);break;case 1:if(xa(m,x,s),u=x,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(fe){Lt(u,u.return,fe)}if(u=x,m=u.updateQueue,m!==null){var G=u.stateNode;try{var ae=m.shared.hiddenCallbacks;if(ae!==null)for(m.shared.hiddenCallbacks=null,m=0;m<ae.length;m++)Sv(ae[m],G)}catch(fe){Lt(u,u.return,fe)}}L&&A&64&&L2(x),Ba(x,x.return);break;case 27:(s&2)!==0&&H2(x);case 5:x.tag!==5&&x.tag!==27||I2(x),xa(m,x,s),L&&u===null&&A&4&&fm(x),Ba(x,x.return);break;case 6:I2(x);break;case 26:G=x.stateNode,x.memoizedState!==null||G===null||Hn||op(kc(G.ownerDocument),x.type,G),xa(m,x,s),L&&u===null&&A&4&&fm(x),Ba(x,x.return);break;case 12:xa(m,x,s);break;case 31:xa(m,x,s),L&&A&4&&J2(m,x);break;case 13:xa(m,x,s),L&&A&4&&W2(m,x);break;case 22:x.memoizedState===null&&xa(m,x,s),Ba(x,x.return);break;case 30:xa(m,x,s),Ba(x,x.return);break;case 7:Ba(x,x.return);default:xa(m,x,s)}i=i.sibling}}function Cm(t,i){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&Wo(s))}function Nm(t,i){t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&Wo(t))}function sa(t,i,s,u){var m=(s&335544064)===s;if(i.subtreeFlags&(m?10262:10256))for(i=i.child;i!==null;)iy(t,i,s,u),i=i.sibling;else m&&V2(i)}function iy(t,i,s,u){var m=(s&335544064)===s;m&&i.alternate===null&&i.return!==null&&i.return.alternate!==null&&Wu(i);var x=i.flags;switch(i.tag){case 0:case 11:case 15:sa(t,i,s,u),x&2048&&fc(9,i);break;case 1:sa(t,i,s,u);break;case 3:sa(t,i,s,u),m&&wm&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),x&2048&&(x=null,i.alternate!==null&&(x=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==x&&(i.refCount++,x!=null&&Wo(x)));break;case 12:if(x&2048){sa(t,i,s,u),x=i.stateNode;try{var A=i.memoizedProps,L=A.id,G=A.onPostCommit;typeof G=="function"&&G(L,i.alternate===null?"mount":"update",x.passiveEffectDuration,-0)}catch(ae){Lt(i,i.return,ae)}}else sa(t,i,s,u);break;case 31:sa(t,i,s,u);break;case 13:sa(t,i,s,u);break;case 23:break;case 22:A=i.stateNode,L=i.alternate,i.memoizedState!==null?(m&&L!==null&&L.memoizedState===null&&Wu(L),A._visibility&2?sa(t,i,s,u):pc(t,i)):(m&&L!==null&&L.memoizedState!==null&&Wu(i),A._visibility&2?sa(t,i,s,u):(A._visibility|=2,Js(t,i,s,u,(i.subtreeFlags&10256)!==0||!1))),x&2048&&Cm(L,i);break;case 24:sa(t,i,s,u),x&2048&&Nm(i.alternate,i);break;case 30:m&&(x=i.alternate,x!==null&&(Pa(x.child,!0),Pa(i.child,!0))),sa(t,i,s,u);break;default:sa(t,i,s,u)}}function Js(t,i,s,u,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var x=t,A=i,L=s,G=u,ae=A.flags;switch(A.tag){case 0:case 11:case 15:Js(x,A,L,G,m),fc(8,A);break;case 23:break;case 22:var fe=A.stateNode;A.memoizedState!==null?fe._visibility&2?Js(x,A,L,G,m):pc(x,A):(fe._visibility|=2,Js(x,A,L,G,m)),m&&ae&2048&&Cm(A.alternate,A);break;case 24:Js(x,A,L,G,m),m&&ae&2048&&Nm(A.alternate,A);break;default:Js(x,A,L,G,m)}i=i.sibling}}function pc(t,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=t,u=i,m=u.flags;switch(u.tag){case 22:pc(s,u),m&2048&&Cm(u.alternate,u);break;case 24:pc(s,u),m&2048&&Nm(u.alternate,u);break;default:pc(s,u)}i=i.sibling}}var ss=8192;function os(t,i,s){if(t.subtreeFlags&ss)for(t=t.child;t!==null;)ay(t,i,s),t=t.sibling}function ay(t,i,s){switch(t.tag){case 26:os(t,i,s),t.flags&ss&&(t.memoizedState!==null?e7(s,ya,t.memoizedState,t.memoizedProps):(t=t.stateNode,(i&335544128)===i&&dx(s,t)));break;case 5:os(t,i,s),t.flags&ss&&(t=t.stateNode,(i&335544128)===i&&dx(s,t));break;case 3:case 4:var u=ya;ya=kc(t.stateNode.containerInfo),os(t,i,s),ya=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=ss,ss=16777216,os(t,i,s),ss=u):os(t,i,s));break;case 30:if((t.flags&ss)!==0&&(u=t.memoizedProps.name,u!=null&&u!=="auto")){var m=t.stateNode;m.paired=null,$i===null&&($i=new Map),$i.set(u,m)}os(t,i,s);break;default:os(t,i,s)}}function ry(t){var i=t.alternate;if(i!==null&&(t=i.child,t!==null)){i.child=null;do i=t.sibling,t.sibling=null,t=i;while(t!==null)}}function gc(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var u=i[s];qn=u,sy(u,t)}ry(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ly(t),t=t.sibling}function ly(t){switch(t.tag){case 0:case 11:case 15:gc(t),t.flags&2048&&hl(9,t,t.return);break;case 3:gc(t);break;case 12:gc(t);break;case 22:var i=t.stateNode;t.memoizedState!==null&&i._visibility&2&&(t.return===null||t.return.tag!==13)?(i._visibility&=-3,id(t)):gc(t);break;default:gc(t)}}function id(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var u=i[s];qn=u,sy(u,t)}ry(t)}for(t=t.child;t!==null;){switch(i=t,i.tag){case 0:case 11:case 15:hl(8,i,i.return),id(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,id(i));break;default:id(i)}t=t.sibling}}function sy(t,i){for(;qn!==null;){var s=qn;switch(s.tag){case 0:case 11:case 15:hl(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Wo(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,qn=u;else e:for(s=t;qn!==null;){u=qn;var m=u.sibling,x=u.return;if(Q2(u),u===s){qn=null;break e}if(m!==null){m.return=x,qn=m;break e}qn=x}}}var X8={getCacheForType:function(t){var i=Yn(Sn),s=i.data.get(t);return s===void 0&&(s=t(),i.data.set(t,s)),s},cacheSignal:function(){return Yn(Sn).controller.signal}},Q8=typeof WeakMap=="function"?WeakMap:Map,Rt=0,Ut=null,bt=null,St=0,Dt=0,Vi=null,pl=!1,Ws=!1,Em=!1,Er=0,gn=0,gl=0,cs=0,ad=0,Gi=0,eo=0,vc=null,_i=null,Tm=!1,rd=0,oy=0,ld=1/0,sd=null,vl=null,on=0,ba=null,us=null,Ua=0,Mm=0,Am=null,cy=null,to=null,no=null,io=null,yc=0,od=null;function Yi(){return(Rt&2)!==0&&St!==0?St&-St:ve.T!==null?Hm():Ei()}function uy(){if(Gi===0)if((St&536870912)===0||pt){var t=Pi;Pi<<=1,(Pi&3932160)===0&&(Pi=262144),Gi=t}else Gi=536870912;return t=Kn.current,t!==null&&(t.flags|=32),Gi}function ao(t,i){if(i!=null){var s=t.stateNode,u=s.ref;u===null&&(u=s.ref=$y(vr(t.memoizedProps,s))),no===null&&(no=[]),no.push(i.bind(null,u))}}function Ri(t,i,s){(t===Ut&&(Dt===2||Dt===9)||t.cancelPendingCommit!==null)&&(ro(t,0),yl(t,St,Gi,!1)),ma(t,s),((Rt&2)===0||t!==Ut)&&(t===Ut&&((Rt&2)===0&&(cs|=s),gn===4&&yl(t,St,Gi,!1)),$a(t))}function dy(t,i,s){if((Rt&6)!==0)throw Error(r(327));var u=!s&&(i&127)===0&&(i&t.expiredLanes)===0||ni(t,i),m=u?W8(t,i):Rm(t,i,!0),x=u;do{if(m===0){Ws&&!u&&yl(t,i,0,!1);break}else{if(s=t.current.alternate,x&&!Z8(s)){m=Rm(t,i,!1),x=!1;continue}if(m===2){if(x=i,t.errorRecoveryDisabledLanes&x)var A=0;else A=t.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){i=A;e:{var L=t;m=vc;var G=L.current.memoizedState.isDehydrated;if(G&&(ro(L,A).flags|=256),A=Rm(L,A,!1),A!==2&&A!==6){if(Em&&!G){L.errorRecoveryDisabledLanes|=x,cs|=x,m=4;break e}x=_i,_i=m,x!==null&&(_i===null?_i=x:_i.push.apply(_i,x))}m=A}if(x=!1,m!==2)continue}}if(m===1){ro(t,0),yl(t,i,0,!0);break}e:{switch(u=t,x=m,x){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i&&(i&62914560)!==i)break;case 6:yl(u,i,Gi,!pl);break e;case 2:_i=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(m=rd+300-Oe(),10<m)){if(yl(u,i,Gi,!pl),ft(u,0,!0)!==0)break e;Ua=i,u.timeoutHandle=Zm(fy.bind(null,u,s,_i,sd,Tm,i,Gi,cs,eo,pl,x,"Throttled",-0,0),m);break e}fy(u,s,_i,sd,Tm,i,Gi,cs,eo,pl,x,null,-0,0)}}break}while(!0);$a(t)}function fy(t,i,s,u,m,x,A,L,G,ae,fe,xe,te,ce){t.timeoutHandle=-1;var ze=i.subtreeFlags,Ie=(x&335544064)===x;if(xe=null,(Ie||ze&8192||(ze&16785408)===16785408)&&(xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gi},$i=null,ay(i,x,xe),Ie&&(ze=xe,Ie=t.containerInfo,Ie=(Ie.nodeType===9?Ie:Ie.ownerDocument).__reactViewTransition,Ie!=null&&(ze.count++,ze.waitingForViewTransition=!0,ze=Nc.bind(ze),Ie.finished.then(ze,ze))),ze=(x&62914560)===x?rd-Oe():(x&4194048)===x?oy-Oe():0,ze=t7(xe,ze),ze!==null)){Ua=x,t.cancelPendingCommit=ze(by.bind(null,t,i,x,s,u,m,A,L,G,ae,fe,xe,null,te,ce)),yl(t,x,A,!ae);return}by(t,i,x,s,u,m,A,L,G,ae,fe,xe)}function Z8(t){for(var i=t;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var m=s[u],x=m.getSnapshot;m=m.value;try{if(!Fi(x(),m))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function yl(t,i,s,u){i=za(t,i),i&=~ad,i&=~cs,t.suspendedLanes|=i,t.pingedLanes&=~i,u&&(t.warmLanes|=i),u=t.expirationTimes;for(var m=i;0<m;){var x=31-ln(m),A=1<<x;u[x]=-1,m&=~A}s!==0&&hi(t,s,i)}function cd(){return(Rt&6)===0?(xc(0),!1):!0}function _m(){if(bt!==null){if(Dt===0)var t=bt.return;else t=bt,jr=Zl=null,Ph(t),Vs=null,nc=0,t=bt;for(;t!==null;)D2(t.alternate,t),t=t.return;bt=null}}function ro(t,i){var s=t.timeoutHandle;return s!==-1&&(t.timeoutHandle=-1,jC(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),Ua=0,_m(),Ut=t,bt=s=xr(t.current,null),St=i,Dt=0,Vi=null,pl=!1,Ws=ni(t,i),Em=!1,eo=Gi=ad=cs=gl=gn=0,_i=vc=null,Tm=!1,Er=za(t,i),vu(),s}function hy(t,i){ct=null,ve.H=Fu,i===$s||i===Tu?(i=bv(),Dt=3):i===Nh?(i=bv(),Dt=4):Dt=i===em?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Vi=i,bt===null&&(gn=1,Uu(t,ia(i,t.current)))}function my(){var t=Kn.current;return t===null?!0:(St&4194048)===St?ri===null:(St&62914560)===St||(St&536870912)!==0?t===ri:!1}function py(){var t=ve.H;return ve.H=Fu,t===null?Fu:t}function gy(){var t=ve.A;return ve.A=X8,t}function ud(){gn=4,pl||(St&4194048)!==St&&Kn.current!==null||(Ws=!0),(gl&134217727)===0&&(cs&134217727)===0||Ut===null||yl(Ut,St,Gi,!1)}function Rm(t,i,s){var u=Rt;Rt|=2;var m=py(),x=gy();(Ut!==t||St!==i)&&(sd=null,ro(t,i)),i=!1;var A=gn;e:do try{if(Dt!==0&&bt!==null){var L=bt,G=Vi;switch(Dt){case 8:_m(),A=6;break e;case 3:case 2:case 9:case 6:Kn.current===null&&(i=!0);var ae=Dt;if(Dt=0,Vi=null,lo(t,L,G,ae),s&&Ws){A=0;break e}break;default:ae=Dt,Dt=0,Vi=null,lo(t,L,G,ae)}}J8(),A=gn;break}catch(fe){hy(t,fe)}while(!0);return i&&t.shellSuspendCounter++,jr=Zl=null,Rt=u,ve.H=m,ve.A=x,bt===null&&(Ut=null,St=0,vu()),A}function J8(){for(;bt!==null;)vy(bt)}function W8(t,i){var s=Rt;Rt|=2;var u=py(),m=gy();Ut!==t||St!==i?(sd=null,ld=Oe()+500,ro(t,i)):Ws=ni(t,i);e:do try{if(Dt!==0&&bt!==null){i=bt;var x=Vi;t:switch(Dt){case 1:Dt=0,Vi=null,lo(t,i,x,1);break;case 2:case 9:if(yv(x)){Dt=0,Vi=null,yy(i);break}i=function(){Dt!==2&&Dt!==9||Ut!==t||(Dt=7),$a(t)},x.then(i,i);break e;case 3:Dt=7;break e;case 4:Dt=5;break e;case 7:yv(x)?(Dt=0,Vi=null,yy(i)):(Dt=0,Vi=null,lo(t,i,x,7));break;case 5:var A=null;switch(bt.tag){case 26:A=bt.memoizedState;case 5:case 27:var L=bt;if(A?cx(A):L.stateNode.complete){Dt=0,Vi=null;var G=L.sibling;if(G!==null)bt=G;else{var ae=L.return;ae!==null?(bt=ae,dd(ae)):bt=null}break t}}Dt=0,Vi=null,lo(t,i,x,5);break;case 6:Dt=0,Vi=null,lo(t,i,x,6);break;case 8:_m(),gn=6;break e;default:throw Error(r(462))}}eC();break}catch(fe){hy(t,fe)}while(!0);return jr=Zl=null,ve.H=u,ve.A=m,Rt=s,bt!==null?0:(Ut=null,St=0,vu(),gn)}function eC(){for(;bt!==null&&!_e();)vy(bt)}function vy(t){var i=z2(t.alternate,t,Er);t.memoizedProps=t.pendingProps,i===null?dd(t):bt=i}function yy(t){var i=t,s=i.alternate;switch(i.tag){case 15:case 0:i=N2(s,i,i.pendingProps,i.type,void 0,St);break;case 11:i=N2(s,i,i.pendingProps,i.type.render,i.ref,St);break;case 5:Ph(i);var u=i;u===Pn&&(pt?(ku(u),u.tag===5&&u.stateNode!=null&&(Xt=u.stateNode)):(ku(u),pt=!0));default:D2(s,i),i=bt=sv(i,Er),i=z2(s,i,Er)}t.memoizedProps=t.pendingProps,i===null?dd(t):bt=i}function lo(t,i,s,u){jr=Zl=null,Ph(i),Vs=null,nc=0;var m=i.return;try{if(q8(t,m,i,s,St)){gn=1,Uu(t,ia(s,t.current)),bt=null;return}}catch(x){if(m!==null)throw bt=m,x;gn=1,Uu(t,ia(s,t.current)),bt=null;return}i.flags&32768?(pt||u===1?t=!0:Ws||(St&536870912)!==0?t=!1:(pl=t=!0,(u===2||u===9||u===3||u===6)&&(u=Kn.current,u!==null&&u.tag===13&&(u.flags|=16384))),xy(i,t)):dd(i)}function dd(t){var i=t;do{if((i.flags&32768)!==0){xy(i,pl);return}t=i.return;var s=V8(i.alternate,i,Er);if(s!==null){bt=s;return}if(i=i.sibling,i!==null){bt=i;return}bt=i=t}while(i!==null);gn===0&&(gn=5)}function xy(t,i){do{var s=G8(t.alternate,t);if(s!==null){s.flags&=32767,bt=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(t=t.sibling,t!==null)){bt=t;return}bt=t=s}while(t!==null);gn=6,bt=null}function by(t,i,s,u,m,x,A,L,G,ae,fe,xe){t.cancelPendingCommit=null;do fd();while(on!==0);if((Rt&6)!==0)throw Error(r(327));if(i!==null){if(i===t.current)throw Error(r(177));t===Ut&&(bt=Ut=null,St=0),us=i,ba=t,Ua=s,Am=m,cy=u,tC(t,i,s,A,L,G,xe)}}function tC(t,i,s,u,m,x,A){var L=i.lanes|i.childLanes;if(Mm=L,L|=hh,$n(t,s,L,u,m,x),no=null,(s&335544064)===s?(io=M8(t),u=10262):(io=null,u=10256),(i.subtreeFlags&u)!==0||(i.flags&u)!==0?(t.callbackNode=null,t.callbackPriority=0,sC(yn,function(){return Lm(),null})):(t.callbackNode=null,t.callbackPriority=0),Zu=!1,u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=ve.T,ve.T=null,m=re.p,re.p=2,x=Rt,Rt|=4;try{Y8(t,i,s)}finally{Rt=x,re.p=m,ve.T=u}}on=1,Zu?to=EC(A,t.containerInfo,io,zm,Om,iC,Dm,Lm,nC):(zm(),Om(),Dm())}function nC(t){if(on!==0){var i=ba.onRecoverableError;i(t,{componentStack:null})}}function iC(){on===3&&(on=0,ny(us,ba),on=4)}function zm(){if(on===1){on=0;var t=ba,i=us,s=Ua,u=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||u){u=ve.T,ve.T=null;var m=re.p;re.p=2;var x=Rt;Rt|=4;try{mc=ed=!1,ey(i,t,s),s=Km;var A=Zg(t.containerInfo),L=s.focusedElem,G=s.selectionRange;if(A!==L&&L&&L.ownerDocument&&Qg(L.ownerDocument.documentElement,L)){if(G!==null&&oh(L)){var ae=G.start,fe=G.end;if(fe===void 0&&(fe=ae),"selectionStart"in L)L.selectionStart=ae,L.selectionEnd=Math.min(fe,L.value.length);else{var xe=L.ownerDocument||document,te=xe&&xe.defaultView||window;if(te.getSelection){var ce=te.getSelection(),ze=L.textContent.length,Ie=Math.min(G.start,ze),ut=G.end===void 0?Ie:Math.min(G.end,ze);!ce.extend&&Ie>ut&&(A=ut,ut=Ie,Ie=A);var ie=Xg(L,Ie),J=Xg(L,ut);if(ie&&J&&(ce.rangeCount!==1||ce.anchorNode!==ie.node||ce.anchorOffset!==ie.offset||ce.focusNode!==J.node||ce.focusOffset!==J.offset)){var le=xe.createRange();le.setStart(ie.node,ie.offset),ce.removeAllRanges(),Ie>ut?(ce.addRange(le),ce.extend(J.node,J.offset)):(le.setEnd(J.node,J.offset),ce.addRange(le))}}}}for(xe=[],ce=L;ce=ce.parentNode;)ce.nodeType===1&&xe.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<xe.length;L++){var ye=xe[L];ye.element.scrollLeft=ye.left,ye.element.scrollTop=ye.top}}po=!!Ym,Km=Ym=null}finally{Rt=x,re.p=m,ve.T=u}}t.current=i,on=2}}function Om(){if(on===2){on=0;var t=ba,i=us,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=ve.T,ve.T=null;var u=re.p;re.p=2;var m=Rt;Rt|=4;try{K2(t,i.alternate,i)}finally{Rt=m,re.p=u,ve.T=s}}on=3}}function Dm(){if(on===4||on===3){on=0;var t=to;to=null,Be();var i=ba,s=us,u=Ua,m=cy,x=(u&335544064)===u?10262:10256;if((s.subtreeFlags&x)!==0||(s.flags&x)!==0?on=5:(on=0,us=ba=null,jy(i,i.pendingLanes)),x=i.pendingLanes,x===0&&(vl=null),mi(u),s=s.stateNode,xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(Gt,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=ve.T,x=re.p,re.p=2,ve.T=null;try{for(var A=i.onRecoverableError,L=0;L<m.length;L++){var G=m[L];A(G.value,{componentStack:G.stack})}}finally{ve.T=s,re.p=x}}if(m=no,A=io,io=null,m!==null&&(no=null,A===null&&(A=[]),t!==null))for(G=0;G<m.length;G++)s=(0,m[G])(A),s!==void 0&&t.finished.finally(s);(Ua&3)!==0&&fd(),$a(i),x=i.pendingLanes,(u&261930)!==0&&(x&42)!==0?i===od?yc++:(yc=0,od=i):(yc=0,od=null),xc(0)}}function jy(t,i){(t.pooledCacheLanes&=i)===0&&(i=t.pooledCache,i!=null&&(t.pooledCache=null,Wo(i)))}function fd(){return to!==null&&(to.skipTransition(),to=null),zm(),Om(),Dm(),Lm()}function Lm(){if(on!==5)return!1;var t=ba,i=Mm;Mm=0;var s=mi(Ua),u=ve.T,m=re.p;try{re.p=32>s?32:s,ve.T=null,s=Am,Am=null;var x=ba,A=Ua;if(on=0,us=ba=null,Ua=0,(Rt&6)!==0)throw Error(r(331));var L=Rt;if(Rt|=4,ly(x.current),iy(x,x.current,A,s),Rt=L,xc(0,!1),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(Gt,x)}catch{}return!0}finally{re.p=m,ve.T=u,jy(t,i)}}function wy(t,i,s){i=ia(s,i),i=Wh(t.stateNode,i,2),t=cl(t,i,2),t!==null&&(ma(t,2),$a(t))}function Lt(t,i,s){if(t.tag===3)wy(t,t,s);else for(;i!==null;){if(i.tag===3){wy(i,t,s);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(vl===null||!vl.has(u))){t=ia(s,t),s=y2(2),u=cl(i,s,2),u!==null&&(x2(s,u,i,t),ma(u,2),$a(u));break}}i=i.return}}function Bm(t,i,s){var u=t.pingCache;if(u===null){u=t.pingCache=new Q8;var m=new Set;u.set(i,m)}else m=u.get(i),m===void 0&&(m=new Set,u.set(i,m));m.has(s)||(Em=!0,m.add(s),t=aC.bind(null,t,i,s),i.then(t,t))}function aC(t,i,s){var u=t.pingCache;u!==null&&u.delete(i),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,Ut===t&&(St&s)===s&&((gn===4||gn===3&&(St&62914560)===St&&300>Oe()-rd)&&(Rt&2)===0?ro(t,0):ad|=s,eo===St&&(eo=0)),$a(t)}function ky(t,i){i===0&&(i=di()),t=Kl(t,i),t!==null&&(ma(t,i),$a(t))}function rC(t){var i=t.memoizedState,s=0;i!==null&&(s=i.retryLane),ky(t,s)}function lC(t,i){var s=0;switch(t.tag){case 31:case 13:var u=t.stateNode,m=t.memoizedState;m!==null&&(s=m.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(i),ky(t,s)}function sC(t,i){return me(t,i)}var so=null,oo=null,Im=!1,hd=!1,Pm=!1,xl=0;function $a(t){t!==oo&&t.next===null&&(oo===null?so=oo=t:oo=oo.next=t),hd=!0,Im||(Im=!0,cC())}function xc(t,i){if(!Pm&&hd){Pm=!0;do for(var s=!1,u=so;u!==null;){if(t!==0){var m=u.pendingLanes;if(m===0)var x=0;else{var A=u.suspendedLanes,L=u.pingedLanes;x=(1<<31-ln(42|t)+1)-1,x&=m&~(A&~L),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(s=!0,Ey(u,x))}else x=St,x=ft(u,u===Ut?x:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(x&3)===0||ni(u,x)||(s=!0,Ey(u,x));u=u.next}while(s);Pm=!1}}function oC(){Sy()}function Sy(){hd=Im=!1;var t=0;xl!==0&&bC()&&(t=xl);for(var i=Oe(),s=null,u=so;u!==null;){var m=u.next,x=Cy(u,i);x===0?(u.next=null,s===null?so=m:s.next=m,m===null&&(oo=s)):(s=u,(t!==0||(x&3)!==0)&&(hd=!0)),u=m}on!==0&&on!==5||xc(t),xl!==0&&(xl=0)}function Cy(t,i){for(var s=t.suspendedLanes,u=t.pingedLanes,m=t.expirationTimes,x=t.pendingLanes&-62914561;0<x;){var A=31-ln(x),L=1<<A,G=m[A];G===-1?((L&s)===0||(L&u)!==0)&&(m[A]=cr(L,i)):G<=i&&(t.expiredLanes|=L),x&=~L}if(i=Ut,s=St,s=ft(t,t===i?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,s===0||t===i&&(Dt===2||Dt===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&Ne(u),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||ni(t,s)){if(i=s&-s,i===t.callbackPriority)return i;switch(u!==null&&Ne(u),mi(s)){case 2:case 8:s=_n;break;case 32:s=yn;break;case 268435456:s=Ra;break;default:s=yn}return u=Ny.bind(null,t),s=me(s,u),t.callbackPriority=i,t.callbackNode=s,i}return u!==null&&u!==null&&Ne(u),t.callbackPriority=2,t.callbackNode=null,2}function Ny(t,i){if(on!==0&&on!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(fd()&&t.callbackNode!==s)return null;var u=St;return u=ft(t,t===Ut?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(dy(t,u,i),Cy(t,Oe()),t.callbackNode!=null&&t.callbackNode===s?Ny.bind(null,t):null)}function Ey(t,i){if(fd())return null;dy(t,i,!0)}function cC(){wC(function(){(Rt&6)!==0?me(ti,oC):Sy()})}function Hm(){if(xl===0){var t=es;t===0&&(t=Ni,Ni<<=1,(Ni&261888)===0&&(Ni=256)),xl=t}return xl}function Ty(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Vn(t)}function uC(t,i,s,u,m){if(i==="submit"&&s&&s.stateNode===m){var x=Ty((m[Rn]||null).action),A=u.submitter;A&&(i=(i=A[Rn]||null)?Ty(i.formAction):A.getAttribute("formAction"),i!==null&&(x=i,A=null));var L=new hu("action","action",null,u,m);t.push({event:L,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(xl!==0){var G=new FormData(m,A);Kh(s,{pending:!0,data:G,method:m.method,action:x},null,G)}}else typeof x=="function"&&(L.preventDefault(),G=new FormData(m,A),Kh(s,{pending:!0,data:G,method:m.method,action:x},x,G))},currentTarget:m}]})}}for(var qm=0;qm<fh.length;qm++){var Fm=fh[qm],dC=Fm.toLowerCase(),fC=Fm[0].toUpperCase()+Fm.slice(1);ga(dC,"on"+fC)}ga(ev,"onAnimationEnd"),ga(tv,"onAnimationIteration"),ga(nv,"onAnimationStart"),ga("dblclick","onDoubleClick"),ga("focusin","onFocus"),ga("focusout","onBlur"),ga(j8,"onTransitionRun"),ga(w8,"onTransitionStart"),ga(k8,"onTransitionCancel"),ga(iv,"onTransitionEnd"),yt("onMouseEnter",["mouseout","mouseover"]),yt("onMouseLeave",["mouseout","mouseover"]),yt("onPointerEnter",["pointerout","pointerover"]),yt("onPointerLeave",["pointerout","pointerover"]),st("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),st("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),st("onBeforeInput",["compositionend","keypress","textInput","paste"]),st("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),st("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),st("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bc="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(" "),hC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bc));function My(t,i){i=(i&4)!==0;for(var s=0;s<t.length;s++){var u=t[s],m=u.event;u=u.listeners;e:{var x=void 0;if(i)for(var A=u.length-1;0<=A;A--){var L=u[A],G=L.instance,ae=L.currentTarget;if(L=L.listener,G!==x&&m.isPropagationStopped())break e;x=L,m.currentTarget=ae;try{x(m)}catch(fe){gu(fe)}m.currentTarget=null,x=G}else for(A=0;A<u.length;A++){if(L=u[A],G=L.instance,ae=L.currentTarget,L=L.listener,G!==x&&m.isPropagationStopped())break e;x=L,m.currentTarget=ae;try{x(m)}catch(fe){gu(fe)}m.currentTarget=null,x=G}}}}function jt(t,i){var s=i[Hl];s===void 0&&(s=i[Hl]=new Set);var u=t+"__bubble";s.has(u)||(Ay(i,t,2,!1),s.add(u))}function Um(t,i,s){var u=0;i&&(u|=4),Ay(s,t,u,i)}var md="_reactListening"+Math.random().toString(36).slice(2);function $m(t){if(!t[md]){t[md]=!0,it.forEach(function(s){s!=="selectionchange"&&(hC.has(s)||Um(s,!1,t),Um(s,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[md]||(i[md]=!0,Um("selectionchange",!1,i))}}function Ay(t,i,s,u){switch(xx(i)){case 2:var m=r7;break;case 8:m=l7;break;default:m=up}s=m.bind(null,i,s,t),m=void 0,!Vl||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),u?m!==void 0?t.addEventListener(i,s,{capture:!0,passive:m}):t.addEventListener(i,s,!0):m!==void 0?t.addEventListener(i,s,{passive:m}):t.addEventListener(i,s,!1)}function Vm(t,i,s,u,m){var x=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var A=u.tag;if(A===3||A===4){var L=u.stateNode.containerInfo;if(L===m)break;if(A===4)for(A=u.return;A!==null;){var G=A.tag;if((G===3||G===4)&&A.stateNode.containerInfo===m)return;A=A.return}for(;L!==null;){if(A=Hi(L),A===null)return;if(G=A.tag,G===5||G===6||G===26||G===27){u=x=A;continue e}L=L.parentNode}}u=u.return}$l(function(){var ae=x,fe=Ul(s),xe=[];e:{var te=av.get(t);if(te!==void 0){var ce=hu,ze=t;switch(t){case"keypress":if(du(s)===0)break e;case"keydown":case"keyup":ce=Z6;break;case"focusin":ze="focus",ce=nh;break;case"focusout":ze="blur",ce=nh;break;case"beforeblur":case"afterblur":ce=nh;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=zg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=P6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=n8;break;case ev:case tv:case nv:ce=F6;break;case iv:ce=a8;break;case"scroll":case"scrollend":ce=B6;break;case"wheel":ce=l8;break;case"copy":case"cut":case"paste":ce=$6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Dg;break;case"submit":ce=e8;break;case"toggle":case"beforetoggle":ce=o8}var Ie=(i&4)!==0,ut=!Ie&&(t==="scroll"||t==="scrollend"),ie=Ie?te!==null?te+"Capture":null:te;Ie=[];for(var J=ae,le;J!==null;){var ye=J;if(le=ye.stateNode,ye=ye.tag,ye!==5&&ye!==26&&ye!==27||le===null||ie===null||(ye=gr(J,ie),ye!=null&&Ie.push(jc(J,ye,le))),ut)break;J=J.return}0<Ie.length&&(te=new ce(te,ze,null,s,fe),xe.push({event:te,listeners:Ie}))}}if((i&7)===0){e:{if(ce=t==="mouseover"||t==="pointerover",te=t==="mouseout"||t==="pointerout",ce&&s!==Fl&&(ze=s.relatedTarget||s.fromElement)&&(Hi(ze)||ze[ii]))break e;(te||ce)&&(ze=fe.window===fe?fe:(ce=fe.ownerDocument)?ce.defaultView||ce.parentWindow:window,te?(ce=s.relatedTarget||s.toElement,te=ae,ce=ce?Hi(ce):null,ce!==null&&(ut=c(ce),Ie=ce.tag,ce!==ut||Ie!==5&&Ie!==27&&Ie!==6)&&(ce=null)):(te=null,ce=ae),te!==ce&&(Ie=zg,ye="onMouseLeave",ie="onMouseEnter",J="mouse",(t==="pointerout"||t==="pointerover")&&(Ie=Dg,ye="onPointerLeave",ie="onPointerEnter",J="pointer"),ut=te==null?ze:ue(te),le=ce==null?ze:ue(ce),ze=new Ie(ye,J+"leave",te,s,fe),ze.target=ut,ze.relatedTarget=le,ye=null,Hi(fe)===ae&&(Ie=new Ie(ie,J+"enter",ce,s,fe),Ie.target=le,Ie.relatedTarget=ut,ye=Ie),ut=ye,Ie=te&&ce?_(te,ce,mC):null,te!==null&&_y(xe,ze,te,Ie,!1),ce!==null&&ut!==null&&_y(xe,ut,ce,Ie,!0)))}e:{if(te=ae?ue(ae):window,ce=te.nodeName&&te.nodeName.toLowerCase(),ce==="select"||ce==="input"&&te.type==="file")var Le=Ug;else if(qg(te))if($g)Le=y8;else{Le=g8;var Ct=p8}else ce=te.nodeName,!ce||ce.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ae&&Bn(ae.elementType)&&(Le=Ug):Le=v8;if(Le&&(Le=Le(t,ae))){Fg(xe,Le,s,fe);break e}Ct&&Ct(t,te,ae)}switch(Ct=ae?ue(ae):window,t){case"focusin":(qg(Ct)||Ct.contentEditable==="true")&&(Ls=Ct,ch=ae,Qo=null);break;case"focusout":Qo=ch=Ls=null;break;case"mousedown":uh=!0;break;case"contextmenu":case"mouseup":case"dragend":uh=!1,Jg(xe,s,fe);break;case"selectionchange":if(b8)break;case"keydown":case"keyup":Jg(xe,s,fe)}var $e;if(ah)e:{switch(t){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Ds?Pg(t,s)&&(We="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(We="onCompositionStart");We&&(Lg&&s.locale!=="ko"&&(Ds||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ds&&($e=_g()):(el=fe,Wf="value"in el?el.value:el.textContent,Ds=!0)),Ct=pd(ae,We),0<Ct.length&&(We=new Og(We,t,null,s,fe),xe.push({event:We,listeners:Ct}),$e?We.data=$e:($e=Hg(s),$e!==null&&(We.data=$e)))),($e=u8?d8(t,s):f8(t,s))&&(We=pd(ae,"onBeforeInput"),0<We.length&&(Ct=new Og("onBeforeInput","beforeinput",null,s,fe),xe.push({event:Ct,listeners:We}),Ct.data=$e)),uC(xe,t,ae,s,fe)}My(xe,i)})}function jc(t,i,s){return{instance:t,listener:i,currentTarget:s}}function pd(t,i){for(var s=i+"Capture",u=[];t!==null;){var m=t,x=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||x===null||(m=gr(t,s),m!=null&&u.unshift(jc(t,m,x)),m=gr(t,i),m!=null&&u.push(jc(t,m,x))),t.tag===3)return u;t=t.return}return[]}function mC(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function _y(t,i,s,u,m){for(var x=i._reactName,A=[];s!==null&&s!==u;){var L=s,G=L.alternate,ae=L.stateNode;if(L=L.tag,G!==null&&G===u)break;L!==5&&L!==26&&L!==27||ae===null||(G=ae,m?(ae=gr(s,x),ae!=null&&A.unshift(jc(s,ae,G))):m||(ae=gr(s,x),ae!=null&&A.push(jc(s,ae,G)))),s=s.return}A.length!==0&&t.push({event:i,listeners:A})}var pC=/\r\n?/g,gC=/\u0000|\uFFFD/g;function Ry(t){return(typeof t=="string"?t:""+t).replace(pC,`
|
|
49
|
+
`).replace(gC,"")}function zy(t,i){return i=Ry(i),Ry(t)===i}function Bt(t,i,s,u,m,x){switch(s){case"children":if(typeof u=="string")i==="body"||i==="textarea"&&u===""||mt(t,u);else if(typeof u=="number"||typeof u=="bigint")i!=="body"&&mt(t,""+u);else return;break;case"className":pi(t,"class",u);break;case"tabIndex":pi(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":pi(t,s,u);break;case"style":mn(t,u,x);return;case"data":if(i!=="object"){pi(t,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||s!=="href")){t.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(s);break}u=Vn(u),t.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(s,"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 x=="function"&&(s==="formAction"?(i!=="input"&&Bt(t,i,"name",m.name,m,null),Bt(t,i,"formEncType",m.formEncType,m,null),Bt(t,i,"formMethod",m.formMethod,m,null),Bt(t,i,"formTarget",m.formTarget,m,null)):(Bt(t,i,"encType",m.encType,m,null),Bt(t,i,"method",m.method,m,null),Bt(t,i,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(s);break}u=Vn(u),t.setAttribute(s,u);break;case"onClick":u!=null&&(t.onclick=gi);return;case"onScroll":u!=null&&jt("scroll",t);return;case"onScrollEnd":u!=null&&jt("scrollend",t);return;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(r(60));(x!=null?x.__html:void 0)!==s&&(t.innerHTML=s)}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}s=Vn(u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,u):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":u===!0?t.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,u):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(s,u):t.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(s):t.setAttribute(s,u);break;case"popover":jt("beforetoggle",t),jt("toggle",t),Ot(t,"popover",u);break;case"xlinkActuate":fn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":fn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":fn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":fn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":fn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":fn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":fn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":fn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":fn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Ot(t,"is",u);break;case"innerText":case"textContent":return;default:if(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")s=ai.get(s)||s,Ot(t,s,u);else return}Ge=!0}function Gm(t,i,s,u,m,x){switch(s){case"style":mn(t,u,x);return;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(r(60));(x!=null?x.__html:void 0)!==s&&(t.innerHTML=s)}}break;case"children":if(typeof u=="string")mt(t,u);else if(typeof u=="number"||typeof u=="bigint")mt(t,""+u);else return;break;case"onScroll":u!=null&&jt("scroll",t);return;case"onScrollEnd":u!=null&&jt("scrollend",t);return;case"onClick":u!=null&&(t.onclick=gi);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!et.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),x=s.slice(2,m?s.length-7:void 0),i=t[Rn]||null,i=i!=null?i[s]:null,typeof i=="function"&&t.removeEventListener(x,i,m),typeof u=="function")){typeof i!="function"&&i!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(x,u,m);break e}Ge=!0,s in t?t[s]=u:u===!0?t.setAttribute(s,""):Ot(t,s,u)}return}Ge=!0}function Zn(t,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":jt("error",t),jt("load",t);var u=!1,m=!1,x;for(x in s)if(s.hasOwnProperty(x)){var A=s[x];if(A!=null)switch(x){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Bt(t,i,x,A,s,null)}}m&&Bt(t,i,"srcSet",s.srcSet,s,null),u&&Bt(t,i,"src",s.src,s,null);return;case"input":jt("invalid",t);var L=x=A=m=null,G=null,ae=null;for(u in s)if(s.hasOwnProperty(u)){var fe=s[u];if(fe!=null)switch(u){case"name":m=fe;break;case"type":A=fe;break;case"checked":G=fe;break;case"defaultChecked":ae=fe;break;case"value":x=fe;break;case"defaultValue":L=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,i));break;default:Bt(t,i,u,fe,s,null)}}Ae(t,x,L,G,ae,A,m,!1);return;case"select":jt("invalid",t),u=A=x=null;for(m in s)if(s.hasOwnProperty(m)&&(L=s[m],L!=null))switch(m){case"value":x=L;break;case"defaultValue":A=L;break;case"multiple":u=L;default:Bt(t,i,m,L,s,null)}i=x,s=A,t.multiple=!!u,i!=null?ht(t,!!u,i,!1):s!=null&&ht(t,!!u,s,!0);return;case"textarea":jt("invalid",t),x=m=u=null;for(A in s)if(s.hasOwnProperty(A)&&(L=s[A],L!=null))switch(A){case"value":u=L;break;case"defaultValue":m=L;break;case"children":x=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(91));break;default:Bt(t,i,A,L,s,null)}Ue(t,u,m,x);return;case"option":for(G in s)if(s.hasOwnProperty(G)&&(u=s[G],u!=null))switch(G){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Bt(t,i,G,u,s,null)}return;case"dialog":jt("beforetoggle",t),jt("toggle",t),jt("cancel",t),jt("close",t);break;case"iframe":case"object":jt("load",t);break;case"video":case"audio":for(u=0;u<bc.length;u++)jt(bc[u],t);break;case"image":jt("error",t),jt("load",t);break;case"details":jt("toggle",t);break;case"embed":case"source":case"link":jt("error",t),jt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in s)if(s.hasOwnProperty(ae)&&(u=s[ae],u!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Bt(t,i,ae,u,s,null)}return;default:if(Bn(i)){for(fe in s)s.hasOwnProperty(fe)&&(u=s[fe],u!==void 0&&Gm(t,i,fe,u,s,void 0));return}}for(L in s)s.hasOwnProperty(L)&&(u=s[L],u!=null&&Bt(t,i,L,u,s,null))}var vC={};function yC(t,i,s,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,x=null,A=null,L=null,G=null,ae=null,fe=null;for(ce in s){var xe=s[ce];if(s.hasOwnProperty(ce)&&xe!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":G=xe;default:u.hasOwnProperty(ce)||Bt(t,i,ce,null,u,xe)}}for(var te in u){var ce=u[te];if(xe=s[te],u.hasOwnProperty(te)&&(ce!=null||xe!=null))switch(te){case"type":ce!==xe&&(Ge=!0),x=ce;break;case"name":ce!==xe&&(Ge=!0),m=ce;break;case"checked":ce!==xe&&(Ge=!0),ae=ce;break;case"defaultChecked":ce!==xe&&(Ge=!0),fe=ce;break;case"value":ce!==xe&&(Ge=!0),A=ce;break;case"defaultValue":ce!==xe&&(Ge=!0),L=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,i));break;default:ce!==xe&&Bt(t,i,te,ce,u,xe)}}pe(t,A,L,G,ae,fe,x,m);return;case"select":ce=A=L=te=null;for(x in s)if(G=s[x],s.hasOwnProperty(x)&&G!=null)switch(x){case"value":break;case"multiple":ce=G;default:u.hasOwnProperty(x)||Bt(t,i,x,null,u,G)}for(m in u)if(x=u[m],G=s[m],u.hasOwnProperty(m)&&(x!=null||G!=null))switch(m){case"value":x!==G&&(Ge=!0),te=x;break;case"defaultValue":x!==G&&(Ge=!0),L=x;break;case"multiple":x!==G&&(Ge=!0),A=x;default:x!==G&&Bt(t,i,m,x,u,G)}i=L,s=A,u=ce,te!=null?ht(t,!!s,te,!1):!!u!=!!s&&(i!=null?ht(t,!!s,i,!0):ht(t,!!s,s?[]:"",!1));return;case"textarea":ce=te=null;for(L in s)if(m=s[L],s.hasOwnProperty(L)&&m!=null&&!u.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:Bt(t,i,L,null,u,m)}for(A in u)if(m=u[A],x=s[A],u.hasOwnProperty(A)&&(m!=null||x!=null))switch(A){case"value":m!==x&&(Ge=!0),te=m;break;case"defaultValue":m!==x&&(Ge=!0),ce=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:m!==x&&Bt(t,i,A,m,u,x)}hn(t,te,ce);return;case"option":for(var ze in s)if(te=s[ze],s.hasOwnProperty(ze)&&te!=null&&!u.hasOwnProperty(ze))switch(ze){case"selected":t.selected=!1;break;default:Bt(t,i,ze,null,u,te)}for(G in u)if(te=u[G],ce=s[G],u.hasOwnProperty(G)&&te!==ce&&(te!=null||ce!=null))switch(G){case"selected":te!==ce&&(Ge=!0),t.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:Bt(t,i,G,te,u,ce)}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 Ie in s)te=s[Ie],s.hasOwnProperty(Ie)&&te!=null&&!u.hasOwnProperty(Ie)&&Bt(t,i,Ie,null,u,te);for(ae in u)if(te=u[ae],ce=s[ae],u.hasOwnProperty(ae)&&te!==ce&&(te!=null||ce!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,i));break;default:Bt(t,i,ae,te,u,ce)}return;default:if(Bn(i)){for(var ut in s)te=s[ut],s.hasOwnProperty(ut)&&te!==void 0&&!u.hasOwnProperty(ut)&&Gm(t,i,ut,void 0,u,te);for(fe in u)te=u[fe],ce=s[fe],!u.hasOwnProperty(fe)||te===ce||te===void 0&&ce===void 0||Gm(t,i,fe,te,u,ce);return}}for(var ie in s)te=s[ie],s.hasOwnProperty(ie)&&te!=null&&!u.hasOwnProperty(ie)&&Bt(t,i,ie,null,u,te);for(xe in u)te=u[xe],ce=s[xe],!u.hasOwnProperty(xe)||te===ce||te==null&&ce==null||Bt(t,i,xe,te,u,ce)}function Oy(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xC(){if(typeof performance.getEntriesByType=="function"){for(var t=0,i=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var m=s[u],x=m.transferSize,A=m.initiatorType,L=m.duration;if(x&&L&&Oy(A)){for(A=0,L=m.responseEnd,u+=1;u<s.length;u++){var G=s[u],ae=G.startTime;if(ae>L)break;var fe=G.transferSize,xe=G.initiatorType;fe&&Oy(xe)&&(G=G.responseEnd,A+=fe*(G<L?1:(L-ae)/(G-ae)))}if(--u,i+=8*(x+A)/(m.duration/1e3),t++,10<t)break}}if(0<t)return i/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Ym=null,Km=null;function wc(t){return t.nodeType===9?t:t.ownerDocument}function Dy(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ly(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function By(t,i,s,u){return s=wc(s).createElement(t),s[Wt]=u,s[Rn]=i,Zn(s,t,i),je(s),s}function Xm(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Qm=null;function bC(){var t=window.event;return t&&t.type==="popstate"?t===Qm?!1:(Qm=t,!0):(Qm=null,!1)}var Zm=typeof setTimeout=="function"?setTimeout:void 0,jC=typeof clearTimeout=="function"?clearTimeout:void 0,Iy=typeof Promise=="function"?Promise:void 0,Py=typeof requestAnimationFrame=="function"?requestAnimationFrame:Zm,wC=typeof queueMicrotask=="function"?queueMicrotask:typeof Iy<"u"?function(t){return Iy.resolve(null).then(t).catch(kC)}:Zm;function kC(t){setTimeout(function(){throw t})}function bl(t){return t==="head"}function Hy(t,i){var s=i,u=0;do{var m=s.nextSibling;if(t.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(u===0){t.removeChild(m),go(i);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")rp(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,rp(s);for(var x=s.firstChild;x;){var A=x.nextSibling,L=x.nodeName;x[hr]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&x.rel.toLowerCase()==="stylesheet"||s.removeChild(x),x=A}}else s==="body"&&rp(t.ownerDocument.body);s=m}while(s);go(i)}function qy(t,i){var s=t;t=0;do{var u=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=u}while(s)}function Fy(t,i,s){if(i=CSS.escape(i)!==i?"r-"+btoa(i).replace(/=/g,""):i,t.style.viewTransitionName=i,s!=null&&(t.style.viewTransitionClass=s),s=getComputedStyle(t),s.display==="inline"){if(i=t.getClientRects(),i.length===1)var u=1;else for(var m=u=0;m<i.length;m++){var x=i[m];0<x.width&&0<x.height&&u++}u===1&&(t=t.style,t.display=i.length===1?"inline-block":"block",t.marginTop="-"+s.paddingTop,t.marginBottom="-"+s.paddingBottom)}}function Uy(t,i){t=t.style,i=i.style;var s=i!=null?i.hasOwnProperty("viewTransitionName")?i.viewTransitionName:i.hasOwnProperty("view-transition-name")?i["view-transition-name"]:null:null;t.viewTransitionName=s==null||typeof s=="boolean"?"":(""+s).trim(),s=i!=null?i.hasOwnProperty("viewTransitionClass")?i.viewTransitionClass:i.hasOwnProperty("view-transition-class")?i["view-transition-class"]:null:null,t.viewTransitionClass=s==null||typeof s=="boolean"?"":(""+s).trim(),t.display==="inline-block"&&(i==null?t.display=t.margin="":(s=i.display,t.display=s==null||typeof s=="boolean"?"":s,s=i.margin,s!=null?t.margin=s:(s=i.hasOwnProperty("marginTop")?i.marginTop:i["margin-top"],t.marginTop=s==null||typeof s=="boolean"?"":s,i=i.hasOwnProperty("marginBottom")?i.marginBottom:i["margin-bottom"],t.marginBottom=i==null||typeof i=="boolean"?"":i)))}function SC(t,i,s){return s=s.ownerDocument.defaultView,{rect:t,abs:i.position==="absolute"||i.position==="fixed",clip:i.clipPath!=="none"||i.overflow!=="visible"||i.filter!=="none"||i.mask!=="none"||i.mask!=="none"||i.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=s.innerHeight&&t.left<=s.innerWidth}}function Jm(t){var i=t.getBoundingClientRect(),s=getComputedStyle(t);return SC(i,s,t)}function CC(t){return t.documentElement.clientHeight}function NC(t){this.addEventListener("load",t),this.addEventListener("error",t)}function EC(t,i,s,u,m,x,A,L,G){var ae=i.nodeType===9?i:i.ownerDocument;try{var fe=ae.startViewTransition({update:function(){var te=ae.defaultView,ce=te.navigation&&te.navigation.transition,ze=ae.fonts.status;u();var Ie=[];if(ze==="loaded"&&(CC(ae),ae.fonts.status==="loading"&&Ie.push(ae.fonts.ready)),ze=Ie.length,t!==null)for(var ut=t.suspenseyImages,ie=0,J=0;J<ut.length;J++){var le=ut[J];if(!le.complete){var ye=le.getBoundingClientRect();if(0<ye.bottom&&0<ye.right&&ye.top<te.innerHeight&&ye.left<te.innerWidth){if(ie+=ux(le),ie>yd){Ie.length=ze;break}le=new Promise(NC.bind(le)),Ie.push(le)}}}if(0<Ie.length)return te=Promise.race([Promise.all(Ie),new Promise(function(Le){return setTimeout(Le,500)})]).then(m,m),(ce?Promise.allSettled([ce.finished,te]):te).then(x,x);if(m(),ce)return ce.finished.then(x,x);x()},types:s});ae.__reactViewTransition=fe;var xe=[];return fe.ready.then(function(){for(var te=ae.documentElement.getAnimations({subtree:!0}),ce=0;ce<te.length;ce++){var ze=te[ce],Ie=ze.effect,ut=Ie.pseudoElement;if(ut!=null&&ut.startsWith("::view-transition")){xe.push(ze),ze=Ie.getKeyframes();for(var ie=ut=void 0,J=!0,le=0;le<ze.length;le++){var ye=ze[le],Le=ye.width;if(ut===void 0)ut=Le;else if(ut!==Le){J=!1;break}if(Le=ye.height,ie===void 0)ie=Le;else if(ie!==Le){J=!1;break}delete ye.width,delete ye.height,ye.transform==="none"&&delete ye.transform}J&&ut!==void 0&&ie!==void 0&&(Ie.setKeyframes(ze),J=getComputedStyle(Ie.target,Ie.pseudoElement),J.width!==ut||J.height!==ie)&&(J=ze[0],J.width=ut,J.height=ie,J=ze[ze.length-1],J.width=ut,J.height=ie,Ie.setKeyframes(ze))}}A()},function(te){ae.__reactViewTransition===fe&&(ae.__reactViewTransition=null);try{if(typeof te=="object"&&te!==null)switch(te.name){case"InvalidStateError":(te.message==="View transition was skipped because document visibility state is hidden."||te.message==="Skipping view transition because document visibility state has become hidden."||te.message==="Skipping view transition because viewport size changed."||te.message==="Transition was aborted because of invalid state")&&(te=null)}te!==null&&G(te)}finally{u(),m(),A()}}),fe.finished.finally(function(){for(var te=0;te<xe.length;te++)xe[te].cancel();ae.__reactViewTransition===fe&&(ae.__reactViewTransition=null),L()}),fe}catch{return u(),m(),A(),null}}function ds(t,i){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+i+")"}ds.prototype.animate=function(t,i){return i=typeof i=="number"?{duration:i}:z({},i),i.pseudoElement=this._selector,this._scope.animate(t,i)},ds.prototype.getAnimations=function(){for(var t=this._scope,i=this._selector,s=t.getAnimations({subtree:!0}),u=[],m=0;m<s.length;m++){var x=s[m].effect;x!==null&&x.target===t&&x.pseudoElement===i&&u.push(s[m])}return u},ds.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function $y(t){return{name:t,group:new ds("group",t),imagePair:new ds("image-pair",t),old:new ds("old",t),new:new ds("new",t)}}function Ki(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ki.prototype.addEventListener=function(t,i,s){var u=null,m=null;if(!(s!=null&&typeof s!="boolean"&&(u=s.signal||null,u!==null&&u.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var x=this._eventListeners;if(Gy(x,t,i,s)===-1){var A=this,L=i;s!=null&&typeof s!="boolean"&&s.once===!0&&(L=function(G){A.removeEventListener(t,i,s),typeof i=="function"?i.call(this,G):i.handleEvent(G)}),u!==null&&(m=A.removeEventListener.bind(A,t,i,s),u.addEventListener("abort",m,{once:!0}),m=u.removeEventListener.bind(u,"abort",m)),u=co(s),x.push({type:t,listener:i,optionsOrUseCapture:s,attachedListener:L,cleanup:m}),p(this._fragmentFiber.child,!1,TC,t,L,u)}this._eventListeners=x}};function TC(t,i,s,u){return N(t).addEventListener(i,s,u),!1}Ki.prototype.removeEventListener=function(t,i,s){var u=this._eventListeners;if(u!==null&&(i=Gy(u,t,i,s),i!==-1)){var m=u[i];s=m.attachedListener;var x=m.cleanup;m=co(m.optionsOrUseCapture),p(this._fragmentFiber.child,!1,MC,t,s,m),u.splice(i,1),x!==null&&x()}};function MC(t,i,s,u){return N(t).removeEventListener(i,s,u),!1}function co(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function Vy(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function Gy(t,i,s,u){if(t.length===0)return-1;u=Vy(u);for(var m=0;m<t.length;m++){var x=t[m];if(x.type===i&&x.listener===s&&Vy(x.optionsOrUseCapture)===u)return m}return-1}Ki.prototype.dispatchEvent=function(t){var i=j(this._fragmentFiber);if(i===null)return!0;i=N(i);var s=this._eventListeners;if(s!==null&&0<s.length||!t.bubbles){var u=i.nodeType===9?i.createComment(""):document.createTextNode("");if(s)for(var m=0;m<s.length;m++){var x=s[m];u.addEventListener(x.type,x.attachedListener,co(x.optionsOrUseCapture))}if(i.appendChild(u),t=u.dispatchEvent(t),s)for(m=0;m<s.length;m++)x=s[m],u.removeEventListener(x.type,x.attachedListener,co(x.optionsOrUseCapture));return i.removeChild(u),t}return i.dispatchEvent(t)},Ki.prototype.focus=function(t){p(this._fragmentFiber.child,!0,Yy,t,void 0,void 0)};function Yy(t,i){return t.tag===6?!1:(t=N(t),qC(t,i))}Ki.prototype.focusLast=function(t){var i=[];p(this._fragmentFiber.child,!0,Wm,i,void 0,void 0);for(var s=i.length-1;0<=s&&!Yy(i[s],t);s--);};function Wm(t,i){return i.push(t),!1}Ki.prototype.blur=function(){var t=j(this._fragmentFiber);t!==null&&(t=N(t),t=wc(t).activeElement,t!==null&&p(this._fragmentFiber.child,!1,AC,t,void 0,void 0))};function AC(t,i){return t.tag===6?!1:(t=N(t),t===i||t.contains(i)?(i.blur(),!0):!1)}Ki.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),p(this._fragmentFiber.child,!1,_C,t,void 0,void 0)};function _C(t,i){return t.tag===6||(t=N(t),i.observe(t)),!1}Ki.prototype.unobserveUsing=function(t){var i=this._observers;if(i!==null&&i.has(t)){i.delete(t),p(this._fragmentFiber.child,!1,RC,t,void 0,void 0);for(var s=i=0;s<ja.length;s++){var u=ja[s];u.fragmentInstance===this&&u.observer===t?t.unobserve(u.instance):ja[i++]=u}ja.length=i}};function RC(t,i){return t.tag===6||(t=N(t),i.unobserve(t)),!1}var ja=[],ep=!1;function zC(t,i,s){ja.push({fragmentInstance:t,observer:i,instance:s}),ep||(ep=!0,FC(function(){ep=!1;var u=ja;ja=[];for(var m=0;m<u.length;m++){var x=u[m];x.observer.unobserve(x.instance)}}))}Ki.prototype.getClientRects=function(){var t=[];return p(this._fragmentFiber.child,!1,OC,t,void 0,void 0),t};function OC(t,i){if(t.tag===6){t=t.stateNode;var s=t.ownerDocument.createRange();s.selectNodeContents(t),i.push.apply(i,s.getClientRects())}else t=N(t),i.push.apply(i,t.getClientRects());return!1}Ki.prototype.getRootNode=function(t){var i=j(this._fragmentFiber);return i===null?this:N(i).getRootNode(t)},Ki.prototype.compareDocumentPosition=function(t){var i=j(this._fragmentFiber);if(i===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var s=[];p(this._fragmentFiber.child,!1,Wm,s,void 0,void 0);var u=N(i);if(s.length===0){if(s=u,b(this._fragmentFiber)){e:{for(i=this._fragmentFiber.return;i!==null;){if(i.tag===4){i=i.stateNode.containerInfo;break e}if(i.tag===3||i.tag===5||i.tag===27)break;i=i.return}i=null}i!=null&&(s=i)}i=this._fragmentFiber;var m=u=s.compareDocumentPosition(t);return s===t?m=Node.DOCUMENT_POSITION_CONTAINS:u&Node.DOCUMENT_POSITION_CONTAINED_BY&&(s=k(i)[1],s===null?m=Node.DOCUMENT_POSITION_PRECEDING:(t=N(s).compareDocumentPosition(t),m=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),m|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}i=N(s[0]),m=N(s[s.length-1]);var x=b(this._fragmentFiber)?i.parentElement:u;if(x==null)return Node.DOCUMENT_POSITION_DISCONNECTED;u=x.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY,x=x.compareDocumentPosition(m)&Node.DOCUMENT_POSITION_CONTAINED_BY;var A=i.compareDocumentPosition(t),L=m.compareDocumentPosition(t),G=A&Node.DOCUMENT_POSITION_CONTAINED_BY||L&Node.DOCUMENT_POSITION_CONTAINED_BY;return L=u&&x&&A&Node.DOCUMENT_POSITION_FOLLOWING&&L&Node.DOCUMENT_POSITION_PRECEDING,i=u&&i===t||x&&m===t||G||L?Node.DOCUMENT_POSITION_CONTAINED_BY:!u&&i===t||!x&&m===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:A,i&Node.DOCUMENT_POSITION_DISCONNECTED||i&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||DC(i,this._fragmentFiber,s[0],s[s.length-1],t)?i:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function DC(t,i,s,u,m){var x=Hi(m);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(s=!!x)e:{for(;x!==null;){if(x.tag===7&&(x===i||x.alternate===i)){s=!0;break e}x=x.return}s=!1}return s}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(x===null)return x=m.ownerDocument,m===x||m===x.documentElement||m===x.body;e:{for(x=i,i=j(i);x!==null;){if(!(x.tag!==5&&x.tag!==3&&x.tag!==27||x!==i&&x.alternate!==i)){x=!0;break e}x=x.return}x=!1}return x}return t&Node.DOCUMENT_POSITION_PRECEDING?((i=!!x)&&!(i=x===s)&&(i=_(s,x,R),i===null?i=!1:(p(i,!0,E,x,s),x=C,C=null,i=x!==null)),i):t&Node.DOCUMENT_POSITION_FOLLOWING?((i=!!x)&&!(i=x===u)&&(i=_(u,x,R),i===null?i=!1:(p(i,!0,T,x,u),x=C,M=C=null,i=x!==null)),i):!1}function Ky(t,i){var s=t.ownerDocument.createRange();s.selectNodeContents(t),t=s.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,i?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Ki.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(r(566));var i=[];p(this._fragmentFiber.child,!1,Wm,i,void 0,void 0);var s=t!==!1;if(i.length===0){var u=k(this._fragmentFiber);if(u=s?u[1]||u[0]||j(this._fragmentFiber):u[0]||u[1],u===null)return;if(u.tag===6){t=N(u),Ky(t,s);return}if(u=N(u),u.nodeType!==9){if(u.nodeType===11){s="host"in u?u.host:null,s!==null&&s.scrollIntoView(t);return}u.scrollIntoView(t)}}for(u=s?i.length-1:0;u!==(s?-1:i.length);){var m=i[u];m.tag===6?(m=N(m),Ky(m,s)):N(m).scrollIntoView(t),u+=s?-1:1}};function LC(t,i){return t=N(t),Xy(t,i),!1}function Xy(t,i){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(i)}function Qy(t,i){var s=i._eventListeners;if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];t.addEventListener(m.type,m.attachedListener,co(m.optionsOrUseCapture))}t.nodeType!==3&&(s=i._observers,s!==null&&s.forEach(function(x){for(var A=0,L=0;L<ja.length;L++){var G=ja[L];(G.fragmentInstance!==i||G.observer!==x||G.instance!==t)&&(ja[A++]=G)}ja.length=A,x.observe(t)}),Xy(t,i))}function BC(t,i){var s=i._eventListeners;if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];t.removeEventListener(m.type,m.attachedListener,co(m.optionsOrUseCapture))}t.nodeType!==3&&(s=i._observers,s!==null&&s.forEach(function(x){typeof x.rootMargin=="string"?zC(i,x,t):x.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(i))}function tp(t){var i=t.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":tp(s),Jr(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function IC(t,i,s,u){for(;t.nodeType===1;){var m=s;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[hr])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(x=t.getAttribute("rel"),x==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(x!==m.rel||t.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||t.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||t.getAttribute("title")!==(m.title==null?null:m.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(x=t.getAttribute("src"),(x!==(m.src==null?null:m.src)||t.getAttribute("type")!==(m.type==null?null:m.type)||t.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&x&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var x=m.name==null?null:""+m.name;if(m.type==="hidden"&&t.getAttribute("name")===x)return t}else return t;if(t=oa(t.nextSibling),t===null)break}return null}function PC(t,i,s){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=oa(t.nextSibling),t===null))return null;return t}function Zy(t,i){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=oa(t.nextSibling),t===null))return null;return t}function np(t){return t.data==="$?"||t.data==="$~"}function ip(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function HC(t,i){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=i;else if(t.data!=="$?"||s.readyState!=="loading")i();else{var u=function(){i(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function oa(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return t}var ap=null;function Jy(t){t=t.nextSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(i===0)return oa(t.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}t=t.nextSibling}return null}function Wy(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return t;i--}else s!=="/$"&&s!=="/&"||i++}t=t.previousSibling}return null}function qC(t,i){function s(){u=!0}if(t.ownerDocument.activeElement===t)return!0;var u=!1;try{t.ownerDocument.addEventListener("focus",s,!0),(t.focus||HTMLElement.prototype.focus).call(t,i)}finally{t.ownerDocument.removeEventListener("focus",s,!0)}return u}function FC(t){Py(function(){Py(function(i){return t(i)})})}function ex(t,i,s){switch(i=wc(s),t){case"html":if(t=i.documentElement,!t)throw Error(r(452));return t;case"head":if(t=i.head,!t)throw Error(r(453));return t;case"body":if(t=i.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function tx(t,i,s){for(var u in s){var m=s[u];s.hasOwnProperty(u)&&m!=null&&Bt(t,i,u,null,vC,m)}s.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===gi&&(t.onclick=null),Jr(t)}function rp(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jr(t)}var ca=new Map,nx=new Set;function kc(t){if(typeof t.getRootNode=="function"){var i=t.getRootNode();if(i.nodeType===9||i.nodeType===11)return i}return t.nodeType===9?t:t.ownerDocument}var Tr=re.d;re.d={f:UC,r:$C,D:VC,C:GC,L:YC,m:KC,X:QC,S:XC,M:ZC};function UC(){var t=Tr.f(),i=cd();return t||i}function $C(t){var i=Wi(t);i!==null&&i.tag===5&&i.type==="form"?a2(i):Tr.r(t)}var uo=typeof document>"u"?null:document;function ix(t,i,s){var u=uo;if(u&&typeof i=="string"&&i){var m=U(i);m='link[rel="'+t+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),nx.has(m)||(nx.add(m),t={rel:t,crossOrigin:s,href:i},u.querySelector(m)===null&&(i=u.createElement("link"),Zn(i,"link",t),je(i),u.head.appendChild(i)))}}function VC(t){Tr.D(t),ix("dns-prefetch",t,null)}function GC(t,i){Tr.C(t,i),ix("preconnect",t,i)}function YC(t,i,s){Tr.L(t,i,s);var u=uo;if(u&&t&&i){var m='link[rel="preload"][as="'+U(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+U(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+U(s.imageSizes)+'"]')):m+='[href="'+U(t)+'"]';var x=m;switch(i){case"style":x=fo(t);break;case"script":x=ho(t)}if(!(ca.has(x)||(t=z({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:t,as:i},s),ca.set(x,t),u.querySelector(m)!==null||i==="style"&&u.querySelector(Sc(x))||i==="script"&&u.querySelector(Cc(x))))){var A=u.createElement("link");Zn(A,"link",t),i==="style"&&(A[Zr]=!0,A.onload=A.onerror=function(){De(A)}),je(A),u.head.appendChild(A)}}}function KC(t,i){Tr.m(t,i);var s=uo;if(s&&t){var u=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+U(u)+'"][href="'+U(t)+'"]',x=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=ho(t)}if(!ca.has(x)&&(t=z({rel:"modulepreload",href:t},i),ca.set(x,t),s.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Cc(x)))return}u=s.createElement("link"),Zn(u,"link",t),je(u),s.head.appendChild(u)}}}function XC(t,i,s){Tr.S(t,i,s);var u=uo;if(u&&t){var m=ke(u).hoistableStyles,x=fo(t);i=i||"default";var A=m.get(x);if(!A){var L={loading:0,preload:null};if(A=u.querySelector(Sc(x)))L.loading=5;else{t=z({rel:"stylesheet",href:t,"data-precedence":i},s),(s=ca.get(x))&&lp(t,s);var G=A=u.createElement("link");je(G),Zn(G,"link",t),G._p=new Promise(function(ae,fe){G.onload=ae,G.onerror=fe}),G.addEventListener("load",function(){L.loading|=1}),G.addEventListener("error",function(){L.loading|=2}),L.loading|=4,gd(A,i,u)}A={type:"stylesheet",instance:A,count:1,state:L},m.set(x,A)}}}function QC(t,i){Tr.X(t,i);var s=uo;if(s&&t){var u=ke(s).hoistableScripts,m=ho(t),x=u.get(m);x||(x=s.querySelector(Cc(m)),x||(t=z({src:t,async:!0},i),(i=ca.get(m))&&sp(t,i),x=s.createElement("script"),je(x),Zn(x,"link",t),s.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},u.set(m,x))}}function ZC(t,i){Tr.M(t,i);var s=uo;if(s&&t){var u=ke(s).hoistableScripts,m=ho(t),x=u.get(m);x||(x=s.querySelector(Cc(m)),x||(t=z({src:t,async:!0,type:"module"},i),(i=ca.get(m))&&sp(t,i),x=s.createElement("script"),je(x),Zn(x,"link",t),s.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},u.set(m,x))}}function ax(t,i,s,u){var m=(m=Zt.current)?kc(m):null;if(!m)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(s=fo(s.href),i=ke(m).hoistableStyles,u=i.get(s),u||(u={type:"style",instance:null,count:0,state:null},i.set(s,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=fo(s.href);var x=ke(m).hoistableStyles,A=x.get(t);if(A||(m=m.ownerDocument||m,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(t,A),(x=m.querySelector(Sc(t)))?x._p||(A.instance=x,A.state.loading=5):(x=ca.get(t),x||(x={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},ca.set(t,x)),JC(m,t,x,A.state))),i&&u===null)throw Error(r(528,""));return A}if(i&&u!==null)throw Error(r(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(s=ho(s),i=ke(m).hoistableScripts,u=i.get(s),u||(u={type:"script",instance:null,count:0,state:null},i.set(s,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function fo(t){return'href="'+U(t)+'"'}function Sc(t){return'link[rel="stylesheet"]['+t+"]"}function rx(t){return z({},t,{"data-precedence":t.precedence,precedence:null})}function JC(t,i,s,u){if(i=t.querySelector('link[rel="preload"][as="style"]['+i+"]")){if(i[Zr]!==!0){u.loading=1;return}}else i=t.createElement("link"),i[Zr]=!0,i.onload=i.onerror=De.bind(null,i),Zn(i,"link",s),je(i),t.head.appendChild(i);u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2})}function ho(t){return'[src="'+U(t)+'"]'}function Cc(t){return"script[async]"+t}function lx(t,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var u=t.querySelector('style[data-href~="'+U(s.href)+'"]');if(u)return i.instance=u,je(u),u;var m=z({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),je(u),Zn(u,"style",m),gd(u,s.precedence,t),i.instance=u;case"stylesheet":m=fo(s.href);var x=t.querySelector(Sc(m));if(x)return i.state.loading|=4,i.instance=x,je(x),x;u=rx(s),(m=ca.get(m))&&lp(u,m),x=(t.ownerDocument||t).createElement("link"),je(x);var A=x;return A._p=new Promise(function(L,G){A.onload=L,A.onerror=G}),Zn(x,"link",u),i.state.loading|=4,gd(x,s.precedence,t),i.instance=x;case"script":return x=ho(s.src),(m=t.querySelector(Cc(x)))?(i.instance=m,je(m),m):(u=s,(m=ca.get(x))&&(u=z({},s),sp(u,m)),t=t.ownerDocument||t,m=t.createElement("script"),je(m),Zn(m,"link",u),t.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,gd(u,s.precedence,t));return i.instance}function gd(t,i,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,x=m,A=0;A<u.length;A++){var L=u[A];if(L.dataset.precedence===i)x=L;else if(x!==m)break}x?x.parentNode.insertBefore(t,x.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(t,i.firstChild))}function lp(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function sp(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var vd=null;function sx(t,i,s){if(vd===null){var u=new Map,m=vd=new Map;m.set(s,u)}else m=vd,u=m.get(s),u||(u=new Map,m.set(s,u));if(u.has(t))return u;for(u.set(t,null),s=s.getElementsByTagName(t),m=0;m<s.length;m++){var x=s[m];if(!(x[hr]||x[Wt]||t==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var A=x.getAttribute(i)||"";A=t+A;var L=u.get(A);L?L.push(x):u.set(A,[x])}}return u}function op(t,i,s){t=t.ownerDocument||t,t.head.insertBefore(s,i==="title"?t.querySelector("head > title"):null)}function WC(t,i,s){if(s===1||i.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return t=i.disabled,typeof i.precedence=="string"&&t==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function ox(t,i){return t==="img"&&i.src!=null&&i.src!==""&&i.onLoad==null&&i.loading!=="lazy"}function cx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function ux(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function dx(t,i){typeof i.decode=="function"&&(t.imgCount++,i.complete||(t.imgBytes+=ux(i),t.suspenseyImages.push(i)),t=n7.bind(t),i.decode().then(t,t))}function e7(t,i,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=fo(u.href),x=i.querySelector(Sc(m));if(x){i=x._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(t.count++,t=Nc.bind(t),i.then(t,t)),s.state.loading|=4,s.instance=x,je(x);return}x=i.ownerDocument||i,u=rx(u),(m=ca.get(m))&&lp(u,m),x=x.createElement("link"),je(x);var A=x;A._p=new Promise(function(L,G){A.onload=L,A.onerror=G}),Zn(x,"link",u),s.instance=x}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Nc.bind(t),i.addEventListener("load",s),i.addEventListener("error",s))}}var yd=0;function t7(t,i){return t.stylesheets&&t.count===0&&bd(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var u=setTimeout(function(){if(t.stylesheets&&bd(t,t.stylesheets),t.unsuspend){var x=t.unsuspend;t.unsuspend=null,x()}},6e4+i);0<t.imgBytes&&yd===0&&(yd=62500*xC());var m=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&bd(t,t.stylesheets),t.unsuspend)){var x=t.unsuspend;t.unsuspend=null,x()}},(t.imgBytes>yd?50:800)+i);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function fx(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)bd(t,t.stylesheets);else if(t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}}}function Nc(){this.count--,fx(this)}function n7(){this.imgCount--,fx(this)}var xd=null;function bd(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,xd=new Map,i.forEach(i7,t),xd=null,Nc.call(t))}function i7(t,i){if(!(i.state.loading&4)){var s=xd.get(t);if(s)var u=s.get(null);else{s=new Map,xd.set(t,s);for(var m=t.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<m.length;x++){var A=m[x];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(s.set(A.dataset.precedence,A),u=A)}u&&s.set(null,u)}m=i.instance,A=m.getAttribute("data-precedence"),x=s.get(A)||u,x===u&&s.set(null,m),s.set(A,m),this.count++,u=Nc.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),x?x.parentNode.insertBefore(m,x.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(m,t.firstChild)),i.state.loading|=4}}var mo={$$typeof:q,Provider:null,Consumer:null,_currentValue:Ce,_currentValue2:Ce,_threadCount:0};function a7(t,i,s,u,m,x,A,L,G){this.tag=1,this.containerInfo=t,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=fi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fi(0),this.hiddenUpdates=fi(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=x,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.transitionTypes=null,this.incompleteTransitions=new Map}function hx(t,i,s,u,m,x,A,L,G,ae,fe,xe){return t=new a7(t,i,s,A,G,ae,fe,xe,L),i=1,x===!0&&(i|=24),x=Ti(3,null,null,i),t.current=x,x.stateNode=t,i=kh(),i.refCount++,t.pooledCache=i,i.refCount++,x.memoizedState={element:u,isDehydrated:s,cache:i},Eh(x),t}function mx(t){return t?(t=Ps,t):Ps}function px(t,i,s,u,m,x){m=mx(m),u.context===null?u.context=m:u.pendingContext=m,u=ol(i),u.payload={element:s},x=x===void 0?null:x,x!==null&&(u.callback=x),s=cl(t,u,i),s!==null&&(Ri(s,t,i),ic(s,t,i))}function gx(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<i?s:i}}function cp(t,i){gx(t,i),(t=t.alternate)&&gx(t,i)}function vx(t){if(t.tag===13||t.tag===31){var i=Kl(t,67108864);i!==null&&Ri(i,t,67108864),cp(t,67108864)}}function yx(t){if(t.tag===13||t.tag===31){var i=Yi();i=pa(i);var s=Kl(t,i);s!==null&&Ri(s,t,i),cp(t,i)}}var po=!0;function r7(t,i,s,u){var m=ve.T;ve.T=null;var x=re.p;try{re.p=2,up(t,i,s,u)}finally{re.p=x,ve.T=m}}function l7(t,i,s,u){var m=ve.T;ve.T=null;var x=re.p;try{re.p=8,up(t,i,s,u)}finally{re.p=x,ve.T=m}}function up(t,i,s,u){if(po){var m=dp(u);if(m===null)Vm(t,i,u,jd,s),bx(t,u);else if(o7(m,t,i,s,u))u.stopPropagation();else if(bx(t,u),i&4&&-1<s7.indexOf(t)){for(;m!==null;){var x=Wi(m);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var A=Ji(x.pendingLanes);if(A!==0){var L=x;for(L.pendingLanes|=2,L.entangledLanes|=2;A;){var G=1<<31-ln(A);L.entanglements[1]|=G,A&=~G}$a(x),(Rt&6)===0&&(ld=Oe()+500,xc(0))}}break;case 31:case 13:L=Kl(x,2),L!==null&&Ri(L,x,2),cd(),cp(x,2)}if(x=dp(u),x===null&&Vm(t,i,u,jd,s),x===m)break;m=x}m!==null&&u.stopPropagation()}else Vm(t,i,u,null,s)}}function dp(t){return t=Ul(t),fp(t)}var jd=null;function fp(t){if(jd=null,t=Hi(t),t!==null){var i=c(t);if(i===null)t=null;else{var s=i.tag;if(s===13){if(t=d(i),t!==null)return t;t=null}else if(s===31){if(t=f(i),t!==null)return t;t=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return jd=t,null}function xx(t){switch(t){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(dt()){case ti:return 2;case _n:return 8;case yn:case sr:return 32;case Ra:return 268435456;default:return 32}default:return 32}}var hp=!1,jl=null,wl=null,kl=null,Ec=new Map,Tc=new Map,Sl=[],s7="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 bx(t,i){switch(t){case"focusin":case"focusout":jl=null;break;case"dragenter":case"dragleave":wl=null;break;case"mouseover":case"mouseout":kl=null;break;case"pointerover":case"pointerout":Ec.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tc.delete(i.pointerId)}}function Mc(t,i,s,u,m,x){return t===null||t.nativeEvent!==x?(t={blockedOn:i,domEventName:s,eventSystemFlags:u,nativeEvent:x,targetContainers:[m]},i!==null&&(i=Wi(i),i!==null&&vx(i)),t):(t.eventSystemFlags|=u,i=t.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),t)}function o7(t,i,s,u,m){switch(i){case"focusin":return jl=Mc(jl,t,i,s,u,m),!0;case"dragenter":return wl=Mc(wl,t,i,s,u,m),!0;case"mouseover":return kl=Mc(kl,t,i,s,u,m),!0;case"pointerover":var x=m.pointerId;return Ec.set(x,Mc(Ec.get(x)||null,t,i,s,u,m)),!0;case"gotpointercapture":return x=m.pointerId,Tc.set(x,Mc(Tc.get(x)||null,t,i,s,u,m)),!0}return!1}function jx(t){var i=Hi(t.target);if(i!==null){var s=c(i);if(s!==null){if(i=s.tag,i===13){if(i=d(s),i!==null){t.blockedOn=i,fr(t.priority,function(){yx(s)});return}}else if(i===31){if(i=f(s),i!==null){t.blockedOn=i,fr(t.priority,function(){yx(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function wd(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var s=dp(t.nativeEvent);if(s===null){s=t.nativeEvent;var u=new s.constructor(s.type,s);Fl=u,s.target.dispatchEvent(u),Fl=null}else return i=Wi(s),i!==null&&vx(i),t.blockedOn=s,!1;i.shift()}return!0}function wx(t,i,s){wd(t)&&s.delete(i)}function c7(){hp=!1,jl!==null&&wd(jl)&&(jl=null),wl!==null&&wd(wl)&&(wl=null),kl!==null&&wd(kl)&&(kl=null),Ec.forEach(wx),Tc.forEach(wx)}function kd(t,i){t.blockedOn===i&&(t.blockedOn=null,hp||(hp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,c7)))}var Sd=null;function kx(t){Sd!==t&&(Sd=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Sd===t&&(Sd=null);for(var i=0;i<t.length;i+=3){var s=t[i],u=t[i+1],m=t[i+2];if(typeof u!="function"){if(fp(u||s)===null)continue;break}var x=Wi(s);x!==null&&(t.splice(i,3),i-=3,Kh(x,{pending:!0,data:m,method:s.method,action:u},u,m))}}))}function go(t){function i(G){return kd(G,t)}jl!==null&&kd(jl,t),wl!==null&&kd(wl,t),kl!==null&&kd(kl,t),Ec.forEach(i),Tc.forEach(i);for(var s=0;s<Sl.length;s++){var u=Sl[s];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Sl.length&&(s=Sl[0],s.blockedOn===null);)jx(s),s.blockedOn===null&&Sl.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var m=s[u],x=s[u+1],A=m[Rn]||null;if(typeof x=="function")A||kx(s);else if(A){var L=null;if(x&&x.hasAttribute("formAction")){if(m=x,A=x[Rn]||null)L=A.formAction;else if(fp(m)!==null)continue}else L=A.action;typeof L=="function"?s[u+1]=L:(s.splice(u,3),u-=3),kx(s)}}}function Sx(){function t(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(A){return m=A})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,m=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function mp(t){this._internalRoot=t}Cd.prototype.render=mp.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(r(409));var s=i.current,u=Yi();px(s,u,t,i,null,null)},Cd.prototype.unmount=mp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;px(t.current,2,null,t,null,null),cd(),i[ii]=null}};function Cd(t){this._internalRoot=t}Cd.prototype.unstable_scheduleHydration=function(t){if(t){var i=Ei();t={blockedOn:null,target:t,priority:i};for(var s=0;s<Sl.length&&i!==0&&i<Sl[s].priority;s++);Sl.splice(s,0,t),s===0&&jx(t)}};var Cx=n.version;if(Cx!=="19.3.0")throw Error(r(527,Cx,"19.3.0"));re.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=g(i),t=t!==null?v(t):null,t=t===null?null:t.stateNode,t};var u7={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ve,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nd.isDisabled&&Nd.supportsFiber)try{Gt=Nd.inject(u7),xn=Nd}catch{}}return _c.createRoot=function(t,i){if(!o(t))throw Error(r(299));var s=!1,u="",m=m2,x=p2,A=g2;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError)),i=hx(t,1,!1,null,null,s,u,null,m,x,A,Sx),t[ii]=i.current,$m(t),new mp(i)},_c.hydrateRoot=function(t,i,s){if(!o(t))throw Error(r(299));var u=!1,m="",x=m2,A=p2,L=g2,G=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(A=s.onCaughtError),s.onRecoverableError!==void 0&&(L=s.onRecoverableError),s.formState!==void 0&&(G=s.formState)),i=hx(t,1,!0,i,s??null,u,m,G,x,A,L,Sx),i.context=mx(null),s=i.current,u=Yi(),u=pa(u),m=ol(u),m.callback=null,cl(s,m,u),s=u,i.current.lanes=s,ma(i,s),$a(i),t[ii]=i.current,$m(t),new Cd(i)},_c.version="19.3.0",_c}var Ix;function k7(){if(Ix)return yp.exports;Ix=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),yp.exports=w7(),yp.exports}var S7=k7();const C7={"locale.name":"English","locale.short":"EN","common.close":"Close","common.continue":"Continue","common.failed":"Something went wrong. Please try again.","common.listSeparator":", ","login.subtitle":"Sign in to continue","login.form":"Sign in","login.username":"Username","login.password":"Password","login.showPassword":"Show password","login.hidePassword":"Hide password","login.submit":"Sign in","login.submitting":"Signing in…","login.wrong":"Wrong username or password.","login.tooMany":"Too many attempts. Please try again later.","login.offline":"Can't connect to Jarvy. Check your network and try again.","login.themeLight":"Switch to the light theme","login.themeDark":"Switch to the dark theme","general.language":"Language","general.theme":"Theme","general.light":"Light","general.dark":"Dark","about.tagline":"A group chat where you and your AI Bots work side by side, running entirely on your own machine.","about.version":"Version {version}","about.source":"Source","about.package":"npm package","about.license":"License","about.notices":"Third-party notices","status.signedIn":"Signed in","status.signedOut":"Signed out","status.configured":"Ready","status.notConfigured":"Not set up","account.menu":"Account menu","account.menuFor":"Account menu for {name}","account.toggleTheme":"Switch theme","account.signOut":"Sign out","entry.menu":"Chat actions","entry.pin":"Pin","entry.unpin":"Unpin","entry.mute":"Mute","entry.unmute":"Unmute","entry.botInfo":"Bot info","entry.channelInfo":"Channel info","entry.deleteBot":"Delete Bot","entry.deleteChannel":"Delete channel","hint.reaction":"{actor} reacted {emoji} to your message","hint.reactionInThread":"{actor} reacted {emoji} to your message in “{title}”","hint.threadSummary":"{actor} updated the summary of “{title}”","hint.summary":"{actor} updated the thread summary","hint.notice":"{actor} updated the notice","app.connecting":"Connecting to Jarvy…","app.channelDeleted":"Channel deleted","app.botDeleted":"{name} deleted","app.notInChannel":{one:"{names} isn't in this channel, so wasn't notified",other:"{names} aren't in this channel, so weren't notified"},"app.memberAdded":"{name} joined #{channel}","app.sourceGone":"The original message no longer exists","ui.closeNamed":"Close {name}","ui.copied":"Copied","ui.copyFailed":"Couldn't copy","ui.copyCode":"Copy code","ui.image":"[Image: {alt}]","ui.imageHidden":"external image hidden","app.deleteChannelTitle":"Delete channel #{name}","app.deleteChannelBody":"Its messages, threads and attachments will be deleted. This can't be undone.","app.resizePane":"Drag to resize the side panel","common.cancel":"Cancel","common.save":"Save","common.create":"Create","common.delete":"Delete","common.retry":"Retry","common.back":"Back","common.add":"Add","common.saveFailed":"Couldn't save","common.openNav":"Open the chat list","common.you":"You","common.member":"Member","common.noMatch":"No matching members","common.searchMembers":"Search members","common.attachment":"[Attachment]","actions.reply":"Reply to this message","actions.react":"Add a reaction","actions.pickEmoji":"Pick an emoji","actions.recent":"Recent","actions.searchEmoji":"Search emoji","actions.noEmoji":"No emoji found","actions.emoji.Smileys & Emotion":"Smileys and emotion","actions.emoji.People & Body":"People and body","actions.emoji.Animals & Nature":"Animals and nature","actions.emoji.Food & Drink":"Food and drink","actions.emoji.Travel & Places":"Travel and places","actions.emoji.Activities":"Activities","actions.emoji.Objects":"Objects","actions.emoji.Symbols":"Symbols","actions.emoji.Flags":"Flags","actions.fold":"Fold to one line","actions.unfold":"Unfold","fold.folded":"Folded","fold.more":"Show all","fold.less":"Show less","dialogs.candidates":"Members you can add","dialogs.allInside":"Everyone is already in this channel","dialogs.addCount":"Add ({count})","dialogs.addFailed":"Couldn't add members","dialogs.optional":"Optional","dialogs.deleteSection":"Delete the group “{name}”? Its channels move under Channels.","dialogs.deleteFailed":"Couldn't delete. Please try again.","dialogs.editSection":"Edit channel group","dialogs.sectionName":"Group name","dialogs.newSection":"New group","api.offline":"Can't connect to Jarvy. Check your network and try again.","api.historyFailed":"Couldn't load the messages. Please try again.","error.autoconfigModel":"Enter the model ID.","error.autoconfigSource":"The selected setup source isn't valid. Choose another one.","error.botMissing":"Can't find this Bot. It may have been deleted.","error.agentUndeletable":"The agent Bot can't be deleted. You can rename or stop it.","error.chatAccessChanged":"Your access to this chat has changed. Refresh and try again.","error.computerFailed":"The sandbox couldn't start.","error.computerMissing":"This Bot has no sandbox.","error.dockerUnavailable":"Docker isn't available on the computer running Jarvy.","error.fileTooLarge":"Attachments can't be larger than {limit}.","error.connectionMissing":"Can't find this model connection. It may have been deleted.","error.credentialChanged":"The credential changed. Please try again.","error.credentialScope":"The credential belongs to another connection.","error.credentialsMissing":"Set up this connection's credential first.","error.dataLocked":"Jarvy is already running, or another program is using its data directory.","error.discoveryFormat":"This address didn't return a model list for the selected protocol. Check the API URL and protocol.","error.discoveryHttp":"Couldn't fetch the models: HTTP {status}.","error.discoveryKey":"Enter the API key.","error.discoveryProtocol":"The selected protocol can't list models. Add models manually.","error.discoveryUrl":"The API URL isn't valid.","error.discoveryUrlMissing":"Enter the API URL.","error.historyMissing":"Can't find this History record.","error.invalidCredential":"The credential format isn't valid.","error.invalidRun":"The Bot's state just changed. Refresh and try again.","error.loginInput":"Enter the authorization code or the redirect URL.","error.loginOption":"Pick a sign-in method.","error.loginStep":"The sign-in step has changed. Please start again.","error.loginFailed":"Sign-in failed. Refresh and try again.","error.messageMissing":"Can't find this message. It may have been deleted.","error.modelIncomplete":"Fill in the model's context window and max output.","error.modelMissing":"Can't find this model. It may have been removed.","error.modelRequestFailed":"Model request failed: {detail}","error.modelRequired":"Pick a model for the Bot first.","error.modelSwitchUncertain":"The model switch didn't finish. Pick the model again.","error.nameTaken":"Another member already has this name.","error.providerNameTaken":"A provider with this name already exists.","error.resetCustom":"A custom provider has no default models to reset to.","error.connectionInUse":"In use by {bots}. Switch to another model before deleting this provider.","error.questionClosed":"This question is already settled.","error.questionExpired":"This question was ignored. The Bot is no longer waiting for an answer.","error.runtimeFailed":"The Bot's run failed. Check its model settings and try again.","error.sessionCorrupt":"The Bot couldn't start (the session file can't be read).","error.sessionMismatch":"The Bot couldn't start (the session file doesn't match).","error.sessionMissing":"The Bot couldn't start (the session file is missing).","error.sessionPath":"The Bot couldn't start (the session file path isn't valid).","error.stopping":"Jarvy is shutting down. Try again later.","error.thinkingFormat":"This thinking format isn't supported.","error.toolsMissing":"Couldn't load the Bot's tools. Restart the Bot and try again.","error.unsafeReplay":"The Bot may have already taken actions before it was interrupted, so it won't retry automatically to avoid doing them twice.","error.discoveryUnreachable":"Couldn't reach {host}. Check the API URL.","color.gray":"Gray","color.blue":"Blue","color.green":"Green","color.amber":"Amber","color.rose":"Pink","color.violet":"Purple","avatar.working":"Working","avatar.openInfo":"Open {name}'s Bot info"},N7={"settings.title":"Settings","settings.sections":"Settings sections","settings.general":"General","settings.models":"Models","settings.usage":"Usage","settings.network":"Network","settings.secrets":"Secrets","settings.about":"About","group.custom":"Custom API","group.subscription":"Subscription","group.apiKey":"API key","models.add":"Add a provider","models.empty":"No model connection yet","models.count":{one:"{count} model",other:"{count} models"},"models.none":"No models yet","picker.back":"Back to the model page","picker.search":"Search providers","picker.searchPlaceholder":"Search providers…","picker.keyHint":{one:"API key · {count} model",other:"API key · {count} models"},"picker.loading":"Loading providers…","picker.retry":"Try again","picker.noMatch":"No provider matches","editor.back":"Back to the provider list","editor.delete":"Delete this provider","editor.connection":"Connection","editor.providerName":"Provider name","editor.name":"Connection name","editor.protocol":"API protocol","editor.url":"API URL","editor.defaultUrl":"The provider's own address","editor.key":"API key","editor.keyPlaceholder":"Enter the API key","editor.keySaved":"Saved. Leave empty to keep it.","editor.settings":"Connection settings","editor.models":"Model list","editor.selected":"{selected} of {total} selected","editor.fetch":"Get the model list","editor.fetching":"Getting…","editor.fetched":{one:"Got {count} model",other:"Got {count} models"},"editor.noneReturned":"This endpoint returned no models","editor.fetchFailed":"Couldn't get the model list","editor.loadingCatalog":"Loading the model catalog…","editor.autoSelected":"Autoconfigure selected","editor.addManually":"Add manually","editor.filter":"Filter models","editor.filterPlaceholder":"Filter models…","editor.selectVisible":"Select everything shown","editor.empty":"No models yet","editor.emptyCustom":"Get the model list, or add a model by hand.","editor.emptyBuiltin":"You can add a model by hand.","editor.autoSummary":"{parts}; saved with the form","editor.autoMatched":{one:"{count} configured",other:"{count} configured"},"editor.autoChoose":{one:"{count} needs a source",other:"{count} need a source"},"editor.autoNone":{one:"{count} not in the catalog",other:"{count} not in the catalog"},"editor.autoFailed":{one:"{count} failed",other:"{count} failed"},"editor.confirmDelete":'Delete "{name}" and its models?',"editor.deleteFailed":"Could not delete","editor.saveFailed":"Could not save","editor.saved":"Saved","editor.reset":"Reset models","editor.resetTitle":"Reset the models to the defaults?","editor.resetModels":{one:"{count} model will be restored to its defaults.",other:"{count} models will be restored to their defaults."},"editor.resetRemoves":{one:"{count} model not in the defaults will be removed: {names}.",other:"{count} models not in the defaults will be removed: {names}."},"editor.resetBots":{one:"{bots} uses a model that will be removed and will need to pick another.",other:"{bots} use models that will be removed and will need to pick others."},"editor.resetKeeps":"The API URL and protocol will be restored to the defaults. Sign-in details and the API key are kept. Unsaved changes will be discarded.","editor.resetConfirm":"Reset","editor.resetDone":"Models reset to the defaults","editor.resetFailed":"Couldn't reset","editor.saving":"Saving…","editor.save":"Save","card.defaultProtocol":"The provider's own protocol","card.modelId":"Model ID","card.modelName":"Model name","card.optional":"Optional","card.newModel":"New model","card.enterId":"Enter the model ID","card.use":"Use {name}","card.remove":"Remove {name}","card.image":"Image","card.reasoning":"Thinking","card.capabilities":"Capabilities","card.reasoningThinking":"Thinking / reasoning","card.imageInput":"Image input","card.specs":"Model specs","card.hidePrices":"Hide prices","card.editPrices":"Edit prices","card.context":"Context window · tokens","card.maxOutput":"Maximum output · tokens","card.costTitle":"Price per million tokens","card.costInput":"Input","card.costOutput":"Output","card.costCacheRead":"Cache read","card.costCacheWrite":"Cache write","card.notProvided":"Not given","card.advanced":"Advanced","card.apiOverride":"API protocol","card.headers":"Headers","card.headerSaved":"Saved. Leave empty to keep it.","card.addHeader":"Add a header","card.removeHeader":"Remove this header","card.compat":"Compat flags","card.jsonObject":"Enter a JSON object","auto.run":"Autoconfigure","auto.pending":"Configuring…","auto.failed":"Autoconfigure failed","auto.tagChoose":"Pick a source","auto.tagNone":"Not in the catalog","auto.official":"Official","auto.matched":"Filled in from {source}{note}{suffix}","auto.reseller":" (a reseller's catalog, not the vendor's)","auto.applied":"; it takes effect once saved.","auto.apiMismatch":"The catalog has this model on the {api} protocol, not the one chosen here, so the thinking format and compat flags were left alone.","auto.changeSource":"Change the source","auto.multiple":"Several official sources share this model name; pick one:","auto.similar":"The catalog has no {modelId}; similar models:","auto.notFound":"The catalog has no such model. Fill it in by hand.","thinking.title":"Thinking","thinking.format":"Thinking format","thinking.protocolDefault":"The protocol's default","thinking.onlyCompletions":"Only used by the OpenAI Chat Completions protocol","thinking.levels":"Thinking levels","thinking.level.off":"Off","thinking.level.minimal":"Minimal","thinking.level.low":"Low","thinking.level.medium":"Medium","thinking.level.high":"High","thinking.level.xhigh":"Extra high","thinking.level.max":"Maximum","thinking.levelName":"{level} level","thinking.levelValue":"Value sent for the {level} level","thinking.supportedDefault":"Supported (default)","thinking.unsupported":"Not supported","thinking.supportedCustom":"Supported, send this value","thinking.supported":"Levels in use: {levels}","auth.title":"Account authorization","auth.running":"Authorizing","auth.openPage":"Open the authorization page","auth.code":"Code: {code}","auth.browser":"Sign in with the browser (OAuth)","auth.deviceCode":"Sign in with a device code","auth.redirectFull":"The full redirect URL","auth.redirectOrCode":"Code or redirect URL","auth.manualNote":"If the browser does not come back on its own, paste the redirect URL here.","auth.waiting":"Waiting for authorization…","auth.cancel":"Cancel authorization","auth.configureCredential":"Set up the credential","auth.signInAgain":"Sign in again","auth.signIn":"Sign in","auth.removeCredential":"Remove the credential","auth.signOut":"Sign out","auth.statusFailed":"Couldn't get the sign-in status","auth.refresh":"Refresh the state","auth.antigravityRisk":"Using Antigravity through a third-party app may break Google's terms of service, and the account may be suspended.","picker.loadFailed":"Couldn't load the providers"},E7={"rail.label":"Navigation","rail.chats":"Chats","rail.environments":"Environments","home.talk":"Talk to {name}","home.recent":"Recent messages","home.openDm":"Open the DM","home.call.reply":"New reply","home.call.ask":"Waiting for your answer","home.call.error":"The last run failed","home.failed":"That run failed: {reason}","home.answerInDm":"Answer in the DM","sidebar.label":"Chats","sidebar.create":"Create","sidebar.createMenu":"Create menu","sidebar.newChannel":"New channel","sidebar.newSection":"New channel group","sidebar.newBot":"New Bot","sidebar.alerts":"{count} unread for you","sidebar.unread":"{count} unread","sidebar.said":"{name}: {text}","sidebar.atMe":"[Mentioned you]","sidebar.more":"More actions for {name}","sidebar.asking":"(waiting for your answer)","sidebar.working":"(working)","sidebar.pinned":"Pinned","sidebar.muted":"Muted","sidebar.hasUnread":"Unread","sidebar.editSection":"Edit group: {name}","sidebar.search":"Search chats and messages","sidebar.results":"Search results","sidebar.chats":"Chats","sidebar.nav":"Channels and DMs","sidebar.followed":"Followed threads","sidebar.channels":"Channels","sidebar.dms":"DMs","sidebar.noDms":"No DMs yet","search.title":"Search","search.paneLabel":"Search in this chat","search.inThread":"This thread","search.inDm":"This DM","search.close":"Close search","search.placeholder":"Search messages","search.channelPlaceholder":"Search this channel and its threads","search.prompt":"Type what you're looking for","search.searching":"Searching…","search.noMessages":"No messages found","search.count":{one:"{count} message, newest first",other:"{count} messages, newest first"},"search.countLatest":"Showing the latest {count}","search.showAll":"Show all {count}","search.threads":"Threads","search.channels":"Channels (topics and notices)","search.messages":"Messages","search.channel":"Channel","member.unknown":"Unknown member","member.deleted":"{name} (deleted)","members.view":"View {name}","members.remove":"Remove {name}","members.more":"More for {name}","members.menu":"Member actions","members.creator":"Creator","members.admin":"Admin","members.makeAdmin":"Make admin","members.removeAdmin":"Remove admin","members.removeFromChannel":"Remove from channel","members.count":{one:"{count} member",other:"{count} members"},"members.people":"People","members.removeTitle":"Remove {name} from #{channel}","members.removeBody":"They won't get this channel's messages anymore.","members.removeConfirm":"Remove","chat.area":"Conversation","chat.botDms":"{name}'s DMs with other Bots","chat.botStatus":"Bot status","chat.transcript":"Messages","chat.loading":"Loading…","chat.empty":"No messages yet","chat.start":"Start a conversation with {name}","chat.loadingOlder":"Loading earlier messages…","chat.toLatest":"Jump to the latest","chat.unseen":{one:"{count} new message",other:"{count} new messages"},"chat.toChannel":"Message #{name}","chat.toBot":"Message {name}…","chat.pickModel":"Choose a model for this Bot to start messaging","chat.pick":"Pick a chat","channel.infoFor":"Channel info: {name}","channel.membersCount":{one:"{count} member",other:"{count} members"},"channel.members":"Members","channel.search":"Search channel messages (Ctrl+F)","channel.threads":"Threads","notice.title":"Notice","notice.edit":"Edit the notice","notice.content":"Notice text","notice.none":"No notice yet","notice.version":"v{version}","chat.newBelow":"New messages","chat.today":"Today","chat.yesterday":"Yesterday","channel.echo":"Replied in “{title}”","channel.replies":{one:"{count} reply",other:"{count} replies"},"channel.threadDone":"Done","channel.lastReply":"Last reply {time}","channel.replyInThread":"Reply in thread","info.edit":"Edit {name}","info.memberList":"Member list","info.back":"Back to channel info","info.addMembers":"Add members","info.name":"Name","info.newChannel":"New channel","info.topic":"Topic","info.noTopic":"No topic yet","info.section":"Group","info.menu":"Channel","info.noSection":"None","mention.menu":"Mention a member","mention.inThread":"In this thread","mention.inChannel":"Others in the channel","mention.outside":"Not in this channel","mention.outsideList":"Members not in this channel","mention.searchOutside":"Search members not in this channel","mention.invites":"Choosing someone adds them to this channel","quote.inline":"“{text}”","quote.by":"{name}:","quote.remove":"Remove quote: {text}","quote.tooMany":"A message can quote up to {count} passages","quote.selection":"Selected text","quote.copy":"Copy","quote.quote":"Quote in reply","ref.label":"Message from {name}: {text}","ref.dm":"DM · {title}","ref.open":"Go to message","composer.busy":"Still uploading. Add more once it's done.","composer.tooMany":"A message can have up to {count} attachments.","composer.size":"Attachments can't be empty or larger than {limit}.","composer.pasted":"pasted-image","composer.removeFile":"Remove attachment: {name}","composer.uploading":"Uploading: {name}","composer.cancelUpload":"Cancel upload: {name}","composer.replying":"Replying to","composer.cancelReply":"Cancel reply","composer.drop":"Drop to attach","composer.attach":"Attach files","composer.input":"Message","composer.send":"Send","files.preview":"Preview {name}","files.download":"Download {name}","files.gone":"This attachment doesn't exist or was deleted","files.readFailed":"Couldn't open the file ({status})","files.readError":"Couldn't open the file","files.kindImage":"Image","files.kindSvg":"SVG","files.kindHtml":"HTML","files.kindMarkdown":"Markdown","files.kindText":"Text","files.kindFile":"File","files.downloadFile":"Download","files.showPreview":"Preview","files.showSource":"Source","files.showText":"Plain text","files.openTab":"Open in a new tab (isolated)","files.narrow":"Shrink the preview","files.widen":"Widen the preview","files.closePreview":"Close the preview","files.running":"Scripts are running in isolation: they can reach the network but can't read Jarvy's data.","files.scripts":{one:"This HTML has {count} script{hosts}. It isn't running. Once run, it can reach the network but can't read Jarvy's data.",other:"This HTML has {count} scripts{hosts}. They aren't running. Once run, they can reach the network but can't read Jarvy's data."},"files.scriptHosts":" (loading {hosts})","files.andMore":" and more","files.stop":"Stop scripts","files.run":"Run scripts","files.downloadToView":"Download this file to view it","files.tooLarge":"This file is over 1 MB, too large to preview here.","files.unsupported":"This file can't be previewed here.","files.reading":"Reading the file…","files.runningTitle":"{name} (running)","files.previous":"Previous attachment","files.choose":"Pick a file to preview","files.next":"Next attachment","question.failed":"Couldn't send the answer","question.dismissed":"Dismissed","question.chose":"Chose: {answer}","question.dismissLabel":"Close the question without answering","question.dismiss":"Skip","question.multiple":"Pick one or more","question.note":"Add a note (optional)","question.own":"Or write your own…","question.ownLabel":"Your own answer","question.confirmCount":"OK ({count})","question.confirm":"OK","question.send":"Send","directs.back":"Back to the list","directs.between":"{name} and {other}","directs.readOnly":"Read only","files.kindVideo":"Video","files.kindAudio":"Audio","files.cantPlay":"This browser can't play it","files.cantPlayHint":"Download it and open it in a player."},T7={"threadSort.title":"Sort","threadSort.current":"Sort: {order}","threadSort.updated":"Last updated","threadSort.created":"Created","threadSort.status":"Status","threads.list":"Thread list","threads.closeList":"Close the thread list","threads.byStatus":"Filter by status","threads.openCount":"Open {count}","threads.doneCount":"Done {count}","threads.all":"All","threads.loading":"Loading…","threads.loadFailed":"Couldn't load the threads","threads.none":"No threads yet","threads.following":"Following","threads.filter":"Filter","threads.unreadCount":"Unread {count}","threads.unread":"Unread","threads.noneUnread":"No unread threads","threads.noneOpen":"No open threads","threads.noneDone":"No finished threads","threads.notFollowing":"Not following","threads.pick":"Pick a thread","threads.open":"Open","thread.rename":"Rename","thread.title":"Thread title","thread.toggleStatus":"Switch status","thread.summary":"Summary","thread.editSummary":"Edit the summary","thread.conclude":"Mark done and post the summary to #{channel}","thread.addSummary":"Add a summary","thread.sourceElsewhere":"The original message isn't in this thread","thread.label":"Thread","thread.backToList":"Back to the thread list","thread.inChannel":"View in channel","thread.search":"Search thread messages (Ctrl+F)","thread.followingHint":"New replies count as unread","thread.notFollowingHint":"New replies don't count as unread","thread.follow":"Follow","thread.expand":"Expand","thread.collapse":"Back to the side panel","thread.close":"Close the thread panel","thread.conclusion":"Conclusion:","thread.concluded":"Marked done; the summary was posted to #{channel}","thread.noReplies":"No replies yet","thread.toLatest":"Jump to the latest reply","thread.reply":"Reply in thread"},M7={"usage.title":"Usage","usage.range":"Time range","usage.today":"Today","usage.days":"{count} days","usage.all":"All","usage.refresh":"Refresh","usage.refreshLabel":"Refresh usage","usage.retry":"Retry","usage.loading":"Loading usage…","usage.loadFailed":"Could not load usage","usage.empty":"No model calls in this period","usage.model":"Model","usage.calls":"Calls","usage.input":"Input","usage.output":"Output","usage.cacheRead":"Cache read","usage.cacheWrite":"Cache write","usage.cost":"Cost","usage.total":"Total","usage.byModel":"By model","usage.byBot":"By Bot","usage.unpriced":"No price set","usage.notePartial":"The total cost leaves out models with no price set.","usage.noteCosts":"Costs leave out models with no price set.","activity.error":"Error","activity.running":"Running","activity.reasoning":"Thinking","activity.texting":"Replying","activity.toolCalling":"Using tools","activity.asking":"Waiting for your answer","activity.noModel":"No model","activity.idle":"Idle","activity.stopped":"Not running","bot.saved":"Saved","bot.changeFailed":"Couldn't change it","bot.color":"Avatar color","bot.contextHint":"Context in use, as the model reported it with the Bot's last reply","bot.contextStale":"The latest model request failed. This is the context usage from the last successful request.","bot.context":"Context","bot.unknown":"Unknown","bot.tokens":"{used} / {window} tokens","bot.description":"Description","bot.descriptionPlaceholder":"What can this Bot do for you?","bot.personaPlaceholder":"The Bot's personality, duties and habits","bot.personaHint":"Applies from the next time it starts working.","bot.unsaved":"Unsaved changes","bot.saving":"Saving…","agent.title":"Agent Bot","agent.intro":"{name} is your agent Bot: it helps you run Jarvy itself. Ask it in a DM or a channel to:","agent.create":"Create Bots and change their name, description and persona","agent.model":"Give Bots a model and a thinking level","agent.run":"Start or stop Bots, and see their usage","agent.delete":"Delete Bots, channels and channel groups, or remove members from a channel, always after you confirm on a card","bot.aborting":"Interrupting…","bot.abort":"Interrupt the current task","bot.starting":"Starting…","bot.stopping":"Stopping…","bot.start":"Start","bot.stop":"Stop","bot.workspace":"Workspace","bot.copyWorkspace":"Copy the workspace path","bot.tab.overview":"Overview","bot.tab.profile":"Profile","bot.tab.environment":"Environment","bot.tab.tasks":"Tasks","bot.tab.access":"Access","bot.tab.activity":"Activity","bot.subscriptions":"Subscriptions","bot.noSubscriptions":"No subscriptions","bot.threadIn":"Thread · #{channel}","botModel.auto":"Default level","botModel.off":"Off","botModel.minimal":"Minimal","botModel.low":"Low","botModel.medium":"Medium","botModel.high":"High","botModel.xhigh":"Extra high","botModel.max":"Maximum","botModel.loadFailed":"Couldn't load the model list","botModel.switchFailed":"Couldn't switch the model","botModel.pick":"Pick the Bot's model","botModel.broken":"This model isn't available anymore. Choose another one.","botModel.choose":"Pick a model","botModel.filter":"Filter the Bot's models","botModel.filterPlaceholder":"Filter models…","botModel.list":"Bot models","botModel.noMatch":"No matching models","botModel.none":"No models yet. Add one in Settings.","botModel.manage":"Manage models","botModel.thinking":"Thinking","botModel.pickThinking":"Pick the thinking level","botModel.loading":"Loading models…","botModel.switching":"Switching…","botModel.pickFor":"Pick a model for {name}","deleteBot.title":"Delete {name}","deleteBot.after":"Once deleted:","deleteBot.chats":{one:"Its {count} DM, channel memberships and subscriptions are deleted.",other:"Its {count} DMs, channel memberships and subscriptions are deleted."},"deleteBot.messages":"Its messages in channels and threads stay, shown as from “{name}”; the name can be used again.","deleteBot.history":"Its session history and unfinished tasks are cleared.","deleteBot.files":"Also delete the workspace folder","deleteBot.filesHint":"The workspace may hold files it made. It's kept unless you tick this.","deleteBot.deleting":"Deleting…","deleteBot.working":"Working…","history.reasoning":"Thinking","history.text":"Text","history.empty":"(empty)","history.image":"Image in History","history.toolCall":"Tool call","history.toolResult":"Tool result","history.error":"Error","history.related":"View related record #{id}","history.result":"Result","history.call":"Call","history.details":"Structured result","history.view":"Record view","history.content":"Content","history.json":"Raw JSON","history.contentLabel":"Record content","history.tools":"Tool definitions","history.toolsRemoved":"Removed tools","history.stopReason":"Stop reason","activity.detailFailed":"Couldn't load the record","activity.detailLoading":"Loading the record…","activity.openChat":"Open the chat","activity.sentBy":"Sent by call #{id}","activity.roleSystem":"System","activity.roleUser":"Input","activity.roleAssistant":"Assistant","activity.timeline":"Bot activity timeline","activity.chatMessage":"Chat message {id}","activity.viewMessage":"View message {sequence} · {chat}","activity.attachmentOnly":"Attachments only","activity.attachments":{one:"{count} attachment",other:"{count} attachments"},"activity.viewSentBy":"View call #{id}, which sent it","activity.historyRecord":"History record #{id}","activity.viewHistory":"View History #{id} · {role}","activity.emptyMessage":"(empty message)","activity.loadFailed":"Couldn't load the activity","activity.backToTimeline":"Back to the timeline","activity.newestFirst":"Newest first","activity.refresh":"Refresh the activity","activity.reading":"Loading…","activity.columnChat":"Chat","activity.columnTime":"Time","activity.loading":"Loading the activity…","activity.empty":"No activity yet","activity.newer":"Newer","activity.page":"Page {page}","activity.older":"Older","activity.historyDetail":"History record details","activity.chatDetail":"Chat message details","activity.toolCall":"Called {name}","activity.toolResult":"{name} · result","activity.toolFailed":"{name} · failed","activity.images":{one:"{count} image",other:"{count} images"},"bot.newName":"New Bot","bot.newNameN":"New Bot {n}"},A7={"npc.toolbar":"NPC prototype","npc.replay":"Replay the turn","npc.mood":"Base mood","npc.mood.normal":"Normal","npc.mood.happy":"Happy","npc.mood.sad":"Sad","npc.mood.angry":"Angry","npc.mood.dizzy":"Dizzy","npc.poses":"Animations","npc.pose.sleep":"Sleeping","npc.pose.idle":"Idle","npc.pose.think":"Thinking","npc.pose.mutter":"Talking to itself","npc.pose.say":"Talking to you","npc.pose.ask":"Waiting for you","npc.pose.read":"Reading a file","npc.pose.work":"Editing, running","npc.pose.compact":"Compacting","npc.pose.busy":"Retrying","npc.pose.failed":"Failed","npc.pose.done":"Done","npc.pose.groom":"Grooming","npc.expand":"Show every step","npc.collapse":"Collapse","npc.panel":"This turn","npc.state.running":"Running","npc.state.ok":"Done","npc.state.failed":"Failed","npc.duration":"{value}s","npc.done":"Done · {duration}","npc.mutter":"({text})","npc.to":"→ {chat}","npc.step.think":"Thinking","npc.step.mutter":"Talked to itself","npc.step.read.running":"Reading {target}","npc.step.read.ok":"Read {target}","npc.step.write.running":"Editing {target}","npc.step.write.ok":"Edited {target}","npc.step.run.running":"Running {target}","npc.step.run.ok":"Ran {target}","npc.step.run.failed":"{target} failed","npc.step.compact.running":"Tidying up the context","npc.step.compact.ok":"Tidied up the context","npc.step.ask.running":"Waiting for your answer","npc.step.ask.ok":"You chose “{answer}”","npc.step.say.running":"Replying to you","npc.step.say.ok":"Replied to you","npc.step.post.running":"Posting to {chat}","npc.step.post.ok":"Posted to {chat}","npc.demo.think1":"fish says the thread pane jumps when it opens. The scroll may run at the wrong moment. Let me first see how ThreadPane scrolls.","npc.demo.think2":"It scrolls before the replies have their height. Scrolling after layout should fix it. The reply count belongs in the dependencies too.","npc.demo.mutter1":"Edited. Let me run the build first.","npc.demo.mutter2":"Hmm… the types don't pass; the ref can be null.","npc.demo.channel":"dev","npc.demo.post":"The thread pane no longer jumps when it opens, and the build passes. Waiting for fish to confirm.","npc.demo.question":"Fixed. Should I also update the screenshots in the docs?","npc.demo.yes":"Yes, update them","npc.demo.no":"Not now","npc.demo.replyYes":"Done: the thread pane now opens at the newest reply without jumping, and the screenshots in the docs are new. The build passes.","npc.demo.replyNo":"Done: the thread pane now opens at the newest reply without jumping. The build passes; I left the screenshots as they are.","npc.live.omitted":"… {count} characters left out …","npc.live.tokens":"Context: {before} → {after} tokens","npc.live.compact.running":"Tidying up the context","npc.live.compact.ok":"Tidied up the context","npc.live.compact.failed":"Couldn't tidy up the context","npc.live.retry.running":"Retrying ({attempt}/{max})","npc.live.retry.ok":"Retried","npc.live.retry.failed":"Retrying failed","npc.live.read.running":"Reading {target}","npc.live.read.ok":"Read {target}","npc.live.read.failed":"Couldn't read {target}","npc.live.edit.running":"Editing {target}","npc.live.edit.ok":"Edited {target}","npc.live.edit.failed":"Couldn't edit {target}","npc.live.write.running":"Writing {target}","npc.live.write.ok":"Wrote {target}","npc.live.write.failed":"Couldn't write {target}","npc.live.run.running":"Running {target}","npc.live.run.ok":"Ran {target}","npc.live.run.failed":"{target} failed","npc.live.script.running":"Running a script","npc.live.script.ok":"Ran a script","npc.live.script.failed":"The script failed","npc.live.tool.running":"Using {tool}","npc.live.tool.ok":"Used {tool}","npc.live.tool.failed":"{tool} failed","npc.live.sendFailed":"The message didn't go out","npc.live.switch.running":"Switching work environment","npc.live.switch.ok":"Switched work environment","npc.live.switch.failed":"Couldn't switch work environment","npc.live.askFailed":"The question didn't go out","npc.live.askClosed":"The question was closed","npc.live.answerBelow":"Answer on the card below","npc.live.answerIn":"Answer in {chat}","npc.live.browse.running":"Looking through {chat}","npc.live.browse.ok":"Looked through {chat}","npc.live.browseAll.running":"Looking through the chats","npc.live.browseAll.ok":"Looked through the chats","npc.done.interrupted":"Interrupted · {duration}","npc.done.failed":"The turn failed · {duration}"},_7={"environment.title":"Work environment","environment.own":"Docker sandbox","environment.container":"Container","environment.image":"Image","environment.mount":"Workspace mount","environment.external":"External environments","envs.sandboxOf":"{name}'s sandbox","envs.back":"All environments","envs.workingHere":{one:"{names} is working here",other:"{names} are working here"},"environment.state.preparing":"Preparing","environment.state.running":"Running","environment.state.stopped":"Stopped","environment.state.failed":"Failed to start","environment.state.unavailable":"Unavailable","environment.unavailable":"{why}, so a sandbox can't be started for this Bot (without one, it can't read or write files, run commands and so on).","environment.unavailable.missing":"Docker isn't installed here","environment.unavailable.stopped":"The Docker service isn't running here","environment.unavailable.denied":"No permission to use Docker here","environment.unavailable.failed":"Docker can't be used here","environment.start":"Start","environment.starting":"Starting…","environment.stop":"Stop","environment.stopping":"Stopping…","environment.stopTitle":"Stop {name}'s sandbox?","environment.stopBody":"Programs running in the sandbox will be closed. Installed software and workspace files are kept.","environment.stopConfirm":"Stop","environment.reset":"Reset…","environment.resetTitle":"Reset {name}'s sandbox?","environment.resetBody":"Software installed in the sandbox will be removed. Workspace files are kept.","environment.resetConfirm":"Reset","environment.resetBodyVm":"Software installed in the sandbox, and Docker's images, containers and volumes there, will be removed. Workspace files are kept.","environment.restartNote":"The new size takes effect when the sandbox next starts.","environment.restart":"Restart now","environment.restartTitle":"Restart {name}'s sandbox?","environment.restartBody":"Programs running in the sandbox will be closed. Installed software and workspace files are kept.","environment.restartConfirm":"Restart","environment.type":"Type","environment.type.container":"Container","environment.type.vm":"Virtual machine","environment.type.checking":"Checking whether this computer can run virtual machines…","environment.type.unavailable":"This computer can't run virtual machine sandboxes: {why}.","environment.type.why.no_kata":"Kata isn't installed","environment.type.why.no_kvm":"it has no KVM","environment.type.why.busy":"hardware virtualization is taken by other virtual machine software (such as VirtualBox)","environment.type.why.failed":"a trial virtual machine didn't start","environment.type.recheck":"Check again","environment.type.vmTitle":"Make {name}'s sandbox a virtual machine?","environment.type.vmBody":"The sandbox is made afresh, with Docker and Docker Compose inside: workspace files are kept, software installed in it is removed. The first switch builds its image, which can take a few minutes.","environment.type.containerTitle":"Make {name}'s sandbox a container?","environment.type.containerBody":"The sandbox is made afresh: workspace files are kept; software installed in it, and Docker's images, containers and volumes there, are removed.","environment.type.confirm":"Switch","environment.type.switching":"Switching…","environment.limits":"Resource limits","environment.limits.edit":"Change resource limits","environment.limits.none":"No limits","environment.limits.unlimited":"Unlimited","environment.limits.memory":"Memory {value}","environment.limits.cpu":"CPU {value}","environment.limits.cores":"{count} cores","environment.limits.oneCore":"1 core","environment.limits.memoryField":"Memory (GB)","environment.limits.cpuField":"CPU (cores)","environment.limits.machine":"This machine: {cpus} cores · {memory} GB","environment.limits.below":"Below the {usage} in use now. After saving, some programs in the sandbox may be ended.","environment.limits.failed":"Couldn't change the resource limits","environment.limits.vm":"Size","environment.limits.vmEdit":"Change the virtual machine's size","environment.limits.vmDefault":"Empty fields mean the default: 4 GB and 2 cores.","environment.limits.vmLater":"It is running: the new size takes effect when it next starts.","environment.usage.memory":"Memory","environment.usage.cpu":"CPU","environment.usage.disk":"Docker disk","environment.usage.machine":"{used} / {whole} (this machine)","environment.usage.host":"Takes {value} of this machine","error.typeInvalid":"A sandbox is a container or a virtual machine.","error.vmSizeInvalid":"A virtual machine can have 1–{memory} GB of memory and 1–{cpus} CPUs.","error.vmUnavailable":"This computer can't run virtual machine sandboxes right now.","error.limitsInvalid":"Memory can be 0.25–{memory} GB and CPU 0.1–{cpus} cores, or unlimited."},R7={"connection.lan":"LAN access","connection.localOnly":"This computer only","connection.localOnlyHint":"Jarvy accepts connections from this computer only. To use it from other devices on your network, restart it with {flag}.","connection.addresses":"Addresses","connection.copy":"Copy address","connection.root":"Security certificate","connection.download":"Download certificate","connection.fingerprint":"SHA-256 fingerprint","connection.fingerprintSha1":"SHA-1 fingerprint","connection.howTo":"Installation instructions","connection.howMac":"Mac: Open the certificate to add it to Keychain Access, double-click it, then under Trust set When using this certificate to Always Trust.","connection.howWindows":"Windows: Open the certificate, click Install Certificate, choose Place all certificates in the following store, then pick Trusted Root Certification Authorities. The Thumbprint on the certificate's Details tab is the SHA-1 fingerprint above.","connection.howIos":"iPhone and iPad: Download it in Safari, install it in Settings › General › VPN & Device Management, then turn on full trust in Settings › General › About › Certificate Trust Settings.","connection.howAndroid":"Android: Download it, then search Settings for CA certificate and install it. Where it lives varies by phone, usually under Security or Encryption & credentials.","connection.howRestart":"After installing, quit the browser completely and open it again so it picks up the certificate.","connection.allowHttp":"Allow HTTP access","connection.allowHttpHint":"Passwords and conversations travel in plain text; turn this on only on a network you trust.","connection.insecure":"This connection isn't encrypted. Others on the same network could see passwords and conversations.","connection.useHttps":"Switch to HTTPS"},z7={"secrets.add":"Add secret","secrets.empty":"No secrets yet","secrets.name":"Name","secrets.description":"Description","secrets.descriptionPlaceholder":"Optional, such as what it's for","secrets.value":"Value","secrets.newValue":"New value","secrets.newValuePlaceholder":"Leave empty to keep the current value","secrets.showValue":"Show value","secrets.hideValue":"Hide value","secrets.shortValue":"This value is shorter than 8 characters and may not be hidden when it appears in what Bots see.","secrets.noDescription":"No description","secrets.grantCount":{one:"Granted to {count} Bot",other:"Granted to {count} Bots"},"secrets.notGranted":"Not granted","secrets.unreadable":"Can't decrypt","secrets.unreadableHint":"This value was encrypted with a different master key and can't be read. Enter it again.","secrets.fingerprint":"Fingerprint","secrets.updated":"Updated {time}","secrets.usedCount":{one:"Used {count} time",other:"Used {count} times"},"secrets.neverUsed":"Never used","secrets.grants":"Bots that can use it","secrets.noBots":"No Bots yet.","secrets.addBots":"Add Bots","secrets.noGrants":"No Bot can use it yet.","secrets.searchBots":"Search Bots","secrets.noMatch":"No matching Bots","secrets.allGranted":"Every Bot can already use it.","secrets.revoke":"Remove {name}","secrets.onceTag":"This time only","secrets.edit":"Edit secret","secrets.uses":"Recent uses","secrets.noUses":"No uses yet.","secrets.deletedBot":"Deleted Bot","secrets.useCommand":"Command","secrets.useSsh":"SSH signature","secrets.delete":"Delete secret","secrets.deleteTitle":"Delete {name}?","secrets.deleteBody":"Bots that were granted it can no longer use it. Its use history is kept.","secrets.deleteConfirm":"Delete","secrets.masterKey":"Master key","secrets.keyFile":"Location","secrets.keyHint":"Copy this file too when you back up or move Jarvy; without it, secrets and API keys must be entered again.","secretCard.title":"Request to use the secret {name}","secretCard.valuePlaceholder":"Paste or type the value","secretCard.insecure":"This connection isn't encrypted, so others on the same network could see the value. Switch to HTTPS before entering it.","secretCard.exists":"This secret is already saved in Settings › Secrets.","secretCard.replace":"Replace value","secretCard.keepValue":"Use the saved value","secretCard.unreadable":"The saved value can't be decrypted. Enter it again.","secretCard.value":"Value","secretCard.valueHint":"It's saved encrypted in Settings › Secrets and never shown in the chat.","secretCard.scope":"How long the Bot can use it","secretCard.always":"Always allow","secretCard.alwaysHint":"Until you remove it in Settings › Secrets","secretCard.once":"This time only","secretCard.onceHint":"Ends when the Bot finishes its current task","secretCard.allow":"Allow","secretCard.saveAllow":"Save and allow","secretCard.decline":"Decline","secretCard.allowedAlways":"Allowed {name}. You can remove it in Settings › Secrets","secretCard.allowedOnce":"Allowed {name} this time only","secretCard.declined":"Declined {name}","secretCard.ignored":"Ignored the request for {name}","error.secretNameInvalid":"Use capital letters, digits and underscores, starting with a letter.","error.secretNameTaken":"Another secret already has this name.","error.secretValueMissing":"Enter a value.","error.secretValueTooLong":"The value is too long. The limit is 16 KB.","error.secretDescriptionInvalid":"The description must be a single line of up to 200 characters.","error.secretMissing":"Can't find this secret. It may have been deleted.","error.credentialUnreadable":"The saved API key can't be decrypted. Enter it again in Settings › Models.","access.secrets":"Secrets","access.searchSecrets":"Search secrets","access.searchMachines":"Search environments","access.noSecrets":"No secrets granted.","access.noMachines":"No external environments granted.","access.noMatch":"No matches","access.allSecrets":"Every secret is granted.","access.allMachines":"Every external environment is granted.","access.noSecretsYet":"No secrets yet.","access.newSecret":"New secret","access.noMachinesYet":"No external environments yet.","access.loadFailed":"Couldn't load access."},O7={"machines.add":"Add machine","machines.host":"Host","machines.hostPlaceholder":"192.168.1.20 or dev.example.com","machines.port":"Port","machines.user":"User","machines.name":"Name","machines.directory":"Start directory","machines.description":"Description","machines.descriptionPlaceholder":"Purpose, installed software, things to note","machines.directoryPlaceholder":"Home","machines.next":"Next","machines.scanning":"Connecting…","machines.fingerprint":"Host fingerprint","machines.fingerprintHint":"Check it against ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on that machine before going on.","machines.password":"Password","machines.passwordHint":"Used to install the key Jarvy generates. If the machine doesn't support key login, the password is stored encrypted and used to log in.","machines.byPassword":"Password","machines.byKey":"Public key","machines.publicKey":"Public key","machines.keyHint":"Add it to ~/.ssh/authorized_keys for {user}, then verify.","machines.copy":"Copy","machines.copied":"Copied","machines.verify":"Verify and add","machines.verifying":"Verifying…","machines.login":"Login","machines.loginKey":"Key","machines.loginPassword":"Password","machines.passwordLogin":"This machine doesn't support key login, so the saved password is used. Enable PubkeyAuthentication to switch to key login.","machines.newPassword":"New password","machines.updatePassword":"Update password","machines.passwordUpdated":"Password updated.","machines.useKey":"Switch to key login","machines.usingKey":"Switched to key login. The saved password was deleted.","machines.stillPassword":"This machine still doesn't accept Jarvy's key.","machines.connect":"Connect and add","machines.connecting":"Adding…","machines.back":"Back","machines.check":"Check fingerprint","machines.checking":"Checking…","machines.unchanged":"The fingerprint hasn't changed.","machines.changed":"The machine now shows a different fingerprint. If it was reinstalled or replaced, check the new one and accept it; otherwise something may be posing as it.","machines.trust":"Accept new fingerprint","machines.delete":"Delete machine","machines.deleteTitle":"Delete {name}?","machines.deleteBody":"Jarvy's key is removed from the machine first. Bots working there go back to their default environment.","machines.deleteConfirm":"Delete","machines.forceTitle":"Can't reach {name}","machines.forceBody":"Jarvy's key stays in ~/.ssh/authorized_keys there, on the line ending in {comment}; you can remove it later. Delete anyway?","machines.forceConfirm":"Delete anyway","machineCard.title":"Request to add {name}","machineCard.existing":"This machine is already in Environments.","machineCard.add":"Connect and add","machineCard.allow":"Allow","machineCard.decline":"Decline","machineCard.added":"Added {name}","machineCard.granted":"Allowed {name}","machineCard.declined":"Declined to add {name}","machineCard.ignored":"Ignored the request for {name}","environment.awayMachine":"Using {name}","error.machineMissing":"This machine wasn't found. It may have been deleted.","error.machineNameTaken":"Another machine already has this name.","error.sshPasswordMissing":"Enter the password.","error.sshKeyUnreadable":"This machine's key can't be decrypted with the current master key. Delete the machine and add it again.","error.sshBadHost":"The host must be a host name or an IP address.","error.sshBadUser":"Enter a user name on that machine.","error.sshBadPort":"The port must be 1–65535.","error.sshBadDirectory":"The start directory must be an absolute path or start with ~/.","error.sshAuthFailed":"Incorrect user name or password.","error.sshPasswordRefused":"This machine doesn't support password login. Use a public key instead.","error.sshKeyRefused":"This machine didn't accept Jarvy's public key. Make sure it's in ~/.ssh/authorized_keys and that sshd has PubkeyAuthentication enabled.","error.sshKeyExpired":"This public key is no longer valid. Get a new one and add it to the machine.","error.sshUnreachable":"Can't reach this machine. Check the host, port and network.","error.sshHostKeyChanged":"The machine shows a different fingerprint from the accepted one, so Jarvy didn't connect.","error.sshUnsupported":"Only Linux and macOS are supported for now.","error.sshFailed":"SSH failed: {detail}"},D7={"tasks.title":"Scheduled tasks","tasks.empty":"No scheduled tasks","tasks.add":"New task","tasks.edit":"Edit","tasks.delete":"Delete","tasks.deleteTitle":"Delete “{name}”?","tasks.deleteBody":"It won't run again. To stop it for a while, turn it off instead.","tasks.toggle":"Turn {name} on or off","tasks.next":"Next {time}","tasks.paused":"Off","tasks.done":"Done","tasks.newTitle":"New task","tasks.editTitle":"Edit task","tasks.name":"Name","tasks.namePlaceholder":"Morning news","tasks.instruction":"What to do","tasks.instructionPlaceholder":"Read the front pages of the news sites I follow and send me the three stories worth reading, with a line on each.","tasks.when":"When","tasks.kind.once":"Once","tasks.kind.every":"Repeat","tasks.kind.daily":"Daily","tasks.kind.weekly":"Weekly","tasks.at":"Date and time","tasks.everyCount":"Every","tasks.unit.minutes":"minutes","tasks.unit.hours":"hours","tasks.time":"Time","tasks.weekday":"Day","tasks.minimum":"5 minutes at the least.","tasks.saveFailed":"Couldn't save the task","tasks.changeFailed":"Couldn't change the task","tasks.loadFailed":"Couldn't load the tasks","tasks.schedule.once":"Once, {time}","tasks.schedule.minutes":{one:"Every minute",other:"Every {count} minutes"},"tasks.schedule.hours":{one:"Every hour",other:"Every {count} hours"},"tasks.schedule.daily":"Daily at {time}","tasks.schedule.weekly":"Every {day} at {time}","error.taskTimePast":"That time has already passed. Pick a time in the future.","error.taskScheduleInvalid":"Check the schedule: every 5 minutes at the least, and a valid time of day.","error.taskInvalid":"Give the task a name and say what to do."},L7={"ports.title":"Port forwarding","ports.empty":"No forwarded ports","ports.open":"Open {name}","ports.port":"Port {port}","ports.from":"Forwarded from port {port} in the sandbox","ports.link":"Link","ports.linkOther":"Other address","ports.copy":"Copy link","ports.state":"State","ports.state.live":"Running","ports.state.local":"Local only","ports.state.idle":"Not listening","ports.state.stopped":"Sandbox stopped","ports.state.unknown":"Unknown state","ports.hint.local":"The service listens only on 127.0.0.1 in the sandbox and can't be reached through the link. Ask the Bot to listen on 0.0.0.0.","ports.hint.idle":"No service in the sandbox listens on this port.","ports.hint.stopped":"The link works once the sandbox starts.","ports.stop":"Stop forwarding","ports.stopTitle":"Stop forwarding “{name}”?","ports.stopBody":"Its link stops working. The service keeps running in the sandbox.","ports.loadFailed":"Couldn't load the forwarded ports.","ports.changeFailed":"Couldn't stop forwarding the port.","ports.range":"Forwarding ports","ports.rangeHint":"When a Bot publishes a port, Jarvy forwards it from a port in this range. Ports already forwarded keep theirs.","ports.rangeFrom":"From","ports.rangeTo":"To","ports.rangeSaved":"Saved","error.portInvalid":"That port can't be forwarded.","error.portMissing":"That port isn't forwarded.","error.portRangeInvalid":"Use ports from 1024 to 65535, the first no larger than the last, at most 1000 of them.","error.portRangeOwn":"The range can't include Jarvy's own port.","error.portsExhausted":"No free port left in {from}–{to}. Widen the range in Settings › Network."},B7={"inputs.someone":"Someone","inputs.aChat":"a chat","inputs.message":"{person} · {chat}: {text}","inputs.task":"Task “{name}”: {text}","inputs.reaction":"{person} reacted {emoji} to: {text}","inputs.notice":"{person} updated the notice of {chat} (version {version})","inputs.summary":"{person} updated the summary of {chat} (version {version})","inputs.change":"{person} changed its {what}","inputs.onboard":"First start: {person} has just given it a model","inputs.followed":{one:"Its conversation was compacted; it follows {count} thread",other:"Its conversation was compacted; it follows {count} threads"},"inputs.instructions":"Its instructions changed: {parts}","inputs.more":{one:"{count} in all",other:"{count} in all"},"inputs.raw":"Raw text","inputs.replyTo":"Replying to {person}","inputs.taskTitle":"Scheduled task “{name}”","inputs.due":"due {time}","inputs.reacted":"{person} reacted {emoji}","inputs.unreadThreads":{one:"{count} unread",other:"{count} unread"},"inputs.unread":{one:"{count} unread: {list}",other:"{count} unread: {list}"},"inputs.unreadNotes":"Not read yet: {list}","inputs.version":"{title} (version {version})","inputs.place":"Environment: {name} · {directory}","inputs.sandbox":"Sandbox","inputs.unavailable":"File and command tools were unavailable then","inputs.what.name":"name","inputs.what.description":"description","inputs.what.persona":"persona","inputs.what.model":"model","inputs.what.thinking":"thinking level","inputs.what.run":"run state","inputs.what.environment":"working environment","inputs.what.access":"environment access"},I7={"botCard.agent":"Agent","botCard.state":"State","botCard.worksIn":"Works in","botCard.sandbox":"Sandbox","botCard.onMachine":"Machine {name}","botCard.message":"Message","botCard.info":"Bot info","botCard.open":"Open {name}'s card"},P7={...C7,...N7,...E7,...T7,...M7,...A7,..._7,...R7,...z7,...O7,...D7,...L7,...B7,...I7},H7={"locale.name":"中文","locale.short":"中","common.close":"关闭","common.continue":"继续","common.failed":"操作失败,请重试。","common.listSeparator":",","login.subtitle":"登录以继续","login.form":"登录","login.username":"用户名","login.password":"密码","login.showPassword":"显示密码","login.hidePassword":"隐藏密码","login.submit":"登录","login.submitting":"正在登录…","login.wrong":"用户名或密码不正确。","login.tooMany":"尝试次数过多,请稍后再试。","login.offline":"无法连接到 Jarvy,请检查网络后重试。","login.themeLight":"切换为浅色主题","login.themeDark":"切换为深色主题","general.language":"语言","general.theme":"主题","general.light":"浅色","general.dark":"深色","about.tagline":"你和 AI Bot 一起工作的群聊,完整运行在你自己的电脑上。","about.version":"版本 {version}","about.source":"源代码","about.package":"npm 包","about.license":"许可证","about.notices":"第三方声明","status.signedIn":"已登录","status.signedOut":"未登录","status.configured":"已配置","status.notConfigured":"未配置","account.menu":"账户菜单","account.menuFor":"{name} 的账户菜单","account.toggleTheme":"切换主题","account.signOut":"退出登录","entry.menu":"会话操作","entry.pin":"置顶","entry.unpin":"取消置顶","entry.mute":"免打扰","entry.unmute":"取消免打扰","entry.botInfo":"Bot 信息","entry.channelInfo":"频道信息","entry.deleteBot":"删除 Bot","entry.deleteChannel":"删除频道","hint.reaction":"{actor} 用 {emoji} 回应了你的消息","hint.reactionInThread":"{actor} 用 {emoji} 回应了你在「{title}」中的消息","hint.threadSummary":"{actor} 更新了线程「{title}」的摘要","hint.summary":"{actor} 更新了线程摘要","hint.notice":"{actor} 更新了公告","app.connecting":"正在连接 Jarvy…","app.channelDeleted":"频道已删除","app.botDeleted":"{name} 已删除","app.notInChannel":{one:"{names} 不在本频道,没有收到通知",other:"{names} 不在本频道,没有收到通知"},"app.memberAdded":"{name} 已加入 #{channel}","app.sourceGone":"原消息已不存在","ui.closeNamed":"关闭{name}","ui.copied":"已复制","ui.copyFailed":"复制失败","ui.copyCode":"复制代码","ui.image":"[图片:{alt}]","ui.imageHidden":"外部图片已隐藏","app.deleteChannelTitle":"删除频道 #{name}","app.deleteChannelBody":"频道里的消息、线程和附件都会被删除,且无法恢复。","app.resizePane":"拖动调整侧栏宽度","common.cancel":"取消","common.save":"保存","common.create":"创建","common.delete":"删除","common.retry":"重试","common.back":"返回","common.add":"添加","common.saveFailed":"保存失败","common.openNav":"打开会话列表","common.you":"你","common.member":"成员","common.noMatch":"没有匹配的成员","common.searchMembers":"搜索成员","common.attachment":"[附件]","actions.reply":"回复这条消息","actions.react":"添加表情回应","actions.pickEmoji":"选择表情","actions.recent":"最近使用","actions.searchEmoji":"搜索表情","actions.noEmoji":"没有找到表情","actions.emoji.Smileys & Emotion":"表情和情绪","actions.emoji.People & Body":"人物和手势","actions.emoji.Animals & Nature":"动物和自然","actions.emoji.Food & Drink":"食物和饮料","actions.emoji.Travel & Places":"旅行和地点","actions.emoji.Activities":"活动","actions.emoji.Objects":"物品","actions.emoji.Symbols":"符号","actions.emoji.Flags":"旗帜","actions.fold":"折叠成一行","actions.unfold":"取消折叠","fold.folded":"已折叠","fold.more":"展开全文","fold.less":"收起","dialogs.candidates":"可添加的成员","dialogs.allInside":"所有成员都已在频道中","dialogs.addCount":"添加({count})","dialogs.addFailed":"添加成员失败","dialogs.optional":"可选","dialogs.deleteSection":"删除分组「{name}」?其中的频道会移到「频道」下。","dialogs.deleteFailed":"删除失败,请重试","dialogs.editSection":"编辑频道分组","dialogs.sectionName":"分组名称","dialogs.newSection":"新分组","api.offline":"无法连接到 Jarvy,请检查网络后重试。","api.historyFailed":"无法加载聊天记录,请重试。","error.autoconfigModel":"请填写模型 ID。","error.autoconfigSource":"所选的配置来源无效,请重新选择。","error.botMissing":"找不到这个 Bot,它可能已被删除。","error.agentUndeletable":"主 Bot 不能删除,但可以改名或停止。","error.chatAccessChanged":"你在这个聊天中的权限已变化,请刷新后重试。","error.computerFailed":"沙箱启动失败。","error.computerMissing":"这个 Bot 没有沙箱。","error.dockerUnavailable":"运行 Jarvy 的电脑上没有可用的 Docker。","error.fileTooLarge":"附件不能超过 {limit}。","error.connectionMissing":"找不到这个模型连接,它可能已被删除。","error.credentialChanged":"凭证已更改,请重试。","error.credentialScope":"凭证连接不匹配。","error.credentialsMissing":"请先配置此模型连接的凭证。","error.dataLocked":"Jarvy 已经在运行,或数据目录被其他程序占用。","error.discoveryFormat":"这个地址返回的不是所选协议的模型列表,请检查 API URL 和协议。","error.discoveryHttp":"获取模型失败:HTTP {status}。","error.discoveryKey":"请填写 API Key。","error.discoveryProtocol":"所选协议不支持获取模型列表,请手动添加模型。","error.discoveryUrl":"API URL 无效。","error.discoveryUrlMissing":"请填写 API URL。","error.historyMissing":"找不到这条 History 记录。","error.invalidCredential":"凭证格式无效。","error.invalidRun":"Bot 的状态刚刚变化,请刷新后重试。","error.loginInput":"请填写授权码或回调地址。","error.loginOption":"请选择登录方式。","error.loginStep":"登录步骤已变化,请重新开始。","error.loginFailed":"登录操作失败,请刷新后重试。","error.messageMissing":"找不到这条消息,它可能已被删除。","error.modelIncomplete":"请补全模型的上下文窗口和最大输出。","error.modelMissing":"找不到这个模型,它可能已被移除。","error.modelRequestFailed":"模型请求失败:{detail}","error.modelRequired":"请先为 Bot 选择模型。","error.modelSwitchUncertain":"模型切换未完成,请重新选择模型。","error.nameTaken":"名称已被其他成员使用。","error.providerNameTaken":"已有同名的 Provider。","error.resetCustom":"自定义 Provider 没有系统默认的模型,无法重置。","error.connectionInUse":"{bots} 正在使用这个 Provider 的模型,请先换成其他模型再删除。","error.questionClosed":"问题已结束。","error.questionExpired":"这个问题已忽略,Bot 不再等待回答。","error.runtimeFailed":"Bot 运行失败,请检查它的模型设置后重试。","error.sessionCorrupt":"Bot 启动失败(会话文件无法读取)。","error.sessionMismatch":"Bot 启动失败(会话文件不匹配)。","error.sessionMissing":"Bot 启动失败(会话文件缺失)。","error.sessionPath":"Bot 启动失败(会话文件路径无效)。","error.stopping":"Jarvy 正在关闭,请稍后再试。","error.thinkingFormat":"不支持此思考格式。","error.toolsMissing":"Bot 的工具加载失败,请重启 Bot 后重试。","error.unsafeReplay":"上次中断时 Bot 可能已经执行了操作,为避免重复,不会自动重试。","error.discoveryUnreachable":"无法连接 {host},请检查 API URL。","color.gray":"灰","color.blue":"蓝","color.green":"绿","color.amber":"琥珀","color.rose":"粉","color.violet":"紫","avatar.working":"工作中","avatar.openInfo":"查看 {name} 的 Bot 信息"},q7={"settings.title":"设置","settings.sections":"设置分类","settings.general":"通用","settings.models":"模型","settings.usage":"用量","settings.network":"网络","settings.secrets":"密钥","settings.about":"关于","group.custom":"自定义 API","group.subscription":"订阅服务","group.apiKey":"API Key","models.add":"添加 Provider","models.empty":"还没有模型连接","models.count":{one:"{count} 个模型",other:"{count} 个模型"},"models.none":"尚未添加模型","picker.back":"返回模型页面","picker.search":"搜索 Provider","picker.searchPlaceholder":"搜索 Provider…","picker.keyHint":{one:"API Key · {count} 个模型",other:"API Key · {count} 个模型"},"picker.loading":"正在加载 Provider…","picker.retry":"重试","picker.noMatch":"没有匹配的 Provider","editor.back":"返回 Provider 列表","editor.delete":"删除 Provider","editor.connection":"连接","editor.providerName":"Provider 名称","editor.name":"连接名称","editor.protocol":"API 协议","editor.url":"API URL","editor.defaultUrl":"使用 Provider 默认地址","editor.key":"API Key","editor.keyPlaceholder":"输入 API Key","editor.keySaved":"已保存,留空则不修改","editor.settings":"连接设置","editor.models":"模型列表","editor.selected":"已选 {selected} / {total}","editor.fetch":"获取模型列表","editor.fetching":"正在获取…","editor.fetched":{one:"获取到 {count} 个模型",other:"获取到 {count} 个模型"},"editor.noneReturned":"此端点没有返回模型","editor.fetchFailed":"获取模型列表失败","editor.loadingCatalog":"正在加载模型目录…","editor.autoSelected":"自动配置已选","editor.addManually":"手动添加","editor.filter":"筛选模型","editor.filterPlaceholder":"筛选模型…","editor.selectVisible":"全选当前结果","editor.empty":"还没有模型","editor.emptyCustom":"获取模型列表,或手动添加模型。","editor.emptyBuiltin":"可以手动添加模型。","editor.autoSummary":"{parts};保存后生效","editor.autoMatched":{one:"已配置 {count} 个",other:"已配置 {count} 个"},"editor.autoChoose":{one:"{count} 个需选择来源",other:"{count} 个需选择来源"},"editor.autoNone":{one:"{count} 个在目录中未找到",other:"{count} 个在目录中未找到"},"editor.autoFailed":{one:"{count} 个失败",other:"{count} 个失败"},"editor.confirmDelete":"删除「{name}」及其模型?","editor.deleteFailed":"删除失败","editor.saveFailed":"保存未完成","editor.saved":"已保存","editor.reset":"重置模型","editor.resetTitle":"将模型重置为系统默认?","editor.resetModels":{one:"{count} 个模型将恢复为系统默认设置。",other:"{count} 个模型将恢复为系统默认设置。"},"editor.resetRemoves":{one:"{count} 个不在系统默认中的模型将被移除:{names}。",other:"{count} 个不在系统默认中的模型将被移除:{names}。"},"editor.resetBots":{one:"{bots} 正在使用将被移除的模型,重置后需要重新选择模型。",other:"{bots} 正在使用将被移除的模型,重置后需要重新选择模型。"},"editor.resetKeeps":"API URL 和协议将恢复默认,登录信息和 API Key 会保留。未保存的修改将被丢弃。","editor.resetConfirm":"重置","editor.resetDone":"已重置为系统默认","editor.resetFailed":"重置失败","editor.saving":"正在保存…","editor.save":"保存","card.defaultProtocol":"使用 Provider 默认协议","card.modelId":"模型 ID","card.modelName":"模型名称","card.optional":"可选","card.newModel":"新模型","card.enterId":"填写模型 ID","card.use":"使用 {name}","card.remove":"移除 {name}","card.image":"图片","card.reasoning":"推理","card.capabilities":"能力","card.reasoningThinking":"推理 / 思考","card.imageInput":"图片输入","card.specs":"模型规格","card.hidePrices":"收起价格","card.editPrices":"编辑价格","card.context":"上下文窗口 · tokens","card.maxOutput":"最大输出 · tokens","card.costTitle":"每百万 tokens 价格","card.costInput":"输入","card.costOutput":"输出","card.costCacheRead":"缓存读取","card.costCacheWrite":"缓存写入","card.notProvided":"未提供","card.advanced":"高级设置","card.apiOverride":"指定 API 协议","card.headers":"请求头","card.headerSaved":"已保存,留空则不修改","card.addHeader":"添加请求头","card.removeHeader":"移除请求头","card.compat":"兼容参数 · compat","card.jsonObject":"请输入 JSON 对象","auto.run":"自动配置","auto.pending":"正在配置…","auto.failed":"自动配置失败","auto.tagChoose":"需选择配置来源","auto.tagNone":"目录中未找到","auto.official":"原厂","auto.matched":"已按 {source}{note} 填入配置{suffix}","auto.reseller":"(来自转售目录,非原厂)","auto.applied":";保存后生效。","auto.apiMismatch":"目录中此模型使用 {api} 协议,与当前协议不同,思考格式和兼容参数未填入。","auto.changeSource":"更换来源","auto.multiple":"同名模型有多个原厂来源,请选择:","auto.similar":"目录中没有 {modelId},以下是相似模型:","auto.notFound":"目录中没有找到此模型,请手动填写。","thinking.title":"思考","thinking.format":"思考格式","thinking.protocolDefault":"协议默认","thinking.onlyCompletions":"仅 OpenAI Chat Completions 协议使用","thinking.levels":"思考档位","thinking.level.off":"关闭","thinking.level.minimal":"极低","thinking.level.low":"低","thinking.level.medium":"中","thinking.level.high":"高","thinking.level.xhigh":"超高","thinking.level.max":"最高","thinking.levelName":"{level}档位","thinking.levelValue":"{level}档位发送值","thinking.supportedDefault":"支持(默认值)","thinking.unsupported":"不支持","thinking.supportedCustom":"支持,发送指定值","thinking.supported":"可选档位:{levels}","auth.title":"账户授权","auth.running":"正在授权","auth.openPage":"打开授权页面","auth.code":"验证码:{code}","auth.browser":"浏览器登录(OAuth)","auth.deviceCode":"设备码登录","auth.redirectFull":"完整回调地址","auth.redirectOrCode":"授权码或回调地址","auth.manualNote":"完成授权后若未自动返回,请粘贴回调地址。","auth.waiting":"等待授权完成…","auth.cancel":"取消授权","auth.configureCredential":"配置凭证","auth.signInAgain":"重新登录","auth.signIn":"登录账户","auth.removeCredential":"移除凭证","auth.signOut":"退出登录","auth.statusFailed":"无法获取登录状态","auth.refresh":"刷新状态","auth.antigravityRisk":"通过第三方应用使用 Antigravity 可能违反 Google 服务条款,账号有被停用的风险。","picker.loadFailed":"无法加载 Provider 列表"},F7={"rail.label":"导航","rail.chats":"会话","rail.environments":"环境","home.talk":"和 {name} 聊天","home.recent":"最近的消息","home.openDm":"在私聊中打开","home.call.reply":"有新回复","home.call.ask":"在等你回答","home.call.error":"上一轮运行出错","home.failed":"这一轮出错了:{reason}","home.answerInDm":"去私聊中回答","sidebar.label":"会话列表","sidebar.create":"打开新建菜单","sidebar.createMenu":"新建菜单","sidebar.newChannel":"新建频道","sidebar.newSection":"新建频道分组","sidebar.newBot":"新建 Bot","sidebar.alerts":"{count} 条发给你的未读","sidebar.unread":"{count} 条未读","sidebar.said":"{name}:{text}","sidebar.atMe":"[有人@我]","sidebar.more":"{name} 的更多操作","sidebar.asking":"(等你回答)","sidebar.working":"(工作中)","sidebar.pinned":"已置顶","sidebar.muted":"免打扰","sidebar.hasUnread":"有未读","sidebar.editSection":"编辑分组:{name}","sidebar.search":"搜索会话和消息","sidebar.results":"搜索结果","sidebar.chats":"会话","sidebar.nav":"频道与私信","sidebar.followed":"我关注的线程","sidebar.channels":"频道","sidebar.dms":"私信","sidebar.noDms":"暂无私信","search.title":"搜索","search.paneLabel":"聊天内搜索","search.inThread":"本线程","search.inDm":"本私信","search.close":"关闭搜索","search.placeholder":"搜索消息","search.channelPlaceholder":"搜索本频道及其线程中的消息","search.prompt":"输入关键词","search.searching":"正在搜索…","search.noMessages":"没有找到消息","search.count":{one:"{count} 条,最新在前",other:"{count} 条,最新在前"},"search.countLatest":"显示最近 {count} 条","search.showAll":"查看全部 {count} 条","search.threads":"线程","search.channels":"频道(主题与公告)","search.messages":"消息","search.channel":"频道","member.unknown":"未知成员","member.deleted":"{name}(已删除)","members.view":"查看 {name}","members.remove":"移出 {name}","members.more":"{name} 的更多操作","members.menu":"成员操作","members.creator":"创建者","members.admin":"管理员","members.makeAdmin":"设为管理员","members.removeAdmin":"取消管理员","members.removeFromChannel":"移出频道","members.count":{one:"{count} 位成员",other:"{count} 位成员"},"members.people":"用户","members.removeTitle":"把 {name} 移出 #{channel}","members.removeBody":"移出后,对方将无法再收到此频道的消息。","members.removeConfirm":"移出","chat.area":"对话区域","chat.botDms":"{name} 与其他 Bot 的私信","chat.botStatus":"Bot 状态","chat.transcript":"聊天记录","chat.loading":"正在加载…","chat.empty":"暂无消息","chat.start":"与 {name} 开始对话","chat.loadingOlder":"正在加载更早的消息…","chat.toLatest":"回到最新消息","chat.unseen":{one:"{count} 条新消息",other:"{count} 条新消息"},"chat.toChannel":"发消息到 #{name}","chat.toBot":"发消息给 {name}…","chat.pickModel":"为这个 Bot 选择模型后才能发消息","chat.pick":"选择一个会话","channel.infoFor":"频道信息:{name}","channel.membersCount":{one:"成员 {count}",other:"成员 {count}"},"channel.members":"成员","channel.search":"搜索频道消息(Ctrl+F)","channel.threads":"线程","notice.title":"公告","notice.edit":"编辑公告","notice.content":"公告内容","notice.none":"暂无公告","notice.version":"第 {version} 版","chat.newBelow":"以下为新消息","chat.today":"今天","chat.yesterday":"昨天","channel.echo":"回复了线程「{title}」","channel.replies":{one:"{count} 条回复",other:"{count} 条回复"},"channel.threadDone":"已完成","channel.lastReply":"最后回复 {time}","channel.replyInThread":"在线程中回复","info.edit":"编辑{name}","info.memberList":"成员列表","info.back":"返回频道信息","info.addMembers":"添加成员","info.name":"名称","info.newChannel":"新频道","info.topic":"主题","info.noTopic":"暂无主题","info.section":"分组","info.menu":"频道","info.noSection":"无","mention.menu":"提及成员","mention.inThread":"线程中","mention.inChannel":"频道其他成员","mention.outside":"不在本频道中","mention.outsideList":"不在本频道中的成员","mention.searchOutside":"搜索不在本频道中的成员","mention.invites":"选择后会把对方加入本频道","quote.inline":"「{text}」","quote.by":"{name}:","quote.remove":"移除引用:{text}","quote.tooMany":"一条消息最多引用 {count} 段","quote.selection":"选中的文字","quote.copy":"复制","quote.quote":"在回复中引用","ref.label":"{name} 的消息:{text}","ref.dm":"私聊 · {title}","ref.open":"查看消息","composer.busy":"附件上传中,请稍后再添加。","composer.tooMany":"每条消息最多添加 {count} 个附件。","composer.size":"附件不能为空,也不能超过 {limit}。","composer.pasted":"粘贴图片","composer.removeFile":"移除附件:{name}","composer.uploading":"正在上传:{name}","composer.cancelUpload":"取消上传:{name}","composer.replying":"回复","composer.cancelReply":"取消回复","composer.drop":"松开以添加附件","composer.attach":"添加附件","composer.input":"输入消息","composer.send":"发送消息","files.preview":"预览 {name}","files.download":"下载 {name}","files.gone":"附件不存在或已被删除","files.readFailed":"无法打开文件({status})","files.readError":"无法打开文件","files.kindImage":"图片","files.kindSvg":"SVG","files.kindHtml":"HTML","files.kindMarkdown":"Markdown","files.kindText":"文本","files.kindFile":"文件","files.downloadFile":"下载文件","files.showPreview":"预览","files.showSource":"源码","files.showText":"原文","files.openTab":"在新标签页中打开(隔离运行)","files.narrow":"收起预览","files.widen":"扩大预览","files.closePreview":"关闭附件预览","files.running":"脚本正在隔离环境中运行:可以联网,但无法读取 Jarvy 的数据。","files.scripts":{one:"这个 HTML 含有 {count} 段脚本{hosts},当前未运行。运行后脚本可以联网,但无法读取 Jarvy 的数据。",other:"这个 HTML 含有 {count} 段脚本{hosts},当前未运行。运行后脚本可以联网,但无法读取 Jarvy 的数据。"},"files.scriptHosts":"(引用 {hosts})","files.andMore":" 等","files.stop":"停止脚本","files.run":"运行脚本","files.downloadToView":"此文件请下载后查看","files.tooLarge":"文件超过 1 MB,无法在页面内预览。","files.unsupported":"此文件不支持在页面内预览。","files.reading":"正在读取文件…","files.runningTitle":"{name}(运行中)","files.previous":"上一个附件","files.choose":"选择预览文件","files.next":"下一个附件","question.failed":"提交失败","question.dismissed":"已忽略","question.chose":"已选:{answer}","question.dismissLabel":"关闭问题,不回答","question.dismiss":"跳过","question.multiple":"可多选","question.note":"补充说明(可选)","question.own":"或者自己填写…","question.ownLabel":"自己填写回答","question.confirmCount":"确定({count})","question.confirm":"确定","question.send":"发送","directs.back":"返回列表","directs.between":"{name} 与 {other}","directs.readOnly":"只读","files.kindVideo":"视频","files.kindAudio":"音频","files.cantPlay":"当前浏览器无法播放","files.cantPlayHint":"下载后用播放器打开。"},U7={"threadSort.title":"排序","threadSort.current":"排序:{order}","threadSort.updated":"最近更新","threadSort.created":"创建时间","threadSort.status":"状态","threads.list":"线程列表","threads.closeList":"关闭线程列表","threads.byStatus":"按状态筛选","threads.openCount":"进行中 {count}","threads.doneCount":"已完成 {count}","threads.all":"全部","threads.loading":"正在加载…","threads.loadFailed":"无法加载线程","threads.none":"暂无线程","threads.following":"已关注","threads.filter":"筛选","threads.unreadCount":"未读 {count}","threads.unread":"未读","threads.noneUnread":"暂无未读线程","threads.noneOpen":"暂无进行中的线程","threads.noneDone":"暂无已完成的线程","threads.notFollowing":"未关注","threads.pick":"选择一个线程","threads.open":"进行中","thread.rename":"修改标题","thread.title":"线程标题","thread.toggleStatus":"切换状态","thread.summary":"摘要","thread.editSummary":"编辑摘要","thread.conclude":"完成并把摘要发到 #{channel}","thread.addSummary":"添加摘要","thread.sourceElsewhere":"原消息不在这个线程里","thread.label":"线程","thread.backToList":"返回线程列表","thread.inChannel":"在频道中查看","thread.search":"搜索线程消息(Ctrl+F)","thread.followingHint":"新回复会计入未读","thread.notFollowingHint":"新回复不会计入未读","thread.follow":"关注","thread.expand":"展开","thread.collapse":"收起到侧栏","thread.close":"关闭线程","thread.conclusion":"结论:","thread.concluded":"已完成,摘要已发到 #{channel}","thread.noReplies":"暂无回复","thread.toLatest":"回到最新回复","thread.reply":"回复线程"},$7={"usage.title":"用量","usage.range":"时间范围","usage.today":"今天","usage.days":"{count} 天","usage.all":"全部","usage.refresh":"刷新","usage.refreshLabel":"刷新用量","usage.retry":"重试","usage.loading":"正在加载用量…","usage.loadFailed":"用量加载失败","usage.empty":"这段时间没有模型调用","usage.model":"模型","usage.calls":"调用","usage.input":"输入","usage.output":"输出","usage.cacheRead":"缓存读取","usage.cacheWrite":"缓存写入","usage.cost":"费用","usage.total":"合计","usage.byModel":"按模型","usage.byBot":"按 Bot","usage.unpriced":"未设置价格","usage.notePartial":"合计费用不含未设置价格的模型。","usage.noteCosts":"费用不含未设置价格的模型。","activity.error":"运行出错","activity.running":"运行中","activity.reasoning":"思考中","activity.texting":"回复中","activity.toolCalling":"使用工具","activity.asking":"等你回答","activity.noModel":"未设置模型","activity.idle":"空闲","activity.stopped":"未运行","bot.saved":"已保存","bot.changeFailed":"修改失败","bot.color":"形象颜色","bot.contextHint":"截至 Bot 上次回复时,模型报告的上下文占用","bot.contextStale":"最近一次模型请求异常,当前显示的是上一次请求成功时的上下文占用。","bot.context":"上下文","bot.unknown":"未知","bot.tokens":"{used} / {window} tokens","bot.description":"描述","bot.descriptionPlaceholder":"这个 Bot 能帮你做什么?","bot.personaPlaceholder":"Bot 的性格、职责与行为偏好","bot.personaHint":"下次开始工作时生效。","bot.unsaved":"有未保存的修改","bot.saving":"正在保存…","agent.title":"主 Bot","agent.intro":"{name} 是你的主 Bot,替你打理 Jarvy 本身。在私信或频道里跟它说一声,它就能:","agent.create":"新建 Bot,修改它们的名字、描述和 Persona","agent.model":"给 Bot 选模型和思考强度","agent.run":"启动、停止 Bot,查看用量","agent.delete":"删除 Bot、频道、频道分组,或把成员移出频道,每次都先弹卡片请你确认","bot.aborting":"正在中断…","bot.abort":"中断当前任务","bot.starting":"正在启动…","bot.stopping":"正在停止…","bot.start":"启动","bot.stop":"停止","bot.workspace":"工作区","bot.copyWorkspace":"复制工作区路径","bot.tab.overview":"概览","bot.tab.profile":"设定","bot.tab.environment":"环境","bot.tab.tasks":"任务","bot.tab.access":"授权","bot.tab.activity":"活动","bot.subscriptions":"订阅","bot.noSubscriptions":"暂无订阅","bot.threadIn":"线程 · #{channel}","botModel.auto":"使用默认强度","botModel.off":"关闭思考","botModel.minimal":"最少思考","botModel.low":"少量思考","botModel.medium":"适中思考","botModel.high":"更多思考","botModel.xhigh":"高强度思考","botModel.max":"最高强度思考","botModel.loadFailed":"无法加载模型列表","botModel.switchFailed":"切换模型失败","botModel.pick":"选择 Bot 模型","botModel.broken":"这个模型已不可用,请重新选择","botModel.choose":"选择模型","botModel.filter":"筛选 Bot 模型","botModel.filterPlaceholder":"筛选模型…","botModel.list":"Bot 模型","botModel.noMatch":"没有匹配的模型","botModel.none":"暂无模型,请先在设置中添加","botModel.manage":"管理模型","botModel.thinking":"思考强度","botModel.pickThinking":"选择思考强度","botModel.loading":"正在加载模型…","botModel.switching":"正在切换…","botModel.pickFor":"为 {name} 选择模型","deleteBot.title":"删除 {name}","deleteBot.after":"删除后:","deleteBot.chats":{one:"它的 {count} 个私信、频道成员身份和订阅都会被删掉。",other:"它的 {count} 个私信、频道成员身份和订阅都会被删掉。"},"deleteBot.messages":"它在频道和线程里发过的消息会保留,发送者显示为「{name}」,名字可以重新使用。","deleteBot.history":"它的会话历史和未完成的任务都会被清除。","deleteBot.files":"同时删除工作区文件夹","deleteBot.filesHint":"工作区里可能有它生成的文件,不勾选则保留。","deleteBot.deleting":"正在删除…","deleteBot.working":"正在处理…","history.reasoning":"思考","history.text":"正文","history.empty":"(空)","history.image":"History 中的图片","history.toolCall":"工具调用","history.toolResult":"工具结果","history.error":"出错","history.related":"查看关联记录 #{id}","history.result":"结果","history.call":"调用","history.details":"结构化结果","history.view":"记录显示方式","history.content":"内容","history.json":"原始 JSON","history.contentLabel":"记录内容","history.tools":"工具定义","history.toolsRemoved":"移除的工具","history.stopReason":"结束原因","activity.detailFailed":"无法加载记录","activity.detailLoading":"正在加载记录…","activity.openChat":"打开聊天","activity.sentBy":"发送调用 #{id}","activity.roleSystem":"系统","activity.roleUser":"输入","activity.roleAssistant":"助手","activity.timeline":"Bot 活动时间线","activity.chatMessage":"聊天发言 {id}","activity.viewMessage":"查看聊天消息 {sequence} · {chat}","activity.attachmentOnly":"附件消息","activity.attachments":{one:"{count} 个附件",other:"{count} 个附件"},"activity.viewSentBy":"查看发送调用 #{id}","activity.historyRecord":"History 记录 #{id}","activity.viewHistory":"查看 History #{id} · {role}","activity.emptyMessage":"(空消息)","activity.loadFailed":"活动记录加载失败","activity.backToTimeline":"返回时间线","activity.newestFirst":"最新记录在前","activity.refresh":"刷新活动历史","activity.reading":"正在加载…","activity.columnChat":"聊天","activity.columnTime":"时间","activity.loading":"正在加载活动记录…","activity.empty":"还没有活动记录","activity.newer":"较新","activity.page":"第 {page} 页","activity.older":"较早","activity.historyDetail":"History 记录详情","activity.chatDetail":"聊天记录详情","activity.toolCall":"调用 {name}","activity.toolResult":"{name} · 执行结果","activity.toolFailed":"{name} · 执行出错","activity.images":{one:"{count} 张图片",other:"{count} 张图片"},"bot.newName":"新 Bot","bot.newNameN":"新 Bot {n}"},V7={"npc.toolbar":"NPC 原型","npc.replay":"重播","npc.mood":"基础心情","npc.mood.normal":"普通","npc.mood.happy":"开心","npc.mood.sad":"难过","npc.mood.angry":"生气","npc.mood.dizzy":"晕","npc.poses":"动作","npc.pose.sleep":"睡觉","npc.pose.idle":"空闲","npc.pose.think":"思考","npc.pose.mutter":"自言自语","npc.pose.say":"对你说话","npc.pose.ask":"等你回答","npc.pose.read":"读文件","npc.pose.work":"改文件、跑命令","npc.pose.compact":"压缩上下文","npc.pose.busy":"重试","npc.pose.failed":"报错","npc.pose.done":"做完了","npc.pose.groom":"舔爪子","npc.expand":"展开过程","npc.collapse":"收起","npc.panel":"这一轮","npc.state.running":"进行中","npc.state.ok":"成功","npc.state.failed":"失败","npc.duration":"{value} 秒","npc.done":"做完了 · {duration}","npc.mutter":"({text})","npc.to":"→ {chat}","npc.step.think":"思考","npc.step.mutter":"自言自语","npc.step.read.running":"在读 {target}","npc.step.read.ok":"读了 {target}","npc.step.write.running":"在改 {target}","npc.step.write.ok":"改好了 {target}","npc.step.run.running":"在跑 {target}","npc.step.run.ok":"跑完了 {target}","npc.step.run.failed":"{target} 失败了","npc.step.compact.running":"在整理上下文","npc.step.compact.ok":"整理好了上下文","npc.step.ask.running":"在等你回答","npc.step.ask.ok":"你选了「{answer}」","npc.step.say.running":"在回复你","npc.step.say.ok":"回复了你","npc.step.post.running":"在发到 {chat}","npc.step.post.ok":"发到了 {chat}","npc.demo.think1":"fish 说线程面板打开时会跳一下。可能是滚动的时机不对。先看看 ThreadPane 是怎么滚动的。","npc.demo.think2":"它在回复还没量好高度时就滚了。改成布局之后再滚应该就好。回复数也要算进依赖里。","npc.demo.mutter1":"改好了,先跑一遍构建看看。","npc.demo.mutter2":"嗯……类型没过,ref 可能是空的。","npc.demo.channel":"研发","npc.demo.post":"线程面板打开时跳一下的问题修好了,构建通过,等 fish 确认。","npc.demo.question":"修好了。要不要顺便更新文档里的截图?","npc.demo.yes":"要,一起更新","npc.demo.no":"先不用","npc.demo.replyYes":"好了:线程面板现在打开就停在最新回复,不会再跳;文档里的截图也换成了新的。构建通过。","npc.demo.replyNo":"好了:线程面板现在打开就停在最新回复,不会再跳。构建通过,截图先没动。","npc.live.omitted":"……省略 {count} 字……","npc.live.tokens":"上下文:{before} → {after} tokens","npc.live.compact.running":"在整理上下文","npc.live.compact.ok":"整理好了上下文","npc.live.compact.failed":"整理上下文失败了","npc.live.retry.running":"在重试(第 {attempt}/{max} 次)","npc.live.retry.ok":"重试成功","npc.live.retry.failed":"重试失败了","npc.live.read.running":"在读 {target}","npc.live.read.ok":"读了 {target}","npc.live.read.failed":"没读到 {target}","npc.live.edit.running":"在改 {target}","npc.live.edit.ok":"改好了 {target}","npc.live.edit.failed":"没改成 {target}","npc.live.write.running":"在写 {target}","npc.live.write.ok":"写好了 {target}","npc.live.write.failed":"没写成 {target}","npc.live.run.running":"在跑 {target}","npc.live.run.ok":"跑完了 {target}","npc.live.run.failed":"{target} 失败了","npc.live.script.running":"在跑一段脚本","npc.live.script.ok":"跑完了一段脚本","npc.live.script.failed":"脚本出错了","npc.live.tool.running":"在用 {tool}","npc.live.tool.ok":"用了 {tool}","npc.live.tool.failed":"{tool} 出错了","npc.live.sendFailed":"消息没发出去","npc.live.switch.running":"在切换工作环境","npc.live.switch.ok":"切换了工作环境","npc.live.switch.failed":"没能切换工作环境","npc.live.askFailed":"问题没发出去","npc.live.askClosed":"问题关掉了","npc.live.answerBelow":"在下面的卡片里回答","npc.live.answerIn":"去 {chat} 里回答","npc.live.browse.running":"在翻看 {chat}","npc.live.browse.ok":"翻看了 {chat}","npc.live.browseAll.running":"在翻看聊天","npc.live.browseAll.ok":"翻看了聊天","npc.done.interrupted":"被打断了 · {duration}","npc.done.failed":"这一轮失败了 · {duration}"},G7={"environment.title":"工作环境","environment.own":"Docker 沙箱","environment.container":"容器","environment.image":"镜像","environment.mount":"工作区挂载点","environment.external":"外部环境","envs.sandboxOf":"{name} 的沙箱","envs.back":"全部环境","envs.workingHere":{one:"{names} 正在这里工作",other:"{names} 正在这里工作"},"environment.state.preparing":"准备中","environment.state.running":"运行中","environment.state.stopped":"已停止","environment.state.failed":"启动失败","environment.state.unavailable":"不可用","environment.unavailable":"{why},无法为 Bot 启动沙箱(无沙箱时,Bot 无法进行文件读写和命令执行等操作)。","environment.unavailable.missing":"当前环境没有安装 Docker","environment.unavailable.stopped":"当前环境的 Docker 服务未启动","environment.unavailable.denied":"当前环境无 Docker 权限","environment.unavailable.failed":"当前环境的 Docker 无法使用","environment.start":"启动","environment.starting":"正在启动…","environment.stop":"停止","environment.stopping":"正在停止…","environment.stopTitle":"停止 {name} 的沙箱?","environment.stopBody":"沙箱中运行的程序将被关闭,已安装的软件和工作区文件会保留。","environment.stopConfirm":"停止","environment.reset":"重置…","environment.resetTitle":"重置 {name} 的沙箱?","environment.resetBody":"沙箱中安装的软件将被清除,工作区文件会保留。","environment.resetConfirm":"重置","environment.resetBodyVm":"沙箱中安装的软件,以及其中 Docker 的镜像、容器和数据卷将被清除,工作区文件会保留。","environment.restartNote":"新的大小在沙箱下次启动后生效。","environment.restart":"现在重启","environment.restartTitle":"重启 {name} 的沙箱?","environment.restartBody":"沙箱中运行的程序将被关闭,已安装的软件和工作区文件会保留。","environment.restartConfirm":"重启","environment.type":"类型","environment.type.container":"容器","environment.type.vm":"虚拟机","environment.type.checking":"正在检查这台电脑能否运行虚拟机…","environment.type.unavailable":"这台电脑不能运行虚拟机沙箱:{why}。","environment.type.why.no_kata":"没有安装 Kata","environment.type.why.no_kvm":"没有 KVM","environment.type.why.busy":"硬件虚拟化正被其他虚拟机软件(如 VirtualBox)占用","environment.type.why.failed":"试运行虚拟机没有成功","environment.type.recheck":"重新检查","environment.type.vmTitle":"把 {name} 的沙箱换成虚拟机?","environment.type.vmBody":"沙箱会重新创建,里面可以直接用 Docker 和 Docker Compose。工作区文件会保留,沙箱中安装的软件会清除。第一次切换要先构建镜像,可能需要几分钟。","environment.type.containerTitle":"把 {name} 的沙箱换成容器?","environment.type.containerBody":"沙箱会重新创建。工作区文件会保留,沙箱中安装的软件,以及其中 Docker 的镜像、容器和数据卷会清除。","environment.type.confirm":"切换","environment.type.switching":"正在切换…","environment.limits":"资源上限","environment.limits.edit":"修改资源上限","environment.limits.none":"不限制","environment.limits.unlimited":"不限制","environment.limits.memory":"内存 {value}","environment.limits.cpu":"CPU {value}","environment.limits.cores":"{count} 核","environment.limits.oneCore":"1 核","environment.limits.memoryField":"内存(GB)","environment.limits.cpuField":"CPU(核)","environment.limits.machine":"本机 {cpus} 核 · {memory} GB","environment.limits.below":"低于当前占用的 {usage}。保存后,沙箱中的部分程序可能被结束。","environment.limits.failed":"无法修改资源上限","environment.limits.vm":"虚拟机大小","environment.limits.vmEdit":"修改虚拟机大小","environment.limits.vmDefault":"留空则用默认大小:4 GB、2 核。","environment.limits.vmLater":"沙箱正在运行,新的大小在下次启动后生效。","environment.usage.memory":"内存","environment.usage.cpu":"CPU","environment.usage.disk":"Docker 磁盘","environment.usage.machine":"{used} / 本机 {whole}","environment.usage.host":"占用本机 {value}","error.typeInvalid":"沙箱类型只能是容器或虚拟机。","error.vmSizeInvalid":"虚拟机的内存可设为 1–{memory} GB,CPU 可设为 1–{cpus} 核。","error.vmUnavailable":"这台电脑现在不能运行虚拟机沙箱。","error.limitsInvalid":"内存可设为 0.25–{memory} GB,CPU 可设为 0.1–{cpus} 核,或不限制。"},Y7={"connection.lan":"局域网访问","connection.localOnly":"仅限本机","connection.localOnlyHint":"Jarvy 目前只接受这台电脑上的访问。如需在局域网内的其他设备上使用,请用 {flag} 重新启动 Jarvy。","connection.addresses":"访问地址","connection.copy":"复制地址","connection.root":"安全证书","connection.download":"下载证书","connection.fingerprint":"SHA-256 指纹","connection.fingerprintSha1":"SHA-1 指纹","connection.howTo":"安装说明","connection.howMac":"Mac:打开证书将它添加到「钥匙串访问」,双击该证书,在「信任」中将「使用此证书时」设为「始终信任」。","connection.howWindows":"Windows:打开证书,点「安装证书」,选择「将所有的证书都放入下列存储」,再选「受信任的根证书颁发机构」。证书「详细信息」中的「指纹」就是上面的 SHA-1 指纹。","connection.howIos":"iPhone 和 iPad:在 Safari 中下载证书,前往「设置 › 通用 › VPN与设备管理」安装,再在「设置 › 通用 › 关于本机 › 证书信任设置」中针对它启用完全信任。","connection.howAndroid":"Android:下载证书后,在「设置」中搜索「CA 证书」并安装。不同手机的位置不同,通常在「安全」或「加密与凭据」里。","connection.howRestart":"装好后,完全退出浏览器再重新打开,新证书才会生效。","connection.allowHttp":"允许 HTTP 访问","connection.allowHttpHint":"密码和对话会明文传输,只在可信的网络中开启。","connection.insecure":"当前连接未加密,密码和对话内容可能被同一网络中的他人看到。","connection.useHttps":"切换到 HTTPS"},K7={"secrets.add":"添加密钥","secrets.empty":"还没有密钥","secrets.name":"名称","secrets.description":"说明","secrets.descriptionPlaceholder":"可选,例如用途","secrets.value":"值","secrets.newValue":"新值","secrets.newValuePlaceholder":"留空则不修改","secrets.showValue":"显示值","secrets.hideValue":"隐藏值","secrets.shortValue":"这个值少于 8 个字符,出现在 Bot 能看到的内容里时可能不会被隐藏。","secrets.noDescription":"无说明","secrets.grantCount":{one:"已授权 {count} 个 Bot",other:"已授权 {count} 个 Bot"},"secrets.notGranted":"未授权","secrets.unreadable":"无法解密","secrets.unreadableHint":"这个值是用另一个主密钥加密的,无法读取,请重新输入。","secrets.fingerprint":"指纹","secrets.updated":"更新于 {time}","secrets.usedCount":{one:"已使用 {count} 次",other:"已使用 {count} 次"},"secrets.neverUsed":"从未使用","secrets.grants":"可以使用的 Bot","secrets.noBots":"还没有 Bot。","secrets.addBots":"添加 Bot","secrets.noGrants":"还没有 Bot 可以使用它。","secrets.searchBots":"搜索 Bot","secrets.noMatch":"没有匹配的 Bot","secrets.allGranted":"所有 Bot 都已经可以使用它。","secrets.revoke":"移除 {name}","secrets.onceTag":"仅限本次","secrets.edit":"修改密钥","secrets.uses":"使用记录","secrets.noUses":"暂无使用记录。","secrets.deletedBot":"已删除的 Bot","secrets.useCommand":"命令","secrets.useSsh":"SSH 签名","secrets.delete":"删除密钥","secrets.deleteTitle":"删除 {name}?","secrets.deleteBody":"已授权的 Bot 将无法再使用它,使用记录会保留。","secrets.deleteConfirm":"删除","secrets.masterKey":"主密钥","secrets.keyFile":"保存位置","secrets.keyHint":"备份或迁移 Jarvy 时请一起复制这个文件,丢失后密钥和 API key 需要重新输入。","secretCard.title":"请求使用密钥 {name}","secretCard.valuePlaceholder":"粘贴或输入值","secretCard.insecure":"当前连接未加密,填写的值可能被同一网络中的他人看到。建议先切换到 HTTPS 再填写。","secretCard.exists":"这个密钥已保存在「设置 › 密钥」中。","secretCard.replace":"更换值","secretCard.keepValue":"使用已保存的值","secretCard.unreadable":"已保存的值无法解密,请重新输入。","secretCard.value":"值","secretCard.valueHint":"会加密保存到「设置 › 密钥」,不会出现在聊天里。","secretCard.scope":"Bot 可以使用多久","secretCard.always":"始终允许","secretCard.alwaysHint":"直到你在「设置 › 密钥」里移除","secretCard.once":"仅限本次","secretCard.onceHint":"Bot 当前的任务结束后失效","secretCard.allow":"允许","secretCard.saveAllow":"保存并允许","secretCard.decline":"拒绝","secretCard.allowedAlways":"已允许使用 {name},可以在「设置 › 密钥」中移除","secretCard.allowedOnce":"已允许本次使用 {name}","secretCard.declined":"已拒绝提供 {name}","secretCard.ignored":"已忽略 {name} 的请求","error.secretNameInvalid":"名称只能包含大写字母、数字和下划线,且以字母开头。","error.secretNameTaken":"已有同名的密钥。","error.secretValueMissing":"请输入值。","error.secretValueTooLong":"值太长,最多 16 KB。","error.secretDescriptionInvalid":"说明只能有一行,最多 200 个字符。","error.secretMissing":"找不到这个密钥,它可能已被删除。","error.credentialUnreadable":"已保存的 API key 无法解密,请在「设置 › 模型」中重新输入。","access.secrets":"密钥","access.searchSecrets":"搜索密钥","access.searchMachines":"搜索外部环境","access.noSecrets":"未授权任何密钥。","access.noMachines":"未授权任何外部环境。","access.noMatch":"没有匹配的结果","access.allSecrets":"所有密钥都已授权。","access.allMachines":"所有外部环境都已授权。","access.noSecretsYet":"还没有密钥。","access.newSecret":"新建密钥","access.noMachinesYet":"还没有外部环境。","access.loadFailed":"无法读取授权情况。"},X7={"machines.add":"添加机器","machines.host":"地址","machines.hostPlaceholder":"192.168.1.20 或 dev.example.com","machines.port":"端口","machines.user":"用户名","machines.name":"名称","machines.directory":"起始目录","machines.description":"描述","machines.descriptionPlaceholder":"用途、已安装的软件、注意事项","machines.directoryPlaceholder":"用户主目录","machines.next":"下一步","machines.scanning":"正在连接…","machines.fingerprint":"主机指纹","machines.fingerprintHint":"继续之前,请在这台机器上运行 ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub 核对。","machines.password":"登录密码","machines.passwordHint":"用于安装 Jarvy 生成的密钥;机器不支持密钥登录时,密码将加密保存并用于登录。","machines.byPassword":"密码","machines.byKey":"公钥","machines.publicKey":"公钥","machines.keyHint":"添加到 {user} 的 ~/.ssh/authorized_keys 后验证。","machines.copy":"复制","machines.copied":"已复制","machines.verify":"验证并添加","machines.verifying":"正在验证…","machines.login":"登录方式","machines.loginKey":"密钥","machines.loginPassword":"密码","machines.passwordLogin":"该机器不支持密钥登录,当前使用已保存的密码。启用 PubkeyAuthentication 后可切换为密钥登录。","machines.newPassword":"新密码","machines.updatePassword":"更新密码","machines.passwordUpdated":"密码已更新。","machines.useKey":"切换为密钥登录","machines.usingKey":"已切换为密钥登录,保存的密码已删除。","machines.stillPassword":"该机器仍不接受 Jarvy 的密钥。","machines.connect":"连接并添加","machines.connecting":"正在添加…","machines.back":"上一步","machines.check":"检查指纹","machines.checking":"正在检查…","machines.unchanged":"指纹没有变化。","machines.changed":"这台机器现在出示的指纹和之前接受的不同。如果它重装过系统或换了机器,核对后可以接受新指纹;否则可能有人在冒充它。","machines.trust":"接受新指纹","machines.delete":"删除机器","machines.deleteTitle":"删除 {name}?","machines.deleteBody":"会先从这台机器上移除 Jarvy 的密钥。正在使用它的 Bot 会回到默认环境。","machines.deleteConfirm":"删除","machines.forceTitle":"无法连接 {name}","machines.forceBody":"Jarvy 的密钥会留在这台机器的 ~/.ssh/authorized_keys 里(以 {comment} 结尾的那一行),之后可以手动移除。仍要删除吗?","machines.forceConfirm":"仍然删除","machineCard.title":"请求添加机器 {name}","machineCard.existing":"这台机器已在「环境」中。","machineCard.add":"连接并添加","machineCard.allow":"允许","machineCard.decline":"拒绝","machineCard.added":"已添加 {name}","machineCard.granted":"已允许使用 {name}","machineCard.declined":"已拒绝添加 {name}","machineCard.ignored":"已忽略 {name} 的请求","environment.awayMachine":"正在使用 {name}","error.machineMissing":"找不到这台机器,它可能已被删除。","error.machineNameTaken":"已有同名的机器。","error.sshPasswordMissing":"请输入密码。","error.sshKeyUnreadable":"这台机器的密钥无法用当前主密钥解密,请删除后重新添加。","error.sshBadHost":"地址需要是主机名或 IP 地址。","error.sshBadUser":"请填写这台机器上的用户名。","error.sshBadPort":"端口需要在 1–65535 之间。","error.sshBadDirectory":"起始目录需要是绝对路径,或以 ~/ 开头。","error.sshAuthFailed":"用户名或密码错误。","error.sshPasswordRefused":"该机器不支持密码登录,请改用公钥。","error.sshKeyRefused":"该机器未接受 Jarvy 的公钥。请确认已添加到 ~/.ssh/authorized_keys,且 sshd 已启用 PubkeyAuthentication。","error.sshKeyExpired":"公钥已失效,请重新获取并添加到机器。","error.sshUnreachable":"连接不上这台机器,请检查地址、端口和网络。","error.sshHostKeyChanged":"这台机器出示的指纹和之前接受的不同,已停止连接。","error.sshUnsupported":"目前只支持 Linux 和 macOS。","error.sshFailed":"SSH 连接失败:{detail}"},Q7={"tasks.title":"定时任务","tasks.empty":"暂无定时任务","tasks.add":"新建任务","tasks.edit":"编辑","tasks.delete":"删除","tasks.deleteTitle":"删除「{name}」?","tasks.deleteBody":"删除后不会再运行。只想停一阵子的话,把它关掉就行。","tasks.toggle":"开启或关闭{name}","tasks.next":"下次 {time}","tasks.paused":"已关闭","tasks.done":"已完成","tasks.newTitle":"新建任务","tasks.editTitle":"编辑任务","tasks.name":"名称","tasks.namePlaceholder":"早间新闻","tasks.instruction":"要做什么","tasks.instructionPlaceholder":"看一遍我关注的新闻网站首页,挑三条值得看的发给我,每条附一句话。","tasks.when":"时间","tasks.kind.once":"一次","tasks.kind.every":"间隔","tasks.kind.daily":"每天","tasks.kind.weekly":"每周","tasks.at":"日期和时间","tasks.everyCount":"每隔","tasks.unit.minutes":"分钟","tasks.unit.hours":"小时","tasks.time":"时间","tasks.weekday":"星期","tasks.minimum":"最短 5 分钟。","tasks.saveFailed":"任务保存失败","tasks.changeFailed":"任务修改失败","tasks.loadFailed":"任务加载失败","tasks.schedule.once":"一次,{time}","tasks.schedule.minutes":{one:"每分钟",other:"每 {count} 分钟"},"tasks.schedule.hours":{one:"每小时",other:"每 {count} 小时"},"tasks.schedule.daily":"每天 {time}","tasks.schedule.weekly":"每{day} {time}","error.taskTimePast":"这个时间已经过了,请选一个以后的时间。","error.taskScheduleInvalid":"检查一下周期:最短每 5 分钟,时间要是有效的。","error.taskInvalid":"给任务起个名字,写上要做什么。"},Z7={"ports.title":"端口转发","ports.empty":"暂无转发的端口","ports.open":"打开{name}","ports.port":"端口 {port}","ports.from":"转发自沙箱的 {port} 端口","ports.link":"链接","ports.linkOther":"其它地址","ports.copy":"复制链接","ports.state":"状态","ports.state.live":"运行中","ports.state.local":"仅本地监听","ports.state.idle":"未监听","ports.state.stopped":"沙箱已停止","ports.state.unknown":"状态未知","ports.hint.local":"服务仅监听沙箱内的 127.0.0.1,无法通过链接访问。请让 Bot 改为监听 0.0.0.0。","ports.hint.idle":"沙箱内暂无服务监听此端口。","ports.hint.stopped":"沙箱启动后即可通过链接访问。","ports.stop":"停止转发","ports.stopTitle":"停止转发「{name}」?","ports.stopBody":"链接将失效,沙箱内的服务不受影响。","ports.loadFailed":"无法加载转发的端口。","ports.changeFailed":"无法停止转发此端口。","ports.range":"转发端口范围","ports.rangeHint":"Bot 发布端口时,Jarvy 从此范围中分配端口进行转发。已转发的端口不受影响。","ports.rangeFrom":"起始","ports.rangeTo":"结束","ports.rangeSaved":"已保存","error.portInvalid":"此端口无法转发。","error.portMissing":"此端口未在转发。","error.portRangeInvalid":"端口范围须在 1024–65535 之间,起始不大于结束,最多 1000 个。","error.portRangeOwn":"范围不能包含 Jarvy 自己的端口。","error.portsExhausted":"{from}–{to} 中已无空闲端口,请在「设置 › 网络」中扩大范围。"},J7={"inputs.someone":"有人","inputs.aChat":"某个会话","inputs.message":"{person} · {chat}:{text}","inputs.task":"定时任务「{name}」:{text}","inputs.reaction":"{person} 回应了 {emoji}:{text}","inputs.notice":"{person} 更新了「{chat}」的公告(第 {version} 版)","inputs.summary":"{person} 更新了「{chat}」的摘要(第 {version} 版)","inputs.change":"{person} 修改了它的{what}","inputs.onboard":"首次启动:{person} 刚给它配好模型","inputs.followed":{one:"对话已压缩,它关注着 {count} 个线程",other:"对话已压缩,它关注着 {count} 个线程"},"inputs.instructions":"它的设定有变化:{parts}","inputs.more":{one:"等 {count} 条",other:"等 {count} 条"},"inputs.raw":"原始文本","inputs.replyTo":"回复 {person}","inputs.taskTitle":"定时任务「{name}」","inputs.due":"计划于 {time}","inputs.reacted":"{person} 回应了 {emoji}","inputs.unreadThreads":{one:"{count} 条未读",other:"{count} 条未读"},"inputs.unread":{one:"未读 {count} 条:{list}",other:"未读 {count} 条:{list}"},"inputs.unreadNotes":"还没读的公告和摘要:{list}","inputs.version":"{title}(第 {version} 版)","inputs.place":"工作环境:{name} · {directory}","inputs.sandbox":"沙箱","inputs.unavailable":"当时文件和命令工具不可用","inputs.what.name":"名称","inputs.what.description":"描述","inputs.what.persona":"设定","inputs.what.model":"模型","inputs.what.thinking":"思考强度","inputs.what.run":"运行状态","inputs.what.environment":"工作环境","inputs.what.access":"可用环境"},W7={"botCard.agent":"管家 Bot","botCard.state":"状态","botCard.worksIn":"工作环境","botCard.sandbox":"沙箱","botCard.onMachine":"机器 {name}","botCard.message":"发消息","botCard.info":"Bot 信息","botCard.open":"打开 {name} 的资料卡"},e9={...H7,...q7,...F7,...U7,...$7,...V7,...G7,...Y7,...K7,...X7,...Q7,...Z7,...J7,...W7},m4=["en","zh"],p4={en:P7,zh:e9},Jc={en:"en",zh:"zh-CN"},g4="jarvy-locale";function t9(){var a;const e=localStorage.getItem(g4);if(e==="en"||e==="zh")return e;const n=((a=navigator.languages)!=null&&a.length?navigator.languages:[navigator.language]).map(r=>r.toLowerCase()).find(r=>/^(en|zh)\b/.test(r));return n!=null&&n.startsWith("zh")?"zh":"en"}let Ja=t9();document.documentElement.lang=Jc[Ja];const g0=new Set,Tl=()=>Ja;function v4(e){if(e!==Ja){Ja=e,localStorage.setItem(g4,e),document.documentElement.lang=Jc[e];for(const n of g0)n()}}function y4(){return w.useSyncExternalStore(e=>(g0.add(e),()=>{g0.delete(e)}),Tl)}const v0=(e,n)=>p4[e][n==="name"?"locale.name":"locale.short"];function x4(e,n){const a=p4[Ja][e];return typeof a=="string"?a:new Intl.PluralRules(Jc[Ja]).select(Number(n))==="one"?a.one:a.other}function y(e,n){const a=x4(e,n==null?void 0:n.count);return n?a.replace(/\{(\w+)\}/g,(r,o)=>o in n?String(n[o]):r):a}const Si=(e,n)=>new Date(e).toLocaleString(Jc[Ja],n),Ml=e=>Si(e,{hour:Ja==="zh"?"2-digit":"numeric",minute:"2-digit"}),Nf=e=>{const n=new Date(e).getFullYear()===new Date().getFullYear();return Si(e,{year:n?void 0:"numeric",month:Ja==="zh"?"numeric":"short",day:"numeric"})},Ea=(e,n)=>new Intl.NumberFormat(Jc[Ja],n).format(e);function h1(e,n){return x4(e,n.count).split(/\{(\w+)\}/).map((a,r)=>l.jsx(w.Fragment,{children:r%2?n[a]??`{${a}}`:a},r))}class Wa extends Error{constructor(n,a,r,o){super(a),this.status=n,this.code=r,this.params=o}}async function Se(e,n={}){let a;try{a=await fetch(`/api${e}`,{...n,credentials:"same-origin",headers:{...n.body&&!(n.body instanceof Blob)?{"Content-Type":"application/json"}:{},...n.headers}})}catch{throw new Error(y("api.offline"))}const r=await a.json().catch(()=>({}));if(!a.ok)throw b4(a.status,r);return r}const b4=(e,n)=>{const a=typeof n=="object"&&n!==null?n:{};return new Wa(e,a.error===void 0?`HTTP ${e}`:String(a.error),typeof a.code=="string"?a.code:void 0,a.params)};function n9(e,n,a,r){return new Promise((o,c)=>{const d=new XMLHttpRequest;if(r!=null&&r.aborted){c(new DOMException("Upload cancelled","AbortError"));return}r==null||r.addEventListener("abort",()=>d.abort(),{once:!0}),d.onabort=()=>c(new DOMException("Upload cancelled","AbortError")),d.open("POST",`/api/chats/${e}/attachments`),d.setRequestHeader("Content-Type",n.type||"application/octet-stream"),d.setRequestHeader("X-File-Name",encodeURIComponent(n.name)),d.upload.onprogress=f=>{f.lengthComputable&&(a==null||a(f.loaded/f.total))},d.onerror=()=>c(new Error(y("api.offline"))),d.onload=()=>{let f={};try{f=JSON.parse(d.responseText)}catch{}d.status>=200&&d.status<300?o(f):c(b4(d.status,f))},d.send(n)})}async function i9(e,n=0){const a=[];let r=n;for(;;){const o=await Se(`/chats/${e}/messages?after=${r}&limit=1000`);if(a.push(...o.messages),!o.hasMore)return{messages:a};if(o.nextSequence<=r)throw new Error(y("api.historyFailed"));r=o.nextSequence}}const tt=e=>JSON.stringify(e),he={me:()=>Se("/me"),search:(e,n)=>Se(`/search?q=${encodeURIComponent(e)}${n?`&in=${n}`:""}&limit=60`),login:(e,n)=>Se("/login",{method:"POST",body:tt({username:e,password:n})}),logout:()=>Se("/logout",{method:"POST"}),bots:()=>Se("/bots"),createBot:e=>Se("/bots",{method:"POST",body:tt({name:e})}),saveBot:(e,n)=>Se(`/bots/${e}`,{method:"PUT",body:tt(n)}),modelOptions:()=>Se("/model-options"),selectBotModel:(e,n,a,r,o)=>Se(`/bots/${e}/model`,{method:"PUT",body:tt({connectionId:n,modelId:a,thinkingLevel:r,language:o})}),answerQuestion:(e,n,a)=>Se(`/chats/${e}/questions/${n}`,{method:"POST",body:tt(a)}),setBotColor:(e,n)=>Se(`/bots/${e}/color`,{method:"PUT",body:tt({color:n})}),chats:()=>Se("/chats"),createChat:e=>Se("/chats",{method:"POST",body:tt({botId:e})}),deleteChat:e=>Se(`/chats/${e}`,{method:"DELETE"}),members:()=>Se("/members"),sections:()=>Se("/sections"),createSection:e=>Se("/sections",{method:"POST",body:tt(e)}),updateSection:(e,n)=>Se(`/sections/${e}`,{method:"PATCH",body:tt(n)}),deleteSection:e=>Se(`/sections/${e}`,{method:"DELETE"}),createChannel:e=>Se("/channels",{method:"POST",body:tt(e)}),updateChannel:(e,n)=>Se(`/chats/${e}`,{method:"PATCH",body:tt(n)}),addMember:(e,n)=>Se(`/chats/${e}/members`,{method:"POST",body:tt({memberId:n})}),removeMember:(e,n)=>Se(`/chats/${e}/members/${n}`,{method:"DELETE"}),setAdmin:(e,n,a)=>Se(`/chats/${e}/members/${n}/admin`,{method:"PUT",body:tt({admin:a})}),setNote:(e,n)=>Se(`/chats/${e}/note`,{method:"PUT",body:tt({text:n})}),markRead:(e,n)=>Se(`/chats/${e}/read`,{method:"POST",body:tt({sequence:n})}),messages:i9,latestMessages:(e,n)=>Se(`/chats/${e}/messages?tail=${n}`),olderMessages:(e,n,a)=>Se(`/chats/${e}/messages?before=${n}&limit=${a}`),send:(e,n,a,r,o=!1,c,d=[])=>Se(`/chats/${e}/messages`,{method:"POST",body:tt({content:n,attachmentIds:a,clientMessageId:r,...o?{alsoToChannel:o}:{},...c?{replyTo:c}:{},...d.length?{quotes:d}:{}})}),fold:(e,n)=>Se(`/messages/${e}/fold`,{method:"PUT",body:tt({folded:n})}),react:(e,n,a)=>Se(`/messages/${e}/reaction`,{method:"PUT",body:tt({emoji:n,on:a})}),pin:(e,n)=>Se(`/chats/${e}/pin`,{method:"PUT",body:tt({pinned:n})}),mute:(e,n)=>Se(`/chats/${e}/mute`,{method:"PUT",body:tt({muted:n})}),deleteBot:(e,n)=>Se(`/bots/${e}${n?"?files=delete":""}`,{method:"DELETE"}),chat:e=>Se(`/chats/${e}`),message:e=>Se(`/messages/${e}`),openThread:e=>Se(`/messages/${e}/thread`,{method:"POST"}),channelThreads:e=>Se(`/chats/${e}/threads`),followedThreads:({filter:e,sort:n,cursor:a})=>Se(`/threads?${new URLSearchParams({filter:e,sort:n,...a?{cursor:a}:{}})}`),followedThread:e=>Se(`/threads/${e}`),updateThread:(e,n)=>Se(`/chats/${e}`,{method:"PATCH",body:tt(n)}),follow:(e,n)=>Se(`/chats/${e}/follow`,{method:"PUT",body:tt({following:n})}),botDirects:e=>Se(`/members/${e}/dms`),tasks:e=>Se(`/bots/${e}/tasks`),createTask:(e,n)=>Se(`/bots/${e}/tasks`,{method:"POST",body:tt(n)}),updateTask:(e,n,a)=>Se(`/bots/${e}/tasks/${n}`,{method:"PUT",body:tt(a)}),setTaskOn:(e,n,a)=>Se(`/bots/${e}/tasks/${n}/${a?"resume":"pause"}`,{method:"POST"}),deleteTask:(e,n)=>Se(`/bots/${e}/tasks/${n}`,{method:"DELETE"}),botSubscriptions:e=>Se(`/members/${e}/subscriptions`),controlBot:(e,n)=>Se(`/bots/${e}/${n}`,{method:"POST"}),grantBotMachine:(e,n,a)=>Se(`/bots/${e}/environment`,{method:"PUT",body:tt({machineId:n,granted:a})}),machines:()=>Se("/environments"),scanMachine:e=>Se("/environments/scan",{method:"POST",body:tt(e)}),addMachine:e=>Se("/environments",{method:"POST",body:tt(e)}),prepareMachineKey:()=>Se("/environments/keys",{method:"POST"}),setMachinePassword:(e,n)=>Se(`/environments/${e}/password`,{method:"PUT",body:tt({password:n})}),updateMachine:(e,n)=>Se(`/environments/${e}`,{method:"PUT",body:tt(n)}),checkMachine:e=>Se(`/environments/${e}/check`,{method:"POST"}),trustMachine:(e,n)=>Se(`/environments/${e}/trust`,{method:"POST",body:tt({fingerprints:n})}),deleteMachine:(e,n=!1)=>Se(`/environments/${e}${n?"?force=1":""}`,{method:"DELETE"}),grantMachine:(e,n,a)=>Se(`/environments/${e}/grants/${n}`,{method:"PUT",body:tt({granted:a})}),fulfilMachine:(e,n,a)=>Se(`/environments/requests/${e}/${n}`,{method:"POST",body:tt(a)}),computer:(e,n)=>Se(`/bots/${e}/computer/${n}`,{method:"POST"}),setComputerType:(e,n)=>Se(`/bots/${e}/computer/type`,{method:"PUT",body:tt({type:n})}),vmSupport:()=>Se("/environments/vm"),checkVmSupport:()=>Se("/environments/vm/check",{method:"POST"}),setComputerLimits:(e,n)=>Se(`/bots/${e}/computer/limits`,{method:"PUT",body:tt(n)}),computerResources:e=>Se(`/bots/${e}/computer/resources`),connection:()=>Se("/connection"),setConnection:e=>Se("/connection",{method:"PUT",body:tt({allowHttp:e})}),setPortRange:e=>Se("/connection",{method:"PUT",body:tt({ports:e})}),ports:e=>Se(`/bots/${e}/ports`),unpublishPort:(e,n)=>Se(`/bots/${e}/ports/${n}`,{method:"DELETE"}),secrets:()=>Se("/secrets"),createSecret:e=>Se("/secrets",{method:"POST",body:tt(e)}),updateSecret:(e,n)=>Se(`/secrets/${e}`,{method:"PUT",body:tt(n)}),deleteSecret:e=>Se(`/secrets/${e}`,{method:"DELETE"}),grantSecret:(e,n,a)=>Se(`/secrets/${e}/grants/${n}`,{method:"PUT",body:tt({granted:a})}),secretUses:e=>Se(`/secrets/${e}/uses`),fulfilSecret:(e,n,a)=>Se(`/secrets/requests/${e}/${n}`,{method:"POST",body:tt(a)}),botStatus:e=>Se(`/bots/${e}/status`),uploadAttachment:n9,removeAttachment:e=>Se(`/attachments/${e}`,{method:"DELETE"}),authStatus:e=>Se(`/model-connections/${e}/auth`),authStart:e=>Se(`/model-connections/${e}/auth`,{method:"POST"}),authCancel:e=>Se(`/model-connections/${e}/auth`,{method:"DELETE"}),authInput:(e,n,a)=>Se(`/model-connections/${e}/auth/input`,{method:"POST",body:tt({promptId:n,value:a})}),authLogout:e=>Se(`/model-connections/${e}/auth/logout`,{method:"POST"}),modelCatalog:e=>Se(`/model-connections/${e}/catalog`),modelResetPlan:e=>Se(`/model-connections/${e}/reset`),resetModelConnection:e=>Se(`/model-connections/${e}/reset`,{method:"POST"}),providerModels:e=>Se(`/model-providers/${encodeURIComponent(e)}/models`),modelProviders:()=>Se("/model-providers"),autoconfigModel:e=>Se("/model-autoconfig",{method:"POST",body:tt(e)}),discoverModels:e=>Se("/model-discovery",{method:"POST",body:tt(e)}),modelConnections:()=>Se("/model-connections"),createModelConnection:e=>Se("/model-connections",{method:"POST",body:tt(e)}),updateModelConnection:(e,n)=>Se(`/model-connections/${e}`,{method:"PUT",body:tt(n)}),deleteModelConnection:e=>Se(`/model-connections/${e}`,{method:"DELETE"}),saveModelCredential:(e,n,a=!1)=>Se(`/model-connections/${e}/credential`,{method:"PUT",body:tt({apiKey:n,remove:a})}),saveConnectionModel:(e,n,a)=>Se(`/model-connections/${e}/models`,{method:a?"PUT":"POST",body:tt({model:n,originalId:a})}),deleteConnectionModel:(e,n)=>Se(`/model-connections/${e}/models`,{method:"DELETE",body:tt({modelId:n})})},Px=4*1024**3,a9=["normal","happy","sad","angry","dizzy"];/**
|
|
50
|
+
* @license lucide-react v1.47.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const r9=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
55
|
+
* @license lucide-react v1.47.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/function l9(e,n,a=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:r9(e),size:24,node:n,...a.length>0?{aliases:a}:{}}}/**
|
|
60
|
+
* @license lucide-react v1.47.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const s9=e=>{let n="",a=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){a=n.length>0;continue}n.length===0?n+=r.toLowerCase():n+=a?r.toUpperCase():r,a=!1}return n};/**
|
|
65
|
+
* @license lucide-react v1.47.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const o9=e=>{const n=s9(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
|
70
|
+
* @license lucide-react v1.47.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const y0=(...e)=>e.filter((n,a,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===a).join(" ").trim();/**
|
|
75
|
+
* @license lucide-react v1.47.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const fs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
80
|
+
* @license lucide-react v1.47.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/function wp(e){return e!=null}function c9(e,n={}){var j,b;const a=n.attributeNames??{},r=k=>a[k]??k,o=e.size??e.width??fs.width,c=e.size??e.height??fs.height,d=((j=e.aliases)==null?void 0:j.filter(k=>typeof k=="string"&&k.trim()!=="").map(k=>`lucide-${k}`))??[],f=[...e.name?[`lucide-${e.name}`]:[],...d],h=((b=n.className)==null?void 0:b.split(" ").filter(Boolean))??[],g=n.includeDefaultClasses===!1?y0(...h):y0("lucide",...f,...h),v=n.absoluteStrokeWidth?Number(n.strokeWidth??fs["stroke-width"])*Number(e.size??e.width??fs.width)/Number(n.size??n.width??fs.width):n.strokeWidth??fs["stroke-width"];return["svg",{...Object.entries(fs).reduce((k,[S,N])=>(k[r(S)]=N,k),{}),..."color"in n&&n.color&&{[r("stroke")]:n.color},..."size"in n&&wp(n.size)&&{[r("width")]:n.size,[r("height")]:n.size},..."width"in n&&wp(n.width)&&{[r("width")]:n.width},..."height"in n&&wp(n.height)&&{[r("height")]:n.height},[r("stroke-width")]:v,...g&&{[r("class")]:g},[r("viewBox")]:`0 0 ${o} ${c}`,...n.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(k=>{const[S,N,C]=k,M=n.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...N}:N;return C?[S,M,C]:[S,M]})]}/**
|
|
85
|
+
* @license lucide-react v1.47.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/function u9(e,n={}){return c9(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
90
|
+
* @license lucide-react v1.47.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const d9=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},f9=w.createContext({}),h9=()=>w.useContext(f9),m9=w.forwardRef(({color:e,size:n,width:a,height:r,strokeWidth:o,absoluteStrokeWidth:c,nonScalingStroke:d,className:f="",children:h,iconNode:g=[],icon:v={node:g,aliases:[],size:24},...p},j)=>{const{size:b=24,strokeWidth:k=2,absoluteStrokeWidth:S=!1,nonScalingStroke:N=!1,color:C="currentColor",className:M=""}=h9()??{},E=!!h||d9(p),[T,R,_=[]]=u9(v,{color:e??C,width:a??n??b,height:r??n??b,strokeWidth:o??k,absoluteStrokeWidth:c??S,nonScalingStroke:d??N,className:y0(M,f),hasA11yProp:E,attributes:p});return w.createElement(T,{ref:j,...R},[..._.map(([z,P])=>w.createElement(z,P)),...Array.isArray(h)?h:[h]])});/**
|
|
95
|
+
* @license lucide-react v1.47.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/function Re(e,n=[],a=[]){const r=typeof e=="string"?l9(e,n,a):e,o=w.forwardRef(({className:c,...d},f)=>w.createElement(m9,{ref:f,icon:r,className:c,...d}));return r.name&&(o.displayName=o9(r.name)),o}/**
|
|
100
|
+
* @license lucide-react v1.47.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const j4={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};j4.node;const p9=Re(j4);/**
|
|
105
|
+
* @license lucide-react v1.47.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const w4={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};w4.node;const g9=Re(w4);/**
|
|
110
|
+
* @license lucide-react v1.47.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const k4={name:"arrow-down-up",size:24,node:[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]};k4.node;const v9=Re(k4);/**
|
|
115
|
+
* @license lucide-react v1.47.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const S4={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};S4.node;const m1=Re(S4);/**
|
|
120
|
+
* @license lucide-react v1.47.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const C4={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};C4.node;const Fc=Re(C4);/**
|
|
125
|
+
* @license lucide-react v1.47.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const N4={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};N4.node;const y9=Re(N4);/**
|
|
130
|
+
* @license lucide-react v1.47.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const E4={name:"bell-off",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]};E4.node;const x9=Re(E4);/**
|
|
135
|
+
* @license lucide-react v1.47.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const T4={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};T4.node;const b9=Re(T4);/**
|
|
140
|
+
* @license lucide-react v1.47.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const M4={name:"brain",size:24,node:[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]};M4.node;const j9=Re(M4);/**
|
|
145
|
+
* @license lucide-react v1.47.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const A4={name:"cat",size:24,node:[["path",{d:"M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z",key:"x6xyqk"}],["path",{d:"M8 14v.5",key:"1nzgdb"}],["path",{d:"M16 14v.5",key:"1lajdz"}],["path",{d:"M11.25 16.25h1.5L12 17l-.75-.75Z",key:"12kq1m"}]]};A4.node;const w9=Re(A4);/**
|
|
150
|
+
* @license lucide-react v1.47.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const _4={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};_4.node;const k9=Re(_4);/**
|
|
155
|
+
* @license lucide-react v1.47.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const R4={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};R4.node;const Li=Re(R4);/**
|
|
160
|
+
* @license lucide-react v1.47.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const z4={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};z4.node;const Al=Re(z4);/**
|
|
165
|
+
* @license lucide-react v1.47.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const O4={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};O4.node;const p1=Re(O4);/**
|
|
170
|
+
* @license lucide-react v1.47.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const D4={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};D4.node;const As=Re(D4);/**
|
|
175
|
+
* @license lucide-react v1.47.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const L4={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};L4.node;const S9=Re(L4);/**
|
|
180
|
+
* @license lucide-react v1.47.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const B4={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};B4.node;const C9=Re(B4);/**
|
|
185
|
+
* @license lucide-react v1.47.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const I4={name:"container",size:24,node:[["path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z",key:"1t2lqe"}],["path",{d:"M10 21.9V14L2.1 9.1",key:"o7czzq"}],["path",{d:"m10 14 11.9-6.9",key:"zm5e20"}],["path",{d:"M14 19.8v-8.1",key:"159ecu"}],["path",{d:"M18 17.5V9.4",key:"11uown"}]]};I4.node;const N9=Re(I4);/**
|
|
190
|
+
* @license lucide-react v1.47.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const P4={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};P4.node;const Wc=Re(P4);/**
|
|
195
|
+
* @license lucide-react v1.47.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const H4={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};H4.node;const E9=Re(H4);/**
|
|
200
|
+
* @license lucide-react v1.47.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const q4={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};q4.node;const g1=Re(q4);/**
|
|
205
|
+
* @license lucide-react v1.47.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const F4={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};F4.node;const x0=Re(F4);/**
|
|
210
|
+
* @license lucide-react v1.47.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const U4={name:"expand",size:24,node:[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]]};U4.node;const T9=Re(U4);/**
|
|
215
|
+
* @license lucide-react v1.47.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const $4={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};$4.node;const b0=Re($4);/**
|
|
220
|
+
* @license lucide-react v1.47.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const V4={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};V4.node;const v1=Re(V4);/**
|
|
225
|
+
* @license lucide-react v1.47.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const G4={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};G4.node;const y1=Re(G4);/**
|
|
230
|
+
* @license lucide-react v1.47.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const Y4={name:"face-slightly-smiling-plus",size:24,node:[["path",{d:"M13.267 2.08a10 10 0 108.653 8.653",key:"1wbpyh"}],["path",{d:"M15 10V9",key:"4dkmfx"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M16.472 15a6 6 0 01-8.943 0",key:"7qomzy"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M9 10V9",key:"1lazqi"}]],aliases:["smile-plus"]};Y4.node;const M9=Re(Y4);/**
|
|
235
|
+
* @license lucide-react v1.47.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const K4={name:"face-slightly-smiling",size:24,node:[["path",{d:"M15 10V9",key:"4dkmfx"}],["path",{d:"M16.472 15a6 6 0 01-8.943 0",key:"7qomzy"}],["path",{d:"M9 10V9",key:"1lazqi"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["smile"]};K4.node;const A9=Re(K4);/**
|
|
240
|
+
* @license lucide-react v1.47.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const X4={name:"file-headphone",size:24,node:[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",key:"1vfytu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",key:"1etmh7"}]],aliases:["file-audio","file-audio-2"]};X4.node;const _9=Re(X4);/**
|
|
245
|
+
* @license lucide-react v1.47.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const Q4={name:"file-play",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",key:"1tzo1f"}]],aliases:["file-video"]};Q4.node;const R9=Re(Q4);/**
|
|
250
|
+
* @license lucide-react v1.47.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const Z4={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};Z4.node;const z9=Re(Z4);/**
|
|
255
|
+
* @license lucide-react v1.47.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const J4={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};J4.node;const O9=Re(J4);/**
|
|
260
|
+
* @license lucide-react v1.47.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const W4={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};W4.node;const D9=Re(W4);/**
|
|
265
|
+
* @license lucide-react v1.47.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const ew={name:"fold-vertical",size:24,node:[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]]};ew.node;const L9=Re(ew);/**
|
|
270
|
+
* @license lucide-react v1.47.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const tw={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};tw.node;const B9=Re(tw);/**
|
|
275
|
+
* @license lucide-react v1.47.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const nw={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};nw.node;const I9=Re(nw);/**
|
|
280
|
+
* @license lucide-react v1.47.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const iw={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};iw.node;const P9=Re(iw);/**
|
|
285
|
+
* @license lucide-react v1.47.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const aw={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};aw.node;const H9=Re(aw);/**
|
|
290
|
+
* @license lucide-react v1.47.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const rw={name:"heart",size:24,node:[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]};rw.node;const q9=Re(rw);/**
|
|
295
|
+
* @license lucide-react v1.47.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const lw={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};lw.node;const F9=Re(lw);/**
|
|
300
|
+
* @license lucide-react v1.47.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const sw={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};sw.node;const x1=Re(sw);/**
|
|
305
|
+
* @license lucide-react v1.47.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const ow={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};ow.node;const b1=Re(ow);/**
|
|
310
|
+
* @license lucide-react v1.47.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const cw={name:"lightbulb",size:24,node:[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]};cw.node;const U9=Re(cw);/**
|
|
315
|
+
* @license lucide-react v1.47.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const uw={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};uw.node;const $9=Re(uw);/**
|
|
320
|
+
* @license lucide-react v1.47.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const dw={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};dw.node;const fw=Re(dw);/**
|
|
325
|
+
* @license lucide-react v1.47.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const hw={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};hw.node;const V9=Re(hw);/**
|
|
330
|
+
* @license lucide-react v1.47.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const mw={name:"megaphone",size:24,node:[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]]};mw.node;const G9=Re(mw);/**
|
|
335
|
+
* @license lucide-react v1.47.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const pw={name:"message-circle-question-mark",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["message-circle-question"]};pw.node;const gw=Re(pw);/**
|
|
340
|
+
* @license lucide-react v1.47.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const vw={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};vw.node;const j1=Re(vw);/**
|
|
345
|
+
* @license lucide-react v1.47.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*/const yw={name:"message-square-text",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]};yw.node;const Y9=Re(yw);/**
|
|
350
|
+
* @license lucide-react v1.47.0 - ISC
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the ISC license.
|
|
353
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/const xw={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};xw.node;const K9=Re(xw);/**
|
|
355
|
+
* @license lucide-react v1.47.0 - ISC
|
|
356
|
+
*
|
|
357
|
+
* This source code is licensed under the ISC license.
|
|
358
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
+
*/const bw={name:"messages-square",size:24,node:[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]};bw.node;const jw=Re(bw);/**
|
|
360
|
+
* @license lucide-react v1.47.0 - ISC
|
|
361
|
+
*
|
|
362
|
+
* This source code is licensed under the ISC license.
|
|
363
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
+
*/const ww={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};ww.node;const X9=Re(ww);/**
|
|
365
|
+
* @license lucide-react v1.47.0 - ISC
|
|
366
|
+
*
|
|
367
|
+
* This source code is licensed under the ISC license.
|
|
368
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
+
*/const kw={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};kw.node;const Sw=Re(kw);/**
|
|
370
|
+
* @license lucide-react v1.47.0 - ISC
|
|
371
|
+
*
|
|
372
|
+
* This source code is licensed under the ISC license.
|
|
373
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
+
*/const Cw={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};Cw.node;const Q9=Re(Cw);/**
|
|
375
|
+
* @license lucide-react v1.47.0 - ISC
|
|
376
|
+
*
|
|
377
|
+
* This source code is licensed under the ISC license.
|
|
378
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
+
*/const Nw={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};Nw.node;const Z9=Re(Nw);/**
|
|
380
|
+
* @license lucide-react v1.47.0 - ISC
|
|
381
|
+
*
|
|
382
|
+
* This source code is licensed under the ISC license.
|
|
383
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
384
|
+
*/const Ew={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};Ew.node;const J9=Re(Ew);/**
|
|
385
|
+
* @license lucide-react v1.47.0 - ISC
|
|
386
|
+
*
|
|
387
|
+
* This source code is licensed under the ISC license.
|
|
388
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
389
|
+
*/const Tw={name:"paperclip",size:24,node:[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]};Tw.node;const Ef=Re(Tw);/**
|
|
390
|
+
* @license lucide-react v1.47.0 - ISC
|
|
391
|
+
*
|
|
392
|
+
* This source code is licensed under the ISC license.
|
|
393
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
394
|
+
*/const Mw={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};Mw.node;const W9=Re(Mw);/**
|
|
395
|
+
* @license lucide-react v1.47.0 - ISC
|
|
396
|
+
*
|
|
397
|
+
* This source code is licensed under the ISC license.
|
|
398
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
399
|
+
*/const Aw={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};Aw.node;const eN=Re(Aw);/**
|
|
400
|
+
* @license lucide-react v1.47.0 - ISC
|
|
401
|
+
*
|
|
402
|
+
* This source code is licensed under the ISC license.
|
|
403
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
404
|
+
*/const _w={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};_w.node;const j0=Re(_w);/**
|
|
405
|
+
* @license lucide-react v1.47.0 - ISC
|
|
406
|
+
*
|
|
407
|
+
* This source code is licensed under the ISC license.
|
|
408
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
409
|
+
*/const Rw={name:"plane",size:24,node:[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]};Rw.node;const tN=Re(Rw);/**
|
|
410
|
+
* @license lucide-react v1.47.0 - ISC
|
|
411
|
+
*
|
|
412
|
+
* This source code is licensed under the ISC license.
|
|
413
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
414
|
+
*/const zw={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};zw.node;const Br=Re(zw);/**
|
|
415
|
+
* @license lucide-react v1.47.0 - ISC
|
|
416
|
+
*
|
|
417
|
+
* This source code is licensed under the ISC license.
|
|
418
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
419
|
+
*/const Ow={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};Ow.node;const nN=Re(Ow);/**
|
|
420
|
+
* @license lucide-react v1.47.0 - ISC
|
|
421
|
+
*
|
|
422
|
+
* This source code is licensed under the ISC license.
|
|
423
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
424
|
+
*/const Dw={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};Dw.node;const w1=Re(Dw);/**
|
|
425
|
+
* @license lucide-react v1.47.0 - ISC
|
|
426
|
+
*
|
|
427
|
+
* This source code is licensed under the ISC license.
|
|
428
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
429
|
+
*/const Lw={name:"reply",size:24,node:[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]};Lw.node;const iN=Re(Lw);/**
|
|
430
|
+
* @license lucide-react v1.47.0 - ISC
|
|
431
|
+
*
|
|
432
|
+
* This source code is licensed under the ISC license.
|
|
433
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
434
|
+
*/const Bw={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};Bw.node;const Iw=Re(Bw);/**
|
|
435
|
+
* @license lucide-react v1.47.0 - ISC
|
|
436
|
+
*
|
|
437
|
+
* This source code is licensed under the ISC license.
|
|
438
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
439
|
+
*/const Pw={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};Pw.node;const _s=Re(Pw);/**
|
|
440
|
+
* @license lucide-react v1.47.0 - ISC
|
|
441
|
+
*
|
|
442
|
+
* This source code is licensed under the ISC license.
|
|
443
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
444
|
+
*/const Hw={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};Hw.node;const k1=Re(Hw);/**
|
|
445
|
+
* @license lucide-react v1.47.0 - ISC
|
|
446
|
+
*
|
|
447
|
+
* This source code is licensed under the ISC license.
|
|
448
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
449
|
+
*/const qw={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};qw.node;const aN=Re(qw);/**
|
|
450
|
+
* @license lucide-react v1.47.0 - ISC
|
|
451
|
+
*
|
|
452
|
+
* This source code is licensed under the ISC license.
|
|
453
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
454
|
+
*/const Fw={name:"shapes",size:24,node:[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]};Fw.node;const rN=Re(Fw);/**
|
|
455
|
+
* @license lucide-react v1.47.0 - ISC
|
|
456
|
+
*
|
|
457
|
+
* This source code is licensed under the ISC license.
|
|
458
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
459
|
+
*/const Uw={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};Uw.node;const lN=Re(Uw);/**
|
|
460
|
+
* @license lucide-react v1.47.0 - ISC
|
|
461
|
+
*
|
|
462
|
+
* This source code is licensed under the ISC license.
|
|
463
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
464
|
+
*/const $w={name:"shrink",size:24,node:[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]]};$w.node;const sN=Re($w);/**
|
|
465
|
+
* @license lucide-react v1.47.0 - ISC
|
|
466
|
+
*
|
|
467
|
+
* This source code is licensed under the ISC license.
|
|
468
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
469
|
+
*/const Vw={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};Vw.node;const oN=Re(Vw);/**
|
|
470
|
+
* @license lucide-react v1.47.0 - ISC
|
|
471
|
+
*
|
|
472
|
+
* This source code is licensed under the ISC license.
|
|
473
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
474
|
+
*/const Gw={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};Gw.node;const Yw=Re(Gw);/**
|
|
475
|
+
* @license lucide-react v1.47.0 - ISC
|
|
476
|
+
*
|
|
477
|
+
* This source code is licensed under the ISC license.
|
|
478
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
479
|
+
*/const Kw={name:"speech",size:24,node:[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]]};Kw.node;const cN=Re(Kw);/**
|
|
480
|
+
* @license lucide-react v1.47.0 - ISC
|
|
481
|
+
*
|
|
482
|
+
* This source code is licensed under the ISC license.
|
|
483
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
484
|
+
*/const Xw={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};Xw.node;const Qw=Re(Xw);/**
|
|
485
|
+
* @license lucide-react v1.47.0 - ISC
|
|
486
|
+
*
|
|
487
|
+
* This source code is licensed under the ISC license.
|
|
488
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
489
|
+
*/const Zw={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};Zw.node;const uN=Re(Zw);/**
|
|
490
|
+
* @license lucide-react v1.47.0 - ISC
|
|
491
|
+
*
|
|
492
|
+
* This source code is licensed under the ISC license.
|
|
493
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
494
|
+
*/const Jw={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};Jw.node;const of=Re(Jw);/**
|
|
495
|
+
* @license lucide-react v1.47.0 - ISC
|
|
496
|
+
*
|
|
497
|
+
* This source code is licensed under the ISC license.
|
|
498
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
499
|
+
*/const Ww={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};Ww.node;const Tf=Re(Ww);/**
|
|
500
|
+
* @license lucide-react v1.47.0 - ISC
|
|
501
|
+
*
|
|
502
|
+
* This source code is licensed under the ISC license.
|
|
503
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
504
|
+
*/const e3={name:"trophy",size:24,node:[["path",{d:"M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2",key:"pwuv1l"}],["path",{d:"M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2",key:"1y54w1"}],["path",{d:"M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3",key:"e30mpu"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3",key:"i0yafy"}]]};e3.node;const dN=Re(e3);/**
|
|
505
|
+
* @license lucide-react v1.47.0 - ISC
|
|
506
|
+
*
|
|
507
|
+
* This source code is licensed under the ISC license.
|
|
508
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
509
|
+
*/const t3={name:"unfold-vertical",size:24,node:[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]]};t3.node;const fN=Re(t3);/**
|
|
510
|
+
* @license lucide-react v1.47.0 - ISC
|
|
511
|
+
*
|
|
512
|
+
* This source code is licensed under the ISC license.
|
|
513
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
514
|
+
*/const n3={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};n3.node;const hN=Re(n3);/**
|
|
515
|
+
* @license lucide-react v1.47.0 - ISC
|
|
516
|
+
*
|
|
517
|
+
* This source code is licensed under the ISC license.
|
|
518
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
519
|
+
*/const i3={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};i3.node;const mN=Re(i3);/**
|
|
520
|
+
* @license lucide-react v1.47.0 - ISC
|
|
521
|
+
*
|
|
522
|
+
* This source code is licensed under the ISC license.
|
|
523
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
524
|
+
*/const a3={name:"utensils",size:24,node:[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],aliases:["fork-knife"]};a3.node;const pN=Re(a3);/**
|
|
525
|
+
* @license lucide-react v1.47.0 - ISC
|
|
526
|
+
*
|
|
527
|
+
* This source code is licensed under the ISC license.
|
|
528
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
529
|
+
*/const r3={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};r3.node;const gN=Re(r3);/**
|
|
530
|
+
* @license lucide-react v1.47.0 - ISC
|
|
531
|
+
*
|
|
532
|
+
* This source code is licensed under the ISC license.
|
|
533
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
534
|
+
*/const l3={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};l3.node;const zo=Re(l3),s3={list:(e,n)=>Se(`/bots/${e}/activity${n===void 0?"":`?before=${encodeURIComponent(n)}`}`),message:(e,n)=>Se(`/bots/${e}/activity/messages/${n}`)};function o3(e){var n,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(a=o3(e[n]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function vN(){for(var e,n,a=0,r="",o=arguments.length;a<o;a++)(e=arguments[a])&&(n=o3(e))&&(r&&(r+=" "),r+=n);return r}const Hx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qx=vN,S1=(e,n)=>a=>{var r;if((n==null?void 0:n.variants)==null)return qx(e,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:o,defaultVariants:c}=n,d=Object.keys(o).map(g=>{const v=a==null?void 0:a[g],p=c==null?void 0:c[g];if(v===null)return null;const j=Hx(v)||Hx(p);return o[g][j]}),f=a&&Object.entries(a).reduce((g,v)=>{let[p,j]=v;return j===void 0||(g[p]=j),g},{}),h=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((g,v)=>{let{class:p,className:j,...b}=v;return Object.entries(b).every(k=>{let[S,N]=k;return Array.isArray(N)?N.includes({...c,...f}[S]):{...c,...f}[S]===N})?[...g,p,j]:g},[]);return qx(e,d,h,a==null?void 0:a.class,a==null?void 0:a.className)},c3=48,ir=(e,n=0)=>{const a=new Int32Array(e.length);for(let r=0;r<e.length;r++)a[r]=e.charCodeAt(r)-c3-n;return a},Mf=e=>{const n=new Int32Array(e.length+1);for(let a=0;a<e.length;a++)n[a+1]=n[a]+e[a];return n},_l=e=>{const n=new Int32Array(e.length);let a=0;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r)-c3;a+=o>>>1^-(o&1),n[r]=a}return n},yN=384,xN=[],ys=Mf(ir("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),bN=Mf(ir(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),jN="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",wN=(()=>{const e=ys.length-1,n=new Int32Array(e);for(let o=e-1;o>=0;o--){let c=1,d=o+1;for(let f=ys[o];f<ys[o+1];f++)c+=n[d],d+=n[d];n[o]=c}const a=new Int32Array(ys[e]);let r=0;for(let o=0;o<e;o++){let c=o+1;for(let d=ys[o];d<ys[o+1];d++)a[r++]=c,c+=n[c]}return a})(),kN=ir("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),SN=Mf(ir("123333359346463635126536711576")),CN=ir("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),NN=ir("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),EN=_l("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),TN=(()=>{const e=new Int32Array(319).fill(-1),n=_l("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),a=_l("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let r=0;r<n.length;r++)e[n[r]]=a[r];return e})(),MN="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const n=e.split(" "),a=n.shift();for(let r=0;r<n.length;r++)n[r]=a+n[r];return n}),Fx=_l("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),AN=_l("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),_N=_l("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±"),u3=new Int32Array(995),d3=new Int32Array(995),f3=new Int32Array(995);let w0="";const k0=new Int32Array(1038);{const e=new Map;let n=0,a=0;for(let r=0;r<Fx.length;r++)for(const o of MN[_N[r]]){let c=e.get(o);c===void 0&&(c=n++,e.set(o,c),k0[c*2]=w0.length,k0[c*2+1]=o.length,w0+=o),u3[a]=Fx[r],d3[a]=AN[r],f3[a]=c,a++}}const RN=_l("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),zN=Mf(ir("1::24444432:442:44:44>222222:44:4421322511111311111114")),ON=_l("24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222"),DN=ir("ij"),LN=ir(""),BN=ir("1"),IN="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var PN={GROUP_COUNT:yN,customValidatorNames:xN,edgeStart:ys,labelStart:bN,labelText:jN,edgeTarget:wN,nodeGroup:kN,nodeVlist:TN,vlistPat:SN,vlistOps:CN,vlistRef:NN,vlistGroup:EN,litAnchor:u3,litGroup:d3,litPool:f3,poolOffsets:k0,poolText:w0,adjGid:RN,adjStart:zN,adjTgt:ON,patGid:DN,patTgt:LN,postfixLookupGroups:BN,orderSensitiveModifiers:IN};const HN="line"in new Error,Va=-1,hs=-1,kp=(e,n,a)=>{let r=2166136261;for(let o=n;o<a;o++)r=Math.imul(r^e.charCodeAt(o),16777619);return r},Jd=(e,n,a)=>{const r=a-n;let o=Math.imul(r,2654435761)^e.charCodeAt(n);if(r>3){const c=r>>2,d=r>>1;o=Math.imul(o^e.charCodeAt(n+1)<<8^e.charCodeAt(n+2)<<16^e.charCodeAt(n+c),2246822507),o=Math.imul(o^e.charCodeAt(n+d)<<8^e.charCodeAt(n+d+c)<<16^e.charCodeAt(a-3),3266489909),o^=e.charCodeAt(a-2)<<8^e.charCodeAt(a-1)<<16;for(let f=n+3,h=a-4;f<n+8&&f<h;f++,h--)o=Math.imul(o^e.charCodeAt(f)^e.charCodeAt(h)<<8,16777619)}return o^o>>>15|0},qN=(e,n,a={})=>{const{GROUP_COUNT:r,edgeStart:o,labelStart:c,labelText:d,edgeTarget:f,nodeGroup:h,nodeVlist:g,vlistPat:v,vlistOps:p,vlistRef:j,vlistGroup:b,litAnchor:k,litGroup:S,litPool:N,poolOffsets:C,poolText:M,adjGid:E,adjStart:T,adjTgt:R,patGid:_,patTgt:z,postfixLookupGroups:P,customValidatorNames:H,orderSensitiveModifiers:O}=e,I=new Int32Array(r).fill(-1);for(let ue=0;ue<E.length;ue++)I[E[ue]]=ue;let $=0;for(let ue=0;ue+1<T.length;ue++){const ke=T[ue+1]-T[ue];ke>$&&($=ke)}let Q=32;for(;Q<2*(1+$+_.length);)Q<<=1;const Y=new Int32Array(j.length+1);for(let ue=0;ue<j.length;ue++)Y[ue+1]=Y[ue]+v[j[ue]+1]-v[j[ue]];const q=new Uint8Array(r);for(let ue=0;ue<P.length;ue++)q[P[ue]]=1;const K=o.length-1,V=new Uint8Array(K);let X=0,Z=!0;for(let ue=0;ue<k.length;ue++){V[k[ue]]=1;const ke=C[N[ue]*2+1];ke>X&&(X=ke);const je=M.charCodeAt(C[N[ue]*2]);(je===91||je===40)&&(Z=!1)}let D=1;for(;D<k.length*2;)D<<=1;const se=new Int32Array(D).fill(-1);for(let ue=0;ue<k.length;ue++){const ke=C[N[ue]*2];let je=(kp(M,ke,ke+C[N[ue]*2+1])^Math.imul(k[ue],2654435761)|0)&D-1;for(;se[je]!==-1;)je=je+1&D-1;se[je]=ue}const ne=(ue,ke,je,De)=>{let it=(kp(ke,je,De)^Math.imul(ue,2654435761)|0)&D-1;const et=De-je;for(;;){const st=se[it];if(st===-1)return-1;if(k[st]===ue&&C[N[st]*2+1]===et){const yt=C[N[st]*2];let _t=!0;for(let Ye=0;Ye<et;Ye++)if(M.charCodeAt(yt+Ye)!==ke.charCodeAt(je+Ye)){_t=!1;break}if(_t)return S[st]}it=it+1&D-1}},B=a.cacheSize??8192,F=a.prefix??e.prefix??"",ee=F===""?"":F+":",W=ee.length,de=(H??[]).map(ue=>{throw new Error("cn: missing validator "+ue)}),oe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,be=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,we=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let re=0,Ce=-1,Ve=-1,He=-1,Ze=-1;const Fe=ue=>ue>=97&&ue<=122||ue>=65&&ue<=90||ue>=48&&ue<=57||ue===95,Ke=ue=>/\s/.test(String.fromCharCode(ue)),gt=(ue,ke,je)=>{if(re=0,Ce=-1,je-ke<3)return;const De=ue.charCodeAt(ke),it=ue.charCodeAt(je-1);if(De===91&&it===93)re=1;else if(De===40&&it===41)re=2;else return;He=ke+1,Ze=je-1;let et=ke+1;if(Fe(ue.charCodeAt(et))){for(et++;et<je-1;){const st=ue.charCodeAt(et);if(!Fe(st)&&st!==45)break;et++}et<je-2&&ue.charCodeAt(et)===58&&(Ce=ke+1,Ve=et,He=et+1)}},qt=(ue,ke,je,De)=>{if(je-ke!==De.length)return!1;for(let it=0;it<De.length;it++)if(ue.charCodeAt(ke+it)!==De.charCodeAt(it))return!1;return!0},Zt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,en=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kn=ue=>!!ue&&!Number.isNaN(Number(ue)),vn=(ue,ke,je)=>{if(je-ke<11||!qt(ue,ke,ke+10,"@container"))return!1;if(ue.charCodeAt(ke+10)===47)return je-ke>=12;const De=ue.charCodeAt(ke+11);return De===115&&je-ke>=17&&qt(ue,ke+10,ke+16,"-size/")||De===110&&je-ke>=19&&qt(ue,ke+10,ke+18,"-normal/")},rn=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],ge="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(ue=>ue.split(" ")),Me=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Xe=(ue,ke,je,De)=>{if(ue>=10){if(ue>=25)return de[ue-25](ke.slice(je,De));const it=ue-10;if(re!==rn[it])return!1;if(Ce>=0){for(const et of ge[it])if(qt(ke,Ce,Ve,et))return!0;return!1}switch(Me[it]){case 0:return!1;case 1:return!0;case 2:{const et=ke.slice(He,Ze);return oe.test(et)&&!be.test(et)}case 3:return kn(ke.slice(He,Ze));case 4:return ve.test(ke.slice(He,Ze));default:return we.test(ke.slice(He,Ze))}}switch(ue){case 0:return!0;case 1:return re===0;case 2:return re===1;case 3:return re===2;case 4:return Zt.test(ke.slice(je,De));case 5:return kn(ke.slice(je,De));case 6:{const it=ke.slice(je,De);return!!it&&Number.isInteger(Number(it))}case 7:return De>je&&ke.charCodeAt(De-1)===37&&kn(ke.slice(je,De-1));case 8:return en.test(ke.slice(je,De));default:return vn(ke,je,De)}},Je=new Set(typeof O=="string"?O.split(" "):O),rt=(ue,ke,je,De,it,et)=>{const st=kp(ke,je,De)^(it?2654435769:0)|0;let yt=ue.get(st);if(yt!==void 0)e:for(let nt=0;nt<yt.length;nt++){const xt=yt[nt];if(!(xt.imp!==it||xt.k.length!==De-je)){for(let Ge=0;Ge<xt.k.length;Ge++)if(xt.k.charCodeAt(Ge)!==ke.charCodeAt(je+Ge))continue e;return xt.id}}else ue.set(st,yt=[]);const _t=ke.slice(je,De),Ye=et(_t);return yt.push({k:_t,imp:it,id:Ye}),Ye};let Jt=new Map,An=new Map,dn=2;const Ln=4096,me=(ue,ke)=>{const je=[];let De=0,it=0,et=0;for(let Ye=0;Ye<ue.length;Ye++){const nt=ue.charCodeAt(Ye);De===0&&it===0&&nt===58?(je.push(ue.slice(et,Ye)),et=Ye+1):nt===91?De++:nt===93?De--:nt===40?it++:nt===41&&it--}je.push(ue.slice(et));let st=je[0];if(je.length>1){const Ye=[];let nt=[];for(const xt of je)xt.charCodeAt(0)===91||Je.has(xt)?(nt.length&&(Ye.push(...nt.sort()),nt=[]),Ye.push(xt)):nt.push(xt);nt.length&&Ye.push(...nt.sort()),st=Ye.join(":")}const yt=ke?st+" !":st;let _t=An.get(yt);return _t===void 0&&An.set(yt,_t=dn++),_t};let Ne=new Map,_e=r;const Be=r+4096,Oe=()=>_e++,dt=2097152,ti=8192,_n=new Int32Array(ti),yn=new Array(ti).fill(null),sr=new Int32Array(ti),Ra=new Int32Array(ti),Kr=new Uint8Array(ti);let or=0;const Gt=(ue,ke,je,De,it,et,st,yt)=>{let _t=ue;if(yn[ue]!==null)if(yn[ue|1]===null)_t=ue|1;else if((or++&3)===0)_t=ue|or>>2&1;else return;yn[_t]=ke.slice(je,De),_n[_t]=it,sr[_t]=et,Ra[_t]=st,Kr[_t]=yt},xn=()=>yn.fill(null);let Yt=256,ln=[new Int32Array(Yt),new Int32Array(Yt),new Int32Array(Yt),new Int32Array(Yt)],[Ii,Ci,ha,Ni]=ln,Pi=new Uint8Array(Yt),ui=new Uint8Array(Yt);const Ji=()=>{Yt*=2,ln=ln.map(ke=>{const je=new Int32Array(Yt);return je.set(ke),je}),[Ii,Ci,ha,Ni]=ln;const ue=new Uint8Array(Yt);ue.set(Pi),Pi=ue,ui=new Uint8Array(Yt)};let ft=64,ni=new Int32Array(ft),za=new Int32Array(ft);const cr=new Int32Array(r);let di=2048,fi=21,ma=new Float64Array(di),$n=new Int32Array(di),hi=0;const ur=(ue,ke)=>{if(ue===0&&ke<r)return cr[ke]===hi?1:(cr[ke]=hi,0);const je=ue*2097152+ke+1;let De=Math.imul(je,2654435761)>>>fi;for(;$n[De]===hi;){if(ma[De]===je)return 1;De=De+1&di-1}return ma[De]=je,$n[De]=hi,0},dr=(ue,ke,je,De,it)=>{if(je-ke>=2&&ue.charCodeAt(ke)===91&&ue.charCodeAt(je-1)===93){let et=-1;for(let st=ke+1;st<je-1;st++)if(ue.charCodeAt(st)===58){et=st;break}return et===-1||et===ke+1?Va:rt(Ne,ue,ke+1,et,0,Oe)}if(De>=0&&h[De]>=0)return h[De];for(let et=it-1;et>=0;et--){const st=za[et];if(st>je)continue;const yt=ni[et],_t=je-st;if(V[yt]===1&&_t>0&&_t<=X){const Ot=ue.charCodeAt(st);if(Z===!1||Ot!==91&&Ot!==40){const pi=ne(yt,ue,st,je);if(pi>=0)return pi}}const Ye=g[yt];if(Ye<0)continue;const nt=j[Ye],xt=v[nt],Ge=v[nt+1];if(xt===Ge)continue;gt(ue,st,je);const bn=Y[Ye]-xt;for(let Ot=xt;Ot<Ge;Ot++)if(Xe(p[Ot],ue,st,je))return b[bn+Ot]}return Va},pa=ue=>{const ke=ue.length;let je=0,De=0,it=!1;(dn>Ln||Jt.size>Ln)&&(Jt=new Map,An=new Map,dn=2,xn()),_e>Be&&(Ne=new Map,_e=r,xn());let et=0;for(;et<ke;){let Ye=ue.charCodeAt(et);if(Ye===32||Ye>=9&&Ye<=13||Ye>=160&&Ke(Ye)){Ye!==32&&(it=!0),et++;continue}const nt=et;let xt=0;for(;et<ke;){if(Ye=ue.charCodeAt(et),Ye<=32){if(Ye===32)break;if(Ye>=9&&Ye<=13){it=!0;break}}else if(Ye>=160&&Ke(Ye)){it=!0;break}xt=Math.imul(xt^Ye,16777619),et++}const Ge=et,bn=Ge-nt;je===Yt&&Ji();const Ot=je++;Ii[Ot]=nt,Ci[Ot]=Ge,De+=bn,xt^=Math.imul(bn,2654435761);const pi=xt^xt>>>15|0,fn=pi&8190;{let Et=-1;if(_n[fn]===pi&&yn[fn]!==null&&yn[fn].length===bn?Et=fn:_n[fn|1]===pi&&yn[fn|1]!==null&&yn[fn|1].length===bn&&(Et=fn|1),Et>=0){const In=yn[Et];let ta=!0;for(let qi=0;qi<bn;qi++)if(In.charCodeAt(qi)!==ue.charCodeAt(nt+qi)){ta=!1;break}if(ta){ha[Ot]=sr[Et],Ni[Ot]=Ra[Et],Pi[Ot]=Kr[Et];continue}}}let sn=nt;if(W!==0){if(Ge-nt<=W||!ue.startsWith(ee,nt)){ha[Ot]=Va,Gt(fn,ue,nt,Ge,pi,Va,0,0);continue}sn=nt+W}let mr=0,Wr=0,ea=-1,pr=-1;for(let Et=sn;Et<Ge;Et++){const In=ue.charCodeAt(Et);if(mr===0&&Wr===0){if(In===58){ea=Et;continue}if(In===47){pr=Et;continue}}In===91?mr++:In===93?mr--:In===40?Wr++:In===41&&Wr--}const ql=ea>=sn?ea+1:sn;let U=ql,pe=Ge,Ae=!1,ot=0;pe>U&&ue.charCodeAt(pe-1)===33?(Ae=!0,pe--):pe>U&&ue.charCodeAt(U)===33&&(Ae=!0,U++,ot=1);let ht=-1;pr>ql&&(ht=pr+ot,ht>=pe&&(ht=-1));let hn=U;pe-U>1&&ue.charCodeAt(U)===45&&(hn=U+1);let Ue=0,mt=0,Ft=0,Kt=-1,mn=0;(g[0]>=0||V[0]===1)&&(ni[0]=0,za[0]=hn,mn=1);let Bn=hs,ai=0;for(let Et=hn;Et<pe;Et++)if(Et===ht&&(Bn=mt<Ft?hs:Ue,ai=mn),Ue!==hs){const In=ue.charCodeAt(Et);let ta=-1;if(mt<Ft)d.charCodeAt(mt)===In?(mt++,mt===Ft&&(ta=Ue=Kt)):Ue=hs;else{const qi=o[Ue],$l=o[Ue+1];let gr=hs;for(let Gn=qi;Gn<$l;Gn++){const Vl=c[Gn];if(d.charCodeAt(Vl)===In){c[Gn+1]-Vl===1?ta=gr=f[Gn]:(mt=Vl+1,Ft=c[Gn+1],Kt=f[Gn],gr=Ue);break}}Ue=gr}if(ta>=0&&(g[ta]>=0||V[ta]===1)&&Et+1<pe&&ue.charCodeAt(Et+1)===45){if(mn===ft){ft*=2;const qi=new Int32Array(ft);qi.set(ni),ni=qi;const $l=new Int32Array(ft);$l.set(za),za=$l}ni[mn]=ta,za[mn]=Et+2,mn++}}ht===pe&&(Bn=mt<Ft?hs:Ue,ai=mn);const Fo=mt<Ft?hs:Ue;let Vn,gi=!1;if(ht>=0)if(gi=!0,Vn=dr(ue,U,ht,Bn,ai),Vn!==Va&&Vn<r&&q[Vn]){const Et=dr(ue,U,pe,Fo,mn);Et!==Va&&Et!==Vn&&(Vn=Et,gi=!1)}else Vn===Va&&(Vn=dr(ue,U,pe,Fo,mn),gi=!1);else Vn=dr(ue,U,pe,Fo,mn);let Fl=0,Ul=0;Vn===Va?ha[Ot]=Va:(Ul=gi?1:0,Fl=sn>=ea?Ae?1:0:rt(Jt,ue,sn,ea,Ae?1:0,Et=>me(Et,Ae)),ha[Ot]=Vn,Pi[Ot]=Ul,Ni[Ot]=Fl),Gt(fn,ue,nt,Ge,pi,Vn,Fl,Ul)}if(je===0)return"";if(je===1)return Ii[0]===0&&Ci[0]===ke?ue:ue.slice(Ii[0],Ci[0]);if(je*Q>di){for(;je*Q>di;)di<<=1,fi--;ma=new Float64Array(di),$n=new Int32Array(di)}if(dn>=dt||_e>=dt)throw new Error("cn: too many distinct classes in one merge");hi=hi+1|0,hi===0&&(cr.fill(0),$n.fill(0),hi=1);let st=!1;for(let Ye=je-1;Ye>=0;Ye--){const nt=ha[Ye];if(nt===Va){ui[Ye]=1;continue}const xt=Ni[Ye];if(ur(xt,nt)===1){ui[Ye]=0,st=!0;continue}if(ui[Ye]=1,nt<r){const Ge=I[nt];if(Ge>=0)for(let bn=T[Ge];bn<T[Ge+1];bn++)ur(xt,R[bn]);if(Pi[Ye]&1)for(let bn=0;bn<_.length;bn++)_[bn]===nt&&ur(xt,z[bn])}}if(!st&&!it&&ke===De+je-1)return ue;let yt="",_t=0;for(;_t<je;){if(!ui[_t]){_t++;continue}const Ye=Ii[_t];let nt=Ci[_t],xt=_t+1;for(;xt<je&&ui[xt]&&Ii[xt]===nt+1&&ue.charCodeAt(nt)===32;)nt=Ci[xt],xt++;yt.length>0&&(yt+=" "),yt+=ue.slice(Ye,nt),_t=xt}return yt},mi=16384,Ei=new Int32Array(mi*2);let fr=0,tn=1,Wt=Object.create(null),Rn=Object.create(null),ii=new Map,Hl=new Map,Xr=0,Qr=0;const Oa=()=>{fr^=mi,tn=tn+1|0,Qr=0},hr=ue=>{let ke=Wt[ue];if(ke!==void 0)return ke;const je=Jd(ue,0,ue.length),De=(je&16383)+fr,it=Ei[De]===(je^tn)||Ei[De^mi]===(je^tn-1);return it&&(ke=Rn[ue],ke!==void 0)?(Wt[ue]=ke,ke):(ke=pa(ue),it?(Wt[ue]=ke,++Xr>B&&(Xr=0,Rn=Wt,Wt=Object.create(null),Oa())):(Ei[De]=je^tn,++Qr>mi&&Oa()),ke)},Zr=ue=>{let ke=ii.get(ue);if(ke!==void 0)return ke;const je=Jd(ue,0,ue.length),De=(je&16383)+fr,it=Ei[De]===(je^tn)||Ei[De^mi]===(je^tn-1);return it&&(ke=Hl.get(ue),ke!==void 0)?(ii.set(ue,ke),ke):(ke=pa(ue),it?(ii.set(ue,ke),++Xr>B&&(Xr=0,Hl=ii,ii=new Map,Oa())):(Ei[De]=je^tn,++Qr>mi&&Oa()),ke)},Jr=ue=>{const ke=Jd(ue,0,ue.length),je=(ke&16383)+fr;return Ei[je]===(ke^tn)||Ei[je^mi]===(ke^tn-1)?!0:(Ei[je]=ke^tn,++Qr>mi&&Oa(),!1)},Hi=B===0?pa:HN?ue=>{const ke=ii.get(ue);return ke!==void 0?ke:Zr(ue)}:hr;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Hi(arguments[0]):Hi(UN.apply(null,arguments))},mergeString:Hi,seenBefore:B===0?()=>!1:Jr,mergeUncached:pa}},cf=(e,n)=>{if(!e)return"";if(typeof e=="string")return e;let a="";if(typeof e.length=="number"&&(!n||Array.isArray(e))){const r=e;for(let o=0;o<r.length;o++){const c=r[o];if(!c)continue;const d=typeof c=="string"?c:cf(c,n);d&&(a&&(a+=" "),a+=d)}return a}if(n){if(typeof e=="number")return""+e;if(typeof e=="object")for(const r in e)e[r]&&(a&&(a+=" "),a+=r)}return a},FN=(e,n)=>{let a="";for(let r=0;r<e.length;r++){const o=e[r];if(!o)continue;const c=typeof o=="string"?o:cf(o,n);c&&(a&&(a+=" "),a+=c)}return a},UN=function(){return FN(arguments,!1)},$N=256,Ux=16,VN=1024,Sp=4096,GN=(e,n)=>{const a=n===void 0?()=>!0:n.seenBefore,r=n===void 0?e:n.mergeUncached;let o=new Map,c=new Map,d=0,f=null,h=null,g=[],v=[],p=0;const j=(C,M,E)=>{h===null&&(h=new Array(Sp).fill(""),g=new Array(Sp).fill(""),v=new Array(Sp).fill(""));const T=Jd(C,0,C.length)&4094;if(h[T]===C&&g[T]===M)return v[T];if(h[T|1]===C&&g[T|1]===M)return v[T|1];const R=e(E?M+" "+C:C),_=h[T]===""?T:T|(h[T|1]===""?1:p++&1);return h[_]=C,g[_]=M,v[_]=R,R},b=(C,M,E,T)=>{let R=0;if(M){if(M!==C.a0)return!1;R=1}if(E){if(E!==(R===0?C.a0:C.a1))return!1;R++}if(T){if(T!==(R===0?C.a0:R===1?C.a1:C.a2))return!1;R++}return R===C.t},k=(C,M)=>{const E=C.a;let T=0;for(let R=0;R<M.length;R++){const _=M[R];if(_){if(_!==E[T])return!1;T++}}return T===C.t},S=(C,M)=>{const E=C.length,T=f===null?null:f.n;if(!M){if(T!==null&&k(T,C))return f=T,T.r;if(f!==null&&f!==T&&k(f,C))return f.r}let R="",_=-1,z=0,P=!1;for(let I=0;I<E;I++){let $=C[I];if($){if(typeof $!="string"){if($=C[I]=cf($,!0),!$)continue;P=!0}_<0&&(R=$,_=I),z++}}if(z===0)return"";if(z===1)return e(R);if(P){if(T!==null&&k(T,C))return f=T,T.r;if(f!==null&&f!==T&&k(f,C))return f.r}let H=o.get(R);H===void 0&&(H=c.get(R),H!==void 0&&o.set(R,H));let O=null;if(H!==void 0){if(H.skip>0){H.skip--,f=null;let $=R;for(let Q=_+1;Q<E;Q++){const Y=C[Q];Y&&($+=" "+Y)}return j($,"",!1)}const I=H.e;e:for(let $=0;$<I.length;$++){const Q=I[$];if(Q.t!==z)continue;const Y=Q.a;let q=1;for(let K=_+1;K<E;K++){const V=C[K];if(V&&V!==Y[q++])continue e}O=Q;break}O!==null&&(H.miss=0)}if(O===null){let I=R;const $=[R];for(let Y=_+1;Y<E;Y++){const q=C[Y];q&&(I+=" "+q,$.push(q))}if(!a(I))return r(I);O={r:e(I),t:$.length,a0:$[0],a1:$[1],a2:$[2]??"",a:$,n:null},H===void 0?o.set(R,H={e:[],miss:0,skip:0,at:0}):++H.miss>Ux&&(H.miss=Ux,H.skip=VN,H.e.length=0,H.at=0);const Q=H.e;Q.length<$N?Q.push(O):(Q[H.at]=O,H.at=H.at+1&255),++d>1e3&&(d=0,c=o,o=new Map)}return f!==null&&f!==O&&(f.n=O),f=O,O.r},N=C=>Array.isArray(C)?S(C.slice(),!1):e(cf(C,!0));return function(C,M,E){const T=arguments.length;if((T|1)===3){const z=f;if(z!==null){const P=z.n;if(P!==null&&b(P,C,M,E))return f=P,P.r;if(z!==P&&b(z,C,M,E))return z.r}if(T===2&&typeof M=="string"&&M!==""){const P=o.get(C);if(P!==void 0&&P.skip>0)return P.skip--,f=null,j(M,C,!0)}return S([C,M,E],!0)}if(T===1)return typeof C=="string"?e(C):N(C);const R=f;if(R!==null){const z=R.n;if(z!==null){const P=z.a;let H=0,O=!0;for(let I=0;I<T;I++){const $=arguments[I];if($){if($!==P[H]){O=!1;break}H++}}if(O&&H===z.t)return f=z,z.r}if(R!==z){const P=R.a;let H=0,O=!0;for(let I=0;I<T;I++){const $=arguments[I];if($){if($!==P[H]){O=!1;break}H++}}if(O&&H===R.t)return R.r}}const _=[];for(let z=0;z<T;z++)_.push(arguments[z]);return S(_,!0)}},$x=qN(PN),Dn=GN($x.mergeString,$x);var Ol=h4(),YN=Object.defineProperty,C1=(e,n)=>YN(e,"name",{value:n,configurable:!0});function S0(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}C1(S0,"setRef");function h3(...e){return n=>{let a=!1;const r=e.map(o=>{const c=S0(o,n);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let o=0;o<r.length;o++){const c=r[o];typeof c=="function"?c():S0(e[o],null)}}}}C1(h3,"composeRefs");function It(...e){return w.useCallback(h3(...e),e)}C1(It,"useComposedRefs");var KN=Object.defineProperty,Ma=(e,n)=>KN(e,"name",{value:n,configurable:!0});function er(e){const n=w.forwardRef((a,r)=>{let{children:o,...c}=a,d=null,f=!1;const h=[];C0(o)&&typeof Ed=="function"&&(o=Ed(o._payload)),w.Children.forEach(o,j=>{var b;if(v3(j)){f=!0;const k=j;let S="child"in k.props?k.props.child:k.props.children;C0(S)&&typeof Ed=="function"&&(S=Ed(S._payload)),d=ZN(k,S),h.push((b=d==null?void 0:d.props)==null?void 0:b.children)}else h.push(j)}),d?d=w.cloneElement(d,void 0,h):!f&&w.Children.count(o)===1&&w.isValidElement(o)&&(d=o);const g=d?g3(d):void 0,v=It(r,g);if(!d){if(o||o===0)throw new Error(f?eE(e):WN(e));return o}const p=p3(c,d.props??{});return d.type!==w.Fragment&&(p.ref=r?v:g),w.cloneElement(d,p)});return n.displayName=`${e}.Slot`,n}Ma(er,"createSlot");var XN=er("Slot"),m3=Symbol.for("radix.slottable");function QN(e){const n=Ma(a=>"child"in a?a.children(a.child):a.children,"Slottable");return n.displayName=`${e}.Slottable`,n.__radixId=m3,n}Ma(QN,"createSlottable");var ZN=Ma((e,n)=>{if("child"in e.props){const a=e.props.child;return w.isValidElement(a)?w.cloneElement(a,void 0,e.props.children(a.props.children)):null}return w.isValidElement(n)?n:null},"getSlottableElementFromSlottable");function p3(e,n){const a={...n};for(const r in n){const o=e[r],c=n[r];/^on[A-Z]/.test(r)?o&&c?a[r]=(...f)=>{const h=c(...f);return o(...f),h}:o&&(a[r]=o):r==="style"?a[r]={...o,...c}:r==="className"&&(a[r]=[o,c].filter(Boolean).join(" "))}return{...e,...a}}Ma(p3,"mergeProps");function g3(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}Ma(g3,"getElementRef");function v3(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===m3}Ma(v3,"isSlottable");var JN=Symbol.for("react.lazy");function C0(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===JN&&"_payload"in e&&y3(e._payload)}Ma(C0,"isLazyComponent");function y3(e){return typeof e=="object"&&e!==null&&"then"in e}Ma(y3,"isPromiseLike");var WN=Ma(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),eE=Ma(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Ed=Zc[" use ".trim().toString()],tE=Object.defineProperty,nE=(e,n)=>tE(e,"name",{value:n,configurable:!0}),iE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],an=iE.reduce((e,n)=>{const a=er(`Primitive.${n}`),r=w.forwardRef((o,c)=>{const{asChild:d,...f}=o,h=d?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(h,{...f,ref:c})});return r.displayName=`Primitive.${n}`,{...e,[n]:r}},{});function x3(e,n){e&&Ol.flushSync(()=>e.dispatchEvent(n))}nE(x3,"dispatchDiscreteCustomEvent");var aE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),rE=Object.defineProperty,da=(e,n)=>rE(e,"name",{value:n,configurable:!0});function lE(e,n){const a=w.createContext(n);a.displayName=e+"Context";const r=da(c=>{const{children:d,...f}=c,h=w.useMemo(()=>f,Object.values(f));return l.jsx(a.Provider,{value:h,children:d})},"Provider");r.displayName=e+"Provider";function o(c,d={}){const{optional:f=!1}=d,h=w.useContext(a);if(h)return h;if(n!==void 0)return n;if(!f)throw new Error(`\`${c}\` must be used within \`${e}\``)}return da(o,"useContext"),[r,o]}da(lE,"createContext");function Dl(e,n=[]){let a=[];function r(c,d){const f=w.createContext(d);f.displayName=c+"Context";const h=a.length;a=[...a,d];const g=da(p=>{var C;const{scope:j,children:b,...k}=p,S=((C=j==null?void 0:j[e])==null?void 0:C[h])||f,N=w.useMemo(()=>k,Object.values(k));return l.jsx(S.Provider,{value:N,children:b})},"Provider");g.displayName=c+"Provider";function v(p,j,b={}){var C;const{optional:k=!1}=b,S=((C=j==null?void 0:j[e])==null?void 0:C[h])||f,N=w.useContext(S);if(N)return N;if(d!==void 0)return d;if(!k)throw new Error(`\`${p}\` must be used within \`${c}\``)}return da(v,"useContext"),[g,v]}da(r,"createContext");const o=da(()=>{const c=a.map(d=>w.createContext(d));return da(function(f){const h=(f==null?void 0:f[e])||c;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])},"useScope")},"createScope");return o.scopeName=e,[r,b3(o,...n)]}da(Dl,"createContextScope");function b3(...e){const n=e[0];if(e.length===1)return n;const a=da(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return da(function(c){const d=r.reduce((f,{useScope:h,scopeName:g})=>{const p=h(c)[`__scope${g}`];return{...f,...p}},{});return w.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return a.scopeName=n.scopeName,a}da(b3,"composeContextScopes");var sE=Object.defineProperty,Un=(e,n)=>sE(e,"name",{value:n,configurable:!0});function j3(e){const n=e+"CollectionProvider",[a,r]=Dl(n),[o,c]=a(n,{collectionRef:{current:null},itemMap:new Map}),d=Un(S=>{const{scope:N,children:C}=S,M=w.useRef(null),E=w.useRef(new Map).current;return l.jsx(o,{scope:N,itemMap:E,collectionRef:M,children:C})},"CollectionProvider");d.displayName=n;const f=e+"CollectionSlot",h=er(f),g=w.forwardRef((S,N)=>{const{scope:C,children:M}=S,E=c(f,C),T=It(N,E.collectionRef);return l.jsx(h,{ref:T,children:M})});g.displayName=f;const v=e+"CollectionItemSlot",p="data-radix-collection-item",j=er(v),b=w.forwardRef((S,N)=>{const{scope:C,children:M,...E}=S,T=w.useRef(null),R=It(N,T),_=c(v,C);return w.useEffect(()=>(_.itemMap.set(T,{ref:T,...E}),()=>void _.itemMap.delete(T))),l.jsx(j,{[p]:"",ref:R,children:M})});b.displayName=v;function k(S){const N=c(e+"CollectionConsumer",S);return w.useCallback(()=>{const M=N.collectionRef.current;if(!M)return[];const E=Array.from(M.querySelectorAll(`[${p}]`));return Array.from(N.itemMap.values()).sort((_,z)=>E.indexOf(_.ref.current)-E.indexOf(z.ref.current))},[N.collectionRef,N.itemMap])}return Un(k,"useCollection"),[{Provider:d,Slot:g,ItemSlot:b},k,r]}Un(j3,"createCollection");var Vx=new WeakMap,Tn,Qi,Cp=(Qi=class extends Map{constructor(a){super(a);Tx(this,Tn);pp(this,Tn,[...super.keys()]),Vx.set(this,!0)}set(a,r){return Vx.get(this)&&(this.has(a)?li(this,Tn)[li(this,Tn).indexOf(a)]=a:li(this,Tn).push(a)),super.set(a,r),this}insert(a,r,o){const c=this.has(r),d=li(this,Tn).length,f=N1(a);let h=f>=0?f:d+f;const g=h<0||h>=d?-1:h;if(g===this.size||c&&g===this.size-1||g===-1)return this.set(r,o),this;const v=this.size+(c?0:1);f<0&&h++;const p=[...li(this,Tn)];let j,b=!1;for(let k=h;k<v;k++)if(h===k){let S=p[k];p[k]===r&&(S=p[k+1]),c&&this.delete(r),j=this.get(S),this.set(r,o)}else{!b&&p[k-1]===r&&(b=!0);const S=p[b?k:k-1],N=j;j=this.get(S),this.delete(S),this.set(S,N)}return this}with(a,r,o){const c=new Qi(this);return c.insert(a,r,o),c}before(a){const r=li(this,Tn).indexOf(a)-1;if(!(r<0))return this.entryAt(r)}setBefore(a,r,o){const c=li(this,Tn).indexOf(a);return c===-1?this:this.insert(c,r,o)}after(a){let r=li(this,Tn).indexOf(a);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(a,r,o){const c=li(this,Tn).indexOf(a);return c===-1?this:this.insert(c+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return pp(this,Tn,[]),super.clear()}delete(a){const r=super.delete(a);return r&&li(this,Tn).splice(li(this,Tn).indexOf(a),1),r}deleteAt(a){const r=this.keyAt(a);return r!==void 0?this.delete(r):!1}at(a){const r=Wd(li(this,Tn),a);if(r!==void 0)return this.get(r)}entryAt(a){const r=Wd(li(this,Tn),a);if(r!==void 0)return[r,this.get(r)]}indexOf(a){return li(this,Tn).indexOf(a)}keyAt(a){return Wd(li(this,Tn),a)}from(a,r){const o=this.indexOf(a);if(o===-1)return;let c=o+r;return c<0&&(c=0),c>=this.size&&(c=this.size-1),this.at(c)}keyFrom(a,r){const o=this.indexOf(a);if(o===-1)return;let c=o+r;return c<0&&(c=0),c>=this.size&&(c=this.size-1),this.keyAt(c)}find(a,r){let o=0;for(const c of this){if(Reflect.apply(a,r,[c,o,this]))return c;o++}}findIndex(a,r){let o=0;for(const c of this){if(Reflect.apply(a,r,[c,o,this]))return o;o++}return-1}filter(a,r){const o=[];let c=0;for(const d of this)Reflect.apply(a,r,[d,c,this])&&o.push(d),c++;return new Qi(o)}map(a,r){const o=[];let c=0;for(const d of this)o.push([d[0],Reflect.apply(a,r,[d,c,this])]),c++;return new Qi(o)}reduce(...a){const[r,o]=a;let c=0,d=o??this.at(0);for(const f of this)c===0&&a.length===1?d=f:d=Reflect.apply(r,this,[d,f,c,this]),c++;return d}reduceRight(...a){const[r,o]=a;let c=o??this.at(-1);for(let d=this.size-1;d>=0;d--){const f=this.at(d);d===this.size-1&&a.length===1?c=f:c=Reflect.apply(r,this,[c,f,d,this])}return c}toSorted(a){const r=[...this.entries()].sort(a);return new Qi(r)}toReversed(){const a=new Qi;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),c=this.get(o);a.set(o,c)}return a}toSpliced(...a){const r=[...this.entries()];return r.splice(...a),new Qi(r)}slice(a,r){const o=new Qi;let c=this.size-1;if(a===void 0)return o;a<0&&(a=a+this.size),r!==void 0&&r>0&&(c=r-1);for(let d=a;d<=c;d++){const f=this.keyAt(d),h=this.get(f);o.set(f,h)}return o}every(a,r){let o=0;for(const c of this){if(!Reflect.apply(a,r,[c,o,this]))return!1;o++}return!0}some(a,r){let o=0;for(const c of this){if(Reflect.apply(a,r,[c,o,this]))return!0;o++}return!1}},Tn=new WeakMap,Un(Qi,"OrderedDict"),Qi);function Wd(e,n){if("at"in Array.prototype)return Array.prototype.at.call(e,n);const a=w3(e,n);return a===-1?void 0:e[a]}Un(Wd,"at");function w3(e,n){const a=e.length,r=N1(n),o=r>=0?r:a+r;return o<0||o>=a?-1:o}Un(w3,"toSafeIndex");function N1(e){return e!==e||e===0?0:Math.trunc(e)}Un(N1,"toSafeInteger");function oE(e){const n=e+"CollectionProvider",[a,r]=Dl(n),[o,c]=a(n,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Cp,setItemMap:Un(()=>{},"setItemMap")}),d=Un(({state:E,...T})=>E?l.jsx(h,{...T,state:E}):l.jsx(f,{...T}),"CollectionProvider");d.displayName=n;const f=Un(E=>{const T=N();return l.jsx(h,{...E,state:T})},"CollectionInit");f.displayName=n+"Init";const h=Un(E=>{const{scope:T,children:R,state:_}=E,z=w.useRef(null),[P,H]=w.useState(null),O=It(z,H),[I,$]=_;return w.useEffect(()=>{if(!P)return;const Q=C3(()=>{});return Q.observe(P,{childList:!0,subtree:!0}),()=>{Q.disconnect()}},[P]),l.jsx(o,{scope:T,itemMap:I,setItemMap:$,collectionRef:O,collectionRefObject:z,collectionElement:P,children:R})},"CollectionProviderImpl");h.displayName=n+"Impl";const g=e+"CollectionSlot",v=er(g),p=w.forwardRef((E,T)=>{const{scope:R,children:_}=E,z=c(g,R),P=It(T,z.collectionRef);return l.jsx(v,{ref:P,children:_})});p.displayName=g;const j=e+"CollectionItemSlot",b="data-radix-collection-item",k=er(j),S=w.forwardRef((E,T)=>{const{scope:R,children:_,...z}=E,P=w.useRef(null),[H,O]=w.useState(null),I=It(T,P,O),$=c(j,R),{setItemMap:Q}=$,Y=w.useRef(z);k3(Y.current,z)||(Y.current=z);const q=Y.current;return w.useEffect(()=>{const K=q;return Q(V=>H?V.has(H)?V.set(H,{...K,element:H}).toSorted(N0):(V.set(H,{...K,element:H}),V.toSorted(N0)):V),()=>{Q(V=>!H||!V.has(H)?V:(V.delete(H),new Cp(V)))}},[H,q,Q]),l.jsx(k,{[b]:"",ref:I,children:_})});S.displayName=j;function N(){return w.useState(new Cp)}Un(N,"useInitCollection");function C(E){const{itemMap:T}=c(e+"CollectionConsumer",E);return T}return Un(C,"useCollection"),[{Provider:d,Slot:p,ItemSlot:S},{createCollectionScope:r,useCollection:C,useInitCollection:N}]}Un(oE,"createCollection");function k3(e,n){if(e===n)return!0;if(typeof e!="object"||typeof n!="object"||e==null||n==null)return!1;const a=Object.keys(e),r=Object.keys(n);if(a.length!==r.length)return!1;for(const o of a)if(!Object.prototype.hasOwnProperty.call(n,o)||e[o]!==n[o])return!1;return!0}Un(k3,"shallowEqual");function S3(e,n){return!!(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Un(S3,"isElementPreceding");function N0(e,n){return!e[1].element||!n[1].element?0:S3(e[1].element,n[1].element)?-1:1}Un(N0,"sortByDocumentPosition");function C3(e){return new MutationObserver(a=>{for(const r of a)if(r.type==="childList"){e();return}})}Un(C3,"getChildListObserver");var cE=Object.defineProperty,Oo=(e,n)=>cE(e,"name",{value:n,configurable:!0}),N3=!!(typeof window<"u"&&window.document&&window.document.createElement);function At(e,n,{checkForDefaultPrevented:a=!0}={}){return Oo(function(o){if(e==null||e(o),a===!1||!o||!o.defaultPrevented)return n==null?void 0:n(o)},"handleEvent")}Oo(At,"composeEventHandlers");function uE(e){var n;if(!N3)throw new Error("Cannot access window outside of the DOM");return((n=e==null?void 0:e.ownerDocument)==null?void 0:n.defaultView)??window}Oo(uE,"getOwnerWindow");function E0(e){if(!N3)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Oo(E0,"getOwnerDocument");function E3(e,n=!1){const{activeElement:a}=E0(e);if(!(a!=null&&a.nodeName))return null;if(T3(a)&&a.contentDocument)return E3(a.contentDocument.body,n);if(n){const r=a.getAttribute("aria-activedescendant");if(r){const o=E0(a).getElementById(r);if(o)return o}}return a}Oo(E3,"getActiveElement");function T3(e){return e.tagName==="IFRAME"}Oo(T3,"isFrame");var ei=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},dE=Object.defineProperty,fE=(e,n)=>dE(e,"name",{value:n,configurable:!0}),Gx=Zc[" useEffectEvent ".trim().toString()],Yx=Zc[" useInsertionEffect ".trim().toString()];function M3(e){if(typeof Gx=="function")return Gx(e);const n=w.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Yx=="function"?Yx(()=>{n.current=e}):ei(()=>{n.current=e}),w.useMemo(()=>((...a)=>{var r;return(r=n.current)==null?void 0:r.call(n,...a)}),[])}fE(M3,"useEffectEvent");var hE=Object.defineProperty,eu=(e,n)=>hE(e,"name",{value:n,configurable:!0}),mE=Zc[" useInsertionEffect ".trim().toString()]||ei;function Uc({prop:e,defaultProp:n,onChange:a=eu(()=>{},"onChange"),caller:r}){const[o,c,d]=A3({defaultProp:n,onChange:a}),f=e!==void 0,h=f?e:o,g=w.useCallback(v=>{var p;if(f){const j=_3(v)?v(e):v;j!==e&&((p=d.current)==null||p.call(d,j))}else c(v)},[f,e,c,d]);return[h,g]}eu(Uc,"useControllableState");function A3({defaultProp:e,onChange:n}){const[a,r]=w.useState(e),o=w.useRef(a),c=w.useRef(n);return mE(()=>{c.current=n},[n]),w.useEffect(()=>{var d;o.current!==a&&((d=c.current)==null||d.call(c,a),o.current=a)},[a,o]),[a,r,c]}eu(A3,"useUncontrolledState");function _3(e){return typeof e=="function"}eu(_3,"isFunction");var Kx=Symbol("RADIX:SYNC_STATE");function pE(e,n,a,r){const{prop:o,defaultProp:c,onChange:d,caller:f}=n,h=o!==void 0,g=M3(d),v=[{...a,state:c}];r&&v.push(r);const[p,j]=w.useReducer((N,C)=>{if(C.type===Kx)return{...N,state:C.state};const M=e(N,C);return h&&!Object.is(M.state,N.state)&&g(M.state),M},...v),b=p.state,k=w.useRef(b);w.useEffect(()=>{k.current!==b&&(k.current=b,h||g(b))},[b,k,h]);const S=w.useMemo(()=>o!==void 0?{...p,state:o}:p,[p,o]);return w.useEffect(()=>{h&&!Object.is(o,p.state)&&j({type:Kx,state:o})},[o,p.state,h]),[S,j]}eu(pE,"useControllableStateReducer");var gE=Object.defineProperty,Ir=(e,n)=>gE(e,"name",{value:n,configurable:!0});function R3(e,n){return w.useReducer((a,r)=>n[a][r]??a,e)}Ir(R3,"useStateMachine");var ar=Ir(e=>{const{present:n,children:a}=e,r=z3(n),o=typeof a=="function"?a({present:r.isPresent}):w.Children.only(a),c=O3(r.ref,D3(o));return typeof a=="function"||r.isPresent?w.cloneElement(o,{ref:c}):null},"Presence");function z3(e){const[n,a]=w.useState(),r=w.useRef(null),o=w.useRef(e),c=w.useRef("none"),d=w.useRef(void 0),f=e?"mounted":"unmounted",[h,g]=R3(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{h==="mounted"?(c.current=d.current??So(r.current),d.current=void 0):c.current="none"},[h]),ei(()=>{const v=r.current,p=o.current;if(p!==e){const b=c.current,k=So(v);e?(d.current=k,g("MOUNT")):k==="none"||(v==null?void 0:v.display)==="none"?g("UNMOUNT"):g(p&&b!==k?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,g]),ei(()=>{if(n){let v;const p=n.ownerDocument.defaultView??window,j=Ir(k=>{const N=So(r.current).includes(CSS.escape(k.animationName));if(k.target===n&&N&&(g("ANIMATION_END"),!o.current)){const C=n.style.animationFillMode;n.style.animationFillMode="forwards",v=p.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=C)})}},"handleAnimationEnd"),b=Ir(k=>{k.target===n&&(c.current=So(r.current))},"handleAnimationStart");return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",j),n.addEventListener("animationend",j),()=>{p.clearTimeout(v),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",j),n.removeEventListener("animationend",j)}}else g("ANIMATION_END")},[n,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:w.useCallback(v=>{if(v){const p=getComputedStyle(v);r.current=p,d.current=So(p)}else r.current=null;a(v)},[])}}Ir(z3,"usePresence");function T0(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}Ir(T0,"setRef");function O3(...e){const n=w.useRef(e);return n.current=e,w.useCallback(a=>{const r=n.current;let o=!1;const c=r.map(d=>{const f=T0(d,a);return!o&&typeof f=="function"&&(o=!0),f});if(o)return()=>{for(let d=0;d<c.length;d++){const f=c[d];typeof f=="function"?f():T0(r[d],null)}}},[])}Ir(O3,"useStableComposedRefs");function So(e){return(e==null?void 0:e.animationName)||"none"}Ir(So,"getAnimationName");function D3(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}Ir(D3,"getElementRef");var vE=Object.defineProperty,yE=(e,n)=>vE(e,"name",{value:n,configurable:!0}),xE=Zc[" useId ".trim().toString()]||(()=>{}),bE=0;function js(e){const[n,a]=w.useState(xE());return ei(()=>{e||a(r=>r??String(bE++))},[e]),e||(n?`radix-${n}`:"")}yE(js,"useId");var jE=Object.defineProperty,wE=(e,n)=>jE(e,"name",{value:n,configurable:!0}),kE=w.createContext(void 0);function E1(e){const n=w.useContext(kE);return e||n||"ltr"}wE(E1,"useDirection");var SE=Object.defineProperty,CE=(e,n)=>SE(e,"name",{value:n,configurable:!0});function Wn(e){const n=w.useRef(e);return w.useEffect(()=>{n.current=e}),w.useMemo(()=>((...a)=>{var r;return(r=n.current)==null?void 0:r.call(n,...a)}),[])}CE(Wn,"useCallbackRef");var NE=Object.defineProperty,Fn=(e,n)=>NE(e,"name",{value:n,configurable:!0}),M0="dismissableLayer.update",EE="dismissableLayer.pointerDownOutside",TE="dismissableLayer.focusOutside",Xx,L3=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),T1=w.forwardRef(Fn(function(n,a){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:g,...v}=n,p=w.useContext(L3),[j,b]=w.useState(null),k=(j==null?void 0:j.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=w.useState({}),N=It(a,b),C=Array.from(p.layers),[M]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=M?C.indexOf(M):-1,T=j?C.indexOf(j):-1,R=p.layersWithOutsidePointerEventsDisabled.size>0,_=T>=E,z=w.useRef(!1),P=I3($=>{d==null||d($),h==null||h($),$.defaultPrevented||g==null||g()},{ownerDocument:k,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:z,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback($=>{if(!($ instanceof Node))return!1;const Q=[...p.branches].some(Y=>Y.contains($));return _&&!Q},[p.branches,_])}),H=P3($=>{if(o&&z.current)return;const Q=$.target;[...p.branches].some(q=>q.contains(Q))||(f==null||f($),h==null||h($),$.defaultPrevented||g==null||g())},k),O=j?T===C.length-1:!1,I=Wn($=>{$.key==="Escape"&&(c==null||c($),!$.defaultPrevented&&g&&($.preventDefault(),g()))});return w.useEffect(()=>{if(O)return k.addEventListener("keydown",I,{capture:!0}),()=>k.removeEventListener("keydown",I,{capture:!0})},[k,O,I]),w.useEffect(()=>{if(j)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Xx=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(j)),p.layers.add(j),A0(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(j),p.layersWithOutsidePointerEventsDisabled.size===0&&(k.body.style.pointerEvents=Xx))}},[j,k,r,p]),w.useEffect(()=>()=>{j&&(p.layers.delete(j),p.layersWithOutsidePointerEventsDisabled.delete(j),A0())},[j,p]),w.useEffect(()=>{const $=Fn(()=>S({}),"handleUpdate");return document.addEventListener(M0,$),()=>document.removeEventListener(M0,$)},[]),l.jsx(an.div,{...v,ref:N,style:{pointerEvents:R?_?"auto":"none":void 0,...n.style},onFocusCapture:At(n.onFocusCapture,H.onFocusCapture),onBlurCapture:At(n.onBlurCapture,H.onBlurCapture),onPointerDownCapture:At(n.onPointerDownCapture,P.onPointerDownCapture)})},"DismissableLayer"));function B3(){const e=w.useContext(L3),[n,a]=w.useState(null);return w.useEffect(()=>{if(n)return e.dismissableSurfaces.add(n),()=>{e.dismissableSurfaces.delete(n)}},[n,e.dismissableSurfaces]),a}Fn(B3,"useDismissableLayerSurface");var ME=Fn(()=>!0,"IS_TRUE");function I3(e,n){const{ownerDocument:a=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:c,shouldHandlePointerDownOutside:d=ME}=n,f=Wn(e),h=w.useRef(!1),g=w.useRef(!1),v=w.useRef(new Map),p=w.useRef(()=>{});return w.useEffect(()=>{function j(){g.current=!1,o.current=!1,v.current.clear()}Fn(j,"resetOutsideInteraction");function b(){return Array.from(v.current.values()).some(Boolean)}Fn(b,"isOutsideInteractionIntercepted");function k(E){if(!g.current)return;const T=E.target;T instanceof Node&&[...c].some(_=>_.contains(T))||v.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{g.current&&p.current()},0)}Fn(k,"handleInteractionCapture");function S(E){g.current&&v.current.set(E.type,!1)}Fn(S,"handleInteractionBubble");const N=Fn(E=>{if(E.target&&!h.current){let T=function(){a.removeEventListener("click",p.current);const _=b();j(),_||M1(EE,f,R,{discrete:!0})};if(Fn(T,"handleAndDispatchPointerDownOutsideEvent"),!d(E.target)){a.removeEventListener("click",p.current),j(),h.current=!1;return}const R={originalEvent:E};g.current=!0,o.current=r&&E.button===0,v.current.clear(),!r||E.button!==0?T():(a.removeEventListener("click",p.current),p.current=T,a.addEventListener("click",p.current,{once:!0}))}else a.removeEventListener("click",p.current),j();h.current=!1},"handlePointerDown"),C=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of C)a.addEventListener(E,k,!0),a.addEventListener(E,S);const M=window.setTimeout(()=>{a.addEventListener("pointerdown",N)},0);return()=>{window.clearTimeout(M),a.removeEventListener("pointerdown",N),a.removeEventListener("click",p.current);for(const E of C)a.removeEventListener(E,k,!0),a.removeEventListener(E,S)}},[a,f,r,o,c,d]),{onPointerDownCapture:Fn(()=>h.current=!0,"onPointerDownCapture")}}Fn(I3,"usePointerDownOutside");function P3(e,n=globalThis==null?void 0:globalThis.document){const a=Wn(e),r=w.useRef(!1);return w.useEffect(()=>{const o=Fn(c=>{c.target&&!r.current&&M1(TE,a,{originalEvent:c},{discrete:!1})},"handleFocus");return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,a]),{onFocusCapture:Fn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Fn(()=>r.current=!1,"onBlurCapture")}}Fn(P3,"useFocusOutside");function A0(){const e=new CustomEvent(M0);document.dispatchEvent(e)}Fn(A0,"dispatchUpdate");function M1(e,n,a,{discrete:r}){const o=a.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});n&&o.addEventListener(e,n,{once:!0}),r?x3(o,c):o.dispatchEvent(c)}Fn(M1,"handleAndDispatchCustomEvent");var AE=Object.defineProperty,ki=(e,n)=>AE(e,"name",{value:n,configurable:!0}),Np="focusScope.autoFocusOnMount",Ep="focusScope.autoFocusOnUnmount",Qx={bubbles:!1,cancelable:!0},A1=w.forwardRef(ki(function(n,a){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...f}=n,[h,g]=w.useState(null),v=Wn(c),p=Wn(d),j=w.useRef(null),b=It(a,g),k=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(o){let N=function(T){if(k.paused||!h)return;const R=T.target;h.contains(R)?j.current=R:_r(j.current,{select:!0})},C=function(T){if(k.paused||!h)return;const R=T.relatedTarget;R!==null&&(h.contains(R)||_r(j.current,{select:!0}))},M=function(T){if(document.activeElement===document.body)for(const _ of T)_.removedNodes.length>0&&_r(h)};ki(N,"handleFocusIn"),ki(C,"handleFocusOut"),ki(M,"handleMutations"),document.addEventListener("focusin",N),document.addEventListener("focusout",C);const E=new MutationObserver(M);return h&&E.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",C),E.disconnect()}}},[o,h,k.paused]),w.useEffect(()=>{if(h){Zx.add(k);const N=document.activeElement;if(!h.contains(N)){const M=new CustomEvent(Np,Qx);h.addEventListener(Np,v),h.dispatchEvent(M),M.defaultPrevented||(H3(V3(_1(h)),{select:!0}),document.activeElement===N&&_r(h))}return()=>{h.removeEventListener(Np,v),setTimeout(()=>{const M=new CustomEvent(Ep,Qx);h.addEventListener(Ep,p),h.dispatchEvent(M),M.defaultPrevented||_r(N??document.body,{select:!0}),h.removeEventListener(Ep,p),Zx.remove(k)},0)}}},[h,v,p,k]);const S=w.useCallback(N=>{if(!r&&!o||k.paused)return;const C=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,M=document.activeElement;if(C&&M){const E=N.currentTarget,[T,R]=q3(E);T&&R?!N.shiftKey&&M===R?(N.preventDefault(),r&&_r(T,{select:!0})):N.shiftKey&&M===T&&(N.preventDefault(),r&&_r(R,{select:!0})):M===E&&N.preventDefault()}},[r,o,k.paused]);return l.jsx(an.div,{tabIndex:-1,...f,ref:b,onKeyDown:S})},"FocusScope"));function H3(e,{select:n=!1}={}){const a=document.activeElement;for(const r of e)if(_r(r,{select:n}),document.activeElement!==a)return}ki(H3,"focusFirst");function q3(e){const n=_1(e),a=_0(n,e),r=_0(n.reverse(),e);return[a,r]}ki(q3,"getTabbableEdges");function _1(e){const n=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ki(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;a.nextNode();)n.push(a.currentNode);return n}ki(_1,"getTabbableCandidates");function _0(e,n){const a=typeof n.checkVisibility=="function"&&n.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(a?!r.checkVisibility({checkVisibilityCSS:!0}):F3(r,{upTo:n})))return r}ki(_0,"findVisible");function F3(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}ki(F3,"isHidden");function U3(e){return e instanceof HTMLInputElement&&"select"in e}ki(U3,"isSelectableInput");function _r(e,{select:n=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&U3(e)&&n&&e.select()}}ki(_r,"focus");var Zx=$3();function $3(){let e=[];return{add(n){const a=e[0];n!==a&&(a==null||a.pause()),e=R0(e,n),e.unshift(n)},remove(n){var a;e=R0(e,n),(a=e[0])==null||a.resume()}}}ki($3,"createFocusScopesStack");function R0(e,n){const a=[...e],r=a.indexOf(n);return r!==-1&&a.splice(r,1),a}ki(R0,"arrayRemove");function V3(e){return e.filter(n=>n.tagName!=="A")}ki(V3,"removeLinks");var _E=Object.defineProperty,RE=(e,n)=>_E(e,"name",{value:n,configurable:!0}),R1=w.forwardRef(RE(function(n,a){var h;const{container:r,...o}=n,[c,d]=w.useState(!1);ei(()=>d(!0),[]);const f=r||c&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return f?Ol.createPortal(l.jsx(an.div,{...o,ref:a}),f):null},"Portal")),zE=Object.defineProperty,z1=(e,n)=>zE(e,"name",{value:n,configurable:!0}),Td=0,Ga=null;function OE(e){return tu(),e.children}z1(OE,"FocusGuards");function tu(){w.useEffect(()=>{Ga||(Ga={start:z0(),end:z0()});const{start:e,end:n}=Ga;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==n&&document.body.insertAdjacentElement("beforeend",n),Td++,()=>{Td===1&&(Ga==null||Ga.start.remove(),Ga==null||Ga.end.remove(),Ga=null),Td=Math.max(0,Td-1)}},[])}z1(tu,"useFocusGuards");function z0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}z1(z0,"createFocusGuard");var Xa=function(){return Xa=Object.assign||function(n){for(var a,r=1,o=arguments.length;r<o;r++){a=arguments[r];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(n[c]=a[c])}return n},Xa.apply(this,arguments)};function G3(e,n){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(a[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(a[r[o]]=e[r[o]]);return a}function DE(e,n,a){if(a||arguments.length===2)for(var r=0,o=n.length,c;r<o;r++)(c||!(r in n))&&(c||(c=Array.prototype.slice.call(n,0,r)),c[r]=n[r]);return e.concat(c||Array.prototype.slice.call(n))}var ef="right-scroll-bar-position",tf="width-before-scroll-bar",LE="with-scroll-bars-hidden",BE="--removed-body-scroll-bar-size";function Tp(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function IE(e,n){var a=w.useState(function(){return{value:e,callback:n,facade:{get current(){return a.value},set current(r){var o=a.value;o!==r&&(a.value=r,a.callback(r,o))}}}})[0];return a.callback=n,a.facade}var PE=typeof window<"u"?w.useLayoutEffect:w.useEffect,Jx=new WeakMap;function HE(e,n){var a=IE(null,function(r){return e.forEach(function(o){return Tp(o,r)})});return PE(function(){var r=Jx.get(a);if(r){var o=new Set(r),c=new Set(e),d=a.current;o.forEach(function(f){c.has(f)||Tp(f,null)}),c.forEach(function(f){o.has(f)||Tp(f,d)})}Jx.set(a,e)},[e]),a}function qE(e){return e}function FE(e,n){n===void 0&&(n=qE);var a=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(c){var d=n(c,r);return a.push(d),function(){a=a.filter(function(f){return f!==d})}},assignSyncMedium:function(c){for(r=!0;a.length;){var d=a;a=[],d.forEach(c)}a={push:function(f){return c(f)},filter:function(){return a}}},assignMedium:function(c){r=!0;var d=[];if(a.length){var f=a;a=[],f.forEach(c),d=a}var h=function(){var v=d;d=[],v.forEach(c)},g=function(){return Promise.resolve().then(h)};g(),a={push:function(v){d.push(v),g()},filter:function(v){return d=d.filter(v),a}}}};return o}function UE(e){e===void 0&&(e={});var n=FE(null);return n.options=Xa({async:!0,ssr:!1},e),n}var Y3=function(e){var n=e.sideCar,a=G3(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Xa({},a))};Y3.isSideCarExport=!0;function $E(e,n){return e.useMedium(n),Y3}var K3=UE(),Mp=function(){},Af=w.forwardRef(function(e,n){var a=w.useRef(null),r=w.useState({onScrollCapture:Mp,onWheelCapture:Mp,onTouchMoveCapture:Mp}),o=r[0],c=r[1],d=e.forwardProps,f=e.children,h=e.className,g=e.removeScrollBar,v=e.enabled,p=e.shards,j=e.sideCar,b=e.noRelative,k=e.noIsolation,S=e.inert,N=e.allowPinchZoom,C=e.as,M=C===void 0?"div":C,E=e.gapMode,T=G3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=j,_=HE([a,n]),z=Xa(Xa({},T),o);return w.createElement(w.Fragment,null,v&&w.createElement(R,{sideCar:K3,removeScrollBar:g,shards:p,noRelative:b,noIsolation:k,inert:S,setCallbacks:c,allowPinchZoom:!!N,lockRef:a,gapMode:E}),d?w.cloneElement(w.Children.only(f),Xa(Xa({},z),{ref:_})):w.createElement(M,Xa({},z,{className:h,ref:_}),f))});Af.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Af.classNames={fullWidth:tf,zeroRight:ef};var VE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function GE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=VE();return n&&e.setAttribute("nonce",n),e}function YE(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function KE(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var XE=function(){var e=0,n=null;return{add:function(a){e==0&&(n=GE())&&(YE(n,a),KE(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},QE=function(){var e=XE();return function(n,a){w.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&a])}},X3=function(){var e=QE(),n=function(a){var r=a.styles,o=a.dynamic;return e(r,o),null};return n},ZE={left:0,top:0,right:0,gap:0},Ap=function(e){return parseInt(e||"",10)||0},JE=function(e){var n=window.getComputedStyle(document.body),a=n[e==="padding"?"paddingLeft":"marginLeft"],r=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[Ap(a),Ap(r),Ap(o)]},WE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ZE;var n=JE(e),a=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-a+n[2]-n[0])}},eT=X3(),Eo="data-scroll-locked",tT=function(e,n,a,r){var o=e.left,c=e.top,d=e.right,f=e.gap;return a===void 0&&(a="margin"),`
|
|
535
|
+
.`.concat(LE,` {
|
|
536
|
+
overflow: hidden `).concat(r,`;
|
|
537
|
+
padding-right: `).concat(f,"px ").concat(r,`;
|
|
538
|
+
}
|
|
539
|
+
body[`).concat(Eo,`] {
|
|
540
|
+
overflow: hidden `).concat(r,`;
|
|
541
|
+
overscroll-behavior: contain;
|
|
542
|
+
`).concat([n&&"position: relative ".concat(r,";"),a==="margin"&&`
|
|
543
|
+
padding-left: `.concat(o,`px;
|
|
544
|
+
padding-top: `).concat(c,`px;
|
|
545
|
+
padding-right: `).concat(d,`px;
|
|
546
|
+
margin-left:0;
|
|
547
|
+
margin-top:0;
|
|
548
|
+
margin-right: `).concat(f,"px ").concat(r,`;
|
|
549
|
+
`),a==="padding"&&"padding-right: ".concat(f,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.`).concat(ef,` {
|
|
553
|
+
right: `).concat(f,"px ").concat(r,`;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.`).concat(tf,` {
|
|
557
|
+
margin-right: `).concat(f,"px ").concat(r,`;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.`).concat(ef," .").concat(ef,` {
|
|
561
|
+
right: 0 `).concat(r,`;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.`).concat(tf," .").concat(tf,` {
|
|
565
|
+
margin-right: 0 `).concat(r,`;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
body[`).concat(Eo,`] {
|
|
569
|
+
`).concat(BE,": ").concat(f,`px;
|
|
570
|
+
}
|
|
571
|
+
`)},Wx=function(){var e=parseInt(document.body.getAttribute(Eo)||"0",10);return isFinite(e)?e:0},nT=function(){w.useEffect(function(){return document.body.setAttribute(Eo,(Wx()+1).toString()),function(){var e=Wx()-1;e<=0?document.body.removeAttribute(Eo):document.body.setAttribute(Eo,e.toString())}},[])},iT=function(e){var n=e.noRelative,a=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;nT();var c=w.useMemo(function(){return WE(o)},[o]);return w.createElement(eT,{styles:tT(c,!n,o,a?"":"!important")})},O0=!1;if(typeof window<"u")try{var Md=Object.defineProperty({},"passive",{get:function(){return O0=!0,!0}});window.addEventListener("test",Md,Md),window.removeEventListener("test",Md,Md)}catch{O0=!1}var vo=O0?{passive:!1}:!1,aT=function(e){return e.tagName==="TEXTAREA"},Q3=function(e,n){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!aT(e)&&a[n]==="visible")},rT=function(e){return Q3(e,"overflowY")},lT=function(e){return Q3(e,"overflowX")},eb=function(e,n){var a=n.ownerDocument,r=n;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Z3(e,r);if(o){var c=J3(e,r),d=c[1],f=c[2];if(d>f)return!0}r=r.parentNode}while(r&&r!==a.body);return!1},sT=function(e){var n=e.scrollTop,a=e.scrollHeight,r=e.clientHeight;return[n,a,r]},oT=function(e){var n=e.scrollLeft,a=e.scrollWidth,r=e.clientWidth;return[n,a,r]},Z3=function(e,n){return e==="v"?rT(n):lT(n)},J3=function(e,n){return e==="v"?sT(n):oT(n)},cT=function(e,n){return e==="h"&&n==="rtl"?-1:1},uT=function(e,n,a,r,o){var c=cT(e,window.getComputedStyle(n).direction),d=c*r,f=a.target,h=n.contains(f),g=!1,v=d>0,p=0,j=0;do{if(!f)break;var b=J3(e,f),k=b[0],S=b[1],N=b[2],C=S-N-c*k;(k||C)&&Z3(e,f)&&(p+=C,j+=k);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!h&&f!==document.body||h&&(n.contains(f)||n===f));return(v&&Math.abs(p)<1||!v&&Math.abs(j)<1)&&(g=!0),g},Ad=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tb=function(e){return[e.deltaX,e.deltaY]},nb=function(e){return e&&"current"in e?e.current:e},dT=function(e,n){return e[0]===n[0]&&e[1]===n[1]},fT=function(e){return`
|
|
572
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
573
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
574
|
+
`)},hT=0,yo=[];function mT(e){var n=w.useRef([]),a=w.useRef([0,0]),r=w.useRef(),o=w.useState(hT++)[0],c=w.useState(X3)[0],d=w.useRef(e);w.useEffect(function(){d.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var S=DE([e.lockRef.current],(e.shards||[]).map(nb),!0).filter(Boolean);return S.forEach(function(N){return N.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),S.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(S,N){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!d.current.allowPinchZoom;var C=Ad(S),M=a.current,E="deltaX"in S?S.deltaX:M[0]-C[0],T="deltaY"in S?S.deltaY:M[1]-C[1],R,_=S.target,z=Math.abs(E)>Math.abs(T)?"h":"v";if("touches"in S&&z==="h"&&_.type==="range")return!1;var P=window.getSelection(),H=P&&P.anchorNode,O=H?H===_||H.contains(_):!1;if(O)return!1;var I=eb(z,_);if(!I)return!0;if(I?R=z:(R=z==="v"?"h":"v",I=eb(z,_)),!I)return!1;if(!r.current&&"changedTouches"in S&&(E||T)&&(r.current=R),!R)return!0;var $=r.current||R;return uT($,N,S,$==="h"?E:T)},[]),h=w.useCallback(function(S){var N=S;if(!(!yo.length||yo[yo.length-1]!==c)){var C="deltaY"in N?tb(N):Ad(N),M=n.current.filter(function(R){return R.name===N.type&&(R.target===N.target||N.target===R.shadowParent)&&dT(R.delta,C)})[0];if(M&&M.should){N.cancelable&&N.preventDefault();return}if(!M){var E=(d.current.shards||[]).map(nb).filter(Boolean).filter(function(R){return R.contains(N.target)}),T=E.length>0?f(N,E[0]):!d.current.noIsolation;T&&N.cancelable&&N.preventDefault()}}},[]),g=w.useCallback(function(S,N,C,M){var E={name:S,delta:N,target:C,should:M,shadowParent:pT(C)};n.current.push(E),setTimeout(function(){n.current=n.current.filter(function(T){return T!==E})},1)},[]),v=w.useCallback(function(S){a.current=Ad(S),r.current=void 0},[]),p=w.useCallback(function(S){g(S.type,tb(S),S.target,f(S,e.lockRef.current))},[]),j=w.useCallback(function(S){g(S.type,Ad(S),S.target,f(S,e.lockRef.current))},[]);w.useEffect(function(){return yo.push(c),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:j}),document.addEventListener("wheel",h,vo),document.addEventListener("touchmove",h,vo),document.addEventListener("touchstart",v,vo),function(){yo=yo.filter(function(S){return S!==c}),document.removeEventListener("wheel",h,vo),document.removeEventListener("touchmove",h,vo),document.removeEventListener("touchstart",v,vo)}},[]);var b=e.removeScrollBar,k=e.inert;return w.createElement(w.Fragment,null,k?w.createElement(c,{styles:fT(o)}):null,b?w.createElement(iT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pT(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const gT=$E(K3,mT);var _f=w.forwardRef(function(e,n){return w.createElement(Af,Xa({},e,{ref:n,sideCar:gT}))});_f.classNames=Af.classNames;var vT=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},xo=new WeakMap,_d=new WeakMap,Rd={},_p=0,W3=function(e){return e&&(e.host||W3(e.parentNode))},yT=function(e,n){return n.map(function(a){if(e.contains(a))return a;var r=W3(a);return r&&e.contains(r)?r:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},xT=function(e,n,a,r){var o=yT(n,Array.isArray(e)?e:[e]);Rd[a]||(Rd[a]=new WeakMap);var c=Rd[a],d=[],f=new Set,h=new Set(o),g=function(p){!p||f.has(p)||(f.add(p),g(p.parentNode))};o.forEach(g);var v=function(p){!p||h.has(p)||Array.prototype.forEach.call(p.children,function(j){if(f.has(j))v(j);else try{var b=j.getAttribute(r),k=b!==null&&b!=="false",S=(xo.get(j)||0)+1,N=(c.get(j)||0)+1;xo.set(j,S),c.set(j,N),d.push(j),S===1&&k&&_d.set(j,!0),N===1&&j.setAttribute(a,"true"),k||j.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",j,C)}})};return v(n),f.clear(),_p++,function(){d.forEach(function(p){var j=xo.get(p)-1,b=c.get(p)-1;xo.set(p,j),c.set(p,b),j||(_d.has(p)||p.removeAttribute(r),_d.delete(p)),b||p.removeAttribute(a)}),_p--,_p||(xo=new WeakMap,xo=new WeakMap,_d=new WeakMap,Rd={})}},O1=function(e,n,a){a===void 0&&(a="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=vT(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),xT(r,o,a,"aria-hidden")):function(){return null}},bT=Object.defineProperty,Aa=(e,n)=>bT(e,"name",{value:n,configurable:!0}),D1="Dialog",[e5,xU]=Dl(D1),[jT,$r]=e5(D1),wT=Aa(e=>{const{__scopeDialog:n,children:a,open:r,defaultOpen:o,onOpenChange:c,modal:d=!0}=e,f=w.useRef(null),h=w.useRef(null),[g,v]=Uc({prop:r,defaultProp:o??!1,onChange:c,caller:D1}),[p,j]=w.useState(0),[b,k]=w.useState(0);return l.jsx(jT,{scope:n,triggerRef:f,contentRef:h,contentId:js(),titleId:js(),descriptionId:js(),titlePresent:p>0,descriptionPresent:b>0,setTitleCount:j,setDescriptionCount:k,open:g,onOpenChange:v,onOpenToggle:w.useCallback(()=>v(S=>!S),[v]),modal:d,children:a})},"Dialog"),t5="DialogPortal",[kT,n5]=e5(t5,{forceMount:void 0}),ST=Aa(e=>{const{__scopeDialog:n,forceMount:a,children:r,container:o}=e,c=$r(t5,n);return l.jsx(kT,{scope:n,forceMount:a,children:w.Children.map(r,d=>l.jsx(ar,{present:a||c.open,children:l.jsx(R1,{asChild:!0,container:o,children:d})}))})},"DialogPortal"),D0="DialogOverlay",CT=w.forwardRef(Aa(function(n,a){const r=n5(D0,n.__scopeDialog),{forceMount:o=r.forceMount,...c}=n,d=$r(D0,n.__scopeDialog);return d.modal?l.jsx(ar,{present:o||d.open,children:l.jsx(ET,{...c,ref:a})}):null},"DialogOverlay")),NT=er("DialogOverlay.RemoveScroll"),ET=w.forwardRef(Aa(function(n,a){const{__scopeDialog:r,...o}=n,c=$r(D0,r),d=B3(),f=It(a,d);return l.jsx(_f,{as:NT,allowPinchZoom:!0,shards:[c.contentRef],children:l.jsx(an.div,{"data-state":L1(c.open),...o,ref:f,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),$c="DialogContent",TT=w.forwardRef(Aa(function(n,a){const r=n5($c,n.__scopeDialog),{forceMount:o=r.forceMount,...c}=n,d=$r($c,n.__scopeDialog);return l.jsx(ar,{present:o||d.open,children:d.modal?l.jsx(MT,{...c,ref:a}):l.jsx(AT,{...c,ref:a})})},"DialogContent")),MT=w.forwardRef(Aa(function(n,a){const r=$r($c,n.__scopeDialog),o=w.useRef(null),c=It(a,r.contentRef,o);return w.useEffect(()=>{const d=o.current;if(d)return O1(d)},[]),l.jsx(i5,{...n,ref:c,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:At(n.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:At(n.onPointerDownOutside,d=>{const f=d.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&d.preventDefault()}),onFocusOutside:At(n.onFocusOutside,d=>d.preventDefault())})},"DialogContentModal")),AT=w.forwardRef(Aa(function(n,a){const r=$r($c,n.__scopeDialog),o=w.useRef(!1),c=w.useRef(!1);return l.jsx(i5,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,h;(f=n.onCloseAutoFocus)==null||f.call(n,d),d.defaultPrevented||(o.current||(h=r.triggerRef.current)==null||h.focus(),d.preventDefault()),o.current=!1,c.current=!1},onInteractOutside:d=>{var g,v;(g=n.onInteractOutside)==null||g.call(n,d),d.defaultPrevented||(o.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=d.target;((v=r.triggerRef.current)==null?void 0:v.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})},"DialogContentNonModal")),i5=w.forwardRef(Aa(function(n,a){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:c,onCloseAutoFocus:d,...f}=n,h=$r($c,r);return tu(),l.jsx(l.Fragment,{children:l.jsx(A1,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:c,onUnmountAutoFocus:d,children:l.jsx(T1,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":L1(h.open),...f,ref:a,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),_T="DialogTitle",RT=w.forwardRef(Aa(function(n,a){const{__scopeDialog:r,...o}=n,c=$r(_T,r),{setTitleCount:d}=c;return ei(()=>(d(f=>f+1),()=>d(f=>f-1)),[d]),l.jsx(an.h2,{id:c.titleId,...o,ref:a})},"DialogTitle")),zT="DialogClose",OT=w.forwardRef(Aa(function(n,a){const{__scopeDialog:r,...o}=n,c=$r(zT,r);return l.jsx(an.button,{type:"button",...o,ref:a,onClick:At(n.onClick,()=>c.onOpenChange(!1))})},"DialogClose"));function L1(e){return e?"open":"closed"}Aa(L1,"getState");var DT=Object.defineProperty,LT=(e,n)=>DT(e,"name",{value:n,configurable:!0});function a5(e){const[n,a]=w.useState(void 0);return ei(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const c=o[0];let d,f;if("borderBoxSize"in c){const h=c.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,f=g.blockSize}else d=e.offsetWidth,f=e.offsetHeight;a({width:d,height:f})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else a(void 0)},[e]),n}LT(a5,"useSize");const BT=["top","right","bottom","left"],Rl=Math.min,Or=Math.max,uf=Math.round,zd=Math.floor,Dr=e=>({x:e,y:e}),IT={left:"right",right:"left",bottom:"top",top:"bottom"};function r5(e,n,a){return Or(e,Rl(n,a))}function Pr(e,n){return typeof e=="function"?e(n):e}function zl(e){return e.split("-")[0]}function Do(e){return e.split("-")[1]}function B1(e){return e==="x"?"y":"x"}function I1(e){return e==="y"?"height":"width"}function Za(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function P1(e){return B1(Za(e))}function PT(e,n,a){a===void 0&&(a=!1);const r=Do(e),o=P1(e),c=I1(o);let d=o==="x"?r===(a?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[c]>n.floating[c]&&(d=df(d)),[d,df(d)]}function HT(e){const n=df(e);return[L0(e),n,L0(n)]}function L0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ib=["left","right"],ab=["right","left"],qT=["top","bottom"],FT=["bottom","top"];function UT(e,n,a){switch(e){case"top":case"bottom":return a?n?ab:ib:n?ib:ab;case"left":case"right":return n?qT:FT;default:return[]}}function $T(e,n,a,r){const o=Do(e);let c=UT(zl(e),a==="start",r);return o&&(c=c.map(d=>d+"-"+o),n&&(c=c.concat(c.map(L0)))),c}function df(e){const n=zl(e);return IT[n]+e.slice(n.length)}function VT(e){var n,a,r,o;return{top:(n=e.top)!=null?n:0,right:(a=e.right)!=null?a:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function l5(e){return typeof e!="number"?VT(e):{top:e,right:e,bottom:e,left:e}}function ff(e){const{x:n,y:a,width:r,height:o}=e;return{width:r,height:o,top:a,left:n,right:n+r,bottom:a+o,x:n,y:a}}function rb(e,n,a){let{reference:r,floating:o}=e;const c=Za(n),d=P1(n),f=I1(d),h=zl(n),g=c==="y",v=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,j=r[f]/2-o[f]/2;let b;switch(h){case"top":b={x:v,y:r.y-o.height};break;case"bottom":b={x:v,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:p};break;case"left":b={x:r.x-o.width,y:p};break;default:b={x:r.x,y:r.y}}const k=Do(n);return k&&(b[d]+=j*(k==="end"?1:-1)*(a&&g?-1:1)),b}async function GT(e,n){var a;n===void 0&&(n={});const{x:r,y:o,platform:c,rects:d,elements:f,strategy:h}=e,{boundary:g="clippingAncestors",rootBoundary:v="viewport",elementContext:p="floating",altBoundary:j=!1,padding:b=0}=Pr(n,e),k=l5(b),N=f[j?p==="floating"?"reference":"floating":p],C=ff(await c.getClippingRect({element:(a=await(c.isElement==null?void 0:c.isElement(N)))==null||a?N:N.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:g,rootBoundary:v,strategy:h})),M=p==="floating"?{x:r,y:o,width:d.floating.width,height:d.floating.height}:d.reference,E=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),T=await(c.isElement==null?void 0:c.isElement(E))&&await(c.getScale==null?void 0:c.getScale(E))||{x:1,y:1},R=ff(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:E,strategy:h}):M);return{top:(C.top-R.top+k.top)/T.y,bottom:(R.bottom-C.bottom+k.bottom)/T.y,left:(C.left-R.left+k.left)/T.x,right:(R.right-C.right+k.right)/T.x}}const YT=50,KT=async(e,n,a)=>{const{placement:r="bottom",strategy:o="absolute",middleware:c=[],platform:d}=a,f=d.detectOverflow?d:{...d,detectOverflow:GT},h=await(d.isRTL==null?void 0:d.isRTL(n));let g=await d.getElementRects({reference:e,floating:n,strategy:o}),{x:v,y:p}=rb(g,r,h),j=r,b=0;const k={};for(let S=0;S<c.length;S++){const N=c[S];if(!N)continue;const{name:C,fn:M}=N,{x:E,y:T,data:R,reset:_}=await M({x:v,y:p,initialPlacement:r,placement:j,strategy:o,middlewareData:k,rects:g,platform:f,elements:{reference:e,floating:n}});v=E??v,p=T??p,k[C]={...k[C],...R},_&&b<YT&&(b++,typeof _=="object"&&(_.placement&&(j=_.placement),_.rects&&(g=_.rects===!0?await d.getElementRects({reference:e,floating:n,strategy:o}):_.rects),{x:v,y:p}=rb(g,j,h)),S=-1)}return{x:v,y:p,placement:j,strategy:o,middlewareData:k}},XT=e=>({name:"arrow",options:e,async fn(n){const{x:a,y:r,placement:o,rects:c,platform:d,elements:f,middlewareData:h}=n,{element:g,padding:v=0}=Pr(e,n)||{};if(g==null)return{};const p=l5(v),j={x:a,y:r},b=P1(o),k=I1(b),S=await d.getDimensions(g),N=b==="y",C=N?"top":"left",M=N?"bottom":"right",E=N?"clientHeight":"clientWidth",T=c.reference[k]+c.reference[b]-j[b]-c.floating[k],R=j[b]-c.reference[b],_=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let z=_?_[E]:0;(!z||!await(d.isElement==null?void 0:d.isElement(_)))&&(z=f.floating[E]||c.floating[k]);const P=T/2-R/2,H=z/2-S[k]/2-1,O=Rl(p[C],H),I=Rl(p[M],H),$=z-S[k]-I,Q=z/2-S[k]/2+P,Y=r5(O,Q,$),q=!h.arrow&&Do(o)!=null&&Q!==Y&&c.reference[k]/2-(Q<O?O:I)-S[k]/2<0,K=q?Q<O?Q-O:Q-$:0;return{[b]:j[b]+K,data:{[b]:Y,centerOffset:Q-Y-K,...q&&{alignmentOffset:K}},reset:q}}}),QT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var a,r;const{placement:o,middlewareData:c,rects:d,initialPlacement:f,platform:h,elements:g}=n,{mainAxis:v=!0,crossAxis:p=!0,fallbackPlacements:j,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...N}=Pr(e,n);if((a=c.arrow)!=null&&a.alignmentOffset)return{};const C=zl(o),M=Za(f),E=zl(f)===f,T=await(h.isRTL==null?void 0:h.isRTL(g.floating)),R=j||(E||!S?[df(f)]:HT(f)),_=k!=="none";!j&&_&&R.push(...$T(f,S,k,T));const z=[f,...R],P=await h.detectOverflow(n,N),H=[];let O=((r=c.flip)==null?void 0:r.overflows)||[];if(v&&H.push(P[C]),p){const Y=PT(o,d,T);H.push(P[Y[0]],P[Y[1]])}if(O=[...O,{placement:o,overflows:H}],!H.every(Y=>Y<=0)){var I,$;const Y=(((I=c.flip)==null?void 0:I.index)||0)+1,q=z[Y];if(q&&(!(p==="alignment"?M!==Za(q):!1)||O.every(X=>Za(X.placement)===M?X.overflows[0]>0:!0)))return{data:{index:Y,overflows:O},reset:{placement:q}};let K=($=O.filter(V=>V.overflows[0]<=0).sort((V,X)=>V.overflows[1]-X.overflows[1])[0])==null?void 0:$.placement;if(!K)switch(b){case"bestFit":{var Q;const V=(Q=O.filter(X=>{if(_){const Z=Za(X.placement);return Z===M||Z==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(Z=>Z>0).reduce((Z,D)=>Z+D,0)]).sort((X,Z)=>X[1]-Z[1])[0])==null?void 0:Q[0];V&&(K=V);break}case"initialPlacement":K=f;break}if(o!==K)return{reset:{placement:K}}}return{}}}};function lb(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function sb(e){return BT.some(n=>e[n]>=0)}const ZT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:a,platform:r}=n,{strategy:o="referenceHidden",...c}=Pr(e,n);switch(o){case"referenceHidden":{const d=await r.detectOverflow(n,{...c,elementContext:"reference"}),f=lb(d,a.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:sb(f)}}}case"escaped":{const d=await r.detectOverflow(n,{...c,altBoundary:!0}),f=lb(d,a.floating);return{data:{escapedOffsets:f,escaped:sb(f)}}}default:return{}}}}},s5=new Set(["left","top"]);async function JT(e,n){const{placement:a,platform:r,elements:o}=e,c=await(r.isRTL==null?void 0:r.isRTL(o.floating)),d=zl(a),f=Do(a),h=Za(a)==="y",g=s5.has(d)?-1:1,v=c&&h?-1:1,p=Pr(n,e);let{mainAxis:j,crossAxis:b,alignmentAxis:k}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof k=="number"&&(b=f==="end"?k*-1:k),h?{x:b*v,y:j*g}:{x:j*g,y:b*v}}const WT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var a,r;const{x:o,y:c,placement:d,middlewareData:f}=n,h=await JT(n,e);return d===((a=f.offset)==null?void 0:a.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:o+h.x,y:c+h.y,data:{...h,placement:d}}}}},eM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:a,y:r,placement:o,platform:c}=n,{mainAxis:d=!0,crossAxis:f=!1,limiter:h={fn:M=>{let{x:E,y:T}=M;return{x:E,y:T}}},...g}=Pr(e,n),v={x:a,y:r},p=await c.detectOverflow(n,g),j=Za(o),b=B1(j);let k=v[b],S=v[j];const N=(M,E)=>r5(E+p[M==="y"?"top":"left"],E,E-p[M==="y"?"bottom":"right"]);d&&(k=N(b,k)),f&&(S=N(j,S));const C=h.fn({...n,[b]:k,[j]:S});return{...C,data:{x:C.x-a,y:C.y-r,enabled:{[b]:d,[j]:f}}}}}},tM=function(e){return e===void 0&&(e={}),{options:e,fn(n){var a,r;const{x:o,y:c,placement:d,rects:f,middlewareData:h}=n,{offset:g=0,mainAxis:v=!0,crossAxis:p=!0}=Pr(e,n),j={x:o,y:c},b=Za(d),k=B1(b);let S=j[k],N=j[b];const C=Pr(g,n),M=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(a=C.mainAxis)!=null?a:0,crossAxis:(r=C.crossAxis)!=null?r:0};if(v){const R=k==="y"?"height":"width",_=f.reference[k]-f.floating[R]+M.mainAxis,z=f.reference[k]+f.reference[R]-M.mainAxis;S<_?S=_:S>z&&(S=z)}if(p){var E,T;const R=k==="y"?"width":"height",_=s5.has(zl(d)),z=f.reference[b]-f.floating[R]+(_&&((E=h.offset)==null?void 0:E[b])||0)+(_?0:M.crossAxis),P=f.reference[b]+f.reference[R]+(_?0:((T=h.offset)==null?void 0:T[b])||0)-(_?M.crossAxis:0);N<z?N=z:N>P&&(N=P)}return{[k]:S,[b]:N}}}},nM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){const{placement:a,rects:r,platform:o,elements:c}=n,{apply:d=()=>{},...f}=Pr(e,n),h=await o.detectOverflow(n,f),g=zl(a),v=Do(a),p=Za(a)==="y",{width:j,height:b}=r.floating;let k,S;g==="top"||g==="bottom"?(k=g,S=v===(await(o.isRTL==null?void 0:o.isRTL(c.floating))?"start":"end")?"left":"right"):(S=g,k=v==="end"?"top":"bottom");const N=b-h.top-h.bottom,C=j-h.left-h.right,M=Rl(b-h[k],N),E=Rl(j-h[S],C),T=n.middlewareData.shift,R=!T;let _=M,z=E;T!=null&&T.enabled.x&&(z=C),T!=null&&T.enabled.y&&(_=N),R&&!v&&(p?z=j-2*Or(h.left,h.right):_=b-2*Or(h.top,h.bottom)),await d({...n,availableWidth:z,availableHeight:_});const P=await o.getDimensions(c.floating);return j!==P.width||b!==P.height?{reset:{rects:!0}}:{}}}};function Rf(){return typeof window<"u"}function Lo(e){return o5(e)?(e.nodeName||"").toLowerCase():"#document"}function Di(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Vr(e){var n;return(n=(o5(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function o5(e){return Rf()?e instanceof Node||e instanceof Di(e).Node:!1}function tr(e){return Rf()?e instanceof Element||e instanceof Di(e).Element:!1}function Ll(e){return Rf()?e instanceof HTMLElement||e instanceof Di(e).HTMLElement:!1}function ob(e){return!Rf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Di(e).ShadowRoot}function zf(e){const{overflow:n,overflowX:a,overflowY:r,display:o}=nr(e);return/auto|scroll|overlay|hidden|clip/.test(n+r+a)&&o!=="inline"&&o!=="contents"}function iM(e){return/^(table|td|th)$/.test(Lo(e))}function Of(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const aM=/transform|translate|scale|rotate|perspective|filter/,rM=/paint|layout|strict|content/,ms=e=>!!e&&e!=="none";let Rp;function H1(e){const n=tr(e)?nr(e):e;return ms(n.transform)||ms(n.translate)||ms(n.scale)||ms(n.rotate)||ms(n.perspective)||!q1()&&(ms(n.backdropFilter)||ms(n.filter))||aM.test(n.willChange||"")||rM.test(n.contain||"")}function lM(e){let n=Cs(e);for(;Ll(n)&&!Vc(n);){if(H1(n))return n;if(Of(n))return null;n=Cs(n)}return null}function q1(){return Rp==null&&(Rp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Rp}function Vc(e){return/^(html|body|#document)$/.test(Lo(e))}function nr(e){return Di(e).getComputedStyle(e)}function Df(e){return tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cs(e){if(Lo(e)==="html")return e;const n=e.assignedSlot||e.parentNode||ob(e)&&e.host||Vr(e);return ob(n)?n.host:n}function c5(e){const n=Cs(e);return Vc(n)?(e.ownerDocument||e).body:Ll(n)&&zf(n)?n:c5(n)}function Gc(e,n,a){var r;n===void 0&&(n=[]),a===void 0&&(a=!0);const o=c5(e),c=o===((r=e.ownerDocument)==null?void 0:r.body),d=Di(o);if(c){const f=B0(d);return n.concat(d,d.visualViewport||[],zf(o)?o:[],f&&a?Gc(f):[])}else return n.concat(o,Gc(o,[],a))}function B0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function u5(e){const n=nr(e);let a=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const o=Ll(e),c=o?e.offsetWidth:a,d=o?e.offsetHeight:r,f=uf(a)!==c||uf(r)!==d;return f&&(a=c,r=d),{width:a,height:r,$:f}}function F1(e){return tr(e)?e:e.contextElement}function To(e){const n=F1(e);if(!Ll(n))return Dr(1);const a=n.getBoundingClientRect(),{width:r,height:o,$:c}=u5(n);let d=(c?uf(a.width):a.width)/r,f=(c?uf(a.height):a.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const sM=Dr(0);function d5(e){const n=Di(e);return!q1()||!n.visualViewport?sM:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function oM(e,n,a){return n===void 0&&(n=!1),!!a&&n&&a===Di(e)}function Ns(e,n,a,r){n===void 0&&(n=!1),a===void 0&&(a=!1);const o=e.getBoundingClientRect(),c=F1(e);let d=Dr(1);n&&(r?tr(r)&&(d=To(r)):d=To(e));const f=oM(c,a,r)?d5(c):Dr(0);let h=(o.left+f.x)/d.x,g=(o.top+f.y)/d.y,v=o.width/d.x,p=o.height/d.y;if(c&&r){const j=Di(c),b=tr(r)?Di(r):r;let k=j,S=B0(k);for(;S&&b!==k;){const N=To(S),C=S.getBoundingClientRect(),M=nr(S),E=C.left+(S.clientLeft+parseFloat(M.paddingLeft))*N.x,T=C.top+(S.clientTop+parseFloat(M.paddingTop))*N.y;h*=N.x,g*=N.y,v*=N.x,p*=N.y,h+=E,g+=T,k=Di(S),S=B0(k)}}return ff({width:v,height:p,x:h,y:g})}function Lf(e,n){const a=Df(e).scrollLeft;return n?n.left+a:Ns(Vr(e)).left+a}function f5(e,n){const a=e.getBoundingClientRect(),r=a.left+n.scrollLeft-Lf(e,a),o=a.top+n.scrollTop;return{x:r,y:o}}function cM(e){let{elements:n,rect:a,offsetParent:r,strategy:o}=e;const c=o==="fixed",d=Vr(r),f=n?Of(n.floating):!1;if(r===d||f&&c)return a;let h={scrollLeft:0,scrollTop:0},g=Dr(1);const v=Dr(0),p=Ll(r);if((p||!c)&&((Lo(r)!=="body"||zf(d))&&(h=Df(r)),p)){const b=Ns(r);g=To(r),v.x=b.x+r.clientLeft,v.y=b.y+r.clientTop}const j=d&&!p&&!c?f5(d,h):Dr(0);return{width:a.width*g.x,height:a.height*g.y,x:a.x*g.x-h.scrollLeft*g.x+v.x+j.x,y:a.y*g.y-h.scrollTop*g.y+v.y+j.y}}function uM(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function dM(e){const n=Df(e),a=e.ownerDocument.body,r=Or(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),o=Or(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let c=-n.scrollLeft+Lf(e);const d=-n.scrollTop;return nr(a).direction==="rtl"&&(c+=Or(e.clientWidth,a.clientWidth)-r),{width:r,height:o,x:c,y:d}}const fM=25;function hM(e,n,a){a===void 0&&(a="viewport");const r=a==="layoutViewport",o=Di(e),c=Vr(e),d=o.visualViewport;let f=c.clientWidth,h=c.clientHeight,g=0,v=0;if(d){const j=!q1()||n==="fixed";r?j||(g=-d.offsetLeft,v=-d.offsetTop):(f=d.width,h=d.height,j&&(g=d.offsetLeft,v=d.offsetTop))}if(Lf(c)<=0){const j=c.ownerDocument,b=j.body,k=getComputedStyle(b),S=j.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,N=Math.abs(c.clientWidth-b.clientWidth-S),C=getComputedStyle(c).scrollbarGutter==="stable both-edges"?N/2:N;C<=fM&&(f-=C)}return{width:f,height:h,x:g,y:v}}function mM(e,n){const a=Ns(e,!0,n==="fixed"),r=a.top+e.clientTop,o=a.left+e.clientLeft,c=To(e),d=e.clientWidth*c.x,f=e.clientHeight*c.y,h=o*c.x,g=r*c.y;return{width:d,height:f,x:h,y:g}}function cb(e,n,a){let r;if(n==="viewport"||n==="layoutViewport")r=hM(e,a,n);else if(n==="document")r=dM(Vr(e));else if(tr(n))r=mM(n,a);else{const o=d5(e);r={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return ff(r)}function pM(e,n){const a=n.get(e);if(a)return a;let r=Gc(e,[],!1).filter(f=>tr(f)&&Lo(f)!=="body"),o=null;const c=nr(e).position==="fixed";let d=c?Cs(e):e;for(;tr(d)&&!Vc(d);){const f=nr(d),h=H1(d),g=o?o.position:c?"fixed":"";!h&&(g==="fixed"||g==="absolute"&&f.position==="static")?r=r.filter(p=>p!==d):o=f,d=Cs(d)}return n.set(e,r),r}function gM(e){let{element:n,boundary:a,rootBoundary:r,strategy:o}=e;const d=[...a==="clippingAncestors"?Of(n)?[]:pM(n,this._c):[].concat(a),r],f=cb(n,d[0],o);let h=f.top,g=f.right,v=f.bottom,p=f.left;for(let j=1;j<d.length;j++){const b=cb(n,d[j],o);h=Or(b.top,h),g=Rl(b.right,g),v=Rl(b.bottom,v),p=Or(b.left,p)}return{width:g-p,height:v-h,x:p,y:h}}function vM(e){const{width:n,height:a}=u5(e);return{width:n,height:a}}function yM(e,n,a){const r=Ll(n),o=Vr(n),c=a==="fixed",d=Ns(e,!0,c,n);let f={scrollLeft:0,scrollTop:0};const h=Dr(0);if((r||!c)&&((Lo(n)!=="body"||zf(o))&&(f=Df(n)),r)){const j=Ns(n,!0,c,n);h.x=j.x+n.clientLeft,h.y=j.y+n.clientTop}!r&&o&&(h.x=Lf(o));const g=o&&!r&&!c?f5(o,f):Dr(0),v=d.left+f.scrollLeft-h.x-g.x,p=d.top+f.scrollTop-h.y-g.y;return{x:v,y:p,width:d.width,height:d.height}}function zp(e){return nr(e).position==="static"}function ub(e,n){if(!Ll(e)||nr(e).position==="fixed")return null;if(n)return n(e);let a=e.offsetParent;return Vr(e)===a&&(a=a.ownerDocument.body),a}function h5(e,n){const a=Di(e);if(Of(e))return a;if(!Ll(e)){let o=Cs(e);for(;o&&!Vc(o);){if(tr(o)&&!zp(o))return o;o=Cs(o)}return a}let r=ub(e,n);for(;r&&iM(r)&&zp(r);)r=ub(r,n);return r&&Vc(r)&&zp(r)&&!H1(r)?a:r||lM(e)||a}const xM=async function(e){const n=this.getOffsetParent||h5,a=this.getDimensions,r=await a(e.floating);return{reference:yM(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bM(e){return nr(e).direction==="rtl"}const jM={convertOffsetParentRelativeRectToViewportRelativeRect:cM,getDocumentElement:Vr,getClippingRect:gM,getOffsetParent:h5,getElementRects:xM,getClientRects:uM,getDimensions:vM,getScale:To,isElement:tr,isRTL:bM};function m5(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function wM(e,n,a){let r=null,o;const c=Vr(e);function d(){var v;clearTimeout(o),(v=r)==null||v.disconnect(),r=null}function f(v,p){v===void 0&&(v=!1),p===void 0&&(p=1),d();const j=e.getBoundingClientRect(),{left:b,top:k,width:S,height:N}=j;if(v||n(),!S||!N)return;const C=zd(k),M=zd(c.clientWidth-(b+S)),E=zd(c.clientHeight-(k+N)),T=zd(b),_={rootMargin:-C+"px "+-M+"px "+-E+"px "+-T+"px",threshold:Or(0,Rl(1,p))||1};let z=!0;function P(H){const O=H[0].intersectionRatio;if(!m5(j,e.getBoundingClientRect()))return f();if(O!==p){if(!z)return f();O?f(!1,O):o=setTimeout(()=>{f(!1,1e-7)},1e3)}z=!1}try{r=new IntersectionObserver(P,{..._,root:c.ownerDocument})}catch{r=new IntersectionObserver(P,_)}r.observe(e)}const h=Di(e),g=()=>f(a);return h.addEventListener("resize",g),f(!0),()=>{h.removeEventListener("resize",g),d()}}function kM(e,n,a,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,g=F1(e),v=o||c?[...g?Gc(g):[],...n?Gc(n):[]]:[];v.forEach(C=>{o&&C.addEventListener("scroll",a),c&&C.addEventListener("resize",a)});const p=g&&f?wM(g,a,c):null;let j=-1,b=null;d&&(b=new ResizeObserver(C=>{let[M]=C;M&&M.target===g&&b&&n&&(b.unobserve(n),cancelAnimationFrame(j),j=requestAnimationFrame(()=>{var E;(E=b)==null||E.observe(n)})),a()}),g&&!h&&b.observe(g),n&&b.observe(n));let k,S=h?Ns(e):null;h&&N();function N(){const C=Ns(e);S&&!m5(S,C)&&a(),S=C,k=requestAnimationFrame(N)}return a(),()=>{var C;v.forEach(M=>{o&&M.removeEventListener("scroll",a),c&&M.removeEventListener("resize",a)}),p==null||p(),(C=b)==null||C.disconnect(),b=null,h&&cancelAnimationFrame(k)}}const SM=WT,CM=eM,NM=QT,EM=nM,TM=ZT,db=XT,MM=tM,AM=(e,n,a)=>{const r=new Map,o=a??{},c={...jM,...o.platform,_c:r};return KT(e,n,{...o,platform:c})};var _M=typeof document<"u",RM=function(){},nf=_M?w.useLayoutEffect:RM;function hf(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let a,r,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==n.length)return!1;for(r=a;r--!==0;)if(!hf(e[r],n[r]))return!1;return!0}if(o=Object.keys(e),a=o.length,a!==Object.keys(n).length)return!1;for(r=a;r--!==0;)if(!{}.hasOwnProperty.call(n,o[r]))return!1;for(r=a;r--!==0;){const c=o[r];if(!(c==="_owner"&&e.$$typeof)&&!hf(e[c],n[c]))return!1}return!0}return e!==e&&n!==n}function p5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fb(e,n){const a=p5(e);return Math.round(n*a)/a}function Op(e){const n=w.useRef(e);return nf(()=>{n.current=e}),n}function zM(e){e===void 0&&(e={});const{placement:n="bottom",strategy:a="absolute",middleware:r=[],platform:o,elements:{reference:c,floating:d}={},transform:f=!0,whileElementsMounted:h,open:g}=e,[v,p]=w.useState({x:0,y:0,strategy:a,placement:n,middlewareData:{},isPositioned:!1}),[j,b]=w.useState(r);hf(j,r)||b(r);const[k,S]=w.useState(null),[N,C]=w.useState(null),M=w.useCallback(X=>{X!==_.current&&(_.current=X,S(X))},[]),E=w.useCallback(X=>{X!==z.current&&(z.current=X,C(X))},[]),T=c||k,R=d||N,_=w.useRef(null),z=w.useRef(null),P=w.useRef(v),H=h!=null,O=Op(h),I=Op(o),$=Op(g),Q=w.useCallback(()=>{if(!_.current||!z.current)return;const X={placement:n,strategy:a,middleware:j};I.current&&(X.platform=I.current),AM(_.current,z.current,X).then(Z=>{const D={...Z,isPositioned:$.current!==!1};Y.current&&!hf(P.current,D)&&(P.current=D,Ol.flushSync(()=>{p(D)}))})},[j,n,a,I,$]);nf(()=>{g===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(X=>({...X,isPositioned:!1})))},[g]);const Y=w.useRef(!1);nf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),nf(()=>{if(T&&(_.current=T),R&&(z.current=R),T&&R){if(O.current)return O.current(T,R,Q);Q()}},[T,R,Q,O,H]);const q=w.useMemo(()=>({reference:_,floating:z,setReference:M,setFloating:E}),[M,E]),K=w.useMemo(()=>({reference:T,floating:R}),[T,R]),V=w.useMemo(()=>{const X={position:a,left:0,top:0};if(!K.floating)return X;const Z=fb(K.floating,v.x),D=fb(K.floating,v.y);return f?{...X,transform:"translate("+Z+"px, "+D+"px)",...p5(K.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:Z,top:D}},[a,f,K.floating,v.x,v.y]);return w.useMemo(()=>({...v,update:Q,refs:q,elements:K,floatingStyles:V}),[v,Q,q,K,V])}const OM=e=>{function n(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){const{element:r,padding:o}=typeof e=="function"?e(a):e;return r&&n(r)?r.current!=null?db({element:r.current,padding:o}).fn(a):{}:r?db({element:r,padding:o}).fn(a):{}}}},DM=(e,n)=>{const a=SM(e);return{name:a.name,fn:a.fn,options:[e,n]}},LM=(e,n)=>{const a=CM(e);return{name:a.name,fn:a.fn,options:[e,n]}},BM=(e,n)=>({fn:MM(e).fn,options:[e,n]}),IM=(e,n)=>{const a=NM(e);return{name:a.name,fn:a.fn,options:[e,n]}},PM=(e,n)=>{const a=EM(e);return{name:a.name,fn:a.fn,options:[e,n]}},HM=(e,n)=>{const a=TM(e);return{name:a.name,fn:a.fn,options:[e,n]}},qM=(e,n)=>{const a=OM(e);return{name:a.name,fn:a.fn,options:[e,n]}};var FM=Object.defineProperty,El=(e,n)=>FM(e,"name",{value:n,configurable:!0}),g5="Popper",[v5,Bf]=Dl(g5),[UM,y5]=v5(g5),$M=El(e=>{const{__scopePopper:n,children:a}=e,[r,o]=w.useState(null),[c,d]=w.useState(void 0);return l.jsx(UM,{scope:n,anchor:r,onAnchorChange:o,placementState:c,setPlacementState:d,children:a})},"Popper"),VM="PopperAnchor",GM=w.forwardRef(El(function(n,a){const{__scopePopper:r,virtualRef:o,...c}=n,d=y5(VM,r),f=w.useRef(null),h=d.onAnchorChange,g=w.useCallback(S=>{f.current=S,S&&h(S)},[h]),v=It(a,g),p=w.useRef(null);w.useEffect(()=>{if(!o)return;const S=p.current;p.current=o.current,S!==p.current&&h(p.current)});const j=d.placementState&&If(d.placementState),b=j==null?void 0:j[0],k=j==null?void 0:j[1];return o?null:l.jsx(an.div,{"data-radix-popper-side":b,"data-radix-popper-align":k,...c,ref:v})},"PopperAnchor")),x5="PopperContent",[YM,bU]=v5(x5),KM=w.forwardRef(El(function(n,a){var be,we,ve,re,Ce,Ve,He;const{__scopePopper:r,side:o="bottom",sideOffset:c=0,align:d="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:p=0,sticky:j="partial",hideWhenDetached:b=!1,updatePositionStrategy:k="optimized",onPlaced:S,...N}=n,C=y5(x5,r),[M,E]=w.useState(null),T=It(a,E),[R,_]=w.useState(null),z=a5(R),P=(z==null?void 0:z.width)??0,H=(z==null?void 0:z.height)??0,O=o+(d!=="center"?"-"+d:""),I=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(v)?v:[v],Q=$.length>0,Y={padding:I,boundary:$.filter(b5),altBoundary:Q},{refs:q,floatingStyles:K,placement:V,isPositioned:X,middlewareData:Z}=zM({strategy:"fixed",placement:O,whileElementsMounted:El((...Ze)=>kM(...Ze,{animationFrame:k==="always"}),"whileElementsMounted"),elements:{reference:C.anchor},middleware:[DM({mainAxis:c+H,alignmentAxis:f}),g&&LM({mainAxis:!0,crossAxis:!1,limiter:j==="partial"?BM():void 0,...Y}),g&&IM({...Y}),PM({...Y,apply:El(({elements:Ze,rects:Fe,availableWidth:Ke,availableHeight:gt})=>{const{width:qt,height:Zt}=Fe.reference,en=Ze.floating.style;en.setProperty("--radix-popper-available-width",`${Ke}px`),en.setProperty("--radix-popper-available-height",`${gt}px`),en.setProperty("--radix-popper-anchor-width",`${qt}px`),en.setProperty("--radix-popper-anchor-height",`${Zt}px`)},"apply")}),R&&qM({element:R,padding:h}),XM({arrowWidth:P,arrowHeight:H}),b&&HM({strategy:"referenceHidden",...Y,boundary:Q?Y.boundary:void 0})]}),D=C.setPlacementState;ei(()=>(D(V),()=>{D(void 0)}),[V,D]);const[se,ne]=If(V),B=Wn(S);ei(()=>{X&&(B==null||B())},[X,B]);const F=(be=Z.arrow)==null?void 0:be.x,ee=(we=Z.arrow)==null?void 0:we.y,W=((ve=Z.arrow)==null?void 0:ve.centerOffset)!==0,[de,oe]=w.useState();return ei(()=>{M&&oe(window.getComputedStyle(M).zIndex)},[M]),l.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:X?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(re=Z.transformOrigin)==null?void 0:re.x,(Ce=Z.transformOrigin)==null?void 0:Ce.y].join(" "),...((Ve=Z.hide)==null?void 0:Ve.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:l.jsx(YM,{scope:r,placedSide:se,placedAlign:ne,onArrowChange:_,arrowX:F,arrowY:ee,shouldHideArrow:W,children:l.jsx(an.div,{"data-side":se,"data-align":ne,...N,ref:T,style:{...N.style,animation:X?(He=N.style)==null?void 0:He.animation:"none"}})})})},"PopperContent"));function b5(e){return e!==null}El(b5,"isNotNull");var XM=El(e=>({name:"transformOrigin",options:e,fn(n){var N,C,M;const{placement:a,rects:r,middlewareData:o}=n,d=((N=o.arrow)==null?void 0:N.centerOffset)!==0,f=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=If(a),p={start:"0%",center:"50%",end:"100%"}[v],j=(((C=o.arrow)==null?void 0:C.x)??0)+f/2,b=(((M=o.arrow)==null?void 0:M.y)??0)+h/2;let k="",S="";return g==="bottom"?(k=d?p:`${j}px`,S=`${-h}px`):g==="top"?(k=d?p:`${j}px`,S=`${r.floating.height+h}px`):g==="right"?(k=`${-h}px`,S=d?p:`${b}px`):g==="left"&&(k=`${r.floating.width+h}px`,S=d?p:`${b}px`),{data:{x:k,y:S}}}}),"transformOrigin");function If(e){const[n,a="center"]=e.split("-");return[n,a]}El(If,"getSideAndAlignFromPlacement");var j5=$M,w5=GM,k5=KM,QM=Object.defineProperty,ZM=(e,n)=>QM(e,"name",{value:n,configurable:!0}),JM=w.forwardRef(ZM(function(n,a){return l.jsx(an.label,{...n,ref:a,onMouseDown:r=>{var c;r.target.closest("button, input, select, textarea")||((c=n.onMouseDown)==null||c.call(n,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),WM=JM,eA=Object.defineProperty,tA=(e,n)=>eA(e,"name",{value:n,configurable:!0});function S5(e){const n=w.useRef({value:e,previous:e});return w.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}tA(S5,"usePrevious");var nA=Object.defineProperty,iA=(e,n)=>nA(e,"name",{value:n,configurable:!0});function mf(e,[n,a]){return Math.min(a,Math.max(n,e))}iA(mf,"clamp");var aA=Object.defineProperty,Bl=(e,n)=>aA(e,"name",{value:n,configurable:!0}),U1="Popover",[C5,jU]=Dl(U1,[Bf]),$1=Bf(),[rA,Bo]=C5(U1),lA=Bl(e=>{const{__scopePopover:n,children:a,open:r,defaultOpen:o,onOpenChange:c,modal:d=!1}=e,f=$1(n),h=w.useRef(null),[g,v]=w.useState(!1),[p,j]=Uc({prop:r,defaultProp:o??!1,onChange:c,caller:U1});return l.jsx(j5,{...f,children:l.jsx(rA,{scope:n,contentId:js(),triggerRef:h,open:p,onOpenChange:j,onOpenToggle:w.useCallback(()=>j(b=>!b),[j]),hasCustomAnchor:g,onCustomAnchorAdd:w.useCallback(()=>v(!0),[]),onCustomAnchorRemove:w.useCallback(()=>v(!1),[]),modal:d,children:a})})},"Popover"),sA="PopoverTrigger",oA=w.forwardRef(Bl(function(n,a){const{__scopePopover:r,...o}=n,c=Bo(sA,r),d=$1(r),f=It(a,c.triggerRef),h=l.jsx(an.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":V1(c.open),...o,ref:f,onClick:At(n.onClick,c.onOpenToggle)});return c.hasCustomAnchor?h:l.jsx(w5,{asChild:!0,...d,children:h})},"PopoverTrigger")),N5="PopoverPortal",[cA,uA]=C5(N5,{forceMount:void 0}),dA=Bl(e=>{const{__scopePopover:n,forceMount:a,children:r,container:o}=e,c=Bo(N5,n);return l.jsx(cA,{scope:n,forceMount:a,children:l.jsx(ar,{present:a||c.open,children:l.jsx(R1,{asChild:!0,container:o,children:r})})})},"PopoverPortal"),Yc="PopoverContent",fA=w.forwardRef(Bl(function(n,a){const r=uA(Yc,n.__scopePopover),{forceMount:o=r.forceMount,...c}=n,d=Bo(Yc,n.__scopePopover);return l.jsx(ar,{present:o||d.open,children:d.modal?l.jsx(mA,{...c,ref:a}):l.jsx(pA,{...c,ref:a})})},"PopoverContent")),hA=er("PopoverContent.RemoveScroll"),mA=w.forwardRef(Bl(function(n,a){const r=Bo(Yc,n.__scopePopover),o=w.useRef(null),c=It(a,o),d=w.useRef(!1);return w.useEffect(()=>{const f=o.current;if(f)return O1(f)},[]),l.jsx(_f,{as:hA,allowPinchZoom:!0,children:l.jsx(E5,{...n,ref:c,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:At(n.onCloseAutoFocus,f=>{var h;f.preventDefault(),d.current||(h=r.triggerRef.current)==null||h.focus()}),onPointerDownOutside:At(n.onPointerDownOutside,f=>{const h=f.detail.originalEvent,g=h.button===0&&h.ctrlKey===!0,v=h.button===2||g;d.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:At(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),pA=w.forwardRef(Bl(function(n,a){const r=Bo(Yc,n.__scopePopover),o=w.useRef(!1),c=w.useRef(!1);return l.jsx(E5,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,h;(f=n.onCloseAutoFocus)==null||f.call(n,d),d.defaultPrevented||(o.current||(h=r.triggerRef.current)==null||h.focus(),d.preventDefault()),o.current=!1,c.current=!1},onInteractOutside:d=>{var g,v;(g=n.onInteractOutside)==null||g.call(n,d),d.defaultPrevented||(o.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=d.target;((v=r.triggerRef.current)==null?void 0:v.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})},"PopoverContentNonModal")),E5=w.forwardRef(Bl(function(n,a){const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:p,...j}=n,b=Bo(Yc,r),k=$1(r);return tu(),l.jsx(A1,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:c,onUnmountAutoFocus:d,children:l.jsx(T1,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:p,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:v,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:l.jsx(k5,{"data-state":V1(b.open),role:"dialog",id:b.contentId,...k,...j,ref:a,style:{...j.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function V1(e){return e?"open":"closed"}Bl(V1,"getState");var Pf=lA,Hf=oA,qf=dA,Ff=fA,gA=Object.defineProperty,kt=(e,n)=>gA(e,"name",{value:n,configurable:!0});function T5(e,n){return w.useReducer((a,r)=>n[a][r]??a,e)}kt(T5,"useStateMachine");var M5="ScrollArea",[A5,wU]=Dl(M5),[vA,fa]=A5(M5),yA=w.forwardRef(kt(function(n,a){const{__scopeScrollArea:r,type:o="hover",dir:c,scrollHideDelay:d=600,...f}=n,[h,g]=w.useState(null),[v,p]=w.useState(null),[j,b]=w.useState(null),[k,S]=w.useState(null),[N,C]=w.useState(null),[M,E]=w.useState(0),[T,R]=w.useState(0),[_,z]=w.useState(!1),[P,H]=w.useState(!1),O=It(a,g),I=E1(c);return l.jsx(vA,{scope:r,type:o,dir:I,scrollHideDelay:d,scrollArea:h,viewport:v,onViewportChange:p,content:j,onContentChange:b,scrollbarX:k,onScrollbarXChange:S,scrollbarXEnabled:_,onScrollbarXEnabledChange:z,scrollbarY:N,onScrollbarYChange:C,scrollbarYEnabled:P,onScrollbarYEnabledChange:H,onCornerWidthChange:E,onCornerHeightChange:R,children:l.jsx(an.div,{dir:I,...f,ref:O,style:{position:"relative","--radix-scroll-area-corner-width":M+"px","--radix-scroll-area-corner-height":T+"px",...n.style}})})},"ScrollArea")),xA="ScrollAreaViewport",bA=w.forwardRef(kt(function(n,a){const{__scopeScrollArea:r,children:o,nonce:c,...d}=n,f=fa(xA,r),h=w.useRef(null),g=It(a,h,f.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx(jA,{nonce:c}),l.jsx(an.div,{"data-radix-scroll-area-viewport":"",...d,ref:g,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...n.style},children:l.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})},"ScrollAreaViewport")),jA=w.memo(kt(function({nonce:n}){return l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:n})},"ScrollAreaViewportStyle"),(e,n)=>e.nonce===n.nonce),Gr="ScrollAreaScrollbar",wA=w.forwardRef(kt(function(n,a){const{forceMount:r,...o}=n,c=fa(Gr,n.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:f}=c,h=n.orientation==="horizontal";return w.useEffect(()=>(h?d(!0):f(!0),()=>{h?d(!1):f(!1)}),[h,d,f]),c.type==="hover"?l.jsx(kA,{...o,ref:a,forceMount:r}):c.type==="scroll"?l.jsx(SA,{...o,ref:a,forceMount:r}):c.type==="auto"?l.jsx(_5,{...o,ref:a,forceMount:r}):c.type==="always"?l.jsx(G1,{...o,ref:a,"data-state":"visible"}):null},"ScrollAreaScrollbar")),kA=w.forwardRef(kt(function(n,a){const{forceMount:r,...o}=n,c=fa(Gr,n.__scopeScrollArea),[d,f]=w.useState(!1);return w.useEffect(()=>{const h=c.scrollArea;let g=0;if(h){const v=kt(()=>{window.clearTimeout(g),f(!0)},"handlePointerEnter"),p=kt(()=>{g=window.setTimeout(()=>f(!1),c.scrollHideDelay)},"handlePointerLeave");return h.addEventListener("pointerenter",v),h.addEventListener("pointerleave",p),()=>{window.clearTimeout(g),h.removeEventListener("pointerenter",v),h.removeEventListener("pointerleave",p)}}},[c.scrollArea,c.scrollHideDelay]),l.jsx(ar,{present:r||d,children:l.jsx(_5,{"data-state":d?"visible":"hidden",...o,ref:a})})},"ScrollAreaScrollbarHover")),SA=w.forwardRef(kt(function(n,a){const{forceMount:r,...o}=n,c=fa(Gr,n.__scopeScrollArea),d=n.orientation==="horizontal",f=iu(()=>g("SCROLL_END"),100),[h,g]=T5("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(h==="idle"){const v=window.setTimeout(()=>g("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(v)}},[h,c.scrollHideDelay,g]),w.useEffect(()=>{const v=c.viewport,p=d?"scrollLeft":"scrollTop";if(v){let j=v[p];const b=kt(()=>{const k=v[p];j!==k&&(g("SCROLL"),f()),j=k},"handleScroll");return v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[c.viewport,d,g,f]),l.jsx(ar,{present:r||h!=="hidden",children:l.jsx(G1,{"data-state":h==="hidden"?"hidden":"visible",...o,ref:a,onPointerEnter:At(n.onPointerEnter,()=>g("POINTER_ENTER")),onPointerLeave:At(n.onPointerLeave,()=>g("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),_5=w.forwardRef(kt(function(n,a){const r=fa(Gr,n.__scopeScrollArea),{forceMount:o,...c}=n,[d,f]=w.useState(!1),h=n.orientation==="horizontal",g=iu(()=>{if(r.viewport){const v=r.viewport.offsetWidth<r.viewport.scrollWidth,p=r.viewport.offsetHeight<r.viewport.scrollHeight;f(h?v:p)}},10);return Es(r.viewport,g),Es(r.content,g),l.jsx(ar,{present:o||d,children:l.jsx(G1,{"data-state":d?"visible":"hidden",...c,ref:a})})},"ScrollAreaScrollbarAuto")),G1=w.forwardRef(kt(function(n,a){const{orientation:r="vertical",...o}=n,c=fa(Gr,n.__scopeScrollArea),d=w.useRef(null),f=w.useRef(0),[h,g]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),v=Y1(h.viewport,h.content),p={...o,sizes:h,onSizesChange:g,hasThumb:v>0&&v<1,onThumbChange:kt(b=>d.current=b,"onThumbChange"),onThumbPointerUp:kt(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:kt(b=>f.current=b,"onThumbPointerDown")};function j(b,k){return D5(b,f.current,h,k)}return kt(j,"getScrollPosition"),r==="horizontal"?l.jsx(CA,{...p,ref:a,onThumbPositionChange:()=>{if(c.viewport&&d.current){const b=c.viewport.scrollLeft,k=P0(b,h,c.dir);d.current.style.transform=`translate3d(${k}px, 0, 0)`}},onWheelScroll:b=>{c.viewport&&(c.viewport.scrollLeft=b)},onDragScroll:b=>{c.viewport&&(c.viewport.scrollLeft=j(b,c.dir))}}):r==="vertical"?l.jsx(NA,{...p,ref:a,onThumbPositionChange:()=>{if(c.viewport&&d.current){const b=c.viewport.scrollTop,k=P0(b,h);d.current.style.transform=`translate3d(0, ${k}px, 0)`}},onWheelScroll:b=>{c.viewport&&(c.viewport.scrollTop=b)},onDragScroll:b=>{c.viewport&&(c.viewport.scrollTop=j(b))}}):null},"ScrollAreaScrollbarVisible")),CA=w.forwardRef(kt(function(n,a){const{sizes:r,onSizesChange:o,...c}=n,d=fa(Gr,n.__scopeScrollArea),[f,h]=w.useState(),g=w.useRef(null),v=It(a,g,d.onScrollbarXChange);return w.useEffect(()=>{g.current&&h(getComputedStyle(g.current))},[g]),l.jsx(z5,{"data-orientation":"horizontal",...c,ref:v,sizes:r,style:{bottom:0,left:d.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:d.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":nu(r)+"px",...n.style},onThumbPointerDown:p=>n.onThumbPointerDown(p.x),onDragScroll:p=>n.onDragScroll(p.x),onWheelScroll:(p,j)=>{if(d.viewport){const b=d.viewport.scrollLeft+p.deltaX;n.onWheelScroll(b),X1(b,j)&&p.preventDefault()}},onResize:()=>{g.current&&d.viewport&&f&&o({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:g.current.clientWidth,paddingStart:Kc(f.paddingLeft),paddingEnd:Kc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),NA=w.forwardRef(kt(function(n,a){const{sizes:r,onSizesChange:o,...c}=n,d=fa(Gr,n.__scopeScrollArea),[f,h]=w.useState(),g=w.useRef(null),v=It(a,g,d.onScrollbarYChange);return w.useEffect(()=>{g.current&&h(getComputedStyle(g.current))},[g]),l.jsx(z5,{"data-orientation":"vertical",...c,ref:v,sizes:r,style:{top:0,right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":nu(r)+"px",...n.style},onThumbPointerDown:p=>n.onThumbPointerDown(p.y),onDragScroll:p=>n.onDragScroll(p.y),onWheelScroll:(p,j)=>{if(d.viewport){const b=d.viewport.scrollTop+p.deltaY;n.onWheelScroll(b),X1(b,j)&&p.preventDefault()}},onResize:()=>{g.current&&d.viewport&&f&&o({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:g.current.clientHeight,paddingStart:Kc(f.paddingTop),paddingEnd:Kc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[EA,R5]=A5(Gr),z5=w.forwardRef(kt(function(n,a){const{__scopeScrollArea:r,sizes:o,hasThumb:c,onThumbChange:d,onThumbPointerUp:f,onThumbPointerDown:h,onThumbPositionChange:g,onDragScroll:v,onWheelScroll:p,onResize:j,...b}=n,k=fa(Gr,r),[S,N]=w.useState(null),C=It(a,N),M=w.useRef(null),E=w.useRef(""),T=k.viewport,R=o.content-o.viewport,_=Wn(p),z=Wn(g),P=iu(j,10);function H(O){if(M.current){const I=O.clientX-M.current.left,$=O.clientY-M.current.top;v({x:I,y:$})}}return kt(H,"handleDragScroll"),w.useEffect(()=>{const O=kt(I=>{const $=I.target;(S==null?void 0:S.contains($))&&_(I,R)},"handleWheel");return document.addEventListener("wheel",O,{passive:!1}),()=>document.removeEventListener("wheel",O,{passive:!1})},[T,S,R,_]),w.useEffect(z,[o,z]),Es(S,P),Es(k.content,P),l.jsx(EA,{scope:r,scrollbar:S,hasThumb:c,onThumbChange:Wn(d),onThumbPointerUp:Wn(f),onThumbPositionChange:z,onThumbPointerDown:Wn(h),children:l.jsx(an.div,{...b,ref:C,style:{position:"absolute",...b.style},onPointerDown:At(n.onPointerDown,O=>{O.button===0&&(O.target.setPointerCapture(O.pointerId),M.current=S.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",k.viewport&&(k.viewport.style.scrollBehavior="auto"),H(O))}),onPointerMove:At(n.onPointerMove,H),onPointerUp:At(n.onPointerUp,O=>{const I=O.target;I.hasPointerCapture(O.pointerId)&&I.releasePointerCapture(O.pointerId),document.body.style.webkitUserSelect=E.current,k.viewport&&(k.viewport.style.scrollBehavior=""),M.current=null})})})},"ScrollAreaScrollbarImpl")),I0="ScrollAreaThumb",TA=w.forwardRef(kt(function(n,a){const{forceMount:r,...o}=n,c=R5(I0,n.__scopeScrollArea);return l.jsx(ar,{present:r||c.hasThumb,children:l.jsx(MA,{ref:a,...o})})},"ScrollAreaThumb")),MA=w.forwardRef(kt(function(n,a){const{__scopeScrollArea:r,style:o,...c}=n,d=fa(I0,r),f=R5(I0,r),{onThumbPositionChange:h}=f,g=It(a,f.onThumbChange),v=w.useRef(void 0),p=iu(()=>{v.current&&(v.current(),v.current=void 0)},100);return w.useEffect(()=>{const j=d.viewport;if(j){const b=kt(()=>{if(p(),!v.current){const k=RA(j,h);v.current=k,h()}},"handleScroll");return h(),j.addEventListener("scroll",b),()=>j.removeEventListener("scroll",b)}},[d.viewport,p,h]),l.jsx(an.div,{"data-state":f.hasThumb?"visible":"hidden",...c,ref:g,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:At(n.onPointerDownCapture,j=>{const k=j.target.getBoundingClientRect(),S=j.clientX-k.left,N=j.clientY-k.top;f.onThumbPointerDown({x:S,y:N})}),onPointerUp:At(n.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),O5="ScrollAreaCorner",AA=w.forwardRef(kt(function(n,a){const r=fa(O5,n.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?l.jsx(_A,{...n,ref:a}):null},"ScrollAreaCorner")),_A=w.forwardRef(kt(function(n,a){const{__scopeScrollArea:r,...o}=n,c=fa(O5,r),[d,f]=w.useState(0),[h,g]=w.useState(0),v=!!(d&&h),{onCornerWidthChange:p,onCornerHeightChange:j}=c;return Es(c.scrollbarX,()=>{var k;const b=((k=c.scrollbarX)==null?void 0:k.offsetHeight)||0;c.onCornerHeightChange(b),g(b)}),Es(c.scrollbarY,()=>{var k;const b=((k=c.scrollbarY)==null?void 0:k.offsetWidth)||0;c.onCornerWidthChange(b),f(b)}),w.useEffect(()=>()=>{p(0),j(0)},[p,j]),v?l.jsx(an.div,{...o,ref:a,style:{width:d,height:h,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null},"ScrollAreaCornerImpl"));function Kc(e){return e?parseInt(e,10):0}kt(Kc,"toInt");function Y1(e,n){const a=e/n;return isNaN(a)?0:a}kt(Y1,"getThumbRatio");function nu(e){const n=Y1(e.viewport,e.content),a=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-a)*n;return Math.max(r,18)}kt(nu,"getThumbSize");function D5(e,n,a,r="ltr"){const o=nu(a),c=o/2,d=n||c,f=o-d,h=a.scrollbar.paddingStart+d,g=a.scrollbar.size-a.scrollbar.paddingEnd-f,v=a.content-a.viewport,p=r==="ltr"?[0,v]:[v*-1,0];return K1([h,g],p)(e)}kt(D5,"getScrollPositionFromPointer");function P0(e,n,a="ltr"){const r=nu(n),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,c=n.scrollbar.size-o,d=n.content-n.viewport,f=c-r,h=a==="ltr"?[0,d]:[d*-1,0],g=mf(e,h);return K1([0,d],[0,f])(g)}kt(P0,"getThumbOffsetFromScroll");function K1(e,n){return a=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const r=(n[1]-n[0])/(e[1]-e[0]);return n[0]+r*(a-e[0])}}kt(K1,"linearScale");function X1(e,n){return e>0&&e<n}kt(X1,"isScrollingWithinScrollbarBounds");var RA=kt((e,n=()=>{})=>{let a={left:e.scrollLeft,top:e.scrollTop},r=0;return kt((function o(){const c={left:e.scrollLeft,top:e.scrollTop},d=a.left!==c.left,f=a.top!==c.top;(d||f)&&n(),a=c,r=window.requestAnimationFrame(o)}),"loop")(),()=>window.cancelAnimationFrame(r)},"addUnlinkedScrollListener");function iu(e,n){const a=Wn(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(a,n)},[a,n])}kt(iu,"useDebounceCallback");function Es(e,n){const a=Wn(n);ei(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(a)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,a])}kt(Es,"useResizeObserver");var zA=yA,OA=bA,DA=AA,LA=Object.defineProperty,Ht=(e,n)=>LA(e,"name",{value:n,configurable:!0}),BA=[" ","Enter","ArrowUp","ArrowDown"],IA=[" ","Enter"],Mo="Select",[Uf,Q1,PA]=j3(Mo),[Rs,kU]=Dl(Mo,[PA,Bf]),Z1=Bf(),[HA,Il]=Rs(Mo),[qA,FA]=Rs(Mo);function L5(e){const{__scopeSelect:n,children:a,open:r,defaultOpen:o,onOpenChange:c,value:d,defaultValue:f,onValueChange:h,dir:g,name:v,autoComplete:p,disabled:j,required:b,form:k,internal_do_not_use_render:S}=e,N=Z1(n),[C,M]=w.useState(null),[E,T]=w.useState(null),[R,_]=w.useState(!1),z=E1(g),[P,H]=Uc({prop:r,defaultProp:o??!1,onChange:c,caller:Mo}),[O,I]=Uc({prop:d,defaultProp:f,onChange:h,caller:Mo}),$=w.useRef(null),Q=w.useRef(O);w.useEffect(()=>{const ne=k?C==null?void 0:C.ownerDocument.getElementById(k):C==null?void 0:C.form;if(ne instanceof HTMLFormElement){const B=Ht(()=>I(Q.current),"reset");return ne.addEventListener("reset",B),()=>ne.removeEventListener("reset",B)}},[k,C,I]);const Y=C?!!k||!!C.closest("form"):!0,[q,K]=w.useState(new Set),V=js(),X=Array.from(q).map(ne=>ne.props.value).join(";"),Z=w.useCallback(ne=>{K(B=>new Set(B).add(ne))},[]),D=w.useCallback(ne=>{K(B=>{const F=new Set(B);return F.delete(ne),F})},[]),se={required:b,trigger:C,onTriggerChange:M,valueNode:E,onValueNodeChange:T,valueNodeHasChildren:R,onValueNodeHasChildrenChange:_,contentId:V,value:O,onValueChange:I,open:P,onOpenChange:H,dir:z,triggerPointerDownPosRef:$,disabled:j,name:v,autoComplete:p,form:k,nativeOptions:q,nativeSelectKey:X,isFormControl:Y};return l.jsx(j5,{...N,children:l.jsx(HA,{scope:n,...se,children:l.jsx(Uf.Provider,{scope:n,children:l.jsx(qA,{scope:n,onNativeOptionAdd:Z,onNativeOptionRemove:D,children:P5(S)?S(se):a})})})})}Ht(L5,"SelectProvider");var UA=Ht(e=>{const{__scopeSelect:n,children:a,...r}=e;return l.jsx(L5,{__scopeSelect:n,...r,internal_do_not_use_render:({isFormControl:o})=>l.jsxs(l.Fragment,{children:[a,o?l.jsx(m_,{__scopeSelect:n}):null]})})},"Select"),$A="SelectTrigger",VA=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,disabled:o=!1,...c}=n,d=Z1(r),f=Il($A,r),h=f.disabled||o,g=It(a,f.onTriggerChange),v=Q1(r),p=w.useRef("touch"),[j,b,k]=J1(N=>{const C=v().filter(T=>!T.disabled),M=C.find(T=>T.value===f.value),E=W1(C,N,M);E!==void 0&&f.onValueChange(E.value)}),S=Ht(N=>{h||(f.onOpenChange(!0),k()),N&&(f.triggerPointerDownPosRef.current={x:Math.round(N.pageX),y:Math.round(N.pageY)})},"handleOpen");return l.jsx(w5,{asChild:!0,...d,children:l.jsx(an.button,{type:"button",role:"combobox","aria-controls":f.open?f.contentId:void 0,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":au(f.value)?"":void 0,...c,ref:g,onClick:At(c.onClick,N=>{N.currentTarget.focus(),p.current!=="mouse"&&S(N)}),onPointerDown:At(c.onPointerDown,N=>{p.current=N.pointerType;const C=N.target;C.hasPointerCapture(N.pointerId)&&C.releasePointerCapture(N.pointerId),N.button===0&&N.ctrlKey===!1&&N.pointerType==="mouse"&&(S(N),N.preventDefault())}),onKeyDown:At(c.onKeyDown,N=>{const C=j.current!=="";!(N.ctrlKey||N.altKey||N.metaKey)&&N.key.length===1&&b(N.key),!(C&&N.key===" ")&&BA.includes(N.key)&&(S(),N.preventDefault())})})})},"SelectTrigger")),GA="SelectValue",YA=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,className:o,style:c,children:d,placeholder:f="",...h}=n,g=Il(GA,r),{onValueNodeHasChildrenChange:v}=g,p=d!==void 0,j=It(a,g.onValueNodeChange);ei(()=>{v(p)},[v,p]);const b=au(g.value);return l.jsx(an.span,{...h,asChild:b?!1:h.asChild,ref:j,style:{pointerEvents:"none"},children:l.jsx(w.Fragment,{children:b?f:d},b?"placeholder":"value")})},"SelectValue")),KA=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,children:o,...c}=n;return l.jsx(an.span,{"aria-hidden":!0,...c,ref:a,children:o||"▼"})},"SelectIcon")),XA="SelectPortal",[QA,ZA]=Rs(XA,{forceMount:void 0}),JA=Ht(e=>{const{__scopeSelect:n,forceMount:a,...r}=e;return l.jsx(QA,{scope:e.__scopeSelect,forceMount:a,children:l.jsx(R1,{asChild:!0,...r})})},"SelectPortal"),Ts="SelectContent",WA=w.forwardRef(Ht(function(n,a){const r=ZA(Ts,n.__scopeSelect),{forceMount:o=r.forceMount,...c}=n,d=Il(Ts,n.__scopeSelect),[f,h]=w.useState();return ei(()=>{h(new DocumentFragment)},[]),l.jsx(ar,{present:o||d.open,children:({present:g})=>g?l.jsx(n_,{...c,ref:a}):l.jsx(e_,{...c,fragment:f})})},"SelectContent")),e_=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,children:o,fragment:c}=n;return c?Ol.createPortal(l.jsx(B5,{scope:r,children:l.jsx(Uf.Slot,{scope:r,children:l.jsx("div",{ref:a,children:o})})}),c):null},"SelectContentFragment")),wa=10,[B5,$f]=Rs(Ts),t_=er("SelectContent.RemoveScroll"),n_=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r}=n,{position:o="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,side:h,sideOffset:g,align:v,alignOffset:p,arrowPadding:j,collisionBoundary:b,collisionPadding:k,sticky:S,hideWhenDetached:N,avoidCollisions:C,...M}=n,E=Il(Ts,r),[T,R]=w.useState(null),[_,z]=w.useState(null),P=It(a,R),[H,O]=w.useState(null),[I,$]=w.useState(null),Q=Q1(r),[Y,q]=w.useState(!1),K=w.useRef(!1);w.useEffect(()=>{if(T)return O1(T)},[T]),tu();const V=w.useCallback(oe=>{const[be,...we]=Q().map(Ce=>Ce.ref.current),[ve]=we.slice(-1),re=document.activeElement;for(const Ce of oe)if(Ce===re||(Ce==null||Ce.scrollIntoView({block:"nearest"}),Ce===be&&_&&(_.scrollTop=0),Ce===ve&&_&&(_.scrollTop=_.scrollHeight),Ce==null||Ce.focus(),document.activeElement!==re))return},[Q,_]),X=w.useCallback(()=>V([H,T]),[V,H,T]);w.useEffect(()=>{Y&&X()},[Y,X]);const{onOpenChange:Z,triggerPointerDownPosRef:D}=E;w.useEffect(()=>{if(T){let oe={x:0,y:0};const be=Ht(ve=>{var re,Ce;oe={x:Math.abs(Math.round(ve.pageX)-(((re=D.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(ve.pageY)-(((Ce=D.current)==null?void 0:Ce.y)??0))}},"handlePointerMove"),we=Ht(ve=>{oe.x<=10&&oe.y<=10?ve.preventDefault():ve.composedPath().includes(T)||Z(!1),document.removeEventListener("pointermove",be),D.current=null},"handlePointerUp");return D.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",we,{capture:!0})}}},[T,Z,D]),w.useEffect(()=>{const oe=Ht(()=>Z(!1),"close");return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[Z]);const[se,ne]=J1(oe=>{const be=Q().filter(re=>!re.disabled),we=be.find(re=>re.ref.current===document.activeElement),ve=W1(be,oe,we);ve&&setTimeout(()=>{var re;return(re=ve.ref.current)==null?void 0:re.focus()})}),B=w.useCallback((oe,be,we)=>{const ve=!K.current&&!we;(E.value!==void 0&&E.value===be||ve)&&(O(oe),ve&&(K.current=!0))},[E.value]),F=w.useCallback(()=>T==null?void 0:T.focus(),[T]),ee=w.useCallback((oe,be,we)=>{const ve=!K.current&&!we;(E.value!==void 0&&E.value===be||ve)&&$(oe)},[E.value]),W=o==="popper"?hb:i_,de=W===hb?{side:h,sideOffset:g,align:v,alignOffset:p,arrowPadding:j,collisionBoundary:b,collisionPadding:k,sticky:S,hideWhenDetached:N,avoidCollisions:C}:{};return l.jsx(B5,{scope:r,content:T,viewport:_,onViewportChange:z,itemRefCallback:B,selectedItem:H,onItemLeave:F,itemTextRefCallback:ee,focusSelectedItem:X,selectedItemText:I,position:o,isPositioned:Y,searchRef:se,children:l.jsx(_f,{as:t_,allowPinchZoom:!0,children:l.jsx(A1,{asChild:!0,trapped:E.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:At(c,oe=>{var be;(be=E.trigger)==null||be.focus({preventScroll:!0}),oe.preventDefault()}),children:l.jsx(T1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:l.jsx(W,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:oe=>oe.preventDefault(),...M,...de,onPlaced:()=>q(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:At(M.onKeyDown,oe=>{const be=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!be&&oe.key.length===1&&ne(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let ve=Q().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const re=oe.target,Ce=ve.indexOf(re);ve=ve.slice(Ce+1)}setTimeout(()=>V(ve)),oe.preventDefault()}})})})})})})},"SelectContentImpl")),i_=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,onPlaced:o,...c}=n,d=Il(Ts,r),f=$f(Ts,r),[h,g]=w.useState(null),[v,p]=w.useState(null),j=It(a,p),b=Q1(r),k=w.useRef(!1),S=w.useRef(!0),{viewport:N,selectedItem:C,selectedItemText:M,focusSelectedItem:E}=f,T=w.useCallback(()=>{if(d.trigger&&d.valueNode&&h&&v&&N&&C&&M){const P=d.trigger.getBoundingClientRect(),H=v.getBoundingClientRect(),O=d.valueNode.getBoundingClientRect(),I=M.getBoundingClientRect();if(d.dir!=="rtl"){const re=I.left-H.left,Ce=O.left-re,Ve=P.left-Ce,He=P.width+Ve,Ze=Math.max(He,H.width),Fe=window.innerWidth-wa,Ke=mf(Ce,[wa,Math.max(wa,Fe-Ze)]);h.style.minWidth=He+"px",h.style.left=Ke+"px"}else{const re=H.right-I.right,Ce=window.innerWidth-O.right-re,Ve=window.innerWidth-P.right-Ce,He=P.width+Ve,Ze=Math.max(He,H.width),Fe=window.innerWidth-wa,Ke=mf(Ce,[wa,Math.max(wa,Fe-Ze)]);h.style.minWidth=He+"px",h.style.right=Ke+"px"}const $=b(),Q=window.innerHeight-wa*2,Y=N.scrollHeight,q=window.getComputedStyle(v),K=parseInt(q.borderTopWidth,10),V=parseInt(q.paddingTop,10),X=parseInt(q.borderBottomWidth,10),Z=parseInt(q.paddingBottom,10),D=K+V+Y+Z+X,se=Math.min(C.offsetHeight*5,D),ne=window.getComputedStyle(N),B=parseInt(ne.paddingTop,10),F=parseInt(ne.paddingBottom,10),ee=P.top+P.height/2-wa,W=Q-ee,de=C.offsetHeight/2,oe=C.offsetTop+de,be=K+V+oe,we=D-be;if(be<=ee){const re=$.length>0&&C===$[$.length-1].ref.current;h.style.bottom="0px";const Ce=v.clientHeight-N.offsetTop-N.offsetHeight,Ve=Math.max(W,de+(re?F:0)+Ce+X),He=be+Ve;h.style.height=He+"px"}else{const re=$.length>0&&C===$[0].ref.current;h.style.top="0px";const Ve=Math.max(ee,K+N.offsetTop+(re?B:0)+de)+we;h.style.height=Ve+"px",N.scrollTop=be-ee+N.offsetTop}h.style.margin=`${wa}px 0`,h.style.minHeight=se+"px",h.style.maxHeight=Q+"px",o==null||o(),requestAnimationFrame(()=>k.current=!0)}},[b,d.trigger,d.valueNode,h,v,N,C,M,d.dir,o]);ei(()=>T(),[T]);const[R,_]=w.useState();ei(()=>{v&&_(window.getComputedStyle(v).zIndex)},[v]);const z=w.useCallback(P=>{P&&S.current===!0&&(T(),E==null||E(),S.current=!1)},[T,E]);return l.jsx(a_,{scope:r,contentWrapper:h,shouldExpandOnScrollRef:k,onScrollButtonChange:z,children:l.jsx("div",{ref:g,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:l.jsx(an.div,{...c,ref:j,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})},"SelectItemAlignedPosition")),hb=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,align:o="start",collisionPadding:c=wa,...d}=n,f=Z1(r);return l.jsx(k5,{...f,...d,ref:a,align:o,collisionPadding:c,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[a_,r_]=Rs(Ts,{}),mb="SelectViewport",l_=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,nonce:o,...c}=n,d=$f(mb,r),f=r_(mb,r),h=It(a,d.onViewportChange),g=w.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(Uf.Slot,{scope:r,children:l.jsx(an.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:At(c.onScroll,v=>{const p=v.currentTarget,{contentWrapper:j,shouldExpandOnScrollRef:b}=f;if(b!=null&&b.current&&j){const k=Math.abs(g.current-p.scrollTop);if(k>0){const S=window.innerHeight-wa*2,N=parseFloat(j.style.minHeight),C=parseFloat(j.style.height),M=Math.max(N,C);if(M<S){const E=M+k,T=Math.min(S,E),R=E-T;j.style.height=T+"px",j.style.bottom==="0px"&&(p.scrollTop=R>0?R:0,j.style.justifyContent="flex-end")}}}g.current=p.scrollTop})})})]})},"SelectViewport")),s_="SelectGroup",[SU,CU]=Rs(s_),H0="SelectItem",[o_,I5]=Rs(H0),c_=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,value:o,disabled:c=!1,textValue:d,...f}=n,h=Il(H0,r),g=$f(H0,r),v=h.value===o,[p,j]=w.useState(d??""),[b,k]=w.useState(!1),S=Wn(T=>{var R;return(R=g.itemRefCallback)==null?void 0:R.call(g,T,o,c)}),N=It(a,S),C=js(),M=w.useRef("touch"),E=Ht(()=>{c||(h.onValueChange(o),h.onOpenChange(!1))},"handleSelect");return l.jsx(o_,{scope:r,value:o,disabled:c,textId:C,isSelected:v,onItemTextChange:w.useCallback(T=>{j(R=>R||((T==null?void 0:T.textContent)??"").trim())},[]),children:l.jsx(Uf.ItemSlot,{scope:r,value:o,disabled:c,textValue:p,children:l.jsx(an.div,{role:"option","aria-labelledby":C,"data-highlighted":b?"":void 0,"aria-selected":v&&b,"data-state":v?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...f,ref:N,onFocus:At(f.onFocus,()=>k(!0)),onBlur:At(f.onBlur,()=>k(!1)),onClick:At(f.onClick,()=>{M.current!=="mouse"&&E()}),onPointerUp:At(f.onPointerUp,()=>{M.current==="mouse"&&E()}),onPointerDown:At(f.onPointerDown,T=>{M.current=T.pointerType}),onPointerMove:At(f.onPointerMove,T=>{var R;M.current=T.pointerType,c?(R=g.onItemLeave)==null||R.call(g):M.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:At(f.onPointerLeave,T=>{var R;T.currentTarget===document.activeElement&&((R=g.onItemLeave)==null||R.call(g))}),onKeyDown:At(f.onKeyDown,T=>{var _;c||T.target!==T.currentTarget||((_=g.searchRef)==null?void 0:_.current)!==""&&T.key===" "||(IA.includes(T.key)&&E(),T.key===" "&&T.preventDefault())})})})})},"SelectItem")),Od="SelectItemText",u_=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,className:o,style:c,...d}=n,f=Il(Od,r),h=$f(Od,r),g=I5(Od,r),v=FA(Od,r),[p,j]=w.useState(null),b=Wn(E=>{var T;return(T=h.itemTextRefCallback)==null?void 0:T.call(h,E,g.value,g.disabled)}),k=It(a,j,g.onItemTextChange,b),S=p==null?void 0:p.textContent,N=w.useMemo(()=>l.jsx("option",{value:g.value,disabled:g.disabled,children:S},g.value),[g.disabled,g.value,S]),{onNativeOptionAdd:C,onNativeOptionRemove:M}=v;return ei(()=>(C(N),()=>M(N)),[C,M,N]),l.jsxs(l.Fragment,{children:[l.jsx(an.span,{id:g.textId,...d,ref:k}),g.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!au(f.value)?Ol.createPortal(d.children,f.valueNode):null]})},"SelectItemText")),d_="SelectItemIndicator",f_=w.forwardRef(Ht(function(n,a){const{__scopeSelect:r,...o}=n;return I5(d_,r).isSelected?l.jsx(an.span,{"aria-hidden":!0,...o,ref:a}):null},"SelectItemIndicator")),h_="SelectBubbleInput",m_=w.forwardRef(Ht(function({__scopeSelect:n,...a},r){const o=Il(h_,n),{value:c,onValueChange:d,required:f,disabled:h,name:g,autoComplete:v,form:p}=o,{nativeOptions:j,nativeSelectKey:b}=o,k=w.useRef(null),S=It(r,k),N=c??"",C=S5(N),M=Array.from(j).some(E=>(E.props.value??"")==="");return w.useEffect(()=>{const E=k.current;if(!E)return;const T=window.HTMLSelectElement.prototype,_=Object.getOwnPropertyDescriptor(T,"value").set;if(C!==N&&_){const z=new Event("change",{bubbles:!0});_.call(E,N),E.dispatchEvent(z)}},[C,N]),l.jsxs(an.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:g,autoComplete:v,disabled:h,form:p,onChange:E=>d(E.target.value),...a,style:{...aE,...a.style},ref:S,defaultValue:N,children:[au(c)&&!M?l.jsx("option",{value:""}):null,Array.from(j)]},b)},"SelectBubbleInput"));function P5(e){return typeof e=="function"}Ht(P5,"isFunction");function au(e){return e===""||e===void 0}Ht(au,"shouldShowPlaceholder");function J1(e){const n=Wn(e),a=w.useRef(""),r=w.useRef(0),o=w.useCallback(d=>{const f=a.current+d;n(f),Ht((function h(g){a.current=g,window.clearTimeout(r.current),g!==""&&(r.current=window.setTimeout(()=>h(""),1e3))}),"updateSearch")(f)},[n]),c=w.useCallback(()=>{a.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[a,o,c]}Ht(J1,"useTypeaheadSearch");function W1(e,n,a){const o=n.length>1&&Array.from(n).every(g=>g===n[0])?n[0]:n,c=a?e.indexOf(a):-1;let d=H5(e,Math.max(c,0));o.length===1&&(d=d.filter(g=>g!==a));const h=d.find(g=>g.textValue.toLowerCase().startsWith(o.toLowerCase()));return h!==a?h:void 0}Ht(W1,"findNextItem");function H5(e,n){return e.map((a,r)=>e[(n+r)%e.length])}Ht(H5,"wrapArray");const p_=S1("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ee({className:e,variant:n="default",size:a="default",asChild:r=!1,...o}){const c=r?XN:"button";return l.jsx(c,{"data-slot":"button","data-variant":n,"data-size":a,className:Dn(p_({variant:n,size:a,className:e})),...o})}const q5=100;function g_(e){const n=e.trim(),a=n.startsWith("<")&&n.endsWith(">")?y_(n):null;if(!(a!=null&&a.length))return null;const r=F5(a,0,0)[0];for(;r.length&&!r[0].text.trim();)r.shift();for(;r.length&&!r.at(-1).text.trim();)r.pop();return r.length?r:null}function F5(e,n,a){const r=[];let o=n;for(;o<e.length;){const c=e[o];if(c.kind==="close")return[r,o+1];if(c.kind==="text"){r.push(...v_(c.text,a)),o++;continue}if(c.kind==="self"){r.push(...pb(c,a)),o++;continue}const d=e[o+1],f=e[o+2],h=U5(c.attrs);if((d==null?void 0:d.kind)==="close"&&d.name===c.name){r.push({depth:a,text:`<${c.name}${h} />`}),o+=2;continue}if((d==null?void 0:d.kind)==="text"&&(f==null?void 0:f.kind)==="close"&&f.name===c.name&&!d.text.includes(`
|
|
575
|
+
`)){const p=`<${c.name}${h}>${d.text.trim()}</${c.name}>`;if(p.length<=q5){r.push({depth:a,text:p}),o+=3;continue}}r.push(...pb(c,a));const[g,v]=F5(e,o+1,a+1);r.push(...g,{depth:a,text:`</${c.name}>`}),o=v}return[r,o]}function v_(e,n){const a=e.split(`
|
|
576
|
+
`);for(;a.length&&!a[0].trim();)a.shift();for(;a.length&&!a.at(-1).trim();)a.pop();return a.map(r=>({depth:n,text:r.trimEnd()}))}function U5(e){return e.map(n=>` ${n}`).join("")}function pb(e,n){const a=U5(e.attrs),r=e.kind==="self"?" />":">",o=`<${e.name}${a}${r}`;if(o.length<=q5||!e.attrs.length)return[{depth:n,text:o}];const c=e.attrs.map(d=>` ${d}`);return c[c.length-1]=`${c[c.length-1]}${r}`,[{depth:n,text:`<${e.name}`},...c.map(d=>({depth:n,text:d}))]}function y_(e){const n=[],a=[];let r=0;for(;r<e.length;){const o=e.indexOf("<",r);if(o<0){n.push({kind:"text",text:e.slice(r)});break}o>r&&n.push({kind:"text",text:e.slice(r,o)});let c=o+1,d=null;for(;c<e.length;c++){const p=e[c];if(d)p===d&&(d=null);else if(p==='"'||p==="'")d=p;else if(p===">")break}if(c>=e.length)return null;const f=e.slice(o+1,c).trim(),h=f.startsWith("/"),g=f.endsWith("/"),v=(h?f.slice(1):g?f.slice(0,-1):f).trim().split(/[\s/]/,1)[0]??"";if(!/^[A-Za-z][\w.:-]*$/.test(v))return null;if(h){if(a.pop()!==v)return null;n.push({kind:"close",name:v,attrs:[]})}else g||a.push(v),n.push({kind:g?"self":"open",name:v,attrs:x_(f.slice(v.length))});r=c+1}return a.length?null:n}function x_(e){const n=[],a=/([\w.:-]+)\s*=\s*("(?:[^"]*)"|'(?:[^']*)')|([\w.:-]+)/g;for(const r of e.matchAll(a))n.push(r[0].replace(/\s*=\s*/,"="));return n}const b_=5*6e4,ws=e=>new Date(e).toDateString(),eg=(e,n)=>n===void 0||ws(e)!==ws(n),$5=(e,n,a=n==null?void 0:n.createdAt)=>eg(e.createdAt,a)||(n==null?void 0:n.senderId)!==e.senderId||e.createdAt-n.createdAt>=b_;function j_(e){const n=new Date,a=new Date(e),r=new Date(n.getFullYear(),n.getMonth(),n.getDate()-1);if(ws(e)===ws(n.getTime()))return y("chat.today");if(ws(e)===r.toDateString())return y("chat.yesterday");const o=Tl()==="zh"?"long":"short";return a.getFullYear()===n.getFullYear()?Si(e,{weekday:"short",month:o,day:"numeric"}):Si(e,{year:"numeric",month:o,day:"numeric"})}const w_=e=>Si(e,{year:"numeric",month:Tl()==="zh"?"long":"short",day:"numeric",hour:Tl()==="zh"?"2-digit":"numeric",minute:"2-digit"}),tg=e=>ws(e)===ws(Date.now())?Ml(e):`${Nf(e)} ${Ml(e)}`;function V5({time:e}){return l.jsx("div",{className:"jv-day",role:"separator",children:l.jsx("span",{children:j_(e)})})}function q0({time:e,className:n}){return l.jsx("time",{className:n,dateTime:new Date(e).toISOString(),title:w_(e),children:Ml(e)})}function k_(e,n){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const S_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,C_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N_={};function gb(e,n){return(N_.jsx?C_:S_).test(e)}const E_=/[ \t\n\f\r]/g;function T_(e){return typeof e=="object"?e.type==="text"?vb(e.value):!1:vb(e)}function vb(e){return e.replace(E_,"")===""}class ru{constructor(n,a,r){this.normal=a,this.property=n,r&&(this.space=r)}}ru.prototype.normal={};ru.prototype.property={};ru.prototype.space=void 0;function G5(e,n){const a={},r={};for(const o of e)Object.assign(a,o.property),Object.assign(r,o.normal);return new ru(a,r,n)}function F0(e){return e.toLowerCase()}class Bi{constructor(n,a){this.attribute=a,this.property=n}}Bi.prototype.attribute="";Bi.prototype.booleanish=!1;Bi.prototype.boolean=!1;Bi.prototype.commaOrSpaceSeparated=!1;Bi.prototype.commaSeparated=!1;Bi.prototype.defined=!1;Bi.prototype.mustUseProperty=!1;Bi.prototype.number=!1;Bi.prototype.overloadedBoolean=!1;Bi.prototype.property="";Bi.prototype.spaceSeparated=!1;Bi.prototype.space=void 0;let M_=0;const lt=zs(),Mn=zs(),U0=zs(),Te=zs(),$t=zs(),ks=zs(),Xi=zs();function zs(){return 2**++M_}const $0=Object.freeze(Object.defineProperty({__proto__:null,boolean:lt,booleanish:Mn,commaOrSpaceSeparated:Xi,commaSeparated:ks,number:Te,overloadedBoolean:U0,spaceSeparated:$t},Symbol.toStringTag,{value:"Module"})),Dp=Object.keys($0);class ng extends Bi{constructor(n,a,r,o){let c=-1;if(super(n,a),yb(this,"space",o),typeof r=="number")for(;++c<Dp.length;){const d=Dp[c];yb(this,Dp[c],(r&$0[d])===$0[d])}}}ng.prototype.defined=!0;function yb(e,n,a){a&&(e[n]=a)}function Io(e){const n={},a={};for(const[r,o]of Object.entries(e.properties)){const c=new ng(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(c.mustUseProperty=!0),n[r]=c,a[F0(r)]=r,a[F0(c.attribute)]=r}return new ru(n,a,e.space)}const Y5=Io({properties:{ariaActiveDescendant:null,ariaAtomic:Mn,ariaAutoComplete:null,ariaBusy:Mn,ariaChecked:Mn,ariaColCount:Te,ariaColIndex:Te,ariaColSpan:Te,ariaControls:$t,ariaCurrent:null,ariaDescribedBy:$t,ariaDetails:null,ariaDisabled:Mn,ariaDropEffect:$t,ariaErrorMessage:null,ariaExpanded:Mn,ariaFlowTo:$t,ariaGrabbed:Mn,ariaHasPopup:null,ariaHidden:Mn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$t,ariaLevel:Te,ariaLive:null,ariaModal:Mn,ariaMultiLine:Mn,ariaMultiSelectable:Mn,ariaOrientation:null,ariaOwns:$t,ariaPlaceholder:null,ariaPosInSet:Te,ariaPressed:Mn,ariaReadOnly:Mn,ariaRelevant:null,ariaRequired:Mn,ariaRoleDescription:$t,ariaRowCount:Te,ariaRowIndex:Te,ariaRowSpan:Te,ariaSelected:Mn,ariaSetSize:Te,ariaSort:null,ariaValueMax:Te,ariaValueMin:Te,ariaValueNow:Te,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function K5(e,n){return n in e?e[n]:n}function X5(e,n){return K5(e,n.toLowerCase())}const A_=Io({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ks,acceptCharset:$t,accessKey:$t,action:null,allow:null,allowFullScreen:lt,allowPaymentRequest:lt,allowUserMedia:lt,alpha:lt,alt:null,as:null,async:lt,autoCapitalize:null,autoComplete:$t,autoFocus:lt,autoPlay:lt,blocking:$t,capture:null,charSet:null,checked:lt,cite:null,className:$t,closedBy:null,colorSpace:null,cols:Te,colSpan:Te,command:null,commandFor:null,content:null,contentEditable:Mn,controls:lt,controlsList:$t,coords:Te|ks,crossOrigin:null,data:null,dateTime:null,decoding:null,default:lt,defer:lt,dir:null,dirName:null,disabled:lt,download:U0,draggable:Mn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:lt,formTarget:null,headers:$t,height:Te,hidden:U0,high:Te,href:null,hrefLang:null,htmlFor:$t,httpEquiv:$t,id:null,imageSizes:null,imageSrcSet:null,inert:lt,inputMode:null,integrity:null,is:null,isMap:lt,itemId:null,itemProp:$t,itemRef:$t,itemScope:lt,itemType:$t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:lt,low:Te,manifest:null,max:null,maxLength:Te,media:null,method:null,min:null,minLength:Te,multiple:lt,muted:lt,name:null,nonce:null,noModule:lt,noValidate:lt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:lt,optimum:Te,pattern:null,ping:$t,placeholder:null,playsInline:lt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:lt,referrerPolicy:null,rel:$t,required:lt,reversed:lt,rows:Te,rowSpan:Te,sandbox:$t,scope:null,scoped:lt,seamless:lt,selected:lt,shadowRootClonable:lt,shadowRootCustomElementRegistry:lt,shadowRootDelegatesFocus:lt,shadowRootMode:null,shadowRootSerializable:lt,shape:null,size:Te,sizes:null,slot:null,span:Te,spellCheck:Mn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Te,step:null,style:null,tabIndex:Te,target:null,title:null,translate:null,type:null,typeMustMatch:lt,useMap:null,value:Mn,width:Te,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$t,axis:null,background:null,bgColor:null,border:Te,borderColor:null,bottomMargin:Te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:lt,declare:lt,event:null,face:null,frame:null,frameBorder:null,hSpace:Te,leftMargin:Te,link:null,longDesc:null,lowSrc:null,marginHeight:Te,marginWidth:Te,noResize:lt,noHref:lt,noShade:lt,noWrap:lt,object:null,profile:null,prompt:null,rev:null,rightMargin:Te,rules:null,scheme:null,scrolling:Mn,standby:null,summary:null,text:null,topMargin:Te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Te,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:lt,disablePictureInPicture:lt,disableRemotePlayback:lt,exportParts:ks,part:$t,prefix:null,property:null,results:Te,security:null,unselectable:null},space:"html",transform:X5}),__=Io({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Xi,accentHeight:Te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Te,amplitude:Te,arabicForm:null,ascent:Te,attributeName:null,attributeType:null,azimuth:Te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Te,by:null,calcMode:null,capHeight:Te,className:$t,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Te,diffuseConstant:Te,direction:null,display:null,dur:null,divisor:Te,dominantBaseline:null,download:lt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Te,enableBackground:null,end:null,event:null,exponent:Te,externalResourcesRequired:null,fill:null,fillOpacity:Te,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ks,g2:ks,glyphName:ks,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Te,horizOriginX:Te,horizOriginY:Te,id:null,ideographic:Te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Te,k:Te,k1:Te,k2:Te,k3:Te,k4:Te,kernelMatrix:Xi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Te,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Te,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Te,overlineThickness:Te,paintOrder:null,panose1:null,path:null,pathLength:Te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Te,pointsAtY:Te,pointsAtZ:Te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xi,rev:Xi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xi,requiredFeatures:Xi,requiredFonts:Xi,requiredFormats:Xi,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Te,specularExponent:Te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Te,strikethroughThickness:Te,string:null,stroke:null,strokeDashArray:Xi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Te,strokeOpacity:Te,strokeWidth:null,style:null,surfaceScale:Te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xi,tabIndex:Te,tableValues:null,target:null,targetX:Te,targetY:Te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Te,underlineThickness:Te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Te,values:null,vAlphabetic:Te,vMathematical:Te,vectorEffect:null,vHanging:Te,vIdeographic:Te,version:null,vertAdvY:Te,vertOriginX:Te,vertOriginY:Te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:K5}),Q5=Io({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Z5=Io({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:X5}),J5=Io({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),R_={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},z_=/[A-Z]/g,xb=/-[a-z]/g,O_=/^data[-\w.:]+$/i;function D_(e,n){const a=F0(n);let r=n,o=Bi;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&O_.test(n)){if(n.charAt(4)==="-"){const c=n.slice(5).replace(xb,B_);r="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=n.slice(4);if(!xb.test(c)){let d=c.replace(z_,L_);d.charAt(0)!=="-"&&(d="-"+d),n="data"+d}}o=ng}return new o(r,n)}function L_(e){return"-"+e.toLowerCase()}function B_(e){return e.charAt(1).toUpperCase()}const I_=G5([Y5,A_,Q5,Z5,J5],"html"),ig=G5([Y5,__,Q5,Z5,J5],"svg");function P_(e){return e.join(" ").trim()}var bo={},Lp,bb;function H_(){if(bb)return Lp;bb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,a=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
577
|
+
`,g="/",v="*",p="",j="comment",b="declaration";function k(N,C){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];C=C||{};var M=1,E=1;function T(Y){var q=Y.match(n);q&&(M+=q.length);var K=Y.lastIndexOf(h);E=~K?Y.length-K:E+Y.length}function R(){var Y={line:M,column:E};return function(q){return q.position=new _(Y),H(),q}}function _(Y){this.start=Y,this.end={line:M,column:E},this.source=C.source}_.prototype.content=N;function z(Y){var q=new Error(C.source+":"+M+":"+E+": "+Y);if(q.reason=Y,q.filename=C.source,q.line=M,q.column=E,q.source=N,!C.silent)throw q}function P(Y){var q=Y.exec(N);if(q){var K=q[0];return T(K),N=N.slice(K.length),q}}function H(){P(a)}function O(Y){var q;for(Y=Y||[];q=I();)q!==!1&&Y.push(q);return Y}function I(){var Y=R();if(!(g!=N.charAt(0)||v!=N.charAt(1))){for(var q=2;p!=N.charAt(q)&&(v!=N.charAt(q)||g!=N.charAt(q+1));)++q;if(q+=2,p===N.charAt(q-1))return z("End of comment missing");var K=N.slice(2,q-2);return E+=2,T(K),N=N.slice(q),E+=2,Y({type:j,comment:K})}}function $(){var Y=R(),q=P(r);if(q){if(I(),!P(o))return z("property missing ':'");var K=P(c),V=Y({type:b,property:S(q[0].replace(e,p)),value:K?S(K[0].replace(e,p)):p});return P(d),V}}function Q(){var Y=[];O(Y);for(var q;q=$();)q!==!1&&(Y.push(q),O(Y));return Y}return H(),Q()}function S(N){return N?N.replace(f,p):p}return Lp=k,Lp}var jb;function q_(){if(jb)return bo;jb=1;var e=bo&&bo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=a;const n=e(H_());function a(r,o){let c=null;if(!r||typeof r!="string")return c;const d=(0,n.default)(r),f=typeof o=="function";return d.forEach(h=>{if(h.type!=="declaration")return;const{property:g,value:v}=h;f?o(g,v,h):v&&(c=c||{},c[g]=v)}),c}return bo}var Rc={},wb;function F_(){if(wb)return Rc;wb=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,a=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,c=function(g){return!g||a.test(g)||e.test(g)},d=function(g,v){return v.toUpperCase()},f=function(g,v){return"".concat(v,"-")},h=function(g,v){return v===void 0&&(v={}),c(g)?g:(g=g.toLowerCase(),v.reactCompat?g=g.replace(o,f):g=g.replace(r,f),g.replace(n,d))};return Rc.camelCase=h,Rc}var zc,kb;function U_(){if(kb)return zc;kb=1;var e=zc&&zc.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(q_()),a=F_();function r(o,c){var d={};return!o||typeof o!="string"||(0,n.default)(o,function(f,h){f&&h&&(d[(0,a.camelCase)(f,c)]=h)}),d}return r.default=r,zc=r,zc}var $_=U_();const V_=d1($_),W5=ek("end"),ag=ek("start");function ek(e){return n;function n(a){const r=a&&a.position&&a.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function G_(e){const n=ag(e),a=W5(e);if(n&&a)return{start:n,end:a}}function Ic(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Sb(e.position):"start"in e||"end"in e?Sb(e):"line"in e||"column"in e?V0(e):""}function V0(e){return Cb(e&&e.line)+":"+Cb(e&&e.column)}function Sb(e){return V0(e&&e.start)+"-"+V0(e&&e.end)}function Cb(e){return e&&typeof e=="number"?e:1}class ci extends Error{constructor(n,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let o="",c={},d=!1;if(a&&("line"in a&&"column"in a?c={place:a}:"start"in a&&"end"in a?c={place:a}:"type"in a?c={ancestors:[a],place:a.position}:c={...a}),typeof n=="string"?o=n:!c.cause&&n&&(d=!0,o=n.message,c.cause=n),!c.ruleId&&!c.source&&typeof r=="string"){const h=r.indexOf(":");h===-1?c.ruleId=r:(c.source=r.slice(0,h),c.ruleId=r.slice(h+1))}if(!c.place&&c.ancestors&&c.ancestors){const h=c.ancestors[c.ancestors.length-1];h&&(c.place=h.position)}const f=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Ic(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=d&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ci.prototype.file="";ci.prototype.name="";ci.prototype.reason="";ci.prototype.message="";ci.prototype.stack="";ci.prototype.column=void 0;ci.prototype.line=void 0;ci.prototype.ancestors=void 0;ci.prototype.cause=void 0;ci.prototype.fatal=void 0;ci.prototype.place=void 0;ci.prototype.ruleId=void 0;ci.prototype.source=void 0;const rg={}.hasOwnProperty,Y_=new Map,K_=/[A-Z]/g,X_=new Set(["table","tbody","thead","tfoot","tr"]),Q_=new Set(["td","th"]),tk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Z_(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=rR(a,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=aR(a,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?ig:I_,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},c=nk(o,e,void 0);return c&&typeof c!="string"?c:o.create(e,o.Fragment,{children:c||void 0},void 0)}function nk(e,n,a){if(n.type==="element")return J_(e,n,a);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return W_(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return tR(e,n,a);if(n.type==="mdxjsEsm")return eR(e,n);if(n.type==="root")return nR(e,n,a);if(n.type==="text")return iR(e,n)}function J_(e,n,a){const r=e.schema;let o=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=ig,e.schema=o),e.ancestors.push(n);const c=ak(e,n.tagName,!1),d=lR(e,n);let f=sg(e,n);return X_.has(n.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!T_(h):!0})),ik(e,d,c,n),lg(d,f),e.ancestors.pop(),e.schema=r,e.create(n,c,d,a)}function W_(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Xc(e,n.position)}function eR(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Xc(e,n.position)}function tR(e,n,a){const r=e.schema;let o=r;n.name==="svg"&&r.space==="html"&&(o=ig,e.schema=o),e.ancestors.push(n);const c=n.name===null?e.Fragment:ak(e,n.name,!0),d=sR(e,n),f=sg(e,n);return ik(e,d,c,n),lg(d,f),e.ancestors.pop(),e.schema=r,e.create(n,c,d,a)}function nR(e,n,a){const r={};return lg(r,sg(e,n)),e.create(n,e.Fragment,r,a)}function iR(e,n){return n.value}function ik(e,n,a,r){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(n.node=r)}function lg(e,n){if(n.length>0){const a=n.length>1?n:n[0];a&&(e.children=a)}}function aR(e,n,a){return r;function r(o,c,d,f){const g=Array.isArray(d.children)?a:n;return f?g(c,d,f):g(c,d)}}function rR(e,n){return a;function a(r,o,c,d){const f=Array.isArray(c.children),h=ag(r);return n(o,c,d,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function lR(e,n){const a={};let r,o;for(o in n.properties)if(o!=="children"&&rg.call(n.properties,o)){const c=oR(e,o,n.properties[o]);if(c){const[d,f]=c;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&Q_.has(n.tagName)?r=f:a[d]=f}}if(r){const c=a.style||(a.style={});c[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function sR(e,n){const a={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const c=r.data.estree.body[0];c.type;const d=c.expression;d.type;const f=d.properties[0];f.type,Object.assign(a,e.evaluater.evaluateExpression(f.argument))}else Xc(e,n.position);else{const o=r.name;let c;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,c=e.evaluater.evaluateExpression(f.expression)}else Xc(e,n.position);else c=r.value===null?!0:r.value;a[o]=c}return a}function sg(e,n){const a=[];let r=-1;const o=e.passKeys?new Map:Y_;for(;++r<n.children.length;){const c=n.children[r];let d;if(e.passKeys){const h=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(h){const g=o.get(h)||0;d=h+"-"+g,o.set(h,g+1)}}const f=nk(e,c,d);f!==void 0&&a.push(f)}return a}function oR(e,n,a){const r=D_(e.schema,n);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?k_(a):P_(a)),r.property==="style"){let o=typeof a=="object"?a:cR(e,String(a));return e.stylePropertyNameCase==="css"&&(o=uR(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?R_[r.property]||r.property:r.attribute,a]}}function cR(e,n){try{return V_(n,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const r=a,o=new ci("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=tk+"#cannot-parse-style-attribute",o}}function ak(e,n,a){let r;if(!a)r={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let c=-1,d;for(;++c<o.length;){const f=gb(o[c])?{type:"Identifier",name:o[c]}:{type:"Literal",value:o[c]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(c&&f.type==="Literal"),optional:!1}:f}r=d}else r=gb(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const o=r.value;return rg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xc(e)}function Xc(e,n){const a=new ci("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=tk+"#cannot-handle-mdx-estrees-without-createevaluater",a}function uR(e){const n={};let a;for(a in e)rg.call(e,a)&&(n[dR(a)]=e[a]);return n}function dR(e){let n=e.replace(K_,fR);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function fR(e){return"-"+e.toLowerCase()}const Bp={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},hR={};function og(e,n){const a=hR,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,o=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return rk(e,r,o)}function rk(e,n,a){if(mR(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nb(e.children,n,a)}return Array.isArray(e)?Nb(e,n,a):""}function Nb(e,n,a){const r=[];let o=-1;for(;++o<e.length;)r[o]=rk(e[o],n,a);return r.join("")}function mR(e){return!!(e&&typeof e=="object")}const Eb=document.createElement("i");function cg(e){const n="&"+e+";";Eb.innerHTML=n;const a=Eb.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===n?!1:a}function Zi(e,n,a,r){const o=e.length;let c=0,d;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,a=a>0?a:0,r.length<1e4)d=Array.from(r),d.unshift(n,a),e.splice(...d);else for(a&&e.splice(n,a);c<r.length;)d=r.slice(c,c+1e4),d.unshift(n,0),e.splice(...d),c+=1e4,n+=1e4}function ua(e,n){return e.length>0?(Zi(e,e.length,0,n),e):n}const Tb={}.hasOwnProperty;function lk(e){const n={};let a=-1;for(;++a<e.length;)pR(n,e[a]);return n}function pR(e,n){let a;for(a in n){const o=(Tb.call(e,a)?e[a]:void 0)||(e[a]={}),c=n[a];let d;if(c)for(d in c){Tb.call(o,d)||(o[d]=[]);const f=c[d];gR(o[d],Array.isArray(f)?f:f?[f]:[])}}}function gR(e,n){let a=-1;const r=[];for(;++a<n.length;)(n[a].add==="after"?e:r).push(n[a]);Zi(e,0,0,r)}function sk(e,n){const a=Number.parseInt(e,n);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function Sa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wi=Pl(/[A-Za-z]/),oi=Pl(/[\dA-Za-z]/),vR=Pl(/[#-'*+\--9=?A-Z^-~]/);function pf(e){return e!==null&&(e<32||e===127)}const G0=Pl(/\d/),yR=Pl(/[\dA-Fa-f]/),xR=Pl(/[!-/:-@[-`{-~]/);function Qe(e){return e!==null&&e<-2}function Vt(e){return e!==null&&(e<0||e===32)}function wt(e){return e===-2||e===-1||e===32}const Vf=Pl(new RegExp("\\p{P}|\\p{S}","u")),Ms=Pl(/\s/);function Pl(e){return n;function n(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function Po(e){const n=[];let a=-1,r=0,o=0;for(;++a<e.length;){const c=e.charCodeAt(a);let d="";if(c===37&&oi(e.charCodeAt(a+1))&&oi(e.charCodeAt(a+2)))o=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(d=String.fromCharCode(c));else if(c>55295&&c<57344){const f=e.charCodeAt(a+1);c<56320&&f>56319&&f<57344?(d=String.fromCharCode(c,f),o=1):d="�"}else d=String.fromCharCode(c);d&&(n.push(e.slice(r,a),encodeURIComponent(d)),r=a+o+1,d=""),o&&(a+=o,o=0)}return n.join("")+e.slice(r)}function Mt(e,n,a,r){const o=r?r-1:Number.POSITIVE_INFINITY;let c=0;return d;function d(h){return wt(h)?(e.enter(a),f(h)):n(h)}function f(h){return wt(h)&&c++<o?(e.consume(h),f):(e.exit(a),n(h))}}const bR={tokenize:jR};function jR(e){const n=e.attempt(this.parser.constructs.contentInitial,r,o);let a;return n;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Mt(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),c(f)}function c(f){const h=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=h),a=h,d(f)}function d(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Qe(f)?(e.consume(f),e.exit("chunkText"),c):(e.consume(f),d)}}const wR={tokenize:kR},Mb={tokenize:SR};function kR(e){const n=this,a=[];let r=0,o,c,d;return f;function f(E){if(r<a.length){const T=a[r];return n.containerState=T[1],e.attempt(T[0].continuation,h,g)(E)}return g(E)}function h(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&M();const T=n.events.length;let R=T,_;for(;R--;)if(n.events[R][0]==="exit"&&n.events[R][1].type==="chunkFlow"){_=n.events[R][1].end;break}C(r);let z=T;for(;z<n.events.length;)n.events[z][1].end={..._},z++;return Zi(n.events,R+1,0,n.events.slice(T)),n.events.length=z,g(E)}return f(E)}function g(E){if(r===a.length){if(!o)return j(E);if(o.currentConstruct&&o.currentConstruct.concrete)return k(E);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Mb,v,p)(E)}function v(E){return o&&M(),C(r),j(E)}function p(E){return n.parser.lazy[n.now().line]=r!==a.length,d=n.now().offset,k(E)}function j(E){return n.containerState={},e.attempt(Mb,b,k)(E)}function b(E){return r++,a.push([n.currentConstruct,n.containerState]),j(E)}function k(E){if(E===null){o&&M(),C(0),e.consume(E);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:c}),S(E)}function S(E){if(E===null){N(e.exit("chunkFlow"),!0),C(0),e.consume(E);return}return Qe(E)?(e.consume(E),N(e.exit("chunkFlow")),r=0,n.interrupt=void 0,f):(e.consume(E),S)}function N(E,T){const R=n.sliceStream(E);if(T&&R.push(null),E.previous=c,c&&(c.next=E),c=E,o.defineSkip(E.start),o.write(R),n.parser.lazy[E.start.line]){let _=o.events.length;for(;_--;)if(o.events[_][1].start.offset<d&&(!o.events[_][1].end||o.events[_][1].end.offset>d))return;const z=n.events.length;let P=z,H,O;for(;P--;)if(n.events[P][0]==="exit"&&n.events[P][1].type==="chunkFlow"){if(H){O=n.events[P][1].end;break}H=!0}for(C(r),_=z;_<n.events.length;)n.events[_][1].end={...O},_++;Zi(n.events,P+1,0,n.events.slice(z)),n.events.length=_}}function C(E){let T=a.length;for(;T-- >E;){const R=a[T];n.containerState=R[1],R[0].exit.call(n,e)}a.length=E}function M(){o.write([null]),c=void 0,o=void 0,n.containerState._closeFlow=void 0}}function SR(e,n,a){return Mt(e,e.attempt(this.parser.constructs.document,n,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ao(e){if(e===null||Vt(e)||Ms(e))return 1;if(Vf(e))return 2}function Gf(e,n,a){const r=[];let o=-1;for(;++o<e.length;){const c=e[o].resolveAll;c&&!r.includes(c)&&(n=c(n,a),r.push(c))}return n}const Y0={name:"attention",resolveAll:CR,tokenize:NR};function CR(e,n){let a=-1,r,o,c,d,f,h,g,v;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(r=a;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[r][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;h=e[r][1].end.offset-e[r][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const p={...e[r][1].end},j={...e[a][1].start};Ab(p,-h),Ab(j,h),d={type:h>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:j},c={type:h>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[a][1].start}},o={type:h>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},e[r][1].end={...d.start},e[a][1].start={...f.end},g=[],e[r][1].end.offset-e[r][1].start.offset&&(g=ua(g,[["enter",e[r][1],n],["exit",e[r][1],n]])),g=ua(g,[["enter",o,n],["enter",d,n],["exit",d,n],["enter",c,n]]),g=ua(g,Gf(n.parser.constructs.insideSpan.null,e.slice(r+1,a),n)),g=ua(g,[["exit",c,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[a][1].end.offset-e[a][1].start.offset?(v=2,g=ua(g,[["enter",e[a][1],n],["exit",e[a][1],n]])):v=0,Zi(e,r-1,a-r+3,g),a=r+g.length-v-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function NR(e,n){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ao(r);let c;return d;function d(h){return c=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===c)return e.consume(h),f;const g=e.exit("attentionSequence"),v=Ao(h),p=!v||v===2&&o||a.includes(h),j=!o||o===2&&v||a.includes(r);return g._open=!!(c===42?p:p&&(o||!j)),g._close=!!(c===42?j:j&&(v||!p)),n(h)}}function Ab(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const ER={name:"autolink",tokenize:TR};function TR(e,n,a){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),c}function c(b){return wi(b)?(e.consume(b),d):b===64?a(b):g(b)}function d(b){return b===43||b===45||b===46||oi(b)?(r=1,f(b)):g(b)}function f(b){return b===58?(e.consume(b),r=0,h):(b===43||b===45||b===46||oi(b))&&r++<32?(e.consume(b),f):(r=0,g(b))}function h(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||pf(b)?a(b):(e.consume(b),h)}function g(b){return b===64?(e.consume(b),v):vR(b)?(e.consume(b),g):a(b)}function v(b){return oi(b)?p(b):a(b)}function p(b){return b===46?(e.consume(b),r=0,v):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):j(b)}function j(b){if((b===45||oi(b))&&r++<63){const k=b===45?j:p;return e.consume(b),k}return a(b)}}const lu={partial:!0,tokenize:MR};function MR(e,n,a){return r;function r(c){return wt(c)?Mt(e,o,"linePrefix")(c):o(c)}function o(c){return c===null||Qe(c)?n(c):a(c)}}const ok={continuation:{tokenize:_R},exit:RR,name:"blockQuote",tokenize:AR};function AR(e,n,a){const r=this;return o;function o(d){if(d===62){const f=r.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(d),e.exit("blockQuoteMarker"),c}return a(d)}function c(d){return wt(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(d))}}function _R(e,n,a){const r=this;return o;function o(d){return wt(d)?Mt(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):c(d)}function c(d){return e.attempt(ok,n,a)(d)}}function RR(e){e.exit("blockQuote")}const ck={name:"characterEscape",tokenize:zR};function zR(e,n,a){return r;function r(c){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(c),e.exit("escapeMarker"),o}function o(c){return xR(c)?(e.enter("characterEscapeValue"),e.consume(c),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):a(c)}}const uk={name:"characterReference",tokenize:OR};function OR(e,n,a){const r=this;let o=0,c,d;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),h}function h(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),g):(e.enter("characterReferenceValue"),c=31,d=oi,v(p))}function g(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),c=6,d=yR,v):(e.enter("characterReferenceValue"),c=7,d=G0,v(p))}function v(p){if(p===59&&o){const j=e.exit("characterReferenceValue");return d===oi&&!cg(r.sliceSerialize(j))?a(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return d(p)&&o++<c?(e.consume(p),v):a(p)}}const _b={partial:!0,tokenize:LR},Rb={concrete:!0,name:"codeFenced",tokenize:DR};function DR(e,n,a){const r=this,o={partial:!0,tokenize:R};let c=0,d=0,f;return h;function h(_){return g(_)}function g(_){const z=r.events[r.events.length-1];return c=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,f=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),v(_)}function v(_){return _===f?(d++,e.consume(_),v):d<3?a(_):(e.exit("codeFencedFenceSequence"),wt(_)?Mt(e,p,"whitespace")(_):p(_))}function p(_){return _===null||Qe(_)?(e.exit("codeFencedFence"),r.interrupt?n(_):e.check(_b,S,T)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),j(_))}function j(_){return _===null||Qe(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(_)):wt(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Mt(e,b,"whitespace")(_)):_===96&&_===f?a(_):(e.consume(_),j)}function b(_){return _===null||Qe(_)?p(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(_))}function k(_){return _===null||Qe(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(_)):_===96&&_===f?a(_):(e.consume(_),k)}function S(_){return e.attempt(o,T,N)(_)}function N(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),C}function C(_){return c>0&&wt(_)?Mt(e,M,"linePrefix",c+1)(_):M(_)}function M(_){return _===null||Qe(_)?e.check(_b,S,T)(_):(e.enter("codeFlowValue"),E(_))}function E(_){return _===null||Qe(_)?(e.exit("codeFlowValue"),M(_)):(e.consume(_),E)}function T(_){return e.exit("codeFenced"),n(_)}function R(_,z,P){let H=0;return O;function O(q){return _.enter("lineEnding"),_.consume(q),_.exit("lineEnding"),I}function I(q){return _.enter("codeFencedFence"),wt(q)?Mt(_,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):$(q)}function $(q){return q===f?(_.enter("codeFencedFenceSequence"),Q(q)):P(q)}function Q(q){return q===f?(H++,_.consume(q),Q):H>=d?(_.exit("codeFencedFenceSequence"),wt(q)?Mt(_,Y,"whitespace")(q):Y(q)):P(q)}function Y(q){return q===null||Qe(q)?(_.exit("codeFencedFence"),z(q)):P(q)}}}function LR(e,n,a){const r=this;return o;function o(d){return d===null?a(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c)}function c(d){return r.parser.lazy[r.now().line]?a(d):n(d)}}const Ip={name:"codeIndented",tokenize:IR},BR={partial:!0,tokenize:PR};function IR(e,n,a){const r=this;return o;function o(g){return e.enter("codeIndented"),Mt(e,c,"linePrefix",5)(g)}function c(g){const v=r.events[r.events.length-1];return v&&v[1].type==="linePrefix"&&v[2].sliceSerialize(v[1],!0).length>=4?d(g):a(g)}function d(g){return g===null?h(g):Qe(g)?e.attempt(BR,d,h)(g):(e.enter("codeFlowValue"),f(g))}function f(g){return g===null||Qe(g)?(e.exit("codeFlowValue"),d(g)):(e.consume(g),f)}function h(g){return e.exit("codeIndented"),n(g)}}function PR(e,n,a){const r=this;return o;function o(d){return r.parser.lazy[r.now().line]?a(d):Qe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):Mt(e,c,"linePrefix",5)(d)}function c(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(d):Qe(d)?o(d):a(d)}}const HR={name:"codeText",previous:FR,resolve:qR,tokenize:UR};function qR(e){let n=e.length-4,a=3,r,o;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=a;++r<n;)if(e[r][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(r=a-1,n++;++r<=n;)o===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(o=r):(r===n||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),n-=r-o-2,r=o+2),o=void 0);return e}function FR(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UR(e,n,a){let r=0,o,c;return d;function d(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),r++,f):(e.exit("codeTextSequence"),h(p))}function h(p){return p===null?a(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),h):p===96?(c=e.enter("codeTextSequence"),o=0,v(p)):Qe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("codeTextData"),g(p))}function g(p){return p===null||p===32||p===96||Qe(p)?(e.exit("codeTextData"),h(p)):(e.consume(p),g)}function v(p){return p===96?(e.consume(p),o++,v):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(p)):(c.type="codeTextData",g(p))}}class $R{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,a){const r=a??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,a,r){const o=a||0;this.setCursor(Math.trunc(n));const c=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Oc(this.left,r),c.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Oc(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Oc(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const a=this.left.splice(n,Number.POSITIVE_INFINITY);Oc(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Oc(this.left,a.reverse())}}}function Oc(e,n){let a=0;if(n.length<1e4)e.push(...n);else for(;a<n.length;)e.push(...n.slice(a,a+1e4)),a+=1e4}function dk(e){const n={};let a=-1,r,o,c,d,f,h,g;const v=new $R(e);for(;++a<v.length;){for(;a in n;)a=n[a];if(r=v.get(a),a&&r[1].type==="chunkFlow"&&v.get(a-1)[1].type==="listItemPrefix"&&(h=r[1]._tokenizer.events,c=0,c<h.length&&h[c][1].type==="lineEndingBlank"&&(c+=2),c<h.length&&h[c][1].type==="content"))for(;++c<h.length&&h[c][1].type!=="content";)h[c][1].type==="chunkText"&&(h[c][1]._isInFirstContentOfListItem=!0,c++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,VR(v,a)),a=n[a],g=!0);else if(r[1]._container){for(c=a,o=void 0;c--;)if(d=v.get(c),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(o&&(v.get(o)[1].type="lineEndingBlank"),d[1].type="lineEnding",o=c);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;o&&(r[1].end={...v.get(o)[1].start},f=v.slice(o,a),f.unshift(r),v.splice(o,a-o+1,f))}}return Zi(e,0,Number.POSITIVE_INFINITY,v.slice(0)),!g}function VR(e,n){const a=e.get(n)[1],r=e.get(n)[2];let o=n-1;const c=[];let d=a._tokenizer;d||(d=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,h=[],g={};let v,p,j=-1,b=a,k=0,S=0;const N=[S];for(;b;){for(;e.get(++o)[1]!==b;);c.push(o),b._tokenizer||(v=r.sliceStream(b),b.next||v.push(null),p&&d.defineSkip(b.start),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(v),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),p=b,b=b.next}for(b=a;++j<f.length;)f[j][0]==="exit"&&f[j-1][0]==="enter"&&f[j][1].type===f[j-1][1].type&&f[j][1].start.line!==f[j][1].end.line&&(S=j+1,N.push(S),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(d.events=[],b?(b._tokenizer=void 0,b.previous=void 0):N.pop(),j=N.length;j--;){const C=f.slice(N[j],N[j+1]),M=c.pop();h.push([M,M+C.length-1]),e.splice(M,2,C)}for(h.reverse(),j=-1;++j<h.length;)g[k+h[j][0]]=k+h[j][1],k+=h[j][1]-h[j][0]-1;return g}const GR={resolve:KR,tokenize:XR},YR={partial:!0,tokenize:QR};function KR(e){return dk(e),e}function XR(e,n){let a;return r;function r(f){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?c(f):Qe(f)?e.check(YR,d,c)(f):(e.consume(f),o)}function c(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function d(f){return e.consume(f),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,o}}function QR(e,n,a){const r=this;return o;function o(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Mt(e,c,"linePrefix")}function c(d){if(d===null||Qe(d))return a(d);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(d):e.interrupt(r.parser.constructs.flow,a,n)(d)}}function fk(e,n,a,r,o,c,d,f,h){const g=h||Number.POSITIVE_INFINITY;let v=0;return p;function p(C){return C===60?(e.enter(r),e.enter(o),e.enter(c),e.consume(C),e.exit(c),j):C===null||C===32||C===41||pf(C)?a(C):(e.enter(r),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(C))}function j(C){return C===62?(e.enter(c),e.consume(C),e.exit(c),e.exit(o),e.exit(r),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(C))}function b(C){return C===62?(e.exit("chunkString"),e.exit(f),j(C)):C===null||C===60||Qe(C)?a(C):(e.consume(C),C===92?k:b)}function k(C){return C===60||C===62||C===92?(e.consume(C),b):b(C)}function S(C){return!v&&(C===null||C===41||Vt(C))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(r),n(C)):v<g&&C===40?(e.consume(C),v++,S):C===41?(e.consume(C),v--,S):C===null||C===32||C===40||pf(C)?a(C):(e.consume(C),C===92?N:S)}function N(C){return C===40||C===41||C===92?(e.consume(C),S):S(C)}}function hk(e,n,a,r,o,c){const d=this;let f=0,h;return g;function g(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(c),v}function v(b){return f>999||b===null||b===91||b===93&&!h||b===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?a(b):b===93?(e.exit(c),e.enter(o),e.consume(b),e.exit(o),e.exit(r),n):Qe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),v):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||b===91||b===93||Qe(b)||f++>999?(e.exit("chunkString"),v(b)):(e.consume(b),h||(h=!wt(b)),b===92?j:p)}function j(b){return b===91||b===92||b===93?(e.consume(b),f++,p):p(b)}}function mk(e,n,a,r,o,c){let d;return f;function f(j){return j===34||j===39||j===40?(e.enter(r),e.enter(o),e.consume(j),e.exit(o),d=j===40?41:j,h):a(j)}function h(j){return j===d?(e.enter(o),e.consume(j),e.exit(o),e.exit(r),n):(e.enter(c),g(j))}function g(j){return j===d?(e.exit(c),h(d)):j===null?a(j):Qe(j)?(e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),Mt(e,g,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===d||j===null||Qe(j)?(e.exit("chunkString"),g(j)):(e.consume(j),j===92?p:v)}function p(j){return j===d||j===92?(e.consume(j),v):v(j)}}function Pc(e,n){let a;return r;function r(o){return Qe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a=!0,r):wt(o)?Mt(e,r,a?"linePrefix":"lineSuffix")(o):n(o)}}const ZR={name:"definition",tokenize:WR},JR={partial:!0,tokenize:ez};function WR(e,n,a){const r=this;let o;return c;function c(b){return e.enter("definition"),d(b)}function d(b){return hk.call(r,e,f,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=Sa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),h):a(b)}function h(b){return Vt(b)?Pc(e,g)(b):g(b)}function g(b){return fk(e,v,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function v(b){return e.attempt(JR,p,p)(b)}function p(b){return wt(b)?Mt(e,j,"whitespace")(b):j(b)}function j(b){return b===null||Qe(b)?(e.exit("definition"),r.parser.defined.push(o),n(b)):a(b)}}function ez(e,n,a){return r;function r(f){return Vt(f)?Pc(e,o)(f):a(f)}function o(f){return mk(e,c,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function c(f){return wt(f)?Mt(e,d,"whitespace")(f):d(f)}function d(f){return f===null||Qe(f)?n(f):a(f)}}const tz={name:"hardBreakEscape",tokenize:nz};function nz(e,n,a){return r;function r(c){return e.enter("hardBreakEscape"),e.consume(c),o}function o(c){return Qe(c)?(e.exit("hardBreakEscape"),n(c)):a(c)}}const iz={name:"headingAtx",resolve:az,tokenize:rz};function az(e,n){let a=e.length-2,r=3,o,c;return e[r][1].type==="whitespace"&&(r+=2),a-2>r&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&e[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[a][1].end},c={type:"chunkText",start:e[r][1].start,end:e[a][1].end,contentType:"text"},Zi(e,r,a-r+1,[["enter",o,n],["enter",c,n],["exit",c,n],["exit",o,n]])),e}function rz(e,n,a){let r=0;return o;function o(v){return e.enter("atxHeading"),c(v)}function c(v){return e.enter("atxHeadingSequence"),d(v)}function d(v){return v===35&&r++<6?(e.consume(v),d):v===null||Vt(v)?(e.exit("atxHeadingSequence"),f(v)):a(v)}function f(v){return v===35?(e.enter("atxHeadingSequence"),h(v)):v===null||Qe(v)?(e.exit("atxHeading"),n(v)):wt(v)?Mt(e,f,"whitespace")(v):(e.enter("atxHeadingText"),g(v))}function h(v){return v===35?(e.consume(v),h):(e.exit("atxHeadingSequence"),f(v))}function g(v){return v===null||v===35||Vt(v)?(e.exit("atxHeadingText"),f(v)):(e.consume(v),g)}}const lz=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zb=["pre","script","style","textarea"],sz={concrete:!0,name:"htmlFlow",resolveTo:uz,tokenize:dz},oz={partial:!0,tokenize:hz},cz={partial:!0,tokenize:fz};function uz(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function dz(e,n,a){const r=this;let o,c,d,f,h;return g;function g(B){return v(B)}function v(B){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(B),p}function p(B){return B===33?(e.consume(B),j):B===47?(e.consume(B),c=!0,S):B===63?(e.consume(B),o=3,r.interrupt?n:D):wi(B)?(e.consume(B),d=String.fromCharCode(B),N):a(B)}function j(B){return B===45?(e.consume(B),o=2,b):B===91?(e.consume(B),o=5,f=0,k):wi(B)?(e.consume(B),o=4,r.interrupt?n:D):a(B)}function b(B){return B===45?(e.consume(B),r.interrupt?n:D):a(B)}function k(B){const F="CDATA[";return B===F.charCodeAt(f++)?(e.consume(B),f===F.length?r.interrupt?n:$:k):a(B)}function S(B){return wi(B)?(e.consume(B),d=String.fromCharCode(B),N):a(B)}function N(B){if(B===null||B===47||B===62||Vt(B)){const F=B===47,ee=d.toLowerCase();return!F&&!c&&zb.includes(ee)?(o=1,r.interrupt?n(B):$(B)):lz.includes(d.toLowerCase())?(o=6,F?(e.consume(B),C):r.interrupt?n(B):$(B)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(B):c?M(B):E(B))}return B===45||oi(B)?(e.consume(B),d+=String.fromCharCode(B),N):a(B)}function C(B){return B===62?(e.consume(B),r.interrupt?n:$):a(B)}function M(B){return wt(B)?(e.consume(B),M):O(B)}function E(B){return B===47?(e.consume(B),O):B===58||B===95||wi(B)?(e.consume(B),T):wt(B)?(e.consume(B),E):O(B)}function T(B){return B===45||B===46||B===58||B===95||oi(B)?(e.consume(B),T):R(B)}function R(B){return B===61?(e.consume(B),_):wt(B)?(e.consume(B),R):E(B)}function _(B){return B===null||B===60||B===61||B===62||B===96?a(B):B===34||B===39?(e.consume(B),h=B,z):wt(B)?(e.consume(B),_):P(B)}function z(B){return B===h?(e.consume(B),h=null,H):B===null||Qe(B)?a(B):(e.consume(B),z)}function P(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||Vt(B)?R(B):(e.consume(B),P)}function H(B){return B===47||B===62||wt(B)?E(B):a(B)}function O(B){return B===62?(e.consume(B),I):a(B)}function I(B){return B===null||Qe(B)?$(B):wt(B)?(e.consume(B),I):a(B)}function $(B){return B===45&&o===2?(e.consume(B),K):B===60&&o===1?(e.consume(B),V):B===62&&o===4?(e.consume(B),se):B===63&&o===3?(e.consume(B),D):B===93&&o===5?(e.consume(B),Z):Qe(B)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(oz,ne,Q)(B)):B===null||Qe(B)?(e.exit("htmlFlowData"),Q(B)):(e.consume(B),$)}function Q(B){return e.check(cz,Y,ne)(B)}function Y(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),q}function q(B){return B===null||Qe(B)?Q(B):(e.enter("htmlFlowData"),$(B))}function K(B){return B===45?(e.consume(B),D):$(B)}function V(B){return B===47?(e.consume(B),d="",X):$(B)}function X(B){if(B===62){const F=d.toLowerCase();return zb.includes(F)?(e.consume(B),se):$(B)}return wi(B)&&d.length<8?(e.consume(B),d+=String.fromCharCode(B),X):$(B)}function Z(B){return B===93?(e.consume(B),D):$(B)}function D(B){return B===62?(e.consume(B),se):B===45&&o===2?(e.consume(B),D):$(B)}function se(B){return B===null||Qe(B)?(e.exit("htmlFlowData"),ne(B)):(e.consume(B),se)}function ne(B){return e.exit("htmlFlow"),n(B)}}function fz(e,n,a){const r=this;return o;function o(d){return Qe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):a(d)}function c(d){return r.parser.lazy[r.now().line]?a(d):n(d)}}function hz(e,n,a){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(lu,n,a)}}const mz={name:"htmlText",tokenize:pz};function pz(e,n,a){const r=this;let o,c,d;return f;function f(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),h}function h(D){return D===33?(e.consume(D),g):D===47?(e.consume(D),R):D===63?(e.consume(D),E):wi(D)?(e.consume(D),P):a(D)}function g(D){return D===45?(e.consume(D),v):D===91?(e.consume(D),c=0,k):wi(D)?(e.consume(D),M):a(D)}function v(D){return D===45?(e.consume(D),b):a(D)}function p(D){return D===null?a(D):D===45?(e.consume(D),j):Qe(D)?(d=p,V(D)):(e.consume(D),p)}function j(D){return D===45?(e.consume(D),b):p(D)}function b(D){return D===62?K(D):D===45?j(D):p(D)}function k(D){const se="CDATA[";return D===se.charCodeAt(c++)?(e.consume(D),c===se.length?S:k):a(D)}function S(D){return D===null?a(D):D===93?(e.consume(D),N):Qe(D)?(d=S,V(D)):(e.consume(D),S)}function N(D){return D===93?(e.consume(D),C):S(D)}function C(D){return D===62?K(D):D===93?(e.consume(D),C):S(D)}function M(D){return D===null||D===62?K(D):Qe(D)?(d=M,V(D)):(e.consume(D),M)}function E(D){return D===null?a(D):D===63?(e.consume(D),T):Qe(D)?(d=E,V(D)):(e.consume(D),E)}function T(D){return D===62?K(D):E(D)}function R(D){return wi(D)?(e.consume(D),_):a(D)}function _(D){return D===45||oi(D)?(e.consume(D),_):z(D)}function z(D){return Qe(D)?(d=z,V(D)):wt(D)?(e.consume(D),z):K(D)}function P(D){return D===45||oi(D)?(e.consume(D),P):D===47||D===62||Vt(D)?H(D):a(D)}function H(D){return D===47?(e.consume(D),K):D===58||D===95||wi(D)?(e.consume(D),O):Qe(D)?(d=H,V(D)):wt(D)?(e.consume(D),H):K(D)}function O(D){return D===45||D===46||D===58||D===95||oi(D)?(e.consume(D),O):I(D)}function I(D){return D===61?(e.consume(D),$):Qe(D)?(d=I,V(D)):wt(D)?(e.consume(D),I):H(D)}function $(D){return D===null||D===60||D===61||D===62||D===96?a(D):D===34||D===39?(e.consume(D),o=D,Q):Qe(D)?(d=$,V(D)):wt(D)?(e.consume(D),$):(e.consume(D),Y)}function Q(D){return D===o?(e.consume(D),o=void 0,q):D===null?a(D):Qe(D)?(d=Q,V(D)):(e.consume(D),Q)}function Y(D){return D===null||D===34||D===39||D===60||D===61||D===96?a(D):D===47||D===62||Vt(D)?H(D):(e.consume(D),Y)}function q(D){return D===47||D===62||Vt(D)?H(D):a(D)}function K(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):a(D)}function V(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),X}function X(D){return wt(D)?Mt(e,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Z(D)}function Z(D){return e.enter("htmlTextData"),d(D)}}const ug={name:"labelEnd",resolveAll:xz,resolveTo:bz,tokenize:jz},gz={tokenize:wz},vz={tokenize:kz},yz={tokenize:Sz};function xz(e){let n=-1;const a=[];for(;++n<e.length;){const r=e[n][1];if(a.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",n+=o}}return e.length!==a.length&&Zi(e,0,e.length,a),e}function bz(e,n){let a=e.length,r=0,o,c,d,f;for(;a--;)if(o=e[a][1],c){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[a][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(d){if(e[a][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(c=a,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(d=a);const h={type:e[c][1].type==="labelLink"?"link":"image",start:{...e[c][1].start},end:{...e[e.length-1][1].end}},g={type:"label",start:{...e[c][1].start},end:{...e[d][1].end}},v={type:"labelText",start:{...e[c+r+2][1].end},end:{...e[d-2][1].start}};return f=[["enter",h,n],["enter",g,n]],f=ua(f,e.slice(c+1,c+r+3)),f=ua(f,[["enter",v,n]]),f=ua(f,Gf(n.parser.constructs.insideSpan.null,e.slice(c+r+4,d-3),n)),f=ua(f,[["exit",v,n],e[d-2],e[d-1],["exit",g,n]]),f=ua(f,e.slice(d+1)),f=ua(f,[["exit",h,n]]),Zi(e,c,e.length,f),e}function jz(e,n,a){const r=this;let o=r.events.length,c,d;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){c=r.events[o][1];break}return f;function f(j){return c?c._inactive?p(j):(d=r.parser.defined.includes(Sa(r.sliceSerialize({start:c.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(j),e.exit("labelMarker"),e.exit("labelEnd"),h):a(j)}function h(j){return j===40?e.attempt(gz,v,d?v:p)(j):j===91?e.attempt(vz,v,d?g:p)(j):d?v(j):p(j)}function g(j){return e.attempt(yz,v,p)(j)}function v(j){return n(j)}function p(j){return c._balanced=!0,a(j)}}function wz(e,n,a){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return Vt(p)?Pc(e,c)(p):c(p)}function c(p){return p===41?v(p):fk(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function d(p){return Vt(p)?Pc(e,h)(p):v(p)}function f(p){return a(p)}function h(p){return p===34||p===39||p===40?mk(e,g,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):v(p)}function g(p){return Vt(p)?Pc(e,v)(p):v(p)}function v(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),n):a(p)}}function kz(e,n,a){const r=this;return o;function o(f){return hk.call(r,e,c,d,"reference","referenceMarker","referenceString")(f)}function c(f){return r.parser.defined.includes(Sa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(f):a(f)}function d(f){return a(f)}}function Sz(e,n,a){return r;function r(c){return e.enter("reference"),e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),o}function o(c){return c===93?(e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),e.exit("reference"),n):a(c)}}const Cz={name:"labelStartImage",resolveAll:ug.resolveAll,tokenize:Nz};function Nz(e,n,a){const r=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),c}function c(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),d):a(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(f):n(f)}}const Ez={name:"labelStartLink",resolveAll:ug.resolveAll,tokenize:Tz};function Tz(e,n,a){const r=this;return o;function o(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),c}function c(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(d):n(d)}}const Pp={name:"lineEnding",tokenize:Mz};function Mz(e,n){return a;function a(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Mt(e,n,"linePrefix")}}const af={name:"thematicBreak",tokenize:Az};function Az(e,n,a){let r=0,o;return c;function c(g){return e.enter("thematicBreak"),d(g)}function d(g){return o=g,f(g)}function f(g){return g===o?(e.enter("thematicBreakSequence"),h(g)):r>=3&&(g===null||Qe(g))?(e.exit("thematicBreak"),n(g)):a(g)}function h(g){return g===o?(e.consume(g),r++,h):(e.exit("thematicBreakSequence"),wt(g)?Mt(e,f,"whitespace")(g):f(g))}}const zi={continuation:{tokenize:Oz},exit:Lz,name:"list",tokenize:zz},_z={partial:!0,tokenize:Bz},Rz={partial:!0,tokenize:Dz};function zz(e,n,a){const r=this,o=r.events[r.events.length-1];let c=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,d=0;return f;function f(b){const k=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:G0(b)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(af,a,g)(b):g(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(b)}return a(b)}function h(b){return G0(b)&&++d<10?(e.consume(b),h):(!r.interrupt||d<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),g(b)):a(b)}function g(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(lu,r.interrupt?a:v,e.attempt(_z,j,p))}function v(b){return r.containerState.initialBlankLine=!0,c++,j(b)}function p(b){return wt(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),j):a(b)}function j(b){return r.containerState.size=c+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function Oz(e,n,a){const r=this;return r.containerState._closeFlow=void 0,e.check(lu,o,c);function o(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Mt(e,n,"listItemIndent",r.containerState.size+1)(f)}function c(f){return r.containerState.furtherBlankLines||!wt(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,d(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Rz,n,d)(f))}function d(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,Mt(e,e.attempt(zi,n,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function Dz(e,n,a){const r=this;return Mt(e,o,"listItemIndent",r.containerState.size+1);function o(c){const d=r.events[r.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===r.containerState.size?n(c):a(c)}}function Lz(e){e.exit(this.containerState.type)}function Bz(e,n,a){const r=this;return Mt(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(c){const d=r.events[r.events.length-1];return!wt(c)&&d&&d[1].type==="listItemPrefixWhitespace"?n(c):a(c)}}const Ob={name:"setextUnderline",resolveTo:Iz,tokenize:Pz};function Iz(e,n){let a=e.length,r,o,c;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){r=a;break}e[a][1].type==="paragraph"&&(o=a)}else e[a][1].type==="content"&&e.splice(a,1),!c&&e[a][1].type==="definition"&&(c=a);const d={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",c?(e.splice(o,0,["enter",d,n]),e.splice(c+1,0,["exit",e[r][1],n]),e[r][1].end={...e[c][1].end}):e[r][1]=d,e.push(["exit",d,n]),e}function Pz(e,n,a){const r=this;let o;return c;function c(g){let v=r.events.length,p;for(;v--;)if(r.events[v][1].type!=="lineEnding"&&r.events[v][1].type!=="linePrefix"&&r.events[v][1].type!=="content"){p=r.events[v][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=g,d(g)):a(g)}function d(g){return e.enter("setextHeadingLineSequence"),f(g)}function f(g){return g===o?(e.consume(g),f):(e.exit("setextHeadingLineSequence"),wt(g)?Mt(e,h,"lineSuffix")(g):h(g))}function h(g){return g===null||Qe(g)?(e.exit("setextHeadingLine"),n(g)):a(g)}}const Hz={tokenize:qz};function qz(e){const n=this,a=e.attempt(lu,r,e.attempt(this.parser.constructs.flowInitial,o,Mt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(GR,o)),"linePrefix")));return a;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEndingBlank"),e.consume(c),e.exit("lineEndingBlank"),n.currentConstruct=void 0,a}function o(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),n.currentConstruct=void 0,a}}const Fz={resolveAll:gk()},Uz=pk("string"),$z=pk("text");function pk(e){return{resolveAll:gk(e==="text"?Vz:void 0),tokenize:n};function n(a){const r=this,o=this.parser.constructs[e],c=a.attempt(o,d,f);return d;function d(v){return g(v)?c(v):f(v)}function f(v){if(v===null){a.consume(v);return}return a.enter("data"),a.consume(v),h}function h(v){return g(v)?(a.exit("data"),c(v)):(a.consume(v),h)}function g(v){if(v===null)return!0;const p=o[v];let j=-1;if(p)for(;++j<p.length;){const b=p[j];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function gk(e){return n;function n(a,r){let o=-1,c;for(;++o<=a.length;)c===void 0?a[o]&&a[o][1].type==="data"&&(c=o,o++):(!a[o]||a[o][1].type!=="data")&&(o!==c+2&&(a[c][1].end=a[o-1][1].end,a.splice(c+2,o-c-2),o=c+2),c=void 0);return e?e(a,r):a}}function Vz(e,n){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const r=e[a-1][1],o=n.sliceStream(r);let c=o.length,d=-1,f=0,h;for(;c--;){const g=o[c];if(typeof g=="string"){for(d=g.length;g.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-1}else if(g===-2)h=!0,f++;else if(g!==-1){c++;break}}if(n._contentTypeTextTrailing&&a===e.length&&(f=0),f){const g={type:a===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?d:r.start._bufferIndex+d,_index:r.start._index+c,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...g.start},r.start.offset===r.end.offset?Object.assign(r,g):(e.splice(a,0,["enter",g,n],["exit",g,n]),a+=2)}a++}return e}const Gz={42:zi,43:zi,45:zi,48:zi,49:zi,50:zi,51:zi,52:zi,53:zi,54:zi,55:zi,56:zi,57:zi,62:ok},Yz={91:ZR},Kz={[-2]:Ip,[-1]:Ip,32:Ip},Xz={35:iz,42:af,45:[Ob,af],60:sz,61:Ob,95:af,96:Rb,126:Rb},Qz={38:uk,92:ck},Zz={[-5]:Pp,[-4]:Pp,[-3]:Pp,33:Cz,38:uk,42:Y0,60:[ER,mz],91:Ez,92:[tz,ck],93:ug,95:Y0,96:HR},Jz={null:[Y0,Fz]},Wz={null:[42,95]},eO={null:[]},tO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Wz,contentInitial:Yz,disable:eO,document:Gz,flow:Xz,flowInitial:Kz,insideSpan:Jz,string:Qz,text:Zz},Symbol.toStringTag,{value:"Module"}));function nO(e,n,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const o={},c=[];let d=[],f=[];const h={attempt:z(R),check:z(_),consume:M,enter:E,exit:T,interrupt:z(_,{interrupt:!0})},g={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:j,sliceStream:b,write:p};let v=n.tokenize.call(g,h);return n.resolveAll&&c.push(n),g;function p(I){return d=ua(d,I),N(),d[d.length-1]!==null?[]:(P(n,0),g.events=Gf(c,g.events,g),g.events)}function j(I,$){return aO(b(I),$)}function b(I){return iO(d,I)}function k(){const{_bufferIndex:I,_index:$,line:Q,column:Y,offset:q}=r;return{_bufferIndex:I,_index:$,line:Q,column:Y,offset:q}}function S(I){o[I.line]=I.column,O()}function N(){let I;for(;r._index<d.length;){const $=d[r._index];if(typeof $=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<$.length;)C($.charCodeAt(r._bufferIndex));else C($)}}function C(I){v=v(I)}function M(I){Qe(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,O()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===d[r._index].length&&(r._bufferIndex=-1,r._index++)),g.previous=I}function E(I,$){const Q=$||{};return Q.type=I,Q.start=k(),g.events.push(["enter",Q,g]),f.push(Q),Q}function T(I){const $=f.pop();return $.end=k(),g.events.push(["exit",$,g]),$}function R(I,$){P(I,$.from)}function _(I,$){$.restore()}function z(I,$){return Q;function Q(Y,q,K){let V,X,Z,D;return Array.isArray(Y)?ne(Y):"tokenize"in Y?ne([Y]):se(Y);function se(W){return de;function de(oe){const be=oe!==null&&W[oe],we=oe!==null&&W.null,ve=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(we)?we:we?[we]:[]];return ne(ve)(oe)}}function ne(W){return V=W,X=0,W.length===0?K:B(W[X])}function B(W){return de;function de(oe){return D=H(),Z=W,W.partial||(g.currentConstruct=W),W.name&&g.parser.constructs.disable.null.includes(W.name)?ee():W.tokenize.call($?Object.assign(Object.create(g),$):g,h,F,ee)(oe)}}function F(W){return I(Z,D),q}function ee(W){return D.restore(),++X<V.length?B(V[X]):K}}}function P(I,$){I.resolveAll&&!c.includes(I)&&c.push(I),I.resolve&&Zi(g.events,$,g.events.length-$,I.resolve(g.events.slice($),g)),I.resolveTo&&(g.events=I.resolveTo(g.events,g))}function H(){const I=k(),$=g.previous,Q=g.currentConstruct,Y=g.events.length,q=Array.from(f);return{from:Y,restore:K};function K(){r=I,g.previous=$,g.currentConstruct=Q,g.events.length=Y,f=q,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function iO(e,n){const a=n.start._index,r=n.start._bufferIndex,o=n.end._index,c=n.end._bufferIndex;let d;if(a===o)d=[e[a].slice(r,c)];else{if(d=e.slice(a,o),r>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(r):d.shift()}c>0&&d.push(e[o].slice(0,c))}return d}function aO(e,n){let a=-1;const r=[];let o;for(;++a<e.length;){const c=e[a];let d;if(typeof c=="string")d=c;else switch(c){case-5:{d="\r";break}case-4:{d=`
|
|
578
|
+
`;break}case-3:{d=`\r
|
|
579
|
+
`;break}case-2:{d=n?" ":" ";break}case-1:{if(!n&&o)continue;d=" ";break}default:d=String.fromCharCode(c)}o=c===-2,r.push(d)}return r.join("")}function rO(e){const r={constructs:lk([tO,...(e||{}).extensions||[]]),content:o(bR),defined:[],document:o(wR),flow:o(Hz),lazy:{},string:o(Uz),text:o($z)};return r;function o(c){return d;function d(f){return nO(r,c,f)}}}function lO(e){for(;!dk(e););return e}const Db=/[\0\t\n\r]/g;function sO(){let e=1,n="",a=!0,r;return o;function o(c,d,f){const h=[];let g,v,p,j,b;for(c=n+(typeof c=="string"?c.toString():new TextDecoder(d||void 0).decode(c)),p=0,n="",a&&(c.charCodeAt(0)===65279&&p++,a=void 0);p<c.length;){if(Db.lastIndex=p,g=Db.exec(c),j=g&&g.index!==void 0?g.index:c.length,b=c.charCodeAt(j),!g){n=c.slice(p);break}if(b===10&&p===j&&r)h.push(-3),r=void 0;else switch(r&&(h.push(-5),r=void 0),p<j&&(h.push(c.slice(p,j)),e+=j-p),b){case 0:{h.push(65533),e++;break}case 9:{for(v=Math.ceil(e/4)*4,h.push(-2);e++<v;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:r=!0,e=1}p=j+1}return f&&(r&&h.push(-5),n&&h.push(n),h.push(null)),h}}const oO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cO(e){return e.replace(oO,uO)}function uO(e,n,a){if(n)return n;if(a.charCodeAt(0)===35){const o=a.charCodeAt(1),c=o===120||o===88;return sk(a.slice(c?2:1),c?16:10)}return cg(a)||e}const vk={}.hasOwnProperty;function dO(e,n,a){return n&&typeof n=="object"&&(a=n,n=void 0),fO(a)(lO(rO(a).document().write(sO()(e,n,!0))))}function fO(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(gt),autolinkProtocol:H,autolinkEmail:H,atxHeading:c(He),blockQuote:c(we),characterEscape:H,characterReference:H,codeFenced:c(ve),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:c(ve,d),codeText:c(re,d),codeTextData:H,data:H,codeFlowValue:H,definition:c(Ce),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:c(Ve),hardBreakEscape:c(Ze),hardBreakTrailing:c(Ze),htmlFlow:c(Fe,d),htmlFlowData:H,htmlText:c(Fe,d),htmlTextData:H,image:c(Ke),label:d,link:c(gt),listItem:c(Zt),listItemValue:j,listOrdered:c(qt,p),listUnordered:c(qt),paragraph:c(en),reference:B,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:c(He),strong:c(kn),thematicBreak:c(rn)},exit:{atxHeading:h(),atxHeadingSequence:R,autolink:h(),autolinkEmail:be,autolinkProtocol:oe,blockQuote:h(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:W,characterReference:de,codeFenced:h(N),codeFencedFence:S,codeFencedFenceInfo:b,codeFencedFenceMeta:k,codeFlowValue:O,codeIndented:h(C),codeText:h(q),codeTextData:O,data:O,definition:h(),definitionDestinationString:T,definitionLabelString:M,definitionTitleString:E,emphasis:h(),hardBreakEscape:h($),hardBreakTrailing:h($),htmlFlow:h(Q),htmlFlowData:O,htmlText:h(Y),htmlTextData:O,image:h(V),label:Z,labelText:X,lineEnding:I,link:h(K),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:F,resourceDestinationString:D,resourceTitleString:se,resource:ne,setextHeading:h(P),setextHeadingLineSequence:z,setextHeadingText:_,strong:h(),thematicBreak:h()}};yk(n,(e||{}).mdastExtensions||[]);const a={};return r;function r(ge){let Me={type:"root",children:[]};const Xe={stack:[Me],tokenStack:[],config:n,enter:f,exit:g,buffer:d,resume:v,data:a},Je=[];let rt=-1;for(;++rt<ge.length;)if(ge[rt][1].type==="listOrdered"||ge[rt][1].type==="listUnordered")if(ge[rt][0]==="enter")Je.push(rt);else{const Jt=Je.pop();rt=o(ge,Jt,rt)}for(rt=-1;++rt<ge.length;){const Jt=n[ge[rt][0]];vk.call(Jt,ge[rt][1].type)&&Jt[ge[rt][1].type].call(Object.assign({sliceSerialize:ge[rt][2].sliceSerialize},Xe),ge[rt][1])}if(Xe.tokenStack.length>0){const Jt=Xe.tokenStack[Xe.tokenStack.length-1];(Jt[1]||Lb).call(Xe,void 0,Jt[0])}for(Me.position={start:Nl(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:Nl(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<n.transforms.length;)Me=n.transforms[rt](Me)||Me;return Me}function o(ge,Me,Xe){let Je=Me-1,rt=-1,Jt=!1,An,dn,Ln,me;for(;++Je<=Xe;){const Ne=ge[Je];switch(Ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ne[0]==="enter"?rt++:rt--,me=void 0;break}case"lineEndingBlank":{Ne[0]==="enter"&&(An&&!me&&!rt&&!Ln&&(Ln=Je),me=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:me=void 0}if(!rt&&Ne[0]==="enter"&&Ne[1].type==="listItemPrefix"||rt===-1&&Ne[0]==="exit"&&(Ne[1].type==="listUnordered"||Ne[1].type==="listOrdered")){if(An){let _e=Je;for(dn=void 0;_e--;){const Be=ge[_e];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;dn&&(ge[dn][1].type="lineEndingBlank",Jt=!0),Be[1].type="lineEnding",dn=_e}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}Ln&&(!dn||Ln<dn)&&(An._spread=!0),An.end=Object.assign({},dn?ge[dn][1].start:Ne[1].end),ge.splice(dn||Je,0,["exit",An,Ne[2]]),Je++,Xe++}if(Ne[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},Ne[1].start),end:void 0};An=_e,ge.splice(Je,0,["enter",_e,Ne[2]]),Je++,Xe++,Ln=void 0,me=!0}}}return ge[Me][1]._spread=Jt,Xe}function c(ge,Me){return Xe;function Xe(Je){f.call(this,ge(Je),Je),Me&&Me.call(this,Je)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(ge,Me,Xe){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([Me,Xe||void 0]),ge.position={start:Nl(Me.start),end:void 0}}function h(ge){return Me;function Me(Xe){ge&&ge.call(this,Xe),g.call(this,Xe)}}function g(ge,Me){const Xe=this.stack.pop(),Je=this.tokenStack.pop();if(Je)Je[0].type!==ge.type&&(Me?Me.call(this,ge,Je[0]):(Je[1]||Lb).call(this,ge,Je[0]));else throw new Error("Cannot close `"+ge.type+"` ("+Ic({start:ge.start,end:ge.end})+"): it’s not open");Xe.position.end=Nl(ge.end)}function v(){return og(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function j(ge){if(this.data.expectingFirstListItemValue){const Me=this.stack[this.stack.length-2];Me.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.lang=ge}function k(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.meta=ge}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge.replace(/(\r?\n|\r)$/g,"")}function M(ge){const Me=this.resume(),Xe=this.stack[this.stack.length-1];Xe.label=Me,Xe.identifier=Sa(this.sliceSerialize(ge)).toLowerCase()}function E(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.title=ge}function T(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.url=ge}function R(ge){const Me=this.stack[this.stack.length-1];if(!Me.depth){const Xe=this.sliceSerialize(ge).length;Me.depth=Xe}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function z(ge){const Me=this.stack[this.stack.length-1];Me.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function H(ge){const Xe=this.stack[this.stack.length-1].children;let Je=Xe[Xe.length-1];(!Je||Je.type!=="text")&&(Je=vn(),Je.position={start:Nl(ge.start),end:void 0},Xe.push(Je)),this.stack.push(Je)}function O(ge){const Me=this.stack.pop();Me.value+=this.sliceSerialize(ge),Me.position.end=Nl(ge.end)}function I(ge){const Me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Xe=Me.children[Me.children.length-1];Xe.position.end=Nl(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(Me.type)&&(H.call(this,ge),O.call(this,ge))}function $(){this.data.atHardBreak=!0}function Q(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge}function Y(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge}function q(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.value=ge}function K(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const Me=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=Me,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function V(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const Me=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=Me,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function X(ge){const Me=this.sliceSerialize(ge),Xe=this.stack[this.stack.length-2];Xe.label=cO(Me),Xe.identifier=Sa(Me).toLowerCase()}function Z(){const ge=this.stack[this.stack.length-1],Me=this.resume(),Xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Xe.type==="link"){const Je=ge.children;Xe.children=Je}else Xe.alt=Me}function D(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.url=ge}function se(){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.title=ge}function ne(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function F(ge){const Me=this.resume(),Xe=this.stack[this.stack.length-1];Xe.label=Me,Xe.identifier=Sa(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function ee(ge){this.data.characterReferenceType=ge.type}function W(ge){const Me=this.sliceSerialize(ge),Xe=this.data.characterReferenceType;let Je;Xe?(Je=sk(Me,Xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Je=cg(Me);const rt=this.stack[this.stack.length-1];rt.value+=Je}function de(ge){const Me=this.stack.pop();Me.position.end=Nl(ge.end)}function oe(ge){O.call(this,ge);const Me=this.stack[this.stack.length-1];Me.url=this.sliceSerialize(ge)}function be(ge){O.call(this,ge);const Me=this.stack[this.stack.length-1];Me.url="mailto:"+this.sliceSerialize(ge)}function we(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function re(){return{type:"inlineCode",value:""}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ve(){return{type:"emphasis",children:[]}}function He(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function Fe(){return{type:"html",value:""}}function Ke(){return{type:"image",title:null,url:"",alt:null}}function gt(){return{type:"link",title:null,url:"",children:[]}}function qt(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function Zt(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function en(){return{type:"paragraph",children:[]}}function kn(){return{type:"strong",children:[]}}function vn(){return{type:"text",value:""}}function rn(){return{type:"thematicBreak"}}}function Nl(e){return{line:e.line,column:e.column,offset:e.offset}}function yk(e,n){let a=-1;for(;++a<n.length;){const r=n[a];Array.isArray(r)?yk(e,r):hO(e,r)}}function hO(e,n){let a;for(a in n)if(vk.call(n,a))switch(a){case"canContainEols":{const r=n[a];r&&e[a].push(...r);break}case"transforms":{const r=n[a];r&&e[a].push(...r);break}case"enter":case"exit":{const r=n[a];r&&Object.assign(e[a],r);break}}}function Lb(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ic({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ic({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ic({start:n.start,end:n.end})+") is still open")}function mO(e){const n=this;n.parser=a;function a(r){return dO(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function pO(e,n){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,a),e.applyData(n,a)}function gO(e,n){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,a),[e.applyData(n,a),{type:"text",value:`
|
|
580
|
+
`}]}function vO(e,n){const a=n.value?n.value+`
|
|
581
|
+
`:"",r={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let c={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};return n.meta&&(c.data={meta:n.meta}),e.patch(n,c),c=e.applyData(n,c),c={type:"element",tagName:"pre",properties:{},children:[c]},e.patch(n,c),c}function yO(e,n){const a={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function xO(e,n){const a={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function bO(e,n){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),o=Po(r.toLowerCase()),c=e.footnoteOrder.indexOf(r);let d,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),d=e.footnoteOrder.length):d=c+1,f+=1,e.footnoteCounts.set(r,f);const h={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+o,id:a+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(n,h);const g={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(n,g),e.applyData(n,g)}function jO(e,n){const a={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function wO(e,n){if(e.options.allowDangerousHtml){const a={type:"raw",value:n.value};return e.patch(n,a),e.applyData(n,a)}}function xk(e,n){const a=n.referenceType;let r="]";if(a==="collapsed"?r+="[]":a==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const o=e.all(n),c=o[0];c&&c.type==="text"?c.value="["+c.value:o.unshift({type:"text",value:"["});const d=o[o.length-1];return d&&d.type==="text"?d.value+=r:o.push({type:"text",value:r}),o}function kO(e,n){const a=String(n.identifier).toUpperCase(),r=e.definitionById.get(a);if(!r)return xk(e,n);const o={src:Po(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const c={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,c),e.applyData(n,c)}function SO(e,n){const a={src:Po(n.url)};n.alt!==null&&n.alt!==void 0&&(a.alt=n.alt),n.title!==null&&n.title!==void 0&&(a.title=n.title);const r={type:"element",tagName:"img",properties:a,children:[]};return e.patch(n,r),e.applyData(n,r)}function CO(e,n){const a={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,a);const r={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(n,r),e.applyData(n,r)}function NO(e,n){const a=String(n.identifier).toUpperCase(),r=e.definitionById.get(a);if(!r)return xk(e,n);const o={href:Po(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const c={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,c),e.applyData(n,c)}function EO(e,n){const a={href:Po(n.url)};n.title!==null&&n.title!==void 0&&(a.title=n.title);const r={type:"element",tagName:"a",properties:a,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function TO(e,n,a){const r=e.all(n),o=a?MO(a):bk(n),c={},d=[];if(typeof n.checked=="boolean"){const v=r[0];let p;v&&v.type==="element"&&v.tagName==="p"?p=v:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let f=-1;for(;++f<r.length;){const v=r[f];(o||f!==0||v.type!=="element"||v.tagName!=="p")&&d.push({type:"text",value:`
|
|
582
|
+
`}),v.type==="element"&&v.tagName==="p"&&!o?d.push(...v.children):d.push(v)}const h=r[r.length-1];h&&(o||h.type!=="element"||h.tagName!=="p")&&d.push({type:"text",value:`
|
|
583
|
+
`});const g={type:"element",tagName:"li",properties:c,children:d};return e.patch(n,g),e.applyData(n,g)}function MO(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const a=e.children;let r=-1;for(;!n&&++r<a.length;)n=bk(a[r])}return n}function bk(e){const n=e.spread;return n??e.children.length>1}function AO(e,n){const a={},r=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(a.start=n.start);++o<r.length;){const d=r[o];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const c={type:"element",tagName:n.ordered?"ol":"ul",properties:a,children:e.wrap(r,!0)};return e.patch(n,c),e.applyData(n,c)}function _O(e,n){const a={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function RO(e,n){const a={type:"root",children:e.wrap(e.all(n))};return e.patch(n,a),e.applyData(n,a)}function zO(e,n){const a={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function OO(e,n){const a=e.all(n),r=a.shift(),o=[];if(r){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],d),o.push(d)}if(a.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},f=ag(n.children[1]),h=W5(n.children[n.children.length-1]);f&&h&&(d.position={start:f,end:h}),o.push(d)}const c={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,c),e.applyData(n,c)}function DO(e,n,a){const r=a?a.children:void 0,c=(r?r.indexOf(n):1)===0?"th":"td",d=a&&a.type==="table"?a.align:void 0,f=d?d.length:n.children.length;let h=-1;const g=[];for(;++h<f;){const p=n.children[h],j={},b=d?d[h]:void 0;b&&(j.align=b);let k={type:"element",tagName:c,properties:j,children:[]};p&&(k.children=e.all(p),e.patch(p,k),k=e.applyData(p,k)),g.push(k)}const v={type:"element",tagName:"tr",properties:{},children:e.wrap(g,!0)};return e.patch(n,v),e.applyData(n,v)}function LO(e,n){const a={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}const Bb=9,Ib=32;function BO(e){const n=String(e),a=/\r?\n|\r/g;let r=a.exec(n),o=0;const c=[];for(;r;)c.push(Pb(n.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=a.exec(n);return c.push(Pb(n.slice(o),o>0,!1)),c.join("")}function Pb(e,n,a){let r=0,o=e.length;if(n){let c=e.codePointAt(r);for(;c===Bb||c===Ib;)r++,c=e.codePointAt(r)}if(a){let c=e.codePointAt(o-1);for(;c===Bb||c===Ib;)o--,c=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function IO(e,n){const a={type:"text",value:BO(String(n.value))};return e.patch(n,a),e.applyData(n,a)}function PO(e,n){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,a),e.applyData(n,a)}const HO={blockquote:pO,break:gO,code:vO,delete:yO,emphasis:xO,footnoteReference:bO,heading:jO,html:wO,imageReference:kO,image:SO,inlineCode:CO,linkReference:NO,link:EO,listItem:TO,list:AO,paragraph:_O,root:RO,strong:zO,table:OO,tableCell:LO,tableRow:DO,text:IO,thematicBreak:PO,toml:Dd,yaml:Dd,definition:Dd,footnoteDefinition:Dd};function Dd(){}const jk=-1,Yf=0,Hc=1,gf=2,dg=3,fg=4,hg=5,mg=6,wk=7,kk=8,{defineProperty:qO}=Object,Sk=typeof self=="object"?self:globalThis,Hb=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Sk[e](n)},FO=(e,n)=>{const a=(o,c)=>(e.set(c,o),o),r=o=>{if(e.has(o))return e.get(o);const[c,d]=n[o];switch(c){case Yf:case jk:return a(d,o);case Hc:{const f=a([],o);for(const h of d)f.push(r(h));return f}case gf:{const f=a({},o);for(const[h,g]of d){const v=r(h),p=r(g);v==="__proto__"?qO(f,v,{value:p,configurable:!0,enumerable:!0,writable:!0}):f[v]=p}return f}case dg:return a(new Date(d),o);case fg:{const{source:f,flags:h}=d;return a(new RegExp(f,h),o)}case hg:{const f=a(new Map,o);for(const[h,g]of d)f.set(r(h),r(g));return f}case mg:{const f=a(new Set,o);for(const h of d)f.add(r(h));return f}case wk:{const{name:f,message:h}=d;return a(typeof Sk[f]=="function"?Hb(f,h):new Error(h),o)}case kk:return a(BigInt(d),o);case"BigInt":return a(Object(BigInt(d)),o);case"ArrayBuffer":return a(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return a(new DataView(f),d)}case"-0":return-0}return a(Hb(c,d),o)};return r},qb=e=>FO(new Map,e)(0),xs="",{toString:UO}={},{keys:$O,is:VO}=Object,Dc=e=>{const n=typeof e;if(n!=="object"||!e)return[Yf,n];const a=UO.call(e).slice(8,-1);switch(a){case"Array":return[Hc,xs];case"Object":return[gf,xs];case"Date":return[dg,xs];case"RegExp":return[fg,xs];case"Map":return[hg,xs];case"Set":return[mg,xs];case"DataView":return[Hc,a]}return a.includes("Array")?[Hc,a]:e instanceof Error?[wk,e.name||"Error"]:[gf,a]},Ld=([e,n])=>e===Yf&&(n==="function"||n==="symbol"),GO=(e,n,a,r)=>{const o=(d,f)=>{const h=r.push(d)-1;return a.set(f,h),h},c=d=>{if(a.has(d))return a.get(d);let[f,h]=Dc(d);switch(f){case Yf:{let v=d;switch(h){case"bigint":f=kk,v=d.toString();break;case"number":if(!d&&VO(d,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);v=null;break;case"undefined":return o([jk],d)}return o([f,v],d)}case Hc:{if(h){let j=d;return h==="DataView"?j=new Uint8Array(d.buffer):h==="ArrayBuffer"&&(j=new Uint8Array(d)),o([h,[...j]],d)}const v=[],p=o([f,v],d);for(const j of d)v.push(c(j));return p}case gf:{if(h)switch(h){case"BigInt":return o([h,d.toString()],d);case"Boolean":case"Number":case"String":return o([h,d.valueOf()],d)}if(n&&"toJSON"in d)return c(d.toJSON());const v=[],p=o([f,v],d);for(const j of $O(d))(e||!Ld(Dc(d[j])))&&v.push([c(j),c(d[j])]);return p}case dg:return o([f,isNaN(d.getTime())?xs:d.toISOString()],d);case fg:{const{source:v,flags:p}=d;return o([f,{source:v,flags:p}],d)}case hg:{const v=[],p=o([f,v],d);for(const[j,b]of d)(e||!(Ld(Dc(j))||Ld(Dc(b))))&&v.push([c(j),c(b)]);return p}case mg:{const v=[],p=o([f,v],d);for(const j of d)(e||!Ld(Dc(j)))&&v.push(c(j));return p}}const{message:g}=d;return o([f,{name:h,message:g}],d)};return c},Fb=(e,{json:n,lossy:a}={})=>{const r=[];return GO(!(n||a),!!n,new Map,r)(e),r},vf=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?qb(Fb(e,n)):structuredClone(e):(e,n)=>qb(Fb(e,n));function YO(e,n){const a=[{type:"text",value:"↩"}];return n>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),a}function KO(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function XO(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||YO,r=e.options.footnoteBackLabel||KO,o=e.options.footnoteLabel||"Footnotes",c=e.options.footnoteLabelTagName||"h2",d=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const g=e.footnoteById.get(e.footnoteOrder[h]);if(!g)continue;const v=e.all(g),p=String(g.identifier).toUpperCase(),j=Po(p.toLowerCase());let b=0;const k=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++b<=S;){k.length>0&&k.push({type:"text",value:" "});let M=typeof a=="string"?a:a(h,b);typeof M=="string"&&(M={type:"text",value:M}),k.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+j+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(h,b),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const N=v[v.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const M=N.children[N.children.length-1];M&&M.type==="text"?M.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...k)}else v.push(...k);const C={type:"element",tagName:"li",properties:{id:n+"fn-"+j},children:e.wrap(v,!0)};e.patch(g,C),f.push(C)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...vf(d),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
584
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
585
|
+
`}]}}const Kf=(function(e){if(e==null)return WO;if(typeof e=="function")return Xf(e);if(typeof e=="object")return Array.isArray(e)?QO(e):ZO(e);if(typeof e=="string")return JO(e);throw new Error("Expected function, string, or object as test")});function QO(e){const n=[];let a=-1;for(;++a<e.length;)n[a]=Kf(e[a]);return Xf(r);function r(...o){let c=-1;for(;++c<n.length;)if(n[c].apply(this,o))return!0;return!1}}function ZO(e){const n=e;return Xf(a);function a(r){const o=r;let c;for(c in e)if(o[c]!==n[c])return!1;return!0}}function JO(e){return Xf(n);function n(a){return a&&a.type===e}}function Xf(e){return n;function n(a,r,o){return!!(eD(a)&&e.call(this,a,typeof r=="number"?r:void 0,o||void 0))}}function WO(){return!0}function eD(e){return e!==null&&typeof e=="object"&&"type"in e}const Ck=[],tD=!0,K0=!1,nD="skip";function Nk(e,n,a,r){let o;typeof n=="function"&&typeof a!="function"?(r=a,a=n):o=n;const c=Kf(o),d=r?-1:1;f(e,void 0,[])();function f(h,g,v){const p=h&&typeof h=="object"?h:{};if(typeof p.type=="string"){const b=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(j,"name",{value:"node ("+(h.type+(b?"<"+b+">":""))+")"})}return j;function j(){let b=Ck,k,S,N;if((!n||c(h,g,v[v.length-1]||void 0))&&(b=iD(a(h,v)),b[0]===K0))return b;if("children"in h&&h.children){const C=h;if(C.children&&b[0]!==nD)for(S=(r?C.children.length:-1)+d,N=v.concat(C);S>-1&&S<C.children.length;){const M=C.children[S];if(k=f(M,S,N)(),k[0]===K0)return k;S=typeof k[1]=="number"?k[1]:S+d}}return b}}}function iD(e){return Array.isArray(e)?e:typeof e=="number"?[tD,e]:e==null?Ck:[e]}function pg(e,n,a,r){let o,c,d;typeof n=="function"&&typeof a!="function"?(c=void 0,d=n,o=a):(c=n,d=a,o=r),Nk(e,c,f,o);function f(h,g){const v=g[g.length-1],p=v?v.children.indexOf(h):void 0;return d(h,p,v)}}const X0={}.hasOwnProperty,aD={};function rD(e,n){const a=n||aD,r=new Map,o=new Map,c=new Map,d={...HO,...a.handlers},f={all:g,applyData:sD,definitionById:r,footnoteById:o,footnoteCounts:c,footnoteOrder:[],handlers:d,one:h,options:a,patch:lD,wrap:cD};return pg(e,function(v){if(v.type==="definition"||v.type==="footnoteDefinition"){const p=v.type==="definition"?r:o,j=String(v.identifier).toUpperCase();p.has(j)||p.set(j,v)}}),f;function h(v,p){const j=v.type,b=f.handlers[j];if(X0.call(f.handlers,j)&&b)return b(f,v,p);if(f.options.passThrough&&f.options.passThrough.includes(j)){if("children"in v){const{children:S,...N}=v,C=vf(N);return C.children=f.all(v),C}return vf(v)}return(f.options.unknownHandler||oD)(f,v,p)}function g(v){const p=[];if("children"in v){const j=v.children;let b=-1;for(;++b<j.length;){const k=f.one(j[b],v);if(k){if(b&&j[b-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Ub(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=Ub(S.value))}Array.isArray(k)?p.push(...k):p.push(k)}}}return p}}function lD(e,n){e.position&&(n.position=G_(e))}function sD(e,n){let a=n;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,c=e.data.hProperties;if(typeof r=="string")if(a.type==="element")a.tagName=r;else{const d="children"in a?a.children:[a];a={type:"element",tagName:r,properties:{},children:d}}a.type==="element"&&c&&Object.assign(a.properties,vf(c)),"children"in a&&a.children&&o!==null&&o!==void 0&&(a.children=o)}return a}function oD(e,n){const a=n.data||{},r="value"in n&&!(X0.call(a,"hProperties")||X0.call(a,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function cD(e,n){const a=[];let r=-1;for(n&&a.push({type:"text",value:`
|
|
586
|
+
`});++r<e.length;)r&&a.push({type:"text",value:`
|
|
587
|
+
`}),a.push(e[r]);return n&&e.length>0&&a.push({type:"text",value:`
|
|
588
|
+
`}),a}function Ub(e){let n=0,a=e.charCodeAt(n);for(;a===9||a===32;)n++,a=e.charCodeAt(n);return e.slice(n)}function $b(e,n){const a=rD(e,n),r=a.one(e,void 0),o=XO(a),c=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&c.children.push({type:"text",value:`
|
|
589
|
+
`},o),c}function uD(e,n){return e&&"run"in e?async function(a,r){const o=$b(a,{file:r,...n});await e.run(o,r)}:function(a,r){return $b(a,{file:r,...e||n})}}function Vb(e){if(e)throw e}var Hp,Gb;function dD(){if(Gb)return Hp;Gb=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(g){return typeof Array.isArray=="function"?Array.isArray(g):n.call(g)==="[object Array]"},c=function(g){if(!g||n.call(g)!=="[object Object]")return!1;var v=e.call(g,"constructor"),p=g.constructor&&g.constructor.prototype&&e.call(g.constructor.prototype,"isPrototypeOf");if(g.constructor&&!v&&!p)return!1;var j;for(j in g);return typeof j>"u"||e.call(g,j)},d=function(g,v){a&&v.name==="__proto__"?a(g,v.name,{enumerable:!0,configurable:!0,value:v.newValue,writable:!0}):g[v.name]=v.newValue},f=function(g,v){if(v==="__proto__")if(e.call(g,v)){if(r)return r(g,v).value}else return;return g[v]};return Hp=function h(){var g,v,p,j,b,k,S=arguments[0],N=1,C=arguments.length,M=!1;for(typeof S=="boolean"&&(M=S,S=arguments[1]||{},N=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});N<C;++N)if(g=arguments[N],g!=null)for(v in g)p=f(S,v),j=f(g,v),S!==j&&(M&&j&&(c(j)||(b=o(j)))?(b?(b=!1,k=p&&o(p)?p:[]):k=p&&c(p)?p:{},d(S,{name:v,newValue:h(M,k,j)})):typeof j<"u"&&d(S,{name:v,newValue:j}));return S},Hp}var fD=dD();const qp=d1(fD);function Q0(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function hD(){const e=[],n={run:a,use:r};return n;function a(...o){let c=-1;const d=o.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...o);function f(h,...g){const v=e[++c];let p=-1;if(h){d(h);return}for(;++p<o.length;)(g[p]===null||g[p]===void 0)&&(g[p]=o[p]);o=g,v?mD(v,f)(...g):d(null,...g)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function mD(e,n){let a;return r;function r(...d){const f=e.length>d.length;let h;f&&d.push(o);try{h=e.apply(this,d)}catch(g){const v=g;if(f&&a)throw v;return o(v)}f||(h&&h.then&&typeof h.then=="function"?h.then(c,o):h instanceof Error?o(h):c(h))}function o(d,...f){a||(a=!0,n(d,...f))}function c(d){o(null,d)}}const Ya={basename:pD,dirname:gD,extname:vD,join:yD,sep:"/"};function pD(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');su(e);let a=0,r=-1,o=e.length,c;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(c){a=o+1;break}}else r<0&&(c=!0,r=o+1);return r<0?"":e.slice(a,r)}if(n===e)return"";let d=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(c){a=o+1;break}}else d<0&&(c=!0,d=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(r=o):(f=-1,r=d));return a===r?r=d:r<0&&(r=e.length),e.slice(a,r)}function gD(e){if(su(e),e.length===0)return".";let n=-1,a=e.length,r;for(;--a;)if(e.codePointAt(a)===47){if(r){n=a;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function vD(e){su(e);let n=e.length,a=-1,r=0,o=-1,c=0,d;for(;n--;){const f=e.codePointAt(n);if(f===47){if(d){r=n+1;break}continue}a<0&&(d=!0,a=n+1),f===46?o<0?o=n:c!==1&&(c=1):o>-1&&(c=-1)}return o<0||a<0||c===0||c===1&&o===a-1&&o===r+1?"":e.slice(o,a)}function yD(...e){let n=-1,a;for(;++n<e.length;)su(e[n]),e[n]&&(a=a===void 0?e[n]:a+"/"+e[n]);return a===void 0?".":xD(a)}function xD(e){su(e);const n=e.codePointAt(0)===47;let a=bD(e,!n);return a.length===0&&!n&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),n?"/"+a:a}function bD(e,n){let a="",r=0,o=-1,c=0,d=-1,f,h;for(;++d<=e.length;){if(d<e.length)f=e.codePointAt(d);else{if(f===47)break;f=47}if(f===47){if(!(o===d-1||c===1))if(o!==d-1&&c===2){if(a.length<2||r!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(h=a.lastIndexOf("/"),h!==a.length-1){h<0?(a="",r=0):(a=a.slice(0,h),r=a.length-1-a.lastIndexOf("/")),o=d,c=0;continue}}else if(a.length>0){a="",r=0,o=d,c=0;continue}}n&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+e.slice(o+1,d):a=e.slice(o+1,d),r=d-o-1;o=d,c=0}else f===46&&c>-1?c++:c=-1}return a}function su(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jD={cwd:wD};function wD(){return"/"}function Z0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kD(e){if(typeof e=="string")e=new URL(e);else if(!Z0(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return SD(e)}function SD(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let a=-1;for(;++a<n.length;)if(n.codePointAt(a)===37&&n.codePointAt(a+1)===50){const r=n.codePointAt(a+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const Fp=["history","path","basename","stem","extname","dirname"];class Ek{constructor(n){let a;n?Z0(n)?a={path:n}:typeof n=="string"||CD(n)?a={value:n}:a=n:a={},this.cwd="cwd"in a?"":jD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Fp.length;){const c=Fp[r];c in a&&a[c]!==void 0&&a[c]!==null&&(this[c]=c==="history"?[...a[c]]:a[c])}let o;for(o in a)Fp.includes(o)||(this[o]=a[o])}get basename(){return typeof this.path=="string"?Ya.basename(this.path):void 0}set basename(n){$p(n,"basename"),Up(n,"basename"),this.path=Ya.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Ya.dirname(this.path):void 0}set dirname(n){Yb(this.basename,"dirname"),this.path=Ya.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Ya.extname(this.path):void 0}set extname(n){if(Up(n,"extname"),Yb(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ya.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Z0(n)&&(n=kD(n)),$p(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Ya.basename(this.path,this.extname):void 0}set stem(n){$p(n,"stem"),Up(n,"stem"),this.path=Ya.join(this.dirname||"",n+(this.extname||""))}fail(n,a,r){const o=this.message(n,a,r);throw o.fatal=!0,o}info(n,a,r){const o=this.message(n,a,r);return o.fatal=void 0,o}message(n,a,r){const o=new ci(n,a,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Up(e,n){if(e&&e.includes(Ya.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Ya.sep+"`")}function $p(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Yb(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function CD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ND=(function(e){const r=this.constructor.prototype,o=r[e],c=function(){return o.apply(c,arguments)};return Object.setPrototypeOf(c,r),c}),ED={}.hasOwnProperty;class gg extends ND{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=hD()}copy(){const n=new gg;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];n.use(...r)}return n.data(qp(!0,{},this.namespace)),n}data(n,a){return typeof n=="string"?arguments.length===2?(Yp("data",this.frozen),this.namespace[n]=a,this):ED.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Yp("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=a.call(n,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const a=Bd(n),r=this.parser||this.Parser;return Vp("parse",r),r(String(a),a)}process(n,a){const r=this;return this.freeze(),Vp("process",this.parser||this.Parser),Gp("process",this.compiler||this.Compiler),a?o(void 0,a):new Promise(o);function o(c,d){const f=Bd(n),h=r.parse(f);r.run(h,f,function(v,p,j){if(v||!p||!j)return g(v);const b=p,k=r.stringify(b,j);AD(k)?j.value=k:j.result=k,g(v,j)});function g(v,p){v||!p?d(v):c?c(p):a(void 0,p)}}}processSync(n){let a=!1,r;return this.freeze(),Vp("processSync",this.parser||this.Parser),Gp("processSync",this.compiler||this.Compiler),this.process(n,o),Xb("processSync","process",a),r;function o(c,d){a=!0,Vb(c),r=d}}run(n,a,r){Kb(n),this.freeze();const o=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?c(void 0,r):new Promise(c);function c(d,f){const h=Bd(a);o.run(n,h,g);function g(v,p,j){const b=p||n;v?f(v):d?d(b):r(void 0,b,j)}}}runSync(n,a){let r=!1,o;return this.run(n,a,c),Xb("runSync","run",r),o;function c(d,f){Vb(d),o=f,r=!0}}stringify(n,a){this.freeze();const r=Bd(a),o=this.compiler||this.Compiler;return Gp("stringify",o),Kb(n),o(n,r)}use(n,...a){const r=this.attachers,o=this.namespace;if(Yp("use",this.frozen),n!=null)if(typeof n=="function")h(n,a);else if(typeof n=="object")Array.isArray(n)?f(n):d(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function c(g){if(typeof g=="function")h(g,[]);else if(typeof g=="object")if(Array.isArray(g)){const[v,...p]=g;h(v,p)}else d(g);else throw new TypeError("Expected usable value, not `"+g+"`")}function d(g){if(!("plugins"in g)&&!("settings"in g))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(g.plugins),g.settings&&(o.settings=qp(!0,o.settings,g.settings))}function f(g){let v=-1;if(g!=null)if(Array.isArray(g))for(;++v<g.length;){const p=g[v];c(p)}else throw new TypeError("Expected a list of plugins, not `"+g+"`")}function h(g,v){let p=-1,j=-1;for(;++p<r.length;)if(r[p][0]===g){j=p;break}if(j===-1)r.push([g,...v]);else if(v.length>0){let[b,...k]=v;const S=r[j][1];Q0(S)&&Q0(b)&&(b=qp(!0,S,b)),r[j]=[g,b,...k]}}}}const TD=new gg().freeze();function Vp(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Gp(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Yp(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Kb(e){if(!Q0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xb(e,n,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Bd(e){return MD(e)?e:new Ek(e)}function MD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function AD(e){return typeof e=="string"||_D(e)}function _D(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const RD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qb=[],Zb={allowDangerousHtml:!0},zD=/^(https?|ircs?|mailto|xmpp)$/i,OD=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function DD(e){const n=LD(e),a=BD(e);return ID(n.runSync(n.parse(a),a),e)}function LD(e){const n=e.rehypePlugins||Qb,a=e.remarkPlugins||Qb,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Zb}:Zb;return TD().use(mO).use(a).use(uD,r).use(n)}function BD(e){const n=e.children||"",a=new Ek;return typeof n=="string"&&(a.value=n),a}function ID(e,n){const a=n.allowedElements,r=n.allowElement,o=n.components,c=n.disallowedElements,d=n.skipHtml,f=n.unwrapDisallowed,h=n.urlTransform||PD;for(const v of OD)Object.hasOwn(n,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+RD+v.id,void 0);return pg(e,g),Z_(e,{Fragment:l.Fragment,components:o,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function g(v,p,j){if(v.type==="raw"&&j&&typeof p=="number")return d?j.children.splice(p,1):j.children[p]={type:"text",value:v.value},p;if(v.type==="element"){let b;for(b in Bp)if(Object.hasOwn(Bp,b)&&Object.hasOwn(v.properties,b)){const k=v.properties[b],S=Bp[b];(S===null||S.includes(v.tagName))&&(v.properties[b]=h(String(k||""),b,v))}}if(v.type==="element"){let b=a?!a.includes(v.tagName):c?c.includes(v.tagName):!1;if(!b&&r&&typeof p=="number"&&(b=!r(v,p,j)),b&&j&&typeof p=="number")return f&&v.children?j.children.splice(p,1,...v.children):j.children.splice(p,1),p}}}function PD(e){const n=e.indexOf(":"),a=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||a!==-1&&n>a||r!==-1&&n>r||zD.test(e.slice(0,n))?e:""}function HD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Tk(e,n,a){const o=Kf((a||{}).ignore||[]),c=qD(n);let d=-1;for(;++d<c.length;)Nk(e,"text",f);function f(g,v){let p=-1,j;for(;++p<v.length;){const b=v[p],k=j?j.children:void 0;if(o(b,k?k.indexOf(b):void 0,j))return;j=b}if(j)return h(g,v)}function h(g,v){const p=v[v.length-1],j=c[d][0],b=c[d][1];let k=0;const N=p.children.indexOf(g);let C=!1,M=[];j.lastIndex=0;let E=j.exec(g.value);for(;E;){const T=E.index,R={index:E.index,input:E.input,stack:[...v,g]};let _=b(...E,R);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?j.lastIndex=T+1:(k!==T&&M.push({type:"text",value:g.value.slice(k,T)}),Array.isArray(_)?M.push(..._):_&&M.push(_),k=T+E[0].length,C=!0),!j.global)break;E=j.exec(g.value)}return C?(k<g.value.length&&M.push({type:"text",value:g.value.slice(k)}),p.children.splice(N,1,...M)):M=[g],N+M.length}}function qD(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<a.length;){const o=a[r];n.push([FD(o[0]),UD(o[1])])}return n}function FD(e){return typeof e=="string"?new RegExp(HD(e),"g"):e}function UD(e){return typeof e=="function"?e:function(){return e}}function $D(e){Tk(e,[/\r?\n|\r/g,VD])}function VD(){return{type:"break"}}function GD(){return function(e){$D(e)}}const YD=/[\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]/,KD=/https?:\/\/[^\s<\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]+/g;function XD(e){var r;const n=((r=e.children)==null?void 0:r.length)===1?e.children[0]:void 0;if((n==null?void 0:n.type)!=="text"||!n.value)return;const a=n.value;return e.url===a||e.url===`http://${a}`||e.url===`mailto:${a}`?a:void 0}function Mk(e,n){return{type:"link",url:e,children:[{type:"text",value:n}]}}function QD(e){const n=[];let a=0;for(const r of e.matchAll(KD))r.index>a&&n.push({type:"text",value:e.slice(a,r.index)}),n.push(Mk(r[0],r[0])),a=r.index+r[0].length;return a<e.length&&n.push({type:"text",value:e.slice(a)}),n}function Ak(e){const n=e.children;if(n)for(let a=0;a<n.length;a++){const r=n[a];if(r.type!=="link"){Ak(r);continue}const o=XD(r),c=o===void 0?-1:o.search(YD);if(o===void 0||c<=0)continue;const d=o.slice(0,c),f=r.url.slice(0,r.url.length-o.length),h=QD(o.slice(c));n.splice(a,1,Mk(f+d,d),...h),a+=h.length}}function ZD(){return e=>Ak(e)}const JD=new RegExp("(?<![A-Za-z0-9_/#.@-])m\\d{1,9}(?![A-Za-z0-9_-]|\\.[A-Za-z0-9])","g");function WD(e){const n=[];let a=0;for(const r of e.matchAll(JD))r.index>a&&n.push({type:"text",value:e.slice(a,r.index)}),n.push({type:"link",url:`#ref-${r[0]}`,children:[{type:"text",value:r[0]}]}),a=r.index+r[0].length;return n.length?(a<e.length&&n.push({type:"text",value:e.slice(a)}),n):null}function _k(e){const n=e.children;if(!(!n||e.type==="link"||e.type==="linkReference"))for(let a=0;a<n.length;a++){const r=n[a];if(r.type!=="text"){_k(r);continue}const o=r.value?WD(r.value):null;o&&(n.splice(a,1,...o),a+=o.length-1)}}function eL(){return e=>_k(e)}function Jb(e,n){const a=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,o=a.indexOf(n);for(;o!==-1;)r++,o=a.indexOf(n,o+n.length);return r}const Kp="phrasing",Xp=["autolink","link","image","label"];function tL(){return{transforms:[oL],enter:{literalAutolink:iL,literalAutolinkEmail:Qp,literalAutolinkHttp:Qp,literalAutolinkWww:Qp},exit:{literalAutolink:sL,literalAutolinkEmail:lL,literalAutolinkHttp:aL,literalAutolinkWww:rL}}}function nL(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Kp,notInConstruct:Xp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Kp,notInConstruct:Xp},{character:":",before:"[ps]",after:"\\/",inConstruct:Kp,notInConstruct:Xp}]}}function iL(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Qp(e){this.config.enter.autolinkProtocol.call(this,e)}function aL(e){this.config.exit.autolinkProtocol.call(this,e)}function rL(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function lL(e){this.config.exit.autolinkEmail.call(this,e)}function sL(e){this.exit(e)}function oL(e){Tk(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cL],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),uL]],{ignore:["link","linkReference"]})}function cL(e,n,a,r,o){let c="";if(!Rk(o)||(/^w/i.test(n)&&(a=n+a,n="",c="http://"),!dL(a)))return!1;const d=fL(a+r);if(!d[0])return!1;const f={type:"link",title:null,url:c+n+d[0],children:[{type:"text",value:n+d[0]}]};return d[1]?[f,{type:"text",value:d[1]}]:f}function uL(e,n,a,r){return!Rk(r,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+a,children:[{type:"text",value:n+"@"+a}]}}function dL(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function fL(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let a=n[0],r=a.indexOf(")");const o=Jb(e,"(");let c=Jb(e,")");for(;r!==-1&&o>c;)e+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),c++;return[e,a]}function Rk(e,n){const a=e.input.charCodeAt(e.index-1);return(e.index===0||Ms(a)||Vf(a))&&(!n||a!==47)}zk.peek=jL;function hL(){this.buffer()}function mL(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pL(){this.buffer()}function gL(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vL(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Sa(this.sliceSerialize(e)).toLowerCase(),a.label=n}function yL(e){this.exit(e)}function xL(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Sa(this.sliceSerialize(e)).toLowerCase(),a.label=n}function bL(e){this.exit(e)}function jL(){return"["}function zk(e,n,a,r){const o=a.createTracker(r);let c=o.move("[^");const d=a.enter("footnoteReference"),f=a.enter("reference");return c+=o.move(a.safe(a.associationId(e),{after:"]",before:c})),f(),d(),c+=o.move("]"),c}function wL(){return{enter:{gfmFootnoteCallString:hL,gfmFootnoteCall:mL,gfmFootnoteDefinitionLabelString:pL,gfmFootnoteDefinition:gL},exit:{gfmFootnoteCallString:vL,gfmFootnoteCall:yL,gfmFootnoteDefinitionLabelString:xL,gfmFootnoteDefinition:bL}}}function kL(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:a,footnoteReference:zk},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,o,c,d){const f=c.createTracker(d);let h=f.move("[^");const g=c.enter("footnoteDefinition"),v=c.enter("label");return h+=f.move(c.safe(c.associationId(r),{before:h,after:"]"})),v(),h+=f.move("]:"),r.children&&r.children.length>0&&(f.shift(4),h+=f.move((n?`
|
|
590
|
+
`:" ")+c.indentLines(c.containerFlow(r,f.current()),n?Ok:SL))),g(),h}}function SL(e,n,a){return n===0?e:Ok(e,n,a)}function Ok(e,n,a){return(a?"":" ")+e}const CL=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Dk.peek=AL;function NL(){return{canContainEols:["delete"],enter:{strikethrough:TL},exit:{strikethrough:ML}}}function EL(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:CL}],handlers:{delete:Dk}}}function TL(e){this.enter({type:"delete",children:[]},e)}function ML(e){this.exit(e)}function Dk(e,n,a,r){const o=a.createTracker(r),c=a.enter("strikethrough");let d=o.move("~~");return d+=a.containerPhrasing(e,{...o.current(),before:d,after:"~"}),d+=o.move("~~"),c(),d}function AL(){return"~"}function _L(e){return e.length}function RL(e,n){const a=n||{},r=(a.align||[]).concat(),o=a.stringLength||_L,c=[],d=[],f=[],h=[];let g=0,v=-1;for(;++v<e.length;){const S=[],N=[];let C=-1;for(e[v].length>g&&(g=e[v].length);++C<e[v].length;){const M=zL(e[v][C]);if(a.alignDelimiters!==!1){const E=o(M);N[C]=E,(h[C]===void 0||E>h[C])&&(h[C]=E)}S.push(M)}d[v]=S,f[v]=N}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<g;)c[p]=Wb(r[p]);else{const S=Wb(r);for(;++p<g;)c[p]=S}p=-1;const j=[],b=[];for(;++p<g;){const S=c[p];let N="",C="";S===99?(N=":",C=":"):S===108?N=":":S===114&&(C=":");let M=a.alignDelimiters===!1?1:Math.max(1,h[p]-N.length-C.length);const E=N+"-".repeat(M)+C;a.alignDelimiters!==!1&&(M=N.length+M+C.length,M>h[p]&&(h[p]=M),b[p]=M),j[p]=E}d.splice(1,0,j),f.splice(1,0,b),v=-1;const k=[];for(;++v<d.length;){const S=d[v],N=f[v];p=-1;const C=[];for(;++p<g;){const M=S[p]||"";let E="",T="";if(a.alignDelimiters!==!1){const R=h[p]-(N[p]||0),_=c[p];_===114?E=" ".repeat(R):_===99?R%2?(E=" ".repeat(R/2+.5),T=" ".repeat(R/2-.5)):(E=" ".repeat(R/2),T=E):T=" ".repeat(R)}a.delimiterStart!==!1&&!p&&C.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&M==="")&&(a.delimiterStart!==!1||p)&&C.push(" "),a.alignDelimiters!==!1&&C.push(E),C.push(M),a.alignDelimiters!==!1&&C.push(T),a.padding!==!1&&C.push(" "),(a.delimiterEnd!==!1||p!==g-1)&&C.push("|")}k.push(a.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return k.join(`
|
|
591
|
+
`)}function zL(e){return e==null?"":String(e)}function Wb(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function OL(e,n,a,r){const o=a.enter("blockquote"),c=a.createTracker(r);c.move("> "),c.shift(2);const d=a.indentLines(a.containerFlow(e,c.current()),DL);return o(),d}function DL(e,n,a){return">"+(a?"":" ")+e}function LL(e,n){return ej(e,n.inConstruct,!0)&&!ej(e,n.notInConstruct,!1)}function ej(e,n,a){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return a;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function tj(e,n,a,r){let o=-1;for(;++o<a.unsafe.length;)if(a.unsafe[o].character===`
|
|
592
|
+
`&&LL(a.stack,a.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
593
|
+
`}function BL(e,n){const a=String(e);let r=a.indexOf(n),o=r,c=0,d=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++c>d&&(d=c):c=1,o=r+n.length,r=a.indexOf(n,o);return d}function IL(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function PL(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function HL(e,n,a,r){const o=PL(a),c=e.value||"",d=o==="`"?"GraveAccent":"Tilde";if(IL(e,a)){const p=a.enter("codeIndented"),j=a.indentLines(c,qL);return p(),j}const f=a.createTracker(r),h=o.repeat(Math.max(BL(c,o)+1,3)),g=a.enter("codeFenced");let v=f.move(h);if(e.lang){const p=a.enter(`codeFencedLang${d}`);v+=f.move(a.safe(e.lang,{before:v,after:" ",encode:["`"],...f.current()})),p()}if(e.lang&&e.meta){const p=a.enter(`codeFencedMeta${d}`);v+=f.move(" "),v+=f.move(a.safe(e.meta,{before:v,after:`
|
|
594
|
+
`,encode:["`"],...f.current()})),p()}return v+=f.move(`
|
|
595
|
+
`),c&&(v+=f.move(c+`
|
|
596
|
+
`)),v+=f.move(h),g(),v}function qL(e,n,a){return(a?"":" ")+e}function vg(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function FL(e,n,a,r){const o=vg(a),c=o==='"'?"Quote":"Apostrophe",d=a.enter("definition");let f=a.enter("label");const h=a.createTracker(r);let g=h.move("[");return g+=h.move(a.safe(a.associationId(e),{before:g,after:"]",...h.current()})),g+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),g+=h.move("<"),g+=h.move(a.safe(e.url,{before:g,after:">",...h.current()})),g+=h.move(">")):(f=a.enter("destinationRaw"),g+=h.move(a.safe(e.url,{before:g,after:e.title?" ":`
|
|
597
|
+
`,...h.current()}))),f(),e.title&&(f=a.enter(`title${c}`),g+=h.move(" "+o),g+=h.move(a.safe(e.title,{before:g,after:o,...h.current()})),g+=h.move(o),f()),d(),g}function UL(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Qc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function yf(e,n,a){const r=Ao(e),o=Ao(n);return r===void 0?o===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Lk.peek=$L;function Lk(e,n,a,r){const o=UL(a),c=a.enter("emphasis"),d=a.createTracker(r),f=d.move(o);let h=d.move(a.containerPhrasing(e,{after:o,before:f,...d.current()}));const g=h.charCodeAt(0),v=yf(r.before.charCodeAt(r.before.length-1),g,o);v.inside&&(h=Qc(g)+h.slice(1));const p=h.charCodeAt(h.length-1),j=yf(r.after.charCodeAt(0),p,o);j.inside&&(h=h.slice(0,-1)+Qc(p));const b=d.move(o);return c(),a.attentionEncodeSurroundingInfo={after:j.outside,before:v.outside},f+h+b}function $L(e,n,a){return a.options.emphasis||"*"}function VL(e,n){let a=!1;return pg(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,K0}),!!((!e.depth||e.depth<3)&&og(e)&&(n.options.setext||a))}function GL(e,n,a,r){const o=Math.max(Math.min(6,e.depth||1),1),c=a.createTracker(r);if(VL(e,a)){const v=a.enter("headingSetext"),p=a.enter("phrasing"),j=a.containerPhrasing(e,{...c.current(),before:`
|
|
598
|
+
`,after:`
|
|
599
|
+
`});return p(),v(),j+`
|
|
600
|
+
`+(o===1?"=":"-").repeat(j.length-(Math.max(j.lastIndexOf("\r"),j.lastIndexOf(`
|
|
601
|
+
`))+1))}const d="#".repeat(o),f=a.enter("headingAtx"),h=a.enter("phrasing");c.move(d+" ");let g=a.containerPhrasing(e,{before:"# ",after:`
|
|
602
|
+
`,...c.current()});return/^[\t ]/.test(g)&&(g=Qc(g.charCodeAt(0))+g.slice(1)),g=g?d+" "+g:d,a.options.closeAtx&&(g+=" "+d),h(),f(),g}Bk.peek=YL;function Bk(e){return e.value||""}function YL(){return"<"}Ik.peek=KL;function Ik(e,n,a,r){const o=vg(a),c=o==='"'?"Quote":"Apostrophe",d=a.enter("image");let f=a.enter("label");const h=a.createTracker(r);let g=h.move("![");return g+=h.move(a.safe(e.alt,{before:g,after:"]",...h.current()})),g+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),g+=h.move("<"),g+=h.move(a.safe(e.url,{before:g,after:">",...h.current()})),g+=h.move(">")):(f=a.enter("destinationRaw"),g+=h.move(a.safe(e.url,{before:g,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=a.enter(`title${c}`),g+=h.move(" "+o),g+=h.move(a.safe(e.title,{before:g,after:o,...h.current()})),g+=h.move(o),f()),g+=h.move(")"),d(),g}function KL(){return"!"}Pk.peek=XL;function Pk(e,n,a,r){const o=e.referenceType,c=a.enter("imageReference");let d=a.enter("label");const f=a.createTracker(r);let h=f.move("![");const g=a.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(g+"]["),d();const v=a.stack;a.stack=[],d=a.enter("reference");const p=a.safe(a.associationId(e),{before:h,after:"]",...f.current()});return d(),a.stack=v,c(),o==="full"||!g||g!==p?h+=f.move(p+"]"):o==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function XL(){return"!"}Hk.peek=QL;function Hk(e,n,a){let r=e.value||"",o="`",c=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++c<a.unsafe.length;){const d=a.unsafe[c],f=a.compilePattern(d);let h;if(d.atBreak)for(;h=f.exec(r);){let g=h.index;r.charCodeAt(g)===10&&r.charCodeAt(g-1)===13&&g--,r=r.slice(0,g)+" "+r.slice(h.index+1)}}return o+r+o}function QL(){return"`"}function qk(e,n){const a=og(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Fk.peek=ZL;function Fk(e,n,a,r){const o=vg(a),c=o==='"'?"Quote":"Apostrophe",d=a.createTracker(r);let f,h;if(qk(e,a)){const v=a.stack;a.stack=[],f=a.enter("autolink");let p=d.move("<");return p+=d.move(a.containerPhrasing(e,{before:p,after:">",...d.current()})),p+=d.move(">"),f(),a.stack=v,p}f=a.enter("link"),h=a.enter("label");let g=d.move("[");return g+=d.move(a.containerPhrasing(e,{before:g,after:"](",...d.current()})),g+=d.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=a.enter("destinationLiteral"),g+=d.move("<"),g+=d.move(a.safe(e.url,{before:g,after:">",...d.current()})),g+=d.move(">")):(h=a.enter("destinationRaw"),g+=d.move(a.safe(e.url,{before:g,after:e.title?" ":")",...d.current()}))),h(),e.title&&(h=a.enter(`title${c}`),g+=d.move(" "+o),g+=d.move(a.safe(e.title,{before:g,after:o,...d.current()})),g+=d.move(o),h()),g+=d.move(")"),f(),g}function ZL(e,n,a){return qk(e,a)?"<":"["}Uk.peek=JL;function Uk(e,n,a,r){const o=e.referenceType,c=a.enter("linkReference");let d=a.enter("label");const f=a.createTracker(r);let h=f.move("[");const g=a.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(g+"]["),d();const v=a.stack;a.stack=[],d=a.enter("reference");const p=a.safe(a.associationId(e),{before:h,after:"]",...f.current()});return d(),a.stack=v,c(),o==="full"||!g||g!==p?h+=f.move(p+"]"):o==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function JL(){return"["}function yg(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function WL(e){const n=yg(e),a=e.options.bulletOther;if(!a)return n==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+a+"`) to be different");return a}function eB(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function $k(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function tB(e,n,a,r){const o=a.enter("list"),c=a.bulletCurrent;let d=e.ordered?eB(a):yg(a);const f=e.ordered?d==="."?")":".":WL(a);let h=n&&a.bulletLastUsed?d===a.bulletLastUsed:!1;if(!e.ordered){const v=e.children?e.children[0]:void 0;if((d==="*"||d==="-")&&v&&(!v.children||!v.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(h=!0),$k(a)===d&&v){let p=-1;for(;++p<e.children.length;){const j=e.children[p];if(j&&j.type==="listItem"&&j.children&&j.children[0]&&j.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(d=f),a.bulletCurrent=d;const g=a.containerFlow(e,r);return a.bulletLastUsed=d,a.bulletCurrent=c,o(),g}function nB(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function iB(e,n,a,r){const o=nB(a);let c=a.bulletCurrent||yg(a);n&&n.type==="list"&&n.ordered&&(c=(typeof n.start=="number"&&n.start>-1?n.start:1)+(a.options.incrementListMarker===!1?0:n.children.indexOf(e))+c);let d=c.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(d=Math.ceil(d/4)*4);const f=a.createTracker(r);f.move(c+" ".repeat(d-c.length)),f.shift(d);const h=a.enter("listItem"),g=a.indentLines(a.containerFlow(e,f.current()),v);return h(),g;function v(p,j,b){return j?(b?"":" ".repeat(d))+p:(b?c:c+" ".repeat(d-c.length))+p}}function aB(e,n,a,r){const o=a.enter("paragraph"),c=a.enter("phrasing"),d=a.containerPhrasing(e,r);return c(),o(),d}const rB=Kf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function lB(e,n,a,r){return(e.children.some(function(d){return rB(d)})?a.containerPhrasing:a.containerFlow).call(a,e,r)}function sB(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Vk.peek=oB;function Vk(e,n,a,r){const o=sB(a),c=a.enter("strong"),d=a.createTracker(r),f=d.move(o+o);let h=d.move(a.containerPhrasing(e,{after:o,before:f,...d.current()}));const g=h.charCodeAt(0),v=yf(r.before.charCodeAt(r.before.length-1),g,o);v.inside&&(h=Qc(g)+h.slice(1));const p=h.charCodeAt(h.length-1),j=yf(r.after.charCodeAt(0),p,o);j.inside&&(h=h.slice(0,-1)+Qc(p));const b=d.move(o+o);return c(),a.attentionEncodeSurroundingInfo={after:j.outside,before:v.outside},f+h+b}function oB(e,n,a){return a.options.strong||"*"}function cB(e,n,a,r){return a.safe(e.value,r)}function uB(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function dB(e,n,a){const r=($k(a)+(a.options.ruleSpaces?" ":"")).repeat(uB(a));return a.options.ruleSpaces?r.slice(0,-1):r}const Gk={blockquote:OL,break:tj,code:HL,definition:FL,emphasis:Lk,hardBreak:tj,heading:GL,html:Bk,image:Ik,imageReference:Pk,inlineCode:Hk,link:Fk,linkReference:Uk,list:tB,listItem:iB,paragraph:aB,root:lB,strong:Vk,text:cB,thematicBreak:dB};function fB(){return{enter:{table:hB,tableData:nj,tableHeader:nj,tableRow:pB},exit:{codeText:gB,table:mB,tableData:Zp,tableHeader:Zp,tableRow:Zp}}}function hB(e){const n=e._align;this.enter({type:"table",align:n.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function mB(e){this.exit(e),this.data.inTable=void 0}function pB(e){this.enter({type:"tableRow",children:[]},e)}function Zp(e){this.exit(e)}function nj(e){this.enter({type:"tableCell",children:[]},e)}function gB(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,vB));const a=this.stack[this.stack.length-1];a.type,a.value=n,this.exit(e)}function vB(e,n){return n==="|"?n:e}function yB(e){const n=e||{},a=n.tableCellPadding,r=n.tablePipeAlign,o=n.stringLength,c=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
603
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:j,table:d,tableCell:h,tableRow:f}};function d(b,k,S,N){return g(v(b,S,N),b.align)}function f(b,k,S,N){const C=p(b,S,N),M=g([C]);return M.slice(0,M.indexOf(`
|
|
604
|
+
`))}function h(b,k,S,N){const C=S.enter("tableCell"),M=S.enter("phrasing"),E=S.containerPhrasing(b,{...N,before:c,after:c});return M(),C(),E}function g(b,k){return RL(b,{align:k,alignDelimiters:r,padding:a,stringLength:o})}function v(b,k,S){const N=b.children;let C=-1;const M=[],E=k.enter("table");for(;++C<N.length;)M[C]=p(N[C],k,S);return E(),M}function p(b,k,S){const N=b.children;let C=-1;const M=[],E=k.enter("tableRow");for(;++C<N.length;)M[C]=h(N[C],b,k,S);return E(),M}function j(b,k,S){let N=Gk.inlineCode(b,k,S);return S.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function xB(){return{exit:{taskListCheckValueChecked:ij,taskListCheckValueUnchecked:ij,paragraph:jB}}}function bB(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wB}}}function ij(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function jB(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const r=a.children[0];if(r&&r.type==="text"){const o=n.children;let c=-1,d;for(;++c<o.length;){const f=o[c];if(f.type==="paragraph"){d=f;break}}d===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function wB(e,n,a,r){const o=e.children[0],c=typeof e.checked=="boolean"&&o&&o.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",f=a.createTracker(r);c&&f.move(d);let h=Gk.listItem(e,n,a,{...r,...f.current()});return c&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,g)),h;function g(v){return v+d}}function kB(){return[tL(),wL(),NL(),fB(),xB()]}function SB(e){return{extensions:[nL(),kL(e),EL(),yB(e),bB()]}}const CB={tokenize:_B,partial:!0},Yk={tokenize:RB,partial:!0},Kk={tokenize:zB,partial:!0},Xk={tokenize:OB,partial:!0},NB={tokenize:DB,partial:!0},Qk={name:"wwwAutolink",tokenize:MB,previous:Jk},Zk={name:"protocolAutolink",tokenize:AB,previous:Wk},Yr={name:"emailAutolink",tokenize:TB,previous:eS},rr={};function EB(){return{text:rr}}let ps=48;for(;ps<123;)rr[ps]=Yr,ps++,ps===58?ps=65:ps===91&&(ps=97);rr[43]=Yr;rr[45]=Yr;rr[46]=Yr;rr[95]=Yr;rr[72]=[Yr,Zk];rr[104]=[Yr,Zk];rr[87]=[Yr,Qk];rr[119]=[Yr,Qk];function TB(e,n,a){const r=this;let o,c;return d;function d(p){return!J0(p)||!eS.call(r,r.previous)||xg(r.events)?a(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return J0(p)?(e.consume(p),f):p===64?(e.consume(p),h):a(p)}function h(p){return p===46?e.check(NB,v,g)(p):p===45||p===95||oi(p)?(c=!0,e.consume(p),h):v(p)}function g(p){return e.consume(p),o=!0,h}function v(p){return c&&o&&wi(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(p)):a(p)}}function MB(e,n,a){const r=this;return o;function o(d){return d!==87&&d!==119||!Jk.call(r,r.previous)||xg(r.events)?a(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(CB,e.attempt(Yk,e.attempt(Kk,c),a),a)(d))}function c(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(d)}}function AB(e,n,a){const r=this;let o="",c=!1;return d;function d(p){return(p===72||p===104)&&Wk.call(r,r.previous)&&!xg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),f):a(p)}function f(p){if(wi(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const j=o.toLowerCase();if(j==="http"||j==="https")return e.consume(p),h}return a(p)}function h(p){return p===47?(e.consume(p),c?g:(c=!0,h)):a(p)}function g(p){return p===null||pf(p)||Vt(p)||Ms(p)||Vf(p)?a(p):e.attempt(Yk,e.attempt(Kk,v),a)(p)}function v(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(p)}}function _B(e,n,a){let r=0;return o;function o(d){return(d===87||d===119)&&r<3?(r++,e.consume(d),o):d===46&&r===3?(e.consume(d),c):a(d)}function c(d){return d===null?a(d):n(d)}}function RB(e,n,a){let r,o,c;return d;function d(g){return g===46||g===95?e.check(Xk,h,f)(g):g===null||Vt(g)||Ms(g)||g!==45&&Vf(g)?h(g):(c=!0,e.consume(g),d)}function f(g){return g===95?r=!0:(o=r,r=void 0),e.consume(g),d}function h(g){return o||r||!c?a(g):n(g)}}function zB(e,n){let a=0,r=0;return o;function o(d){return d===40?(a++,e.consume(d),o):d===41&&r<a?c(d):d===33||d===34||d===38||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===60||d===63||d===93||d===95||d===126?e.check(Xk,n,c)(d):d===null||Vt(d)||Ms(d)?n(d):(e.consume(d),o)}function c(d){return d===41&&r++,e.consume(d),o}}function OB(e,n,a){return r;function r(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),r):f===38?(e.consume(f),c):f===93?(e.consume(f),o):f===60||f===null||Vt(f)||Ms(f)?n(f):a(f)}function o(f){return f===null||f===40||f===91||Vt(f)||Ms(f)?n(f):r(f)}function c(f){return wi(f)?d(f):a(f)}function d(f){return f===59?(e.consume(f),r):wi(f)?(e.consume(f),d):a(f)}}function DB(e,n,a){return r;function r(c){return e.consume(c),o}function o(c){return oi(c)?a(c):n(c)}}function Jk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Vt(e)}function Wk(e){return!wi(e)}function eS(e){return!(e===47||J0(e))}function J0(e){return e===43||e===45||e===46||e===95||oi(e)}function xg(e){let n=e.length,a=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const LB={tokenize:$B,partial:!0};function BB(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:qB,continuation:{tokenize:FB},exit:UB}},text:{91:{name:"gfmFootnoteCall",tokenize:HB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:IB,resolveTo:PB}}}}function IB(e,n,a){const r=this;let o=r.events.length;const c=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let d;for(;o--;){const h=r.events[o][1];if(h.type==="labelImage"){d=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!d||!d._balanced)return a(h);const g=Sa(r.sliceSerialize({start:d.end,end:r.now()}));return g.codePointAt(0)!==94||!c.includes(g.slice(1))?a(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),n(h))}}function PB(e,n){let a=e.length;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const c={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},f=[e[a+1],e[a+2],["enter",r,n],e[a+3],e[a+4],["enter",o,n],["exit",o,n],["enter",c,n],["enter",d,n],["exit",d,n],["exit",c,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(a,e.length-a+1,...f),e}function HB(e,n,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c=0,d;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),h}function h(p){return p!==94?a(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",g)}function g(p){if(c>999||p===93&&!d||p===null||p===91||Vt(p))return a(p);if(p===93){e.exit("chunkString");const j=e.exit("gfmFootnoteCallString");return o.includes(Sa(r.sliceSerialize(j)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):a(p)}return Vt(p)||(d=!0),c++,e.consume(p),p===92?v:g}function v(p){return p===91||p===92||p===93?(e.consume(p),c++,g):g(p)}}function qB(e,n,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c,d=0,f;return h;function h(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),g}function g(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",v):a(k)}function v(k){if(d>999||k===93&&!f||k===null||k===91||Vt(k))return a(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return c=Sa(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),j}return Vt(k)||(f=!0),d++,e.consume(k),k===92?p:v}function p(k){return k===91||k===92||k===93?(e.consume(k),d++,v):v(k)}function j(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(c)||o.push(c),Mt(e,b,"gfmFootnoteDefinitionWhitespace")):a(k)}function b(k){return n(k)}}function FB(e,n,a){return e.check(lu,n,e.attempt(LB,n,a))}function UB(e){e.exit("gfmFootnoteDefinition")}function $B(e,n,a){const r=this;return Mt(e,o,"gfmFootnoteDefinitionIndent",5);function o(c){const d=r.events[r.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?n(c):a(c)}}function VB(e){let a=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:c,resolveAll:o};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(d,f){let h=-1;for(;++h<d.length;)if(d[h][0]==="enter"&&d[h][1].type==="strikethroughSequenceTemporary"&&d[h][1]._close){let g=h;for(;g--;)if(d[g][0]==="exit"&&d[g][1].type==="strikethroughSequenceTemporary"&&d[g][1]._open&&d[h][1].end.offset-d[h][1].start.offset===d[g][1].end.offset-d[g][1].start.offset){d[h][1].type="strikethroughSequence",d[g][1].type="strikethroughSequence";const v={type:"strikethrough",start:Object.assign({},d[g][1].start),end:Object.assign({},d[h][1].end)},p={type:"strikethroughText",start:Object.assign({},d[g][1].end),end:Object.assign({},d[h][1].start)},j=[["enter",v,f],["enter",d[g][1],f],["exit",d[g][1],f],["enter",p,f]],b=f.parser.constructs.insideSpan.null;b&&Zi(j,j.length,0,Gf(b,d.slice(g+1,h),f)),Zi(j,j.length,0,[["exit",p,f],["enter",d[h][1],f],["exit",d[h][1],f],["exit",v,f]]),Zi(d,g-1,h-g+3,j),h=g+j.length-2;break}}for(h=-1;++h<d.length;)d[h][1].type==="strikethroughSequenceTemporary"&&(d[h][1].type="data");return d}function c(d,f,h){const g=this.previous,v=this.events;let p=0;return j;function j(k){return g===126&&v[v.length-1][1].type!=="characterEscape"?h(k):(d.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const S=Ao(g);if(k===126)return p>1?h(k):(d.consume(k),p++,b);if(p<2&&!a)return h(k);const N=d.exit("strikethroughSequenceTemporary"),C=Ao(k);return N._open=!C||C===2&&!!S,N._close=!S||S===2&&!!C,f(k)}}}class GB{constructor(){this.map=[],this.index=new Map}add(n,a,r){YB(this,n,a,r)}consume(n){if(this.map.sort(function(c,d){return c[0]-d[0]}),this.map.length===0)return;let a=this.map.length;const r=[];for(;a>0;)a-=1,r.push(n.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),n.length=this.map[a][0];r.push(n.slice()),n.length=0;let o=r.pop();for(;o;){for(const c of o)n.push(c);o=r.pop()}this.map.length=0,this.index.clear()}}function YB(e,n,a,r){if(a===0&&r.length===0)return;const o=e.index.get(n);if(o){o[1]+=a,o[2].push(...r);return}const c=[n,a,r];e.map.push(c),e.index.set(n,c)}function KB(e,n){let a=!1;const r=[];for(;n<e.length;){const o=e[n];if(a){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const c=r.length-1;r[c]=r[c]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(a=!0);n+=1}return r}function XB(){return{flow:{null:{name:"table",tokenize:QB,resolveAll:ZB}}}}function QB(e,n,a){const r=this;let o=0,c=0,d;return f;function f(O){let I=r.events.length-1;for(;I>-1;){const{type:Y}=r.events[I][1];if(Y==="lineEnding"||Y==="linePrefix")I--;else break}const $=I>-1?r.events[I][1].type:null,Q=$==="tableHead"||$==="tableRow"?_:h;return Q===_&&r.parser.lazy[r.now().line]?a(O):Q(O)}function h(O){return e.enter("tableHead"),e.enter("tableRow"),g(O)}function g(O){return O===124||(d=!0,c+=1),v(O)}function v(O){return O===null?a(O):Qe(O)?c>1?(c=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),b):a(O):wt(O)?Mt(e,v,"whitespace")(O):(c+=1,d&&(d=!1,o+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),d=!0,v):(e.enter("data"),p(O)))}function p(O){return O===null||O===124||Vt(O)?(e.exit("data"),v(O)):(e.consume(O),O===92?j:p)}function j(O){return O===92||O===124?(e.consume(O),p):p(O)}function b(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(O):(e.enter("tableDelimiterRow"),d=!1,wt(O)?Mt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):k(O))}function k(O){return O===45||O===58?N(O):O===124?(d=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),S):R(O)}function S(O){return wt(O)?Mt(e,N,"whitespace")(O):N(O)}function N(O){return O===58?(c+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),C):O===45?(c+=1,C(O)):O===null||Qe(O)?T(O):R(O)}function C(O){return O===45?(e.enter("tableDelimiterFiller"),M(O)):R(O)}function M(O){return O===45?(e.consume(O),M):O===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(O))}function E(O){return wt(O)?Mt(e,T,"whitespace")(O):T(O)}function T(O){return O===124?k(O):O===null||Qe(O)?!d||o!==c?R(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(O)):R(O)}function R(O){return a(O)}function _(O){return e.enter("tableRow"),z(O)}function z(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),z):O===null||Qe(O)?(e.exit("tableRow"),n(O)):wt(O)?Mt(e,z,"whitespace")(O):(e.enter("data"),P(O))}function P(O){return O===null||O===124||Vt(O)?(e.exit("data"),z(O)):(e.consume(O),O===92?H:P)}function H(O){return O===92||O===124?(e.consume(O),P):P(O)}}function ZB(e,n){let a=-1,r=!0,o=0,c=[0,0,0,0],d=[0,0,0,0],f=!1,h=0,g,v,p;const j=new GB;for(;++a<e.length;){const b=e[a],k=b[1];b[0]==="enter"?k.type==="tableHead"?(f=!1,h!==0&&(aj(j,n,h,g,v),v=void 0,h=0),g={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},j.add(a,0,[["enter",g,n]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,p=void 0,c=[0,0,0,0],d=[0,a+1,0,0],f&&(f=!1,v={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},j.add(a,0,[["enter",v,n]])),o=k.type==="tableDelimiterRow"?2:v?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,d[2]===0&&(c[1]!==0&&(d[0]=d[1],p=Id(j,n,c,o,void 0,p),c=[0,0,0,0]),d[2]=a)):k.type==="tableCellDivider"&&(r?r=!1:(c[1]!==0&&(d[0]=d[1],p=Id(j,n,c,o,void 0,p)),c=d,d=[c[1],a,0,0])):k.type==="tableHead"?(f=!0,h=a):k.type==="tableRow"||k.type==="tableDelimiterRow"?(h=a,c[1]!==0?(d[0]=d[1],p=Id(j,n,c,o,a,p)):d[1]!==0&&(p=Id(j,n,d,o,a,p)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(d[3]=a)}for(h!==0&&aj(j,n,h,g,v),j.consume(n.events),a=-1;++a<n.events.length;){const b=n.events[a];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=KB(n.events,a))}return e}function Id(e,n,a,r,o,c){const d=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",f="tableContent";a[0]!==0&&(c.end=Object.assign({},Co(n.events,a[0])),e.add(a[0],0,[["exit",c,n]]));const h=Co(n.events,a[1]);if(c={type:d,start:Object.assign({},h),end:Object.assign({},h)},e.add(a[1],0,[["enter",c,n]]),a[2]!==0){const g=Co(n.events,a[2]),v=Co(n.events,a[3]),p={type:f,start:Object.assign({},g),end:Object.assign({},v)};if(e.add(a[2],0,[["enter",p,n]]),r!==2){const j=n.events[a[2]],b=n.events[a[3]];if(j[1].end=Object.assign({},b[1].end),j[1].type="chunkText",j[1].contentType="text",a[3]>a[2]+1){const k=a[2]+1,S=a[3]-a[2]-1;e.add(k,S,[])}}e.add(a[3]+1,0,[["exit",p,n]])}return o!==void 0&&(c.end=Object.assign({},Co(n.events,o)),e.add(o,0,[["exit",c,n]]),c=void 0),c}function aj(e,n,a,r,o){const c=[],d=Co(n.events,a);o&&(o.end=Object.assign({},d),c.push(["exit",o,n])),r.end=Object.assign({},d),c.push(["exit",r,n]),e.add(a+1,0,c)}function Co(e,n){const a=e[n],r=a[0]==="enter"?"start":"end";return a[1][r]}const JB={name:"tasklistCheck",tokenize:eI};function WB(){return{text:{91:JB}}}function eI(e,n,a){const r=this;return o;function o(h){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),c)}function c(h){return Vt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),d):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),d):a(h)}function d(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):a(h)}function f(h){return Qe(h)?n(h):wt(h)?e.check({tokenize:tI},n,a)(h):a(h)}}function tI(e,n,a){return Mt(e,r,"whitespace");function r(o){return o===null?a(o):n(o)}}function nI(e){return lk([EB(),BB(),VB(e),XB(),WB()])}const iI={};function aI(e){const n=this,a=e||iI,r=n.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),c=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),d=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(nI(a)),c.push(kB()),d.push(SB(a))}function xf(e){document.documentElement.dataset.theme=e,document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e,localStorage.setItem("jarvy-theme",e)}const rI={add:Br,"chat-bubble":j1,window:p9,close:zo,"chevron-left":p1,"chevron-right":As,"chevron-down":Al,gear:aN,"person-add":hN,"arrow-bracket-to-left":V9,"arrow-up":y9,copy:Wc,check:Li,"cloud-download":g1,bell:b9,"bell-slash":x9,image:F9,paperclip:Ef,"smiley-plus":M9,info:x1,people:mN,pencil:eN,file:O9,"file-video":R9,"file-audio":_9,folder:B9,"layout-sidebar-left":J9,sun:uN,moon:Z9,"arrows-expand":T9,"arrows-contract":sN,"arrow-u-up-right":iN,"list-bullets":$9,eye:y1,"eye-slash":v1,pin:j0,megaphone:G9,trash:of,search:_s,quote:nN,fold:L9,unfold:fN,more:x0};function Pe({name:e}){const n=rI[e]??x1;return l.jsx(n,{className:"ui-icon","aria-hidden":"true",focusable:"false"})}function vt({icon:e,label:n,className:a="",...r}){return l.jsx("button",{type:"button",className:`ui-iconbtn ${a}`,"aria-label":n,title:n,...r,children:l.jsx(Pe,{name:e})})}function _o({title:e,onClose:n,children:a,className:r=""}){const o=w.useRef(null),c=w.useId();return w.useEffect(()=>{const d=o.current,f=document.activeElement;return d.showModal(),()=>{d.close(),f==null||f.focus({preventScroll:!0})}},[]),Ol.createPortal(l.jsxs("dialog",{ref:o,className:`ui-small-dialog ${r}`,"aria-labelledby":c,onCancel:d=>{d.preventDefault(),n()},children:[l.jsx(vt,{icon:"close",label:y("ui.closeNamed",{name:e}),className:"ui-dialog-close",onClick:n}),l.jsxs("div",{className:"ui-dialog-body",children:[l.jsx("h1",{id:c,children:e}),a]})]}),document.body)}async function Ho(e){if(window.isSecureContext&&navigator.clipboard)try{return await navigator.clipboard.writeText(e),!0}catch{}const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.opacity="0",document.body.append(n),n.select();try{return document.execCommand("copy")}finally{n.remove()}}function lI({children:e}){const n=w.useRef(null),[a,r]=w.useState("idle");w.useEffect(()=>{if(a==="idle")return;const c=setTimeout(()=>r("idle"),1500);return()=>clearTimeout(c)},[a]);const o=async()=>{var c;return r(await Ho((((c=n.current)==null?void 0:c.textContent)??"").replace(/\n$/,""))?"copied":"failed")};return l.jsxs("figure",{className:"ui-code-figure",children:[l.jsx("pre",{ref:n,children:e}),l.jsx(vt,{icon:a==="copied"?"check":"copy",label:y(a==="copied"?"ui.copied":a==="failed"?"ui.copyFailed":"ui.copyCode"),onClick:()=>void o()})]})}const sI=[aI,ZD,eL,GD],tS=w.createContext({});function oI({href:e,children:n}){var r;const a=w.useContext(tS);return e==="#mention"||e==="#mention-me"?l.jsx("span",{className:"jv-mention","data-me":e==="#mention-me"||void 0,children:n}):a.quote&&(e!=null&&e.startsWith("#quote-"))?a.quote(Number(e.slice(7))):e!=null&&e.startsWith("#ref-")?((r=a.ref)==null?void 0:r.call(a,e.slice(5)))??l.jsx(l.Fragment,{children:n}):l.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const cI={a:oI,img:({alt:e})=>l.jsx("span",{children:y("ui.image",{alt:e||y("ui.imageHidden")})}),pre:({children:e})=>l.jsx(lI,{children:e})},qo=w.memo(function({text:n,renderQuote:a,renderRef:r}){return y4(),l.jsx(tS.Provider,{value:{quote:a,ref:r},children:l.jsx(DD,{remarkPlugins:sI,skipHtml:!0,components:cI,children:n})})}),Rr=(e,n)=>{var a;return((a=e.people.find(r=>r.id===n))==null?void 0:a.name)??y("inputs.someone")},Ss=(e,n)=>{var a;return((a=e.chats.find(r=>r.id===n))==null?void 0:a.title)??y("inputs.aChat")},rj={name:"inputs.what.name",description:"inputs.what.description",persona:"inputs.what.persona",model:"inputs.what.model",thinking:"inputs.what.thinking",run:"inputs.what.run",environment:"inputs.what.environment",access:"inputs.what.access"},nS=e=>rj[e]?y(rj[e]):e;function rf(e,n){switch(e.kind){case"message":return y("inputs.message",{person:Rr(n,e.from),chat:Ss(n,e.chat),text:e.text||y("activity.attachments",{count:e.files.length})});case"task":return y("inputs.task",{name:e.name,text:e.text});case"reaction":return y("inputs.reaction",{person:Rr(n,e.by),emoji:e.emoji,text:e.text});case"update":return y(e.what==="summary"?"inputs.summary":"inputs.notice",{person:Rr(n,e.by),chat:Ss(n,e.chat),version:e.version});case"change":return y("inputs.change",{person:Rr(n,e.by),what:nS(e.what)});case"onboard":return y("inputs.onboard",{person:Rr(n,e.by)});case"followed":return y("inputs.followed",{count:e.total});case"instructions":return y("inputs.instructions",{parts:e.parts.join(", ")});case"other":return e.text}}function uI(e){return rf(e.first,{chats:e.chat?[e.chat]:[],people:e.person?[e.person]:[]}).replace(/\s+/g," ").trim()}function Pd({at:e}){return e===void 0?null:l.jsx("time",{dateTime:new Date(e).toISOString(),children:tg(e)})}function dI({item:e,names:n}){return e.kind==="message"?l.jsxs("section",{className:"jv-input-item","data-kind":e.kind,children:[l.jsxs("h4",{children:[l.jsx("strong",{children:Rr(n,e.from)}),l.jsx("span",{children:Ss(n,e.chat)}),l.jsx(Pd,{at:e.at})]}),e.replyTo&&l.jsxs("blockquote",{className:"jv-input-quote",children:[l.jsx("span",{children:y("inputs.replyTo",{person:Rr(n,e.replyTo.from)})}),e.replyTo.text]}),e.text&&l.jsx("div",{className:"jv-input-body",children:l.jsx(qo,{text:e.text})}),e.files.length>0&&l.jsx("ul",{className:"jv-input-files",children:e.files.map((a,r)=>l.jsxs("li",{children:[l.jsx(Ef,{}),a.name,a.size&&l.jsx("small",{children:a.size})]},r))})]}):e.kind==="task"?l.jsxs("section",{className:"jv-input-item","data-kind":e.kind,children:[l.jsxs("h4",{children:[l.jsx("strong",{children:y("inputs.taskTitle",{name:e.name})}),l.jsx("span",{children:e.schedule}),e.due!==void 0&&l.jsx("span",{children:y("inputs.due",{time:tg(e.due)})})]}),l.jsx("p",{className:"jv-input-text",children:e.text})]}):e.kind==="reaction"?l.jsxs("section",{className:"jv-input-item","data-kind":e.kind,children:[l.jsxs("h4",{children:[l.jsx("strong",{children:y("inputs.reacted",{person:Rr(n,e.by),emoji:e.emoji})}),l.jsx("span",{children:Ss(n,e.chat)}),l.jsx(Pd,{at:e.at})]}),l.jsx("blockquote",{className:"jv-input-quote",children:e.text})]}):e.kind==="change"?l.jsxs("section",{className:"jv-input-item","data-kind":e.kind,children:[l.jsxs("h4",{children:[l.jsx("strong",{children:y("inputs.change",{person:Rr(n,e.by),what:nS(e.what)})}),l.jsx(Pd,{at:e.at})]}),e.value!==null&&l.jsx("p",{className:"jv-input-text",children:e.value})]}):e.kind==="followed"?l.jsxs("section",{className:"jv-input-item","data-kind":e.kind,children:[l.jsx("h4",{children:l.jsx("strong",{children:rf(e,n)})}),l.jsx("ul",{className:"jv-input-threads",children:e.threads.map(a=>l.jsxs("li",{children:[l.jsx("span",{children:Ss(n,a.chat)}),a.unread>0&&l.jsx("small",{children:y("inputs.unreadThreads",{count:a.unread})})]},a.chat))})]}):e.kind==="instructions"||e.kind==="other"?l.jsxs("section",{className:"jv-input-item","data-kind":e.kind,children:[l.jsx("h4",{children:l.jsx("strong",{children:e.kind==="other"?`<${e.name}>`:rf(e,n)})}),l.jsx("pre",{className:"jv-input-code",children:e.text})]}):l.jsx("section",{className:"jv-input-item","data-kind":e.kind,children:l.jsxs("h4",{children:[l.jsx("strong",{children:rf(e,n)}),l.jsx(Pd,{at:e.at})]})})}function fI({input:e}){const{unread:n,unreadNotes:a,place:r}=e;return l.jsxs("div",{className:"jv-input",children:[e.items.map((o,c)=>l.jsx(dI,{item:o,names:e},c)),(n||a||r)&&l.jsxs("footer",{className:"jv-input-tail",children:[n&&l.jsx("p",{children:y("inputs.unread",{count:n.total,list:n.chats.map(o=>`${o.title??Ss(e,o.id)} ${o.count}`).join(" · ")})}),a&&l.jsx("p",{children:y("inputs.unreadNotes",{list:a.map(o=>y("inputs.version",{title:o.title??Ss(e,o.id),version:o.version})).join(" · ")})}),r&&l.jsx("p",{children:y("inputs.place",{name:r.kind==="sandbox"?y("inputs.sandbox"):r.name,directory:r.directory})}),(r==null?void 0:r.unavailable)&&l.jsx("p",{className:"jv-input-problem",children:y("inputs.unavailable")})]})]})}const bg=e=>Si(e,{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function bs({value:e}){return l.jsx("pre",{className:"jv-history-json",children:JSON.stringify(e,null,2)})}function iS({blocks:e,links:n,onSelect:a}){return l.jsx(l.Fragment,{children:e.map((r,o)=>{if(r.type==="text"||r.type==="reasoning")return l.jsxs("section",{className:"jv-history-block",children:[l.jsx("h4",{children:y(r.type==="reasoning"?"history.reasoning":"history.text")}),l.jsx(hI,{text:r.text})]},o);if(r.type==="image")return l.jsxs("section",{className:"jv-history-block",children:[l.jsxs("h4",{children:[y("files.kindImage")," · ",r.mime_type]}),l.jsx("img",{className:"jv-history-image",src:`data:${r.mime_type};base64,${r.data}`,alt:y("history.image")})]},o);if(r.type==="tool_call"||r.type==="tool_result"){const c=n.filter(d=>d.tool_call_id===r.tool_call_id);return l.jsxs("section",{className:"jv-history-block",children:[l.jsxs("h4",{children:[y(r.type==="tool_call"?"history.toolCall":"history.toolResult")," · ",l.jsx("strong",{children:r.name}),r.type==="tool_result"&&r.is_error&&l.jsx("span",{className:"jv-history-error-tag",children:y("history.error")})]}),l.jsxs("div",{className:"jv-history-call",children:[l.jsx("code",{children:r.tool_call_id}),c.map(d=>l.jsxs("button",{type:"button",onClick:()=>a(d.id),"aria-label":y("history.related",{id:d.id}),children:[y(d.role==="tool"?"history.result":"history.call")," #",d.id]},d.id))]}),r.type==="tool_call"?l.jsx(bs,{value:r.arguments}):l.jsxs(l.Fragment,{children:[l.jsx(iS,{blocks:r.result.content,links:[],onSelect:a}),r.result.details!==void 0&&l.jsxs("details",{children:[l.jsx("summary",{children:y("history.details")}),l.jsx(bs,{value:r.result.details})]})]})]},o)}})})}function hI({text:e}){const n=g_(e);return n?l.jsx("div",{className:"jv-history-text jv-history-markup",children:n.map((a,r)=>l.jsx("div",{style:{paddingLeft:`${a.depth*2}ch`},children:a.text||" "},r))}):l.jsx("pre",{className:"jv-history-text",children:e||y("history.empty")})}const mI={content:"history.content",raw:"inputs.raw",json:"history.json"};function pI({detail:e,onSelect:n}){const[a,r]=w.useState("content"),{record:o,links:c,input:d}=e,f=d?["content","raw","json"]:["content","json"];return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"jv-history-detail-head",children:[l.jsxs("div",{children:[l.jsxs("h3",{children:["#",o.id," ",l.jsx("span",{children:o.role})]}),l.jsx("p",{children:bg(o.timestamp)})]}),l.jsx("div",{role:"tablist","aria-label":y("history.view"),children:f.map(h=>l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":a===h,onClick:()=>r(h),children:y(mI[h])},h))})]}),l.jsx("div",{className:"jv-history-detail-scroll",role:"tabpanel","aria-label":y(a==="json"?"history.json":a==="raw"?"inputs.raw":"history.contentLabel"),children:a==="json"?l.jsx(bs,{value:o}):d&&a==="content"?l.jsx(fI,{input:d}):l.jsxs(l.Fragment,{children:[o.model&&l.jsxs("div",{className:"jv-history-model",children:[l.jsx("span",{children:y("usage.model")}),l.jsx("strong",{children:o.model.id}),l.jsx("small",{children:o.model.provider})]}),l.jsx(iS,{blocks:o.message.content,links:c,onSelect:n}),o.message.tools&&l.jsxs("details",{className:"jv-history-fold",children:[l.jsxs("summary",{children:[y("history.tools")," · ",o.message.tools.length]}),l.jsx(bs,{value:o.message.tools})]}),o.message.tools_removed!==void 0&&l.jsxs("details",{className:"jv-history-fold",children:[l.jsx("summary",{children:y("history.toolsRemoved")}),l.jsx(bs,{value:o.message.tools_removed})]}),o.message.stop_reason&&l.jsxs("p",{className:"jv-history-note",children:[y("history.stopReason")," · ",o.message.stop_reason]}),o.message.error&&l.jsx("pre",{className:"jv-history-failure",children:o.message.error}),l.jsxs("details",{className:"jv-history-fold",children:[l.jsx("summary",{children:"Usage"}),l.jsx(bs,{value:o.usage})]}),l.jsxs("details",{className:"jv-history-fold",children:[l.jsx("summary",{children:"Extra"}),l.jsx(bs,{value:o.extra})]})]})})]})}const lj={system:"activity.roleSystem",user:"activity.roleUser",assistant:"activity.roleAssistant",tool:"history.toolResult"},gI=new Set(["user","system"]),sj=e=>Si(e,{year:"numeric",month:"long",day:"numeric"}),vI=e=>[e.preview,...e.tools.map(n=>y(n.kind==="call"?"activity.toolCall":n.error?"activity.toolFailed":"activity.toolResult",{name:n.name})),e.images?y("activity.images",{count:e.images}):""].filter(Boolean).join(" "),yI=e=>Si(e,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function xI({items:e,onSelect:n}){return l.jsx("ol",{className:"jv-activity-timeline","aria-label":y("activity.timeline"),children:e.map((a,r)=>{const{record:o}=a,c=sj(o.timestamp);return l.jsxs(w.Fragment,{children:[(r===0||sj(e[r-1].record.timestamp)!==c)&&l.jsx("li",{className:"jv-activity-day",children:l.jsx("span",{children:c})}),l.jsxs("li",{className:`jv-activity-row is-${a.kind}`,"data-kind":a.kind,children:[l.jsxs("div",{className:"jv-activity-time",children:[l.jsx("time",{dateTime:new Date(o.timestamp).toISOString(),title:`${bg(o.timestamp)}.${String(o.timestamp%1e3).padStart(3,"0")}`,children:yI(o.timestamp)}),l.jsx("span",{className:"jv-activity-dot"})]}),a.kind==="chat"?l.jsxs("article",{className:"jv-activity-card jv-activity-chat","aria-label":y("activity.chatMessage",{id:a.record.id}),children:[l.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>n({kind:"chat",id:a.record.id}),"aria-label":y("activity.viewMessage",{sequence:a.record.sequence,chat:a.record.chatTitle}),children:[l.jsxs("span",{className:"jv-activity-card-head",children:[l.jsx(K9,{}),l.jsx("strong",{title:a.record.chatTitle,children:a.record.chatTitle}),l.jsxs("span",{children:["#",a.record.sequence]})]}),l.jsx("span",{className:"jv-activity-preview",children:a.record.preview||y("activity.attachmentOnly")}),a.record.attachmentCount>0&&l.jsxs("span",{className:"jv-activity-attachment",children:[l.jsx(Ef,{}),y("activity.attachments",{count:a.record.attachmentCount})]})]}),a.record.source&&l.jsxs("button",{type:"button",className:"jv-activity-source",onClick:()=>n({kind:"history",id:a.record.source.historyId}),"aria-label":y("activity.viewSentBy",{id:a.record.source.historyId}),children:[y("activity.sentBy",{id:a.record.source.historyId}),l.jsx(Fc,{})]})]}):l.jsx("article",{className:"jv-activity-card jv-activity-history","data-input":gI.has(a.record.role)||void 0,"aria-label":y("activity.historyRecord",{id:a.record.id}),children:l.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>n({kind:"history",id:a.record.id}),"aria-label":y("activity.viewHistory",{id:a.record.id,role:a.record.role}),children:[l.jsxs("span",{className:"jv-activity-card-head",children:[l.jsx("strong",{children:lj[a.record.role]?y(lj[a.record.role]):a.record.role}),a.record.input&&a.record.input.count>1&&l.jsx("em",{className:"jv-activity-more",children:y("inputs.more",{count:a.record.input.count})}),l.jsxs("span",{children:["#",a.record.id]})]}),l.jsx("span",{className:"jv-activity-preview",children:(a.record.input?uI(a.record.input):vI(a.record))||y("activity.emptyMessage")})]})})]})]},`${a.kind}:${o.id}`)})})}const bI={read:(e,n)=>Se(`/bots/${e}/history/${n}`)},oj={agent_undeletable:"error.agentUndeletable",autoconfig_model:"error.autoconfigModel",autoconfig_source:"error.autoconfigSource",bot_missing:"error.botMissing",chat_access_changed:"error.chatAccessChanged",computer_failed:"error.computerFailed",computer_missing:"error.computerMissing",docker_unavailable:"error.dockerUnavailable",file_too_large:"error.fileTooLarge",connection_in_use:"error.connectionInUse",connection_missing:"error.connectionMissing",credential_changed:"error.credentialChanged",credential_unreadable:"error.credentialUnreadable",credential_scope:"error.credentialScope",credentials_missing:"error.credentialsMissing",data_locked:"error.dataLocked",discovery_format:"error.discoveryFormat",discovery_http:"error.discoveryHttp",discovery_key:"error.discoveryKey",discovery_protocol:"error.discoveryProtocol",discovery_url:"error.discoveryUrl",discovery_url_missing:"error.discoveryUrlMissing",discovery_unreachable:"error.discoveryUnreachable",machine_missing:"error.machineMissing",machine_name_taken:"error.machineNameTaken",ssh_auth_failed:"error.sshAuthFailed",ssh_bad_directory:"error.sshBadDirectory",ssh_bad_host:"error.sshBadHost",ssh_bad_port:"error.sshBadPort",ssh_bad_user:"error.sshBadUser",ssh_failed:"error.sshFailed",ssh_host_key_changed:"error.sshHostKeyChanged",ssh_key_unreadable:"error.sshKeyUnreadable",ssh_password_missing:"error.sshPasswordMissing",ssh_unreachable:"error.sshUnreachable",ssh_unsupported:"error.sshUnsupported",ssh_password_refused:"error.sshPasswordRefused",ssh_key_refused:"error.sshKeyRefused",ssh_key_expired:"error.sshKeyExpired",history_missing:"error.historyMissing",invalid_credential:"error.invalidCredential",invalid_run:"error.invalidRun",limits_invalid:"error.limitsInvalid",login_input:"error.loginInput",login_option:"error.loginOption",login_step:"error.loginStep",message_missing:"error.messageMissing",model_incomplete:"error.modelIncomplete",model_missing:"error.modelMissing",model_request_failed:"error.modelRequestFailed",model_required:"error.modelRequired",model_switch_uncertain:"error.modelSwitchUncertain",name_taken:"error.nameTaken",provider_name_taken:"error.providerNameTaken",reset_custom:"error.resetCustom",port_invalid:"error.portInvalid",port_missing:"error.portMissing",port_range_invalid:"error.portRangeInvalid",port_range_own:"error.portRangeOwn",ports_exhausted:"error.portsExhausted",question_closed:"error.questionClosed",question_expired:"error.questionExpired",secret_description_invalid:"error.secretDescriptionInvalid",secret_missing:"error.secretMissing",secret_name_invalid:"error.secretNameInvalid",secret_name_taken:"error.secretNameTaken",secret_value_missing:"error.secretValueMissing",secret_value_too_long:"error.secretValueTooLong",runtime_failed:"error.runtimeFailed",session_corrupt:"error.sessionCorrupt",session_mismatch:"error.sessionMismatch",session_missing:"error.sessionMissing",session_path:"error.sessionPath",stopping:"error.stopping",task_invalid:"error.taskInvalid",task_schedule_invalid:"error.taskScheduleInvalid",task_time_past:"error.taskTimePast",thinking_format:"error.thinkingFormat",tools_missing:"error.toolsMissing",unsafe_replay:"error.unsafeReplay",type_invalid:"error.typeInvalid",vm_size_invalid:"error.vmSizeInvalid",vm_unavailable:"error.vmUnavailable"},aS=(e,n)=>{const a=e&&Object.hasOwn(oj,e)?oj[e]:void 0;return a?y(a,n):null};function un(e,n="common.failed"){return e instanceof Wa?aS(e.code,e.params)??(e.status<500?e.message:y(n)):e instanceof Error&&e.message?e.message:y(n)}const rS=e=>aS(e.errorCode,e.errorParams)??e.error??"";function jI({botId:e,selected:n,onSelect:a,onOpenChat:r}){const[o,c]=w.useState(null),[d,f]=w.useState(!0),[h,g]=w.useState(""),[v,p]=w.useState(0);if(w.useEffect(()=>{let k=!0;return f(!0),g(""),c(null),(n.kind==="history"?bI.read(e,n.id).then(N=>({kind:"history",data:N})):s3.message(e,n.id).then(N=>({kind:"chat",data:N}))).then(N=>{k&&c(N)}).catch(N=>{k&&g(un(N,"activity.detailFailed"))}).finally(()=>{k&&f(!1)}),()=>{k=!1}},[e,n.kind,n.id,v]),d)return l.jsx("p",{className:"jv-activity-state",role:"status",children:y("activity.detailLoading")});if(h)return l.jsxs("div",{className:"jv-activity-state",children:[l.jsx("p",{role:"alert",children:h}),l.jsx(Ee,{variant:"outline",size:"sm",onClick:()=>p(k=>k+1),children:y("common.retry")})]});if(!o)return null;if(o.kind==="history")return l.jsx(pI,{detail:o.data,onSelect:k=>a({kind:"history",id:k})},o.data.record.id);const{chat:j,message:b}=o.data;return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"jv-activity-message-head",children:[l.jsxs("div",{children:[l.jsx("h3",{children:j.title}),l.jsx("p",{children:bg(b.createdAt)})]}),l.jsxs(Ee,{variant:"ghost",size:"sm",onClick:()=>r(j.id),children:[y("activity.openChat"),l.jsx(Fc,{})]})]}),l.jsxs("div",{className:"jv-activity-message-body",children:[b.content&&l.jsx(qo,{text:b.content}),b.attachments.length>0&&l.jsx("div",{className:"jv-activity-message-files",children:b.attachments.map(k=>l.jsxs("a",{href:`/api/attachments/${k.id}`,download:k.name,children:[l.jsx(Ef,{}),k.name]},k.id))}),b.source&&l.jsxs(Ee,{className:"jv-activity-message-source",variant:"outline",size:"sm",onClick:()=>a({kind:"history",id:b.source.historyId}),children:[y("activity.sentBy",{id:b.source.historyId}),l.jsx(Fc,{})]})]})]})}function wI({botId:e,onOpenChat:n}){const[a,r]=w.useState([void 0]),o=a.at(-1),[c,d]=w.useState({items:[],nextBefore:null}),[f,h]=w.useState(!0),[g,v]=w.useState(""),[p,j]=w.useState(0),[b,k]=w.useState(null),S=w.useRef(null),N=w.useRef(0),C=w.useRef(null);w.useEffect(()=>{let T=!0;return h(!0),v(""),d({items:[],nextBefore:null}),S.current&&(S.current.scrollTop=0),s3.list(e,o).then(R=>{T&&d(R)}).catch(R=>{T&&v(un(R,"activity.loadFailed"))}).finally(()=>{T&&h(!1)}),()=>{T=!1}},[e,o,p]);const M=T=>{var R;b||(N.current=((R=S.current)==null?void 0:R.scrollTop)??0,C.current=document.activeElement),k(T)},E=()=>{k(null),requestAnimationFrame(()=>{var T;S.current&&(S.current.scrollTop=N.current),(T=C.current)==null||T.focus({preventScroll:!0})})};return l.jsxs("div",{className:"jv-activity",children:[l.jsxs("div",{className:"jv-activity-list",hidden:b!==null,children:[l.jsxs("div",{className:"jv-activity-toolbar",children:[l.jsx("span",{children:y("activity.newestFirst")}),l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:f,onClick:()=>{r([void 0]),j(T=>T+1)},"aria-label":y("activity.refresh"),children:[l.jsx(w1,{}),y(f?"activity.reading":"usage.refresh")]})]}),l.jsxs("div",{className:"jv-activity-columns","aria-hidden":"true",children:[l.jsx("span",{children:y("activity.columnChat")}),l.jsx("span",{children:y("activity.columnTime")}),l.jsx("span",{children:"History"})]}),l.jsx("div",{className:"jv-activity-scroll",ref:S,children:f?l.jsx("p",{className:"jv-activity-state",role:"status",children:y("activity.loading")}):g?l.jsxs("div",{className:"jv-activity-state",children:[l.jsx("p",{role:"alert",children:g}),l.jsx(Ee,{variant:"outline",size:"sm",onClick:()=>j(T=>T+1),children:y("common.retry")})]}):c.items.length?l.jsx(xI,{items:c.items,onSelect:M}):l.jsx("div",{className:"jv-activity-state jv-activity-empty",children:l.jsx("p",{children:y("activity.empty")})})}),l.jsxs("div",{className:"jv-activity-pagination",children:[l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:f||a.length===1,onClick:()=>r(T=>T.slice(0,-1)),children:[l.jsx(p1,{}),y("activity.newer")]}),l.jsx("span",{children:y("activity.page",{page:a.length})}),l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:f||c.nextBefore===null,onClick:()=>r(T=>[...T,c.nextBefore]),children:[y("activity.older"),l.jsx(As,{})]})]})]}),b&&l.jsxs("section",{className:"jv-activity-detail","aria-label":y(b.kind==="history"?"activity.historyDetail":"activity.chatDetail"),children:[l.jsx("div",{className:"jv-activity-toolbar",children:l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",onClick:E,children:[l.jsx(m1,{}),y("activity.backToTimeline")]})}),l.jsx(jI,{botId:e,selected:b,onSelect:M,onOpenChat:n})]})]})}const lS={list:(e,n)=>Se(`/bots/${e}/usage?since=${n}`),overview:e=>Se(`/usage?since=${e}`)},kI=["today","7d","30d","all"],SI=e=>e==="today"?y("usage.today"):e==="all"?y("usage.all"):y("usage.days",{count:e==="7d"?7:30}),Hd=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"],["cacheRead","usage.cacheRead"],["cacheWrite","usage.cacheWrite"]];function CI(e){if(e==="all")return 0;const n=new Date;return n.setHours(0,0,0,0),n.setDate(n.getDate()-(e==="7d"?6:e==="30d"?29:0)),n.getTime()}const W0=e=>Ea(e,e<1e4?void 0:{notation:"compact",maximumFractionDigits:1}),NI=e=>e>0&&e<.01?"< $0.01":`$${e.toFixed(2)}`,e1=e=>l.jsx("td",{"data-label":y("usage.cost"),className:e===null?"jv-usage-unpriced":void 0,title:e===null?void 0:`$${e.toFixed(4)}`,children:e===null?y("usage.unpriced"):NI(e)});function sS(e,n){const[a,r]=w.useState("today"),[o,c]=w.useState(null),[d,f]=w.useState(""),[h,g]=w.useState(0);return w.useEffect(()=>{let v=!0;return c(null),f(""),e(CI(a)).then(p=>{v&&c(p)}).catch(p=>{v&&f(un(p,"usage.loadFailed"))}),()=>{v=!1}},[n,a,h]),{range:a,setRange:r,data:o,error:d,reload:()=>g(v=>v+1)}}function oS({range:e,setRange:n,busy:a,reload:r}){return l.jsxs("div",{className:"jv-usage-toolbar",children:[l.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":y("usage.range"),children:kI.map(o=>l.jsx("button",{type:"button",role:"tab","aria-selected":e===o,onClick:()=>n(o),children:SI(o)},o))}),l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:a,onClick:r,"aria-label":y("usage.refreshLabel"),children:[l.jsx(w1,{}),y("usage.refresh")]})]})}function cS({loading:e,error:n,empty:a,reload:r}){return n?l.jsxs("div",{className:"jv-usage-state",children:[l.jsx("p",{role:"alert",children:n}),l.jsx(Ee,{variant:"outline",size:"sm",onClick:r,children:y("usage.retry")})]}):e?l.jsx("p",{className:"jv-usage-state",role:"status",children:y("usage.loading")}):a?l.jsx("div",{className:"jv-usage-state jv-usage-empty",children:l.jsx("p",{children:y("usage.empty")})}):null}function uS({models:e,note:n=!0}){const a=e.filter(o=>o.cost!==null),r=Object.fromEntries(Hd.map(([o])=>[o,e.reduce((c,d)=>c+d[o],0)]));return l.jsxs(l.Fragment,{children:[l.jsxs("table",{className:"jv-usage-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{scope:"col",children:y("usage.model")}),Hd.map(([o,c])=>l.jsx("th",{scope:"col",children:y(c)},o)),l.jsx("th",{scope:"col",children:y("usage.cost")})]})}),l.jsx("tbody",{children:e.map(o=>l.jsxs("tr",{children:[l.jsx("th",{scope:"row",children:l.jsxs("span",{className:"jv-usage-model",children:[l.jsx("strong",{children:o.model}),l.jsx("span",{children:o.provider})]})}),Hd.map(([c,d])=>l.jsx("td",{"data-label":y(d),title:Ea(o[c]),children:W0(o[c])},c)),e1(o.cost)]},`${o.provider}/${o.model}`))}),e.length>1&&l.jsx("tfoot",{children:l.jsxs("tr",{children:[l.jsx("th",{scope:"row",children:l.jsx("strong",{children:y("usage.total")})}),Hd.map(([o,c])=>l.jsx("td",{"data-label":y(c),title:Ea(r[o]),children:W0(r[o])},o)),e1(a.length?a.reduce((o,c)=>o+c.cost,0):null)]})})]}),n&&a.length>0&&a.length<e.length&&l.jsx("p",{className:"jv-usage-note",children:y("usage.notePartial")})]})}function EI({botId:e}){const{range:n,setRange:a,data:r,error:o,reload:c}=sS(d=>lS.list(e,d).then(f=>f.models),e);return l.jsxs("div",{className:"jv-usage",children:[l.jsx(oS,{range:n,setRange:a,busy:!r&&!o,reload:c}),l.jsxs("div",{className:"jv-usage-scroll",children:[l.jsx(cS,{loading:!r,error:o,empty:!(r!=null&&r.length),reload:c}),r&&r.length>0&&!o&&l.jsx(uS,{models:r})]})]})}const Ca={gray:{hex:9146265,label:"color.gray"},blue:{hex:2000636,label:"color.blue"},green:{hex:3129195,label:"color.green"},amber:{hex:16093970,label:"color.amber"},rose:{hex:15881087,label:"color.rose"},violet:{hex:9067766,label:"color.violet"}},dS=e=>{var n;return`#${(((n=Ca[e])==null?void 0:n.hex)??Ca.gray.hex).toString(16).padStart(6,"0")}`},TI={open:1,happy:0,eyeScale:1,kind:0,lid:0,lidTilt:0,smile:0,blush:0,mouth:0,mouthOpen:1,earL:.22,earR:.22,tilt:0,lift:0,squash:1,yaw:0,look:[0,0],spin:0},MI={body:.85,waist:.1,ears:1,earSize:1.1,earX:.3,earY:.26,earW:.16,earH:.32,earBlend:.03,earThick:.06,eyeGap:.205,eyeSize:1.22},cj={lit:.55,rim:.5},AI="attribute vec2 p; void main(){ gl_Position = vec4(p, 0., 1.); }",_I=`
|
|
605
|
+
precision highp float;
|
|
606
|
+
uniform vec2 uRes, uLook;
|
|
607
|
+
uniform vec3 uColor, uInk;
|
|
608
|
+
uniform float uSquash, uEarL, uEarR, uOpen, uHappy, uTilt, uLift, uZoom, uShadow, uYaw, uSpin;
|
|
609
|
+
uniform float uEars, uEarSize, uBody, uEyeGap, uEyeSize, uWaist, uEarX, uEarY, uEarW, uEarH, uEarBlend;
|
|
610
|
+
uniform float uKind, uEyeScale, uLid, uLidTilt, uSmile, uBlush, uMouth, uMouthOpen, uEarThick;
|
|
611
|
+
uniform float uLit, uRim;
|
|
612
|
+
|
|
613
|
+
float smin(float a, float b, float k){ float h = max(k - abs(a - b), 0.) / k; return min(a, b) - h * h * k * .25; }
|
|
614
|
+
float sdEllipsoid(vec3 p, vec3 r){ float k0 = length(p / r), k1 = length(p / (r * r)); return k0 * (k0 - 1.) / k1; }
|
|
615
|
+
float sdTri(vec2 p, vec2 q){
|
|
616
|
+
p.x = abs(p.x);
|
|
617
|
+
vec2 a = p - q * clamp(dot(p, q) / dot(q, q), 0., 1.);
|
|
618
|
+
vec2 b = p - q * vec2(clamp(p.x / q.x, 0., 1.), 1.);
|
|
619
|
+
float s = -sign(q.y);
|
|
620
|
+
vec2 d = min(vec2(dot(a, a), s * (p.x * q.y - p.y * q.x)), vec2(dot(b, b), s * (p.y - q.y)));
|
|
621
|
+
return -sqrt(d.x) * sign(d.y);
|
|
622
|
+
}
|
|
623
|
+
float sdPill(vec2 q, float a, float r){ return length(vec2(q.x, q.y - clamp(q.y, -a, a))) - r; }
|
|
624
|
+
float sdSeg(vec2 p, vec2 a, vec2 b){ vec2 pa = p - a, ba = b - a; float h = clamp(dot(pa, ba) / dot(ba, ba), 0., 1.); return length(pa - ba * h); }
|
|
625
|
+
float sdStar5(vec2 p, float r, float rf){
|
|
626
|
+
const vec2 k1 = vec2(.809016994375, -.587785252292);
|
|
627
|
+
const vec2 k2 = vec2(-k1.x, k1.y);
|
|
628
|
+
p.x = abs(p.x);
|
|
629
|
+
p -= 2. * max(dot(k1, p), 0.) * k1; p -= 2. * max(dot(k2, p), 0.) * k2;
|
|
630
|
+
p.x = abs(p.x); p.y -= r;
|
|
631
|
+
vec2 ba = rf * vec2(-k1.y, k1.x) - vec2(0., 1.);
|
|
632
|
+
float h = clamp(dot(p, ba) / dot(ba, ba), 0., r);
|
|
633
|
+
return length(p - ba * h) * sign(p.y * ba.x - p.x * ba.y);
|
|
634
|
+
}
|
|
635
|
+
mat2 rot(float a){ float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
|
|
636
|
+
float fill(float d){ return 1. - smoothstep(-.0035, .0035, d); }
|
|
637
|
+
|
|
638
|
+
// An ear: a fin standing on the head, thick down the middle and thin at both edges, thinner toward the tip — so from the
|
|
639
|
+
// side it is a pointed rhombus, not a slab. Melted in at the base, so it grows out of the ball instead of sitting on it.
|
|
640
|
+
float sdEar(vec3 q, float ang){
|
|
641
|
+
q.xy = rot(ang) * q.xy;
|
|
642
|
+
float h = uEarH * uEarSize, w = uEarW * uEarSize, round_ = .030 * uEarSize;
|
|
643
|
+
float d2 = sdTri(q.xy - vec2(0., h), vec2(w, -h));
|
|
644
|
+
float up = clamp((q.y + h * .05) / (h * 1.45), 0., 1.), across = clamp(abs(q.x) / w, 0., 1.);
|
|
645
|
+
float half_ = uEarThick * uEarSize * (1. - .45 * up) * (1. - .55 * across * across);
|
|
646
|
+
vec2 e = vec2(d2, abs(q.z) - half_);
|
|
647
|
+
return min(max(e.x, e.y), 0.) + length(max(e, 0.)) - round_;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
// Down to body space: lifted, tilted about the bottom edge, then squashed at a constant volume, so a squat ball widens.
|
|
651
|
+
vec3 toBody(vec3 p){
|
|
652
|
+
p.y -= uLift;
|
|
653
|
+
p.xz = rot(uYaw + uSpin) * p.xz;
|
|
654
|
+
float floorY = -.58 * uBody;
|
|
655
|
+
p.y -= floorY; p.xy = rot(uTilt) * p.xy; p.y += floorY;
|
|
656
|
+
float widen = 1. / sqrt(max(uSquash, .55));
|
|
657
|
+
p.x *= widen; p.z *= widen; p.y = (p.y - floorY) * uSquash + floorY;
|
|
658
|
+
return p;
|
|
659
|
+
}
|
|
660
|
+
float map(vec3 p){
|
|
661
|
+
vec3 b = toBody(p);
|
|
662
|
+
vec3 bp = b;
|
|
663
|
+
bp.x /= (1. + uWaist * clamp(-b.y, 0., 1.));
|
|
664
|
+
float d = sdEllipsoid(bp, vec3(.58, .58 * uBody, .55));
|
|
665
|
+
if (uEars > .5){
|
|
666
|
+
float el = sdEar(bp - vec3(-uEarX, uEarY, -.01), uEarL);
|
|
667
|
+
float er = sdEar(bp - vec3(uEarX, uEarY, -.01), -uEarR);
|
|
668
|
+
d = smin(d, min(el, er), uEarBlend);
|
|
669
|
+
}
|
|
670
|
+
return d;
|
|
671
|
+
}
|
|
672
|
+
vec3 normal(vec3 p){ vec2 e = vec2(.0015, 0.); return normalize(vec3(map(p + e.xyy) - map(p - e.xyy), map(p + e.yxy) - map(p - e.yxy), map(p + e.yyx) - map(p - e.yyx))); }
|
|
673
|
+
float ao(vec3 p, vec3 n){ float o = 0., s = 1.; for (int i = 1; i <= 5; i++){ float h = .02 + .05 * float(i); o += (h - map(p + n * h)) * s; s *= .7; } return clamp(1. - 1.5 * o, 0., 1.); }
|
|
674
|
+
|
|
675
|
+
// One eye. 0 pill (with lids, or a smile arc), 1 squeezed chevron, 2 star, 3 spiral, 4 closed in content.
|
|
676
|
+
float eye(vec2 q, float side){
|
|
677
|
+
q /= uEyeScale;
|
|
678
|
+
float open = max(uOpen, .10), H = .105 * open, d;
|
|
679
|
+
if (uKind < .5){
|
|
680
|
+
float dPill = sdPill(vec2(q.x, q.y / open), .055, .05) * min(open, 1.);
|
|
681
|
+
// Lids: the top cut slants (inner corner low = cross, high = worried); the bottom cut is a curve (a smiling eye).
|
|
682
|
+
dPill = max(dPill, q.y - (H - 2. * H * uLid + uLidTilt * side * q.x));
|
|
683
|
+
vec2 c = vec2(0., -H - .10 + uSmile * .14);
|
|
684
|
+
dPill = max(dPill, -(length(q - c) - .10));
|
|
685
|
+
vec2 qa = q - vec2(0., -.04);
|
|
686
|
+
float dArc = max(abs(length(qa) - .062 * uEyeSize) - .019, -qa.y + .004);
|
|
687
|
+
d = mix(dPill * uEyeSize, dArc, uHappy);
|
|
688
|
+
} else if (uKind < 1.5){
|
|
689
|
+
vec2 tip = vec2(-side * .045, 0.);
|
|
690
|
+
d = min(sdSeg(q, tip, vec2(side * .04, .062)), sdSeg(q, tip, vec2(side * .04, -.062))) - .02;
|
|
691
|
+
} else if (uKind < 2.5){
|
|
692
|
+
d = sdStar5(q * rot(side * .12), .092, .48) - .012;
|
|
693
|
+
} else if (uKind < 3.5){
|
|
694
|
+
float r = length(q), a = atan(q.y, q.x) * side, k = .036;
|
|
695
|
+
d = max(abs(fract(r / k - a / 6.2831853) - .5) * k - .0095, r - .088);
|
|
696
|
+
} else {
|
|
697
|
+
vec2 qa = q - vec2(0., .035);
|
|
698
|
+
d = max(abs(length(qa) - .062 * uEyeSize) - .019, qa.y + .004);
|
|
699
|
+
}
|
|
700
|
+
return d * uEyeScale;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
// Every mouth is a white line, the same pen as the eyes: no filled cavity, no tongue.
|
|
704
|
+
// 1 cat ω, 2 a smile, 3 an O (a yawn), 4 a short line, 5 wavy (a wry face), 6 a frown
|
|
705
|
+
float mouth(vec2 q){
|
|
706
|
+
if (uMouth < .5) return 0.;
|
|
707
|
+
float w = .0145, d = 1.;
|
|
708
|
+
if (uMouth < 1.5){
|
|
709
|
+
float r = .034;
|
|
710
|
+
float a = max(abs(length(q - vec2(-r, .012)) - r) - w, q.y - .012);
|
|
711
|
+
float b = max(abs(length(q - vec2(r, .012)) - r) - w, q.y - .012);
|
|
712
|
+
d = min(a, b);
|
|
713
|
+
} else if (uMouth < 2.5){
|
|
714
|
+
vec2 c = vec2(0., .048 * uMouthOpen);
|
|
715
|
+
float R = .062 * uMouthOpen;
|
|
716
|
+
d = max(abs(length(q - c) - R) - w, max(q.y - c.y + .004, abs(q.x) - R * .92));
|
|
717
|
+
} else if (uMouth < 3.5){
|
|
718
|
+
d = abs(length(q / vec2(.060, .080 * uMouthOpen)) - 1.) * .060 - .018;
|
|
719
|
+
} else if (uMouth < 4.5){
|
|
720
|
+
d = sdSeg(q, vec2(-.032, 0.), vec2(.032, 0.)) - w;
|
|
721
|
+
} else if (uMouth < 5.5){
|
|
722
|
+
d = max(abs(q.y - .011 * sin(q.x * 95.)) - .0125, abs(q.x) - .05);
|
|
723
|
+
} else {
|
|
724
|
+
d = max(abs(length(q - vec2(0., -.05)) - .05) - w, -(q.y + .022));
|
|
725
|
+
}
|
|
726
|
+
return fill(d);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// The face is painted on the ball's surface, so it sits on the curve rather than floating in front of it.
|
|
730
|
+
vec3 paintFace(vec3 b, vec3 base){
|
|
731
|
+
if (b.z < 0.) return base;
|
|
732
|
+
float ink = 0., blush = 0.;
|
|
733
|
+
for (int i = 0; i < 2; i++){
|
|
734
|
+
float side = i == 0 ? -1. : 1.;
|
|
735
|
+
vec2 q = b.xy - (vec2(side * uEyeGap, .01) + uLook);
|
|
736
|
+
ink = max(ink, fill(eye(q, side)));
|
|
737
|
+
vec2 qb = (b.xy - vec2(side * (uEyeGap + .092), .01 - .142) - uLook * .4) / vec2(.080, .050);
|
|
738
|
+
blush = max(blush, 1. - smoothstep(.75, 1.02, length(qb)));
|
|
739
|
+
}
|
|
740
|
+
base = mix(base, mix(uColor, vec3(1., .56, .72), .86), blush * uBlush);
|
|
741
|
+
base = mix(base, uInk, max(ink, mouth(b.xy - vec2(uLook.x * .7, .01 - .215 + uLook.y * .5))));
|
|
742
|
+
return base;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
void main(){
|
|
746
|
+
vec2 uv = (gl_FragCoord.xy - .5 * uRes) / uRes.y;
|
|
747
|
+
vec3 ro = vec3(0., .30, 3.4), ta = vec3(0., -.02, 0.);
|
|
748
|
+
vec3 ww = normalize(ta - ro), uu = normalize(cross(ww, vec3(0., 1., 0.))), vv = cross(uu, ww);
|
|
749
|
+
vec3 rd = normalize(uv.x * uu + uv.y * vv + 2.45 * uZoom * ww);
|
|
750
|
+
float t = 0., near = 9.; bool hit = false;
|
|
751
|
+
for (int i = 0; i < 110; i++){
|
|
752
|
+
float d = map(ro + rd * t);
|
|
753
|
+
near = min(near, d);
|
|
754
|
+
if (d < .0008){ hit = true; break; }
|
|
755
|
+
t += d * .8; if (t > 6.) break;
|
|
756
|
+
}
|
|
757
|
+
vec4 col = vec4(0.);
|
|
758
|
+
float tf = (-.585 - ro.y) / rd.y;
|
|
759
|
+
if (tf > 0. && uShadow > 0.){
|
|
760
|
+
vec3 g = ro + rd * tf;
|
|
761
|
+
// Off the ground, the shadow tightens and fades, so a hop reads as a hop rather than as floating.
|
|
762
|
+
float up = clamp(uLift / .35, 0., 1.), wide = 1. - .38 * up;
|
|
763
|
+
float s = exp(-pow(length(vec2(g.x / (.95 * wide), g.z / (.8 * wide))) / (.58 * wide), 2.) * 2.0);
|
|
764
|
+
col = vec4(0., 0., 0., .20 * s * uShadow * (1. - .55 * up));
|
|
765
|
+
}
|
|
766
|
+
if (hit){
|
|
767
|
+
vec3 p = ro + rd * t, n = normal(p);
|
|
768
|
+
vec3 L = normalize(vec3(-.5, .8, .75));
|
|
769
|
+
// One solid colour, deepened toward the bottom edge and in the hollows, then a soft light from the upper left and a
|
|
770
|
+
// rim that catches the far edge — with the outline, that is what makes a flat colour read as a round body.
|
|
771
|
+
vec3 base = uColor * mix(.94, 1., smoothstep(-.62, .30, p.y)) * mix(.90, 1., ao(p, n));
|
|
772
|
+
float lam = clamp((dot(n, L) + .45) / 1.45, 0., 1.);
|
|
773
|
+
vec3 soft = uColor * mix(vec3(.80, .83, .93), vec3(1.), smoothstep(.08, .86, lam)) * mix(.88, 1., ao(p, n));
|
|
774
|
+
base = mix(base, soft, uLit);
|
|
775
|
+
base += uColor * uRim * pow(1. - max(dot(n, -rd), 0.), 3.2) * .55;
|
|
776
|
+
base = paintFace(toBody(p), base);
|
|
777
|
+
// The crease where the ears meet the head turns edge-on when the head turns, and takes the outline with it.
|
|
778
|
+
base = mix(base, uColor * vec3(.55, .57, .65), (1. - smoothstep(.10, .17, max(dot(n, -rd), 0.))) * .85);
|
|
779
|
+
col = vec4(base, 1.);
|
|
780
|
+
}
|
|
781
|
+
if (!hit && near < 9.){
|
|
782
|
+
// The outline is a band of even width just outside the silhouette, so it does not vanish where the surface turns away
|
|
783
|
+
// fast; a near miss inside the band paints the line over the shadow. Its width is a fixed share of the picture, so
|
|
784
|
+
// the DM figure gets a clear edge and a 22 px avatar a hairline, as in the design study.
|
|
785
|
+
float w = .003 * t;
|
|
786
|
+
float edge = 1. - smoothstep(w * .55, w, near);
|
|
787
|
+
if (edge > 0.) col = vec4(mix(col.rgb, uColor * vec3(.55, .57, .65), edge), max(col.a, edge));
|
|
788
|
+
}
|
|
789
|
+
gl_FragColor = vec4(col.rgb * col.a, col.a);
|
|
790
|
+
}`;function fS(e,n){const a=2.45*n/3.4,r=.92,o=r/e.squash;return{x:.5-o*Math.sin(e.tilt)*a,y:.5-.39*n/.92-(o*Math.cos(e.tilt)+e.lift-r)*a,scale:n/.92,angle:-e.tilt}}const uj=e=>[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255],RI=256,zI=/swiftshader|llvmpipe|softpipe|software|basic render/i;function OI(e){const n=String(e.getParameter(e.RENDERER)??"");if(n!=="WebKit WebGL")return n;const a=e.getExtension("WEBGL_debug_renderer_info");return a?String(e.getParameter(a.UNMASKED_RENDERER_WEBGL)??""):n}function hS({gpu:e=!1}={}){var v;const n=document.createElement("canvas"),a=n.getContext("webgl",{premultipliedAlpha:!0,preserveDrawingBuffer:!0,antialias:!1,failIfMajorPerformanceCaveat:e});if(!a)return;if(e&&zI.test(OI(a))){(v=a.getExtension("WEBGL_lose_context"))==null||v.loseContext();return}const r=(p,j)=>{const b=a.createShader(p);if(a.shaderSource(b,j),a.compileShader(b),!a.getShaderParameter(b,a.COMPILE_STATUS))throw new Error(a.getShaderInfoLog(b)??"shader");return b},o=a.createProgram();a.attachShader(o,r(a.VERTEX_SHADER,AI)),a.attachShader(o,r(a.FRAGMENT_SHADER,_I)),a.linkProgram(o),a.useProgram(o),a.bindBuffer(a.ARRAY_BUFFER,a.createBuffer()),a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),a.STATIC_DRAW);const c=a.getAttribLocation(o,"p");a.enableVertexAttribArray(c),a.vertexAttribPointer(c,2,a.FLOAT,!1,0,0);const d=p=>a.getUniformLocation(o,p),f=uj(16777215),h=[document.createElement("canvas"),document.createElement("canvas")],g=(p,j,b,k,S)=>{n.width!==p&&(n.width=n.height=p),a.viewport(0,0,p,p),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.uniform2f(d("uRes"),p,p),a.uniform3fv(d("uColor"),uj(j)),a.uniform3fv(d("uInk"),f),a.uniform2fv(d("uLook"),b.look);for(const[N,C]of[["uSquash",b.squash],["uEarL",b.earL],["uEarR",b.earR],["uOpen",b.open],["uHappy",b.happy],["uTilt",b.tilt],["uLift",b.lift],["uKind",b.kind],["uEyeScale",b.eyeScale],["uLid",b.lid],["uLidTilt",b.lidTilt],["uSmile",b.smile],["uBlush",b.blush],["uMouth",b.mouth],["uMouthOpen",b.mouthOpen],["uYaw",-b.yaw],["uSpin",b.spin]])a.uniform1f(d(N),C);for(const[N,C]of Object.entries(MI))a.uniform1f(d("u"+N[0].toUpperCase()+N.slice(1)),C);a.uniform1f(d("uZoom"),S),a.uniform1f(d("uShadow"),k?1:0),a.uniform1f(d("uLit"),cj.lit),a.uniform1f(d("uRim"),cj.rim),a.drawArrays(a.TRIANGLES,0,3)};return{paint(p,j,b,k,{shadow:S=!0,zoom:N=.9}={}){let C=j*2;for(;C<RI;)C*=2;g(C,b,k,S,N);let M=n;for(let E=0;C>j*2;C/=2,E^=1){const T=h[E],R=T.getContext("2d");T.width!==C/2?T.width=T.height=C/2:R.clearRect(0,0,C/2,C/2),R.drawImage(M,0,0,C,C,0,0,C/2,C/2),M=T}p.drawImage(M,0,0,C,C,0,0,j,j)},dispose(){var p;(p=a.getExtension("WEBGL_lose_context"))==null||p.loseContext()}}}const DI={normal:{},happy:{happy:1,blush:1,earL:.16,earR:.16},sad:{lid:.28,lidTilt:-.62,look:[0,-.02],earL:.62,earR:.62,mouth:6,squash:.97},angry:{lid:.4,lidTilt:1.1,earL:.56,earR:.56,mouth:4,look:[0,-.01]},dizzy:{kind:3,mouth:5,tilt:.08,earL:.1,earR:.46}},t1=e=>({...TI,...DI[e]}),LI={sleep:"zz",busy:"sweat",ask:"ask",stretch:"sparkle"},mS={sleep:{kind:4,earL:.36,earR:.36,look:[0,-.02]},think:{lid:.16,earL:.16,earR:.46},work:{open:.55,earL:.14,earR:.14},busy:{kind:1,mouth:5,earL:.5,earR:.5},read:{lid:.34},turn:{mouth:2,mouthOpen:.8,earL:.1,earR:.1},ask:{eyeScale:1.08,earL:.12,earR:.38},yawn:{kind:4,mouth:5,earL:.42,earR:.42},stretch:{kind:2,mouth:2,mouthOpen:.8,blush:.8,earL:.06,earR:.06},groom:{kind:4}},BI=mS.sleep??{},dj={rest:.2,turn:.02,ask:.08,read:.12},fj=Math.PI*2,Lc=(e,n,a)=>e+(n-e)*a;let II=class{constructor(){qe(this,"x",0);qe(this,"v",0);qe(this,"last",0)}kick(n){this.v+=n}step(n){const a=this.last?Math.min(.05,Math.max(0,(n-this.last)/1e3)):0;this.last=n;const r=9.5;return this.v+=(-180*this.x-r*this.v)*a,this.x+=this.v*a,this.x}};class PI{constructor(){qe(this,"squash",new II);qe(this,"start",0);qe(this,"motion",null);qe(this,"motionAt",0);qe(this,"lookX",0);qe(this,"lookY",0);qe(this,"yaw",0);qe(this,"lift",0);qe(this,"tilt",0)}frame(n,a){const r=a.motion,o=!!a.reduced,c=r==="sleep",d=a.faceX??0,f=(r==="turn"||r==="ask"||r==="read"?dj[r]:dj.rest)*d;this.start||(this.start=n,this.yaw=f),r!==this.motion&&(this.motion&&!o&&this.squash.kick(c?-.4:.6),this.motion=r,this.motionAt=n);const h=(n-this.start)/1e3,g=(n-this.motionAt)/1e3,v={...t1(a.mood),...mS[r]},p=(M,E)=>o?0:Math.sin(h*M)*E,j=!c&&a.mood==="dizzy",b=r==="idle"?1:c?.25:.45;this.lookX=Lc(this.lookX,(j?0:a.lookX*b)*.055,.18),this.lookY=Lc(this.lookY,(j?0:a.lookY*b)*.045,.15),this.yaw=Lc(this.yaw,f,.07);let k=(c?1.05:1)+(o?0:Math.sin(fj*h/(c?4.4:3.4))*(c?.014:.008)),S=0,N=v.tilt,C=v.look;if(r==="think")C=[p(.9,.045)+.03,.04],N+=.06+p(1.3,.03);else if(r==="work"||r==="busy"){const M=r==="busy"||a.fast,E=o?0:Math.abs(Math.sin(fj*h*(M?1.9:1.5)));k+=.032*(1-E),S=.013*E,C=M?[p(6.5,.012)+p(2.3,.005),-.03]:[p(1.9,.02),-.03],r==="busy"&&(N+=p(1.6,.02))}else if(r==="read")C=[o?0:g*.55%1*.09-.045,-.045],N+=p(.7,.02);else if(r==="ask")C=[0,.03],N+=.14+p(1.1,.03);else if(r==="yawn"){const M=o?0:Math.sin(Math.PI*Math.min(1,g%3.2/1.8));k+=.05*M,S=.02*M}else if(r==="stretch"){const M=o?0:Math.sin(Math.PI*Math.min(1,g%3.6/1.8));k-=.04*M,S=.03*M}else r==="groom"&&(N-=.1,C=[.04,-.03]);return this.lift=Lc(this.lift,S,.2),this.tilt=Lc(this.tilt,N,.2),{...v,squash:k*v.squash+this.squash.step(n),lift:this.lift,tilt:this.tilt,yaw:this.yaw,look:[this.lookX+C[0],this.lookY+C[1]]}}shake(){this.squash.kick(-2.2)}}const HI=40,Jp=new Map;let qd;function pS(e,n,a){const r=n/100;e.save(),e.translate(a.x*n,a.y*n),e.rotate(a.angle),e.scale(a.scale,a.scale),e.fillStyle="#f2b830",e.strokeStyle="#c98d12",e.lineWidth=1.6*r,e.lineJoin="round",e.beginPath(),e.moveTo(-13*r,6*r),e.lineTo(-13*r,-2*r),e.lineTo(-6*r,3*r),e.lineTo(0,-7*r),e.lineTo(6*r,3*r),e.lineTo(13*r,-2*r),e.lineTo(13*r,6*r),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#fff6dc";for(const[o,c]of[[-13,-2],[0,-7],[13,-2]])e.beginPath(),e.arc(o*r,c*r,2.2*r,0,Math.PI*2),e.fill();e.restore()}function qI(e,n,a,r,o,c){var p;if(qd===void 0){const j=hS();qd=j?{figure:j,out:document.createElement("canvas")}:null}if(!qd)return"";const{figure:d,out:f}=qd,h=c?{...t1(n),...BI}:t1(n),g=r?.92:.9;f.width=f.height=a;const v=f.getContext("2d");return v?(d.paint(v,a,((p=Ca[e])==null?void 0:p.hex)??Ca.gray.hex,h,{shadow:r,zoom:g}),o&&pS(v,a,fS(h,g)),f.toDataURL("image/png")):""}function FI(e,n,a,r,o=!1,c=!1){const d=Math.round(a*Math.min(3,Math.max(1,r))),f=a>=HI,h=o&&f,g=`${e}:${n}:${d}:${h}:${c}`;let v=Jp.get(g);return v||(v=Promise.resolve().then(()=>qI(e,n,d,f,h,c)),Jp.set(g,v),v.catch(()=>Jp.delete(g))),v}function UI(e){let n;const a=()=>{e(),r()},r=()=>{n=matchMedia(`(resolution: ${devicePixelRatio}dppx)`),n.addEventListener("change",a,{once:!0})};return r(),()=>n==null?void 0:n.removeEventListener("change",a)}function _a({color:e,mood:n="normal",size:a=36,badge:r,crown:o=!1,asleep:c=!1}){const[d,f]=w.useState(),h=w.useSyncExternalStore(UI,()=>devicePixelRatio||1);return w.useEffect(()=>{let g=!0;return FI(e,n,a,h,o,c).then(v=>{g&&f(v)}).catch(()=>{}),()=>{g=!1}},[e,n,a,h,o,c]),l.jsxs("span",{className:"jv-bot-avatar",style:{"--jv-avatar-size":`${a}px`,"--jv-avatar-color":dS(e)},"aria-hidden":"true",children:[d?l.jsx("img",{src:d,alt:""}):l.jsx("span",{className:"jv-bot-avatar-tile"}),r==="working"&&l.jsxs("span",{className:"jv-typing",title:y("avatar.working"),children:[l.jsx("i",{}),l.jsx("i",{}),l.jsx("i",{})]}),r==="asking"&&l.jsx("span",{className:"jv-typing jv-asking",title:y("activity.asking"),children:"?"})]})}const gS=wT;function vS({className:e,children:n,showCloseButton:a=!0,...r}){return l.jsxs(ST,{children:[l.jsx(CT,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-[80] bg-black/50"}),l.jsxs(TT,{"data-slot":"dialog-content",className:Dn("fixed top-1/2 left-1/2 z-[81] flex max-h-[calc(100dvh-24px)] w-[min(720px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border bg-background text-foreground shadow-lg outline-none",e),...r,children:[n,a&&l.jsx(OT,{className:"absolute top-4 right-4 rounded-sm p-1 text-muted-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring","aria-label":y("common.close"),children:l.jsx(zo,{className:"size-4"})})]})]})}function yS({className:e,...n}){return l.jsx(RT,{"data-slot":"dialog-title",className:Dn("text-lg font-semibold",e),...n})}const $I={running:"activity.running",idle:"activity.idle",stop:"activity.stopped"};function VI({bot:e,status:n,onSaved:a}){const[r,o]=w.useState(null),[c,d]=w.useState(!1),[f,h]=w.useState(""),g=(n==null?void 0:n.status)??"stop";async function v(j){o(j),h("");try{await he.controlBot(e.id,j)}catch(b){h(un(b,"common.failed"))}finally{o(null)}}async function p(j){if(j!==e.color){d(!0),h("");try{a(await he.setBotColor(e.id,j))}catch(b){h(un(b,"bot.changeFailed"))}finally{d(!1)}}}return l.jsxs("header",{className:"jv-bot-head",children:[l.jsx(_a,{color:e.color,mood:e.mood,size:56,crown:e.agent}),l.jsxs("div",{className:"jv-bot-identity",children:[l.jsx(yS,{children:e.name}),e.description&&l.jsx("span",{children:e.description}),l.jsx("div",{className:"jv-bot-colors",role:"radiogroup","aria-label":y("bot.color"),children:Object.keys(Ca).map(j=>l.jsx("button",{type:"button",role:"radio","aria-checked":e.color===j,"aria-label":y(Ca[j].label),title:y(Ca[j].label),disabled:c,style:{background:dS(j)},onClick:()=>void p(j)},j))})]}),l.jsxs("div",{className:"jv-bot-run",children:[l.jsx("span",{className:"jv-status","data-ok":g!=="stop"||void 0,"data-busy":g==="running"||void 0,children:y($I[g])}),g==="running"&&l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",disabled:!!r,onClick:()=>void v("abort"),children:y(r==="abort"?"bot.aborting":"bot.abort")}),l.jsx(Ee,{type:"button",variant:"outline",size:"sm",disabled:!!r||!e.connectionId,onClick:()=>void v(g==="stop"?"start":"stop"),children:y(r==="start"?"bot.starting":r==="stop"?"bot.stopping":g==="stop"?"bot.start":"bot.stop")})]}),f&&l.jsx("p",{className:"jv-note-error jv-bot-head-error",role:"alert",children:f})]})}const Hr=UA,qr=YA;function Fr({className:e,children:n,...a}){return l.jsxs(VA,{"data-slot":"select-trigger",className:Dn("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50",e),...a,children:[n,l.jsx(KA,{asChild:!0,children:l.jsx(Al,{className:"size-4 opacity-50"})})]})}function Ur({className:e,children:n,container:a,...r}){return l.jsx(JA,{container:a??void 0,children:l.jsx(WA,{"data-slot":"select-content",position:"popper",sideOffset:5,className:Dn("z-[100] max-h-[min(300px,70dvh)] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-md border bg-popover bg-background p-1 text-foreground shadow-md",e),...r,children:l.jsx(l_,{children:n})})})}function Oi({className:e,children:n,...a}){return l.jsxs(c_,{"data-slot":"select-item",className:Dn("relative flex cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50",e),...a,children:[l.jsx(u_,{children:n}),l.jsx(f_,{"data-slot":"select-indicator",className:"absolute right-2",children:l.jsx(Li,{className:"size-4"})})]})}function On(){const[e,n]=w.useState(null),[a,r]=w.useState(""),o=w.useCallback(async(c,d,f)=>{n(c),r("");try{return await d(),!0}catch(h){return r(un(h,f)),!1}finally{n(null)}},[]);return{busy:e!==null,doing:e,error:a,setError:r,run:o}}const hj={auto:"botModel.auto",off:"botModel.off",minimal:"botModel.minimal",low:"botModel.low",medium:"botModel.medium",high:"botModel.high",xhigh:"botModel.xhigh",max:"botModel.max"},GI=(e,n)=>JSON.stringify([e,n]);function xS({bot:e,connections:n,onSaved:a,onManage:r}){const[o,c]=w.useState([]),[d,f]=w.useState(!0),[h,g]=w.useState(""),[v,p]=w.useState(0),{busy:j,error:b,run:k}=On(),[S,N]=w.useState(!1),[C,M]=w.useState(""),[E,T]=w.useState(-1),R=w.useRef(null),_=w.useRef(null),[z,P]=w.useState(null),H=w.useId();w.useEffect(()=>{let ne=!0;return f(!0),g(""),he.modelOptions().then(B=>{ne&&c(B.connections)}).catch(B=>{ne&&g(un(B,"botModel.loadFailed"))}).finally(()=>{ne&&f(!1)}),()=>{ne=!1}},[n,v]);const O=o.flatMap(ne=>ne.models.map(B=>({...B,connectionId:ne.id,connectionName:ne.name,key:GI(ne.id,B.id)}))).sort((ne,B)=>ne.name.localeCompare(B.name,void 0,{numeric:!0})),I=O.find(ne=>ne.connectionId===e.connectionId&&ne.id===e.modelId),$=n.find(ne=>ne.id===e.connectionId),Q=$==null?void 0:$.models.find(ne=>ne.id===e.modelId),Y=O.filter(ne=>`${ne.name} ${ne.id} ${ne.connectionName}`.toLocaleLowerCase().includes(C.trim().toLocaleLowerCase())),q=o.map(ne=>({...ne,models:Y.filter(B=>B.connectionId===ne.id)})).filter(ne=>ne.models.length),K=q.flatMap(ne=>ne.models),V=O.length>8,X=e.thinkingLevel==="auto"?`auto${e.effectiveThinkingLevel?` · ${e.effectiveThinkingLevel}`:""}`:e.effectiveThinkingLevel??e.thinkingLevel;function Z(ne){N(ne),M(""),T(-1)}async function D(ne,B,F){Z(!1),await k("choose",async()=>a(await he.selectBotModel(e.id,ne,B,F,Tl())),"botModel.switchFailed")}function se(ne){var B;if(ne.key==="ArrowDown"||ne.key==="ArrowUp"){ne.preventDefault();const F=ne.key==="ArrowDown"?Math.min(E+1,K.length-1):Math.max(E-1,0);T(F),(B=document.getElementById(`${H}-${F}`))==null||B.scrollIntoView({block:"nearest"})}else if(ne.key==="Enter"&&K[E]){ne.preventDefault();const F=K[E];D(F.connectionId,F.id,e.thinkingLevel)}}return l.jsxs("div",{className:"jv-bot-model jv-ui","aria-busy":j||d,ref:ne=>P((ne==null?void 0:ne.closest("[data-slot=dialog-content]"))??null),children:[l.jsxs("div",{className:"jv-bot-model-fields",children:[l.jsxs("div",{className:"jv-bot-model-field",children:[l.jsx("span",{className:"jv-field-label",children:y("usage.model")}),l.jsxs(Pf,{open:S,onOpenChange:Z,children:[l.jsxs(Hf,{className:"jv-model-trigger","aria-label":y("botModel.pick"),"aria-haspopup":"listbox",disabled:j||d||!!h,children:[l.jsx("span",{children:(I==null?void 0:I.name)??(Q==null?void 0:Q.name)??y(e.connectionId?"botModel.broken":"botModel.choose")}),j?l.jsx(fw,{className:"animate-spin"}):l.jsx(Al,{})]}),l.jsx(qf,{container:z,children:l.jsxs(Ff,{className:"jv-model-menu jv-ui",align:"start",sideOffset:6,collisionPadding:12,collisionBoundary:z,onOpenAutoFocus:ne=>{var B;ne.preventDefault(),(B=V?R.current:_.current)==null||B.focus()},onKeyDown:se,children:[V&&l.jsxs("div",{className:"jv-model-search",children:[l.jsx(_s,{}),l.jsx("input",{ref:R,role:"combobox","aria-label":y("botModel.filter"),"aria-expanded":"true","aria-controls":H,"aria-activedescendant":E>=0?`${H}-${E}`:void 0,placeholder:y("botModel.filterPlaceholder"),value:C,onChange:ne=>{M(ne.target.value),T(-1)},autoComplete:"off",spellCheck:!1})]}),l.jsxs("div",{ref:_,id:H,role:"listbox","aria-label":y("botModel.list"),tabIndex:-1,"aria-activedescendant":E>=0?`${H}-${E}`:void 0,className:"jv-model-options",children:[q.map(ne=>l.jsxs("div",{role:"group","aria-label":ne.name,children:[l.jsx("div",{className:"jv-model-group-label",children:ne.name}),ne.models.map(B=>{const F=K.indexOf(B),ee=B.connectionId===e.connectionId&&B.id===e.modelId;return l.jsxs("button",{type:"button",role:"option",tabIndex:-1,id:`${H}-${F}`,"aria-selected":ee,"data-active":F===E||void 0,title:B.id,onClick:()=>void D(B.connectionId,B.id,e.thinkingLevel),children:[l.jsx("span",{className:"jv-option-check",children:ee&&l.jsx(Li,{})}),l.jsx("span",{children:B.name})]},B.key)})]},ne.id)),!K.length&&l.jsx("p",{className:"jv-menu-empty",children:y(O.length?"botModel.noMatch":"botModel.none")})]}),l.jsx("button",{type:"button",className:"jv-menu-manage",onClick:()=>{Z(!1),r()},children:y("botModel.manage")})]})})]}),(I||$)&&l.jsx("span",{className:"jv-field-note",children:(I==null?void 0:I.connectionName)??($==null?void 0:$.displayName)})]}),l.jsxs("div",{className:"jv-bot-model-field",children:[l.jsx("span",{className:"jv-field-label",children:y("botModel.thinking")}),l.jsxs(Hr,{value:e.thinkingLevel==="auto"?"auto":e.effectiveThinkingLevel??e.thinkingLevel,disabled:j||d||!I||!!h,onValueChange:ne=>{e.connectionId&&D(e.connectionId,e.modelId,ne)},children:[l.jsx(Fr,{className:"jv-thinking-trigger","aria-label":y("botModel.pickThinking"),children:l.jsx(qr,{children:X})}),l.jsx(Ur,{className:"jv-select-menu jv-thinking-menu",align:"end",children:["auto",...(I==null?void 0:I.thinking.levels)??[]].map(ne=>{const B=I==null?void 0:I.thinkingLevelMap[ne],F=B&&B!==ne?B:ne;return l.jsx(Oi,{value:ne,children:l.jsxs("span",{className:"jv-thinking-option",children:[l.jsxs("span",{children:[F,B&&B!==ne&&l.jsxs("small",{children:[" (",ne,")"]})]}),l.jsx("small",{children:hj[ne]&&y(hj[ne])})]})},ne)})})]})]})]}),d&&l.jsx("p",{className:"jv-field-note",role:"status",children:y("botModel.loading")}),j&&l.jsx("p",{className:"jv-field-note",role:"status",children:y("botModel.switching")}),h&&l.jsxs("p",{className:"jv-model-error",role:"alert",children:[h," ",l.jsx("button",{type:"button",onClick:()=>p(ne=>ne+1),children:y("common.retry")})]}),b&&l.jsx("p",{className:"jv-model-error",role:"alert",children:b})]})}function YI(){const[e,n]=w.useState(!1),a=r=>o=>{o.pointerType==="mouse"&&n(r)};return l.jsxs(Pf,{open:e,onOpenChange:n,children:[l.jsx(Hf,{className:"jv-context-stale",title:"","aria-label":y("bot.contextStale"),onPointerEnter:a(!0),onPointerLeave:a(!1),children:l.jsx(Tf,{"aria-hidden":"true"})}),l.jsx(qf,{children:l.jsx(Ff,{className:"jv-context-tip jv-ui",side:"top",align:"end",sideOffset:6,collisionPadding:12,onOpenAutoFocus:r=>r.preventDefault(),children:y("bot.contextStale")})})]})}function KI({bot:e,status:n,connections:a,chats:r,onSaved:o,onManageModels:c,onOpenSubscription:d}){const[f,h]=w.useState(!1),[g,v]=w.useState(null);w.useEffect(()=>{let j=!0;return he.botSubscriptions(e.id).then(b=>{j&&v(b.chats)}).catch(()=>{}),()=>{j=!1}},[e.id]),w.useEffect(()=>{if(!f)return;const j=setTimeout(()=>h(!1),1500);return()=>clearTimeout(j)},[f]);const p=n==null?void 0:n.context;return l.jsxs(l.Fragment,{children:[e.agent&&l.jsxs("section",{className:"jv-section","aria-label":y("agent.title"),children:[l.jsx("h3",{className:"jv-section-title",children:y("agent.title")}),l.jsxs("div",{className:"jv-panel jv-agent-about",children:[l.jsx("p",{children:y("agent.intro",{name:e.name})}),l.jsx("ul",{children:["agent.create","agent.model","agent.run","agent.delete"].map(j=>l.jsx("li",{children:y(j)},j))})]})]}),l.jsxs("section",{className:"jv-section","aria-label":y("usage.model"),children:[l.jsx("h3",{className:"jv-section-title",children:y("usage.model")}),l.jsxs("div",{className:"jv-panel",children:[l.jsx(xS,{bot:e,connections:a,onSaved:o,onManage:c}),p&&l.jsxs("div",{className:"jv-context",title:y("bot.contextHint"),children:[l.jsxs("div",{className:"jv-context-label",children:[l.jsx("span",{children:y("bot.context")}),l.jsxs("span",{"data-stale":p.stale&&p.tokens!==null||void 0,children:[p.stale&&p.tokens!==null&&l.jsx(YI,{}),p.tokens===null?y("bot.unknown"):y("bot.tokens",{used:Ea(p.tokens),window:Ea(p.contextWindow)})]})]}),p.tokens!==null&&l.jsx("div",{className:"jv-context-bar",children:l.jsx("span",{style:{width:`${Math.min(100,Math.max(1,p.tokens/p.contextWindow*100))}%`}})})]})]})]}),l.jsxs("section",{className:"jv-section","aria-label":y("bot.workspace"),children:[l.jsx("h3",{className:"jv-section-title",children:y("bot.workspace")}),l.jsx("div",{className:"jv-list",children:l.jsxs("div",{className:"jv-list-row jv-static-row",children:[l.jsx("span",{className:"jv-row-text",children:l.jsx("code",{title:e.workspacePath,children:e.workspacePath})}),l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":y(f?"ui.copied":"bot.copyWorkspace"),onClick:()=>void Ho(e.workspacePath).then(j=>h(j)),children:f?l.jsx(Li,{}):l.jsx(Wc,{})})]})})]}),g&&l.jsxs("section",{className:"jv-section","aria-label":y("bot.subscriptions"),children:[l.jsx("h3",{className:"jv-section-title",children:y("bot.subscriptions")}),l.jsx("div",{className:"jv-list",children:g.length===0?l.jsx("div",{className:"jv-list-row jv-static-row",children:l.jsx("span",{className:"jv-row-text",children:l.jsx("span",{children:y("bot.noSubscriptions")})})}):g.map(j=>{var b;return l.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>d(j),children:[l.jsx("span",{className:"jv-row-icon",children:j.type==="thread"?l.jsx(jw,{}):l.jsx(H9,{})}),l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:j.title}),l.jsx("span",{children:j.type==="thread"?y("bot.threadIn",{channel:((b=r.find(k=>k.id===j.parentId))==null?void 0:b.title)??""}):y("info.menu")})]}),l.jsx(As,{className:"jv-row-chevron"})]},j.id)})})]})]})}function Nt({className:e,type:n,...a}){return l.jsx("input",{type:n,"data-slot":"input",className:Dn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...a})}function Ro({className:e,...n}){return l.jsx("textarea",{"data-slot":"textarea",className:Dn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...n})}function XI({bot:e,onSaved:n}){const[a,r]=w.useState(e.name),[o,c]=w.useState(e.description),[d,f]=w.useState(e.systemPrompt),[h,g]=w.useState(!1),[v,p]=w.useState(null),j=a!==e.name||o!==e.description||d!==e.systemPrompt;async function b(S){S.preventDefault(),g(!0),p(null);try{n(await he.saveBot(e.id,{name:a,description:o,systemPrompt:d})),p({kind:"ok",text:y("bot.saved")})}catch(N){p({kind:"error",text:un(N,"common.saveFailed")})}finally{g(!1)}}const k=(v==null?void 0:v.kind)==="error"||!j?v:null;return l.jsxs("form",{className:"jv-bot-profile",onSubmit:S=>void b(S),children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("info.name")}),l.jsx(Nt,{id:"jarvy-bot-name",required:!0,maxLength:80,value:a,onChange:S=>r(S.target.value)})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("bot.description")}),l.jsx(Ro,{id:"jarvy-bot-description",maxLength:1e3,rows:2,value:o,onChange:S=>c(S.target.value),placeholder:y("bot.descriptionPlaceholder")})]}),l.jsxs("label",{className:"jv-field jv-bot-persona",children:[l.jsx("span",{children:"Persona"}),l.jsx(Ro,{id:"jarvy-bot-persona",maxLength:16e3,value:d,onChange:S=>f(S.target.value),placeholder:y("bot.personaPlaceholder")}),l.jsx("small",{className:"jv-hint",children:y("bot.personaHint")})]}),l.jsxs("div",{className:"jv-form-footer",children:[k?l.jsx("p",{className:k.kind==="error"?"jv-note-error":"jv-note-ok",role:k.kind==="error"?"alert":"status",children:k.text}):j?l.jsx("p",{className:"jv-hint",children:y("bot.unsaved")}):l.jsx("span",{}),l.jsx(Ee,{type:"submit",className:"jv-primary",disabled:h||!j,children:y(h?"bot.saving":"common.save")})]})]})}const zr=2**30,QI=2**20,Lr=(e,n=2)=>String(Number(e.toFixed(n))),bf=e=>e<zr?`${Math.round(e/QI)} MB`:`${Lr(e/zr,1)} GB`,bS=e=>e===1?y("environment.limits.oneCore"):y("environment.limits.cores",{count:Lr(e)});function ZI({usage:e,limits:n,capacity:a}){var d,f;const r=n.memory??(a==null?void 0:a.memory)??null,o=n.cpus??(a==null?void 0:a.cpus)??null,c=(h,g,v)=>g===null?h:v?y("environment.usage.machine",{used:h,whole:g}):`${h} / ${g}`;return l.jsxs(l.Fragment,{children:[l.jsx(Wp,{label:y("environment.usage.memory"),share:r&&e.memory/r,host:(d=e.host)==null?void 0:d.memory,text:c(bf(e.memory),r===null?null:`${Lr(r/zr,n.memory===null?1:2)} GB`,n.memory===null)}),l.jsx(Wp,{label:y("environment.usage.cpu"),share:o&&e.cpu/100/o,text:c(Lr(e.cpu/100),o===null?null:bS(o),n.cpus===null)}),e.disk&&l.jsx(Wp,{label:y("environment.usage.disk"),share:e.disk.used/e.disk.size,host:(f=e.host)==null?void 0:f.disk,text:c(bf(e.disk.used),`${Lr(e.disk.size/zr)} GB`,!1)})]})}function Wp({label:e,text:n,share:a,host:r}){const[o,c]=w.useState(!1),d=l.jsxs(l.Fragment,{children:[l.jsx("span",{children:e}),l.jsx("span",{className:"jv-env-value",children:n}),a!==null&&l.jsx("span",{className:"jv-env-bar","aria-hidden":"true",children:l.jsx("span",{style:{width:`${Math.min(100,Math.max(1,a*100))}%`},"data-high":a>.9||void 0})})]});if(r==null)return l.jsx("div",{className:"jv-list-row jv-static-row jv-env-fact jv-env-meter",children:d});const f=h=>g=>{g.pointerType==="mouse"&&c(h)};return l.jsxs(Pf,{open:o,onOpenChange:c,children:[l.jsx(Hf,{className:"jv-list-row jv-env-fact jv-env-meter",onPointerEnter:f(!0),onPointerLeave:f(!1),children:d}),l.jsx(qf,{children:l.jsx(Ff,{className:"jv-env-tip jv-ui",side:"top",align:"end",sideOffset:4,collisionPadding:12,onOpenAutoFocus:h=>h.preventDefault(),children:y("environment.usage.host",{value:bf(r)})})})]})}function JI({memory:e,cpus:n}){if(e===null&&n===null)return y("environment.limits.none");const a=y("environment.limits.unlimited");return`${y("environment.limits.memory",{value:e===null?a:`${Lr(e/zr)} GB`})} · ${y("environment.limits.cpu",{value:n===null?a:bS(n)})}`}function WI({bot:e,onSaved:n}){const a=e.environment.computer,r=a.state==="running",o=a.type==="vm",c=o?{memory:1,cpus:1}:{memory:.25,cpus:.1},d=H=>o?H==="memory"?"4":"2":y("environment.limits.unlimited"),[f,h]=w.useState(null),[g,v]=w.useState(!1),[p,j]=w.useState(""),[b,k]=w.useState(""),{busy:S,error:N,setError:C,run:M}=On();w.useEffect(()=>{let H=!0;const O=()=>void he.computerResources(e.id).then($=>{H&&h($)}).catch(()=>{});O();const I=r?setInterval(O,1e4):void 0;return()=>{H=!1,clearInterval(I)}},[e.id,r]);const E=r?(f==null?void 0:f.usage)??null:null,T=(f==null?void 0:f.capacity)??null;function R(){j(a.limits.memory===null?"":Lr(a.limits.memory/zr)),k(a.limits.cpus===null?"":Lr(a.limits.cpus)),C(""),v(!0)}const _={memory:p.trim()?Math.round(Number(p)*zr):null,cpus:b.trim()?Number(b):null},z=!o&&E&&_.memory!==null&&_.memory<E.memory,P=H=>{H.preventDefault(),M("save",async()=>{n(await he.setComputerLimits(e.id,_)),v(!1)},"environment.limits.failed")};return l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",className:"jv-list-row jv-env-fact jv-env-limits","aria-expanded":g,onClick:()=>g?v(!1):R(),children:[l.jsx("span",{children:y(o?"environment.limits.vm":"environment.limits")}),l.jsx("span",{className:"jv-env-value",children:JI(a.limits)}),l.jsx(As,{className:"jv-row-chevron"})]}),E&&l.jsx(ZI,{usage:E,limits:a.limits,capacity:T}),g&&l.jsx("div",{className:"jv-list-row jv-static-row jv-env-details",children:l.jsxs("form",{className:"jv-env-limits-form","aria-label":y(o?"environment.limits.vmEdit":"environment.limits.edit"),onSubmit:P,children:[l.jsxs("div",{className:"jv-env-limit-fields",children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("environment.limits.memoryField")}),l.jsx(Nt,{type:"number",inputMode:"decimal",min:c.memory,max:T?Number((T.memory/zr).toFixed(2)):void 0,step:"any",placeholder:d("memory"),value:p,onChange:H=>{j(H.target.value),C("")}})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("environment.limits.cpuField")}),l.jsx(Nt,{type:"number",inputMode:"decimal",min:c.cpus,max:T==null?void 0:T.cpus,step:"any",placeholder:d("cpus"),value:b,onChange:H=>{k(H.target.value),C("")}})]})]}),T&&l.jsx("small",{className:"jv-hint",children:y("environment.limits.machine",{cpus:T.cpus,memory:Lr(T.memory/zr,1)})}),o&&l.jsx("small",{className:"jv-hint",children:y("environment.limits.vmDefault")}),o&&r&&l.jsx("small",{className:"jv-hint",children:y("environment.limits.vmLater")}),z&&l.jsx("p",{className:"jv-env-warn",role:"status",children:y("environment.limits.below",{usage:bf(E.memory)})}),N&&l.jsx("p",{className:"jv-note-error",role:"alert",children:N}),l.jsxs("div",{className:"jv-env-confirm-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>v(!1),children:y("common.cancel")}),l.jsx(Ee,{type:"submit",className:"jv-primary",size:"sm",disabled:S,children:y("common.save")})]})]})})]})}const eP=["container","vm"];function tP({bot:e,disabled:n,onSaved:a}){const r=e.environment.computer,[o,c]=w.useState(null),[d,f]=w.useState(null),{doing:h,error:g,run:v}=On();w.useEffect(()=>{let k=!0;const S=C=>void C().then(M=>{k&&c(M)}).catch(()=>{});o||S(he.vmSupport);const N=(o==null?void 0:o.state)==="checking"||(o==null?void 0:o.state)==="unknown"?setTimeout(()=>S(he.vmSupport),2e3):void 0;return()=>{k=!1,clearTimeout(N)}},[o]);const p=r.type==="vm"||(o==null?void 0:o.state)==="available",j=(o==null?void 0:o.state)==="checking"||(o==null?void 0:o.state)==="unknown"?y("environment.type.checking"):(o==null?void 0:o.state)==="unavailable"&&r.type!=="vm"?y("environment.type.unavailable",{why:y(`environment.type.why.${o.reason??"failed"}`)}):null,b=k=>void v("switch",async()=>{a(await he.setComputerType(e.id,k)),f(null)},"common.failed");return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"jv-list-row jv-static-row jv-env-fact jv-env-type",children:[l.jsx("span",{children:y("environment.type")}),l.jsx("div",{className:"jv-seg",role:"radiogroup","aria-label":y("environment.type"),children:eP.map(k=>l.jsx("button",{type:"button",role:"radio","aria-checked":r.type===k,disabled:n||!!h||k==="vm"&&!p,onClick:()=>{k!==r.type&&f(k)},children:y(`environment.type.${k}`)},k))})]}),(j||d||g)&&l.jsxs("div",{className:"jv-list-row jv-static-row jv-env-details",children:[j&&!d&&l.jsxs("p",{className:"jv-env-type-note",children:[j,(o==null?void 0:o.state)==="unavailable"&&l.jsx(Ee,{type:"button",variant:"link",size:"sm",disabled:!!h,onClick:()=>void v("check",async()=>c(await he.checkVmSupport())),children:y("environment.type.recheck")})]}),d&&l.jsxs("div",{className:"jv-env-confirm",role:"group","aria-label":y(`environment.type.${d}Title`,{name:e.name}),children:[l.jsx("strong",{children:y(`environment.type.${d}Title`,{name:e.name})}),l.jsx("p",{children:y(`environment.type.${d}Body`)}),l.jsxs("div",{className:"jv-env-confirm-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(null),children:y("common.cancel")}),l.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:!!h,onClick:()=>b(d),children:y(h==="switch"?"environment.type.switching":"environment.type.confirm")})]})]}),g&&l.jsx("p",{className:"jv-note-error",role:"alert",children:g})]})]})}const n1={preparing:"environment.state.preparing",running:"environment.state.running",stopped:"environment.state.stopped",failed:"environment.state.failed",unavailable:"environment.state.unavailable"},nP=e=>e==="missing"||e==="stopped"||e==="denied"?e:"failed";function jS({bot:e,onSaved:n,heading:a=!0}){const{doing:r,error:o,run:c}=On(),[d,f]=w.useState(null),{computer:h,current:g,currentName:v}=e.environment,p=(N,C,M)=>c(N,async()=>n(await C()),M),j=N=>void p(N,()=>he.computer(e.id,N),"common.failed"),b=h==null?void 0:h.state,k=(h==null?void 0:h.type)==="vm",S=b?n1[b]:null;return l.jsxs("section",{className:"jv-section","aria-label":y("environment.title"),children:[a&&l.jsx("h3",{className:"jv-section-title",children:y("environment.title")}),h&&b&&S&&l.jsxs("div",{className:"jv-list jv-env-sandbox",children:[l.jsxs("div",{className:"jv-list-row jv-static-row",children:[l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:y("environment.own")}),g==="ssh"&&l.jsx("span",{className:"jv-env-away",children:y("environment.awayMachine",{name:v??""})})]}),l.jsx("span",{className:"jv-status","data-ok":b==="running"||void 0,"data-busy":b==="preparing"||void 0,children:y(S)})]}),b!=="unavailable"&&l.jsx(tP,{bot:e,disabled:!!r||b==="preparing",onSaved:n}),l.jsxs("div",{className:"jv-list-row jv-static-row jv-env-fact",children:[l.jsx("span",{children:y("environment.container")}),l.jsx("code",{children:h.container})]}),l.jsxs("div",{className:"jv-list-row jv-static-row jv-env-fact",children:[l.jsx("span",{children:y("environment.image")}),l.jsx("code",{children:h.image})]}),l.jsxs("div",{className:"jv-list-row jv-static-row jv-env-fact",children:[l.jsx("span",{children:y("environment.mount")}),l.jsx("code",{children:h.mount})]}),b!=="unavailable"&&l.jsx(WI,{bot:e,onSaved:n}),l.jsxs("div",{className:"jv-list-row jv-static-row jv-env-details",children:[h.restartNeeded&&b==="running"&&!d&&l.jsx("p",{children:y("environment.restartNote")}),b==="unavailable"?l.jsx("p",{children:y("environment.unavailable",{why:y(`environment.unavailable.${nP(h.error)}`)})}):!d&&l.jsxs("div",{className:"jv-env-actions",children:[h.restartNeeded&&b==="running"&&l.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:!!r,onClick:()=>f("restart"),children:y("environment.restart")}),l.jsx(Ee,{type:"button",variant:"outline",size:"sm",disabled:!!r||b==="preparing",onClick:()=>b==="running"?f("stop"):j("start"),children:y(r==="start"?"environment.starting":r==="stop"?"environment.stopping":b==="running"?"environment.stop":"environment.start")}),l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",disabled:!!r||b==="preparing",onClick:()=>f("reset"),children:y("environment.reset")})]}),d&&l.jsxs("div",{className:"jv-env-confirm",role:"group","aria-label":y(`environment.${d}Title`,{name:e.name}),children:[l.jsx("strong",{children:y(`environment.${d}Title`,{name:e.name})}),l.jsx("p",{children:y(d==="reset"&&k?"environment.resetBodyVm":`environment.${d}Body`)}),l.jsxs("div",{className:"jv-env-confirm-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(null),children:y("common.cancel")}),l.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",onClick:()=>{const N=d;f(null),j(N)},children:y(`environment.${d}Confirm`)})]})]})]})]}),o&&l.jsx("p",{className:"jv-note-error",role:"alert",children:o})]})}function i1({items:e,grantedIds:n,texts:a,rows:r,onGrant:o}){const[c,d]=w.useState(!1),[f,h]=w.useState(""),[g,v]=w.useState([]),{busy:p,error:j,run:b}=On(),k=n.map(z=>e.find(P=>P.id===z)).filter(z=>!!z),S=e.filter(z=>!n.includes(z.id)),N=f.trim().toLowerCase(),C=S.filter(z=>{var P;return z.name.toLowerCase().includes(N)||!!((P=z.detail)!=null&&P.toLowerCase().includes(N))}),M=()=>{d(!1),h(""),v([])},E=z=>v(P=>P.includes(z)?P.filter(H=>H!==z):[...P,z]),T=z=>b("grant",z),R=()=>T(async()=>{await o(g,!0),M()}),_=z=>r?l.jsxs("span",{className:"jv-grant-text",children:[l.jsx("strong",{className:z.mono?"jv-mono":void 0,children:z.name}),z.detail&&l.jsx("span",{children:z.detail})]}):l.jsx("span",{className:"jv-secret-bot-name",children:z.name});return l.jsxs("section",{className:"jv-secret-grants","aria-label":a.heading,children:[l.jsxs("div",{className:"jv-secret-grants-head",children:[l.jsxs("h4",{className:"jv-secret-heading",children:[a.heading,k.length>0&&l.jsxs("span",{children:[" · ",k.length]})]}),!c&&l.jsxs(Ee,{type:"button",variant:"outline",size:"sm",disabled:p,onClick:()=>d(!0),children:[l.jsx(Br,{}),a.add]})]}),k.length>0?l.jsx("ul",{className:"jv-secret-granted","data-rows":r||void 0,children:k.map(z=>l.jsxs("li",{children:[z.icon,_(z),z.once&&l.jsx("span",{className:"jv-secret-once",children:y("secrets.onceTag")}),l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-secret-revoke",disabled:p,"aria-label":y("secrets.revoke",{name:z.name}),onClick:()=>void T(()=>o([z.id],!1)),children:l.jsx(zo,{})})]},z.id))}):!c&&l.jsx("p",{className:"jv-hint",children:a.none}),c&&l.jsxs("div",{className:"jv-secret-picker",children:[e.length>0&&l.jsxs("label",{className:"jv-search",children:[l.jsx(_s,{"aria-hidden":"true"}),l.jsx("input",{type:"search",autoFocus:!0,value:f,placeholder:a.search,"aria-label":a.search,onChange:z=>h(z.target.value),onKeyDown:z=>{z.key==="Enter"&&!z.nativeEvent.isComposing&&(z.preventDefault(),C.length===1&&E(C[0].id))}})]}),l.jsxs("div",{className:"jv-secret-options",role:"listbox","aria-multiselectable":"true","aria-label":a.add,"data-rows":r||void 0,children:[C.map(z=>l.jsxs("button",{type:"button",role:"option","aria-selected":g.includes(z.id),className:"jv-secret-option",onClick:()=>E(z.id),children:[z.icon,_(z),g.includes(z.id)&&l.jsx(Li,{"aria-hidden":"true"})]},z.id)),C.length===0&&(e.length?l.jsx("p",{className:"jv-hint",children:S.length?a.noMatch:a.all}):l.jsx("div",{className:"jv-hint jv-grant-nothing",children:a.nothing}))]}),l.jsxs("div",{className:"jv-secret-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:M,children:y("common.cancel")}),l.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:p||!g.length,onClick:()=>void R(),children:g.length?y("dialogs.addCount",{count:g.length}):y("common.add")})]})]}),j&&l.jsx("p",{className:"jv-note-error",role:"alert",children:j})]})}function iP({secret:e,bots:n,onChanged:a}){return l.jsx(wS,{grantedIds:e.grants.map(r=>r.botId),onceIds:new Set(e.grants.filter(r=>r.scope==="once").map(r=>r.botId)),bots:n,onGrant:async(r,o)=>{let c=e;for(const d of r)c=await he.grantSecret(e.id,d,o);a(c)}})}function wS({grantedIds:e,onceIds:n,bots:a,onGrant:r}){const o=n??new Set;return l.jsx(i1,{grantedIds:e,onGrant:r,items:a.map(c=>({id:c.id,name:c.name,once:o.has(c.id),icon:l.jsx(_a,{color:c.color,mood:c.mood,size:20,crown:c.agent})})),texts:{heading:y("secrets.grants"),add:y("secrets.addBots"),search:y("secrets.searchBots"),none:y("secrets.noGrants"),nothing:y("secrets.noBots"),noMatch:y("secrets.noMatch"),all:y("secrets.allGranted")}})}function Qf({value:e,visible:n,onChange:a,onVisible:r,placeholder:o,required:c,warnShort:d=!0}){return l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"jv-secret-input",children:[l.jsx(Nt,{type:n?"text":"password",autoComplete:"new-password",spellCheck:!1,required:c,className:"jv-mono",placeholder:o,value:e,onChange:f=>a(f.target.value)}),l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":y(n?"secrets.hideValue":"secrets.showValue"),onClick:()=>r(!n),children:n?l.jsx(v1,{}):l.jsx(y1,{})})]}),d&&e.length>0&&e.length<8&&l.jsx("span",{className:"jv-field-hint jv-secret-short",children:y("secrets.shortValue")})]})}function jg({publicKey:e}){const[n,a]=w.useState(!1);return w.useEffect(()=>{if(!n)return;const r=setTimeout(()=>a(!1),1500);return()=>clearTimeout(r)},[n]),l.jsxs("div",{className:"jv-machine-key",children:[l.jsx("code",{children:e}),l.jsxs("button",{type:"button",className:"ui-button jv-machine-copy","aria-label":y("machines.copy"),onClick:()=>void Ho(e).then(a),children:[n?l.jsx(Li,{"aria-hidden":"true"}):l.jsx(Wc,{"aria-hidden":"true"}),l.jsx("span",{children:y(n?"machines.copied":"machines.copy")})]})]})}function kS(e){const[n,a]=w.useState(null),[r,o]=w.useState(null);return w.useEffect(()=>{if(!e||n)return;let c=!0;return he.prepareMachineKey().then(d=>{c&&a(d)}).catch(d=>{c&&o(un(d))}),()=>{c=!1}},[e,n]),{key:n,error:r,renew:()=>{a(null),o(null)}}}const a1=e=>`${e.user}@${e.host}${e.port===22?"":`:${e.port}`}`;function aP({machine:e,bots:n,onChanged:a,onDeleted:r}){const[o,c]=w.useState(e.name),[d,f]=w.useState(e.directory),[h,g]=w.useState(e.description),[v,p]=w.useState(null),[j,b]=w.useState(null),{busy:k,doing:S,error:N,setError:C,run:M}=On(),[E,T]=w.useState(""),[R,_]=w.useState(!1),[z,P]=w.useState(null),H=Q=>{Q.preventDefault(),M("save",async()=>{const Y=await he.updateMachine(e.id,{name:o.trim(),directory:d.trim(),description:h.trim()});a(Y),c(Y.name),f(Y.directory),g(Y.description)})},O=Q=>void M("delete",async()=>{try{await he.deleteMachine(e.id,Q),r()}catch(Y){throw!Q&&Y instanceof Wa&&Y.code!=="machine_missing"&&b("force"),Y}}),I=o.trim()!==e.name||d.trim()!==e.directory||h.trim()!==e.description,$=j==="force";return l.jsx("div",{className:"jv-list jv-machine-detail",children:l.jsxs("div",{className:"jv-list-row jv-static-row jv-secret-details",children:[l.jsxs("form",{className:"jv-secret-edit jv-machine-edit",onSubmit:H,"aria-label":e.name,children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("machines.name")}),l.jsx(Nt,{required:!0,maxLength:40,value:o,onChange:Q=>c(Q.target.value)})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("machines.directory")}),l.jsx(Nt,{className:"jv-mono",required:!0,maxLength:1e3,spellCheck:!1,value:d,onChange:Q=>f(Q.target.value)})]}),l.jsxs("label",{className:"jv-field jv-machine-description",children:[l.jsx("span",{children:y("machines.description")}),l.jsx(Ro,{maxLength:2e3,rows:3,placeholder:y("machines.descriptionPlaceholder"),value:h,onChange:Q=>g(Q.target.value)})]}),l.jsx("div",{className:"jv-secret-actions",children:l.jsx(Ee,{type:"submit",variant:"outline",size:"sm",disabled:k||!I||!o.trim(),children:y("common.save")})})]}),l.jsxs("div",{className:"jv-machine-part",children:[l.jsxs("section",{className:"jv-secret-grants","aria-label":y("machines.fingerprint"),children:[l.jsx("h4",{className:"jv-secret-heading",children:y("machines.fingerprint")}),l.jsxs("div",{className:"jv-machine-key jv-machine-fingerprint",children:[l.jsx("div",{className:"jv-machine-codes",children:(v!=null&&v.changed?v.hostKeys.fingerprints:e.fingerprints).map(Q=>l.jsx("code",{"data-new":(v==null?void 0:v.changed)||void 0,children:Q},Q))}),v!=null&&v.changed?l.jsx("button",{type:"button",className:"ui-button jv-machine-copy",disabled:k,onClick:()=>void M("trust",async()=>{a(await he.trustMachine(e.id,v.hostKeys.fingerprints)),p(null)}),children:y("machines.trust")}):l.jsx("button",{type:"button",className:"ui-button jv-machine-copy",disabled:k,onClick:()=>void M("check",async()=>{const Q=await he.checkMachine(e.id);p(Q),a(Q.machine)}),children:y(S==="check"?"machines.checking":"machines.check")})]}),v&&l.jsx("p",{className:"jv-hint","data-warn":v.changed||void 0,children:y(v.changed?"machines.changed":"machines.unchanged")})]}),l.jsxs("section",{className:"jv-secret-grants","aria-label":y("machines.login"),children:[l.jsxs("div",{className:"jv-secret-grants-head",children:[l.jsx("h4",{className:"jv-secret-heading",children:y("machines.login")}),l.jsx("span",{className:"jv-row-meta",children:y(e.login==="password"?"machines.loginPassword":"machines.loginKey")})]}),e.publicKey&&l.jsx(jg,{publicKey:e.publicKey}),e.login==="password"&&l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"jv-hint",children:y("machines.passwordLogin")}),l.jsxs("form",{className:"jv-machine-password",autoComplete:"off","aria-label":y("machines.updatePassword"),onSubmit:Q=>{Q.preventDefault(),M("password",async()=>{a(await he.setMachinePassword(e.id,E)),T(""),P(y("machines.passwordUpdated"))})},children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("machines.newPassword")}),l.jsx(Qf,{value:E,visible:R,onChange:T,onVisible:_,required:!0,warnShort:!1})]}),l.jsxs("div",{className:"jv-secret-actions",children:[l.jsx(Ee,{type:"button",variant:"outline",size:"sm",disabled:k,onClick:()=>void M("key",async()=>{const Q=await he.checkMachine(e.id);p(Q),a(Q.machine),P(y(Q.machine.login==="key"?"machines.usingKey":"machines.stillPassword"))}),children:y("machines.useKey")}),l.jsx(Ee,{type:"submit",variant:"outline",size:"sm",disabled:k||!E,children:y("machines.updatePassword")})]})]})]}),z&&l.jsx("p",{className:"jv-hint",children:z})]})]}),l.jsx("div",{className:"jv-machine-part",children:l.jsx(wS,{grantedIds:e.botIds,bots:n,onGrant:async(Q,Y)=>{let q=e;for(const K of Q)q=await he.grantMachine(e.id,K,Y);a(q)}})}),j?l.jsxs("div",{className:"jv-secret-confirm",role:"group","aria-label":y($?"machines.forceTitle":"machines.deleteTitle",{name:e.name}),children:[l.jsx("strong",{children:y($?"machines.forceTitle":"machines.deleteTitle",{name:e.name})}),l.jsx("p",{children:$?y("machines.forceBody",{comment:`jarvy-${e.id}`}):y("machines.deleteBody")}),l.jsxs("div",{className:"jv-secret-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>{b(null),C("")},children:y("common.cancel")}),l.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:k,onClick:()=>O($),children:y($?"machines.forceConfirm":"machines.deleteConfirm")})]})]}):l.jsx("div",{className:"jv-secret-actions jv-secret-danger",children:l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",disabled:k,onClick:()=>b("delete"),children:y("machines.delete")})}),N&&l.jsx("p",{className:"jv-note-error",role:"alert",children:N})]})})}function rP({bot:e,onSaved:n,onManageSecrets:a,onAddMachine:r}){const[o,c]=w.useState(null),[d,f]=w.useState(null),[h,g]=w.useState(!1);if(w.useEffect(()=>{let p=!0;return Promise.all([he.secrets(),he.machines()]).then(([j,b])=>{p&&(c(j.secrets.filter(k=>k.kind==="value")),f(b.machines))}).catch(()=>{p&&g(!0)}),()=>{p=!1}},[e.id]),h)return l.jsx("p",{className:"jv-note-error",role:"alert",children:y("access.loadFailed")});if(!o||!d)return null;const v=p=>p.grants.find(j=>j.botId===e.id);return l.jsxs("section",{className:"jv-section jv-access","aria-label":y("bot.tab.access"),children:[l.jsx(i1,{rows:!0,grantedIds:o.filter(v).map(p=>p.id),items:o.map(p=>{var j;return{id:p.id,name:p.name,mono:!0,...p.description?{detail:p.description}:{},once:((j=v(p))==null?void 0:j.scope)==="once",icon:l.jsx(b1,{className:"jv-grant-icon","aria-hidden":"true"})}}),texts:{heading:y("access.secrets"),add:y("common.add"),search:y("access.searchSecrets"),none:y("access.noSecrets"),noMatch:y("access.noMatch"),all:y("access.allSecrets"),nothing:l.jsxs(l.Fragment,{children:[l.jsx("span",{children:y("access.noSecretsYet")}),l.jsxs(Ee,{type:"button",variant:"outline",size:"sm",onClick:a,children:[l.jsx(Br,{}),y("access.newSecret")]})]})},onGrant:async(p,j)=>{const b=new Map;for(const k of p)b.set(k,await he.grantSecret(k,e.id,j));c(k=>k&&k.map(S=>b.get(S.id)??S))}}),l.jsx(i1,{rows:!0,grantedIds:d.filter(p=>p.botIds.includes(e.id)).map(p=>p.id),items:d.map(p=>({id:p.id,name:p.name,detail:a1(p),icon:l.jsx(k1,{className:"jv-grant-icon","aria-hidden":"true"})})),texts:{heading:y("environment.external"),add:y("common.add"),search:y("access.searchMachines"),none:y("access.noMachines"),noMatch:y("access.noMatch"),all:y("access.allMachines"),nothing:l.jsxs(l.Fragment,{children:[l.jsx("span",{children:y("access.noMachinesYet")}),l.jsxs(Ee,{type:"button",variant:"outline",size:"sm",onClick:r,children:[l.jsx(Br,{}),y("machines.add")]})]})},onGrant:async(p,j)=>{for(const b of p)n(await he.grantBotMachine(e.id,b,j));f(b=>b&&b.map(k=>p.includes(k.id)?{...k,botIds:j?[...new Set([...k.botIds,e.id])]:k.botIds.filter(S=>S!==e.id)}:k))}})]})}const mj=(e,n)=>Ml(new Date(2e3,0,1,e,n)),SS=e=>Si(new Date(2023,0,1+e),{weekday:"long"}),CS=e=>`${Nf(e)} ${Ml(e)}`;function lP(e){switch(e.kind){case"once":return y("tasks.schedule.once",{time:CS(e.at)});case"every":return e.minutes%60===0?y("tasks.schedule.hours",{count:e.minutes/60}):y("tasks.schedule.minutes",{count:e.minutes});case"daily":return y("tasks.schedule.daily",{time:mj(e.hour,e.minute)});case"weekly":return y("tasks.schedule.weekly",{day:SS(e.weekday),time:mj(e.hour,e.minute)})}}const No=e=>String(e).padStart(2,"0"),pj=e=>{const n=new Date(e);return`${n.getFullYear()}-${No(n.getMonth()+1)}-${No(n.getDate())}T${No(n.getHours())}:${No(n.getMinutes())}`},sP=(e,n)=>`${No(e)}:${No(n)}`,oP=["once","every","daily","weekly"],NS=5;function cP(e){const n=Date.now()+36e5,a={at:pj(n-n%(300*1e3)),count:"30",unit:"minutes",time:"09:00",weekday:"1"};return e&&(e.kind==="once"&&(a.at=pj(e.at)),e.kind==="every"&&Object.assign(a,e.minutes%60===0?{count:String(e.minutes/60),unit:"hours"}:{count:String(e.minutes),unit:"minutes"}),(e.kind==="daily"||e.kind==="weekly")&&(a.time=sP(e.hour,e.minute)),e.kind==="weekly"&&(a.weekday=String(e.weekday))),a}function uP(e,n){const[a,r]=n.time.split(":").map(Number),o=Number.isInteger(a)&&Number.isInteger(r)?{hour:a,minute:r}:null;if(e==="once"){const c=new Date(n.at).getTime();return Number.isFinite(c)?{kind:e,at:c}:null}if(e==="every"){const c=Number(n.count)*(n.unit==="hours"?60:1);return Number.isInteger(c)&&c>=NS?{kind:e,minutes:c}:null}return o?e==="daily"?{kind:e,...o}:{kind:e,weekday:Number(n.weekday),...o}:null}function dP({task:e,busy:n,error:a,onSave:r,onDelete:o,onCancel:c}){const[d,f]=w.useState((e==null?void 0:e.name)??""),[h,g]=w.useState((e==null?void 0:e.instruction)??""),[v,p]=w.useState((e==null?void 0:e.schedule.kind)??"daily"),[j,b]=w.useState(()=>cP(e==null?void 0:e.schedule)),[k,S]=w.useState(!1),N=uP(v,j),C=E=>b(T=>({...T,...E}));function M(E){E.preventDefault(),N&&d.trim()&&h.trim()&&r({name:d.trim(),instruction:h.trim(),schedule:N})}return l.jsxs("form",{className:"jv-panel jv-task-editor",onSubmit:M,"aria-label":y(e?"tasks.editTitle":"tasks.newTitle"),children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("tasks.name")}),l.jsx(Nt,{required:!0,maxLength:80,value:d,placeholder:y("tasks.namePlaceholder"),onChange:E=>f(E.target.value)})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("tasks.instruction")}),l.jsx(Ro,{required:!0,maxLength:8e3,rows:4,value:h,placeholder:y("tasks.instructionPlaceholder"),onChange:E=>g(E.target.value)})]}),l.jsxs("div",{className:"jv-field",children:[l.jsx("span",{children:y("tasks.when")}),l.jsx("div",{className:"jv-seg jv-task-kinds",role:"radiogroup","aria-label":y("tasks.when"),children:oP.map(E=>l.jsx("button",{type:"button",role:"radio","aria-checked":v===E,onClick:()=>p(E),children:y(`tasks.kind.${E}`)},E))}),l.jsxs("div",{className:"jv-task-when","data-kind":v,children:[v==="once"&&l.jsx(Nt,{type:"datetime-local","aria-label":y("tasks.at"),value:j.at,onChange:E=>C({at:E.target.value})}),v==="every"&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"jv-task-label",children:y("tasks.everyCount")}),l.jsx(Nt,{type:"number",min:j.unit==="hours"?1:NS,step:1,"aria-label":y("tasks.everyCount"),value:j.count,onChange:E=>C({count:E.target.value})}),l.jsxs(Hr,{value:j.unit,onValueChange:E=>C({unit:E}),children:[l.jsx(Fr,{"aria-label":y("tasks.everyCount"),children:l.jsx(qr,{})}),l.jsx(Ur,{className:"jv-select-menu",children:["minutes","hours"].map(E=>l.jsx(Oi,{value:E,children:y(`tasks.unit.${E}`)},E))})]})]}),v==="weekly"&&l.jsxs(Hr,{value:j.weekday,onValueChange:E=>C({weekday:E}),children:[l.jsx(Fr,{"aria-label":y("tasks.weekday"),children:l.jsx(qr,{})}),l.jsx(Ur,{className:"jv-select-menu",children:[1,2,3,4,5,6,0].map(E=>l.jsx(Oi,{value:String(E),children:SS(E)},E))})]}),(v==="daily"||v==="weekly")&&l.jsx(Nt,{type:"time","aria-label":y("tasks.time"),value:j.time,onChange:E=>C({time:E.target.value})})]}),v==="every"&&!N&&l.jsx("small",{className:"jv-hint",children:y("tasks.minimum")})]}),a&&l.jsx("p",{className:"jv-note-error",role:"alert",children:a}),k&&o&&l.jsxs("div",{className:"jv-env-confirm jv-task-confirm",role:"group","aria-label":y("tasks.deleteTitle",{name:d||(e==null?void 0:e.name)||""}),children:[l.jsx("strong",{children:y("tasks.deleteTitle",{name:d||(e==null?void 0:e.name)||""})}),l.jsx("p",{children:y("tasks.deleteBody")}),l.jsxs("div",{className:"jv-env-confirm-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>S(!1),children:y("common.cancel")}),l.jsx(Ee,{type:"button",variant:"ghost",className:"jv-task-delete",size:"sm",disabled:n,onClick:o,children:y("tasks.delete")})]})]}),l.jsxs("div",{className:"jv-form-footer",children:[l.jsx("div",{className:"jv-task-editor-actions",children:o&&l.jsx(Ee,{type:"button",variant:"ghost",className:"jv-task-delete",disabled:n,onClick:()=>S(!0),children:y("tasks.delete")})}),l.jsxs("div",{className:"jv-task-editor-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",onClick:c,children:y("common.cancel")}),l.jsx(Ee,{type:"submit",className:"jv-primary",disabled:n||!N||!d.trim()||!h.trim(),children:y("common.save")})]})]})]})}function fP({bot:e,runs:n}){const[a,r]=w.useState(null),[o,c]=w.useState(null),{busy:d,error:f,setError:h,run:g}=On(),v=On(),p=d||v.busy,j=v.error;w.useEffect(()=>{let R=!0;return he.tasks(e.id).then(_=>{R&&r(_.tasks)}).catch(_=>{R&&h(un(_,"tasks.loadFailed"))}),()=>{R=!1}},[e.id,n]);const b=R=>r(_=>(_??[]).some(z=>z.id===R.id)?_.map(z=>z.id===R.id?R:z):[..._??[],R]);function k(R){h(""),v.setError(""),c(R)}async function S(R){await v.run("save",async()=>{b(o==="new"||!o?await he.createTask(e.id,R):await he.updateTask(e.id,o.id,R)),c(null)},"tasks.saveFailed")}const N=R=>g("change",R,"tasks.changeFailed"),C=R=>N(async()=>b(await he.setTaskOn(e.id,R.id,R.state!=="active"))),M=R=>N(async()=>{await he.deleteTask(e.id,R.id),r(_=>(_==null?void 0:_.filter(z=>z.id!==R.id))??null),c(null)}),E=R=>R.state==="active"?R.schedule.kind==="once"||!R.nextRunAt?"":y("tasks.next",{time:CS(R.nextRunAt)}):y(R.state==="done"?"tasks.done":"tasks.paused"),T=R=>[lP(R.schedule),E(R)].filter(Boolean).join(" · ");return l.jsxs("section",{className:"jv-section","aria-label":y("tasks.title"),children:[l.jsxs("div",{className:"jv-task-head",children:[l.jsx("h3",{className:"jv-section-title",children:y("tasks.title")}),!o&&l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:p||a===null,onClick:()=>k("new"),children:[l.jsx(Br,{}),y("tasks.add")]})]}),o?l.jsx(dP,{task:o==="new"?void 0:o,busy:p,error:j,onSave:R=>void S(R),onCancel:()=>c(null),...o==="new"?{}:{onDelete:()=>void M(o)}}):a&&l.jsx("div",{className:"jv-list",children:a.length===0?l.jsx("div",{className:"jv-list-row jv-static-row",children:l.jsx("span",{className:"jv-row-text",children:l.jsx("span",{children:y("tasks.empty")})})}):a.map(R=>l.jsxs("div",{className:"jv-task-row","data-state":R.state,children:[l.jsx("button",{type:"button",className:"jv-list-row jv-task-open","aria-label":R.name,onClick:()=>k(R),children:l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:R.name}),l.jsx("span",{children:T(R)})]})}),R.state!=="done"&&l.jsx("button",{type:"button",role:"switch","aria-checked":R.state==="active","aria-label":y("tasks.toggle",{name:R.name}),disabled:p,className:"jv-env-access jv-task-switch",onClick:()=>void C(R),children:l.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})})]},R.id))}),f&&l.jsx("p",{className:"jv-note-error",role:"alert",children:f})]})}function ES({id:e,open:n,onToggle:a,text:r,meta:o,extra:c,busy:d,error:f,remove:h,confirming:g,onAskRemove:v,onCancel:p,onConfirm:j,children:b}){const k=l.jsxs("button",{type:"button",className:"jv-list-row jv-secret-row","aria-expanded":n,"aria-controls":e,onClick:a,children:[l.jsx("span",{className:"jv-row-text",children:r}),o,c&&l.jsx("span",{className:"jv-secret-room","aria-hidden":"true"}),l.jsx(Al,{className:"jv-row-chevron","aria-hidden":"true"})]});return l.jsxs(l.Fragment,{children:[c?l.jsxs("div",{className:"jv-secret-head",children:[k,l.jsx("span",{className:"jv-secret-extra",children:c})]}):k,n&&l.jsxs("div",{id:e,className:"jv-list-row jv-static-row jv-secret-details",children:[b,g?l.jsxs("div",{className:"jv-secret-confirm",role:"group","aria-label":g.title,children:[l.jsx("strong",{children:g.title}),l.jsx("p",{children:g.body}),l.jsxs("div",{className:"jv-secret-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:p,children:y("common.cancel")}),l.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:d,onClick:j,children:g.confirm})]})]}):l.jsx("div",{className:"jv-secret-actions jv-secret-danger",children:l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",disabled:d,onClick:v,children:h})}),f&&l.jsx("p",{className:"jv-note-error",role:"alert",children:f})]})]})}const gj={local:"ports.hint.local",idle:"ports.hint.idle",stopped:"ports.hint.stopped"};function hP(e){const n=`${location.protocol}//${location.hostname.includes(":")?`[${location.hostname}]`:location.hostname}:${e.hostPort}`;return[n,...e.urls.filter(a=>a!==n)]}function TS({bot:e,runs:n}){const[a,r]=w.useState(null),[o,c]=w.useState(null),[d,f]=w.useState(!1),[h,g]=w.useState(null),{busy:v,error:p,setError:j,run:b}=On();w.useEffect(()=>{let C=!0;return he.ports(e.id).then(M=>{C&&r(M.ports)}).catch(M=>{C&&j(un(M,"ports.loadFailed"))}),()=>{C=!1}},[e.id,n]);function k(C){j(""),f(!1),c(M=>M===C?null:C)}const S=C=>b("unpublish",async()=>{await he.unpublishPort(e.id,C.port),r(M=>(M==null?void 0:M.filter(E=>E.port!==C.port))??null),c(null),f(!1)},"ports.changeFailed"),N=o!==null&&!!(a!=null&&a.some(C=>C.port===o));return l.jsxs("section",{className:"jv-section","aria-label":y("ports.title"),children:[l.jsx("h3",{className:"jv-section-title",children:y("ports.title")}),a&&l.jsx("div",{className:"jv-list",children:a.length===0?l.jsx("div",{className:"jv-list-row jv-static-row",children:l.jsx("span",{className:"jv-row-text",children:l.jsx("span",{children:y("ports.empty")})})}):a.map(C=>{const M=hP(C),E=o===C.port;return l.jsxs(ES,{id:`port-${e.id}-${C.port}`,open:E,onToggle:()=>k(C.port),busy:v,error:E?p:"",text:l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:C.name}),l.jsxs("span",{className:"jv-port-line",children:[y("ports.port",{port:C.hostPort})," · ",l.jsx("span",{className:"jv-port-state","data-state":C.state,children:y(`ports.state.${C.state}`)})]})]}),meta:null,extra:l.jsx(Ee,{asChild:!0,variant:"ghost",size:"icon-sm",children:l.jsx("a",{href:M[0],target:"_blank",rel:"noopener noreferrer","aria-label":y("ports.open",{name:C.name}),children:l.jsx(b0,{})})}),remove:y("ports.stop"),confirming:E&&d?{title:y("ports.stopTitle",{name:C.name}),body:y("ports.stopBody"),confirm:y("ports.stop")}:null,onAskRemove:()=>f(!0),onCancel:()=>f(!1),onConfirm:()=>void S(C),children:[C.description&&l.jsx("p",{className:"jv-port-about",children:C.description}),gj[C.state]&&l.jsx("p",{className:"jv-port-hint",role:"note",children:y(gj[C.state])}),l.jsx("div",{className:"jv-port-links",children:M.map((T,R)=>l.jsxs("div",{className:"jv-port-link",children:[l.jsx("span",{children:y(R?"ports.linkOther":"ports.link")}),l.jsx("code",{title:T,children:T}),l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":y(h===T?"ui.copied":"ports.copy"),onClick:()=>void Ho(T).then(_=>g(_?T:null)),children:h===T?l.jsx(Li,{}):l.jsx(Wc,{})}),l.jsx(Ee,{asChild:!0,variant:"ghost",size:"icon-sm",children:l.jsx("a",{href:T,target:"_blank",rel:"noopener noreferrer","aria-label":y("ports.open",{name:C.name}),children:l.jsx(b0,{})})})]},T))}),l.jsx("p",{className:"jv-port-from",children:y("ports.from",{port:C.port})})]},C.port)})}),p&&!N&&l.jsx("p",{className:"jv-note-error",role:"alert",children:p})]})}const jo=[["overview","bot.tab.overview"],["profile","bot.tab.profile"],["environment","bot.tab.environment"],["access","bot.tab.access"],["tasks","bot.tab.tasks"],["activity","bot.tab.activity"],["usage","usage.title"]];function mP({bot:e,status:n,connections:a,chats:r,onSaved:o,onManageModels:c,onManageSecrets:d,onAddMachine:f,onClose:h,onOpenChat:g,onOpenSubscription:v}){const[p,j]=w.useState("overview"),[b,k]=w.useState(()=>new Set(["overview"])),S=w.useRef(null);w.useEffect(()=>{var T;(T=S.current)==null||T.scrollIntoView({block:"nearest",inline:"nearest"})},[p]);const N=T=>{j(T),k(R=>R.has(T)?R:new Set(R).add(T))},C=T=>{const R=jo.findIndex(([z])=>z===p),_={ArrowRight:R+1,ArrowLeft:R-1,Home:0,End:jo.length-1}[T.key];_!==void 0&&(T.preventDefault(),N(jo[(_+jo.length)%jo.length][0]),requestAnimationFrame(()=>{var z;return(z=S.current)==null?void 0:z.focus()}))},M=`${(n==null?void 0:n.status)??"stop"}:${(n==null?void 0:n.runId)??""}`,E=(T,R,_=!1)=>b.has(T)&&l.jsx("div",{id:`jv-bot-panel-${T}`,role:"tabpanel","aria-labelledby":`jv-bot-tab-${T}`,hidden:p!==T,className:_?"jv-bot-fill":"jv-bot-scroll",children:R},T);return l.jsx(gS,{open:!0,onOpenChange:T=>{T||h()},children:l.jsxs(vS,{className:"jv-bot-info jv-ui","aria-describedby":void 0,children:[l.jsx(VI,{bot:e,status:n,onSaved:o}),l.jsx("div",{className:"jv-bot-tabs",role:"tablist","aria-label":y("entry.botInfo"),onKeyDown:C,children:jo.map(([T,R])=>l.jsx("button",{id:`jv-bot-tab-${T}`,ref:p===T?S:void 0,type:"button",role:"tab","aria-selected":p===T,"aria-controls":`jv-bot-panel-${T}`,tabIndex:p===T?0:-1,onClick:()=>N(T),children:y(R)},T))}),E("overview",l.jsx(KI,{bot:e,status:n,connections:a,chats:r,onSaved:o,onManageModels:c,onOpenSubscription:v})),E("profile",l.jsx(XI,{bot:e,onSaved:o})),E("environment",l.jsxs(l.Fragment,{children:[l.jsx(jS,{bot:e,onSaved:o}),l.jsx(TS,{bot:e,runs:M})]})),E("access",l.jsx(rP,{bot:e,onSaved:o,onManageSecrets:d,onAddMachine:f})),E("tasks",l.jsx(fP,{bot:e,runs:M})),E("activity",l.jsx(wI,{botId:e.id,onOpenChat:g}),!0),E("usage",l.jsx(EI,{botId:e.id}),!0)]})})}function MS({id:e,value:n,sections:a,onChange:r}){const[o,c]=w.useState(null);return l.jsxs(Hr,{value:n??"none",onValueChange:d=>r(d==="none"?null:d),children:[l.jsx(Fr,{id:e,ref:d=>c((d==null?void 0:d.closest("dialog"))??null),className:"jv-select jv-section-select",children:l.jsx(qr,{})}),l.jsxs(Ur,{className:"jv-select-menu",position:"popper",sideOffset:4,container:o,children:[l.jsx(Oi,{value:"none",children:y("info.noSection")}),a.map(d=>l.jsx(Oi,{value:d.id,children:d.name},d.id))]})]})}const pP=1024*1024,gP=e=>e==="text"||e==="markdown"||e==="html"||e==="svg",vP=["txt","json","jsonl","yaml","yml","ts","tsx","js","jsx","mjs","cjs","css","log","csv","py","sh","sql","toml","xml","ini","env","diff","patch"],ka=e=>`/api/attachments/${e.id}`,yP=e=>wg(e)==="gif"||e.mimeType==="image/gif"?ka(e):`${ka(e)}/thumb`,wg=e=>e.name.includes(".")?e.name.split(".").pop().toLowerCase():"";function ou(e){const n=wg(e),a=e.mimeType.toLowerCase();return n==="svg"||a==="image/svg+xml"?"svg":a.startsWith("image/")||["png","jpg","jpeg","gif","webp","avif","bmp"].includes(n)?"image":a.startsWith("video/")?"video":a.startsWith("audio/")?"audio":["webm","mp4","mov"].includes(n)?"video":["mp3","wav","ogg"].includes(n)?"audio":["html","htm"].includes(n)||a==="text/html"?"html":["md","markdown"].includes(n)?"markdown":a.startsWith("text/")||vP.includes(n)?"text":"download"}const qc=e=>e==="image"||e==="svg",AS=e=>e==="video"||e==="audio",_S={image:"files.kindImage",svg:"files.kindSvg",video:"files.kindVideo",audio:"files.kindAudio",html:"files.kindHtml",markdown:"files.kindMarkdown",text:"files.kindText",download:"files.kindFile"};function RS(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024**3?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024**3).toFixed(2)} GB`}async function zS(e,n){const a=await fetch(ka(e),{signal:n,credentials:"same-origin"});if(!a.ok)throw new Error(a.status===404?y("files.gone"):y("files.readFailed",{status:a.status}));return a.text()}async function OS(e,n){return ou(e)==="svg"?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await zS(e,n))}`:ka(e)}const vj=e=>`/api/attachments/${e.id}/run`;function xP(e){const n=new DOMParser().parseFromString(e,"text/html");let a=n.querySelectorAll("script").length;const r=new Set;return n.querySelectorAll("*").forEach(o=>{for(const c of[...o.attributes])if(c.name.startsWith("on"))a++;else if(/^\s*javascript:/i.test(c.value)&&["href","src","action","formaction","xlink:href"].includes(c.name))a++;else if(["src","href"].includes(c.name)&&o.tagName!=="A")try{const d=new URL(c.value);(d.protocol==="http:"||d.protocol==="https:")&&r.add(d.host)}catch{}}),a?{count:a,hosts:[...r]}:null}function bP(e){const n=new DOMParser().parseFromString(e,"text/html");return n.querySelectorAll("script,iframe,frame,object,embed,link,meta,base,audio,video,source,track").forEach(a=>a.remove()),n.querySelectorAll("*").forEach(a=>{for(const r of[...a.attributes])(r.name.startsWith("on")||["href","xlink:href","srcset","action","formaction","target","autofocus","contenteditable"].includes(r.name)||r.name==="src"&&!r.value.startsWith("data:image/"))&&a.removeAttribute(r.name);["BUTTON","INPUT","SELECT","TEXTAREA"].includes(a.tagName)&&a.setAttribute("disabled","")}),`<!doctype html><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:; form-action 'none'; base-uri 'none'"><meta charset="utf-8">${n.documentElement.outerHTML}`}const yj=new Map;function jP({file:e,onSize:n}){const a=ou(e)==="svg",[r,o]=w.useState(()=>a?void 0:yP(e)),[c,d]=w.useState(!1);w.useEffect(()=>{if(!a)return;const h=new AbortController;return d(!1),OS(e,h.signal).then(o).catch(()=>{h.signal.aborted||d(!0)}),()=>h.abort()},[e.id]);const f=()=>{!a&&r!==ka(e)?o(ka(e)):d(!0)};return c?l.jsx("span",{className:"ui-broken-image",children:l.jsx(Pe,{name:"image"})}):r?l.jsx("img",{src:r,alt:e.name,loading:"lazy",onError:f,onLoad:h=>{const{naturalWidth:g,naturalHeight:v}=h.currentTarget;g&&v&&n({width:g,height:v})}}):l.jsx(Pe,{name:"image"})}function wP({file:e,onOpen:n}){const[a,r]=w.useState(()=>yj.get(e.id)),o=ou(e),c=qc(o),d=AS(o),f=wg(e).toUpperCase(),h=c&&a?{"--image-w":`${a.width}px`,"--image-ratio":`${a.width/a.height}`}:void 0;return l.jsxs("div",{className:`ui-message-file ${c?"ui-message-image":""}`,"data-sized":h?"":void 0,style:h,children:[l.jsxs("button",{type:"button",className:"ui-message-open",onClick:n,"aria-label":y("files.preview",{name:e.name}),children:[c?l.jsx("span",{className:"ui-image-frame",children:l.jsx(jP,{file:e,onSize:g=>{yj.set(e.id,g),r(g)}})}):l.jsx("span",{className:"ui-file-icon","data-kind":d?o:void 0,children:l.jsx(Pe,{name:d?`file-${o}`:"file"})}),l.jsxs("span",{className:"ui-file-copy",children:[l.jsx("strong",{title:e.name,children:e.name}),l.jsxs("small",{children:[d?`${y(_S[o])} · `:"",f?`${f} · `:"",RS(e.size)]})]})]}),l.jsx("a",{className:"ui-iconbtn",href:ka(e),download:e.name,"aria-label":y("files.download",{name:e.name}),title:y("files.download",{name:e.name}),children:l.jsx(Pe,{name:"cloud-download"})})]})}function DS({files:e,onOpen:n}){const a=e.some(r=>qc(ou(r)));return l.jsx("div",{className:`ui-message-files ${a?"ui-has-images":""}`,children:e.map((r,o)=>l.jsx(wP,{file:r,onOpen:()=>n(o)},r.id))})}function LS({icon:e,title:n,titleClass:a,purpose:r,label:o,busy:c,error:d,ready:f,decline:h,confirm:g,onDecline:v,onConfirm:p,children:j}){const b=k=>{k.preventDefault(),f&&p()};return l.jsxs("form",{className:"jv-question jv-secret-request",autoComplete:"off","aria-label":o,"aria-busy":c||void 0,onSubmit:b,children:[l.jsxs("div",{className:"jv-question-head",children:[l.jsx("span",{className:"jv-question-icon",children:e}),l.jsxs("div",{className:"jv-question-heading",children:[l.jsx("p",{className:a?`jv-question-title ${a}`:"jv-question-title",children:n}),l.jsx("p",{className:"jv-question-detail",children:r})]})]}),l.jsxs("div",{className:"jv-question-body",children:[j,d&&l.jsx("p",{className:"jv-question-error",role:"alert",children:d})]}),l.jsxs("div",{className:"jv-question-foot",children:[l.jsx("button",{type:"button",className:"ui-button",disabled:c,onClick:v,children:h}),l.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:c||!f,children:g})]})]})}function BS({state:e,text:n,purpose:a}){return l.jsxs("p",{className:"jv-question-done","data-state":e,title:`${n}
|
|
791
|
+
${a}`,children:[e==="answered"?l.jsx(Li,{"aria-hidden":"true"}):l.jsx(Sw,{"aria-hidden":"true"}),l.jsx("span",{className:"jv-question-answer",children:n}),l.jsx("span",{className:"jv-question-asked",children:a})]})}function IS({label:e,value:n,visible:a,disabled:r,autoFocus:o,placeholder:c,hint:d,short:f,onChange:h,onVisible:g}){return l.jsxs("label",{className:"ui-field jv-secret-request-value",children:[l.jsx("span",{children:e}),l.jsxs("span",{className:"jv-secret-request-field",children:[l.jsx("input",{type:a?"text":"password",autoComplete:"new-password",spellCheck:!1,autoFocus:o,placeholder:c,value:n,disabled:r,onChange:v=>h(v.target.value)}),l.jsx("button",{type:"button","aria-label":y(a?"secrets.hideValue":"secrets.showValue"),onClick:()=>g(!a),children:a?l.jsx(v1,{}):l.jsx(y1,{})})]}),l.jsx("small",{"data-short":f||void 0,children:d})]})}function kP({message:e,onSettled:n}){var M;const a=e.question,r=a.secret,[o,c]=w.useState(""),[d,f]=w.useState(!1),[h,g]=w.useState(!1),[v,p]=w.useState("always"),{busy:j,error:b,run:k}=On();if(a.state!=="pending"){const E=((M=a.answer)==null?void 0:M.selected[0])===1?"once":"always",T=a.state==="answered"?y(E==="once"?"secretCard.allowedOnce":"secretCard.allowedAlways",{name:r.name}):y(a.state==="dismissed"?"secretCard.declined":"secretCard.ignored",{name:r.name});return l.jsx(BS,{state:a.state,text:T,purpose:r.purpose})}const S=r.needsValue||h,N=o.length>0&&o.length<8,C=E=>{j||k("answer",async()=>n(await E()),"question.failed")};return l.jsxs(LS,{icon:l.jsx(b1,{"aria-hidden":"true"}),title:r.name,titleClass:"jv-secret-request-name",purpose:r.purpose,label:y("secretCard.title",{name:r.name}),busy:j,error:b,ready:!S||!!o,decline:y("secretCard.decline"),confirm:y(S?"secretCard.saveAllow":"secretCard.allow"),onDecline:()=>C(()=>he.answerQuestion(e.chatId,e.id,{action:"dismiss"})),onConfirm:()=>C(()=>he.fulfilSecret(e.chatId,e.id,{scope:v,...S?{value:o}:{}})),children:[!window.isSecureContext&&l.jsxs("p",{className:"jv-secret-request-warning",role:"alert",children:[l.jsx(Tf,{"aria-hidden":"true"}),y("secretCard.insecure")]}),r.exists&&!r.needsValue&&l.jsxs("p",{className:"jv-secret-request-note",children:[y("secretCard.exists"),l.jsx("button",{type:"button",className:"jv-secret-request-link",onClick:()=>{g(!h),c("")},children:y(h?"secretCard.keepValue":"secretCard.replace")})]}),r.exists&&r.needsValue&&l.jsx("p",{className:"jv-secret-request-note",children:y("secretCard.unreadable")}),S&&l.jsx(IS,{label:y("secretCard.value"),value:o,visible:d,disabled:j,autoFocus:!0,placeholder:y("secretCard.valuePlaceholder"),hint:y(N?"secrets.shortValue":"secretCard.valueHint"),short:N,onChange:c,onVisible:f}),l.jsxs("div",{className:"jv-secret-request-scope",children:[l.jsx("div",{className:"jv-secret-request-seg",role:"radiogroup","aria-label":y("secretCard.scope"),children:["always","once"].map(E=>l.jsx("button",{type:"button",role:"radio","aria-checked":v===E,disabled:j,onClick:()=>p(E),children:y(E==="always"?"secretCard.always":"secretCard.once")},E))}),l.jsx("small",{children:y(v==="always"?"secretCard.alwaysHint":"secretCard.onceHint")})]})]})}function SP({message:e,onSettled:n}){const a=e.question,r=a.machine,[o,c]=w.useState(""),[d,f]=w.useState(!1),{busy:h,error:g,setError:v,run:p}=On(),[j,b]=w.useState("password"),k=kS(a.state==="pending"&&!r.existing&&j==="key"),S=`${r.user}@${r.host}${r.port===22?"":`:${r.port}`}`;if(a.state!=="pending"){const E=y(a.state==="answered"?r.existing?"machineCard.granted":"machineCard.added":a.state==="dismissed"?"machineCard.declined":"machineCard.ignored",{name:r.name});return l.jsx(BS,{state:a.state,text:E,purpose:r.purpose})}const N=E=>{h||p("answer",async()=>{try{n(await E())}catch(T){throw T instanceof Wa&&T.code==="ssh_key_expired"&&k.renew(),T}},"question.failed")},C=!r.existing,M=!C||(j==="key"?!!k.key:!!o);return l.jsxs(LS,{icon:l.jsx(k1,{"aria-hidden":"true"}),title:r.name,purpose:r.purpose,label:y("machineCard.title",{name:r.name}),busy:h,error:g,ready:M,decline:y("machineCard.decline"),confirm:y(C?j==="key"?h?"machines.verifying":"machines.verify":h?"machines.connecting":"machineCard.add":"machineCard.allow"),onDecline:()=>N(()=>he.answerQuestion(e.chatId,e.id,{action:"dismiss"})),onConfirm:()=>N(()=>he.fulfilMachine(e.chatId,e.id,j==="key"&&k.key?{keyId:k.key.keyId}:{password:o})),children:[l.jsxs("p",{className:"jv-machine-where",children:[l.jsx("code",{children:S}),r.directory&&l.jsx("code",{children:r.directory})]}),r.existing?l.jsx("p",{className:"jv-secret-request-note",children:y("machineCard.existing")}):l.jsxs(l.Fragment,{children:[!window.isSecureContext&&l.jsxs("p",{className:"jv-secret-request-warning",role:"alert",children:[l.jsx(Tf,{"aria-hidden":"true"}),y("secretCard.insecure")]}),l.jsxs("div",{className:"jv-machine-card-field",children:[l.jsx("span",{children:y("machines.fingerprint")}),l.jsx("div",{className:"jv-machine-prints",children:r.hostKeys.fingerprints.map(E=>l.jsx("code",{children:E},E))}),l.jsx("small",{children:y("machines.fingerprintHint")})]}),l.jsx("div",{className:"jv-secret-request-seg",role:"radiogroup","aria-label":y("machines.login"),children:["password","key"].map(E=>l.jsx("button",{type:"button",role:"radio","aria-checked":j===E,disabled:h,onClick:()=>{b(E),v("")},children:y(E==="password"?"machines.byPassword":"machines.byKey")},E))}),j==="password"?l.jsx(IS,{label:y("machines.password"),value:o,visible:d,disabled:h,hint:y("machines.passwordHint"),onChange:c,onVisible:f}):l.jsxs("div",{className:"jv-machine-card-field",children:[l.jsx("span",{children:y("machines.publicKey")}),k.key?l.jsx(jg,{publicKey:k.key.publicKey}):k.error?l.jsx("p",{className:"jv-question-error",role:"alert",children:k.error}):l.jsx("small",{children:"…"}),l.jsx("small",{children:y("machines.keyHint",{user:r.user})})]})]})]})}const xj=e=>String.fromCharCode(65+e),bj=e=>e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable;function PS(e){const{message:n}=e,{secret:a,machine:r}=n.question;return a?l.jsx(kP,{message:{...n,question:{...n.question,secret:a}},onSettled:e.onSettled}):r?l.jsx(SP,{message:{...n,question:{...n.question,machine:r}},onSettled:e.onSettled}):l.jsx(CP,{...e})}function CP({message:e,keyboard:n,onSettled:a}){var C,M;const r=e.question,o=r.state==="pending",c=w.useId(),[d,f]=w.useState([]),[h,g]=w.useState(""),{busy:v,error:p,run:j}=On();async function b(E){v||!o||await j("settle",async()=>a(await he.answerQuestion(e.chatId,e.id,E)),"question.failed")}const k=E=>{if(!r.multiple){b({action:"answer",selected:[E]});return}f(T=>T.includes(E)?T.filter(R=>R!==E):[...T,E])},S=()=>void b({action:"answer",selected:d,...h.trim()?{custom:h.trim()}:{}}),N=()=>{h.trim()&&(r.multiple?S():b({action:"answer",selected:[],custom:h.trim()}))};if(w.useEffect(()=>{if(!n||!o)return;const E=T=>{if(T.defaultPrevented||T.metaKey||T.ctrlKey||T.altKey||T.key.length!==1||bj(T.target)||bj(document.activeElement)||document.querySelector("dialog[open], [role=dialog]"))return;const R=T.key.toUpperCase().charCodeAt(0)-65;R<0||R>=r.options.length||(T.preventDefault(),k(R))};return document.addEventListener("keydown",E,!0),()=>document.removeEventListener("keydown",E,!0)}),!o){const E=r.state==="answered"?[...(((C=r.answer)==null?void 0:C.selected)??[]).map(T=>{var R;return((R=r.options[T])==null?void 0:R.label)??""}),...(M=r.answer)!=null&&M.custom?[r.answer.custom]:[]].filter(Boolean).join(y("common.listSeparator")):null;return l.jsxs("p",{className:"jv-question-done","data-state":r.state,title:`${r.question}
|
|
792
|
+
${E===null?y("question.dismissed"):y("question.chose",{answer:E})}`,children:[E===null?l.jsx(Sw,{"aria-hidden":"true"}):l.jsx(Li,{"aria-hidden":"true"}),l.jsx("span",{className:"jv-question-answer",children:E===null?y("question.dismissed"):h1("question.chose",{answer:l.jsx("strong",{children:E})})}),l.jsx("span",{className:"jv-question-asked",children:r.question})]})}return l.jsxs("div",{className:"jv-question",role:"group","aria-labelledby":c,"aria-busy":v||void 0,children:[l.jsxs("div",{className:"jv-question-head",children:[l.jsx("span",{className:"jv-question-icon",children:l.jsx(gw,{"aria-hidden":"true"})}),l.jsxs("div",{className:"jv-question-heading",children:[l.jsx("p",{id:c,className:"jv-question-title",children:r.question}),r.detail&&l.jsx("p",{className:"jv-question-detail",children:r.detail})]}),l.jsx("button",{type:"button",className:"jv-question-dismiss","aria-label":y("question.dismissLabel"),title:y("question.dismiss"),disabled:v,onClick:()=>void b({action:"dismiss"}),children:l.jsx(zo,{"aria-hidden":"true"})})]}),l.jsxs("div",{className:"jv-question-body",children:[l.jsx("div",{className:"jv-question-options",role:r.multiple?"group":void 0,"aria-label":r.multiple?y("question.multiple"):void 0,children:r.options.map((E,T)=>{const R=d.includes(T);return l.jsxs("button",{type:"button",className:"jv-question-option","data-style":E.style,"data-on":R||void 0,"aria-pressed":r.multiple?R:void 0,"aria-keyshortcuts":n?xj(T).toLowerCase():void 0,disabled:v,onClick:()=>k(T),children:[l.jsx("span",{className:"jv-question-key","aria-hidden":"true",children:R?l.jsx(Li,{}):xj(T)}),l.jsxs("span",{className:"jv-question-copy",children:[l.jsx("strong",{children:E.label}),E.description&&l.jsx("small",{children:E.description})]})]},E.label)})}),p&&l.jsx("p",{className:"jv-question-error",role:"alert",children:p})]}),(r.allowCustom||r.multiple)&&l.jsxs("div",{className:"jv-question-foot",children:[r.allowCustom&&l.jsx("input",{className:"jv-question-custom",value:h,maxLength:2e3,placeholder:y(r.multiple?"question.note":"question.own"),"aria-label":y("question.ownLabel"),disabled:v,onChange:E=>g(E.target.value),onKeyDown:E=>{E.key==="Enter"&&!E.nativeEvent.isComposing&&(E.preventDefault(),N())}}),r.multiple?l.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:v||!d.length&&!h.trim(),onClick:S,children:d.length?y("question.confirmCount",{count:d.length}):y("question.confirm")}):l.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:v||!h.trim(),onClick:N,children:y("question.send")})]})]})}function Ta(e){return e?e.deleted?y("member.deleted",{name:e.name}):e.name:y("member.unknown")}const NP={reasoning:"activity.reasoning",texting:"activity.texting",tool_calling:"activity.toolCalling",asking:"activity.asking"},HS=e=>y(NP[e??""]??"activity.running");function qS(e,n){return e!=null&&e.connectionId?n!=null&&n.error?{label:y("activity.error"),tone:"error"}:(n==null?void 0:n.status)==="running"?{label:HS(n.activity),tone:"busy"}:{label:y((n==null?void 0:n.status)==="idle"?"activity.idle":"activity.stopped")}:{label:y("activity.noModel")}}const EP=e=>e.environment.current==="ssh"?y("botCard.onMachine",{name:e.environment.currentName??""}):y("botCard.sandbox"),Na=e=>e.filter(n=>!n.deleted);function TP(e){const n=new Set(e.map(r=>r.toLowerCase()));let a=y("bot.newName");for(let r=2;n.has(a.toLowerCase());r++)a=y("bot.newNameN",{n:r});return a}const e0=/[\p{Script=Latin}\p{Nd}_]/u;function kg(e,n){const a=e.replace(/```[\s\S]*?```|`[^`\n]*`/g,d=>" ".repeat(d.length)),r=a.toLowerCase(),o=[...n].sort((d,f)=>f.name.length-d.name.length),c=[];for(let d=r.indexOf("@");d>=0;d=r.indexOf("@",d+1)){if(d>0&&e0.test(a[d-1]))continue;const f=o.find(h=>{const g=h.name.toLowerCase();if(!g||!r.startsWith(g,d+1))return!1;const v=a[d+1+g.length];return!(v&&e0.test(v)&&e0.test(g.at(-1)))});f&&(c.push({member:f,at:d,length:f.name.length+1}),d+=f.name.length)}return c}function MP(e,n,a){let r="",o=0;for(const c of kg(e,n))r+=e.slice(o,c.at)+`[${e.slice(c.at,c.at+c.length)}](${c.member.id===a?"#mention-me":"#mention"})`,o=c.at+c.length;return r+e.slice(o)}function AP(e){return e.type==="dm"?y("ref.dm",{title:e.title}):e.type==="thread"&&e.parentTitle?`# ${e.parentTitle} › ${e.title}`:`# ${e.title}`}function _P({target:e,members:n,onJump:a}){const[r,o]=w.useState(!1),c=w.useRef(""),d=w.useRef(void 0),f=w.useRef(!1);w.useEffect(()=>()=>window.clearTimeout(d.current),[]);const h=Ta(n.find(b=>b.id===e.senderId)),g=Os(e),v=(b,k)=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>o(b),k)},p=b=>k=>{k.pointerType==="mouse"&&v(b,b?350:150)},j=()=>{window.clearTimeout(d.current),f.current=!0,o(!1),a==null||a()};return l.jsxs(Pf,{open:r,onOpenChange:o,children:[l.jsxs(Hf,{className:"jv-ref-tag",title:"","aria-label":y("ref.label",{name:h,text:g}),onPointerDown:b=>{c.current=b.pointerType},onPointerEnter:p(!0),onPointerLeave:p(!1),onClick:b=>{const k=c.current==="touch"||c.current==="pen";c.current="",!k&&a&&(b.preventDefault(),j())},children:[l.jsx(Pe,{name:"chat-bubble"}),l.jsx("span",{className:"jv-quote-name",children:y("quote.by",{name:h})}),l.jsx("span",{className:"jv-quote-text",children:g})]}),l.jsx(qf,{children:l.jsxs(Ff,{className:"jv-ref-card jv-ui",side:"top",align:"start",sideOffset:6,collisionPadding:12,onOpenAutoFocus:b=>b.preventDefault(),onPointerEnter:p(!0),onPointerLeave:p(!1),onCloseAutoFocus:b=>{f.current&&b.preventDefault(),f.current=!1},children:[l.jsxs("div",{className:"jv-ref-place",children:[l.jsx("span",{children:AP(e.chat)}),l.jsxs("span",{children:[Nf(e.createdAt)," ",Ml(e.createdAt)]})]}),l.jsx("div",{className:"jv-ref-name",children:h}),l.jsx("p",{className:"jv-ref-text",children:g}),a&&l.jsx("button",{type:"button",className:"jv-ref-open",onClick:j,children:y("ref.open")})]})})]})}const FS=/\[\[q(\d+)\]\]/g,r1=(e,n=40)=>{const a=e.replace(/\s+/g," ").trim();return a.length>n?`${a.slice(0,n)}…`:a};function Sg(e){return e.content.replace(FS,(n,a)=>{const r=e.quotes[Number(a)-1];return r?y("quote.inline",{text:r.text}):n})}function Os(e){return Sg(e).replace(/[*`~#>]/g,"").replace(/\s+/g," ").trim()||y("common.attachment")}function US({message:e,members:n,me:a,onJump:r}){const o=MP(e.content,n.filter(f=>e.mentions.includes(f.id)),a).replace(FS,(f,h)=>e.quotes[Number(h)-1]?`[q${h}](#quote-${h})`:f),c=f=>{const h=e.quotes[f-1];if(!h)return null;const g=Ta(n.find(v=>v.id===h.senderId));return l.jsxs("button",{type:"button",className:"jv-quote-tag",title:y("sidebar.said",{name:g,text:h.text}),"data-gone":h.messageId?void 0:"",onClick:()=>r==null?void 0:r(h.messageId,h.text),children:[l.jsx(Pe,{name:"quote"}),l.jsx("span",{className:"jv-quote-name",children:y("quote.by",{name:g})}),l.jsx("span",{className:"jv-quote-text",children:r1(h.text,80)})]})},d=f=>{const h=e.refs.find(g=>g.id===f);return h?l.jsx(_P,{target:h,members:n,onJump:r&&(()=>r(f))}):null};return l.jsx(qo,{text:o,renderQuote:c,renderRef:d})}function $S(e,n){var p;const a=n.replace(/\s+/g,"");if(!a||typeof CSS>"u"||!("highlights"in CSS))return!1;const r=e.querySelector(".ui-bubble")??e,o=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),c=[];for(let j=o.nextNode();j;j=o.nextNode())if(!((p=j.parentElement)!=null&&p.closest(".jv-quote-tag, button")))for(let b=0;b<j.data.length;b++)/\s/.test(j.data[b])||c.push({node:j,offset:b});const d=c.map(j=>j.node.data[j.offset]).join(""),f=d.indexOf(a);if(f<0)return!1;const h=c[f],g=c[f+a.length-1],v=new Range;return v.setStart(h.node,h.offset),v.setEnd(g.node,g.offset+1),CSS.highlights.set("jv-passage",new Highlight(v)),setTimeout(()=>CSS.highlights.delete("jv-passage"),2400),!0}function jf(e,n){var a;(a=e.querySelector(".jv-long-toggle[aria-expanded='false']"))==null||a.click(),e.scrollIntoView({block:"center",behavior:"smooth"}),!(n&&$S(e,n))&&(e.classList.add("jv-jump"),setTimeout(()=>e.classList.remove("jv-jump"),1200))}function RP({quotes:e,onRemove:n}){return e.length?l.jsx("div",{className:"jv-compose-quotes",children:e.map((a,r)=>l.jsxs("span",{className:"jv-quote-tag",title:y("sidebar.said",{name:a.name,text:a.text}),children:[l.jsx(Pe,{name:"quote"}),l.jsx("span",{className:"jv-quote-name",children:y("quote.by",{name:a.name})}),l.jsx("span",{className:"jv-quote-text",children:r1(a.text)}),l.jsx("button",{type:"button","aria-label":y("quote.remove",{text:r1(a.text,20)}),onClick:()=>n(r),children:"×"})]},r))}):null}function Cg({container:e,drafts:n,chatId:a,source:r,members:o,onNotice:c}){const d=(v,p)=>{const j=r(v);j&&!zP(n,a,j,o,p)&&c(y("quote.tooMany",{count:10}))},[f,h]=w.useState(null);if(w.useEffect(()=>{const v=e.current;if(!v||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;const p=C=>{var M;return(M=C instanceof Element?C:C==null?void 0:C.parentElement)==null?void 0:M.closest(".ui-bubble")},j=()=>{var _,z;const C=getSelection(),M=(C==null?void 0:C.toString())??"";if(!C||C.isCollapsed||!M.trim()){h(null);return}const E=p(C.anchorNode),T=E==null?void 0:E.closest("[data-message]");if(!E||!T||!v.contains(E)||p(C.focusNode)!==E||(z=(_=C.anchorNode)==null?void 0:_.parentElement)!=null&&z.closest(".jv-quote-tag, button")){h(null);return}const R=C.getRangeAt(0).getBoundingClientRect();h({x:Math.min(Math.max(R.left+R.width/2,90),innerWidth-90),y:Math.max(R.top-8,48),messageId:T.getAttribute("data-message"),text:M.trim()})},b=()=>requestAnimationFrame(j),k=()=>h(null),S=C=>{C.key==="Escape"&&k()},N=()=>{var C;(C=getSelection())!=null&&C.isCollapsed&&k()};return v.addEventListener("mouseup",b),v.addEventListener("scroll",k,!0),document.addEventListener("keydown",S),document.addEventListener("selectionchange",N),()=>{v.removeEventListener("mouseup",b),v.removeEventListener("scroll",k,!0),document.removeEventListener("keydown",S),document.removeEventListener("selectionchange",N)}},[e]),!f)return null;const g=()=>{var v;h(null),(v=getSelection())==null||v.removeAllRanges()};return l.jsxs("div",{className:"ui-popover jv-selection-menu",role:"menu","aria-label":y("quote.selection"),style:{left:f.x,top:f.y},onMouseDown:v=>v.preventDefault(),children:[l.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{Ho(f.text),g()},children:[l.jsx(Pe,{name:"copy"}),l.jsx("span",{className:"ui-menu-copy",children:y("quote.copy")})]}),l.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{d(f.messageId,f.text),g()},children:[l.jsx(Pe,{name:"quote"}),l.jsx("span",{className:"ui-menu-copy",children:y("quote.quote")})]})]})}function zP(e,n,a,r,o){if(e.get(n).passages.length>=10)return!1;const c={messageId:a.id,name:Ta(r.find(d=>d.id===a.senderId)),text:o};return e.update(n,d=>({passages:[...d.passages,c]})),!0}const OP="modulepreload",DP=function(e){return"/"+e},jj={},LP=function(n,a,r){let o=Promise.resolve();if(a&&a.length>0){let d=function(g){return Promise.all(g.map(v=>Promise.resolve(v).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=d(a.map(g=>{if(g=DP(g),g in jj)return;jj[g]=!0;const v=g.endsWith(".css"),p=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${p}`))return;const j=document.createElement("link");if(j.rel=v?"stylesheet":OP,v||(j.as="script"),j.crossOrigin="",j.href=g,h&&j.setAttribute("nonce",h),document.head.appendChild(j),v)return new Promise((b,k)=>{j.addEventListener("load",b),j.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${g}`)))})}))}function c(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return o.then(d=>{for(const f of d||[])f.status==="rejected"&&c(f.reason);return n().catch(c)})};let wj;function BP(){return wj??(wj=LP(()=>import("./data-uMIXh-O1.js"),[]).then(e=>e.default.groups)),wj}const IP=["👍","👎","👌","✅","❌","👀","🙏","🤔"],VS=9,GS="jarvy-emoji-recent",PP={"Smileys & Emotion":A9,"People & Body":P9,"Animals & Nature":w9,"Food & Drink":pN,"Travel & Places":tN,Activities:dN,Objects:U9,Symbols:q9,Flags:D9};function HP(){try{const e=JSON.parse(localStorage.getItem(GS)??"[]");return Array.isArray(e)?e.filter(n=>typeof n=="string").slice(0,VS):[]}catch{return[]}}function qP(e,n){const[,a,r,o,c]=e,d=n.toLowerCase(),f=a.toLowerCase().split(/[\s:]+/),h=r.toLowerCase().split(" "),g=c.split(" "),v=f.includes(d)||o.split(/:\s*/).includes(n)?5:h.includes(d)||g.includes(n)?4:f.some(p=>p.startsWith(d))||o.startsWith(n)?3:h.some(p=>p.startsWith(d))||g.some(p=>p.startsWith(n))?2:d.length>3&&h.some(p=>p.includes(d))||o.includes(n)||c.includes(n)?1:0;return v&&v*1e3-Math.min(h.length+g.length,999)}function FP({onPick:e}){const[n,a]=w.useState(""),[r,o]=w.useState(HP),[c,d]=w.useState(0),[f,h]=w.useState([]);w.useEffect(()=>{let M=!0;return BP().then(E=>{M&&h(E)}),()=>{M=!1}},[]);const g=w.useRef(null),v=w.useRef(null),p=w.useRef([]),j=w.useMemo(()=>{if(!f.length)return[];const M=new Map(f.flatMap(T=>T.emoji.map(R=>[R[0],R]))),E=f.map(({name:T,emoji:R})=>({key:T,label:y(`actions.emoji.${T}`),Icon:PP[T],emoji:R}));return r.length?[{key:"recent",label:y("actions.recent"),Icon:S9,emoji:r.map(T=>M.get(T)??[T,"","","",""])},...E]:E},[f,r]),b=w.useMemo(()=>{const M=n.trim();return!M||!f.length?null:f.flatMap(E=>E.emoji).map(E=>[E,qP(E,M)]).filter(([,E])=>E>0).sort((E,T)=>T[1]-E[1]).map(([E])=>E)},[n,f]),k=M=>{const E=[M,...r.filter(T=>T!==M)].slice(0,VS);o(E);try{localStorage.setItem(GS,JSON.stringify(E))}catch{}e(M)};w.useEffect(()=>{const M=v.current;if(!M||b)return;const E=()=>{const T=M.getBoundingClientRect().top;let R=0;p.current.forEach((_,z)=>{_&&_.getBoundingClientRect().top-T<40&&(R=z)}),d(R)};return M.addEventListener("scroll",E,{passive:!0}),()=>M.removeEventListener("scroll",E)},[b]);const S=M=>{const E=p.current[M];!E||!v.current||(v.current.scrollTop+=E.getBoundingClientRect().top-v.current.getBoundingClientRect().top,d(M))},N=M=>l.jsx("button",{type:"button",className:"jv-emoji-cell",title:Tl()==="zh"?M[3]:M[1],onClick:()=>k(M[0]),children:M[0]},M[0]),C=M=>{var z;const E=[...((z=g.current)==null?void 0:z.querySelectorAll(".jv-emoji-grid button"))??[]],T=E.indexOf(document.activeElement),R={ArrowRight:1,ArrowLeft:-1,ArrowDown:9,ArrowUp:-9,Home:0,End:0}[M.key];if(T<0||R===void 0)return;const _=E[M.key==="Home"?T-T%9:M.key==="End"?T-T%9+8:Math.max(0,Math.min(E.length-1,T+R))];_&&(M.preventDefault(),_.focus())};return l.jsxs("div",{className:"jv-emoji-panel",ref:g,onKeyDown:C,children:[l.jsx("div",{className:"jv-emoji-quick",children:IP.map(M=>l.jsx("button",{type:"button",onClick:()=>k(M),children:M},M))}),l.jsxs("label",{className:"jv-emoji-search",children:[l.jsx(_s,{"aria-hidden":"true"}),l.jsx("input",{value:n,onChange:M=>a(M.target.value),placeholder:y("actions.searchEmoji"),"aria-label":y("actions.searchEmoji"),autoFocus:matchMedia("(hover: hover)").matches,onKeyDown:M=>{M.key==="Escape"&&n&&(M.stopPropagation(),a("")),M.key==="Enter"&&!M.nativeEvent.isComposing&&(b!=null&&b[0])&&(M.preventDefault(),k(b[0][0]))}})]}),l.jsx("div",{className:"jv-emoji-groups",role:"tablist","data-hidden":!j.length||void 0,children:j.map(({key:M,label:E,Icon:T},R)=>l.jsx("button",{type:"button",role:"tab","aria-selected":!b&&R===c,title:E,onKeyDown:_=>{var P,H;if(_.key!=="ArrowLeft"&&_.key!=="ArrowRight")return;_.preventDefault();const z=(R+(_.key==="ArrowRight"?1:-1)+j.length)%j.length;S(z),(H=(P=g.current)==null?void 0:P.querySelectorAll(".jv-emoji-groups button")[z])==null||H.focus()},onClick:()=>{b?(a(""),requestAnimationFrame(()=>S(R))):S(R)},children:l.jsx(T,{"aria-hidden":"true"})},M))}),l.jsx("div",{className:"jv-emoji-scroll",ref:v,role:b?void 0:"tabpanel",children:b?b.length?l.jsx("div",{className:"jv-emoji-grid",children:b.map(N)}):l.jsx("p",{className:"jv-emoji-empty",children:y("actions.noEmoji")}):j.map(({key:M,label:E,emoji:T},R)=>l.jsxs("section",{className:"jv-emoji-section",ref:_=>{p.current[R]=_},children:[l.jsx("h2",{children:E}),l.jsx("div",{className:"jv-emoji-grid",children:T.map(N)})]},M))})]})}const wo=380,Fd=310;function YS({message:e,members:n,onJump:a}){if(!e.replyTo)return null;const r=n.find(o=>o.id===e.replyTo.senderId);return l.jsxs("button",{type:"button",className:"jv-reply-quote",onClick:()=>a(e.replyTo.id),children:[l.jsx("span",{className:"jv-reply-author",children:Ta(r)}),l.jsx("span",{className:"jv-reply-text",children:Os(e.replyTo)})]})}function KS({message:e,me:n,members:a,onReact:r,onError:o}){return e.reactions.length?l.jsx("div",{className:"jv-reactions",children:e.reactions.map(c=>{const d=c.memberIds.includes(n);return l.jsxs("button",{type:"button",className:"jv-reaction","data-mine":d||void 0,title:c.memberIds.map(f=>Ta(a.find(h=>h.id===f))).join(y("common.listSeparator")),onClick:()=>{try{r(e,c.emoji,!d)}catch(f){o(f)}},children:[l.jsx("span",{className:"jv-reaction-emoji",children:c.emoji}),l.jsx("span",{className:"jv-reaction-count",children:c.memberIds.length})]},c.emoji)})}):null}function XS({message:e,me:n,onReply:a,onReact:r,onError:o}){const[c,d]=w.useState(!1),[f,h]=w.useState(!1),[g,v]=w.useState(!1),p=w.useRef(null),[j,b]=w.useState(null);w.useEffect(()=>{if(!c)return;const N=C=>{var M;(M=p.current)!=null&&M.contains(C.target)||d(!1)};return document.addEventListener("pointerdown",N),()=>document.removeEventListener("pointerdown",N)},[c]);const k=N=>{var M;const C=!((M=e.reactions.find(E=>E.emoji===N))!=null&&M.memberIds.includes(n));try{r(e,N,C)}catch(E){o(E)}d(!1)},S=()=>{var M,E,T,R;const N=(M=p.current)==null?void 0:M.getBoundingClientRect(),C=(T=(E=p.current)==null?void 0:E.closest(".ui-transcript, .ui-pane-body"))==null?void 0:T.getBoundingClientRect();if(N){const _=((C==null?void 0:C.right)??window.innerWidth)-N.left,z=N.right-((C==null?void 0:C.left)??0),P=!!((R=p.current)!=null&&R.closest(".ui-user")),H=((C==null?void 0:C.bottom)??window.innerHeight)-N.bottom,O=N.top-((C==null?void 0:C.top)??0),I=P?_>=Fd||_>z:z<Fd&&_>z;h(H<wo),v(I),b(H<wo&&O<wo&&!matchMedia("(max-width: 640px)").matches?{top:N.top>wo+8?N.top-wo-4:Math.min(N.bottom+4,window.innerHeight-wo-8),left:Math.max(8,Math.min(I?N.left:N.right-Fd,window.innerWidth-Fd-8))}:null)}d(!c)};return l.jsxs("div",{className:"jv-message-actions",ref:p,children:[a&&l.jsx(vt,{icon:"arrow-u-up-right",label:y("actions.reply"),onClick:()=>a(e)}),l.jsx(vt,{icon:"smiley-plus",label:y("actions.react"),"aria-expanded":c,onClick:S}),c&&l.jsx("div",{className:"jv-emoji-menu",role:"dialog","aria-label":y("actions.pickEmoji"),"data-up":f||void 0,"data-right":g||void 0,style:j?{position:"fixed",top:j.top,left:j.left,right:"auto",bottom:"auto"}:void 0,onKeyDown:N=>{N.key==="Escape"&&d(!1)},children:l.jsx(FP,{onPick:k})})]})}const UP=12;function QS({children:e,whole:n=!1}){const a=w.useRef(null),[r,o]=w.useState(null),[c,d]=w.useState(n);w.useLayoutEffect(()=>{const h=a.current;if(!h)return;const g=()=>{const p=parseFloat(getComputedStyle(h).lineHeight)||24,j=Math.round(UP*p);o(h.scrollHeight>j+2*p?j:null)};g();const v=new ResizeObserver(g);return v.observe(h),()=>v.disconnect()},[]);const f=r!==null&&!c;return l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:a,className:"jv-long","data-cut":f||void 0,style:f?{maxHeight:r}:void 0,children:e}),r!==null&&l.jsx("button",{type:"button",className:"jv-long-toggle","aria-expanded":c,onClick:()=>d(!c),children:y(c?"fold.less":"fold.more")})]})}function ZS(){const[e,n]=w.useState(new Set);return{has:a=>e.has(a),add:a=>n(r=>new Set(r).add(a))}}function JS({message:e}){return l.jsxs("div",{className:"jv-folded",children:[l.jsx("span",{className:"jv-folded-text",children:Os(e)}),l.jsxs("span",{className:"jv-folded-tag",children:[l.jsx(Pe,{name:"fold"}),y("fold.folded")]})]})}const WS="jarvy-notice-closed",$P=()=>{try{return JSON.parse(localStorage.getItem(WS)??"[]")}catch{return[]}};function lr({member:e,bots:n,size:a,working:r=!1,onBot:o}){const c=(e==null?void 0:e.kind)==="bot"?n.find(f=>f.id===e.id):void 0,d=c?l.jsx(_a,{color:c.color,mood:c.mood,size:a,badge:r?"working":void 0,crown:c.agent}):null;return c&&o?l.jsx("button",{type:"button",className:"jv-avatar-button","aria-label":y("botCard.open",{name:c.name}),"aria-haspopup":"dialog",onClick:f=>o(c,f.currentTarget.getBoundingClientRect()),children:d}):d||l.jsx("span",{className:"ui-user-avatar jv-user-avatar",style:{width:a,height:a,fontSize:Math.round(a*.38)},children:((e==null?void 0:e.name)??"?").slice(0,2).toUpperCase()})}function VP({chat:e,members:n,bots:a,infoOpen:r,membersOpen:o,threadsOpen:c,searchOpen:d,onNav:f,onInfo:h,onMembers:g,onThreads:v,onSearch:p}){const j=n.filter(b=>e.memberIds.includes(b.id));return l.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[l.jsxs("div",{className:"ui-header-left",children:[l.jsx(vt,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:y("common.openNav"),onClick:f}),l.jsxs("button",{type:"button",className:"jv-channel-title","aria-label":y("channel.infoFor",{name:e.title}),"aria-pressed":r,onClick:h,children:[l.jsx("span",{className:"jv-hash",children:"#"}),e.title,l.jsx(Pe,{name:"chevron-down"})]}),e.topic&&l.jsx("span",{className:"jv-channel-topic",children:e.topic})]}),l.jsxs("div",{className:"ui-header-actions",children:[l.jsxs("button",{type:"button",className:"jv-members-button","aria-label":y("channel.membersCount",{count:j.length}),"aria-pressed":o,title:y("channel.members"),onClick:g,children:[l.jsx("span",{className:"jv-stack",children:j.slice(0,3).map(b=>l.jsx("span",{className:"jv-stack-item",children:l.jsx(lr,{member:b,bots:a,size:22})},b.id))}),l.jsx("span",{className:"jv-members-count",children:j.length})]}),l.jsx(vt,{icon:"search",label:y("channel.search"),"aria-pressed":d,className:"jv-threads-button",onClick:p}),l.jsx(vt,{icon:"chat-bubble",label:y("channel.threads"),"aria-pressed":c,className:"jv-threads-button",onClick:v})]})]})}function GP({chat:e,onSave:n}){var b;const[a,r]=w.useState($P),[o,c]=w.useState(null),[d,f]=w.useState(!1);w.useEffect(()=>c(null),[e.id]);const h=!a.includes(e.id),g=e.note,v=()=>r(k=>{const S=h?[...k,e.id]:k.filter(N=>N!==e.id);return localStorage.setItem(WS,JSON.stringify(S)),S}),p=async()=>{if(o!=null&&o.trim()){f(!0);try{await n(o.trim()),c(null)}finally{f(!1)}}};if(o!==null)return l.jsxs("div",{className:"jv-notice","data-editing":!0,children:[l.jsxs("div",{className:"jv-notice-head",children:[l.jsx(Pe,{name:"megaphone"}),l.jsx("strong",{children:y("notice.edit")})]}),l.jsx("textarea",{className:"jv-notice-input",value:o,autoFocus:!0,"aria-label":y("notice.content"),onChange:k=>c(k.target.value)}),l.jsxs("div",{className:"jv-notice-actions",children:[l.jsx("button",{type:"button",className:"ui-button",onClick:()=>c(null),children:y("common.cancel")}),l.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:d||!o.trim(),onClick:()=>void p(),children:y("common.save")})]})]});if(!g)return l.jsxs("div",{className:"jv-notice","data-empty":!0,children:[l.jsx(Pe,{name:"megaphone"}),l.jsx("span",{className:"jv-muted",children:y("notice.none")}),l.jsx(vt,{icon:"pencil",label:y("notice.edit"),onClick:()=>c("")})]});const j=((b=g.text.split(`
|
|
793
|
+
`).find(k=>k.trim()&&!k.startsWith("#")))==null?void 0:b.replace(/[*`|>-]/g,"").trim())??"";return l.jsxs("div",{className:"jv-notice","data-open":h||void 0,children:[l.jsxs("div",{className:"jv-notice-head",children:[l.jsxs("button",{type:"button",className:"jv-notice-toggle","aria-expanded":h,onClick:v,children:[l.jsx(Pe,{name:"megaphone"}),l.jsx("strong",{children:y("notice.title")}),!h&&l.jsx("span",{className:"jv-notice-first",children:j}),l.jsx(Pe,{name:h?"chevron-down":"chevron-right"})]}),l.jsxs("span",{className:"jv-muted jv-notice-meta",children:[g.updatedBy.name," · ",Si(g.updatedAt,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})," · ",y("notice.version",{version:g.version})]}),l.jsx(vt,{icon:"pencil",label:y("notice.edit"),onClick:()=>c(g.text)})]}),h&&l.jsx("div",{className:"jv-notice-body ui-bubble jv-flat",children:l.jsx(qo,{text:g.text})})]})}function wf({messages:e,members:n,bots:a,me:r,divider:o,before:c,activeQuestion:d,onSettled:f,onPreview:h,onReply:g,onOpenThread:v,onQuote:p,onReact:j,onFold:b,onJump:k,onBotCard:S,onError:N}){var E;const C=(E=e.find(T=>T.sequence>o&&T.senderId!==r))==null?void 0:E.id,M=ZS();return l.jsx(l.Fragment,{children:e.map((T,R)=>{const _=e[R-1],z=n.find(I=>I.id===T.senderId),P=(_==null?void 0:_.createdAt)??c,H=!$5(T,_,P)&&T.id!==C,O=T.folded;return l.jsxs("div",{children:[eg(T.createdAt,P)&&l.jsx(V5,{time:T.createdAt}),T.id===C&&l.jsx("div",{className:"jv-divider",role:"separator",children:l.jsx("span",{children:y("chat.newBelow")})}),l.jsxs("div",{className:"jv-row",tabIndex:-1,"data-message":T.id,"data-folded":H||void 0,"data-mention":T.mentions.includes(r)||void 0,"data-shut":O||void 0,children:[l.jsx("div",{className:"jv-row-gutter",children:H?l.jsx(q0,{time:T.createdAt,className:"jv-row-time"}):l.jsx(lr,{member:z,bots:a,size:32,onBot:S})}),l.jsxs("div",{className:"jv-row-body",children:[!H&&l.jsxs("div",{className:"jv-row-head",children:[l.jsx("strong",{children:Ta(z)}),(z==null?void 0:z.kind)==="bot"&&l.jsx("span",{className:"jv-role",children:"Bot"}),l.jsx(q0,{time:T.createdAt})]}),O?l.jsx(JS,{message:T}):l.jsxs(l.Fragment,{children:[T.echoOf&&l.jsx("button",{type:"button",className:"jv-echo",onClick:()=>v==null?void 0:v(T.echoOf.id),children:y("channel.echo",{title:T.echoOf.title})}),T.replyTo&&l.jsx(YS,{message:T,members:n,onJump:I=>k==null?void 0:k(I)}),T.question?l.jsx(PS,{message:{...T,question:T.question},keyboard:T.id===d,onSettled:f}):l.jsxs("div",{className:"ui-bubble jv-flat",children:[T.content&&l.jsx(QS,{whole:M.has(T.id),children:l.jsx(US,{message:T,members:n,me:r,onJump:k})}),T.attachments.length>0&&l.jsx(DS,{files:T.attachments,onOpen:I=>h(T.attachments,I)})]}),j&&l.jsx(KS,{message:T,me:r,members:n,onReact:j,onError:N??(()=>{})})]}),T.thread&&T.thread.replies>0&&l.jsxs("button",{type:"button",className:"jv-thread-link","data-done":T.thread.status==="done"||void 0,onClick:()=>v==null?void 0:v(T.thread.id),children:[y("channel.replies",{count:T.thread.replies}),T.thread.status==="done"&&` · ${y("channel.threadDone")}`,T.thread.lastReplyAt&&l.jsx("span",{className:"jv-muted",children:y("channel.lastReply",{time:tg(T.thread.lastReplyAt)})})]})]}),l.jsxs("div",{className:"jv-row-actions",children:[g&&!T.echoOf&&l.jsx(vt,{icon:"chat-bubble",label:y("channel.replyInThread"),onClick:()=>g(T)}),j&&l.jsx(XS,{message:T,me:r,onReply:p,onReact:j,onError:N??(()=>{})}),b&&l.jsx(vt,{icon:T.folded?"unfold":"fold",label:y(T.folded?"actions.unfold":"actions.fold"),onClick:()=>{T.folded&&M.add(T.id),b(T,!T.folded)}})]})]})]},T.id)})})}function e6({candidates:e,bots:n,busy:a,onCancel:r,onConfirm:o}){const[c,d]=w.useState(""),[f,h]=w.useState([]),g=e.filter(p=>p.name.toLowerCase().includes(c.trim().toLowerCase())),v=p=>h(j=>j.includes(p)?j.filter(b=>b!==p):[...j,p]);return l.jsxs("div",{className:"jv-picker",children:[l.jsx("div",{className:"ui-field",children:l.jsx("input",{type:"search",value:c,autoFocus:!0,placeholder:y("common.searchMembers"),"aria-label":y("common.searchMembers"),onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&!p.nativeEvent.isComposing&&(p.preventDefault(),g.length===1&&v(g[0].id))}})}),l.jsxs("div",{className:"jv-picker-list",role:"listbox","aria-multiselectable":"true","aria-label":y("dialogs.candidates"),children:[g.map(p=>l.jsxs("button",{type:"button",role:"option","aria-selected":f.includes(p.id),className:"jv-member-option",onClick:()=>v(p.id),children:[l.jsx(lr,{member:p,bots:n,size:24}),l.jsx("span",{className:"jv-member-name",children:p.name}),l.jsx("span",{className:"jv-muted",children:p.kind==="bot"?"Bot":y("common.member")}),l.jsx("span",{className:"jv-check",children:f.includes(p.id)&&l.jsx(Pe,{name:"check"})})]},p.id)),g.length===0&&l.jsx("p",{className:"jv-picker-empty",children:y(e.length?"common.noMatch":"dialogs.allInside")})]}),l.jsxs("div",{className:"ui-dialog-actions",children:[l.jsx("span",{className:"jv-spacer"}),l.jsx("button",{type:"button",className:"ui-button",onClick:r,children:y("common.cancel")}),l.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:a||f.length===0,onClick:()=>o(f),children:f.length?y("dialogs.addCount",{count:f.length}):y("common.add")})]})]})}function YP({chat:e,members:n,bots:a,onClose:r,onChanged:o}){const{busy:c,error:d,run:f}=On();async function h(g){await f("add",async()=>{let v=e;for(const p of g)v=await he.addMember(e.id,p);o(v),r()},"dialogs.addFailed")}return l.jsxs(_o,{title:y("info.addMembers"),onClose:r,className:"jv-channel-dialog",children:[l.jsx(e6,{candidates:n.filter(g=>!e.memberIds.includes(g.id)),bots:a,busy:c,onCancel:r,onConfirm:g=>void h(g)}),d&&l.jsx("p",{className:"jv-form-error",role:"alert",children:d})]})}function KP({sections:e,members:n,bots:a,me:r,onClose:o,onSaved:c}){const d=w.useId(),[f,h]=w.useState(""),[g,v]=w.useState(""),[p,j]=w.useState(null),[b,k]=w.useState([r]),[S,N]=w.useState(!1),{busy:C,error:M,run:E}=On();async function T(_){_.preventDefault(),!(!f.trim()||C)&&await E("save",async()=>c(await he.createChannel({name:f.trim(),topic:g.trim(),sectionId:p,memberIds:b.filter(z=>z!==r)})),"common.saveFailed")}const R=n.filter(_=>b.includes(_.id));return S?l.jsx(_o,{title:y("info.addMembers"),onClose:o,className:"jv-channel-dialog",children:l.jsx(e6,{candidates:n.filter(_=>!b.includes(_.id)),bots:a,busy:!1,onCancel:()=>N(!1),onConfirm:_=>{k(z=>[...z,..._]),N(!1)}})}):l.jsx(_o,{title:y("sidebar.newChannel"),onClose:o,className:"jv-channel-dialog",children:l.jsxs("form",{onSubmit:_=>void T(_),children:[l.jsxs("div",{className:"ui-field",children:[l.jsx("label",{htmlFor:`${d}-name`,children:y("info.name")}),l.jsx("input",{id:`${d}-name`,value:f,maxLength:80,autoFocus:!0,placeholder:y("info.newChannel"),onChange:_=>h(_.target.value)})]}),l.jsxs("div",{className:"ui-field",children:[l.jsx("label",{htmlFor:`${d}-topic`,children:y("info.topic")}),l.jsx("input",{id:`${d}-topic`,value:g,maxLength:200,placeholder:y("dialogs.optional"),onChange:_=>v(_.target.value)})]}),l.jsxs("div",{className:"ui-field",children:[l.jsx("label",{htmlFor:`${d}-section`,children:y("info.section")}),l.jsx(MS,{id:`${d}-section`,value:p,sections:e,onChange:j})]}),l.jsxs("div",{className:"jv-members",children:[l.jsxs("div",{className:"jv-members-head",children:[l.jsxs("span",{children:[y("channel.members")," · ",R.length]}),l.jsxs("button",{type:"button",className:"ui-button",onClick:()=>N(!0),children:[l.jsx(Pe,{name:"person-add"}),y("info.addMembers")]})]}),R.map(_=>l.jsxs("div",{className:"jv-member-option",children:[l.jsx(lr,{member:_,bots:a,size:24}),l.jsx("span",{className:"jv-member-name",children:_.name}),l.jsx("span",{className:"jv-muted",children:_.id===r?y("common.you"):_.kind==="bot"?"Bot":y("common.member")}),_.id!==r&&l.jsx(vt,{icon:"close",label:y("members.remove",{name:_.name}),className:"jv-member-remove",onClick:()=>k(z=>z.filter(P=>P!==_.id))})]},_.id))]}),M&&l.jsx("p",{className:"jv-form-error",role:"alert",children:M}),l.jsxs("div",{className:"ui-dialog-actions",children:[l.jsx("span",{className:"jv-spacer"}),l.jsx("button",{type:"button",className:"ui-button",onClick:o,children:y("common.cancel")}),l.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:C||!f.trim(),children:y("common.create")})]})]})})}function XP({section:e,onClose:n,onSaved:a,onDeleted:r}){const o=w.useId(),[c,d]=w.useState((e==null?void 0:e.name)??""),[f,h]=w.useState(!1),[g,v]=w.useState("");async function p(b){if(b.preventDefault(),!(!c.trim()||f)){h(!0),v("");try{a(e?await he.updateSection(e.id,{name:c.trim()}):await he.createSection({name:c.trim()}))}catch(k){v(un(k,"common.saveFailed")),h(!1)}}}async function j(){if(!(!e||!confirm(y("dialogs.deleteSection",{name:e.name})))){h(!0);try{await he.deleteSection(e.id),r==null||r(e.id)}catch(b){v(un(b,"dialogs.deleteFailed")),h(!1)}}}return l.jsx(_o,{title:y(e?"dialogs.editSection":"sidebar.newSection"),onClose:n,children:l.jsxs("form",{onSubmit:b=>void p(b),children:[l.jsxs("div",{className:"ui-field",children:[l.jsx("label",{htmlFor:`${o}-name`,children:y("dialogs.sectionName")}),l.jsx("input",{id:`${o}-name`,value:c,maxLength:80,autoFocus:!0,placeholder:y("dialogs.newSection"),onChange:b=>d(b.target.value)})]}),g&&l.jsx("p",{className:"jv-form-error",role:"alert",children:g}),l.jsxs("div",{className:"ui-dialog-actions",children:[e&&l.jsx("button",{type:"button",className:"ui-button jv-danger",disabled:f,onClick:()=>void j(),children:y("common.delete")}),l.jsx("span",{className:"jv-spacer"}),l.jsx("button",{type:"button",className:"ui-button",onClick:n,children:y("common.cancel")}),l.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:f||!c.trim(),children:y(e?"common.save":"common.create")})]})]})})}function QP({bot:e,chats:n,onClose:a,onConfirm:r}){const[o,c]=w.useState(!1),[d,f]=w.useState(!1);return l.jsx(_o,{title:y("deleteBot.title",{name:e.name}),onClose:a,className:"jv-dialog",children:l.jsxs("div",{className:"jv-dialog-body",children:[l.jsx("p",{children:y("deleteBot.after")}),l.jsxs("ul",{className:"jv-dialog-list",children:[l.jsx("li",{children:y("deleteBot.chats",{count:n})}),l.jsx("li",{children:y("deleteBot.messages",{name:y("member.deleted",{name:e.name})})}),l.jsx("li",{children:y("deleteBot.history")})]}),l.jsxs("label",{className:"jv-checkline",children:[l.jsx("input",{type:"checkbox",checked:o,onChange:h=>c(h.target.checked)}),l.jsx("span",{children:y("deleteBot.files")})]}),l.jsx("p",{className:"jv-hint",children:y("deleteBot.filesHint")}),l.jsxs("div",{className:"jv-dialog-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",onClick:a,children:y("common.cancel")}),l.jsx(Ee,{type:"button",className:"jv-primary",disabled:d,onClick:()=>{f(!0),r(o).finally(()=>f(!1))},children:y(d?"deleteBot.deleting":"common.delete")})]})]})})}function t6({title:e,body:n,confirm:a,onClose:r,onConfirm:o}){const[c,d]=w.useState(!1);return l.jsx(_o,{title:e,onClose:r,className:"jv-dialog",children:l.jsxs("div",{className:"jv-dialog-body",children:[l.jsx("p",{children:n}),l.jsxs("div",{className:"jv-dialog-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",onClick:r,children:y("common.cancel")}),l.jsx(Ee,{type:"button",className:"jv-primary",disabled:c,onClick:()=>{d(!0),o().finally(()=>d(!1))},children:c?y("deleteBot.working"):a})]})]})})}function ZP({target:e,x:n,y:a,onClose:r,onOpenBot:o,onSettings:c,onPin:d,onMute:f,onDeleteChat:h,onDeleteBot:g}){const v=w.useRef(null);w.useEffect(()=>{const b=S=>{var N;(N=v.current)!=null&&N.contains(S.target)||r()},k=S=>{S.key==="Escape"&&r()};return document.addEventListener("pointerdown",b),document.addEventListener("keydown",k),()=>{document.removeEventListener("pointerdown",b),document.removeEventListener("keydown",k)}},[r]);const p=e.chat,j={left:Math.max(8,Math.min(n,window.innerWidth-200)),top:Math.max(8,Math.min(a,window.innerHeight-210))};return l.jsxs("div",{ref:v,className:"ui-popover jv-entry-menu",role:"menu","aria-label":y("entry.menu"),style:j,children:[p&&l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{d(p,!p.pinned),r()},children:[l.jsx(Pe,{name:"pin"}),l.jsx("span",{className:"ui-menu-copy",children:y(p.pinned?"entry.unpin":"entry.pin")})]}),p&&l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{f(p,!p.muted),r()},children:[l.jsx(Pe,{name:p.muted?"bell":"bell-slash"}),l.jsx("span",{className:"ui-menu-copy",children:y(p.muted?"entry.unmute":"entry.mute")})]}),e.kind==="dm"?l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{o(e.bot),r()},children:[l.jsx(Pe,{name:"gear"}),l.jsx("span",{className:"ui-menu-copy",children:y("entry.botInfo")})]}):l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{c(e.chat),r()},children:[l.jsx(Pe,{name:"info"}),l.jsx("span",{className:"ui-menu-copy",children:y("entry.channelInfo")})]}),!(e.kind==="dm"&&e.bot.agent)&&l.jsx("hr",{className:"ui-menu-divider"}),e.kind==="dm"?!e.bot.agent&&l.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{g(e.bot),r()},children:[l.jsx(Pe,{name:"close"}),l.jsx("span",{className:"ui-menu-copy",children:y("entry.deleteBot")})]}):l.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{h(e.chat),r()},children:[l.jsx(Pe,{name:"close"}),l.jsx("span",{className:"ui-menu-copy",children:y("entry.deleteChannel")})]})]})}function JP({files:e,initialIndex:n=0,onClose:a}){const[r,o]=w.useState(n),[c,d]=w.useState("preview"),[f,h]=w.useState(!1),[g,v]=w.useState(""),[p,j]=w.useState(""),[b,k]=w.useState(""),[S,N]=w.useState(!0),[C,M]=w.useState(0),[E,T]=w.useState(!1),[R,_]=w.useState(!1),z=w.useRef(null),P=w.useRef(null),H=w.useRef(new Map),O=e[r],I=ou(O),$=AS(I),Q=gP(I)&&O.size>pP,Y=!$&&!Q&&I!=="download";w.useEffect(()=>{const se=z.current,ne=document.activeElement;return se.showModal(),()=>{se.close(),ne!=null&&ne.isConnected&&ne.focus({preventScroll:!0})}},[]),w.useEffect(()=>{const se=new AbortController;return v(""),j(""),k(""),d("preview"),T(!1),_(!1),N(Y),Y&&(qc(I)?OS(O,se.signal).then(j):zS(O,se.signal).then(v)).then(()=>N(!1)).catch(ne=>{se.signal.aborted||(k(un(ne,"files.readError")),N(!1))}),()=>se.abort()},[O.id,C]),w.useEffect(()=>{P.current&&(P.current.scrollTop=H.current.get(`${r}:${c}`)??0)},[r,c,S]);const q=()=>{var se;return H.current.set(`${r}:${c}`,((se=P.current)==null?void 0:se.scrollTop)??0)},K=se=>{q(),o(Math.max(0,Math.min(e.length-1,se)))},V=w.useMemo(()=>I==="html"&&g?xP(g):null,[I,g]),X=Y&&["markdown","html"].includes(I)&&!S&&!b,Z=qc(I)||$&&!R?"ui-image-view":I==="html"&&c==="preview"?"ui-html-view":I==="markdown"&&c==="preview"?"ui-document":"",D=l.jsxs("a",{className:"ui-button",href:ka(O),download:O.name,children:[l.jsx(Pe,{name:"cloud-download"}),y("files.downloadFile")]});return Ol.createPortal(l.jsxs("dialog",{ref:z,className:"ui-viewer","aria-labelledby":"jvPreviewTitle","data-wide":f||void 0,onCancel:se=>{se.preventDefault(),a()},onKeyDown:se=>{!["ArrowLeft","ArrowRight"].includes(se.key)||["SELECT","INPUT","TEXTAREA"].includes(se.target.tagName)||(se.preventDefault(),K(r+(se.key==="ArrowLeft"?-1:1)))},children:[l.jsxs("header",{className:"ui-preview-header",children:[l.jsxs("div",{className:"ui-preview-heading",children:[l.jsx("h1",{id:"jvPreviewTitle",children:O.name}),l.jsxs("small",{children:[y(_S[I])," · ",RS(O.size)]})]}),l.jsxs("div",{className:"ui-preview-actions",children:[X&&l.jsx("button",{type:"button",className:"ui-button",onClick:()=>{q(),d(c==="source"?"preview":"source")},children:y(c==="source"?"files.showPreview":I==="html"?"files.showSource":"files.showText")}),E&&l.jsx(vt,{icon:"window",label:y("files.openTab"),onClick:()=>window.open(vj(O),"_blank","noopener,noreferrer")}),l.jsx("a",{className:"ui-iconbtn",href:ka(O),download:O.name,"aria-label":y("files.download",{name:O.name}),title:y("files.download",{name:O.name}),children:l.jsx(Pe,{name:"cloud-download"})}),l.jsx(vt,{icon:f?"arrows-contract":"arrows-expand",label:y(f?"files.narrow":"files.widen"),"data-action":"ui-wide",onClick:()=>h(!f)}),l.jsx(vt,{icon:"close",label:y("files.closePreview"),"data-action":"ui-close",onClick:a})]})]}),V&&c==="preview"&&!S&&!b&&l.jsxs("div",{className:"jv-run-tip",role:"status",children:[l.jsx("p",{children:E?y("files.running"):y("files.scripts",{count:V.count,hosts:V.hosts.length?y("files.scriptHosts",{hosts:V.hosts.slice(0,3).join(y("common.listSeparator"))+(V.hosts.length>3?y("files.andMore"):"")}):""})}),l.jsx("button",{type:"button",className:"ui-button",onClick:()=>T(!E),children:y(E?"files.stop":"files.run")})]}),l.jsx("div",{className:`ui-preview-body ${Z}`,ref:P,tabIndex:-1,children:$?R?l.jsxs("div",{className:"ui-fallback",children:[l.jsx(Pe,{name:`file-${I}`}),l.jsx("strong",{children:y("files.cantPlay")}),l.jsx("p",{children:y("files.cantPlayHint")}),D]}):I==="video"?l.jsx("video",{className:"ui-preview-video",src:ka(O),controls:!0,preload:"metadata",playsInline:!0,onError:()=>_(!0)},O.id):l.jsx("audio",{className:"ui-preview-audio",src:ka(O),controls:!0,preload:"metadata",onError:()=>_(!0)},O.id):Y?S?l.jsx("p",{className:"ui-unloaded",children:y("files.reading")}):b?l.jsxs("div",{className:"ui-error",role:"alert",children:[l.jsx("p",{children:b}),l.jsx("button",{type:"button",className:"ui-button",onClick:()=>M(se=>se+1),children:y("common.retry")})]}):qc(I)?l.jsx("img",{className:"ui-preview-image",src:p,alt:O.name}):c==="source"||I==="text"?l.jsx("pre",{className:"ui-source",tabIndex:0,children:g}):I==="html"?E?l.jsx("iframe",{title:y("files.runningTitle",{name:O.name}),sandbox:"allow-scripts",src:vj(O),referrerPolicy:"no-referrer",className:"ui-html-frame"},"run"):l.jsx("iframe",{title:O.name,sandbox:"",srcDoc:bP(g),referrerPolicy:"no-referrer",className:"ui-html-frame"},"static"):l.jsx("article",{className:"ui-prose",children:l.jsx(qo,{text:g})}):l.jsxs("div",{className:"ui-fallback",children:[l.jsx(Pe,{name:"file"}),l.jsx("strong",{children:y("files.downloadToView")}),l.jsx("p",{children:y(Q?"files.tooLarge":"files.unsupported")}),D]})}),e.length>1&&l.jsxs("footer",{className:"ui-preview-nav",children:[l.jsx(vt,{icon:"chevron-left",label:y("files.previous"),disabled:r===0,onClick:()=>K(r-1)}),l.jsx("select",{id:"ui-preview-select","aria-label":y("files.choose"),value:r,onChange:se=>K(Number(se.target.value)),children:e.map((se,ne)=>l.jsx("option",{value:ne,children:se.name},se.id))}),l.jsxs("span",{children:[r+1," / ",e.length]}),l.jsx(vt,{icon:"chevron-right",label:y("files.next"),disabled:r===e.length-1,onClick:()=>K(r+1)})]})]}),document.body)}function WP({dialog:e,entryMenu:n,confirm:a,preview:r,infoBot:o,bots:c,statuses:d,chats:f,sections:h,members:g,connections:v,meId:p,onDialog:j,onEntryMenu:b,onConfirm:k,onPreview:S,onInfoBot:N,onSettings:C,onAddMachine:M,onChannelInfo:E,onOpenChatId:T,chatSaved:R,openChat:_,onSectionSaved:z,onSectionDeleted:P,updateBot:H,openAnywhere:O,removeChannel:I,deleteBot:$,pinChat:Q,muteChat:Y}){return l.jsxs(l.Fragment,{children:[(e==null?void 0:e.kind)==="channel"&&l.jsx(KP,{sections:h,members:Na(g),bots:c,me:p,onClose:()=>j(null),onSaved:q=>{R(q),j(null),_(q)}}),(e==null?void 0:e.kind)==="members"&&l.jsx(YP,{chat:f.find(q=>q.id===e.chat.id)??e.chat,members:Na(g),bots:c,onClose:()=>j(null),onChanged:R}),(e==null?void 0:e.kind)==="section"&&l.jsx(XP,{section:e.section,onClose:()=>j(null),onSaved:z,onDeleted:P}),n&&l.jsx(ZP,{target:n.target,x:n.at.x,y:n.at.y,onClose:()=>b(null),onOpenBot:q=>N(q.id),onSettings:q=>{q.type==="channel"&&E(q)},onPin:(q,K)=>void Q(q,K),onMute:(q,K)=>void Y(q,K),onDeleteChat:q=>k({kind:"chat",chat:q}),onDeleteBot:q=>k({kind:"bot",bot:q})}),(a==null?void 0:a.kind)==="chat"&&l.jsx(t6,{title:y("app.deleteChannelTitle",{name:a.chat.title}),confirm:y("common.delete"),onClose:()=>k(null),body:y("app.deleteChannelBody"),onConfirm:async()=>{await I(a.chat),k(null)}}),(a==null?void 0:a.kind)==="bot"&&l.jsx(QP,{bot:a.bot,chats:f.filter(q=>q.type==="dm"&&q.botId===a.bot.id).length,onClose:()=>k(null),onConfirm:async q=>{await $(a.bot,q),k(null)}}),o&&l.jsx(mP,{bot:o,status:d[o.id],connections:v,chats:f,onSaved:H,onOpenChat:q=>{N(null),T(q)},onOpenSubscription:O,onManageModels:()=>{N(null),C("models")},onManageSecrets:()=>{N(null),C("secrets")},onAddMachine:()=>{N(null),M()},onClose:()=>N(null)},o.id),r&&l.jsx(JP,{files:r.files,initialIndex:r.index,onClose:()=>S(null)})]})}function n6(e,n,a){const[r,o]=w.useState(null),[c,d]=w.useState(!1);return w.useEffect(()=>{const f=e.trim();if(!f){o(null),d(!1);return}let h=!0;d(!0);const g=setTimeout(()=>void he.search(f,n).then(v=>{h&&o(v)}).catch(v=>{h&&a(v)}).finally(()=>{h&&d(!1)}),250);return()=>{h=!1,clearTimeout(g)}},[e,n]),{result:r,loading:c}}function i6(e,n,a){var r;return e.type==="thread"?`#${((r=n.find(o=>o.id===e.parentId))==null?void 0:r.title)??y("search.channel")} › ${e.title}`:e.type==="channel"?`#${e.title}`:Ta(a.find(o=>o.id===e.botId))}function a6({text:e,query:n,room:a=24}){const r=e.replace(/[*`~#>|]/g,"").replace(/\s+/g," ").trim(),o=r.toLocaleLowerCase().indexOf(n.trim().toLocaleLowerCase());if(o<0||!n.trim())return l.jsx(l.Fragment,{children:r.slice(0,120)});const c=Math.max(0,o-a),d=o+n.trim().length;return l.jsxs(l.Fragment,{children:[c>0&&"…",r.slice(c,o),l.jsx("mark",{className:"jv-hit",children:r.slice(o,d)}),r.slice(d,d+120)]})}const eH=e=>new Date(e).toDateString()===new Date().toDateString()?Ml(e):Nf(e);function r6({message:e,chat:n,chats:a,members:r,query:o,showPlace:c=!0,onOpen:d}){return l.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>d(n,e.id),children:[l.jsxs("span",{className:"jv-hit-head",children:[l.jsx("strong",{children:Ta(r.find(f=>f.id===e.senderId))}),c&&l.jsx("span",{className:"jv-hit-place",children:i6(n,a,r)}),l.jsx("time",{dateTime:new Date(e.createdAt).toISOString(),children:eH(e.createdAt)})]}),l.jsx("span",{className:"jv-hit-text",children:l.jsx(a6,{text:Sg(e),query:o})})]})}const kj=5;function lf({label:e,items:n,empty:a}){const[r,o]=w.useState(!1);return!n.length&&!a?null:l.jsxs("section",{className:"jv-result-group","aria-label":e,children:[l.jsxs("h3",{className:"jv-result-head",children:[e,l.jsx("span",{children:n.length})]}),n.length?r?n:n.slice(0,kj):l.jsx("p",{className:"jv-result-empty",children:a}),!r&&n.length>kj&&l.jsxs("button",{type:"button",className:"jv-result-more",onClick:()=>o(!0),children:[y("search.showAll",{count:n.length}),l.jsx(Pe,{name:"chevron-down"})]})]})}function tH({query:e,shown:n,chats:a,members:r,onOpenChat:o,onOpenMessage:c,onError:d}){const{result:f,loading:h}=n6(e,void 0,d),g=((f==null?void 0:f.chats)??[]).filter(p=>!n.has(p.id)),v=p=>{var j,b;return l.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>o(p),children:[l.jsxs("span",{className:"jv-hit-head",children:[l.jsx("strong",{children:p.type==="thread"?p.title:`#${p.title}`}),p.type==="thread"&&l.jsx("span",{className:"jv-hit-place",children:i6(p,a,r).split(" › ")[0]})]}),(((j=p.note)==null?void 0:j.text)||p.topic)&&l.jsx("span",{className:"jv-hit-text",children:l.jsx(a6,{text:((b=p.note)==null?void 0:b.text)||p.topic,query:e})})]},p.id)};return l.jsxs("div",{className:"jv-results","aria-live":"polite",children:[l.jsx(lf,{label:y("search.threads"),items:g.filter(p=>p.type==="thread").map(v)}),l.jsx(lf,{label:y("search.channels"),items:g.filter(p=>p.type==="channel").map(v)}),f?l.jsx(lf,{label:y("search.messages"),empty:y("search.noMessages"),items:f.messages.map(({message:p,chat:j})=>l.jsx(r6,{message:p,chat:j,chats:a,members:r,query:e,onOpen:c},p.id))}):h&&l.jsx("p",{className:"jv-result-empty",children:y("search.searching")})]})}function nH({className:e,...n}){return l.jsx("div",{"data-slot":"input-group",role:"group",className:Dn("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50","has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...n})}const iH=S1("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function aH({className:e,align:n="inline-start",...a}){return l.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:Dn(iH({align:n}),e),onClick:r=>{var o,c;r.target.closest("button")||(c=(o=r.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||c.focus()},...a})}function rH({className:e,...n}){return l.jsx(Nt,{"data-slot":"input-group-control",className:Dn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...n})}function lH({className:e,children:n,...a}){return l.jsxs(zA,{"data-slot":"scroll-area",className:Dn("relative",e),...a,children:[l.jsx(OA,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:n}),l.jsx(sH,{}),l.jsx(DA,{})]})}function sH({className:e,orientation:n="vertical",...a}){return l.jsx(wA,{"data-slot":"scroll-area-scrollbar",orientation:n,className:Dn("flex touch-none p-px transition-colors select-none",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...a,children:l.jsx(TA,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const l6="jarvy-collapsed-sections",oH=()=>{try{return JSON.parse(localStorage.getItem(l6)??"[]")}catch{return[]}};function Sj({chat:e}){return e.alerts>0?l.jsx("span",{className:"jv-badge","aria-label":y("sidebar.alerts",{count:e.alerts}),children:e.alerts}):e.unread>0?l.jsx("span",{className:"jv-count","aria-label":y("sidebar.unread",{count:e.unread}),children:e.unread}):null}function s6(e){const n=e.hint;if(!n||n.createdAt<e.updatedAt-1e3)return null;const a=n.chatType==="thread"&&n.chatId!==e.id,r={actor:n.actor,emoji:n.detail,title:n.title.length>16?`${n.title.slice(0,16)}…`:n.title};return n.kind==="reaction"?y(a?"hint.reactionInThread":"hint.reaction",r):y(a?"hint.threadSummary":n.chatType==="thread"?"hint.summary":"hint.notice",r)}function cH(e){var n;return e.type==="channel"&&s6(e)&&((n=e.hint)==null?void 0:n.chatType)==="thread"&&e.hint.chatId!==e.id?e.hint.chatId:null}function Cj({chat:e,channel:n}){const a=s6(e),r=e.lastMessage&&Os(e.lastMessage),o=a??(r?n&&e.lastSender?y("sidebar.said",{name:e.lastSender,text:r}):r:n?e.topic:"");return l.jsxs("span",{className:"jv-digest",children:[e.atMe&&l.jsx("span",{className:"jv-at-me",children:y("sidebar.atMe")}),l.jsx("span",{className:a?"jv-hint-line":void 0,children:o})]})}const Nj=e=>{const n=e.getBoundingClientRect();return{x:n.right-168,y:n.bottom+4}};function uH({chats:e,sections:n,bots:a,members:r,onOpenMessage:o,onOpenFound:c,onError:d,working:f,asking:h,selected:g,filter:v,followed:p,followedOpen:j,onFilterChange:b,onSelect:k,onOpenBot:S,onOpenFollowed:N,onMenu:C,onEditSection:M}){const[E,T]=w.useState(oH),R=V=>T(X=>{const Z=X.includes(V)?X.filter(D=>D!==V):[...X,V];return localStorage.setItem(l6,JSON.stringify(Z)),Z}),_=v.toLocaleLowerCase(),z=e.filter(V=>{var X;return V.type!=="thread"&&`${V.title} ${V.topic} ${((X=a.find(Z=>Z.id===V.botId))==null?void 0:X.name)??""}`.toLocaleLowerCase().includes(_)}),P=(p==null?void 0:p.unread)??0,H=(p==null?void 0:p.mentions)??0,O=z.filter(V=>V.type==="channel").sort((V,X)=>Number(X.pinned)-Number(V.pinned)||V.title.localeCompare(X.title,"zh-CN")),I=a.map(V=>({bot:V,chat:e.find(X=>X.type==="dm"&&X.botId===V.id)})).filter(({bot:V})=>V.name.toLocaleLowerCase().includes(_)).sort((V,X)=>{var Z,D,se,ne;return Number(X.bot.agent)-Number(V.bot.agent)||+!!((Z=X.chat)!=null&&Z.pinned)-+!!((D=V.chat)!=null&&D.pinned)||(((se=X.chat)==null?void 0:se.updatedAt)??0)-(((ne=V.chat)==null?void 0:ne.updatedAt)??0)}),$=V=>l.jsxs("div",{className:"jv-side-wrap",onContextMenu:X=>{X.preventDefault(),C({kind:"channel",chat:V},{x:X.clientX,y:X.clientY})},children:[l.jsxs("button",{type:"button",className:"jv-side-row","data-active":g===V.id||void 0,"data-unread":V.unread>0||void 0,"aria-current":g===V.id?"page":void 0,onClick:()=>k(V),children:[V.pinned?l.jsx(j0,{className:"jv-side-pin","aria-label":y("sidebar.pinned")}):l.jsx("span",{className:"jv-hash","aria-hidden":"true",children:"#"}),l.jsxs("span",{className:"jv-side-text",children:[l.jsxs("span",{className:"jv-side-line",children:[l.jsx("span",{className:"jv-side-label",title:V.title,children:V.title}),V.muted&&l.jsx("span",{className:"jv-side-muted","aria-label":y("sidebar.muted"),children:l.jsx(Pe,{name:"bell-slash"})})]}),l.jsxs("span",{className:"jv-side-line",children:[l.jsx(Cj,{chat:V,channel:!0}),l.jsx(Sj,{chat:V})]})]})]}),l.jsx("button",{type:"button",className:"jv-side-more","aria-label":y("sidebar.more",{name:V.title}),onClick:X=>C({kind:"channel",chat:V},Nj(X.currentTarget)),children:l.jsx(x0,{"aria-hidden":"true"})})]},V.id),Q=({bot:V,chat:X})=>{const Z=h.has(V.id)?"asking":f.has(V.id)?"working":void 0,D=!!X&&g===X.id;return l.jsxs("div",{className:"shadcn-chat-row relative",onContextMenu:se=>{se.preventDefault(),C({kind:"dm",bot:V,chat:X},{x:se.clientX,y:se.clientY})},children:[l.jsxs(Ee,{type:"button",variant:"ghost","data-active":D,"aria-current":D?"page":void 0,className:"h-15 w-full justify-start gap-2.5 rounded-md px-2 text-left hover:bg-accent/70 data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",onClick:()=>X?k(X):S(V),children:[l.jsx(_a,{color:V.color,mood:V.mood,size:36,badge:Z,crown:V.agent}),Z&&l.jsx("span",{className:"sr-only",children:y(Z==="asking"?"sidebar.asking":"sidebar.working")}),l.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{className:`min-w-0 flex-1 truncate text-sm ${X!=null&&X.unread?"font-semibold":"font-medium"}`,title:V.name,children:V.name}),(X==null?void 0:X.muted)&&l.jsx("span",{className:"jv-side-muted","aria-label":y("sidebar.muted"),children:l.jsx(Pe,{name:"bell-slash"})}),(X==null?void 0:X.pinned)&&l.jsx(j0,{className:"jv-dm-pin shrink-0","aria-label":y("sidebar.pinned")}),X&&l.jsx("time",{className:"shadcn-chat-time shrink-0 text-[11px] font-normal text-muted-foreground",dateTime:new Date(X.updatedAt).toISOString(),children:Ml(X.updatedAt)})]}),l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-normal text-muted-foreground",children:X?l.jsx(Cj,{chat:X,channel:!1}):""}),X&&l.jsx(Sj,{chat:X})]})]})]}),l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-xs","aria-label":y("sidebar.more",{name:V.name}),className:"shadcn-chat-more absolute top-4 right-2 opacity-0",onClick:se=>C({kind:"dm",bot:V,chat:X},Nj(se.currentTarget)),children:l.jsx(x0,{"aria-hidden":"true"})})]},V.id)},Y=(V,X,Z,D,se)=>l.jsxs("div",{className:"jv-side-section-head",children:[l.jsxs("button",{type:"button",className:"jv-side-section-toggle","aria-expanded":!Z,onClick:()=>R(V),children:[l.jsx("span",{className:"jv-side-chevron",children:l.jsx(Pe,{name:Z?"chevron-right":"chevron-down"})}),l.jsxs("span",{className:"jv-side-section-name",children:[X,Z&&D&&l.jsx("span",{className:"jv-dot","aria-label":y("sidebar.hasUnread")})]})]}),se&&l.jsx("button",{type:"button",className:"jv-side-section-edit","aria-label":y("sidebar.editSection",{name:X}),onClick:()=>M(se),children:l.jsx(Pe,{name:"pencil"})})]}),q=V=>!_&&E.includes(V),K=(V,X,Z,D)=>l.jsxs("div",{className:"jv-side-section",children:[Y(V,X,q(V),Z.some(se=>se.unread>0),D),!q(V)&&Z.map($)]},V);return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mx-3 mt-1 mb-2 shrink-0",role:"search",children:l.jsxs(nH,{className:"h-9 bg-background",children:[l.jsx(rH,{id:"jarvy-search",type:"search",value:v,onChange:V=>b(V.target.value),placeholder:y("sidebar.search"),"aria-label":y("sidebar.search"),onKeyDown:V=>{V.key==="Escape"&&v&&(V.preventDefault(),b(""))},className:"text-sm"}),l.jsx(aH,{align:"inline-start",children:l.jsx(_s,{"aria-hidden":"true"})})]})}),l.jsx(lH,{className:"min-h-0 flex-1",type:"auto",children:_?l.jsxs("nav",{className:"jv-side-nav jv-side-search px-3 pb-6","aria-label":y("sidebar.results"),children:[l.jsx(lf,{label:y("sidebar.chats"),items:[...O.map($),...I.map(Q)]}),l.jsx(tH,{query:v,shown:new Set(O.map(V=>V.id)),chats:e,members:r,onOpenChat:c,onOpenMessage:o,onError:d})]}):l.jsxs("nav",{className:"jv-side-nav px-3 pb-6","aria-label":y("sidebar.nav"),children:[!!(p!=null&&p.total)&&l.jsxs("button",{type:"button",className:"jv-side-row jv-side-top","data-active":j||void 0,"data-unread":P>0||void 0,"aria-current":j?"page":void 0,onClick:N,children:[l.jsx(Pe,{name:"chat-bubble"}),l.jsx("span",{className:"jv-side-label",children:y("sidebar.followed")}),H>0?l.jsx("span",{className:"jv-badge",children:H}):P>0&&l.jsx("span",{className:"jv-count",children:P})]}),n.map(V=>K(`s:${V.id}`,V.name,O.filter(X=>X.sectionId===V.id),V)),O.some(V=>!V.sectionId||!n.some(X=>X.id===V.sectionId))&&K("channels",y("sidebar.channels"),O.filter(V=>!V.sectionId||!n.some(X=>X.id===V.sectionId))),l.jsxs("div",{className:"jv-side-section",children:[Y("dms",y("sidebar.dms"),q("dms"),I.some(({chat:V})=>!!(V!=null&&V.unread))),!q("dms")&&l.jsx("div",{className:"space-y-1",children:I.map(Q)}),!q("dms")&&I.length===0&&l.jsx("p",{className:"jv-side-empty",children:y("sidebar.noDms")})]})]})})]})}function dH({chats:e,sections:n,bots:a,members:r,followed:o,followedOpen:c,working:d,asking:f,selected:h,filter:g,creating:v,createMenu:p,onFilterChange:j,onOpenFollowed:b,onOpenChat:k,onOpenBot:S,onOpenMenu:N,onEditSection:C,onCreate:M,onFind:E,onOpenFound:T,onError:R,onToggleCreate:_}){const z=w.useRef(null);return w.useEffect(()=>{if(!p)return;const P=H=>{var O;(O=z.current)!=null&&O.contains(H.target)||_(!1)};return document.addEventListener("pointerdown",P),()=>document.removeEventListener("pointerdown",P)},[p]),l.jsxs("aside",{className:"ui-sidebar","aria-label":y("sidebar.label"),children:[l.jsx("header",{className:"ui-sidebar-header",children:l.jsxs("div",{className:"jarvy-sidebar-create",ref:z,children:[l.jsx(vt,{icon:"add",label:y("sidebar.create"),"aria-expanded":p,"aria-haspopup":"menu",disabled:v,onClick:()=>_(!p)}),p&&l.jsxs("div",{className:"ui-popover jarvy-create-menu",role:"menu","aria-label":y("sidebar.createMenu"),children:[l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>M("channel"),children:[l.jsx(Pe,{name:"list-bullets"}),l.jsx("span",{className:"ui-menu-copy",children:y("sidebar.newChannel")})]}),l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>M("section"),children:[l.jsx(Pe,{name:"folder"}),l.jsx("span",{className:"ui-menu-copy",children:y("sidebar.newSection")})]}),l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>M("bot"),children:[l.jsx(Pe,{name:"person-add"}),l.jsx("span",{className:"ui-menu-copy",children:y("sidebar.newBot")})]})]})]})}),l.jsx(uH,{chats:e,sections:n,bots:a,members:r,onOpenMessage:E,onOpenFound:T,onError:R,working:d,asking:f,selected:h,filter:g,onFilterChange:j,followed:o,followedOpen:c,onOpenFollowed:b,onSelect:k,onOpenBot:S,onMenu:N,onEditSection:C})]})}function fH({textarea:e,value:n,setValue:a,inside:r,outside:o,bots:c,onInvite:d,participants:f}){const[h,g]=w.useState(null),[v,p]=w.useState(0),[j,b]=w.useState(null),k=w.useRef(null),S=w.useRef(null),N=w.useRef(null);w.useLayoutEffect(()=>{N.current===null||!e.current||(e.current.focus(),e.current.setSelectionRange(N.current,N.current),N.current=null)},[n,e]);const C=(D,se)=>D.name.toLowerCase().includes(se.toLowerCase()),M=h===null?[]:r.filter(D=>C(D,h)),E=f?M.filter(D=>f.has(D.id)):M,T=f?M.filter(D=>!f.has(D.id)):[],R=E.length>0&&T.length>0,_=[...E,...T],z=h===null?[]:o.filter(D=>C(D,h)),P=j?o.filter(D=>C(D,j.search)):[],H=_.length+(z.length?1:0),O=()=>{g(null),b(null)};function I(D=n){const se=e.current,ne=se?/(?:^|[^\p{Script=Latin}\p{Nd}_])@([^\s@]*)$/u.exec(D.slice(0,se.selectionStart)):null;g(ne?ne[1]:null),p(0),b(null)}function $(D){const se=e.current;if(!se)return;r.some(F=>F.id===D.id)||d(D);const ne=n.slice(0,se.selectionStart).replace(/@([^\s@]*)$/u,`@${D.name} `),B=ne+n.slice(se.selectionStart);N.current=ne.length,a(B),O()}function Q(D){j||b({search:h??"",active:0}),D&&requestAnimationFrame(()=>{var se;return(se=S.current)==null?void 0:se.focus()})}function Y(){var D;b(null),(D=e.current)==null||D.focus()}function q(D){if(!H||D.nativeEvent.isComposing)return!1;const se=v===_.length;return D.key==="ArrowDown"||D.key==="ArrowUp"?(D.preventDefault(),p((v+(D.key==="ArrowDown"?1:-1)+H)%H),b(null),!0):(D.key==="Enter"||D.key==="Tab")&&!se?(D.preventDefault(),$(_[v]),!0):(D.key==="Enter"||D.key==="Tab"||D.key==="ArrowRight")&&se?(D.preventDefault(),Q(!0),!0):D.key==="Escape"?(D.preventDefault(),O(),!0):!1}function K(D){!j||D.nativeEvent.isComposing||((D.key==="ArrowDown"||D.key==="ArrowUp")&&P.length?(D.preventDefault(),b({...j,active:(j.active+(D.key==="ArrowDown"?1:-1)+P.length)%P.length})):D.key==="Enter"?(D.preventDefault(),P[j.active]&&$(P[j.active])):(D.key==="Escape"||D.key==="ArrowLeft"&&!j.search)&&(D.preventDefault(),Y()))}const V=D=>{var ne;const se=D.relatedTarget;(!se||!((ne=k.current)!=null&&ne.contains(se))&&se!==e.current)&&O()},X=(D,se)=>l.jsxs("button",{type:"button",role:"option","aria-selected":se,className:"ui-menu-item","data-active":se||void 0,onMouseDown:ne=>{ne.preventDefault(),$(D)},children:[l.jsx(lr,{member:D,bots:c,size:20}),l.jsx("span",{className:"ui-menu-copy",children:D.name}),l.jsx("span",{className:"jv-muted",children:D.kind==="bot"?"Bot":y("common.member")})]},D.id);return{menu:H>0?l.jsxs("div",{ref:k,className:"jv-mention-box","data-side":j?"":void 0,onBlur:V,children:[l.jsxs("div",{className:"ui-popover jv-mention-menu",role:"listbox","aria-label":y("mention.menu"),children:[R&&l.jsx("p",{className:"jv-mention-group","aria-hidden":"true",children:y("mention.inThread")}),E.map((D,se)=>X(D,se===v)),R&&l.jsx("div",{className:"jv-mention-sep",role:"separator"}),R&&l.jsx("p",{className:"jv-mention-group","aria-hidden":"true",children:y("mention.inChannel")}),T.map((D,se)=>X(D,E.length+se===v)),z.length>0&&l.jsxs("button",{type:"button",className:"ui-menu-item jv-mention-more","aria-haspopup":"listbox","aria-expanded":!!j,"data-active":v===_.length||void 0,onMouseEnter:()=>{p(_.length),Q(!1)},onMouseDown:D=>{D.preventDefault(),p(_.length),Q(!0)},children:[l.jsx("span",{className:"ui-menu-copy",children:y("mention.outside")}),l.jsx("span",{className:"jv-muted",children:z.length}),l.jsx(Pe,{name:"chevron-right"})]})]}),j&&l.jsxs("div",{className:"ui-popover jv-mention-side",role:"listbox","aria-label":y("mention.outsideList"),children:[l.jsxs("div",{className:"jv-mention-side-head",children:[l.jsx("button",{type:"button",className:"jv-mention-back","aria-label":y("common.back"),onMouseDown:D=>{D.preventDefault(),Y()},children:l.jsx(Pe,{name:"chevron-left"})}),l.jsx("input",{ref:S,type:"search",value:j.search,placeholder:y("common.searchMembers"),"aria-label":y("mention.searchOutside"),onChange:D=>b({search:D.target.value,active:0}),onKeyDown:K})]}),l.jsx("div",{className:"jv-mention-side-list",children:P.length?P.map((D,se)=>X(D,se===j.active)):l.jsx("p",{className:"jv-mention-empty",children:y("common.noMatch")})}),l.jsx("p",{className:"ui-menu-note ui-small",children:y("mention.invites")})]})]}):null,track:I,onKeyDown:q,close:O,leaves:V}}const Ej={text:null,files:[],quote:null,passages:[],key:null,signature:null,outgoing:null,sending:!1};function o6(e,n){var o;const a=((o=n.text)==null?void 0:o.trim())??"",r=e.text??"";return{text:r.trim()?a?`${a}
|
|
794
|
+
|
|
795
|
+
${r}`:r:a||e.text,files:[...n.files.filter(c=>!e.files.some(d=>d.id===c.id)),...e.files],quote:e.quote??n.quote,passages:[...n.passages,...e.passages],outgoing:null}}class hH{constructor(n){qe(this,"drafts",new Map);qe(this,"listeners",new Set);qe(this,"timer",null);qe(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));this.storageKey=n;try{const a=JSON.parse(localStorage.getItem(n)??"{}");for(const[r,o]of Object.entries(a)){const c={...Ej,...o,sending:!1};this.drafts.set(r,c.outgoing?{...c,...o6(c,c.outgoing)}:c)}}catch{localStorage.removeItem(n)}}get(n){return this.drafts.get(n)??Ej}update(n,a){const r=this.get(n),o=typeof a=="function"?a(r):a;this.drafts.set(n,{...r,...o}),this.listeners.forEach(d=>d());const c=Object.keys(o).every(d=>d==="text"||d==="sending");this.timer&&clearTimeout(this.timer),c?this.timer=setTimeout(()=>this.save(),300):this.save()}save(){var a;this.timer&&(clearTimeout(this.timer),this.timer=null);const n={};for(const[r,{sending:o,...c}]of this.drafts)((a=c.text)!=null&&a.trim()||c.files.length||c.quote||c.passages.length||c.outgoing)&&(n[r]=c);Object.keys(n).length?localStorage.setItem(this.storageKey,JSON.stringify(n)):localStorage.removeItem(this.storageKey)}async clear(n){this.timer&&(clearTimeout(this.timer),this.timer=null);const a=[...this.drafts.values()].flatMap(r=>{var o;return[...r.files,...((o=r.outgoing)==null?void 0:o.files)??[]]});await Promise.all(a.map(r=>n(r.id).catch(o=>console.warn(`Pending attachment ${r.id} was not deleted on log-out`,o)))),this.drafts.clear(),localStorage.removeItem(this.storageKey),this.listeners.forEach(r=>r())}}const mH=e=>`jarvy-drafts:${e}`,Tj=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");function Ng(e,n,a){e.update(n.chatId,{quote:{id:n.id,name:Ta(a.find(r=>r.id===n.senderId)),text:Sg(n).replace(/\s+/g," ").slice(0,160)}})}function c6(e,n){return w.useSyncExternalStore(e.subscribe,()=>e.get(n))}function Eg({chatId:e,id:n,drafts:a,placeholder:r,disabled:o=!1,mention:c,initialText:d,formRef:f,scrollRef:h,extra:g,onSend:v,onError:p,onNotice:j}){const b=c6(a,e),k=b.sending,[S,N]=w.useState([]),[C,M]=w.useState(!1),E=S.filter(Z=>Z.chatId===e),T=E.length>0,R=w.useRef(new Map),_=w.useRef(null),z=b.text??d??"",P=b.files,H=b.quote,O=Z=>a.update(e,{text:Z}),I=fH({textarea:_,value:z,setValue:O,inside:(c==null?void 0:c.inside)??[],outside:(c==null?void 0:c.outside)??[],bots:(c==null?void 0:c.bots)??[],onInvite:Z=>c==null?void 0:c.onInvite(Z),participants:c==null?void 0:c.participants});async function $(Z){var F;const D=e;if(!Z.length)return;if(T){j(y("composer.busy"));return}if(P.length+Z.length>5){j(y("composer.tooMany",{count:5}));return}if(Z.some(ee=>ee.size===0||ee.size>Px)){j(y("composer.size",{limit:`${Px/1024**3} GB`}));return}const se=Z.map(ee=>({key:Tj(),chatId:D,name:ee.name,done:0})),ne=se.map(ee=>ee.key),B=(ee,W)=>N(de=>de.map(oe=>oe.key===ee?{...oe,done:W}:oe));N(ee=>[...ee,...se]);for(const ee of ne)R.current.set(ee,new AbortController);try{for(const[ee,W]of Z.entries()){const de=ne[ee];try{const oe=await he.uploadAttachment(D,W,be=>B(de,be),(F=R.current.get(de))==null?void 0:F.signal);a.update(D,be=>({files:[...be.files,oe]}))}catch(oe){if(!(oe instanceof DOMException&&oe.name==="AbortError"))throw oe}finally{N(oe=>oe.filter(be=>be.key!==de))}}}catch(ee){p(ee)}finally{N(ee=>ee.filter(W=>!ne.includes(W.key)));for(const ee of ne)R.current.delete(ee)}}async function Q(Z){const D=e;try{await he.removeAttachment(Z),a.update(D,se=>({files:se.files.filter(ne=>ne.id!==Z)}))}catch(se){p(se)}}function Y(Z){const D=[...Z.clipboardData.files];if(!D.length)return;Z.preventDefault();const se=new Date().toISOString().replace(/\D/g,"").slice(0,14);$(D.map((ne,B)=>ne.type.startsWith("image/")&&/^image\.\w+$/.test(ne.name)?new File([ne],`${y("composer.pasted")}-${se}${D.length>1?`-${B+1}`:""}.${ne.name.split(".").pop()}`,{type:ne.type}):ne))}const q=Z=>Z.dataTransfer.types.includes("Files");function K(Z){!q(Z)||o||(Z.preventDefault(),Z.dataTransfer.dropEffect="copy",M(!0))}function V(Z){q(Z)&&(Z.preventDefault(),M(!1),o||$([...Z.dataTransfer.files]))}async function X(Z){Z==null||Z.preventDefault();const D=e,se=a.get(D),ne=(se.text??d??"").trim(),B=se.files,F=se.quote,ee=se.passages,de=[ee.map((ve,re)=>`[[q${re+1}]]`).join(`
|
|
796
|
+
`),ne].filter(Boolean).join(`
|
|
797
|
+
|
|
798
|
+
`);if(!de&&!B.length||se.sending||T||o)return;const oe=JSON.stringify([de,B.map(ve=>ve.id),(F==null?void 0:F.id)??null,ee]),be=se.signature===oe&&se.key?se.key:Tj(),we={text:ne,files:B,quote:F,passages:ee};a.update(D,{text:"",files:[],quote:null,passages:[],key:be,signature:oe,outgoing:we,sending:!0});try{await v(de,B.map(ve=>ve.id),be,F==null?void 0:F.id,ee.map(({messageId:ve,text:re})=>({messageId:ve,text:re}))),a.update(D,{key:null,signature:null,outgoing:null})}catch(ve){a.update(D,re=>o6(re,we)),p(ve)}finally{a.update(D,{sending:!1})}}return w.useLayoutEffect(()=>{const Z=()=>{const D=_.current,se=h==null?void 0:h.current;if(!D)return;const ne=se==null?void 0:se.scrollTop;D.style.height="auto",D.style.height=`${D.scrollHeight}px`,se&&ne!==void 0&&se.scrollTop!==ne&&se.scrollTo({top:ne,behavior:"instant"})};return Z(),window.addEventListener("resize",Z),()=>window.removeEventListener("resize",Z)},[z,e,h]),l.jsxs("form",{ref:f,className:`ui-compose-wrap${C?" jarvy-dropping":""}`,onSubmit:Z=>void X(Z),onDragEnter:K,onDragOver:K,onDragLeave:Z=>{Z.currentTarget.contains(Z.relatedTarget)||M(!1)},onDrop:V,children:[P.length+E.length>0&&l.jsxs("div",{className:"jarvy-pending-files",children:[P.map(Z=>l.jsxs("span",{className:"jarvy-file-chip",children:[l.jsx(Pe,{name:"paperclip"}),l.jsx("span",{title:Z.name,children:Z.name}),l.jsx("button",{type:"button","aria-label":y("composer.removeFile",{name:Z.name}),onClick:()=>void Q(Z.id),children:"×"})]},Z.id)),E.map(Z=>l.jsxs("span",{className:"jarvy-file-chip","data-uploading":!0,children:[l.jsx(Pe,{name:"paperclip"}),l.jsx("span",{title:Z.name,children:Z.name}),l.jsxs("span",{className:"jarvy-file-percent",children:[Math.floor(Z.done*100),"%"]}),l.jsx("button",{type:"button","aria-label":y("composer.cancelUpload",{name:Z.name}),onClick:()=>{var D;return(D=R.current.get(Z.key))==null?void 0:D.abort()},children:"×"}),l.jsx("span",{className:"jarvy-file-progress",role:"progressbar","aria-label":y("composer.uploading",{name:Z.name}),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(Z.done*100),children:l.jsx("span",{style:{width:`${Z.done*100}%`}})})]},Z.key))]}),H&&l.jsxs("div",{className:"jv-compose-quote",children:[l.jsx("span",{className:"jv-compose-quote-label",children:y("composer.replying")}),l.jsx("span",{className:"jv-reply-author",children:H.name}),l.jsx("span",{className:"jv-reply-text",children:H.text||y("common.attachment")}),l.jsx("button",{type:"button","aria-label":y("composer.cancelReply"),onClick:()=>a.update(e,{quote:null}),children:"×"})]}),l.jsx(RP,{quotes:b.passages,onRemove:Z=>a.update(e,D=>({passages:D.passages.filter((se,ne)=>ne!==Z)}))}),l.jsxs("div",{className:"ui-composer jv-composer",children:[c&&I.menu,C&&l.jsx("span",{className:"jarvy-drop-hint",role:"status",children:y("composer.drop")}),l.jsxs("label",{className:"jarvy-attach-trigger",title:y("composer.attach"),children:[l.jsx(Pe,{name:"add"}),l.jsx("input",{type:"file",multiple:!0,"aria-label":y("composer.attach"),disabled:k||T||o||P.length>=5,onChange:Z=>{const D=[...Z.target.files??[]];Z.target.value="",$(D)}})]}),l.jsx("textarea",{ref:_,id:n,rows:1,maxLength:32e3,value:z,onPaste:Y,placeholder:r,disabled:o,"aria-label":y("composer.input"),onChange:Z=>{O(Z.target.value),c&&I.track(Z.target.value)},onKeyDown:Z=>{c&&I.onKeyDown(Z)||Z.key==="Enter"&&!Z.shiftKey&&!Z.nativeEvent.isComposing&&(Z.preventDefault(),X())},onClick:()=>{c&&I.track()},onBlur:c?I.leaves:void 0}),g,l.jsx("button",{type:"submit",className:"ui-round ui-send","aria-label":y("composer.send"),disabled:k||T||o||!z.trim()&&!P.length&&!b.passages.length,children:l.jsx(Pe,{name:"arrow-up"})})]})]})}function u6({messages:e,members:n,me:a,activeQuestion:r,onSettled:o,onPreview:c,onQuote:d,onReact:f,onFold:h,onJump:g,onError:v,bot:p,onBotCard:j}){const b=ZS(),k=p&&l.jsx(lr,{member:n.find(S=>S.id===p.id)??{id:p.id,kind:"bot",name:p.name},bots:[p],size:22,onBot:j});return l.jsx(l.Fragment,{children:e.map((S,N)=>{const C=e[N-1],M=e[N+1],E=S.role==="assistant"&&!!(M!=null&&M.question)&&M.senderId===S.senderId,T=S.folded;return l.jsxs(w.Fragment,{children:[eg(S.createdAt,C==null?void 0:C.createdAt)&&l.jsx(V5,{time:S.createdAt}),l.jsxs("div",{className:`ui-message-row ${S.role==="user"?"ui-user":""}`,"data-message":S.id,"data-asks":E||void 0,"data-shut":T||void 0,tabIndex:-1,children:[S.role==="assistant"&&l.jsx("span",{className:"jarvy-bubble-avatar",children:k??l.jsx(_a,{color:"gray",size:22})}),l.jsxs("div",{className:"jv-dm-stack",children:[$5(S,C)&&l.jsx(q0,{time:S.createdAt,className:"jv-dm-time"}),T?l.jsx("div",{className:"ui-bubble jv-folded-bubble",children:l.jsx(JS,{message:S})}):l.jsxs(l.Fragment,{children:[S.replyTo&&l.jsx(YS,{message:S,members:n,onJump:g}),S.question?l.jsx(PS,{message:{...S,question:S.question},keyboard:S.id===r,onSettled:o}):l.jsxs("div",{className:"ui-bubble",children:[S.content&&l.jsx(QS,{whole:b.has(S.id),children:l.jsx(US,{message:S,members:n,me:a,onJump:g})}),S.attachments.length>0&&l.jsx(DS,{files:S.attachments,onOpen:R=>c(S.attachments,R)})]}),l.jsx(KS,{message:S,me:a,members:n,onReact:f,onError:v})]})]}),l.jsxs("div",{className:"jv-row-actions",children:[l.jsx(XS,{message:S,me:a,onReply:d,onReact:f,onError:v}),l.jsx(vt,{icon:S.folded?"unfold":"fold",label:y(S.folded?"actions.unfold":"actions.fold"),onClick:()=>{S.folded&&b.add(S.id),h(S,!S.folded)}})]})]})]},S.id)})})}const Ar=Math.PI*2,ji=(e,n=0,a=1)=>Math.min(a,Math.max(n,e)),wn=(e,n,a)=>e+(n-e)*a,l1=e=>(e=ji(e),e<.5?2*e*e:1-(-2*e+2)**2/2),pH=e=>1-(1-ji(e))**3,Bc=e=>{e=ji(e);const n=1.9;return 1+(n+1)*(e-1)**3+n*(e-1)**2},cn=(e,n,a,r=l1)=>r((e-n)/(a-n)),si=(e,n,a,r,o)=>e<r?cn(e,n,a):1-cn(e,r,o),gs=(e,n,a,r)=>e<n||e>n+a?0:4*r*((e-n)/a)*(1-(e-n)/a);class Ud{constructor(n,a){qe(this,"x",0);qe(this,"v",0);this.k=n,this.c=a}kick(n){this.v+=n}step(n){return this.v+=(-this.k*this.x-this.c*this.v)*n,this.x+=this.v*n,this.x}get value(){return this.x}}const t0={hop:{name:"hop",dur:2,pose:e=>({squash:1+.22*si(e,0,.14,.16,.22),lift:gs(e,.2,.46,.3),lid:.22*si(e,0,.12,.16,.22),eyeScale:1+.08*si(e,.2,.3,.55,.7),mouth:e>.2&&e<.9?2:0,mouthOpen:.6}),beats:[[.66,e=>e.squash(2.4)]]},spin:{name:"spin",dur:2.8,pose:e=>{const n=e<1.5?cn(e,.1,.55,Bc):1-cn(e,1.5,1.75),a=e>1.6&&e<2.6?Math.sin(Ar*(e-1.6)*1.4)*.05*(1-cn(e,1.9,2.6)):0;return{spin:Ar*l1(cn(e,.55,1.5)),lift:.03*n,squash:1-.13*n,tilt:a,kind:e>1.65&&e<2.35?3:0,eyeScale:1+.08*n,mouth:e>.55&&e<1.6?2:0,mouthOpen:.8,earL:wn(.22,.1,ji(n)),earR:wn(.22,.1,ji(n))}},beats:[[1.55,e=>{e.squash(1.5),e.ears(1.5,1.5)}]]},hopSpin:{name:"hopSpin",dur:2.9,pose:e=>({spin:Ar*l1(cn(e,.55,1.35)),lift:gs(e,.55,.8,.3),squash:1+.2*cn(e,.1,.45),lid:.2*si(e,.1,.3,.45,.6),eyeScale:1+.1*(e>.6&&e<1.4?1:0),mouth:e>.6&&e<1.5?2:0,mouthOpen:.75,blush:.3*ji(cn(e,.45,.6)*(e<.95?1:0))}),beats:[[1.36,e=>{e.squash(1.6),e.tilt(1)}]]},joy:{name:"joy",dur:2.3,pose:e=>{const n=[.1,.52,.94],a=[.1,-.1,0];let r=0,o=0;n.forEach((d,f)=>{r+=gs(e,d,.3,.13),e>d-.1&&(o=wn(f?a[f-1]:0,a[f],cn(e,d-.1,d+.12,Bc)))});const c=si(e,0,.12,1.7,1.95);return{lift:r,tilt:o*(1-cn(e,1.3,1.6)),happy:c,blush:c,mouth:c>.5?2:0,mouthOpen:.95,earL:wn(.22,.12,c),earR:wn(.22,.12,c)}},beats:[[.4,e=>e.squash(1.5)],[.82,e=>e.squash(1.5)],[1.24,e=>e.squash(1.8)]]},sway:{name:"sway",dur:3.8,pose:e=>{const n=si(e,.15,.7,3.1,3.55),a=ji((e-.3)/3),r=Math.sin(Ar*(1.6*a+.35*(a-Math.sin(Ar*a)/Ar)))*n;return{tilt:.115*r,look:[.014*r,-.004*n],mouth:n>.5?1:0,lid:.12*n,blush:.32*n,earL:wn(.22,.16,n),earR:wn(.22,.16,n)}}},flick:{name:"flick",dur:1.8,pose:e=>({look:[.035*si(e,.05,.2,1.1,1.4),.012*si(e,.05,.2,1.1,1.4)]}),beats:[[.2,e=>e.ears(0,-4.2)],[.52,e=>e.ears(0,-3.6)]]},tilt:{name:"tilt",dur:2.4,pose:e=>{const n=e<1.6?cn(e,.05,.45,Bc):1-cn(e,1.6,1.95);return{tilt:.17*n,earR:wn(.22,.03,ji(n)),earL:wn(.22,.42,ji(n)),eyeScale:1+.1*ji(n),look:[0,.03*ji(n)]}},beats:[[1.95,e=>e.tilt(-.9)]]},look:{name:"look",dur:3,pose:e=>{const n=e<.9?-.42*cn(e,.1,.4,pH):e<1.9?wn(-.42,.42,cn(e,.95,1.3)):.42*(1-cn(e,2,2.35)),a=e<.85?-cn(e,0,.1):e<1.85?wn(-1,1,cn(e,.85,.95)):1-cn(e,1.9,2);return{yaw:n,look:[.04*a,.01]}},beats:[[.08,e=>e.squash(.6)],[.92,e=>e.squash(.6)],[1.95,e=>e.squash(.5)]]},stretch:{name:"stretch",dur:3,pose:e=>{const n=e<1.55?cn(e,0,1):0,a=si(e,.15,.35,1.5,1.6);return{squash:1-.2*n,lift:.03*n,kind:a>.5?4:0,mouth:e>.3&&e<1.6?1:0,earL:wn(.22,.03,n),earR:wn(.22,.03,n),tilt:.03*Math.sin(Ar*e*.9)*n,happy:si(e,1.6,1.7,2.5,2.8)}},beats:[[1.56,e=>{e.squash(2.2),e.ears(2,2)}]]},doze:{name:"doze",dur:4.2,pose:e=>{const n=e<2.4?cn(e,.1,2):0,a=n*Math.max(0,Math.sin(Ar*e*.8)),r=si(e,2.4,2.5,2.9,3.3),o=c=>.9*Math.max(0,1-Math.abs(e-c)/.07);return{open:Math.max(.08,1-.88*n-o(3.45)-o(3.7)),lid:.2*n,tilt:.08*n+.03*a,lift:-.012*n-.012*a+gs(e,2.42,.22,.07),squash:1+.05*n,earL:.22+.2*n,earR:.22+.2*n,eyeScale:1+.16*r}},beats:[[2.42,e=>{e.ears(-3.5,-3.5),e.tilt(-1.2)}],[2.64,e=>e.squash(1.2)]]},poke:{name:"poke",dur:2.4,pose:e=>{const n=si(e,.14,.16,.42,.5),a=si(e,.45,.6,1.5,1.9);return{kind:n>.5?1:0,blush:a*.9,happy:a*.7,mouth:a>.3?2:0,mouthOpen:.7}},beats:[[.15,e=>{e.squash(2.4),e.tilt(-2.4),e.ears(2.6,2.6)}]]},listen:{name:"listen",dur:2.2,pose:e=>{const n=si(e,.08,.2,1.6,1.9);return{earL:wn(.22,.05,n),earR:wn(.22,.05,n),eyeScale:1+.12*n,lift:gs(e,.12,.2,.06),look:[-.02*n,-.045*n]}},beats:[[.1,e=>e.ears(-3,-3)],[.32,e=>e.squash(1)]]},dance:{name:"dance",dur:3.4,pose:e=>{const a=Math.floor(e/.36),r=e%.36/.36,o=si(e,0,.2,2.7,3),c=a===0?0:a%2?.13:-.13,d=a%2?-.13:.13;return{tilt:wn(c,d,Bc(r*1.4))*o,lift:e<2.6?gs(r,.05,.9,.035):0,happy:o,blush:o*.8,mouth:o>.5?2:0,mouthOpen:.9}},beats:Array.from({length:7},(e,n)=>[n*.36+.02,a=>a.squash(.9)])},puff:{name:"puff",dur:2.6,pose:e=>{const n=e<1.4?cn(e,.05,.6,Bc):1-cn(e,1.4,1.52),a=ji(n);return{zoom:1+.13*n,squash:1-.04*n,blush:.9*a,eyeScale:1-.06*a,mouth:e>1.4&&e<1.8?3:0,mouthOpen:.55,lift:gs(e,1.45,.2,.05)}},beats:[[1.47,e=>{e.squash(1.8),e.ears(1.5,1.5)}]]},land:{name:"land",dur:.8,pose:e=>({kind:e>.16&&e<.34?1:0,squash:1-.05*si(e,.16,.24,.4,.75)}),beats:[[.18,e=>{e.squash(1.6),e.tilt(1.6)}]]}},gH=[["flick",3],["tilt",3],["look",2],["sway",2],["stretch",2],["spin",1]],vH=[["flick",3],["sway",3]],Mj=8,Aj=12,yH=150,xH=45e3,bH=1/8;class jH{constructor(){qe(this,"act",null);qe(this,"name",null);qe(this,"at",0);qe(this,"beat",0);qe(this,"last",0);qe(this,"weight",0);qe(this,"carried",!1);qe(this,"squash",new Ud(220,11));qe(this,"roll",new Ud(55,2.6));qe(this,"earL",new Ud(260,9));qe(this,"earR",new Ud(260,9));qe(this,"lift",0);qe(this,"vy",0);qe(this,"tilt",0);qe(this,"turn",0);qe(this,"vTilt",0);qe(this,"vTurn",0);qe(this,"quiet",0);qe(this,"next",0);qe(this,"lastAct",null);qe(this,"blink",-1e9);qe(this,"blinkAt",0);qe(this,"hold",0)}get playing(){return this.name}play(n,a,r=!1){this.carried||r&&this.act&&(a-this.at)/1e3<.8||(this.act=t0[n],this.name=n,this.at=a,this.beat=0,this.lastAct=n)}carry(n,a){n!==this.carried&&(this.carried=n,n?(this.act=null,this.name=null,this.at=a):(this.act=t0.land,this.name="land",this.at=a,this.beat=0))}idle(n,a,r,o=!1){if(this.quiet=r?0:this.quiet+a,!this.next){this.next=n+(Mj+Math.random()*Aj)*1e3;return}if(r||this.act||this.carried||n<this.next)return;if(!o&&this.quiet>yH*1e3){this.next=n+xH,this.quiet=0,this.play("doze",n);return}const c=(o||this.lastAct==="doze"?vH:gH).filter(([g])=>g!==this.lastAct),d=c.reduce((g,[,v])=>g+v,0);let f=Math.random()*d,h=c[0][0];for(const[g,v]of c)if(f-=v,f<=0){h=g;break}this.next=n+(Mj+Math.random()*Aj)*1e3,this.play(!o&&Math.random()<bH?"puff":h,n)}apply(n,a){const r=this.last?Math.min(.05,Math.max(0,(a-this.last)/1e3)):0;this.last=a;const o=(a-this.at)/1e3;this.act&&!this.carried&&o>this.act.dur&&(this.act=null,this.name=null);const c=this.act;this.weight=this.carried?1:c?(c===t0.land?1:ji(o/.1))*ji((c.dur-o)/.18):Math.max(0,this.weight-r/.18),this.hold=this.carried?Math.min(1,this.hold+r/.12):Math.max(0,this.hold-r/.2);const d=this.weight,f=this.carried?{squash:.8,tilt:.13*Math.sin(Ar*1.1*o),eyeScale:1.1,mouth:1}:c?c.pose(o):{};if(c&&!this.carried)for(const[z,P]of c.beats??[])o<z||this.beat>z||(this.beat=z+1,P({squash:H=>this.squash.kick(H),tilt:H=>this.roll.kick(H),ears:(H,O)=>{this.earL.kick(H),this.earR.kick(O)}}));const h=(f.lift??0)*d+.22*this.hold,g=r?(h-this.lift)/r:0,v=g-this.vy;this.lift=h,this.vy=g,this.earL.kick(1.4*v),this.earR.kick(1.4*v);const p=4,j=r/p;for(let z=0;z<p;z++)this.squash.step(j),this.roll.step(j),this.earL.step(j),this.earR.step(j);const b=(f.tilt??0)*d+this.roll.value,k=(f.spin??0)*d,S=r?(b-this.tilt)/r:0,N=r?(k-this.turn)/r:0,C=S-this.vTilt,M=N-this.vTurn;this.tilt=b,this.vTilt=S,this.turn=k,this.vTurn=N,this.earL.kick(-.5*C-.4*M),this.earR.kick(.5*C+.4*M);const E=n.squash,T=(z,P)=>{P!==void 0&&(n[z]=wn(n[z],P,d))};if(T("eyeScale",f.eyeScale),T("lid",f.lid),T("open",f.open),T("blush",f.blush),T("mouthOpen",f.mouthOpen),T("earL",f.earL),T("earR",f.earR),T("spin",f.spin===void 0?void 0:n.spin+f.spin),T("yaw",f.yaw===void 0?void 0:n.yaw+f.yaw),f.look&&(n.look=[wn(n.look[0],f.look[0],d),wn(n.look[1],f.look[1],d)]),d>.5)for(const z of["kind","happy","mouth"]){const P=f[z];P!==void 0&&(n[z]=P)}const R=f.squash===void 0?1:f.squash;n.squash=ji(E*wn(1,R,d)+this.squash.value+.025*Math.abs(this.roll.value)*d,.82,1.24),n.tilt+=b,n.lift+=h,n.earL+=this.earL.value+.24*this.hold,n.earR+=this.earR.value+.24*this.hold,n.kind===0&&n.open>.5&&a>=this.blinkAt&&a-this.blink>400&&(this.blink=a,this.blinkAt=a+2200+Math.random()*3200);const _=(a-this.blink)/160;return _>=0&&_<=1&&(n.open*=1-.94*Math.sin(Math.PI*_)),{face:n,zoom:f.zoom?wn(1,f.zoom,d):1}}shake(){this.squash.kick(-2.2)}}const wH=64,kH=200,SH=33,CH=800;function _j(){try{return hS({gpu:!0})??null}catch{return null}}class d6{constructor(){qe(this,"persona",new jH);qe(this,"input",{motion:"sleep",mood:"normal",lookX:0,lookY:0});qe(this,"color",0);qe(this,"crown",!1);qe(this,"near",!1);qe(this,"onFrame",null);qe(this,"rig",new PI);qe(this,"canvases",new Map);qe(this,"reduced",matchMedia("(prefers-reduced-motion: reduce)"));qe(this,"spare",null);qe(this,"running",!1);qe(this,"frame",0);qe(this,"last",0);qe(this,"drawn",0);qe(this,"stirred",0);qe(this,"visibility",()=>{cancelAnimationFrame(this.frame),document.hidden||(this.frame=requestAnimationFrame(this.tick))});qe(this,"tick",n=>{var g;this.frame=requestAnimationFrame(this.tick);const a=[...this.canvases].filter(([v])=>v.offsetWidth>0);if(!this.running||!a.length){this.last=0;return}const r=this.input,o=r.motion!=="idle"&&r.motion!=="sleep",c=a.every(([v])=>v.offsetWidth<wH);if(c&&((this.near||this.persona.playing||o)&&(this.stirred=n),n-this.drawn<(n-this.stirred<CH?SH:kH)-4))return;this.drawn=n,(g=this.onFrame)==null||g.call(this,n),r.reduced=this.reduced.matches;const d=this.rig.frame(n,r);!r.reduced&&!c&&this.persona.idle(n,this.last?Math.min(50,n-this.last):16,o,r.motion==="sleep"),this.last=n;const{face:f,zoom:h}=this.persona.apply(d,n);for(const[v,p]of a){const j=v.getContext("2d"),b=Math.round(v.offsetWidth*Math.min(2,devicePixelRatio||1)),k=p.zoom*h;j&&(p.figure||(p.figure=this.spare??_j(),this.spare=null),p.figure&&(v.width!==b?v.width=v.height=b:j.clearRect(0,0,b,b),p.figure.paint(j,b,this.color,f,{zoom:k,shadow:p.shadow}),this.crown&&(j.globalAlpha=Math.min(1,Math.max(0,Math.cos(f.spin)*1.6-.2)),pS(j,b,fS(f,k)),j.globalAlpha=1)))}})}shake(){this.rig.shake()}add(n,a,r=!0){return this.canvases.set(n,{zoom:a,shadow:r,figure:null}),()=>{var o,c;(c=(o=this.canvases.get(n))==null?void 0:o.figure)==null||c.dispose(),this.canvases.delete(n)}}largest(){let n=null;for(const a of this.canvases.keys())a.offsetWidth>((n==null?void 0:n.offsetWidth)??0)&&(n=a);return n}start(){return this.running?!0:(this.spare=_j(),this.spare?(this.running=!0,document.addEventListener("visibilitychange",this.visibility),this.visibility(),!0):!1)}stop(){var n,a;document.removeEventListener("visibilitychange",this.visibility),cancelAnimationFrame(this.frame),this.running=!1,(n=this.spare)==null||n.dispose(),this.spare=null;for(const r of this.canvases.values())(a=r.figure)==null||a.dispose(),r.figure=null}}const n0=()=>matchMedia("(prefers-reduced-motion: reduce)").matches;function f6(e,n,a,r){const o=w.useRef(null);w.useEffect(()=>{const f=o.current;o.current={chat:a,id:r},!(!f||f.chat!==a||!r||r===f.id)&&(n0()||e.play("listen",performance.now()))},[r,a]);const c=w.useRef(!1);w.useEffect(()=>{if(!n0()){if(n.motion==="idle"||n.motion==="sleep"){c.current=!1;return}c.current||(c.current=!0,e.play("hop",performance.now(),!0))}},[n.motion]);const d=w.useRef(null);w.useEffect(()=>{const f=n.view.done;!f||d.current===n.view.startedAt||(d.current=n.view.startedAt,!(f.outcome!=="completed"||n0())&&e.play(["joy","hopSpin","dance"][Math.floor(Math.random()*3)],performance.now()))},[n.view.done,n.view.startedAt])}function NH(e,n,a,r,o,c=0){const g=n.offsetWidth,v=n.offsetHeight,p=n.offsetLeft,j=n.offsetTop,b=Math.max(300,Math.round(a*.4));e.style.maxHeight="";const k=e.hasAttribute("data-fit"),S=e.offsetHeight,N=X=>X==="left"||X==="right",C=X=>X==="left"?p-10-8:X==="right"?a-p-g-10-8:X==="below"?r-j-v-10-8:j-10-8,M=p+g/2>a/2,E=X=>k?N(X)?Math.min(b,Math.max(160,C(X))):Math.min(b,M?p+g-8:a-p-8):e.offsetWidth,T=X=>N(X)?E(X)<=C(X):Math.min(120,S)<=C(X),R=c>.05?"right":c<-.05?"left":null,z=(R==="left"||R===null&&C("left")>=C("right")?["left","right"]:["right","left"]).find(T)??(C("below")>=C("above")?"below":"above"),P=e.dataset.side,O=P!==void 0&&P!==z&&N(P)===N(z)&&T(P)&&C(P)+40>=C(z)?P:z,I=k&&(O==="left"||!N(O)&&M),$=O==="left"?p-10:O==="right"?p+g+10:M?p+g:p;e.style.width="",e.style.maxWidth=k?`${E(O)}px`:"",I?(e.style.left="",e.style.right=`${a-$}px`):(e.style.right="",k&&(e.style.left=`${$}px`));const Q=e.offsetWidth,Y=k?I?$-Q:$:O==="left"?p-10-Q:O==="right"?p+g+10:Math.min(Math.max(8,p+g-Q),Math.max(8,a-Q-8)),q=o&&Y<o.right&&Y+Q>o.left?o.bottom+6:0,K=Math.min(Math.max(8,q),Math.max(8,r-140));let V;O==="below"?(V=Math.max(8,Math.min(j+v+10,r-8-Math.min(S,120))),e.style.maxHeight=`${Math.max(40,r-V-8)}px`):O==="above"?(e.style.maxHeight=`${Math.max(40,j-10-K)}px`,V=Math.max(K,j-10-e.offsetHeight)):(e.style.maxHeight=`${Math.max(120,r-K-8)}px`,V=Math.min(Math.max(K,j+6),Math.max(K,r-e.offsetHeight-8))),k||(e.style.left=`${Y}px`),e.style.top=`${V}px`,e.dataset.side=O,e.style.setProperty("--npc-tail",N(O)?`${Math.min(e.offsetHeight-18,Math.max(18,j+Math.min(g,v)/2-V))}px`:`${Math.min(Q-18,Math.max(18,p+g/2-Y))}px`)}const Rj=.06,EH=matchMedia("(prefers-reduced-motion: reduce)");function $d({text:e,limit:n,streaming:a=!1}){const[,r]=w.useState(0),o=w.useRef({text:"",count:0,rate:Rj,at:performance.now()}),c=performance.now(),d=o.current;d.count=Math.min(d.text.length,d.count+d.rate*(c-d.at)),d.at=c,e!==d.text&&(d.text=e,d.count=Math.min(d.count,e.length),d.rate=Math.max(Rj,(e.length-d.count)/n));const f=!EH.matches&&d.count<e.length;w.useEffect(()=>{if(!f)return;const g=requestAnimationFrame(()=>r(v=>v+1));return()=>cancelAnimationFrame(g)});const h=f?e.slice(0,Math.floor(d.count)).replace(/[\uD800-\uDBFF]$/,""):e;return l.jsxs(l.Fragment,{children:[h,(f||a)&&l.jsx("i",{className:"jv-npc-caret"})]})}function TH({className:e,children:n,onReading:a}){const r=w.useRef(null),o=w.useRef(null),c=w.useRef(a),[d,f]=w.useState(!1);return c.current=a,w.useEffect(()=>{const h=r.current,g=o.current;if(!h||!g)return;let v=!0,p=0;const j=()=>{h.scrollTop=h.scrollHeight,p=h.scrollTop},b=()=>{v&&j(),f(h.scrollTop>1)},k=()=>{const N=h.scrollHeight-h.scrollTop-h.clientHeight<4;N&&!v?(v=!0,p=h.scrollTop,c.current(!1)):!N&&v&&(h.scrollTop<p-1?(v=!1,c.current(!0)):j()),f(h.scrollTop>1)},S=new ResizeObserver(b);return S.observe(g),S.observe(h),b(),h.addEventListener("scroll",k,{passive:!0}),()=>{S.disconnect(),h.removeEventListener("scroll",k),c.current(!1)}},[]),l.jsx("span",{ref:r,className:`${e} jv-npc-tail`,"data-above":d||void 0,children:l.jsx("span",{ref:o,children:n})})}const h6={think:j9,mutter:cN,read:z9,write:W9,run:Qw,script:C9,compact:g9,retry:w1,ask:gw,say:Y9,chat:jw,tool:gN},s1=e=>y("npc.duration",{value:Ea(Math.max(0,e)/1e3,{maximumFractionDigits:1,minimumFractionDigits:1})}),MH={completed:"npc.done",interrupted:"npc.done.interrupted",failed:"npc.done.failed"};function m6({view:e,name:n,cat:a,area:r,avoid:o,layout:c,facing:d,toolbar:f,onHint:h}){var $,Q,Y;const g=w.useRef(null),v=w.useRef(null),[p,j]=w.useState(!1),[,b]=w.useState(0);w.useLayoutEffect(()=>{c.current=()=>{var Z;if(!g.current||!a.current||!r.current)return;const K=r.current.getBoundingClientRect(),V=o.current?o.current.getBoundingClientRect().top-K.top:K.height,X=(Z=v.current)==null?void 0:Z.getBoundingClientRect();p?g.current.removeAttribute("data-fit"):g.current.setAttribute("data-fit",""),NH(g.current,a.current,K.width,V,X?{left:X.left-K.left,right:X.right-K.left,bottom:X.bottom-K.top}:null,d())},c.current();const q=new ResizeObserver(()=>{var K;return(K=c.current)==null?void 0:K.call(c)});for(const K of[g.current,v.current])K&&q.observe(K);return()=>{q.disconnect(),c.current=null}},[p]);const k=e.steps.some(q=>q.state==="running");w.useEffect(()=>{if(!p||!k)return;const q=setInterval(()=>b(K=>K+1),200);return()=>clearInterval(q)},[p,k]),w.useEffect(()=>{if(!p)return;const q=K=>{K.key==="Escape"&&j(!1)};return addEventListener("keydown",q),()=>removeEventListener("keydown",q)},[p]);const S=($=e.steps[0])==null?void 0:$.id;w.useEffect(()=>{j(!1)},[S]);const[N,C]=w.useState(!1),[M,E]=w.useState(!1),[T,R]=w.useState(null);w.useEffect(()=>{if(!N)return;const q=K=>{var V;(V=g.current)!=null&&V.contains(K.target)||C(!1)};return document.addEventListener("pointermove",q),()=>document.removeEventListener("pointermove",q)},[N]);const _=N||M;w.useEffect(()=>{var q;R(_?((q=e.shown)==null?void 0:q.id)??null:null)},[_]);const z=T&&e.steps.find(q=>q.id===T)||e.shown,P=z?z.look:e.done?"action":null;let H=null;if((z==null?void 0:z.look)==="thought"||(z==null?void 0:z.look)==="mutter"){const q=(z.line??"").replace(/\n\s*\n\s*/g,`
|
|
799
|
+
|
|
800
|
+
`).trim(),K=l.jsx($d,{text:q,limit:300,streaming:z.look==="thought"&&z.state==="running"},z.id),[V,X]=y("npc.mutter",{text:""}).split("");H=l.jsx(TH,{className:z.look==="thought"?"jv-npc-thought":"jv-npc-murmur",onReading:E,children:z.look==="thought"?K:l.jsxs(l.Fragment,{children:[V,K,X]})},z.id)}else if((z==null?void 0:z.look)==="speech")H=l.jsx("span",{className:"jv-npc-speech",children:l.jsx($d,{text:z.line??"",limit:1500,streaming:z.state==="running"&&z.icon==="say"},z.id)});else if(z){const q=h6[z.icon];H=l.jsxs("span",{className:"jv-npc-action","data-state":z.state,children:[l.jsx(q,{}),l.jsx($d,{text:z.title,limit:300},z.id),z.state==="running"&&l.jsx("i",{className:"jv-npc-dots"})]})}else e.done&&(H=l.jsxs("span",{className:"jv-npc-action","data-state":e.done.outcome==="completed"?"ok":"failed",children:[e.done.outcome==="completed"?l.jsx(Li,{}):l.jsx(zo,{}),l.jsx($d,{text:y(MH[e.done.outcome],{duration:s1(e.done.ms)}),limit:300},`done:${e.done.ms}`)]}));const O=e.steps.length>0,I=(z==null?void 0:z.icon)==="ask"&&z.state==="running";return w.useEffect(()=>{H||C(!1)},[!H]),l.jsxs(l.Fragment,{children:[f==null?void 0:f(v,()=>j(!1)),l.jsx("div",{ref:g,className:"jv-npc","data-open":p||void 0,"data-look":p?void 0:P??void 0,"data-kind":z==null?void 0:z.icon,"data-fading":!p&&!z&&((Q=e.done)==null?void 0:Q.fading)||void 0,hidden:!p&&!H,onPointerEnter:q=>{q.pointerType==="mouse"&&C(!0)},onPointerLeave:()=>C(!1),children:p?l.jsxs("section",{className:"jv-npc-panel","aria-label":y("npc.panel"),children:[l.jsxs("header",{children:[l.jsx("strong",{children:y("npc.panel")}),e.startedAt>0&&l.jsx("span",{children:s1((e.endedAt??Date.now()+e.skew)-e.startedAt)}),l.jsx("button",{type:"button",onClick:()=>j(!1),"aria-label":y("npc.collapse"),title:y("npc.collapse"),children:l.jsx(X9,{})})]}),l.jsx("ol",{children:e.steps.map(q=>l.jsx(AH,{step:q,skew:e.skew},q.id))})]}):l.jsxs(l.Fragment,{children:[P==="speech"&&l.jsxs("span",{className:"jv-npc-name",children:[n,(z==null?void 0:z.to)&&l.jsx("em",{children:y("npc.to",{chat:z.to})})]}),O?l.jsx("div",{role:"button",tabIndex:0,className:"jv-npc-line",onClick:()=>j(!0),title:y("npc.expand"),onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),j(!0))},children:H}):l.jsx("div",{className:"jv-npc-line",children:H}),I&&e.answer&&((Y=z.options)==null?void 0:Y.some(q=>q.value))&&l.jsx("div",{className:"jv-npc-options",children:z.options.map(q=>l.jsx("button",{type:"button",onClick:()=>e.answer(q.value),children:q.label},q.label))}),I&&!e.answer&&z.hint&&(h?l.jsxs("button",{type:"button",className:"jv-npc-hint",onClick:h,children:[z.hint,l.jsx(Fc,{"aria-hidden":"true"})]}):l.jsx("p",{className:"jv-npc-hint",children:z.hint}))]})})]})}function AH({step:e,skew:n}){const[a,r]=w.useState(!1),o=h6[e.icon],c=e.detail;return l.jsxs("li",{"data-state":e.state,style:e.depth?{paddingLeft:`${e.depth*16}px`}:void 0,children:[l.jsxs("button",{type:"button","aria-expanded":c?a:void 0,disabled:!c,onClick:()=>r(d=>!d),children:[l.jsx(o,{className:"jv-npc-kind"}),l.jsx("span",{className:"jv-npc-title",children:e.title}),l.jsxs("span",{className:"jv-npc-state",children:[e.state==="running"?l.jsx(fw,{}):e.state==="ok"?l.jsx(Li,{}):l.jsx(zo,{}),y(`npc.state.${e.state}`)]}),l.jsx("span",{className:"jv-npc-time",children:s1((e.endedAt??Date.now()+n)-e.startedAt)}),c&&l.jsx(As,{className:"jv-npc-chevron"})]}),a&&c&&l.jsx("pre",{"data-kind":e.icon,children:c})]})}const sf="src/web/thread/ThreadPane.tsx",kf="npm run build",_H=["export function ThreadPane({ thread, replies }: Props) {"," const scroll = useRef<HTMLDivElement>(null);"," useLayoutEffect(() => {"," scroll.current!.scrollTop = scroll.current!.scrollHeight;"," }, [thread.id]);"," …"].join(`
|
|
801
|
+
`),RH=["> tsc -p tsconfig.web.json","src/web/thread/ThreadPane.tsx:58:41 - error TS2345: Argument of type","'HTMLDivElement | null' is not assignable to parameter of type 'HTMLDivElement'.","","Found 1 error."].join(`
|
|
802
|
+
`),p6={question:"npc.demo.question",options:[{value:"yes",label:"npc.demo.yes"},{value:"no",label:"npc.demo.no"}]},zH=[{kind:"think",text:"npc.demo.think1",ms:4200},{kind:"read",target:sf,ms:2600,output:_H},{kind:"think",text:"npc.demo.think2",ms:3800},{kind:"write",target:sf,ms:2600,output:["- useLayoutEffect(() => scrollToEnd(), [thread.id]);","+ useLayoutEffect(() => {","+ requestAnimationFrame(() => scrollToEnd(scroll.current));","+ }, [thread.id, replies.length]);"].join(`
|
|
803
|
+
`)},{kind:"mutter",text:"npc.demo.mutter1"},{kind:"run",target:kf,ms:3200,failed:!0,output:RH},{kind:"mutter",text:"npc.demo.mutter2"},{kind:"compact",ms:3400,output:"context: 412,380 → 38,210 tokens"},{kind:"write",target:sf,ms:2e3,output:"+ const el = scroll.current; if (el) scrollToEnd(el);"},{kind:"run",target:kf,ms:3e3,output:["> vite build","✓ 2331 modules transformed.","✓ built in 4.9s"].join(`
|
|
804
|
+
`)},{kind:"say",text:"npc.demo.post",to:"npc.demo.channel"},{kind:"ask",...p6},{kind:"say",replies:{yes:"npc.demo.replyYes",no:"npc.demo.replyNo"}}],o1=[{key:"sleep",label:"npc.pose.sleep",motion:"sleep"},{key:"idle",label:"npc.pose.idle",motion:"idle"},{key:"think",label:"npc.pose.think",motion:"think",step:{kind:"think",text:"npc.demo.think1"}},{key:"mutter",label:"npc.pose.mutter",motion:"work",step:{kind:"mutter",text:"npc.demo.mutter2"}},{key:"say",label:"npc.pose.say",motion:"turn",step:{kind:"say",text:"npc.demo.replyNo"}},{key:"ask",label:"npc.pose.ask",motion:"ask",step:{kind:"ask",...p6}},{key:"read",label:"npc.pose.read",motion:"read",step:{kind:"read",target:sf}},{key:"work",label:"npc.pose.work",motion:"work",fast:!0,step:{kind:"run",target:kf}},{key:"compact",label:"npc.pose.compact",motion:"yawn",step:{kind:"compact"}},{key:"busy",label:"npc.pose.busy",motion:"busy"},{key:"failed",label:"npc.pose.failed",motion:"idle",mood:"dizzy",shake:!0,step:{kind:"run",target:kf,failed:!0}},{key:"done",label:"npc.pose.done",motion:"stretch",mood:"happy",done:!0},{key:"groom",label:"npc.pose.groom",motion:"groom"}];function OH({controls:e,onReplay:n,toolbar:a}){const[r,o]=w.useState(!1);return l.jsxs("div",{ref:a,className:"jv-npc-toolbar",role:"toolbar","aria-label":y("npc.toolbar"),children:[l.jsxs("div",{className:"jv-npc-toolbar-row",children:[l.jsx("span",{children:y("npc.toolbar")}),l.jsx("button",{type:"button",className:"jv-npc-icon",onClick:n,"aria-label":y("npc.replay"),title:y("npc.replay"),children:l.jsx(Iw,{})}),l.jsxs(Hr,{value:e.baseMood,onValueChange:c=>e.setBaseMood(c),children:[l.jsx(Fr,{className:"jv-npc-mood","aria-label":y("npc.mood"),title:y("npc.mood"),children:l.jsx(qr,{})}),l.jsx(Ur,{className:"jv-select-menu",position:"popper",sideOffset:4,children:a9.map(c=>l.jsx(Oi,{value:c,children:y(`npc.mood.${c}`)},c))})]}),l.jsxs("button",{type:"button",className:"jv-npc-toggle","aria-expanded":r,onClick:()=>o(c=>!c),children:[l.jsx(rN,{}),y("npc.poses")]})]}),r&&l.jsx("div",{className:"jv-npc-poses",role:"group","aria-label":y("npc.poses"),children:o1.map(c=>{var d;return l.jsx("button",{type:"button","aria-pressed":((d=e.pose)==null?void 0:d.key)===c.key,onClick:()=>e.hold(c.key),children:y(c.label)},c.key)})})]})}const DH={think:"think",mutter:"mutter",read:"read",write:"write",run:"run",compact:"compact",ask:"ask",say:"say"},zj=e=>e.text?[...y(e.text)].slice(0,e.typed).join(""):"";function LH(e){var r;if(e.kind==="think"||e.kind==="mutter")return y(`npc.step.${e.kind}`);if(e.kind==="ask"&&e.answer)return y("npc.step.ask.ok",{answer:y(e.answer.label)});const n=e.state==="failed"&&e.kind==="run"?"failed":e.state==="running"?"running":"ok",a=e.kind==="say"&&e.to?"post":e.kind;return y(`npc.step.${a}.${n}`,{target:((r=e.target)==null?void 0:r.split("/").pop())??"",chat:e.to?`#${y(e.to)}`:""})}function Oj(e){var r;const n=e.kind==="think"?"thought":e.kind==="mutter"?"mutter":e.kind==="say"||e.kind==="ask"?"speech":"action",a=e.kind==="ask"?y(e.question):zj(e);return{id:String(e.id),look:n,icon:DH[e.kind],state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:0,title:LH(e),line:n==="action"?void 0:a,to:e.to?`#${y(e.to)}`:void 0,options:e.kind==="ask"&&e.state==="running"?(r=e.options)==null?void 0:r.map(o=>({label:y(o.label),value:o.value})):void 0,detail:e.kind==="ask"?y(e.question):e.text?zj(e):e.output}}const i0={steps:[],phase:"before",startedAt:0,endedAt:null,flash:null,shake:0,recapUntil:0},BH=40,Dj=6e3,Lj=500,IH={think:"think",mutter:"work",read:"read",write:"work",run:"work",compact:"yawn",ask:"ask",say:"turn"};class a0 extends Error{}const PH=e=>({...e,id:-1,state:e.failed?"failed":"running",startedAt:Date.now(),endedAt:null,typed:e.text?[...y(e.text)].length:0});function HH(e,n){const[a,r]=w.useState(i0),[o,c]=w.useState(n),[d,f]=w.useState(0),[h,g]=w.useState(null),[,v]=w.useState(0),p=w.useRef(null);w.useEffect(()=>{if(!e||h)return;let T=!0;const R=new Set,_=O=>new Promise((I,$)=>{const Q=setTimeout(()=>{R.delete(Q),T?I():$(new a0)},O);R.add(Q)}),z=(O,I)=>r($=>({...$,steps:$.steps.map(Q=>Q.id===O?{...Q,...I}:Q)})),P=(O,I)=>r($=>({...$,flash:{mood:O,until:Date.now()+I}})),H=async(O,I,$)=>{const Q=[...y(I)].length,Y=$?Math.max(16,$/Q):BH;for(let q=1;q<=Q;q++)z(O,{typed:q}),await _(Y)};return(async()=>{r({...i0}),await _(700);const O=Date.now();let I="";r(Q=>({...Q,phase:"turn",startedAt:O}));for(const[Q,Y]of zH.entries()){const{ms:q,failed:K,replies:V,...X}=Y,Z=V?V[I]:Y.text;if(r(D=>({...D,steps:[...D.steps,{...X,text:Z,id:Q,state:"running",startedAt:Date.now(),endedAt:null,typed:0}]})),Y.kind==="ask"){if(I=await new Promise(D=>{p.current=D}),p.current=null,!T)throw new a0;z(Q,{state:"ok",endedAt:Date.now(),answer:Y.options.find(D=>D.value===I)});continue}Z?await H(Q,Z,Y.kind==="think"?q??null:null):await _(q??1e3),(Y.kind==="mutter"||Y.kind==="say")&&await _(1100),z(Q,{state:K?"failed":"ok",endedAt:Date.now()}),K&&(r(D=>({...D,shake:D.shake+1})),P("dizzy",2600),await _(900))}const $=Date.now();for(r(Q=>({...Q,phase:"stretch",endedAt:$,recapUntil:$+Dj})),$-O>2e4&&P("happy",3200),await _(2200);;)r(Q=>({...Q,phase:"idle"})),await _(9e3),r(Q=>({...Q,phase:"groom"})),await _(2800)})().catch(O=>{if(!(O instanceof a0))throw O}),()=>{var O;T=!1;for(const I of R)clearTimeout(I);(O=p.current)==null||O.call(p,"")}},[e,d,h]),w.useEffect(()=>{var z;const T=Date.now(),R=[((z=a.flash)==null?void 0:z.until)??0,a.recapUntil-Lj,a.recapUntil].filter(P=>P>T);if(!R.length)return;const _=setTimeout(()=>v(P=>P+1),Math.min(...R)-T+20);return()=>clearTimeout(_)});const j=o1.find(T=>T.key===h)??null,b=Date.now(),k=j?null:a.phase==="turn"?[...a.steps].reverse().find(T=>T.state==="running")??null:null,S=j?j.motion:k?IH[k.kind]:a.phase==="stretch"?"stretch":a.phase==="groom"?"groom":a.phase==="turn"?"think":"idle",N=a.flash&&a.flash.until>b?a.flash.mood:null,C=a.endedAt!==null&&b<a.recapUntil,M=j?j.step?PH(j.step):null:k??(a.phase==="turn"?a.steps.at(-1)??null:null);return{...{view:{steps:a.steps.map(Oj),shown:M?Oj(M):null,startedAt:a.startedAt,endedAt:a.endedAt,skew:0,answer:T=>{var R;return(R=p.current)==null?void 0:R.call(p,T)},done:j!=null&&j.done?{ms:31400,outcome:"completed",fading:!1}:!j&&C?{ms:a.endedAt-a.startedAt,outcome:"completed",fading:b>=a.recapUntil-Lj}:null},motion:S,fast:j?!!j.fast:(k==null?void 0:k.kind)==="write"||(k==null?void 0:k.kind)==="run",mood:(j==null?void 0:j.mood)??N??o,shake:a.shake,canRecap:!j&&a.endedAt!==null&&!C,showRecap:()=>r(T=>({...T,recapUntil:Date.now()+Dj}))},controls:{pose:j,baseMood:o,setBaseMood:c,replay:()=>{g(null),f(T=>T+1)},hold:T=>{g(T),r(R=>{var _;return{...i0,shake:R.shake+((_=o1.find(z=>z.key===T))!=null&&_.shake?1:0)}})}}}}const qH=4e3,Bj={turn:null,last:null,skew:0};function FH(e,n){const a=[...e.steps];let r=e.dropped;for(const o of n)if(o.op==="step"){const c=a.findIndex(d=>d.id===o.step.id);c>=0?a[c]=o.step:a.push(o.step)}else if(o.op==="text"){const c=a.findIndex(g=>g.id===o.id),d=a[c];if(!d)continue;const f=(d.text??"")+o.append,h=Math.max(0,f.length-qH);a[c]={...d,text:f.slice(h),omitted:(d.omitted??0)+h}}else{const c=a.findIndex(d=>d.id===o.id);c>=0&&(a.splice(c,1),r++)}return{...e,steps:a,dropped:r}}function UH(e){const[n,a]=w.useState(Bj);return w.useEffect(()=>{if(a(Bj),!e)return;const r=new EventSource(`/api/bots/${encodeURIComponent(e)}/live`),o=c=>JSON.parse(c.data);return r.addEventListener("snapshot",c=>{const d=o(c);a(f=>({...f,turn:d.turn,skew:d.now-Date.now()}))}),r.addEventListener("start",c=>{const{turn:d}=o(c);a(f=>({...f,turn:d}))}),r.addEventListener("patch",c=>{const{patches:d}=o(c);a(f=>f.turn?{...f,turn:FH(f.turn,d)}:f)}),r.addEventListener("end",c=>{const{outcome:d,endedAt:f}=o(c);a(h=>h.turn?{...h,turn:null,last:{...h.turn,outcome:d,endedAt:f}}:h)}),()=>r.close()},[e]),n}const r0=new Set(["messages.read","messages.search","chats.list","chats.info","threads.list","members.list","bots.list","sections.list","history.read","list","describe"]),Ka=e=>e.state==="running"?"running":e.state==="failed"?"failed":"ok",l0=e=>(e==null?void 0:e.split("/").filter(Boolean).pop())??"",$H=e=>{const n=(e??"").split(`
|
|
805
|
+
`)[0].trim();return n.length>40?`${n.slice(0,39)}…`:n},Ij=e=>e.type==="channel"?`#${e.title}`:e.title;function s0(e){return e?e.omitted?`${e.head}
|
|
806
|
+
${y("npc.live.omitted",{count:Ea(e.omitted)})}
|
|
807
|
+
${e.tail}`:e.head+e.tail:""}const Pj=e=>e.omitted?`${y("npc.live.omitted",{count:Ea(e.omitted)})}
|
|
808
|
+
`:"";function o0(e){switch(e.icon){case"think":return{motion:"think",fast:!1};case"mutter":return{motion:"work",fast:!1};case"read":case"chat":return{motion:"read",fast:!1};case"say":return{motion:"turn",fast:!1};case"ask":return{motion:"ask",fast:!1};case"compact":return{motion:"yawn",fast:!1};case"retry":return{motion:"busy",fast:!1};default:return{motion:"work",fast:!0}}}function VH(e,n,a){const r={id:e.id,state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:n},o=(h,g,v)=>({...r,look:"action",icon:h,title:g,detail:v});switch(e.kind){case"thinking":return{...r,look:"thought",icon:"think",title:y("npc.step.think"),line:e.text??"",detail:Pj(e)+(e.text??"")};case"text":return{...r,look:"mutter",icon:"mutter",title:y("npc.step.mutter"),line:e.text??"",detail:Pj(e)+(e.text??"")};case"compaction":return o("compact",y(`npc.live.compact.${Ka(e)}`),e.tokensBefore!=null&&e.tokensAfter!=null?y("npc.live.tokens",{before:Ea(e.tokensBefore),after:Ea(e.tokensAfter)}):s0(e.output));case"retry":return o("retry",e.state==="running"?y("npc.live.retry.running",{attempt:e.attempt??1,max:e.maxAttempts??1}):y(`npc.live.retry.${Ka(e)}`),s0(e.output))}const c=e.input??{},d=s0(e.output),f=[c.path??c.command??c.args,d].filter(Boolean).join(`
|
|
809
|
+
|
|
810
|
+
`);switch(e.tool){case"read":return o("read",y(`npc.live.read.${Ka(e)}`,{target:l0(c.path)}),f);case"edit":return o("write",y(`npc.live.edit.${Ka(e)}`,{target:l0(c.path)}),f);case"write":return o("write",y(`npc.live.write.${Ka(e)}`,{target:l0(c.path)}),f);case"bash":return o("run",y(`npc.live.run.${Ka(e)}`,{target:$H(c.command)}),f);case"codemode":return o("script",y(`npc.live.script.${Ka(e)}`),f);case"chat":return GH(e,r,a,d);default:return o("tool",y(`npc.live.tool.${Ka(e)}`,{tool:e.tool??""}),f)}}function GH(e,n,a,r){const o=e.input??{},c=o.action??"",d=o.chat,f=d&&(d.id===null?d.type!=="dm":d.id!==a)?Ij(d):void 0;if(c==="messages.send")return{...n,look:"speech",icon:"say",to:f,line:o.text??"",detail:[o.text,e.state==="failed"?r:""].filter(Boolean).join(`
|
|
811
|
+
|
|
812
|
+
`),title:e.state==="failed"?y("npc.live.sendFailed"):f?y(`npc.step.post.${e.state==="running"?"running":"ok"}`,{chat:f}):y(`npc.step.say.${e.state==="running"?"running":"ok"}`)};if(c==="messages.ask"){const v=YH(e);return{...n,look:"speech",icon:"ask",to:f,line:o.text??"",options:(o.options??[]).map(p=>({label:p})),hint:f?y("npc.live.answerIn",{chat:f}):y("npc.live.answerBelow"),detail:[o.text,...(o.options??[]).map(p=>`· ${p}`),r].filter(Boolean).join(`
|
|
813
|
+
`),title:e.state==="running"?y("npc.step.ask.running"):v?y("npc.step.ask.ok",{answer:v}):y(e.state==="failed"?"npc.live.askFailed":"npc.live.askClosed")}}if(c==="environments.switch")return{...n,look:"action",icon:"tool",title:y(`npc.live.switch.${Ka(e)}`),detail:r};const h=d?Ij(d):"",g=r0.has(c)?h?y(`npc.live.browse.${e.state==="running"?"running":"ok"}`,{chat:h}):y(`npc.live.browseAll.${e.state==="running"?"running":"ok"}`):y(`npc.live.tool.${Ka(e)}`,{tool:c||"chat"});return{...n,look:"action",icon:r0.has(c)?"chat":"tool",title:e.state==="failed"&&r0.has(c)?y("npc.live.tool.failed",{tool:c}):g,detail:r}}function YH(e){try{const n=JSON.parse(e.output?e.output.head+e.output.tail:"");return n.status!=="answered"?null:[...(n.selected??[]).map(a=>a.label??""),n.custom??""].filter(Boolean).join(y("common.listSeparator"))}catch{return null}}function Hj(e,n){const a=new Map(e.steps.map(o=>[o.id,o.parentId])),r=o=>{let c=0,d=o.parentId;for(;d&&c<4;)c++,d=a.get(d)??null;return c};return e.steps.map(o=>VH(o,r(o),n))}function Vd(e){var a;const n=((a=e.line)==null?void 0:a.length)??0;if(e.look==="speech"){const r=Math.min(7e3,Math.max(2500,1500+50*n))+Math.min(1500,n/.06);return{firm:r,light:r}}return e.look==="mutter"?{firm:1500,light:Math.min(3500,Math.max(1500,800+30*n))}:e.state==="failed"?{firm:2e3,light:2e3}:{firm:0,light:e.look==="action"?900:0}}const KH=4e3,qj=1500;function Fj(e,n,a,r){var b;const o=k=>k-a;let c=null;for(const k of e)k.state==="running"&&(!c||k.startedAt>=c.startedAt)&&(c=k);const d=[];for(const k of e.filter(S=>S.state!=="running"&&S.endedAt!==null&&Vd(S).firm).sort((S,N)=>S.endedAt-N.endedAt)){const S=o(k.endedAt),N=d.at(-1);N&&k.look==="speech"&&(N.end=Math.min(N.end,Math.max(N.start+qj,S)));const C=Math.max(S,(N==null?void 0:N.end)??0);C-S>KH||d.push({step:k,start:C,end:C+Vd(k).firm})}const f=(c==null?void 0:c.look)==="speech"?c:null;if(f){const k=o(f.startedAt);for(let S=d.length-1;S>=0;S--){const N=d[S];N.start>=k&&N.start>n?d.splice(S,1):N.end>k&&(N.end=Math.max(N.start+qj,k))}}let h=null;for(const k of e){if(k.state==="running"||k.endedAt===null||!Vd(k).light)continue;const S=o(k.endedAt)+Vd(k).light;S>n&&(!h||k.endedAt>=h.step.endedAt)&&(h={step:k,end:S})}const g=d.find(k=>k.start<=n&&n<k.end),v=(g==null?void 0:g.step)??(f||c&&c.look!=="thought"||h==null?void 0:h.step),p=v??f??c??(r?e.at(-1)??null:null),j=[...d.flatMap(k=>[k.start,k.end]),(h==null?void 0:h.end)??0].filter(k=>k>n);return{shown:p,lingering:!!v,next:j.length?Math.min(...j):0,wordsEnd:((b=d.at(-1))==null?void 0:b.end)??0}}const Uj=6e3,$j=500,XH=2e4,QH=10*6e4;function g6(e,n,a,r){var _;const{turn:o,last:c,skew:d}=UH(e),[f,h]=w.useState(null),[g,v]=w.useState(0),[p,j]=w.useState(0),[,b]=w.useState(0),k=w.useRef(new Set),S=w.useMemo(()=>o?Hj(o,n):c?Hj(c,n):[],[o,c,n]);w.useEffect(()=>{for(const z of(o==null?void 0:o.steps)??[])z.state==="failed"&&!k.current.has(z.id)&&(k.current.add(z.id),v(P=>P+1),h({mood:"dizzy",until:Date.now()+2600}))},[o]),w.useEffect(()=>{c&&(k.current.clear(),j(Math.max(Date.now(),Fj(S,Date.now(),d,!1).wordsEnd)+Uj),c.outcome==="completed"&&c.endedAt-c.startedAt>XH&&h({mood:"happy",until:Date.now()+3200}))},[c]);const N=Date.now(),C=Fj(S,N,d,o!==null),M=C.shown,E=S.filter(z=>z.state==="running").sort((z,P)=>P.startedAt-z.startedAt)[0],T=E&&E.look!=="thought"?o0(E):C.lingering&&M?o0(M):E?o0(E):o?{motion:"think",fast:!1}:r,R=!o&&!M&&c!==null&&N<p;return w.useEffect(()=>{const z=[(f==null?void 0:f.until)??0,p-$j,p,C.next].filter(H=>H>Date.now()),P=setTimeout(()=>b(H=>H+1),z.length?Math.min(...z)-Date.now()+20:1e3);return()=>clearTimeout(P)}),{view:{steps:S,shown:M,skew:d,startedAt:((_=o??c)==null?void 0:_.startedAt)??0,endedAt:o?null:(c==null?void 0:c.endedAt)??null,done:R?{ms:c.endedAt-c.startedAt,outcome:c.outcome,fading:N>=p-$j}:null},motion:T.motion,fast:T.fast,mood:f&&f.until>N?f.mood:a,shake:g,canRecap:!o&&c!==null&&!R&&N+d-c.endedAt<QH,showRecap:()=>j(Date.now()+Uj)}}const v6="jarvy-floating-bot",ko=10,ZH=4,Gd=()=>matchMedia("(prefers-reduced-motion: reduce)").matches,Yd=new URLSearchParams(location.search).get("npc")==="demo",JH={zz:l.jsxs(l.Fragment,{children:[l.jsx("i",{children:"z"}),l.jsx("i",{children:"Z"})]}),ask:"?",sweat:l.jsxs("svg",{viewBox:"0 0 20 28",children:[l.jsx("path",{d:"M10 1C10 1 2 13 2 18.5a8 8 0 0 0 16 0C18 13 10 1 10 1Z"}),l.jsx("ellipse",{cx:"7",cy:"18",rx:"1.8",ry:"3"})]}),sparkle:l.jsx("svg",{viewBox:"0 0 100 100",children:[[14,22,9],[86,18,7],[90,46,4.5]].map(([e,n,a])=>l.jsx("path",{d:`M${e} ${n-a}Q${e} ${n} ${e+a} ${n}Q${e} ${n} ${e} ${n+a}Q${e} ${n} ${e-a} ${n}Q${e} ${n} ${e} ${n-a}Z`},e))})};function y6({motion:e}){const n=LI[e];return n?l.jsx("span",{className:"jv-figure-mark","data-mark":n,"aria-hidden":"true",children:JH[n]}):null}function Zf(e){return!e||e.status==="stop"?{motion:"sleep",fast:!1}:e.status!=="running"||e.activity==="asking"?{motion:"idle",fast:!1}:["compacting","retrying","aborting"].includes(e.phase)?{motion:"busy",fast:!1}:e.activity==="tool_calling"||e.phase==="tool"?{motion:"work",fast:!0}:e.activity==="texting"||e.phase==="texting"?{motion:"work",fast:!1}:{motion:"think",fast:!1}}function WH(){try{const e=JSON.parse(localStorage.getItem(v6)??"");if(e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1)return e}catch{}return{x:1,y:0}}function eq({bot:e,chatId:n,status:a,area:r,avoid:o,lastMine:c,onOpen:d}){const f=w.useRef(null),h=w.useRef(null),g=w.useRef(WH()),v=w.useRef(null),p=w.useRef(!1),j=w.useRef(null),[b]=w.useState(()=>new d6),k=b.input,S=b.persona,[N,C]=w.useState(!1),M=w.useRef(null),E=HH(Yd,e.mood),T=g6(Yd?null:e.id,n,e.mood,Zf(a)),R=Yd?E:T;k.motion=R.motion,k.fast=R.fast,k.mood=R.mood;function _(){const O=r.current.getBoundingClientRect(),I=f.current.offsetWidth,$=o.current?o.current.getBoundingClientRect().top-O.top:O.height,Q=Math.max(ko,O.width-I-ko),Y=Math.max(ko,$-I-ko);return{minX:ko,minY:ko,maxX:Q,maxY:Y}}function z(){var Q;const O=(Q=r.current)==null?void 0:Q.getBoundingClientRect(),I=f.current;if(!O||!I)return 0;const $=O.width/2-I.offsetWidth/2;return $>0?Math.max(-1,Math.min(1,($-I.offsetLeft)/$)):0}function P(){var $;if(!f.current||!r.current)return;const O=_(),I=f.current;I.style.left=`${O.minX+g.current.x*(O.maxX-O.minX)}px`,I.style.top=`${O.minY+g.current.y*(O.maxY-O.minY)}px`,($=M.current)==null||$.call(M)}w.useLayoutEffect(()=>{P();const O=new ResizeObserver(P);for(const I of[r.current,o.current,f.current])I&&O.observe(I);return()=>O.disconnect()},[]);const H=a!=null&&a.error?`${a.runId??""}:${a.error}`:null;return w.useEffect(()=>{(H||R.shake)&&b.shake()},[H,R.shake]),w.useEffect(()=>{const O=Q=>{(Q.pointerType==="mouse"||Q.type==="pointerdown")&&(j.current={x:Q.clientX,y:Q.clientY})},I=Q=>{Q.relatedTarget||(j.current=null)},$=Q=>{const Y=Q.target;if(Y.id!=="jarvy-composer")return;const q=Y.getBoundingClientRect();j.current={x:q.left+q.width/2,y:q.top+q.height/2}};return window.addEventListener("pointermove",O),window.addEventListener("pointerdown",O),document.addEventListener("pointerout",I),document.addEventListener("input",$),document.addEventListener("focusin",$),()=>{window.removeEventListener("pointermove",O),window.removeEventListener("pointerdown",O),document.removeEventListener("pointerout",I),document.removeEventListener("input",$),document.removeEventListener("focusin",$)}},[]),f6(S,R,n,c),b.color=(Ca[e.color]??Ca.gray).hex,b.crown=e.agent,w.useEffect(()=>{if(!h.current)return;b.onFrame=()=>{var K;const I=f.current;if(!I)return;const $=I.getBoundingClientRect(),Q=j.current;k.lookX=Q?Math.max(-1,Math.min(1,(Q.x-$.left-$.width/2)/320)):0,k.lookY=Q?Math.max(-1,Math.min(1,(Q.y-$.top-$.height/2)/320)):0;const Y=!!((K=v.current)!=null&&K.moved)&&k.motion==="idle";(k.faceX===void 0||!(Y||k.motion==="sleep"))&&(k.faceX=z());const q=S.playing??"";I.dataset.act!==q&&(q?I.dataset.act=q:delete I.dataset.act)};const O=b.add(h.current,.86);return C(b.start()),()=>{O(),b.stop(),b.onFrame=null}},[]),l.jsxs(l.Fragment,{children:[l.jsxs("button",{ref:f,type:"button",className:"jv-floating-bot","data-live":N||void 0,"data-motion":R.motion,title:e.name,"aria-label":y("avatar.openInfo",{name:e.name}),onPointerDown:O=>{if(O.button!==0)return;const I=O.currentTarget;I.setPointerCapture(O.pointerId),v.current={id:O.pointerId,x:O.clientX,y:O.clientY,left:I.offsetLeft,top:I.offsetTop,moved:!1}},onPointerMove:O=>{const I=v.current;if(!I||I.id!==O.pointerId)return;const $=O.clientX-I.x,Q=O.clientY-I.y;if(!I.moved&&Math.hypot($,Q)<ZH)return;!I.moved&&!Gd()&&S.carry(!0,performance.now()),I.moved=!0;const Y=_(),q=Math.min(Y.maxX,Math.max(Y.minX,I.left+$)),K=Math.min(Y.maxY,Math.max(Y.minY,I.top+Q));g.current={x:Y.maxX>Y.minX?(q-Y.minX)/(Y.maxX-Y.minX):0,y:Y.maxY>Y.minY?(K-Y.minY)/(Y.maxY-Y.minY):0},P()},onPointerUp:O=>{const I=v.current;!I||I.id!==O.pointerId||(v.current=null,p.current=I.moved,I.moved&&(localStorage.setItem(v6,JSON.stringify(g.current)),Gd()||S.carry(!1,performance.now())))},onPointerCancel:()=>{v.current=null,Gd()||S.carry(!1,performance.now())},onClick:()=>{if(p.current){p.current=!1;return}Gd()||S.play("poke",performance.now()),R.canRecap?R.showRecap():d()},style:{"--jv-avatar-size":"100%"},children:[l.jsx("canvas",{ref:h,"aria-hidden":"true"}),!N&&l.jsx(_a,{color:e.color,mood:R.mood,size:88,crown:e.agent,asleep:R.motion==="sleep"}),l.jsx(y6,{motion:R.motion})]}),l.jsx(m6,{view:R.view,name:e.name,cat:f,area:r,avoid:o,layout:M,facing:z,toolbar:Yd?(O,I)=>l.jsx(OH,{controls:E.controls,toolbar:O,onReplay:()=>{I(),E.controls.replay()}}):void 0})]})}function tq({className:e,...n}){return l.jsx("div",{"data-slot":"card",className:Dn("flex flex-col gap-4 rounded-xl border bg-card py-5 text-card-foreground shadow-sm",e),...n})}function nq({className:e,...n}){return l.jsx("div",{"data-slot":"card-header",className:Dn("grid gap-1 px-5",e),...n})}function iq({className:e,...n}){return l.jsx("div",{"data-slot":"card-title",className:Dn("font-semibold leading-none",e),...n})}function aq({className:e,...n}){return l.jsx("div",{"data-slot":"card-content",className:Dn("px-5",e),...n})}function rq({bot:e,connections:n,onSaved:a,onManage:r}){return l.jsxs(tq,{className:"jarvy-model-picker jv-ui",children:[l.jsx(nq,{children:l.jsx(iq,{children:y("botModel.pickFor",{name:e.name})})}),l.jsx(aq,{children:l.jsx(xS,{bot:e,connections:n,onSaved:a,onManage:r})})]})}function lq({chat:e,inChannel:n,bots:a,members:r,meId:o,drafts:c,composeReady:d,botName:f,activeBot:h,status:g,connections:v,activity:p,history:j,divider:b,activeQuestion:k,pane:S,onPane:N,onToggleInfo:C,find:M,onNav:E,onBot:T,hasBotDirects:R,onInvite:_,onQuote:z,onReply:P,onReact:H,onFold:O,onJump:I,onSettled:$,onSend:Q,onPreview:Y,onSaveNote:q,notice:K,createBot:V,creating:X,updateBot:Z,onManageModels:D,error:se,chatArea:ne,transcript:B,composeWrap:F,hidden:ee,onOpenThread:W,onBotCard:de}){var Ke;const{messages:oe,loading:be,hasOlder:we,loadingOlder:ve,top:re,away:Ce,unseen:Ve,toLatest:He}=j,Ze=oe.filter(gt=>gt.senderId===o),Fe=(Ke=Ze[Ze.length-1])==null?void 0:Ke.id;return l.jsxs("main",{className:"ui-chat","aria-label":y("chat.area"),ref:ne,hidden:ee,children:[!n&&l.jsx(vt,{icon:"layout-sidebar-left",className:"ui-mobile-only jv-floating-nav",label:y("common.openNav"),onClick:E}),!n&&R&&l.jsx(vt,{icon:"people",className:"jv-floating-dms",label:y("chat.botDms",{name:f}),"aria-pressed":(S==null?void 0:S.kind)==="botdms",onClick:()=>N((S==null?void 0:S.kind)==="botdms"?null:{kind:"botdms"})}),l.jsx("span",{className:"sr-only",role:"status","aria-label":y("chat.botStatus"),children:n?"":p}),e?l.jsxs(l.Fragment,{children:[n?l.jsx(VP,{chat:e,members:Na(r),bots:a,onNav:E,infoOpen:(S==null?void 0:S.kind)==="info"&&S.page==="main",onInfo:()=>C("main"),membersOpen:(S==null?void 0:S.kind)==="info"&&S.page==="members",onMembers:()=>C("members"),threadsOpen:(S==null?void 0:S.kind)==="threads",onThreads:()=>N((S==null?void 0:S.kind)==="threads"?null:{kind:"threads"}),searchOpen:(S==null?void 0:S.kind)==="search",onSearch:()=>(S==null?void 0:S.kind)==="search"?N(null):M.search(e)}):h&&!ee&&l.jsx(eq,{bot:h,chatId:e.id,status:g,area:ne,avoid:F,lastMine:Fe,onOpen:()=>T(h.id)}),n&&l.jsx(GP,{chat:e,onSave:q}),l.jsxs("div",{className:"jv-transcript",children:[l.jsxs("div",{className:`ui-transcript jarvy-transcript${n?" jv-channel-transcript":""}`,ref:B,"aria-label":y("chat.transcript"),role:"log",children:[!n&&!(h!=null&&h.connectionId)&&h&&l.jsx("div",{className:"jarvy-model-onboarding",children:l.jsx(rq,{bot:h,connections:v,onSaved:Z,onManage:D})}),be?l.jsx("p",{className:"jarvy-empty-text",children:y("chat.loading")}):oe.length===0?n?l.jsx("div",{className:"jarvy-empty-chat",children:l.jsx("p",{children:y("chat.empty")})}):h!=null&&h.connectionId?l.jsx("div",{className:"jarvy-empty-chat",children:l.jsx("h2",{children:y("chat.start",{name:f})})}):null:l.jsxs(l.Fragment,{children:[we&&l.jsx("div",{ref:re,className:"jv-history-more","aria-live":"polite",children:ve?y("chat.loadingOlder"):""}),n?l.jsx(wf,{messages:oe,members:r,bots:a,me:o,divider:b,activeQuestion:k,onSettled:$,onPreview:Y,onReply:P,onOpenThread:W,onQuote:z,onReact:H,onFold:O,onJump:I,onBotCard:de,onError:se}):l.jsx(u6,{messages:oe,members:r,me:o,activeQuestion:k,bot:h,onSettled:$,onPreview:Y,onQuote:z,onReact:H,onFold:O,onJump:I,onBotCard:de,onError:se})]})]}),Ce&&oe.length>0&&l.jsx("div",{className:"jv-to-latest",children:l.jsxs("button",{type:"button",onClick:He,"aria-label":y("chat.toLatest"),children:[Ve>0&&l.jsx("span",{children:y("chat.unseen",{count:Ve})}),l.jsx(Pe,{name:"chevron-down"})]})})]}),l.jsx(Eg,{chatId:e.id,id:"jarvy-composer",drafts:c,formRef:F,scrollRef:B,disabled:!d,placeholder:n?y("chat.toChannel",{name:e.title}):h!=null&&h.connectionId?y("chat.toBot",{name:f}):y("chat.pickModel"),mention:n?{bots:a,inside:Na(r).filter(gt=>gt.id!==o&&e.memberIds.includes(gt.id)),outside:Na(r).filter(gt=>!e.memberIds.includes(gt.id)),onInvite:gt=>_(e.id,gt)}:void 0,onSend:Q,onError:se,onNotice:K})]}):l.jsx("div",{className:"jarvy-empty-chat jarvy-first-chat",children:a.length?l.jsx("p",{children:y("chat.pick")}):l.jsxs("button",{className:"ui-button ui-primary",onClick:V,disabled:X,children:[l.jsx(Pe,{name:"person-add"}),y("sidebar.newBot")]})}),e&&l.jsx(Cg,{container:B,drafts:c,chatId:e.id,source:gt=>oe.find(qt=>qt.id===gt),members:r,onNotice:K})]})}const sq=10,Vj=288,Mr=12,oq=620;function cq(e,n,a){const r=Math.max(Mr,n.height-a-Mr),o=h=>Math.min(Math.max(Mr,h),r);if(n.width>oq)return{left:Math.min(Math.max(Mr,e.right+sq),n.width-Vj-Mr),top:o(e.top-8),width:Vj};const c=e.bottom+6,d=e.top-6-a,f=c+a+Mr<=n.height?c:d>=Mr?d:o(c);return{left:Mr,top:f,width:n.width-Mr*2}}function uq({bot:e,status:n,connections:a,anchor:r,onClose:o,onMessage:c,onInfo:d}){var b;const f=w.useRef(null);w.useEffect(()=>{const k=C=>{var E;const M=C.target;(E=f.current)!=null&&E.contains(M)||M!=null&&M.closest(".jv-avatar-button")||o()},S=C=>{C.key==="Escape"&&o()},N=C=>{var M;(M=f.current)!=null&&M.contains(C.target)||o()};return document.addEventListener("pointerdown",k),document.addEventListener("keydown",S),document.addEventListener("scroll",N,!0),()=>{document.removeEventListener("pointerdown",k),document.removeEventListener("keydown",S),document.removeEventListener("scroll",N,!0)}},[]),w.useEffect(()=>{var k;(k=f.current)==null||k.focus({preventScroll:!0})},[e.id]);const[h,g]=w.useState(0);w.useLayoutEffect(()=>{f.current&&g(f.current.offsetHeight)},[e.id,r]);const v=qS(e,n),p=(b=a.find(k=>k.id===e.connectionId))==null?void 0:b.models.find(k=>k.id===e.modelId),j=cq(r,{width:window.innerWidth,height:window.innerHeight},h);return Ol.createPortal(l.jsxs("div",{ref:f,className:"jv-bot-card",role:"dialog","aria-label":e.name,tabIndex:-1,style:j,children:[l.jsxs("header",{className:"jv-bot-card-head",children:[l.jsx(_a,{color:e.color,mood:e.mood,size:44,crown:e.agent,asleep:(n==null?void 0:n.status)==="stop"}),l.jsxs("div",{children:[l.jsx("h2",{children:e.name}),l.jsx("span",{className:"jv-bot-card-role",children:e.agent?y("botCard.agent"):"Bot"})]})]}),e.description&&l.jsx("p",{className:"jv-bot-card-about",children:e.description}),l.jsxs("dl",{className:"jv-bot-card-facts",children:[l.jsxs("div",{children:[l.jsx("dt",{children:y("botCard.state")}),l.jsx("dd",{"data-tone":v.tone,children:v.label})]}),l.jsxs("div",{children:[l.jsx("dt",{children:y("botCard.worksIn")}),l.jsx("dd",{children:EP(e)})]}),p&&l.jsxs("div",{children:[l.jsx("dt",{children:y("usage.model")}),l.jsx("dd",{title:p.name,children:p.name})]})]}),l.jsxs("div",{className:"jv-bot-card-actions",children:[l.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",onClick:()=>{c(),o()},children:y("botCard.message")}),l.jsx(Ee,{type:"button",variant:"outline",size:"sm",onClick:()=>{d(),o()},children:y("botCard.info")})]})]}),document.body)}class dq{constructor(){qe(this,"listeners",new Set)}emit(n){for(const a of this.listeners)a(n)}on(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}}function Tg(e,n){const a=w.useRef(n);a.current=n,w.useEffect(()=>e.on(r=>a.current(r)),[e])}const cu=(e,n)=>e.some(a=>a.id===n.id)?e.map(a=>a.id===n.id?n:a):e;function Jf(e,n){if(e.some(r=>r.id===n.id))return cu(e,n);if(e[0]&&n.sequence<e[0].sequence)return e;const a=e.findIndex(r=>r.sequence>n.sequence);return a<0?[...e,n]:[...e.slice(0,a),n,...e.slice(a)]}const Mg=(e,n)=>e.sequence>n+1;function x6(e,n,a){var o;const r=((o=n.at(-1))==null?void 0:o.sequence)??a;return[...e.filter(c=>c.sequence<=a),...n,...e.filter(c=>c.sequence>r)]}const fq=e=>Si(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function hq(e,n){const[a,r]=w.useState([]);return w.useEffect(()=>{if(r([]),!e)return;let o=!0;return he.botDirects(e).then(c=>{o&&r(c.chats)}).catch(()=>{}),()=>{o=!1}},[e,n]),a}function mq({bot:e,chats:n,members:a,bots:r,me:o,live:c,onClose:d,onPreview:f,onError:h}){const[g,v]=w.useState(null),[p,j]=w.useState(null),[b,k]=w.useState(0);w.useEffect(()=>{if(!g){j(null);return}let C=!0;return he.messages(g).then(M=>{C&&j(M.messages)}).catch(M=>{C&&h(M)}),()=>{C=!1}},[g,b]),w.useEffect(()=>j(null),[g]),Tg(c,C=>{if(C.kind==="reconnected"){k(E=>E+1);return}if(C.kind==="chat"||C.message.chatId!==g)return;const M=C.message;j(E=>E&&(C.kind==="message"?Jf(E,M):cu(E,M)))});const S=C=>a.find(M=>M.id!==e.id&&C.memberIds.includes(M.id)),N=n.find(C=>C.id===g);return l.jsxs("aside",{className:"ui-pane jv-pane","aria-label":y("chat.botDms",{name:e.name}),children:[l.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[N&&l.jsx(vt,{icon:"chevron-left",label:y("directs.back"),onClick:()=>v(null)}),l.jsx("strong",{children:N?y("directs.between",{name:e.name,other:Ta(S(N))}):y("chat.botDms",{name:e.name})}),l.jsx("span",{className:"jv-spacer"}),l.jsx(vt,{icon:"close",label:y("common.close"),onClick:d})]}),N?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"ui-pane-body jv-pane-body",children:p===null?l.jsx("p",{className:"jv-picker-empty",children:y("threads.loading")}):p.length===0?l.jsx("p",{className:"jv-picker-empty",children:y("chat.empty")}):l.jsx(wf,{messages:p,members:a,bots:r,me:o,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:f})}),l.jsx("p",{className:"jv-readonly",children:y("directs.readOnly")})]}):l.jsx("div",{className:"ui-pane-body jv-pane-body",children:n.length===0?l.jsx("p",{className:"jv-picker-empty",children:y("sidebar.noDms")}):n.map(C=>{const M=S(C);return l.jsxs("button",{type:"button",className:"jv-thread-item",onClick:()=>v(C.id),children:[l.jsxs("span",{className:"jv-thread-item-head",children:[l.jsx(lr,{member:M,bots:r,size:20}),l.jsx("strong",{children:Ta(M)}),l.jsx("span",{className:"jv-muted",children:fq(C.updatedAt)})]}),C.lastMessage&&l.jsx("span",{className:"jv-muted jv-thread-item-meta",children:Os(C.lastMessage)})]},C.id)})})]})}function pq({x:e,y:n,admin:a,onAdmin:r,onRemove:o,onClose:c}){const d=w.useRef(null);w.useEffect(()=>{const h=v=>{var p;(p=d.current)!=null&&p.contains(v.target)||c()},g=v=>{v.key==="Escape"&&c()};return document.addEventListener("pointerdown",h),document.addEventListener("keydown",g),()=>{document.removeEventListener("pointerdown",h),document.removeEventListener("keydown",g)}},[c]);const f={right:Math.max(8,window.innerWidth-e),top:Math.max(8,Math.min(n,window.innerHeight-100))};return l.jsxs("div",{ref:d,className:"ui-popover jv-entry-menu",role:"menu","aria-label":y("members.menu"),style:f,children:[a!==null&&l.jsxs(l.Fragment,{children:[l.jsx("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{r(),c()},children:l.jsx("span",{className:"ui-menu-copy",children:y(a?"members.removeAdmin":"members.makeAdmin")})}),l.jsx("hr",{className:"ui-menu-divider"})]}),l.jsx("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{o(),c()},children:l.jsx("span",{className:"ui-menu-copy",children:y("members.removeFromChannel")})})]})}function gq({channel:e,members:n,bots:a,statuses:r,me:o,onAdd:c,onBot:d,onChanged:f,onError:h}){const[g,v]=w.useState(null),[p,j]=w.useState(null),b=async(M,E)=>{try{f(await he.setAdmin(e.id,M.id,E))}catch(T){h(T)}},k=n.filter(M=>e.memberIds.includes(M.id)),S=k.filter(M=>M.kind!=="bot").sort((M,E)=>+(E.id===o)-+(M.id===o)),N=k.filter(M=>M.kind==="bot"),C=M=>{const E=M.kind==="bot"?a.find(z=>z.id===M.id):void 0,T=r[M.id],R=M.kind==="bot"?qS(E,T):void 0,_=l.jsxs(l.Fragment,{children:[l.jsx(lr,{member:M,bots:a,size:28,working:(T==null?void 0:T.status)==="running"&&T.activity!=="asking"}),l.jsxs("span",{className:"jv-member-name",children:[M.name,M.id===o&&l.jsx("span",{className:"jv-role",children:y("common.you")}),M.id===e.createdBy?l.jsx("span",{className:"jv-role",children:y("members.creator")}):e.adminIds.includes(M.id)&&l.jsx("span",{className:"jv-role",children:y("members.admin")})]}),R&&l.jsx("span",{className:"jv-member-state","data-tone":R.tone,children:R.label})]});return l.jsxs("div",{className:"jv-member-row",children:[E?l.jsx("button",{type:"button",className:"jv-member-main","aria-label":y("members.view",{name:M.name}),onClick:()=>d(M.id),children:_}):l.jsx("div",{className:"jv-member-main",children:_}),M.id!==o&&l.jsx(vt,{icon:"more",label:y("members.more",{name:M.name}),className:"jv-member-remove",onClick:z=>{const P=z.currentTarget.getBoundingClientRect();j({member:M,x:P.right,y:P.bottom+4})}})]},M.id)};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"jv-member-bar",children:[l.jsx("span",{children:y("members.count",{count:k.length})}),l.jsxs("button",{type:"button",className:"ui-button ui-primary jv-member-pane-add",onClick:c,children:[l.jsx(Pe,{name:"person-add"}),y("common.add")]})]}),l.jsx("div",{className:"ui-pane-body jv-pane-body",children:[["people",y("members.people"),S],["bots","Bot",N]].map(([M,E,T])=>T.length>0&&l.jsxs("section",{className:"jv-member-group","aria-label":E,children:[l.jsxs("h3",{children:[E," · ",T.length]}),T.map(C)]},M))}),p&&l.jsx(pq,{x:p.x,y:p.y,onClose:()=>j(null),onRemove:()=>v(p.member),admin:p.member.kind==="bot"&&p.member.id!==e.createdBy?e.adminIds.includes(p.member.id):null,onAdmin:()=>void b(p.member,!e.adminIds.includes(p.member.id))}),g&&l.jsx(t6,{title:y("members.removeTitle",{name:g.name,channel:e.title}),body:y("members.removeBody"),confirm:y("members.removeConfirm"),onClose:()=>v(null),onConfirm:async()=>{try{f(await he.removeMember(e.id,g.id)),v(null)}catch(M){h(M)}}})]})}function Gj({label:e,value:n,empty:a,maxLength:r,required:o=!1,onSave:c}){const d=w.useId(),[f,h]=w.useState(null),[g,v]=w.useState(!1);w.useEffect(()=>h(null),[n]);const p=async()=>{if(!(f===null||g||o&&!f.trim())){if(f.trim()===n){h(null);return}v(!0);try{await c(f.trim()),h(null)}catch{}finally{v(!1)}}};return l.jsxs("div",{className:"jv-info-field",children:[l.jsxs("div",{className:"jv-info-label",children:[l.jsx("label",{htmlFor:d,children:e}),f===null&&l.jsx(vt,{icon:"pencil",label:y("info.edit",{name:e}),className:"jv-info-edit",onClick:()=>h(n)})]}),f===null?l.jsx("p",{className:"jv-info-value","data-empty":!n||void 0,children:n||a}):l.jsxs("div",{className:"jv-inline-edit",children:[l.jsx("input",{id:d,value:f,maxLength:r,autoFocus:!0,placeholder:a,onChange:j=>h(j.target.value),onKeyDown:j=>{j.key==="Enter"&&!j.nativeEvent.isComposing&&(j.preventDefault(),p()),j.key==="Escape"&&(j.stopPropagation(),h(null))}}),l.jsx("button",{type:"button",className:"ui-button",onClick:()=>h(null),children:y("common.cancel")}),l.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:g||o&&!f.trim(),onClick:()=>void p(),children:y("common.save")})]})]})}function vq({channel:e,page:n,sections:a,members:r,bots:o,statuses:c,me:d,onPage:f,onPin:h,onMute:g,onAdd:v,onBot:p,onDelete:j,onChanged:b,onClose:k,onError:S}){const N=w.useId(),C=async E=>{try{b(await he.updateChannel(e.id,E))}catch(T){throw S(T),T}},M=r.filter(E=>e.memberIds.includes(E.id)).length;return l.jsxs("aside",{className:"ui-pane jv-pane","aria-label":y(n==="members"?"info.memberList":"entry.channelInfo"),children:[l.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[n==="members"&&l.jsx(vt,{icon:"chevron-left",label:y("info.back"),className:"jv-pane-back",onClick:()=>f("main")}),l.jsx("strong",{children:y(n==="members"?"channel.members":"entry.channelInfo")}),l.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),l.jsx("span",{className:"jv-spacer"}),l.jsx(vt,{icon:"close",label:y("common.close"),onClick:k})]}),n==="members"?l.jsx(gq,{channel:e,members:r,bots:o,statuses:c,me:d,onAdd:v,onBot:p,onChanged:b,onError:S}):l.jsxs("div",{className:"ui-pane-body jv-pane-body jv-info",children:[l.jsxs("div",{className:"jv-info-actions",children:[l.jsxs("button",{type:"button","aria-pressed":e.pinned,onClick:h,children:[l.jsx(Pe,{name:"pin"}),y("entry.pin")]}),l.jsxs("button",{type:"button","aria-pressed":e.muted,onClick:g,children:[l.jsx(Pe,{name:e.muted?"bell-slash":"bell"}),y("entry.mute")]}),l.jsxs("button",{type:"button",onClick:v,children:[l.jsx(Pe,{name:"person-add"}),y("info.addMembers")]})]}),l.jsx(Gj,{label:y("info.name"),value:e.title,empty:y("info.newChannel"),maxLength:80,required:!0,onSave:E=>C({name:E})}),l.jsx(Gj,{label:y("info.topic"),value:e.topic,empty:y("info.noTopic"),maxLength:200,onSave:E=>C({topic:E})}),l.jsxs("div",{className:"jv-info-field",children:[l.jsx("div",{className:"jv-info-label",children:l.jsx("label",{htmlFor:N,children:y("info.section")})}),l.jsx(MS,{id:N,value:e.sectionId,sections:a,onChange:E=>void C({sectionId:E}).catch(()=>{})})]}),l.jsxs("nav",{className:"jv-info-menu","aria-label":y("info.menu"),children:[l.jsxs("button",{type:"button",className:"ui-menu-item",onClick:()=>f("members"),children:[l.jsx(Pe,{name:"people"}),l.jsx("span",{className:"ui-menu-copy",children:y("channel.members")}),l.jsx("span",{className:"jv-muted",children:M}),l.jsx(Pe,{name:"chevron-right"})]}),l.jsxs("button",{type:"button",className:"ui-menu-item jv-menu-danger",onClick:j,children:[l.jsx(Pe,{name:"trash"}),l.jsx("span",{className:"ui-menu-copy",children:y("entry.deleteChannel")})]})]})]})]})}function yq({chat:e,chats:n,members:a,focusKey:r,onOpenMessage:o,onClose:c,onError:d}){const[f,h]=w.useState(""),g=w.useRef(null);w.useEffect(()=>{var b,k;(b=g.current)==null||b.focus(),(k=g.current)==null||k.select()},[r,e.id]);const{result:v,loading:p}=n6(f,e.id,d),j=e.type==="channel"?`#${e.title}`:y(e.type==="thread"?"search.inThread":"search.inDm");return l.jsxs("aside",{className:"ui-pane jv-pane jv-search-pane","aria-label":y("search.paneLabel"),children:[l.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[l.jsx("strong",{children:y("search.title")}),l.jsx("span",{className:"jv-muted jv-pane-sub",children:j}),l.jsx("span",{className:"jv-spacer"}),l.jsx(vt,{icon:"close",label:y("search.close"),onClick:c})]}),l.jsx("div",{className:"jv-pane-search",children:l.jsx("input",{ref:g,type:"search",value:f,placeholder:y(e.type==="channel"?"search.channelPlaceholder":"search.placeholder"),"aria-label":y("search.placeholder"),onChange:b=>h(b.target.value),onKeyDown:b=>{b.key==="Escape"&&(b.preventDefault(),f?h(""):c())}})}),l.jsx("div",{className:"ui-pane-body jv-pane-body jv-results","aria-live":"polite",children:f.trim()?v?v.messages.length?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"jv-result-count",children:y(v.messages.length>=60?"search.countLatest":"search.count",{count:v.messages.length})}),v.messages.map(({message:b,chat:k})=>l.jsx(r6,{message:b,chat:k,chats:n,members:a,query:f,showPlace:k.id!==e.id,onOpen:o},b.id))]}):l.jsx("p",{className:"jv-result-empty",children:y("search.noMessages")}):p&&l.jsx("p",{className:"jv-result-empty",children:y("search.searching")}):l.jsx("p",{className:"jv-result-empty",children:y("search.prompt")})})]})}const xq=e=>Si(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function bq({chat:e,channelName:n,expanded:a=!1,onTitle:r,onStatus:o,onSummary:c,onConclude:d}){var E;const[f,h]=w.useState(null),[g,v]=w.useState(null),[p,j]=w.useState(!1),[b,k]=w.useState(a);w.useEffect(()=>{h(null),v(null),k(a)},[e.id,a]);const S=async(T,R)=>{j(!0);try{await T(),R()}catch{}finally{j(!1)}},N=e.status==="done",C=e.note,M=((E=C==null?void 0:C.text.split(`
|
|
814
|
+
`).find(T=>T.trim()&&!T.startsWith("#")))==null?void 0:E.replace(/[*`|>-]/g,"").trim())??"";return l.jsxs("div",{className:"jv-thread-meta","data-open":b||void 0,children:[l.jsxs("div",{className:"jv-thread-title-row",children:[f===null?l.jsxs(l.Fragment,{children:[l.jsx("h2",{className:"jv-thread-title",title:e.title,children:e.title}),l.jsx(vt,{icon:"pencil",label:y("thread.rename"),onClick:()=>h(e.title)})]}):l.jsxs("form",{className:"jv-inline-edit",onSubmit:T=>{T.preventDefault(),f.trim()&&S(()=>r(f.trim()),()=>h(null))},children:[l.jsx("input",{value:f,autoFocus:!0,maxLength:80,"aria-label":y("thread.title"),onChange:T=>h(T.target.value),onKeyDown:T=>{T.key==="Escape"&&h(null)}}),l.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:p||!f.trim(),children:y("common.save")})]}),l.jsx("button",{type:"button",className:"jv-thread-status","data-done":N||void 0,disabled:p,title:y("thread.toggleStatus"),onClick:()=>void S(()=>o(N?"open":"done"),()=>{}),children:N?l.jsxs(l.Fragment,{children:[l.jsx(Pe,{name:"check"}),y("channel.threadDone")]}):y("threads.open")})]}),g!==null?l.jsxs("div",{className:"jv-summary","data-editing":!0,children:[l.jsx("textarea",{className:"jv-notice-input",value:g,autoFocus:!0,"aria-label":y("thread.summary"),onChange:T=>v(T.target.value)}),l.jsxs("div",{className:"jv-notice-actions",children:[l.jsx("button",{type:"button",className:"ui-button",onClick:()=>v(null),children:y("common.cancel")}),l.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:p||!g.trim(),onClick:()=>void S(()=>c(g.trim()),()=>v(null)),children:y("common.save")})]})]}):C?l.jsxs("div",{className:"jv-summary",children:[l.jsxs("div",{className:"jv-summary-head",children:[l.jsxs("button",{type:"button",className:"jv-summary-toggle","aria-expanded":b,onClick:()=>k(!b),children:[l.jsx("strong",{children:y("thread.summary")}),!b&&l.jsx("span",{className:"jv-summary-first",children:M}),l.jsx(Pe,{name:b?"chevron-down":"chevron-right"})]}),b&&l.jsxs("span",{className:"jv-muted jv-summary-meta",children:[C.updatedBy.name," · ",xq(C.updatedAt)," · ",y("notice.version",{version:C.version})]}),l.jsx(vt,{icon:"pencil",label:y("thread.editSummary"),onClick:()=>v(C.text)})]}),b&&l.jsx("div",{className:"jv-summary-body ui-bubble jv-flat",children:l.jsx(qo,{text:C.text})}),b&&!N&&l.jsxs("button",{type:"button",className:"ui-button jv-conclude",disabled:p,onClick:()=>void S(d,()=>{}),children:[l.jsx(Pe,{name:"check"}),y("thread.conclude",{channel:n})]})]}):l.jsxs("button",{type:"button",className:"jv-summary-empty",onClick:()=>v(""),children:[l.jsx(Pe,{name:"add"}),y("thread.addSummary")]})]})}const jq=20,Yj=500;class b6{constructor(){qe(this,"kept",new Map)}take(n){const a=this.kept.get(n);return this.kept.delete(n),a}keep(n,a){if(this.kept.delete(n),!(a.messages.length>Yj)){this.kept.set(n,a);for(const r of this.kept.keys()){if(this.kept.size<=jq)break;this.kept.delete(r)}}}removed(n){var a;for(const[r,o]of this.kept)(r===n||((a=o.chat)==null?void 0:a.parentId)===n)&&this.kept.delete(r)}clear(){this.kept.clear()}heard(n){var c;if(n.kind==="reconnected")return;if(n.kind==="chat"){const d=this.kept.get(n.chat.id);d!=null&&d.chat&&(d.chat=n.chat);return}const a=n.message;for(const d of this.kept.values())((c=d.root)==null?void 0:c.id)===a.id&&(d.root=a);const r=this.kept.get(a.chatId);if(!r)return;if(n.kind==="updated"||r.messages.some(d=>d.id===a.id)){r.messages=cu(r.messages,a);return}const o=r.messages.at(-1);if(o&&Mg(a,o.sequence)||r.messages.length>=Yj){this.kept.delete(a.chatId);return}r.messages=Jf(r.messages,a)}}function j6(e,n){if(e.scrollHeight-e.scrollTop-e.clientHeight<n)return{bottom:!0};const a=e.getBoundingClientRect();let r;for(const o of e.querySelectorAll("[data-message]")){const c=o.getBoundingClientRect();if(c.bottom<=a.top)continue;const d={bottom:!1,id:o.dataset.message,offset:c.top-a.top};if(c.top>=a.top&&c.top<a.bottom)return d;if(r??(r=d),c.top>=a.bottom)break}return r??{bottom:!0}}function Sf(e,n){if(n.bottom)return!1;const a=e.querySelector(`[data-message="${n.id}"]`);return a?(e.scrollTo({top:e.scrollTop+a.getBoundingClientRect().top-e.getBoundingClientRect().top-n.offset,behavior:"instant"}),!0):!1}class w6{constructor(){qe(this,"stop")}get on(){return this.stop!==void 0}start(n,a){this.release();const r=new ResizeObserver(()=>Sf(n,a));for(const d of n.children)r.observe(d);const o=["wheel","touchstart","pointerdown","keydown"],c=()=>this.release();for(const d of o)n.addEventListener(d,c,{passive:!0});this.stop=()=>{r.disconnect();for(const d of o)n.removeEventListener(d,c)}}release(){var n;(n=this.stop)==null||n.call(this),this.stop=void 0}}const c0=50;function Kj({threadId:e,mode:n,showSummary:a=!1,focus:r,onSearch:o,channel:c,drafts:d,members:f,bots:h,me:g,live:v,memory:p,onClose:j,onToggleMode:b,onNav:k,onChanged:S,onInvite:N,onPreview:C,onError:M,onNotice:E,onOpenMessage:T,onBotCard:R}){var Ln;const[_,z]=w.useState(null),[P,H]=w.useState(null),[O,I]=w.useState([]),[$,Q]=w.useState(null),[Y,q]=w.useState(!1),[K,V]=w.useState(!1),X=w.useRef(O),Z=w.useRef(Y),D=w.useRef(null),se=w.useRef(null),ne=w.useRef(!1);X.current=O,Z.current=Y;const B=w.useRef(null),F=w.useRef(null),ee=w.useRef(null),W=w.useRef(!1),de=w.useRef(!0),[oe,be]=w.useState(!1),we=w.useRef(0),ve=w.useRef(0),re=w.useRef(0),Ce=w.useRef({bottom:!0}),Ve=w.useRef(null),He=w.useRef(_),Ze=w.useRef(P),[Fe]=w.useState(()=>new w6),Ke=w.useRef(!1);He.current=_,Ze.current=P,w.useEffect(()=>{z(null),H(null),I([]),q(!1),Q(null),W.current=!1,de.current=!0,be(!1),we.current=0,ve.current=0,re.current=0},[e]);const gt=async me=>{const Ne=await he.message(me).catch(()=>null);if(!Ne||Ne.chatId!==e)return(Ne==null?void 0:Ne.chatId)??null;const _e=Math.max(0,Ne.sequence-1-c0/2);return{...await he.messages(e,_e),hasOlder:_e>0}},qt=async()=>{const me=X.current[0];if((me==null?void 0:me.chatId)===e)return{...await he.messages(e,me.sequence-1),after:me.sequence-1};const Ne=r&&ee.current!==e?await gt(r.id):null;return Ne&&typeof Ne=="object"?Ne:await he.latestMessages(e,c0)},Zt=me=>{const Ne=me.after;I(_e=>Ne===void 0?me.messages:x6(_e.filter(Be=>Be.chatId===e),me.messages,Ne)),me.hasOlder!==void 0&&q(me.hasOlder)},en=me=>{const Ne=X.current,_e=Ne.at(-1),Be=Math.max((_e==null?void 0:_e.chatId)===e?_e.sequence:0,re.current);if(Mg(me,Be)&&!Ne.some(Oe=>Oe.id===me.id)){qt().then(Zt).catch(M);return}re.current=Math.max(re.current,me.sequence),I(Oe=>Jf(Oe,me))};Tg(v,me=>{if(me.kind==="reconnected"){if(!W.current)return;Ke.current=!0,Promise.all([he.chat(e),qt()]).then(async([_e,Be])=>{z(_e),Zt(Be),Ke.current=!1,_e.rootMessageId&&H(await he.message(_e.rootMessageId))}).catch(M);return}if(me.kind==="chat"){const _e=me.chat;_e.id===e&&z(Be=>Be&&{..._e,readSequence:Math.max(Be.readSequence,_e.readSequence)});return}const Ne=me.message;Ne.id===(P==null?void 0:P.id)?H(Ne):Ne.chatId===e&&(me.kind==="message"?en(Ne):I(_e=>cu(_e,Ne)))});const kn=async()=>{var _e;const me=X.current[0],Ne=B.current;if(!(!me||!Z.current||ne.current)){ne.current=!0,V(!0);try{const Be=await he.olderMessages(e,me.sequence,c0);if(((_e=X.current[0])==null?void 0:_e.id)!==me.id)return;se.current=Ne?Ne.scrollHeight-Ne.scrollTop:null,I(Oe=>{var dt;return((dt=Oe[0])==null?void 0:dt.id)===me.id?[...Be.messages,...Oe]:Oe}),q(Be.hasOlder)}catch(Be){M(Be)}finally{ne.current=!1,V(!1)}}};w.useEffect(()=>{let me=!0;Ce.current={bottom:!0},Ve.current=null;const Ne=()=>{me=!1,Fe.release();const Be=He.current;W.current&&!Ke.current&&(Be==null?void 0:Be.id)===e&&p.keep(e,{messages:X.current.filter(Oe=>Oe.chatId===e),hasOlder:Z.current,place:Ce.current,seen:we.current,chat:Be,root:Ze.current})},_e=r?void 0:p.take(e);return _e!=null&&_e.chat?(Ve.current=_e.place,we.current=_e.seen,z(_e.chat),H(_e.root??null),I(_e.messages),q(_e.hasOlder),ee.current!==e&&(ee.current=e,Q(_e.chat.readSequence)),Ne):(Promise.all([he.chat(e),qt()]).then(async([Be,Oe])=>{if(me&&(z(Be),Zt(Oe),ee.current!==e&&(ee.current=e,Q(Be.readSequence)),Be.rootMessageId)){const dt=await he.message(Be.rootMessageId);me&&H(dt)}}).catch(Be=>{me&&M(Be)}),Ne)},[e]),w.useLayoutEffect(()=>{const me=B.current;if(!me||!_)return;if(se.current!==null){me.scrollTo({top:me.scrollHeight-se.current,behavior:"instant"}),se.current=null;return}const Ne=()=>me.scrollTo({top:me.scrollHeight,behavior:"instant"}),_e=O.at(-1),Be=(_e==null?void 0:_e.senderId)===g&&_e.sequence>ve.current;if(ve.current=Math.max(ve.current,(_e==null?void 0:_e.sequence)??0),W.current)(de.current||Be)&&(Fe.release(),me.scrollTo({top:me.scrollHeight,behavior:"smooth"}));else{if(!O.length&&!P)return;W.current=!0;const Oe=r?me.querySelector(`[data-message="${r.id}"]`):null;if(Oe){if(de.current=!1,Oe.scrollIntoView({block:"center"}),r!=null&&r.passage&&$S(Oe,r.passage))return;Oe.classList.add("jv-jump"),setTimeout(()=>Oe.classList.remove("jv-jump"),1600);return}const dt=Ve.current;if(Ve.current=null,dt&&Sf(me,dt)){de.current=!1,Ce.current=dt,Fe.start(me,dt),be(!0);return}Ne(),requestAnimationFrame(Ne)}(de.current||Be)&&(we.current=(_e==null?void 0:_e.sequence)??0)},[O,P,_]),w.useLayoutEffect(()=>{const me=B.current,Ne=Ce.current;me&&W.current&&Sf(me,Ne)&&Fe.start(me,Ne)},[n]),w.useEffect(()=>{W.current&&r&&Me(r.id,r.passage)},[r]),w.useEffect(()=>{const me=B.current,Ne=D.current;if(!me||!Ne||!Y||!W.current)return;const _e=new IntersectionObserver(Be=>{var Oe;(Oe=Be[0])!=null&&Oe.isIntersecting&&W.current&&kn()},{root:me,rootMargin:"400px 0px 0px 0px"});return _e.observe(Ne),()=>_e.disconnect()},[Y,O,e,_]),w.useEffect(()=>{const me=B.current,Ne=F.current;if(!me||!Ne)return;let _e=0;const Be=()=>{cancelAnimationFrame(_e),_e=requestAnimationFrame(()=>{W.current&&me.clientHeight&&!Fe.on&&(Ce.current=j6(me,120))})},Oe=new ResizeObserver(()=>{if(Be(),!!W.current){if(me.scrollHeight-me.clientHeight<8){dt();return}de.current&&(me.scrollHeight-me.scrollTop-me.clientHeight<8||me.scrollTo({top:me.scrollHeight,behavior:"instant"}))}});Oe.observe(Ne),Oe.observe(me);const dt=()=>{var ti;Fe.on||(de.current=me.scrollHeight-me.scrollTop-me.clientHeight<120,de.current&&(we.current=Math.max(we.current,((ti=X.current.at(-1))==null?void 0:ti.sequence)??0)),be(!de.current),Be())};return dt(),me.addEventListener("scroll",dt,{passive:!0}),()=>{Oe.disconnect(),me.removeEventListener("scroll",dt),cancelAnimationFrame(_e)}},[B.current,e,_]),w.useEffect(()=>{const me=O.at(-1);if(!_||!me||me.chatId!==_.id)return;const Ne=()=>{if(document.visibilityState!=="visible"||_.readSequence>=me.sequence)return;const _e={..._,readSequence:me.sequence,unread:0,mentions:0,alerts:0,atMe:!1,hint:null};z(_e),he.markRead(_.id,me.sequence).then(()=>S(_e)).catch(M)};return Ne(),document.addEventListener("visibilitychange",Ne),()=>document.removeEventListener("visibilitychange",Ne)},[O,_]);const vn=async me=>{try{const Ne=await me();z(Ne),S(Ne)}catch(Ne){throw M(Ne),Ne}},rn=async(me,Ne,_e)=>{try{const Be=await he.react(me.id,Ne,_e),Oe=dt=>dt.id===Be.id?{...dt,reactions:Be.reactions}:dt;I(dt=>dt.map(Oe)),H(dt=>dt&&Oe(dt))}catch(Be){M(Be)}},ge=async(me,Ne)=>{try{const _e=await he.fold(me.id,Ne),Be=Oe=>Oe.id===_e.id?{...Oe,folded:_e.folded}:Oe;I(Oe=>Oe.map(Be)),H(Oe=>Oe&&Be(Oe))}catch(_e){M(_e)}},Me=(me,Ne)=>{Fe.release();const _e=()=>{var Oe;return me?(Oe=B.current)==null?void 0:Oe.querySelector(`[data-message="${me}"]`):null},Be=_e();if(Be){jf(Be,Ne);return}if(!me){E(y("app.sourceGone"));return}gt(me).then(Oe=>{if(typeof Oe=="string"&&T){T(Oe,me,Ne);return}if(!Oe||typeof Oe=="string"){E(y("thread.sourceElsewhere"));return}Zt(Oe),requestAnimationFrame(()=>{const dt=_e();dt&&jf(dt,Ne)})})},Xe={onQuote:me=>Ng(d,me,f),onReact:rn,onFold:ge,onJump:Me,onError:M,...R?{onBotCard:R}:{}},Je=async(me,Ne,_e,Be,Oe=[],dt=!1)=>{const ti=await he.send(e,me,Ne,_e,dt,Be,Oe),_n=c?[...new Set(kg(me,Na(f)).filter(yn=>!c.memberIds.includes(yn.member.id)).map(yn=>yn.member.name))]:[];_n.length&&E(y("app.notInChannel",{names:_n.join(y("common.listSeparator")),count:_n.length})),en(ti)},rt=(c==null?void 0:c.title)??y("search.channel"),Jt=f.find(me=>me.id===(P==null?void 0:P.senderId)),An=oe?O.filter(me=>me.sequence>we.current&&me.senderId!==g).length:0,dn=new Set([...P?[P.senderId,...P.mentions]:[],...O.flatMap(me=>[me.senderId,...me.mentions])]);return dn.delete(g),l.jsxs("section",{role:n==="pane"?"complementary":n==="full"?"main":void 0,className:n==="pane"?"ui-pane jv-pane":n==="embed"?"ui-chat jv-thread-full jv-thread-embed":"ui-chat jv-thread-full","aria-label":y("thread.label"),onKeyDown:me=>{_&&o&&(me.ctrlKey||me.metaKey)&&me.key.toLowerCase()==="f"&&(me.preventDefault(),o(_))},children:[l.jsxs("header",{className:n==="pane"?"ui-pane-header jv-pane-header":"ui-chat-header jv-pane-header",children:[n==="full"&&l.jsx(vt,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:y("common.openNav"),onClick:k}),n==="embed"&&l.jsx(vt,{icon:"chevron-left",className:"ui-mobile-only",label:y("thread.backToList"),onClick:j}),n==="full"?l.jsxs("button",{type:"button",className:"jv-crumb",onClick:j,children:[l.jsx(Pe,{name:"chevron-left"}),l.jsx("span",{className:"jv-hash",children:"#"}),rt]}):n==="embed"?l.jsxs("button",{type:"button",className:"jv-crumb",title:y("thread.inChannel"),onClick:b,children:[l.jsx("span",{className:"jv-hash",children:"#"}),rt]}):l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:y("thread.label")}),l.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",rt]})]}),l.jsx("span",{className:"jv-spacer"}),_&&o&&l.jsx(vt,{icon:"search",label:y("thread.search"),onClick:()=>o(_)}),_&&l.jsxs("button",{type:"button",className:"ui-button jv-follow","data-on":_.following||void 0,title:y(_.following?"thread.followingHint":"thread.notFollowingHint"),onClick:()=>void vn(()=>he.follow(e,!_.following)).catch(()=>{}),children:[l.jsx(Pe,{name:"bell"}),y(_.following?"threads.following":"thread.follow")]}),n!=="embed"&&l.jsx(vt,{icon:n==="pane"?"arrows-expand":"arrows-contract",className:"jv-desktop-only",label:y(n==="pane"?"thread.expand":"thread.collapse"),onClick:b}),n==="pane"&&l.jsx(vt,{icon:"close",label:y("thread.close"),onClick:j})]}),_&&l.jsx("div",{className:n==="pane"?"jv-thread-pin":"jv-thread-pin jv-thread-pin-wide",children:l.jsx(bq,{chat:_,channelName:rt,expanded:a,onTitle:me=>vn(()=>he.updateThread(e,{title:me})),onStatus:me=>vn(()=>he.updateThread(e,{status:me})),onSummary:me=>vn(()=>he.setNote(e,me)),onConclude:async()=>{var me;try{await Je(`${y("thread.conclusion")}
|
|
815
|
+
|
|
816
|
+
${((me=_.note)==null?void 0:me.text)??""}`,[],Array.from(crypto.getRandomValues(new Uint8Array(16)),Ne=>Ne.toString(16).padStart(2,"0")).join(""),void 0,[],!0),await vn(()=>he.updateThread(e,{status:"done"})),E(y("thread.concluded",{channel:rt}))}catch(Ne){throw M(Ne),Ne}}})}),l.jsxs("div",{className:"jv-transcript",children:[l.jsx("div",{ref:B,className:n==="pane"?"ui-pane-body jv-pane-body":"ui-transcript jv-thread-wide",children:l.jsxs("div",{ref:F,children:[P&&l.jsx(wf,{messages:[{...P,thread:null}],members:f,bots:h,me:g,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:C,onReact:rn,onFold:ge,onJump:Me,onError:M}),l.jsx("div",{className:"jv-divider","data-tone":"count",role:"separator",children:l.jsx("span",{children:O.length?y("channel.replies",{count:((Ln=P==null?void 0:P.thread)==null?void 0:Ln.replies)??O.length}):y("thread.noReplies")})}),Y&&l.jsx("div",{ref:D,className:"jv-history-more","aria-live":"polite",children:K?y("chat.loadingOlder"):""}),l.jsx(wf,{messages:O,members:f,bots:h,me:g,divider:$??Number.MAX_SAFE_INTEGER,before:P==null?void 0:P.createdAt,onSettled:me=>I(Ne=>Ne.map(_e=>_e.id===me.id?me:_e)),onPreview:C,...Xe})]})}),oe&&O.length>0&&l.jsx("div",{className:"jv-to-latest",children:l.jsxs("button",{type:"button","aria-label":y("thread.toLatest"),onClick:()=>{var me;Fe.release(),(me=B.current)==null||me.scrollTo({top:B.current.scrollHeight,behavior:"smooth"})},children:[An>0&&l.jsx("span",{children:y("chat.unseen",{count:An})}),l.jsx(Pe,{name:"chevron-down"})]})})]}),l.jsx(Eg,{chatId:e,id:"jarvy-thread-composer",drafts:d,placeholder:y("thread.reply"),scrollRef:B,disabled:!_,initialText:O.length===0&&P&&P.senderId!==g&&Jt&&!Jt.deleted?`@${Jt.name} `:void 0,mention:{bots:h,inside:Na(f).filter(me=>me.id!==g&&!!(c!=null&&c.memberIds.includes(me.id))),outside:Na(f).filter(me=>!(c!=null&&c.memberIds.includes(me.id))),onInvite:N,participants:dn},onSend:Je,onError:M,onNotice:E}),l.jsx(Cg,{container:B,drafts:d,chatId:e,members:f,onNotice:E,source:me=>me===(P==null?void 0:P.id)?P:O.find(Ne=>Ne.id===me)})]})}function Xj(e,n){const a=e.lastReplyAt??e.createdAt;return n==="created"?[0,-e.createdAt,e.id]:n==="status"?[e.status==="done"?1:0,-a,e.id]:[0,-a,e.id]}function wq(e,n){return e[0]-n[0]||e[1]-n[1]||(e[2]<n[2]?-1:e[2]>n[2]?1:0)}const Cf=e=>(n,a)=>wq(Xj(n,e),Xj(a,e)),u0={updated:"threadSort.updated",created:"threadSort.created",status:"threadSort.status"},kq=(e,n)=>[...e].sort(Cf(n));function k6(e){const n=`jarvy-thread-sort-${e}`,[a,r]=w.useState(()=>{const o=localStorage.getItem(n);return o==="created"||o==="status"?o:"updated"});return[a,o=>{r(o),localStorage.setItem(n,o)}]}function S6({value:e,onChange:n}){return l.jsxs(Hr,{value:e,onValueChange:a=>n(a),children:[l.jsxs(Fr,{className:"jv-thread-sort","aria-label":y("threadSort.current",{order:y(u0[e])}),title:y("threadSort.title"),children:[l.jsx(v9,{}),l.jsx(qr,{})]}),l.jsx(Ur,{className:"jv-select-menu",position:"popper",sideOffset:4,align:"end",children:Object.keys(u0).map(a=>l.jsx(Oi,{value:a,children:y(u0[a])},a))})]})}const Qj={epoch:0,unlisted:0,counts:{}},Sq=(e,n,a)=>({epoch:e.epoch,unlisted:e.unlisted+(a?1:0),counts:{...e.counts,[n]:(e.counts[n]??0)+1}}),Cq=e=>({...e,epoch:e.epoch+1}),Nq=(e,n)=>`${e.epoch}:${n?e.counts[n]??0:0}`,Eq=e=>`${e.epoch}:${e.unlisted}`,Tq=e=>Si(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function Mq({channel:e,members:n,bots:a,changes:r,onOpen:o,onClose:c,onError:d}){const[f,h]=w.useState(null),[g,v]=w.useState("open"),[p,j]=k6("channel");w.useEffect(()=>{let S=!0;return he.channelThreads(e.id).then(N=>{S&&h(N.threads)}).catch(N=>{S&&d(N)}),()=>{S=!1}},[e.id,Nq(r,e.id)]);const b=kq((f??[]).filter(S=>g==="all"||S.status===g),p),k=S=>(f??[]).filter(N=>N.status===S).length;return l.jsxs("aside",{className:"ui-pane jv-pane","aria-label":y("threads.list"),children:[l.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[l.jsx("strong",{children:y("channel.threads")}),l.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),l.jsx("span",{className:"jv-spacer"}),l.jsx(S6,{value:p,onChange:j}),l.jsx(vt,{icon:"close",label:y("threads.closeList"),onClick:c})]}),l.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":y("threads.byStatus"),children:[["open",y("threads.openCount",{count:k("open")})],["done",y("threads.doneCount",{count:k("done")})],["all",y("threads.all")]].map(([S,N])=>l.jsx("button",{type:"button",role:"tab","aria-selected":g===S,onClick:()=>v(S),children:N},S))}),l.jsx("div",{className:"ui-pane-body jv-pane-body",children:f===null?l.jsx("p",{className:"jv-picker-empty",children:y("threads.loading")}):b.length===0?l.jsx("p",{className:"jv-picker-empty",children:y("threads.none")}):b.map(S=>{const N=n.find(C=>{var M;return C.id===((M=S.root)==null?void 0:M.senderId)});return l.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":S.unread>0||void 0,onClick:()=>o(S.id),children:[l.jsxs("span",{className:"jv-thread-item-head",children:[l.jsx("strong",{children:S.title}),S.alerts>0?l.jsx("span",{className:"jv-badge",children:S.alerts}):S.unread>0&&l.jsx("span",{className:"jv-count",children:S.unread}),l.jsx("span",{className:"jv-thread-status","data-done":S.status==="done"||void 0,children:y(S.status==="done"?"channel.threadDone":"threads.open")})]}),S.root&&l.jsxs("span",{className:"jv-thread-item-root",children:[l.jsx(lr,{member:N,bots:a,size:16}),l.jsx("span",{children:Os(S.root)})]}),l.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:[y("channel.replies",{count:S.replies}),S.lastReplyAt?` · ${Tq(S.lastReplyAt)}`:"",S.following?` · ${y("threads.following")}`:""]})]},S.id)})})]})}class Aq{constructor(){qe(this,"listeners",new Set)}emit(n){for(const a of this.listeners)a(n)}on(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}}const d0=(e,n)=>n==="all"||(n==="unread"?e.unread>0:e.status===n),Kd=(e,n)=>[...new Map(e.map(a=>[a.id,a])).values()].sort(Cf(n));function _q(e,n,a){const[r,o]=w.useState({items:[],next:null,ready:!1}),[c,d]=w.useState(!1),[f,h]=w.useState(!1),g=w.useRef({filter:n,sort:a,generation:0}),v=w.useRef(r),p=w.useRef(new Map);v.current=r;const j=E=>{v.current=E,o(E)};async function b(E){const T=g.current.generation;d(!0),h(!1);try{const R=await he.followedThreads({filter:n,sort:a,cursor:E});if(T!==g.current.generation)return;const _=v.current,z=R.next?R.threads.at(-1):void 0,P=[...p.current.values()].filter(H=>d0(H,n)&&(!z||Cf(a)(H,z)<=0));j({items:Kd([...E?_.items:[],...R.threads,...P],a),next:R.next,ready:!0})}catch{T===g.current.generation&&h(!0)}finally{T===g.current.generation&&d(!1)}}w.useEffect(()=>{g.current={filter:n,sort:a,generation:g.current.generation+1},j({items:[],next:null,ready:!1}),b()},[n,a]);const k=w.useRef(new Map);function S(E){if(k.current.has(E)){k.current.set(E,!0);return}k.current.set(E,!1);const T=g.current.generation;he.followedThread(E).then(R=>N(R,T),R=>{R instanceof Wa&&R.status===404&&T===g.current.generation&&j({...v.current,items:v.current.items.filter(_=>_.id!==E)})}).finally(()=>{const R=k.current.get(E);k.current.delete(E),R&&S(E)})}function N(E,T){if(T!==g.current.generation)return;C(E);const R=v.current,_=R.items.some(H=>H.id===E.id),z=R.items.at(-1),P=E.following&&d0(E,g.current.filter)&&(R.next===null||!z||Cf(g.current.sort)(E,z)<0);(_||R.ready&&P)&&j({...R,items:Kd([...R.items,E],g.current.sort)})}w.useEffect(()=>e.on(E=>{if(E.kind==="changed")S(E.id);else if(E.kind==="reconnected")M();else{const T=E.chat,R=v.current,_=R.items.find(P=>P.id===T.id);if(!_){T.following&&S(T.id);return}const z={..._,title:T.title,status:T.status??_.status,unread:T.unread,mentions:T.mentions,alerts:T.alerts,following:T.following};C(z),j({...R,items:Kd([...R.items,z],g.current.sort)})}}),[e]);function C(E){E.following?p.current.delete(E.id):v.current.items.some(T=>T.id===E.id)&&p.current.set(E.id,E)}async function M(){const E=g.current.generation,T=await he.followedThreads({filter:g.current.filter,sort:g.current.sort}).catch(()=>null);if(!T||E!==g.current.generation)return;const R=v.current,_=R.items.length>T.threads.length;j({items:Kd([...R.items,...T.threads],g.current.sort),next:_?R.next:T.next,ready:!0})}return{items:r.items.filter(E=>d0(E,n)),find:E=>r.items.find(T=>T.id===E),ready:r.ready,more:r.next!==null,loading:c,failed:f,loadMore:()=>{r.next&&!c&&b(r.next)},retry:()=>void b(r.next??void 0)}}const Rq=e=>Si(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}),zq={all:"threads.none",unread:"threads.noneUnread",open:"threads.noneOpen",done:"threads.noneDone"};function Oq({events:e,summary:n,chats:a,members:r,bots:o,onNav:c,renderThread:d}){const[f,h]=w.useState(null),[g,v]=w.useState("all"),[p,j]=k6("followed"),b=_q(e,g,p),k=f?b.find(f.id)??f:void 0,S=w.useRef(null),N=w.useRef(null);w.useEffect(()=>{if(!S.current||!N.current||!b.more||b.loading||b.failed)return;const M=new IntersectionObserver(E=>{var T;(T=E[0])!=null&&T.isIntersecting&&b.loadMore()},{root:S.current,rootMargin:"0px 0px 400px 0px"});return M.observe(N.current),()=>M.disconnect()},[b.more,b.loading,b.failed,b.items]);const C=[["all",y("threads.all")],["unread",n!=null&&n.unreadThreads?y("threads.unreadCount",{count:n.unreadThreads}):y("threads.unread")],["open",y("threads.openCount",{count:(n==null?void 0:n.open)??0})],["done",y("threads.doneCount",{count:(n==null?void 0:n.done)??0})]];return l.jsxs("main",{className:"ui-chat jv-followed-page","aria-label":y("sidebar.followed"),"data-open":k?"":void 0,children:[l.jsxs("section",{className:"jv-followed-list","aria-label":y("threads.list"),children:[l.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[l.jsxs("div",{className:"ui-header-left",children:[l.jsx(vt,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:y("common.openNav"),onClick:c}),l.jsx("strong",{className:"jv-channel-title",children:y("sidebar.followed")})]}),l.jsx(S6,{value:p,onChange:j})]}),l.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":y("threads.filter"),children:C.map(([M,E])=>l.jsx("button",{type:"button",role:"tab","aria-selected":g===M,onClick:()=>v(M),children:E},M))}),l.jsxs("div",{className:"jv-followed-items",ref:S,children:[b.ready&&b.items.length===0&&!b.more?l.jsx("p",{className:"jv-picker-empty",children:y(zq[g])}):b.items.map(M=>{const E=r.find(R=>{var _;return R.id===((_=M.root)==null?void 0:_.senderId)}),T=a.find(R=>R.id===M.parentId);return l.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":M.unread>0||void 0,"aria-current":M.id===(f==null?void 0:f.id)||void 0,onClick:()=>h(M),children:[l.jsxs("span",{className:"jv-thread-item-head",children:[l.jsx("strong",{children:M.title}),M.alerts>0?l.jsx("span",{className:"jv-badge",children:M.alerts}):M.unread>0&&l.jsx("span",{className:"jv-count",children:M.unread}),l.jsx("span",{className:"jv-thread-status","data-done":M.status==="done"||void 0,children:y(M.status==="done"?"channel.threadDone":"threads.open")})]}),M.root&&l.jsxs("span",{className:"jv-thread-item-root",children:[l.jsx(lr,{member:E,bots:o,size:16}),l.jsx("span",{children:Os(M.root)})]}),l.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:["#",(T==null?void 0:T.title)??""," · ",y("channel.replies",{count:M.replies}),M.lastReplyAt?` · ${Rq(M.lastReplyAt)}`:"",M.following?"":` · ${y("threads.notFollowing")}`]})]},M.id)}),l.jsx("div",{ref:N,className:"jv-followed-end",children:b.failed?l.jsxs(l.Fragment,{children:[l.jsx("p",{role:"alert",children:y("threads.loadFailed")}),l.jsx(Ee,{variant:"outline",size:"sm",onClick:b.retry,children:y("common.retry")})]}):(b.loading||!b.ready)&&l.jsx("p",{role:"status",children:y("threads.loading")})})]})]}),k?d(k,()=>h(null)):l.jsx("div",{className:"jv-followed-empty",children:l.jsx("p",{children:y("threads.pick")})})]})}function Dq({pane:e,followedView:n,threadEvents:a,followed:r,chats:o,sections:c,members:d,bots:f,statuses:h,meId:g,drafts:v,changes:p,live:j,memory:b,paneChannel:k,activeBot:S,botDirects:N,find:C,onPane:M,onNav:E,onBackToChannel:T,onAddMembers:R,onOpenBot:_,onPin:z,onMute:P,onDeleteChannel:H,onChannelSaved:O,onThreadChanged:I,onInvite:$,onPreview:Q,onNotice:Y,onError:q,onBotCard:K,paneWidth:V,onResize:X}){var B,F;const Z=(e==null?void 0:e.kind)==="thread"?e:null,D=(Z==null?void 0:Z.mode)==="full",se=()=>M(null),ne=(ee,W,de)=>void he.chat(ee).then(oe=>C.openMessage(oe,W,de),q);return l.jsxs(l.Fragment,{children:[n&&!D&&l.jsx(Oq,{events:a,summary:r,chats:o,members:d,bots:f,onNav:E,renderThread:(ee,W)=>l.jsx(Kj,{threadId:ee.id,mode:"embed",channel:o.find(de=>de.id===ee.parentId),drafts:v,members:d,bots:f,me:g,live:j,memory:b,onNav:E,onChanged:I,onClose:W,onToggleMode:()=>T({id:ee.id,parentId:ee.parentId},!0),onInvite:de=>$(ee.parentId,de),onPreview:Q,onError:q,onNotice:Y,onOpenMessage:ne,onBotCard:K},ee.id)}),Z&&l.jsx(Kj,{threadId:Z.id,mode:Z.mode,showSummary:Z.summary,focus:Z.focus,onSearch:C.search,channel:o.find(ee=>ee.id===Z.parentId),drafts:v,members:d,bots:f,me:g,live:j,memory:b,onNav:E,onChanged:I,onClose:()=>D?T(Z,!1):se(),onToggleMode:()=>D?T(Z,!0):M({...Z,mode:"full"}),onInvite:ee=>$(Z.parentId,ee),onPreview:Q,onError:q,onNotice:Y,onOpenMessage:ne,onBotCard:K},`${Z.id}:${((B=Z.focus)==null?void 0:B.id)??""}:${((F=Z.focus)==null?void 0:F.passage)??""}`),(e==null?void 0:e.kind)==="search"&&l.jsx(yq,{chat:e.chat,chats:o,members:d,focusKey:C.focusKey,onOpenMessage:C.openMessage,onClose:se,onError:q}),(e==null?void 0:e.kind)==="threads"&&k&&l.jsx(Mq,{channel:k,members:d,bots:f,changes:p,onOpen:ee=>M({kind:"thread",id:ee,parentId:k.id,mode:"pane"}),onClose:se,onError:q}),(e==null?void 0:e.kind)==="info"&&k&&l.jsx(vq,{channel:k,page:e.page,sections:c,members:Na(d),bots:f,statuses:h,me:g,onPage:ee=>M({kind:"info",page:ee}),onPin:()=>z(k),onMute:()=>P(k),onAdd:()=>R(k),onBot:_,onDelete:()=>H(k),onChanged:O,onClose:se,onError:q}),(e==null?void 0:e.kind)==="botdms"&&S&&!k&&l.jsx(mq,{bot:S,chats:N,members:d,bots:f,me:g,live:j,onClose:se,onPreview:Q,onError:q}),e&&!D&&l.jsx("div",{className:"jv-resize",style:{right:V-4},onPointerDown:X,role:"separator","aria-orientation":"vertical","aria-label":y("app.resizePane")})]})}const Zj="@goodfish/jarvy",C6="0.14.0",Lq={url:"git+https://github.com/AzzzGoodFish/Jarvy.git"},Bq="Apache-2.0",c1=Lq.url.replace(/^git\+/,"").replace(/\.git$/,""),Jj=`${c1}/blob/v${C6}`,Iq=[{label:"about.source",detail:c1.replace(/^https:\/\//,""),href:c1},{label:"about.package",detail:Zj,href:`https://www.npmjs.com/package/${Zj}`},{label:"about.license",detail:Bq,href:`${Jj}/LICENSE`},{label:"about.notices",detail:"THIRD_PARTY_NOTICE.md",href:`${Jj}/THIRD_PARTY_NOTICE.md`}];function Pq(){return l.jsxs("div",{className:"jv-page",children:[l.jsx("header",{className:"jv-page-header",children:l.jsx("h2",{children:y("settings.about")})}),l.jsxs("div",{className:"jv-list",children:[l.jsxs("div",{className:"jv-list-row jv-static-row jv-about-intro",children:[l.jsxs("div",{className:"jv-row-text",children:[l.jsx("strong",{children:"Jarvy"}),l.jsx("span",{children:y("about.tagline")})]}),l.jsx("span",{className:"jv-row-meta",children:y("about.version",{version:C6})})]}),Iq.map(e=>l.jsxs("a",{className:"jv-list-row jv-link-row",href:e.href,target:"_blank",rel:"noreferrer",children:[l.jsxs("div",{className:"jv-row-text",children:[l.jsx("strong",{children:y(e.label)}),l.jsx("span",{children:e.detail})]}),l.jsx(b0,{"aria-hidden":"true"})]},e.label))]})]})}function Hq(){const[e,n]=w.useState(document.documentElement.classList.contains("dark")),a=o=>{xf(o?"dark":"light"),n(o)},r=(o,c,d,f,h)=>l.jsxs("button",{type:"button",role:"radio","aria-checked":d,lang:h,className:"jv-list-row jv-choice-row",onClick:f,children:[l.jsx("span",{className:"jv-row-text",children:l.jsx("strong",{children:c})}),d&&l.jsx(Li,{"aria-hidden":"true"})]},o);return l.jsxs("div",{className:"jv-page",children:[l.jsx("header",{className:"jv-page-header",children:l.jsx("h2",{children:y("settings.general")})}),l.jsxs("section",{className:"jv-section","aria-labelledby":"general-language",children:[l.jsx("h3",{id:"general-language",className:"jv-section-title",children:y("general.language")}),l.jsx("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-language",children:m4.map(o=>r(o,v0(o,"name"),Tl()===o,()=>v4(o),o))})]}),l.jsxs("section",{className:"jv-section","aria-labelledby":"general-theme",children:[l.jsx("h3",{id:"general-theme",className:"jv-section-title",children:y("general.theme")}),l.jsxs("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-theme",children:[r("light",y("general.light"),!e,()=>a(!1)),r("dark",y("general.dark"),e,()=>a(!0))]})]})]})}const qq=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.797 6.282a.451.451 0 01-.336-.315 1.019 1.019 0 010-.505c.156-.86.3-1.725.501-2.577.14-.7.42-1.367.823-1.96.305-.431.75-.746 1.262-.89.877-.217 1.24.629.937 1.348-.259.593-.877.914-1.334 1.348-.835.795-1.096 2.14-1.336 3.212a.427.427 0 01-.186.277.437.437 0 01-.331.062z" fill="url(#lobe-icons-ant-group-0-_R_0_)" transform="translate(3)"></path><path d="M6.334 4.672c.33-.121.682.146.946.297.278.145.587.219.901.214.231.01.466 0 .688.018 4.098.176 7.484 3.22 8.05 7.237.565 4.016-1.852 7.859-5.745 9.134-3.894 1.276-8.153-.38-10.126-3.935A8.339 8.339 0 013.133 7.081c.348-.278.716-.53 1.102-.755a8.404 8.404 0 001.318-.79c.28-.243.45-.742.781-.864zm4.406 2.15c-2.841.003-4.898 2.533-4.628 5.642.27 3.109 2.781 5.641 5.613 5.665 2.832.024 4.932-2.512 4.658-5.644-.273-3.133-2.802-5.666-5.643-5.663zm.357.57a4.707 4.707 0 013.304 1.446 5.703 5.703 0 011.643 3.49 4.841 4.841 0 01-1.141 3.705v.015a3.923 3.923 0 01-2.808 1.303 4.664 4.664 0 01-3.367-1.387 5.678 5.678 0 01-1.71-3.518 4.832 4.832 0 011.14-3.753 3.923 3.923 0 012.813-1.3h.126z" fill="url(#lobe-icons-ant-group-1-_R_0_)" transform="translate(3)"></path><path d="M2.346 2.054a1.26 1.26 0 01.384-.594.842.842 0 011.165.11c.694.82.169 2.078.142 3.02.013.805.208 1.597.57 2.318.084.134.147.279.186.43a.539.539 0 01-.3.577c-.345.17-.568-.19-.709-.446-.324-.6-.617-1.216-.877-1.846a8.698 8.698 0 01-.618-1.987 7.523 7.523 0 01-.051-.37 3.717 3.717 0 01-.024-.34 2.506 2.506 0 01.132-.872z" fill="url(#lobe-icons-ant-group-2-_R_0_)" transform="translate(3)"></path><defs><linearGradient id="lobe-icons-ant-group-0-_R_0_" x1="31.373%" x2="61.365%" y1="95.551%" y2="-.348%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient><linearGradient id="lobe-icons-ant-group-1-_R_0_" x1="4.366%" x2="94.359%" y1="65.982%" y2="32.918%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient><linearGradient id="lobe-icons-ant-group-2-_R_0_" x1="56.255%" x2="45.986%" y1="99.257%" y2="1.384%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient></defs></svg>
|
|
817
|
+
`,Fq=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"></path></svg>
|
|
818
|
+
`,Uq='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><mask height="23" id="lobe-icons-antigravity-0-_R_0_" maskUnits="userSpaceOnUse" width="24" x="0" y="1"><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z" fill="#fff"></path></mask><g mask="url(#lobe-icons-antigravity-0-_R_0_)"><g filter="url(#lobe-icons-antigravity-1-_R_0_)"><path d="M-1.018-3.992c-.408 3.591 2.686 6.89 6.91 7.37 4.225.48 7.98-2.043 8.387-5.633.408-3.59-2.686-6.89-6.91-7.37-4.225-.479-7.98 2.043-8.387 5.633z" fill="#FFE432"></path></g><g filter="url(#lobe-icons-antigravity-2-_R_0_)"><path d="M15.269 7.747c1.058 4.557 5.691 7.374 10.348 6.293 4.657-1.082 7.575-5.653 6.516-10.21-1.058-4.556-5.691-7.374-10.348-6.292-4.657 1.082-7.575 5.653-6.516 10.21z" fill="#FC413D"></path></g><g filter="url(#lobe-icons-antigravity-3-_R_0_)"><path d="M-12.443 10.804c1.338 4.703 7.36 7.11 13.453 5.378 6.092-1.733 9.947-6.95 8.61-11.652C8.282-.173 2.26-2.58-3.833-.848-9.925.884-13.78 6.1-12.443 10.804z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-4-_R_0_)"><path d="M-12.443 10.804c1.338 4.703 7.36 7.11 13.453 5.378 6.092-1.733 9.947-6.95 8.61-11.652C8.282-.173 2.26-2.58-3.833-.848-9.925.884-13.78 6.1-12.443 10.804z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-5-_R_0_)"><path d="M-7.608 14.703c3.352 3.424 9.126 3.208 12.896-.483 3.77-3.69 4.108-9.459.756-12.883C2.69-2.087-3.083-1.871-6.853 1.82c-3.77 3.69-4.108 9.458-.755 12.883z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-6-_R_0_)"><path d="M9.932 27.617c1.04 4.482 5.384 7.303 9.7 6.3 4.316-1.002 6.971-5.448 5.93-9.93-1.04-4.483-5.384-7.304-9.7-6.301-4.316 1.002-6.971 5.448-5.93 9.93z" fill="#3186FF"></path></g><g filter="url(#lobe-icons-antigravity-7-_R_0_)"><path d="M2.572-8.185C.392-3.329 2.778 2.472 7.9 4.771c5.122 2.3 11.042.227 13.222-4.63 2.18-4.855-.205-10.656-5.327-12.955-5.122-2.3-11.042-.227-13.222 4.63z" fill="#FBBC04"></path></g><g filter="url(#lobe-icons-antigravity-8-_R_0_)"><path d="M-3.267 38.686c-5.277-2.072 3.742-19.117 5.984-24.83 2.243-5.712 8.34-8.664 13.616-6.592 5.278 2.071 11.533 13.482 9.29 19.195-2.242 5.713-23.613 14.298-28.89 12.227z" fill="#3186FF"></path></g><g filter="url(#lobe-icons-antigravity-9-_R_0_)"><path d="M28.71 17.471c-1.413 1.649-5.1.808-8.236-1.878-3.135-2.687-4.531-6.201-3.118-7.85 1.412-1.649 5.1-.808 8.235 1.878s4.532 6.2 3.119 7.85z" fill="#749BFF"></path></g><g filter="url(#lobe-icons-antigravity-10-_R_0_)"><path d="M18.163 9.077c5.81 3.93 12.502 4.19 14.946.577 2.443-3.612-.287-9.727-6.098-13.658-5.81-3.931-12.502-4.19-14.946-.577-2.443 3.612.287 9.727 6.098 13.658z" fill="#FC413D"></path></g><g filter="url(#lobe-icons-antigravity-11-_R_0_)"><path d="M-.915 2.684c-1.44 3.473-.97 6.967 1.05 7.804 2.02.837 4.824-1.3 6.264-4.772 1.44-3.473.97-6.967-1.05-7.804-2.02-.837-4.824 1.3-6.264 4.772z" fill="#FFEE48"></path></g></g><defs><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="17.587" id="lobe-icons-antigravity-1-_R_0_" width="19.838" x="-3.288" y="-11.917"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="1.117"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="38.565" id="lobe-icons-antigravity-2-_R_0_" width="38.9" x="4.251" y="-13.493"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="5.4"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.517" id="lobe-icons-antigravity-3-_R_0_" width="40.955" x="-21.889" y="-10.592"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.517" id="lobe-icons-antigravity-4-_R_0_" width="40.955" x="-21.889" y="-10.592"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.595" id="lobe-icons-antigravity-5-_R_0_" width="36.632" x="-19.099" y="-10.278"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="34.087" id="lobe-icons-antigravity-6-_R_0_" width="33.533" x=".981" y="8.758"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.363"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="35.276" id="lobe-icons-antigravity-7-_R_0_" width="35.978" x="-6.143" y="-21.659"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.954"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="46.523" id="lobe-icons-antigravity-8-_R_0_" width="45.114" x="-11.96" y="-.46"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.531"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="24.054" id="lobe-icons-antigravity-9-_R_0_" width="25.094" x="10.485" y=".58"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.159"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="30.007" id="lobe-icons-antigravity-10-_R_0_" width="33.508" x="5.833" y="-12.467"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="2.669"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="26.151" id="lobe-icons-antigravity-11-_R_0_" width="22.194" x="-8.355" y="-8.876"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.303"></feGaussianBlur></filter></defs></svg>',$q=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.242 1.613A1.11 1.11 0 018.295.857h6.977L8.03 22.316a1.11 1.11 0 01-1.052.755h-5.43a1.11 1.11 0 01-1.053-1.466L7.242 1.613z" fill="url(#lobe-icons-azure-0-_R_0_)"></path><path d="M18.397 15.296H7.4a.51.51 0 00-.347.882l7.066 6.595c.206.192.477.298.758.298h6.226l-2.706-7.775z" fill="#0078D4"></path><path d="M15.272.857H7.497L0 23.071h7.775l1.596-4.73 5.068 4.73h6.665l-2.707-7.775h-7.998L15.272.857z" fill="url(#lobe-icons-azure-1-_R_0_)"></path><path d="M17.193 1.613a1.11 1.11 0 00-1.052-.756h-7.81.035c.477 0 .9.304 1.052.756l6.748 19.992a1.11 1.11 0 01-1.052 1.466h-.12 7.895a1.11 1.11 0 001.052-1.466L17.193 1.613z" fill="url(#lobe-icons-azure-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-0-_R_0_" x1="8.247" x2="1.002" y1="1.626" y2="23.03"><stop stop-color="#114A8B"></stop><stop offset="1" stop-color="#0669BC"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-1-_R_0_" x1="14.042" x2="12.324" y1="15.302" y2="15.888"><stop stop-opacity=".3"></stop><stop offset=".071" stop-opacity=".2"></stop><stop offset=".321" stop-opacity=".1"></stop><stop offset=".623" stop-opacity=".05"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-2-_R_0_" x1="12.841" x2="20.793" y1="1.626" y2="22.814"><stop stop-color="#3CCBF4"></stop><stop offset="1" stop-color="#2892DF"></stop></linearGradient></defs></svg>
|
|
819
|
+
`,Vq=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.316 4.8h14.682v4.8H7.31a.302.302 0 00-.308.3v4.2c0 .171.14.3.308.3h9.688v4.8h-4.686a.302.302 0 00-.308.3v4.2c0 .171.141.3.308.3h4.378a.297.297 0 00.308-.3v-4.5h4.694a.302.302 0 00.308-.3v-4.2c0-.171-.14-.3-.308-.3h-4.694V9.6h4.694A.302.302 0 0022 9.3V5.1c0-.171-.14-.3-.308-.3h-4.694V.3c0-.171-.14-.3-.308-.3H2.316A.31.31 0 002 .3v4.2c0 .171.14.3.316.3z"></path></svg>
|
|
820
|
+
`,Gq=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="lobe-icons-bedrock-_R_0_" x1="80%" x2="20%" y1="20%" y2="80%"><stop offset="0%" stop-color="#6350FB"></stop><stop offset="50%" stop-color="#3D8FFF"></stop><stop offset="100%" stop-color="#9AD8F8"></stop></linearGradient></defs><path d="M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z" fill="url(#lobe-icons-bedrock-_R_0_)" fill-rule="nonzero"></path></svg>
|
|
821
|
+
`,Yq=`<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>
|
|
822
|
+
`,Kq=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437" fill="#F38020"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777" fill="#FCAD32"></path></svg>
|
|
823
|
+
`,Xq=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z" fill="#4D6BFE"></path></svg>
|
|
824
|
+
`,Qq=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z"></path></svg>
|
|
825
|
+
`,Zq=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"></path></svg>
|
|
826
|
+
`,Jq=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z" fill="#4285F4"></path><path d="M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z" fill="#34A853"></path><path d="M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z" fill="#FBBC05"></path><path d="M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z" fill="#EB4335"></path></svg>
|
|
827
|
+
`,Wq=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>
|
|
828
|
+
`,eF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z" fill="#FF9D0B"></path><path d="M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z" fill="#FFD21E"></path><path d="M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-.576-.393-.394-1.023-.089-.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-.586 0 1.107.79 3.263 3.25 3.263h-.003z" fill="#FF323D"></path><path d="M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003zm1.12 5.34a2.166 2.166 0 011.325-1.106c.07-.02.144.06.219.171l.192.306c.069.1.139.175.209.175.074 0 .15-.074.223-.172l.205-.302c.08-.11.157-.188.234-.165.537.168.986.536 1.25 1.026.932-.724 1.275-1.905 1.275-2.633 0-.508-.306-.426-.81-.19l-.616.296c-.52.24-1.148.48-1.824.48-.676 0-1.302-.24-1.823-.48l-.589-.283c-.52-.248-.838-.342-.838.177 0 .703.32 1.831 1.187 2.56l.18.14z" fill="#3A3B45"></path><path d="M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8zM4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694.244-.162.523-.265.814-.3l.176-.012z" fill="#FF9D0B"></path><path d="M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-.573.534-.375-.677-1.405-2.416-1.94-2.751-.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-.522z" fill="#FFD21E"></path></svg>
|
|
829
|
+
`,tF=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path></svg>
|
|
830
|
+
`,nF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6.897 4h-.024l-.031 2.615h.022c1.715 0 3.046 1.357 5.94 6.246l.175.297.012.02 1.62-2.438-.012-.019a48.763 48.763 0 00-1.098-1.716 28.01 28.01 0 00-1.175-1.629C10.413 4.932 8.812 4 6.896 4z" fill="url(#lobe-icons-meta-0-_R_0_)"></path><path d="M6.873 4C4.95 4.01 3.247 5.258 2.02 7.17a4.352 4.352 0 00-.01.017l2.254 1.231.011-.017c.718-1.083 1.61-1.774 2.568-1.785h.021L6.896 4h-.023z" fill="url(#lobe-icons-meta-1-_R_0_)"></path><path d="M2.019 7.17l-.011.017C1.2 8.447.598 9.995.274 11.664l-.005.022 2.534.6.004-.022c.27-1.467.786-2.828 1.456-3.845l.011-.017L2.02 7.17z" fill="url(#lobe-icons-meta-2-_R_0_)"></path><path d="M2.807 12.264l-2.533-.6-.005.022c-.177.918-.267 1.851-.269 2.786v.023l2.598.233v-.023a12.591 12.591 0 01.21-2.44z" fill="url(#lobe-icons-meta-3-_R_0_)"></path><path d="M2.677 15.537a5.462 5.462 0 01-.079-.813v-.022L0 14.468v.024a8.89 8.89 0 00.146 1.652l2.535-.585a4.106 4.106 0 01-.004-.022z" fill="url(#lobe-icons-meta-4-_R_0_)"></path><path d="M3.27 16.89c-.284-.31-.484-.756-.589-1.328l-.004-.021-2.535.585.004.021c.192 1.01.568 1.85 1.106 2.487l.014.017 2.018-1.745a2.106 2.106 0 01-.015-.016z" fill="url(#lobe-icons-meta-5-_R_0_)"></path><path d="M10.78 9.654c-1.528 2.35-2.454 3.825-2.454 3.825-2.035 3.2-2.739 3.917-3.871 3.917a1.545 1.545 0 01-1.186-.508l-2.017 1.744.014.017C2.01 19.518 3.058 20 4.356 20c1.963 0 3.374-.928 5.884-5.33l1.766-3.13a41.283 41.283 0 00-1.227-1.886z" fill="#0082FB"></path><path d="M13.502 5.946l-.016.016c-.4.43-.786.908-1.16 1.416.378.483.768 1.024 1.175 1.63.48-.743.928-1.345 1.367-1.807l.016-.016-1.382-1.24z" fill="url(#lobe-icons-meta-6-_R_0_)"></path><path d="M20.918 5.713C19.853 4.633 18.583 4 17.225 4c-1.432 0-2.637.787-3.723 1.944l-.016.016 1.382 1.24.016-.017c.715-.747 1.408-1.12 2.176-1.12.826 0 1.6.39 2.27 1.075l.015.016 1.589-1.425-.016-.016z" fill="#0082FB"></path><path d="M23.998 14.125c-.06-3.467-1.27-6.566-3.064-8.396l-.016-.016-1.588 1.424.015.016c1.35 1.392 2.277 3.98 2.361 6.971v.023h2.292v-.022z" fill="url(#lobe-icons-meta-7-_R_0_)"></path><path d="M23.998 14.15v-.023h-2.292v.022c.004.14.006.282.006.424 0 .815-.121 1.474-.368 1.95l-.011.022 1.708 1.782.013-.02c.62-.96.946-2.293.946-3.91 0-.083 0-.165-.002-.247z" fill="url(#lobe-icons-meta-8-_R_0_)"></path><path d="M21.344 16.52l-.011.02c-.214.402-.519.67-.917.787l.778 2.462a3.493 3.493 0 00.438-.182 3.558 3.558 0 001.366-1.218l.044-.065.012-.02-1.71-1.784z" fill="url(#lobe-icons-meta-9-_R_0_)"></path><path d="M19.92 17.393c-.262 0-.492-.039-.718-.14l-.798 2.522c.449.153.927.222 1.46.222.492 0 .943-.073 1.352-.215l-.78-2.462c-.167.05-.341.075-.517.073z" fill="url(#lobe-icons-meta-10-_R_0_)"></path><path d="M18.323 16.534l-.014-.017-1.836 1.914.016.017c.637.682 1.246 1.105 1.937 1.337l.797-2.52c-.291-.125-.573-.353-.9-.731z" fill="url(#lobe-icons-meta-11-_R_0_)"></path><path d="M18.309 16.515c-.55-.642-1.232-1.712-2.303-3.44l-1.396-2.336-.011-.02-1.62 2.438.012.02.989 1.668c.959 1.61 1.74 2.774 2.493 3.585l.016.016 1.834-1.914a2.353 2.353 0 01-.014-.017z" fill="url(#lobe-icons-meta-12-_R_0_)"></path><defs><linearGradient id="lobe-icons-meta-0-_R_0_" x1="75.897%" x2="26.312%" y1="89.199%" y2="12.194%"><stop offset=".06%" stop-color="#0867DF"></stop><stop offset="45.39%" stop-color="#0668E1"></stop><stop offset="85.91%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-1-_R_0_" x1="21.67%" x2="97.068%" y1="75.874%" y2="23.985%"><stop offset="13.23%" stop-color="#0064DF"></stop><stop offset="99.88%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-2-_R_0_" x1="38.263%" x2="60.895%" y1="89.127%" y2="16.131%"><stop offset="1.47%" stop-color="#0072EC"></stop><stop offset="68.81%" stop-color="#0064DF"></stop></linearGradient><linearGradient id="lobe-icons-meta-3-_R_0_" x1="47.032%" x2="52.15%" y1="90.19%" y2="15.745%"><stop offset="7.31%" stop-color="#007CF6"></stop><stop offset="99.43%" stop-color="#0072EC"></stop></linearGradient><linearGradient id="lobe-icons-meta-4-_R_0_" x1="52.155%" x2="47.591%" y1="58.301%" y2="37.004%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#007CF6"></stop></linearGradient><linearGradient id="lobe-icons-meta-5-_R_0_" x1="37.689%" x2="61.961%" y1="12.502%" y2="63.624%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-6-_R_0_" x1="34.808%" x2="62.313%" y1="68.859%" y2="23.174%"><stop offset="27.99%" stop-color="#007FF8"></stop><stop offset="91.41%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-7-_R_0_" x1="43.762%" x2="57.602%" y1="6.235%" y2="98.514%"><stop offset="0%" stop-color="#0082FB"></stop><stop offset="99.95%" stop-color="#0081FA"></stop></linearGradient><linearGradient id="lobe-icons-meta-8-_R_0_" x1="60.055%" x2="39.88%" y1="4.661%" y2="69.077%"><stop offset="6.19%" stop-color="#0081FA"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-9-_R_0_" x1="30.282%" x2="61.081%" y1="59.32%" y2="33.244%"><stop offset="0%" stop-color="#027AF3"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-10-_R_0_" x1="20.433%" x2="82.112%" y1="50.001%" y2="50.001%"><stop offset="0%" stop-color="#0377EF"></stop><stop offset="99.94%" stop-color="#0279F1"></stop></linearGradient><linearGradient id="lobe-icons-meta-11-_R_0_" x1="40.303%" x2="72.394%" y1="35.298%" y2="57.811%"><stop offset=".19%" stop-color="#0471E9"></stop><stop offset="100%" stop-color="#0377EF"></stop></linearGradient><linearGradient id="lobe-icons-meta-12-_R_0_" x1="32.254%" x2="68.003%" y1="19.719%" y2="84.908%"><stop offset="27.65%" stop-color="#0867DF"></stop><stop offset="100%" stop-color="#0471E9"></stop></linearGradient></defs></svg>
|
|
831
|
+
`,iF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="lobe-icons-minimax-_R_0_" x1="0%" x2="100.182%" y1="50.057%" y2="50.057%"><stop offset="0%" stop-color="#E2167E"></stop><stop offset="100%" stop-color="#FE603C"></stop></linearGradient></defs><path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z" fill="url(#lobe-icons-minimax-_R_0_)" fill-rule="nonzero"></path></svg>
|
|
832
|
+
`,aF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z" fill="gold"></path><path d="M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z" fill="#FFAF00"></path><path d="M3.428 10.258h17.144v3.428H3.428v-3.428z" fill="#FF8205"></path><path d="M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z" fill="#FA500F"></path><path d="M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z" fill="#E10500"></path></svg>
|
|
833
|
+
`,rF=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"></path></svg>
|
|
834
|
+
`,lF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z" fill="#74B71B" fill-rule="nonzero"></path></svg>
|
|
835
|
+
`,sF=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>
|
|
836
|
+
`,oF=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>
|
|
837
|
+
`,cF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z" fill="#C8FF00"></path></svg>
|
|
838
|
+
`,uF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z" fill="url(#lobe-icons-qwen-_R_0_)" fill-rule="nonzero"></path><defs><linearGradient id="lobe-icons-qwen-_R_0_" x1="0%" x2="100%" y1="0%" y2="0%"><stop offset="0%" stop-color="#6336E7" stop-opacity=".84"></stop><stop offset="100%" stop-color="#6F69F7" stop-opacity=".84"></stop></linearGradient></defs></svg>
|
|
839
|
+
`,dF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z" fill="#EF2CC1"></path><path d="M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z" fill="#CAAEF5"></path><path d="M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z" fill="#FC4C02"></path></svg>
|
|
840
|
+
`,fF=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0l12 20.785H0L12 0z"></path></svg>
|
|
841
|
+
`,hF=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11.995 20.216a1.892 1.892 0 100 3.785 1.892 1.892 0 000-3.785zm0 2.806a.927.927 0 11.927-.914.914.914 0 01-.927.914z" fill="#4285F4"></path><path clip-rule="evenodd" d="M21.687 14.144c.237.038.452.16.605.344a.978.978 0 01-.18 1.3l-8.24 6.082a1.892 1.892 0 00-1.147-1.508l8.28-6.08a.991.991 0 01.682-.138z" fill="#669DF6" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M10.122 21.842l-8.217-6.066a.952.952 0 01-.206-1.287.978.978 0 011.287-.206l8.28 6.08a1.893 1.893 0 00-1.144 1.479z" fill="#AECBFA" fill-rule="evenodd"></path><path d="M4.273 4.475a.978.978 0 01-.965-.965V1.09a.978.978 0 111.943 0v2.42a.978.978 0 01-.978.965zM4.247 13.034a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 10.19a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 7.332a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#AECBFA"></path><path d="M19.718 7.307a.978.978 0 01-.965-.979v-2.42a.965.965 0 011.93 0v2.42a.964.964 0 01-.965.979zM19.743 13.047a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 10.151a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 2.068a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#4285F4"></path><path d="M11.995 15.917a.978.978 0 01-.965-.965v-2.459a.978.978 0 011.943 0v2.433a.976.976 0 01-.978.991zM11.995 18.762a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 10.64a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 7.783a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#669DF6"></path><path d="M15.856 10.177a.978.978 0 01-.965-.965v-2.42a.977.977 0 011.702-.763.979.979 0 01.241.763v2.42a.978.978 0 01-.978.965zM15.869 4.913a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 12.996a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#4285F4"></path><path d="M8.121 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 7.783a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 4.913a.978.978 0 100-1.957.978.978 0 000 1.957zM8.134 12.996a.978.978 0 01-.978-.94V9.611a.965.965 0 011.93 0v2.445a.966.966 0 01-.952.94z" fill="#AECBFA"></path></svg>
|
|
842
|
+
`,mF=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></path></svg>
|
|
843
|
+
`,pF=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path></svg>
|
|
844
|
+
`,gF=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path></svg>
|
|
845
|
+
`,vF=Object.assign({"./antgroup.svg":qq,"./anthropic.svg":Fq,"./antigravity.svg":Uq,"./azure.svg":$q,"./baseten.svg":Vq,"./bedrock.svg":Gq,"./cerebras.svg":Yq,"./cloudflare.svg":Kq,"./deepseek.svg":Xq,"./fireworks.svg":Qq,"./githubcopilot.svg":Zq,"./google.svg":Jq,"./groq.svg":Wq,"./huggingface.svg":eF,"./kimi.svg":tF,"./meta.svg":nF,"./minimax.svg":iF,"./mistral.svg":aF,"./moonshot.svg":rF,"./nvidia.svg":lF,"./openai.svg":sF,"./opencode.svg":oF,"./openrouter.svg":cF,"./qwen.svg":uF,"./together.svg":dF,"./vercel.svg":fF,"./vertexai.svg":hF,"./xai.svg":mF,"./xiaomimimo.svg":pF,"./zai.svg":gF}),Wj={"amazon-bedrock":"bedrock","ant-ling":"antgroup",anthropic:"anthropic",antigravity:"antigravity",azure:"azure",baseten:"baseten",cerebras:"cerebras","cloudflare-ai-gateway":"cloudflare","cloudflare-workers-ai":"cloudflare",deepseek:"deepseek",fireworks:"fireworks","github-copilot":"githubcopilot",google:"google","google-vertex":"vertexai",groq:"groq",huggingface:"huggingface","kimi-coding":"kimi",meta:"meta",minimax:"minimax","minimax-cn":"minimax",mistral:"mistral",moonshotai:"moonshot","moonshotai-cn":"moonshot",nvidia:"nvidia",openai:"openai","openai-codex":"openai",opencode:"opencode","opencode-go":"opencode",openrouter:"openrouter","qwen-token-plan":"qwen","qwen-token-plan-cn":"qwen","qwen-token-plan-individual":"qwen",together:"together","vercel-ai-gateway":"vercel",xai:"xai",xiaomi:"xiaomimimo","xiaomi-token-plan-ams":"xiaomimimo","xiaomi-token-plan-cn":"xiaomimimo","xiaomi-token-plan-sgp":"xiaomimimo",zai:"zai","zai-coding-cn":"zai"},yF=e=>e&&Wj[e]?vF[`./${Wj[e]}.svg`]:void 0;function Ag({name:e,provider:n}){var r;const a=yF(n);return a?l.jsx("span",{className:"jv-provider-mark","data-logo":"","aria-hidden":"true",dangerouslySetInnerHTML:{__html:a}}):l.jsx("span",{className:"jv-provider-mark","aria-hidden":"true",children:((r=[...e.trim()][0])==null?void 0:r.toUpperCase())??"?"})}function N6(e){const n=e.authType==="oauth";return e.configured?{ok:!0,label:y(n?"status.signedIn":"status.configured")}:{ok:!1,label:y(n?"status.signedOut":"status.notConfigured")}}const E6=[{id:"custom",label:"group.custom"},{id:"subscription",label:"group.subscription"},{id:"api_key",label:"group.apiKey"}],T6=e=>e.custom?"custom":e.authType==="oauth"?"subscription":"api_key",xF={id:"custom",name:"OpenAI / Anthropic compatible",authType:"api_key",api:"openai-completions",modelCount:0};function bF({onBack:e,onSelect:n}){const[a,r]=w.useState([]),[o,c]=w.useState(""),[d,f]=w.useState(""),[h,g]=w.useState(!0),[v,p]=w.useState(0);w.useEffect(()=>{let k=!0;return g(!0),f(""),he.modelProviders().then(S=>{k&&r(S.providers)}).catch(S=>{k&&f(un(S,"picker.loadFailed"))}).finally(()=>{k&&g(!1)}),()=>{k=!1}},[v]);const j=[xF,...a].filter(k=>`${k.name} ${k.id}`.toLowerCase().includes(o.toLowerCase())),b=k=>T6({authType:k.authType,custom:k.id==="custom"});return l.jsxs("div",{className:"jv-page",children:[l.jsxs("header",{className:"jv-page-header",children:[l.jsx(Ee,{variant:"ghost",size:"icon-sm",className:"jv-back",onClick:e,"aria-label":y("picker.back"),children:l.jsx(m1,{})}),l.jsx("h2",{children:y("models.add")})]}),l.jsxs("label",{className:"jv-search",children:[l.jsx(_s,{}),l.jsx("input",{autoFocus:!0,"aria-label":y("picker.search"),placeholder:y("picker.searchPlaceholder"),value:o,onChange:k=>c(k.target.value)})]}),E6.filter(k=>j.some(S=>b(S)===k.id)).map(({id:k,label:S})=>l.jsxs("section",{className:"jv-section","aria-label":y(S),children:[l.jsx("h3",{className:"jv-section-title",children:y(S)}),l.jsx("div",{className:"jv-list",children:j.filter(N=>b(N)===k).map(N=>l.jsxs("button",{className:"jv-list-row",type:"button",onClick:()=>n(N),children:[l.jsx(Ag,{name:N.id==="custom"?"+":N.name,provider:N.id}),l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:N.name}),N.id!=="custom"&&N.authType!=="oauth"&&l.jsx("span",{children:y("picker.keyHint",{count:N.modelCount})})]}),l.jsx(As,{className:"jv-row-chevron"})]},`${N.id}:${N.authType}`))})]},k)),h&&l.jsx("p",{role:"status",className:"jv-hint",children:y("picker.loading")}),d&&l.jsxs("div",{className:"jv-empty",role:"alert",children:[l.jsx("strong",{children:d}),l.jsx(Ee,{variant:"outline",onClick:()=>p(k=>k+1),children:y("picker.retry")})]}),!h&&!d&&!j.length&&l.jsx("div",{className:"jv-empty",children:l.jsx("strong",{children:y("picker.noMatch")})})]})}const jF=S1("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground",destructive:"border-transparent bg-destructive text-white"}},defaultVariants:{variant:"default"}});function wF({className:e,variant:n,...a}){return l.jsx("span",{"data-slot":"badge",className:Dn(jF({variant:n}),e),...a})}function M6({className:e,...n}){return l.jsx(WM,{"data-slot":"label",className:Dn("flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}function kF({connection:e,providerName:n,authType:a,ensureConnection:r,onChanged:o}){var $,Q;const[c,d]=w.useState({phase:"idle"}),[f,h]=w.useState(""),{busy:g,error:v,setError:p,run:j}=On(),[b,k]=w.useState(0),S=w.useRef(void 0),N=e==null?void 0:e.id,C=w.useRef(o);C.current=o;const M=w.useRef(c.phase);M.current=c.phase,w.useEffect(()=>{if(!N)return;const Y=N;let q=!0,K;async function V(){var X;try{let Z=await he.authStatus(Y);if(!q)return;if(S.current&&((X=Z.prompt)==null?void 0:X.type)==="select"){const se=S.current;if(S.current=void 0,Z=await he.authInput(Y,Z.prompt.id,se),!q)return}const D=M.current==="running"&&Z.phase!=="running";M.current=Z.phase,d(Z),D&&await C.current(),Z.phase==="running"&&q&&(K=setTimeout(()=>void V(),750))}catch(Z){q&&p(un(Z,"auth.statusFailed"))}}return V(),()=>{q=!1,clearTimeout(K)}},[N,c.phase,b]),w.useEffect(()=>h(""),[($=c.prompt)==null?void 0:$.id]);async function E(Y){await j("act",async()=>{const q=await Y();d(q),q.phase!=="running"&&await o()},"common.failed")}function T(Y){S.current=Y,E(async()=>{const q=N??await r();return he.authStart(q)})}const R=n==="openai-codex"&&a==="oauth",_=n==="openai"&&a==="oauth",z=c.phase==="running",P=c.prompt,H=c.event,O=(H==null?void 0:H.type)==="auth_url"?H.url:(H==null?void 0:H.type)==="device_code"?H.verificationUri:null,I=Y=>{P&&N&&E(()=>he.authInput(N,P.id,Y))};return l.jsxs("section",{className:"jv-auth","aria-label":y("auth.title"),children:[l.jsxs("div",{className:"jv-auth-header",children:[l.jsx("h3",{children:y("auth.title")}),l.jsx(wF,{variant:"outline","data-state":z?"running":e!=null&&e.configured?"connected":"disconnected",children:y(z?"auth.running":e!=null&&e.configured?a==="oauth"?"status.signedIn":"status.configured":a==="oauth"?"status.signedOut":"status.notConfigured")})]}),z?l.jsxs("div",{className:"jv-auth-flow",children:[O&&l.jsx(Ee,{asChild:!0,variant:"outline",children:l.jsx("a",{style:{color:"inherit",textDecoration:"none"},href:O,target:"_blank",rel:"noopener noreferrer",children:y("auth.openPage")})}),(H==null?void 0:H.type)==="device_code"&&l.jsx("p",{children:y("auth.code",{code:H.userCode})}),(P==null?void 0:P.type)==="select"&&l.jsx("div",{className:"flex flex-wrap gap-2",children:(Q=P.options)==null?void 0:Q.map(Y=>l.jsx(Ee,{type:"button",variant:"outline",disabled:g,onClick:()=>I(Y.id),children:R&&Y.id==="browser"?y("auth.browser"):R&&Y.id==="device_code"?y("auth.deviceCode"):Y.label},Y.id))}),P&&P.type!=="select"&&l.jsxs("div",{className:"jv-auth-input",children:[l.jsx(M6,{htmlFor:`oauth-input-${N??n}`,children:P.type==="manual_code"?y(_?"auth.redirectFull":"auth.redirectOrCode"):P.message}),P.type==="manual_code"&&l.jsx("p",{className:"jv-auth-note",children:y("auth.manualNote")}),l.jsx(Nt,{id:`oauth-input-${N??n}`,type:P.type==="text"?"text":"password",autoComplete:"off",value:f,disabled:g,onChange:Y=>h(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&!Y.nativeEvent.isComposing&&(Y.preventDefault(),I(f))}}),l.jsx(Ee,{type:"button",variant:"outline",disabled:g||!f.trim(),onClick:()=>I(f),children:y("common.continue")})]}),!P&&l.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:y("auth.waiting")}),(H==null?void 0:H.type)==="info"&&l.jsx("p",{className:"text-sm",children:H.message}),l.jsx(Ee,{type:"button",variant:"ghost",disabled:g,onClick:()=>void E(()=>he.authCancel(N)),children:y("auth.cancel")})]}):l.jsxs(l.Fragment,{children:[n==="antigravity"&&l.jsxs("p",{className:"jv-auth-risk",role:"note",children:[l.jsx(Tf,{"aria-hidden":"true"}),y("auth.antigravityRisk")]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[R?l.jsxs(l.Fragment,{children:[l.jsx(Ee,{type:"button",variant:"outline",disabled:g,onClick:()=>T("browser"),children:y("auth.browser")}),l.jsx(Ee,{type:"button",variant:"outline",disabled:g,onClick:()=>T("device_code"),children:y("auth.deviceCode")})]}):l.jsx(Ee,{type:"button",variant:"outline",disabled:g,onClick:()=>T(),children:y(a==="api_key"?"auth.configureCredential":e!=null&&e.configured?"auth.signInAgain":"auth.signIn")}),(e==null?void 0:e.configured)&&l.jsx(Ee,{type:"button",variant:"outline",disabled:g,onClick:()=>void E(async()=>(await he.authLogout(N),{phase:"idle"})),children:y(a==="api_key"?"auth.removeCredential":"auth.signOut")})]})]}),(v||c.phase==="error")&&l.jsx("p",{role:"alert",className:"jarvy-model-feedback",children:v||y("error.loginFailed")}),v&&l.jsx(Ee,{type:"button",variant:"link",disabled:g,onClick:()=>{p(""),k(Y=>Y+1)},children:y("auth.refresh")})]})}async function SF(e,n,a){try{return await he.autoconfigModel({modelId:e.id,api:e.api||n,...a?{choice:a}:{}})}catch(r){return{status:"error",message:un(r,"auto.failed")}}}function CF(e,n){if(n.status!=="matched")return{...e,auto:n};const{fields:a,...r}=n,o=e.model.name&&e.model.name!==e.model.id;return{...e,model:{...e.model,...a,name:o?e.model.name:n.source.name||e.model.id},auto:r}}const A6=e=>`${e.provider} / ${e.modelId}`;function e4({items:e,onPick:n}){return l.jsx("div",{className:"jv-auto-sources",children:e.map(a=>l.jsxs("button",{type:"button",onClick:()=>n(a),children:[l.jsx("span",{className:"jv-mono",children:A6(a)}),a.official&&l.jsx("em",{children:y("auto.official")}),l.jsx("small",{children:a.api})]},`${a.provider}/${a.modelId}`))})}function NF({state:e,modelId:n,onRun:a}){const r=c=>a({provider:c.provider,modelId:c.modelId}),o=(e==null?void 0:e.status)==="pending";return l.jsxs("div",{className:"jv-autoconfig","aria-live":"polite",children:[l.jsxs(Ee,{type:"button",variant:"outline",size:"sm",disabled:!n.trim()||o,onClick:()=>a(),children:[l.jsx(Yw,{}),y(o?"auto.pending":"auto.run")]}),e&&!o&&l.jsxs("div",{className:"jv-auto-result",children:[e.status==="matched"&&l.jsxs(l.Fragment,{children:[l.jsx("p",{children:h1("auto.matched",{source:l.jsx("strong",{className:"jv-mono",children:A6(e.source)}),note:e.reseller?y("auto.reseller"):"",suffix:y("auto.applied")})}),e.apiMismatch&&l.jsx("p",{className:"jv-auto-warn",children:y("auto.apiMismatch",{api:e.source.api})}),e.alternatives.length>0&&l.jsxs("details",{children:[l.jsx("summary",{children:y("auto.changeSource")}),l.jsx(e4,{items:e.alternatives,onPick:r})]})]}),e.status==="choose"&&l.jsxs(l.Fragment,{children:[l.jsx("p",{children:e.reason==="multiple"?y("auto.multiple"):y("auto.similar",{modelId:n})}),l.jsx(e4,{items:e.options,onPick:r})]}),e.status==="none"&&l.jsx("p",{children:y("auto.notFound")}),e.status==="error"&&l.jsx("p",{role:"alert",children:e.message})]})]})}const f0=["openai","openrouter","deepseek","zai","qwen","together","baseten","chat-template","qwen-chat-template","string-thinking","ant-ling"],_6=[["off","thinking.level.off"],["minimal","thinking.level.minimal"],["low","thinking.level.low"],["medium","thinking.level.medium"],["high","thinking.level.high"],["xhigh","thinking.level.xhigh"],["max","thinking.level.max"]],R6=e=>e==="xhigh"||e==="max";function z6(e,n){const a=e[n];return a===null||a===void 0&&R6(n)?"unsupported":a===void 0?"default":"custom"}function EF(e){return e.reasoning?_6.filter(([n])=>z6(e.thinkingLevelMap,n)!=="unsupported").map(([,n])=>y(n)):[y("thinking.level.off")]}function TF({model:e,api:n,onChange:a}){const r=e.thinkingLevelMap,o=(f,h,g)=>{const v={...r};h==="default"?delete v[f]:h==="unsupported"?v[f]=null:v[f]=g??(typeof r[f]=="string"?r[f]:f),a({thinkingLevelMap:v})},c=n==="openai-completions",d=e.thinkingFormat&&!f0.includes(e.thinkingFormat)?[...f0,e.thinkingFormat]:f0;return l.jsxs("section",{className:"jv-thinking",children:[l.jsx("h4",{children:y("thinking.title")}),l.jsxs("div",{className:"jv-field",children:[l.jsx("span",{children:y("thinking.format")}),l.jsxs(Hr,{value:e.thinkingFormat||"default",disabled:!c&&!e.thinkingFormat,onValueChange:f=>a({thinkingFormat:f==="default"?"":f}),children:[l.jsx(Fr,{"aria-label":y("thinking.format"),children:l.jsx(qr,{})}),l.jsxs(Ur,{className:"jv-select-menu",children:[l.jsx(Oi,{value:"default",children:y("thinking.protocolDefault")}),d.map(f=>l.jsx(Oi,{value:f,children:f},f))]})]}),!c&&l.jsx("small",{className:"jv-field-hint",children:y("thinking.onlyCompletions")})]}),l.jsx("div",{className:"jv-thinking-levels",role:"group","aria-label":y("thinking.levels"),children:_6.map(([f,h])=>{const g=z6(r,f);return l.jsxs("div",{className:"jv-thinking-level",children:[l.jsxs("span",{children:[y(h),l.jsx("code",{children:f})]}),l.jsxs(Hr,{value:g,onValueChange:v=>o(f,v),children:[l.jsx(Fr,{"aria-label":y("thinking.levelName",{level:y(h)}),children:l.jsx(qr,{})}),l.jsxs(Ur,{className:"jv-select-menu",children:[!R6(f)&&l.jsx(Oi,{value:"default",children:y("thinking.supportedDefault")}),l.jsx(Oi,{value:"unsupported",children:y("thinking.unsupported")}),l.jsx(Oi,{value:"custom",children:y("thinking.supportedCustom")})]})]}),g==="custom"?l.jsx(Nt,{className:"jv-mono",required:!0,"aria-label":y("thinking.levelValue",{level:y(h)}),maxLength:80,value:r[f]??"",onChange:v=>o(f,"custom",v.target.value)}):l.jsx("span",{})]},f)})}),l.jsx("p",{className:"jv-field-hint",children:y("thinking.supported",{levels:EF(e).join(" · ")})})]})}const h0=[{id:"openai-completions",label:"OpenAI · Chat Completions"},{id:"openai-responses",label:"OpenAI · Responses"},{id:"anthropic-messages",label:"Anthropic · Messages"},{id:"google-generative-ai",label:"Google · Gemini"}],MF=()=>({id:"",name:"",reasoning:!1,input:["text"],contextWindow:null,maxTokens:null,thinkingFormat:"",thinkingLevelMap:{},compat:{},cost:null});function u1({value:e,onChange:n,allowDefault:a=!1}){const r=h0.some(o=>o.id===e)||!e?h0:[...h0,{id:e,label:e}];return l.jsxs(Hr,{value:e||"default",onValueChange:o=>n(o==="default"?"":o),children:[l.jsx(Fr,{"aria-label":y("editor.protocol"),children:l.jsx(qr,{})}),l.jsxs(Ur,{className:"jv-select-menu",children:[a&&l.jsx(Oi,{value:"default",children:y("card.defaultProtocol")}),r.map(o=>l.jsx(Oi,{value:o.id,children:o.label},o.id))]})]})}const AF=e=>e>=1e6?`${+(e/1e6).toFixed(2)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e),t4={pending:"auto.pending",choose:"auto.tagChoose",none:"auto.tagNone",error:"auto.failed"};function _F({value:e,onChange:n}){const a=h=>Object.keys(h).length?JSON.stringify(h,null,2):"",[r,o]=w.useState(()=>a(e)),[c,d]=w.useState(""),f=w.useRef(null);return w.useEffect(()=>{var h;try{if(JSON.stringify(JSON.parse(r||"{}"))===JSON.stringify(e))return}catch{}o(a(e)),d(""),(h=f.current)==null||h.setCustomValidity("")},[e]),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("card.compat")}),l.jsx(Ro,{ref:f,className:"jv-mono jv-compat",rows:Math.min(10,Math.max(2,r.split(`
|
|
846
|
+
`).length)),placeholder:"{}",value:r,onChange:h=>{o(h.target.value);try{const g=JSON.parse(h.target.value||"{}");if(!g||typeof g!="object"||Array.isArray(g))throw new Error;n(g),d(""),h.currentTarget.setCustomValidity("")}catch{d(y("card.jsonObject")),h.currentTarget.setCustomValidity(y("card.jsonObject"))}}}),c&&l.jsx("small",{role:"alert",children:c})]})}function RF({draft:e,protocol:n,onChange:a,onRemove:r,onAutoconfig:o}){const{model:c}=e,[d,f]=w.useState(!c.id),[h,g]=w.useState(!1),[v,p]=w.useState(()=>(c.headerNames??[]).map(S=>({name:S,value:"",saved:!0}))),j=S=>a({...e,model:{...c,...S}}),b=(S,N)=>l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:S}),N]}),k=(S,N,C)=>{const M=v.map((T,R)=>R===S?{...T,[N]:C}:T);p(M);const E={...c.headerUpdates};!v[S].saved&&v[S].name&&v[S].name!==M[S].name&&(E[v[S].name]=null);for(const T of M)T.name&&(T.value||!T.saved)&&(E[T.name]=T.value);j({headerUpdates:E})};return l.jsxs("article",{className:`jv-model-card ${e.selected?"is-selected":""}`,children:[l.jsxs("div",{className:"jv-model-summary",children:[l.jsx("input",{type:"checkbox",checked:e.selected,"aria-label":y("card.use",{name:c.id||y("card.newModel")}),onChange:S=>a({...e,selected:S.target.checked})}),l.jsxs("button",{type:"button","aria-expanded":d,className:"jv-model-expand",onClick:()=>f(!d),children:[l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:c.name||c.id||y("card.newModel")}),l.jsx("span",{className:"jv-mono",children:c.id||y("card.enterId")})]}),l.jsxs("span",{className:"jv-chips",children:[c.contextWindow&&l.jsx("span",{className:"jv-chip",children:AF(c.contextWindow)}),c.input.includes("image")&&l.jsx("span",{className:"jv-chip",children:y("card.image")}),c.reasoning&&l.jsx("span",{className:"jv-chip",children:y("card.reasoning")}),e.auto&&t4[e.auto.status]&&l.jsx("span",{className:"jv-chip jv-chip-warn",children:y(t4[e.auto.status])})]}),l.jsx(Al,{className:"jv-expand-icon"})]}),l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-model-remove","aria-label":y("card.remove",{name:c.id||y("card.newModel")}),onClick:r,children:l.jsx(of,{})})]}),d&&l.jsxs("div",{className:"jv-model-fields",children:[l.jsxs("div",{className:"jv-field-grid",children:[b(y("card.modelId"),l.jsx(Nt,{className:"jv-mono",required:!0,value:c.id,onChange:S=>j({id:S.target.value}),placeholder:"model-id"})),b(y("card.modelName"),l.jsx(Nt,{value:c.name,onChange:S=>j({name:S.target.value}),placeholder:y("card.optional")}))]}),l.jsx(NF,{state:e.auto,modelId:c.id,onRun:o}),l.jsxs("section",{children:[l.jsx("h4",{children:y("card.capabilities")}),l.jsxs("div",{className:"flex flex-wrap gap-5",children:[l.jsxs("label",{className:"jarvy-model-check",children:[l.jsx("input",{type:"checkbox",checked:c.reasoning,onChange:S=>j({reasoning:S.target.checked})}),y("card.reasoningThinking")]}),l.jsxs("label",{className:"jarvy-model-check",children:[l.jsx("input",{type:"checkbox",checked:c.input.includes("image"),onChange:S=>j({input:S.target.checked?["text","image"]:["text"]})}),y("card.imageInput")]})]})]}),c.reasoning&&l.jsx(TF,{model:c,api:c.api||n,onChange:j}),l.jsxs("section",{children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h4",{children:y("card.specs")}),l.jsx(Ee,{type:"button",variant:"link",size:"sm",onClick:()=>g(!h),children:y(h?"card.hidePrices":"card.editPrices")})]}),l.jsxs("div",{className:"jv-field-grid",children:[b(y("card.context"),l.jsx(Nt,{type:"number",min:1,value:c.contextWindow??"",placeholder:y("card.notProvided"),onChange:S=>j({contextWindow:S.target.value?Number(S.target.value):null})})),b(y("card.maxOutput"),l.jsx(Nt,{type:"number",min:1,value:c.maxTokens??"",placeholder:y("card.notProvided"),onChange:S=>j({maxTokens:S.target.value?Number(S.target.value):null})}))]}),l.jsx("h4",{className:"jv-cost-title",children:y("card.costTitle")}),l.jsx("div",{className:"jv-costs",children:[["input","card.costInput"],["output","card.costOutput"],["cacheRead","card.costCacheRead"],["cacheWrite","card.costCacheWrite"]].map(([S,N])=>{var C,M;return l.jsxs("div",{children:[l.jsx(M6,{children:y(N)}),h?l.jsx(Nt,{type:"number",step:"any",min:0,value:((C=c.cost)==null?void 0:C[S])??"",onChange:E=>j({cost:{input:0,output:0,cacheRead:0,cacheWrite:0,...c.cost,[S]:Number(E.target.value)}})}):l.jsx("span",{children:((M=c.cost)==null?void 0:M[S])??y("card.notProvided")})]},S)})})]}),l.jsxs("details",{className:"jv-advanced",children:[l.jsxs("summary",{children:[y("card.advanced"),l.jsx(Al,{className:"size-4"})]}),l.jsxs("div",{className:"jv-advanced-fields",children:[l.jsxs("div",{className:"jv-field",children:[l.jsx("span",{children:y("card.apiOverride")}),l.jsx(u1,{allowDefault:!0,value:c.api??"",onChange:S=>j({api:S,baseUrl:void 0})})]}),l.jsxs("div",{className:"jv-field",children:[l.jsx("span",{children:y("card.headers")}),v.map((S,N)=>l.jsxs("div",{className:"jv-header-row",children:[l.jsx(Nt,{className:"jv-mono","aria-label":"Header Name",placeholder:"Header-Name",readOnly:S.saved,value:S.name,onChange:C=>k(N,"name",C.target.value)}),l.jsx(Nt,{"aria-label":"Header Value",type:"password",autoComplete:"off",placeholder:S.saved?y("card.headerSaved"):"value",value:S.value,onChange:C=>k(N,"value",C.target.value)}),l.jsx(Ee,{type:"button",size:"icon-sm",variant:"ghost","aria-label":y("card.removeHeader"),onClick:()=>{p(v.filter((C,M)=>M!==N)),S.name&&j({headerUpdates:{...c.headerUpdates,[S.name]:null}})},children:l.jsx(of,{})})]},N)),l.jsxs(Ee,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:()=>p([...v,{name:"",value:"",saved:!1}]),children:[l.jsx(Br,{}),y("card.addHeader")]})]}),l.jsx(_F,{value:c.compat,onChange:S=>j({compat:S})})]})]})]})]})}let zF=0;const Xd=(e,n,a=!1)=>({key:`draft-${++zF}`,model:e,selected:n,...a?{originalId:e.id}:{}});function OF({connection:e,preset:n,defaultName:a,saved:r=!1,onBack:o,onSaved:c,onConnected:d,onChanged:f}){const h=e?e.kind==="custom":(n==null?void 0:n.id)==="custom",g=(e==null?void 0:e.authType)??n.authType,[v,p]=w.useState(e?h?e.providerName:e.displayName:h?"":a),[j,b]=w.useState((e==null?void 0:e.baseUrl)??""),[k,S]=w.useState((e==null?void 0:e.api)??n.api),[N,C]=w.useState(""),[M,E]=w.useState(()=>((e==null?void 0:e.models)??[]).map(re=>Xd(re,!0,!0))),[T,R]=w.useState([]),[_,z]=w.useState(""),{busy:P,error:H,setError:O,run:I}=On(),[$,Q]=w.useState(!1),[Y,q]=w.useState(r?y("editor.saved"):""),[K,V]=w.useState(null),X=w.useRef(e==null?void 0:e.id);function Z(re){E(Ce=>{const Ve=new Set(Ce.map(He=>He.model.id));return[...Ce,...re.filter(He=>!Ve.has(He.id)).map(He=>Xd(He,!1))]})}w.useEffect(()=>{if(h)return;let re=!0;return Q(!0),(e?he.modelCatalog(e.id):he.providerModels(n.id)).then(Ve=>{if(!re)return;const He=new Set(Ve.models.map(Ze=>Ze.id));e!=null&&e.configured&&E(Ze=>Ze.filter(Fe=>Fe.selected||Fe.originalId!==void 0||He.has(Fe.model.id))),Z(Ve.models)}).catch(Ve=>{re&&O(un(Ve,"editor.fetchFailed"))}).finally(()=>{re&&Q(!1)}),()=>{re=!1}},[e==null?void 0:e.id,e==null?void 0:e.configured,n==null?void 0:n.id,h]);async function D(){Q(!0),O(""),q("");try{const re=await he.discoverModels({connectionId:X.current,baseUrl:j,api:k,...N.trim()?{apiKey:N}:{}});Z(re.models),q(re.models.length?y("editor.fetched",{count:re.models.length}):y("editor.noneReturned"))}catch(re){O(un(re,"editor.fetchFailed"))}finally{Q(!1)}}async function se(re,Ce){const Ve=M.filter(Ze=>re.includes(Ze.key)&&Ze.model.id.trim());if(!Ve.length)return;O(""),q(""),E(Ze=>Ze.map(Fe=>Ve.some(Ke=>Ke.key===Fe.key)?{...Fe,auto:{status:"pending"}}:Fe));const He={matched:0,choose:0,none:0,error:0};for(const Ze of Ve){const Fe=await SF(Ze.model,k,Ce);He[Fe.status]++,E(Ke=>Ke.map(gt=>gt.key===Ze.key?CF(gt,Fe):gt))}Ve.length>1&&q(y("editor.autoSummary",{parts:[y("editor.autoMatched",{count:He.matched}),He.choose&&y("editor.autoChoose",{count:He.choose}),He.none&&y("editor.autoNone",{count:He.none}),He.error&&y("editor.autoFailed",{count:He.error})].filter(Boolean).join(y("common.listSeparator"))}))}async function ne(){if(!X.current){const re=await he.createModelConnection({providerName:n.id,displayName:v,kind:"builtin",authType:g,baseUrl:j,api:k});X.current=re.id}return await d(X.current),X.current}async function B(re){re.preventDefault(),q(""),await I("save",async()=>{let Ce;X.current?(Ce=await he.updateModelConnection(X.current,{displayName:v,...h?{providerName:v}:{},baseUrl:j,api:k}),h&&N.trim()&&await he.saveModelCredential(Ce.id,N)):(Ce=await he.createModelConnection({providerName:h?v:n.id,displayName:v,kind:h?"custom":"builtin",authType:g,baseUrl:j,api:k,...h&&N.trim()?{apiKey:N}:{}}),X.current=Ce.id);for(const Ve of M)Ve.selected&&await he.saveConnectionModel(Ce.id,Ve.model,Ve.originalId);for(const Ve of new Set([...T,...M.filter(He=>He.originalId&&!He.selected).map(He=>He.originalId)]))await he.deleteConnectionModel(Ce.id,Ve);C(""),await c(Ce.id),q(y("editor.saved"))},"editor.saveFailed")}async function F(){q(""),await I("reset",async()=>V(await he.modelResetPlan(e.id)),"editor.resetFailed")}async function ee(){q(""),await I("reset",async()=>{const Ce=await he.resetModelConnection(e.id);V(null),R([]),b(Ce.baseUrl),S(Ce.api),E(Ce.models.map(Ve=>Xd(Ve,!0,!0))),Z((await he.modelCatalog(Ce.id)).models),await f()},"editor.resetFailed")&&q(y("editor.resetDone"))}async function W(){!e||!confirm(y("editor.confirmDelete",{name:e.displayName}))||await I("delete",async()=>{await he.deleteModelConnection(e.id),await f(),o()},"editor.deleteFailed")}const de=M.filter(re=>`${re.model.id} ${re.model.name}`.toLowerCase().includes(_.toLowerCase())),oe=M.filter(re=>re.selected).length,be=h?(e==null?void 0:e.displayName)??y("group.custom"):(e==null?void 0:e.displayName)??n.name,we=e?N6(e):null,ve=M.some(re=>{var Ce;return((Ce=re.auto)==null?void 0:Ce.status)==="pending"});return l.jsxs("form",{className:"jv-editor",onChange:()=>q(""),onSubmit:re=>void B(re),children:[l.jsxs("header",{className:"jv-editor-header",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-back",disabled:P,onClick:o,"aria-label":y("editor.back"),children:l.jsx(m1,{})}),l.jsx(Ag,{name:be,provider:e?e.kind==="builtin"?e.providerName:void 0:n==null?void 0:n.id}),l.jsxs("div",{className:"jv-row-text",children:[l.jsx("strong",{children:be}),l.jsx("span",{children:h?"OpenAI / Anthropic compatible":y(g==="oauth"?"group.subscription":"group.apiKey")})]}),we&&l.jsx("span",{className:"jv-status","data-ok":we.ok||void 0,children:we.label}),e&&l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-danger-icon",disabled:P,onClick:()=>void W(),"aria-label":y("editor.delete"),children:l.jsx(of,{})})]}),l.jsxs("div",{className:"jv-editor-scroll",children:[l.jsxs("section",{className:"jv-section","aria-label":y("editor.connection"),children:[l.jsx("h3",{className:"jv-section-title",children:y("editor.connection")}),l.jsx("div",{className:"jv-panel",children:h?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"jv-field-grid",children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("editor.providerName")}),l.jsx(Nt,{className:"jv-mono",required:!0,maxLength:80,"aria-label":y("editor.providerName"),placeholder:"my-provider",value:v,onChange:re=>p(re.target.value)})]}),l.jsxs("div",{className:"jv-field",children:[l.jsx("span",{children:y("editor.protocol")}),l.jsx(u1,{value:k,onChange:S})]})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("editor.url")}),l.jsx(Nt,{required:!0,type:"url","aria-label":y("editor.url"),value:j,placeholder:"https://api.example.com/v1",onChange:re=>b(re.target.value)})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("editor.key")}),l.jsx(Nt,{type:"password",autoComplete:"new-password","aria-label":y("editor.key"),placeholder:y(e!=null&&e.configured?"editor.keySaved":"editor.keyPlaceholder"),value:N,onChange:re=>C(re.target.value)})]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("editor.name")}),l.jsx(Nt,{required:!0,maxLength:100,"aria-label":y("editor.name"),value:v,onChange:re=>p(re.target.value)})]}),l.jsx(kF,{connection:e,providerName:(e==null?void 0:e.providerName)??n.id,authType:g,ensureConnection:ne,onChanged:f}),l.jsxs("details",{className:"jv-advanced",children:[l.jsxs("summary",{children:[l.jsx(Al,{}),y("editor.settings")]}),l.jsxs("div",{className:"jv-advanced-fields",children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("editor.url")}),l.jsx(Nt,{className:"jv-mono",value:j,placeholder:y("editor.defaultUrl"),onChange:re=>b(re.target.value)})]}),l.jsxs("div",{className:"jv-field",children:[l.jsx("span",{children:"API Protocol"}),l.jsx(u1,{value:k,onChange:S})]})]})]})]})})]}),l.jsxs("section",{className:"jv-section","aria-label":y("editor.models"),children:[l.jsxs("div",{className:"jv-section-head",children:[l.jsxs("h3",{className:"jv-section-title",children:[y("settings.models")," ",l.jsx("span",{children:y("editor.selected",{selected:oe,total:M.length})})]}),l.jsxs("div",{className:"jv-section-actions",children:[h&&l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:P||$||!j.trim()||!(N.trim()||e!=null&&e.configured),onClick:()=>void D(),children:[l.jsx(g1,{}),y($?"editor.fetching":"editor.fetch")]}),oe>0&&l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:P||ve,onClick:()=>void se(M.filter(re=>re.selected).map(re=>re.key)),children:[l.jsx(Yw,{}),y("editor.autoSelected")]}),l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>E([...M,Xd(MF(),!0)]),children:[l.jsx(Br,{}),y("editor.addManually")]}),e&&!h&&l.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:P||$||!!K,onClick:()=>void F(),children:[l.jsx(Iw,{}),y("editor.reset")]})]})]}),K&&l.jsx(DF,{plan:K,busy:P,onCancel:()=>V(null),onConfirm:()=>void ee()}),M.length>6&&l.jsxs("div",{className:"jv-models-filter",children:[l.jsxs("label",{className:"jv-search",children:[l.jsx(_s,{}),l.jsx("input",{"aria-label":y("editor.filter"),placeholder:y("editor.filterPlaceholder"),value:_,onChange:re=>z(re.target.value)})]}),l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>E(re=>re.map(Ce=>de.includes(Ce)?{...Ce,selected:!0}:Ce)),children:y("editor.selectVisible")})]}),$&&!h&&l.jsx("p",{role:"status",className:"jv-hint",children:y("editor.loadingCatalog")}),l.jsx("div",{className:"jv-model-cards",children:de.map(re=>l.jsx(RF,{draft:re,protocol:k,onAutoconfig:Ce=>void se([re.key],Ce),onChange:Ce=>E(Ve=>Ve.map(He=>He.key===re.key?Ce:He)),onRemove:()=>{re.originalId&&R(Ce=>[...Ce,re.originalId]),E(Ce=>Ce.filter(Ve=>Ve.key!==re.key))}},re.key))}),!$&&!M.length&&l.jsxs("div",{className:"jv-empty",children:[l.jsx("strong",{children:y("editor.empty")}),l.jsx("span",{children:y(h?"editor.emptyCustom":"editor.emptyBuiltin")})]})]})]}),l.jsxs("footer",{className:"jv-editor-footer",children:[l.jsx("div",{"aria-live":"polite",children:H?l.jsx("p",{role:"alert",children:H}):Y?l.jsx("p",{role:"status",children:Y}):null}),l.jsx(Ee,{type:"submit",className:"jv-primary",disabled:P||$||ve,children:y(P?"editor.saving":"editor.save")})]})]})}function DF({plan:e,busy:n,onCancel:a,onConfirm:r}){const o=[...new Set(e.removed.flatMap(d=>d.bots))],c=y("common.listSeparator");return l.jsxs("div",{className:"jv-reset-confirm",role:"group","aria-label":y("editor.resetTitle"),children:[l.jsx("strong",{children:y("editor.resetTitle")}),e.reset.length>0&&l.jsx("p",{children:y("editor.resetModels",{count:e.reset.length})}),e.removed.length>0&&l.jsx("p",{children:y("editor.resetRemoves",{count:e.removed.length,names:e.removed.map(d=>d.name||d.id).join(c)})}),o.length>0&&l.jsx("p",{className:"jv-reset-bots",children:y("editor.resetBots",{count:o.length,bots:o.join(c)})}),l.jsx("p",{children:y("editor.resetKeeps")}),l.jsxs("div",{className:"jv-reset-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:a,children:y("common.cancel")}),l.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:n,onClick:r,children:y("editor.resetConfirm")})]})]})}function LF({connections:e,onChanged:n}){const[a,r]=w.useState("list"),[o,c]=w.useState(),[d,f]=w.useState(),[h,g]=w.useState(0),v=()=>{r("list"),f(void 0),c(void 0),g(0)},p=b=>T6({authType:b.authType,custom:b.kind==="custom"});let j=(o==null?void 0:o.name)??"";if(o){let b=2;for(;e.some(k=>k.displayName===j);)j=`${o.name} ${b++}`}return a==="choose"?l.jsx(bF,{onBack:v,onSelect:b=>{c(b),f(void 0),r("editor")}}):a==="editor"?l.jsx(OF,{connection:e.find(b=>b.id===d),preset:o,defaultName:j,saved:h>0,onBack:v,onChanged:n,onConnected:async b=>{await n(),f(b),c(void 0)},onSaved:async b=>{await n(),f(b),c(void 0),g(k=>k+1)}},h):l.jsxs("div",{className:"jv-page",children:[l.jsxs("header",{className:"jv-page-header",children:[l.jsx("h2",{children:y("settings.models")}),l.jsxs(Ee,{className:"jv-primary",onClick:()=>r("choose"),children:[l.jsx(Br,{}),y("models.add")]})]}),!e.length&&l.jsx("div",{className:"jv-empty",children:l.jsx("strong",{children:y("models.empty")})}),E6.filter(b=>e.some(k=>p(k)===b.id)).map(({id:b,label:k})=>l.jsxs("section",{className:"jv-section","aria-label":y(k),children:[l.jsx("h3",{className:"jv-section-title",children:y(k)}),l.jsx("div",{className:"jv-list",children:e.filter(S=>p(S)===b).map(S=>{const N=N6(S);return l.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>{f(S.id),c(void 0),r("editor")},children:[l.jsx(Ag,{name:S.displayName,provider:S.kind==="builtin"?S.providerName:void 0}),l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:S.displayName}),l.jsx("span",{children:S.models.length?y("models.count",{count:S.models.length}):y("models.none")})]}),l.jsx("span",{className:"jv-status","data-ok":N.ok||void 0,children:N.label}),l.jsx(As,{className:"jv-row-chevron"})]},S.id)})})]},b))]})}function BF({info:e,onSaved:n}){const[a,r]=w.useState(String(e.ports.from)),[o,c]=w.useState(String(e.ports.to)),[d,f]=w.useState(null),[h,g]=w.useState(!1),v=a!==String(e.ports.from)||o!==String(e.ports.to),p=async j=>{j.preventDefault(),g(!0),f(null);try{const b=await he.setPortRange({from:Number(a),to:Number(o)});n(b),r(String(b.ports.from)),c(String(b.ports.to)),f({error:!1,text:y("ports.rangeSaved")})}catch(b){f({error:!0,text:un(b)})}finally{g(!1)}};return l.jsxs("section",{className:"jv-section","aria-labelledby":"network-ports",children:[l.jsx("h3",{id:"network-ports",className:"jv-section-title",children:y("ports.range")}),l.jsxs("form",{className:"jv-panel jv-conn-ports",onSubmit:j=>void p(j),children:[l.jsxs("div",{className:"jv-conn-range",children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("ports.rangeFrom")}),l.jsx(Nt,{type:"number",inputMode:"numeric",min:1024,max:65535,required:!0,value:a,onChange:j=>{r(j.target.value),f(null)}})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("ports.rangeTo")}),l.jsx(Nt,{type:"number",inputMode:"numeric",min:1024,max:65535,required:!0,value:o,onChange:j=>{c(j.target.value),f(null)}})]})]}),l.jsx("small",{className:"jv-hint",children:y("ports.rangeHint")}),l.jsxs("div",{className:"jv-form-footer",children:[d?l.jsx("p",{className:d.error?"jv-note-error":"jv-hint",role:d.error?"alert":"status",children:d.text}):l.jsx("span",{}),l.jsx(Ee,{type:"submit",className:"jv-primary",disabled:h||!v,children:y("common.save")})]})]})]})}function IF(){var j;const[e,n]=w.useState(null),[a,r]=w.useState(null),[o,c]=w.useState(!1),[d,f]=w.useState(!1),[h,g]=w.useState(!1);w.useEffect(()=>{he.connection().then(n).catch(()=>g(!0))},[]);const v=b=>l.jsxs("div",{className:"jv-page",children:[l.jsx("header",{className:"jv-page-header",children:l.jsx("h2",{children:y("settings.network")})}),l.jsxs("section",{className:"jv-section","aria-labelledby":"network-lan",children:[l.jsx("h3",{id:"network-lan",className:"jv-section-title",children:y("connection.lan")}),b]}),h&&l.jsx("p",{className:"jv-note-error",role:"alert",children:y("common.failed")}),e&&l.jsx(BF,{info:e,onSaved:n})]});if(!e)return v(null);if(!e.https)return v(l.jsx("div",{className:"jv-list",children:l.jsx("div",{className:"jv-list-row jv-static-row jv-conn-local",children:l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:y("connection.localOnly")}),l.jsx("span",{children:h1("connection.localOnlyHint",{flag:l.jsx("code",{children:"--host 0.0.0.0"})})})]})})}));const p=async()=>{f(!0),g(!1);try{n(await he.setConnection(!e.allowHttp))}catch{g(!0)}finally{f(!1)}};return v(l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"jv-list",role:"group","aria-label":y("connection.addresses"),children:e.addresses.map(b=>l.jsxs("div",{className:"jv-list-row jv-static-row",children:[l.jsx("span",{className:"jv-row-text",children:l.jsx("code",{children:b})}),l.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":y(a===b?"ui.copied":"connection.copy"),onClick:()=>void Ho(b).then(k=>r(k?b:null)),children:a===b?l.jsx(Li,{}):l.jsx(Wc,{})})]},b))}),l.jsxs("div",{className:"jv-list jv-conn-cert",children:[l.jsxs("div",{className:"jv-list-row jv-static-row jv-conn-root",children:[l.jsx("span",{className:"jv-row-text",children:l.jsx("strong",{children:y("connection.root")})}),l.jsx(Ee,{asChild:!0,variant:"outline",size:"sm",children:l.jsxs("a",{href:"/api/connection/root.crt",children:[l.jsx(g1,{}),y("connection.download")]})})]}),l.jsxs("div",{className:"jv-list-row jv-static-row jv-conn-print",children:[l.jsx("span",{children:y("connection.fingerprint")}),l.jsx("code",{children:(j=e.fingerprint)==null?void 0:j.replaceAll(":",":")}),e.fingerprintSha1&&l.jsxs(l.Fragment,{children:[l.jsx("span",{children:y("connection.fingerprintSha1")}),l.jsx("code",{children:e.fingerprintSha1.replaceAll(":",":")})]})]}),l.jsxs("button",{type:"button",className:"jv-list-row jv-conn-disclosure","aria-expanded":o,onClick:()=>c(!o),children:[l.jsx("span",{className:"jv-row-text",children:l.jsx("strong",{children:y("connection.howTo")})}),l.jsx(Al,{"aria-hidden":"true"})]}),o&&l.jsx("div",{className:"jv-list-row jv-static-row jv-conn-steps",children:l.jsxs("ul",{children:[l.jsx("li",{children:y("connection.howMac")}),l.jsx("li",{children:y("connection.howWindows")}),l.jsx("li",{children:y("connection.howIos")}),l.jsx("li",{children:y("connection.howAndroid")}),l.jsx("li",{children:y("connection.howRestart")})]})})]}),l.jsx("div",{className:"jv-list",children:l.jsxs("button",{type:"button",role:"switch","aria-checked":e.allowHttp,disabled:d,className:"jv-list-row jv-choice-row jv-conn-http",onClick:()=>void p(),children:[l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:y("connection.allowHttp")}),l.jsx("span",{children:y("connection.allowHttpHint")})]}),l.jsx("span",{className:"jv-conn-switch","aria-hidden":"true"})]})})]}))}const n4=e=>Si(e,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function PF({secret:e,bots:n,open:a,onToggle:r,onChanged:o,onDeleted:c}){const[d,f]=w.useState(null),[h,g]=w.useState(e.description),[v,p]=w.useState(""),[j,b]=w.useState(!1),[k,S]=w.useState(!1),{busy:N,error:C,run:M}=On();w.useEffect(()=>{a&&he.secretUses(e.id).then(z=>f(z.uses)).catch(()=>f([]))},[a,e.id,e.uses]);const E=z=>{z.preventDefault(),M("save",async()=>{o(await he.updateSecret(e.id,{description:h.trim(),...v?{value:v}:{}})),p(""),b(!1)})},T=new Set(e.grants.map(z=>z.botId)),R=z=>{var P;return((P=n.find(H=>H.id===z))==null?void 0:P.name)??y("secrets.deletedBot")},_=h.trim()!==e.description||!!v;return l.jsxs(ES,{id:`secret-${e.id}`,open:a,onToggle:r,busy:N,error:C,text:l.jsxs(l.Fragment,{children:[l.jsx("strong",{className:"jv-mono",children:e.name}),l.jsx("span",{children:e.description||y("secrets.noDescription")})]}),meta:e.readable?l.jsx("span",{className:"jv-row-meta",children:T.size?y("secrets.grantCount",{count:T.size}):y("secrets.notGranted")}):l.jsx("span",{className:"jv-status","data-busy":"",children:y("secrets.unreadable")}),remove:y("secrets.delete"),confirming:k?{title:y("secrets.deleteTitle",{name:e.name}),body:y("secrets.deleteBody"),confirm:y("secrets.deleteConfirm")}:null,onAskRemove:()=>S(!0),onCancel:()=>S(!1),onConfirm:()=>void M("delete",async()=>{await he.deleteSecret(e.id),c()}),children:[l.jsxs("p",{className:"jv-secret-meta",children:[y("secrets.fingerprint")," ",l.jsx("code",{children:e.fingerprint})," · ",y("secrets.updated",{time:n4(e.updatedAt)})," · ",e.uses?y("secrets.usedCount",{count:e.uses}):y("secrets.neverUsed")]}),!e.readable&&l.jsx("p",{className:"jv-note-error",children:y("secrets.unreadableHint")}),l.jsx(iP,{secret:e,bots:n,onChanged:o}),l.jsxs("form",{className:"jv-secret-edit",onSubmit:E,"aria-label":y("secrets.edit"),children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("secrets.description")}),l.jsx(Nt,{maxLength:200,placeholder:y("secrets.descriptionPlaceholder"),value:h,onChange:z=>g(z.target.value)})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("secrets.newValue")}),l.jsx(Qf,{value:v,visible:j,onChange:p,onVisible:b,placeholder:y("secrets.newValuePlaceholder")})]}),l.jsx("div",{className:"jv-secret-actions",children:l.jsx(Ee,{type:"submit",variant:"outline",size:"sm",disabled:N||!_,children:y("common.save")})})]}),l.jsx("h4",{className:"jv-secret-heading",children:y("secrets.uses")}),d&&d.length?l.jsx("ul",{className:"jv-secret-uses",children:d.map(z=>l.jsxs("li",{children:[l.jsxs("span",{children:[R(z.botId)," · ",n4(z.at)," · ",y(z.how==="ssh_sign"?"secrets.useSsh":"secrets.useCommand")]}),z.detail&&l.jsx("code",{children:z.detail})]},z.id))}):l.jsx("p",{className:"jv-hint",children:y("secrets.noUses")})]})}const i4=(e,n)=>e.name.localeCompare(n.name);function HF(){const[e,n]=w.useState(null),[a,r]=w.useState(""),[o,c]=w.useState([]),[d,f]=w.useState(!1),[h,g]=w.useState(null),[v,p]=w.useState(null);w.useEffect(()=>{he.secrets().then(b=>{n([...b.secrets].sort(i4)),r(b.keyLocation)}).catch(b=>p(un(b))),he.bots().then(b=>c(b.bots)).catch(()=>c([]))},[]);const j=b=>n(k=>k&&k.map(S=>S.id===b.id?b:S));return l.jsxs("div",{className:"jv-page",children:[l.jsxs("header",{className:"jv-page-header",children:[l.jsx("h2",{children:y("settings.secrets")}),!d&&l.jsxs(Ee,{className:"jv-primary",onClick:()=>f(!0),children:[l.jsx(Br,{}),y("secrets.add")]})]}),d&&l.jsx(qF,{onCancel:()=>f(!1),onSaved:b=>{f(!1),n(k=>[...k??[],b].sort(i4)),g(b.id)}}),e&&!e.length&&!d&&l.jsx("div",{className:"jv-empty",children:l.jsx("strong",{children:y("secrets.empty")})}),e&&e.length>0&&l.jsx("section",{className:"jv-section","aria-label":y("settings.secrets"),children:l.jsx("div",{className:"jv-list",children:e.map(b=>l.jsx(PF,{secret:b,bots:o,open:h===b.id,onToggle:()=>g(h===b.id?null:b.id),onChanged:j,onDeleted:()=>{g(null),n(k=>k&&k.filter(S=>S.id!==b.id))}},b.id))})}),a&&l.jsxs("section",{className:"jv-section","aria-labelledby":"secrets-key",children:[l.jsx("h3",{id:"secrets-key",className:"jv-section-title",children:y("secrets.masterKey")}),l.jsx("div",{className:"jv-list",children:l.jsx("div",{className:"jv-list-row jv-static-row jv-secret-key",children:l.jsxs("span",{className:"jv-row-text",children:[l.jsx("strong",{children:y("secrets.keyFile")}),l.jsx("code",{children:a}),l.jsx("span",{children:y("secrets.keyHint")})]})})})]}),v&&l.jsx("p",{className:"jv-note-error",role:"alert",children:v})]})}function qF({onCancel:e,onSaved:n}){const[a,r]=w.useState(""),[o,c]=w.useState(""),[d,f]=w.useState(""),[h,g]=w.useState(!1),{busy:v,error:p,run:j}=On(),b=async k=>{k.preventDefault(),await j("add",async()=>n(await he.createSecret({name:a.trim(),description:o.trim(),value:d})))};return l.jsxs("form",{className:"jv-panel jv-secret-form",onSubmit:k=>void b(k),"aria-label":y("secrets.add"),children:[l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("secrets.name")}),l.jsx(Nt,{className:"jv-mono",required:!0,autoFocus:!0,maxLength:64,placeholder:"GITHUB_TOKEN",value:a,onChange:k=>r(k.target.value.toUpperCase())})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("secrets.description")}),l.jsx(Nt,{maxLength:200,placeholder:y("secrets.descriptionPlaceholder"),value:o,onChange:k=>c(k.target.value)})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("secrets.value")}),l.jsx(Qf,{value:d,visible:h,onChange:f,onVisible:g,required:!0})]}),p&&l.jsx("p",{className:"jv-note-error",role:"alert",children:p}),l.jsxs("div",{className:"jv-secret-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",onClick:e,children:y("common.cancel")}),l.jsx(Ee,{type:"submit",className:"jv-primary",disabled:v||!a.trim()||!d,children:y("common.save")})]})]})}const a4=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"]];function FF({bots:e}){const{range:n,setRange:a,data:r,error:o,reload:c}=sS(lS.overview,"all");return l.jsxs("div",{className:"jv-page jv-usage-page",children:[l.jsx("header",{className:"jv-page-header",children:l.jsx("h2",{children:y("settings.usage")})}),l.jsxs("div",{className:"jv-usage",children:[l.jsx(oS,{range:n,setRange:a,busy:!r&&!o,reload:c}),l.jsx(cS,{loading:!r,error:o,empty:!(r!=null&&r.models.length),reload:c}),r&&r.models.length>0&&!o&&l.jsxs(l.Fragment,{children:[l.jsxs("section",{className:"jv-section","aria-labelledby":"usage-models",children:[l.jsx("h3",{id:"usage-models",className:"jv-section-title",children:y("usage.byModel")}),l.jsx(uS,{models:r.models,note:!1})]}),l.jsxs("section",{className:"jv-section","aria-labelledby":"usage-bots",children:[l.jsx("h3",{id:"usage-bots",className:"jv-section-title",children:y("usage.byBot")}),l.jsx(UF,{rows:r.bots,bots:e})]}),r.models.some(d=>d.cost===null)&&r.models.some(d=>d.cost!==null)&&l.jsx("p",{className:"jv-usage-note",children:y("usage.noteCosts")})]})]})]})}function UF({rows:e,bots:n}){return l.jsxs("table",{className:"jv-usage-table jv-usage-bots",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{scope:"col",children:"Bot"}),a4.map(([a,r])=>l.jsx("th",{scope:"col",children:y(r)},a)),l.jsx("th",{scope:"col",children:y("usage.cost")})]})}),l.jsx("tbody",{children:e.map(a=>{const r=n.find(o=>o.id===a.botId);return l.jsxs("tr",{children:[l.jsx("th",{scope:"row",children:l.jsxs("span",{className:"jv-usage-bot",children:[r&&l.jsx(_a,{color:r.color,mood:r.mood,size:22}),l.jsx("strong",{children:(r==null?void 0:r.name)??a.botId})]})}),a4.map(([o,c])=>l.jsx("td",{"data-label":y(c),title:Ea(a[o]),children:W0(a[o])},o)),e1(a.cost)]},a.botId)})})]})}const $F=[{id:"general",label:"settings.general",icon:oN},{id:"models",label:"settings.models",icon:E9},{id:"usage",label:"settings.usage",icon:k9},{id:"secrets",label:"settings.secrets",icon:b1},{id:"network",label:"settings.network",icon:I9},{id:"about",label:"settings.about",icon:x1}];function VF({connections:e,bots:n,onChanged:a,onClose:r,initialTab:o="general"}){const[c,d]=w.useState(o),f=w.useRef(null);return w.useEffect(()=>{var h;(h=f.current)==null||h.scrollIntoView({block:"nearest",inline:"nearest"})},[c]),l.jsx(gS,{open:!0,onOpenChange:h=>{h||r()},children:l.jsxs(vS,{className:"jv-settings-shell","aria-describedby":void 0,children:[l.jsxs("nav",{className:"jv-settings-nav","aria-label":y("settings.sections"),children:[l.jsx(yS,{className:"jv-settings-title",children:y("settings.title")}),l.jsx("div",{className:"jv-settings-tabs",children:$F.map(h=>l.jsxs("button",{type:"button",ref:c===h.id?f:void 0,className:"jv-nav-item","aria-current":c===h.id?"page":void 0,onClick:()=>d(h.id),children:[l.jsx(h.icon,{}),y(h.label)]},h.id))})]}),l.jsx("main",{className:"jv-settings-content",children:c==="general"?l.jsx(Hq,{}):c==="models"?l.jsx(LF,{connections:e,onChanged:a}):c==="usage"?l.jsx(FF,{bots:n}):c==="secrets"?l.jsx(HF,{}):c==="network"?l.jsx(IF,{}):l.jsx(Pq,{})})]})})}const r4="Jarvy";let l4=null,Qa=null,vs=null;function GF(){return document.querySelector('link[rel="icon"][type="image/png"]')}function YF(e){if(!(Qa!=null&&Qa.complete)||!Qa.naturalWidth)return null;const n=64,a=document.createElement("canvas");a.width=a.height=n;const r=a.getContext("2d");if(!r)return null;r.drawImage(Qa,0,0,n,n);const o=e>9?"9+":String(e),c=o.length>1?21:18;return r.fillStyle="#e5484d",r.beginPath(),r.arc(n-c,c,c,0,Math.PI*2),r.fill(),r.fillStyle="#fff",r.font=`bold ${o.length>1?26:30}px system-ui, sans-serif`,r.textAlign="center",r.textBaseline="middle",r.fillText(o,n-c,c+2),a.toDataURL("image/png")}function s4(e){document.title=e>0?`(${e>99?"99+":e}) ${r4}`:r4;const n=GF();if(!n)return;if(l4??(l4=n.href),vs??(vs=document.querySelector('link[rel="icon"][type="image/svg+xml"]')),e<=0){n.href=l4,vs&&!vs.isConnected&&document.head.prepend(vs);return}const a=YF(e);a&&(n.href=a,vs==null||vs.remove())}function KF(e){w.useEffect(()=>{Qa||(Qa=new Image,Qa.src="/favicon.svg"),Qa.complete?s4(e):Qa.onload=()=>s4(e)},[e])}const Qd=50;function O6({chatId:e,ready:n,scroller:a,me:r,memory:o,onError:c}){const[d,f]=w.useState([]),[h,g]=w.useState(!1),[v,p]=w.useState(!1),[j,b]=w.useState(!1),k=w.useRef(d),S=w.useRef(e),N=w.useRef(0),C=w.useRef(!1),M=w.useRef(!1),E=w.useRef(0);k.current=d,S.current=e,M.current=v;const T=w.useRef(null),R=w.useRef(!1),_=w.useRef(void 0),z=w.useRef(!0),P=w.useRef(!1),H=w.useRef(null),[O,I]=w.useState(!1),$=w.useRef(0),Q=w.useRef({bottom:!0}),Y=w.useRef(null),[q]=w.useState(()=>new w6),K=w.useRef(null),V=w.useRef(!1);w.useEffect(()=>{if(f([]),p(!1),P.current=!1,z.current=!0,E.current=0,Q.current={bottom:!0},Y.current=null,!n||!e)return;let W=!0;const de=++N.current;I(!1),$.current=0;const oe=()=>{var we;W=!1,q.release(),P.current&&!V.current&&((we=k.current[0])==null?void 0:we.chatId)===e&&o.keep(e,{messages:k.current,hasOlder:M.current,place:Q.current,seen:$.current})},be=o.take(e);return be?(R.current=!0,Y.current=be.place,$.current=be.seen,f(be.messages),p(be.hasOlder),g(!1),oe):(g(!0),he.latestMessages(e,Qd).then(we=>{!W||de!==N.current||(R.current=!0,f(we.messages),p(we.hasOlder),g(!1))}).catch(we=>{W&&(g(!1),c(we))}),oe)},[e,n]);function X(W,de){var we;if(W.chatId!==S.current)return;if(!de){f(ve=>cu(ve,W));return}const oe=k.current,be=Math.max(((we=oe.at(-1))==null?void 0:we.chatId)===W.chatId?oe.at(-1).sequence:0,E.current);if(Mg(W,be)&&!oe.some(ve=>ve.id===W.id)){Z(W.chatId).catch(c);return}E.current=Math.max(E.current,W.sequence),f(ve=>Jf(ve,W))}async function Z(W){V.current=!0;try{await D(W)}finally{V.current=!1}}async function D(W){const de=k.current[0],oe=++N.current;if(!de||de.chatId!==W){const ve=await he.latestMessages(W,Qd);S.current===W&&oe===N.current&&(R.current=!0,f(ve.messages),p(ve.hasOlder),g(!1));return}const be=de.sequence-1,we=await he.messages(W,be);S.current!==W||oe!==N.current||(f(ve=>x6(ve.filter(re=>re.chatId===W),we.messages,be)),g(!1))}async function se(){const W=k.current[0],de=a.current;if(!(!W||!M.current||C.current)){C.current=!0,b(!0);try{const oe=await he.olderMessages(W.chatId,W.sequence,Qd);if(S.current!==W.chatId)return;T.current=de?de.scrollHeight-de.scrollTop:null,f(be=>{var we;return((we=be[0])==null?void 0:we.id)===W.id?[...oe.messages,...be]:be}),p(oe.hasOlder)}catch(oe){c(oe)}finally{C.current=!1,b(!1)}}}w.useEffect(()=>{const W=a.current;if(!W)return;let de=0;const oe=()=>{cancelAnimationFrame(de),de=requestAnimationFrame(()=>{P.current&&W.clientHeight&&!q.on&&(Q.current=j6(W,160))})},be=new ResizeObserver(()=>{if(oe(),!!P.current){if(W.scrollHeight-W.clientHeight<8){re();return}z.current&&(W.scrollHeight-W.scrollTop-W.clientHeight<8||W.scrollTo({top:W.scrollHeight,behavior:"instant"}))}}),we=()=>{be.disconnect(),be.observe(W);for(const Ce of W.children)be.observe(Ce)};we();const ve=new MutationObserver(we);ve.observe(W,{childList:!0});const re=()=>{var Ce;if(!P.current){z.current=!0,I(!1);return}q.on||(z.current=W.scrollHeight-W.scrollTop-W.clientHeight<160,I(!z.current),z.current&&($.current=((Ce=k.current.at(-1))==null?void 0:Ce.sequence)??0),oe())};return re(),W.addEventListener("scroll",re,{passive:!0}),()=>{be.disconnect(),ve.disconnect(),W.removeEventListener("scroll",re),cancelAnimationFrame(de)}},[a.current,e]),w.useLayoutEffect(()=>{const W=a.current,de=d.at(-1);if(W){if(K.current){const{id:oe,passage:be}=K.current,we=W.querySelector(`[data-message="${oe}"]`);K.current=null,Y.current=null,R.current=!1,_.current=de==null?void 0:de.id,we&&(P.current=!0,z.current=!1,I(!0),jf(we,be));return}if(T.current!==null)W.scrollTo({top:W.scrollHeight-T.current,behavior:"instant"}),T.current=null;else if(Y.current&&d.length&&Sf(W,Y.current))Q.current=Y.current,q.start(W,Y.current),Y.current=null,R.current=!1,P.current=!0,z.current=!1,I(!0);else if(R.current&&d.length){Y.current=null;const oe=()=>W.scrollTo({top:W.scrollHeight,behavior:"instant"});oe(),requestAnimationFrame(oe),R.current=!1,P.current=!0,z.current=!0}else de&&de.id!==_.current&&(z.current||de.senderId===r)&&(q.release(),W.scrollTo({top:W.scrollHeight,behavior:"smooth"}));_.current=de==null?void 0:de.id,z.current&&($.current=(de==null?void 0:de.sequence)??0)}},[d]),w.useEffect(()=>{const W=a.current,de=H.current;if(!W||!de||!v||!P.current)return;const oe=new IntersectionObserver(be=>{var we;(we=be[0])!=null&&we.isIntersecting&&P.current&&se()},{root:W,rootMargin:"400px 0px 0px 0px"});return oe.observe(de),()=>oe.disconnect()},[v,d,e,h]);async function ne(W,de){var He;if(q.release(),k.current.some(Ze=>Ze.id===W)){B(W,de);return}const be=S.current,we=await he.message(W);if(we.chatId!==be)return we.chatId;const ve=++N.current,[re,Ce]=await Promise.all([he.olderMessages(we.chatId,we.sequence,Qd),he.messages(we.chatId,we.sequence-1)]);if(S.current!==we.chatId||ve!==N.current)return;const Ve=((He=Ce.messages.at(-1))==null?void 0:He.sequence)??we.sequence;K.current={id:W,passage:de},E.current=0,f(Ze=>[...re.messages,...Ce.messages,...Ze.filter(Fe=>Fe.chatId===we.chatId&&Fe.sequence>Ve)]),p(re.hasOlder)}function B(W,de){var be;q.release();const oe=(be=a.current)==null?void 0:be.querySelector(`[data-message="${W}"]`);oe&&jf(oe,de)}const F=O?d.filter(W=>W.sequence>$.current&&W.senderId!==r).length:0;return{messages:d,setMessages:f,loading:h,hasOlder:v,loadingOlder:j,refresh:Z,heard:X,top:H,away:O,unseen:F,toLatest:()=>{q.release();const W=a.current;W==null||W.scrollTo({top:W.scrollHeight,behavior:"smooth"})},toMessage:ne,cancel:()=>{N.current++}}}function XF({ready:e,selected:n,messages:a,chats:r,chatList:o,setChats:c,onError:d}){const f=r.find(h=>h.id===n);w.useEffect(()=>{const h=n,g=a.at(-1);if(!e||!h||!g||g.chatId!==h)return;const v=()=>{const p=o.current.find(j=>j.id===h);document.visibilityState!=="visible"||((p==null?void 0:p.readSequence)??0)>=g.sequence&&!(p!=null&&p.hint)&&!(p!=null&&p.alerts)||D6(c,h,g.sequence,d)};return v(),document.addEventListener("visibilitychange",v),()=>document.removeEventListener("visibilitychange",v)},[a,n,e,f==null?void 0:f.readSequence,f==null?void 0:f.alerts,f==null?void 0:f.hint])}function D6(e,n,a,r){e(o=>o.map(c=>c.id===n?{...c,readSequence:Math.max(c.readSequence,a),unread:0,mentions:0,alerts:0,atMe:!1,hint:null}:c)),he.markRead(n,a).catch(r)}const o4="jarvy-seen-failure";function QF(e,n){const a=e!=null&&e.error?`${e.botId}:${e.runId??""}:${e.error}`:null,[r,o]=w.useState(()=>localStorage.getItem(o4));return{call:a&&a!==r?"error":(e==null?void 0:e.activity)==="asking"?"ask":n!=null&&n.alerts&&(e==null?void 0:e.status)!=="running"?"reply":null,seen:()=>{a&&(localStorage.setItem(o4,a),o(a))}}}const c4={mark:"M12 5v14M12 29h0",ask:"M6.5 10a5.5 5.5 0 1 1 8.2 4.8c-1.7 1-2.7 2.1-2.7 3.9v.6M12 29h0"};function L6({call:e}){if(!e)return null;const n=e==="ask"?c4.ask:c4.mark;return l.jsx("span",{className:"jv-call","data-call":e,"aria-hidden":"true",children:l.jsxs("svg",{viewBox:"0 0 24 36",children:[l.jsx("path",{className:"jv-call-edge",d:n}),l.jsx("path",{d:n})]})})}const u4=()=>matchMedia("(prefers-reduced-motion: reduce)").matches;function ZF({view:e,onView:n,agent:a,figure:r,call:o,asleep:c,alerts:d,username:f,accountMenu:h,onToggleAccount:g,onSettings:v,onToggleTheme:p,onLogOut:j}){const b=w.useRef(null),k=w.useRef(null),S=w.useRef(null);w.useEffect(()=>b.current&&r.live?r.stage.add(b.current,.74,!1):void 0,[r.live,!!a]),w.useEffect(()=>{if(!h)return;const C=M=>{var T,R;const E=M.target;!((T=k.current)!=null&&T.contains(E))&&!((R=S.current)!=null&&R.contains(E))&&g(!1)};return document.addEventListener("pointerdown",C),()=>document.removeEventListener("pointerdown",C)},[h]);const N=r.stage.persona;return l.jsxs(l.Fragment,{children:[l.jsxs("nav",{className:"jv-rail","aria-label":y("rail.label"),children:[l.jsxs("div",{className:"jv-rail-top",children:[a&&l.jsxs("button",{type:"button",className:"jv-rail-item jv-rail-agent","data-still":!r.live||void 0,"aria-current":e==="home"?"page":void 0,title:a.name,onPointerEnter:C=>{C.pointerType==="mouse"&&(r.stage.near=!0,!u4()&&!N.playing&&N.play("look",performance.now()))},onPointerLeave:()=>{r.stage.near=!1},onClick:()=>{u4()||N.play("hop",performance.now()),n("home")},children:[r.live?l.jsx("canvas",{ref:b,"aria-hidden":"true"}):l.jsx(_a,{color:a.color,mood:o==="error"?"dizzy":a.mood,size:30,crown:a.agent,asleep:c}),l.jsx(L6,{call:o}),o&&l.jsx("span",{className:"sr-only",children:y(`home.call.${o}`)}),l.jsx("span",{className:"jv-rail-label",children:a.name})]}),l.jsxs("button",{type:"button",className:"jv-rail-item","aria-current":e==="chats"?"page":void 0,title:y("rail.chats"),onClick:()=>n("chats"),children:[l.jsx(j1,{"aria-hidden":"true"}),d>0&&l.jsx("span",{className:"jv-rail-dot",role:"status","aria-label":y("sidebar.alerts",{count:d})}),l.jsx("span",{className:"jv-rail-label",children:y("rail.chats")})]}),l.jsxs("button",{type:"button",className:"jv-rail-item","aria-current":e==="envs"?"page":void 0,title:y("rail.environments"),onClick:()=>n("envs"),children:[l.jsx(Qw,{"aria-hidden":"true"}),l.jsx("span",{className:"jv-rail-label",children:y("rail.environments")})]})]}),l.jsx("button",{ref:S,type:"button",className:"jv-rail-item jv-rail-account","aria-label":y("account.menuFor",{name:f}),title:f,"aria-expanded":h,onClick:()=>g(!h),children:l.jsx("span",{className:"ui-user-avatar",children:f.slice(0,2).toUpperCase()})})]}),h&&l.jsxs("div",{ref:k,className:"ui-popover jarvy-account-menu",role:"menu","aria-label":y("account.menu"),children:[l.jsx("div",{className:"ui-menu-note ui-small",children:f}),l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:v,children:[l.jsx(Pe,{name:"gear"}),l.jsx("span",{className:"ui-menu-copy",children:y("settings.title")})]}),l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:p,children:[l.jsx(Pe,{name:"moon"}),l.jsx("span",{className:"ui-menu-copy",children:y("account.toggleTheme")})]}),l.jsx("hr",{className:"ui-menu-divider"}),l.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:j,children:[l.jsx(Pe,{name:"arrow-bracket-to-left"}),l.jsx("span",{className:"ui-menu-copy",children:y("account.signOut")})]})]})]})}const d4=()=>matchMedia("(prefers-reduced-motion: reduce)").matches,JF=".jv-dock, .jv-npc, .jv-home-cat, .ui-popover, dialog, [role=dialog]",WF=".jv-emoji-menu, .ui-popover, dialog[open], [role=dialog]";function eU({bot:e,chat:n,meId:a,members:r,drafts:o,live:c,dockRef:d,opener:f,onOpenDm:h,ensureDm:g,onRead:v,onSent:p,onPreview:j,onNotice:b,onError:k}){var se,ne;const[S,N]=w.useState(null),C=w.useRef(0),M=w.useRef(null),[E]=w.useState(()=>new b6),T=(n==null?void 0:n.id)??null,R=S==="open",_=O6({chatId:T,ready:S!==null,scroller:M,me:a,memory:E,onError:k}),{messages:z,setMessages:P}=_;Tg(c,B=>{if(B.kind==="reconnected"){S&&T&&_.refresh(T).catch(k);return}B.kind!=="chat"&&S&&_.heard(B.message,B.kind==="message")}),w.useLayoutEffect(()=>{const B=M.current;if(!B)return;const F=B.querySelectorAll(":scope > [data-message]"),ee=F[Math.max(0,F.length-2)];B.style.setProperty("--fit",ee?`${Math.ceil(B.scrollHeight-ee.offsetTop+8)}px`:"0px")},[z,R]);const H=z.at(-1);w.useEffect(()=>{if(!R||!n||!H||n.readSequence>=H.sequence&&!n.alerts)return;const B=()=>{document.visibilityState==="visible"&&v(n,H.sequence)};return B(),document.addEventListener("visibilitychange",B),()=>document.removeEventListener("visibilitychange",B)},[R,H==null?void 0:H.sequence,n==null?void 0:n.readSequence,n==null?void 0:n.alerts]);function O(){clearTimeout(C.current),E.clear(),N("open"),n||g().catch(k),setTimeout(()=>{var B,F;return(F=(B=d.current)==null?void 0:B.querySelector("textarea"))==null?void 0:F.focus({preventScroll:!0})},d4()?0:200)}f.current=O;function I(){var B,F;(F=(B=document.activeElement)==null?void 0:B.blur)==null||F.call(B),N("closing"),C.current=window.setTimeout(()=>N(null),d4()?0:320)}w.useEffect(()=>()=>clearTimeout(C.current),[]);const $=c6(o,T??""),Q=!((se=$.text)!=null&&se.trim())&&!$.files.length&&!$.quote&&!$.passages.length;w.useEffect(()=>{if(!R||!Q)return;const B=F=>{var ee,W;(W=(ee=F.target).closest)!=null&&W.call(ee,JF)||I()};return document.addEventListener("pointerdown",B),()=>document.removeEventListener("pointerdown",B)},[R,Q]);async function Y(B,F,ee,W,de){const oe=n??await g(),be=await he.send(oe.id,B,F,ee,!1,W,de);_.heard(be,!0),p(be)}const q=B=>P(F=>F.map(ee=>ee.id===B.id?{...ee,...B}:ee));async function K(B,F,ee){try{const W=await he.react(B.id,F,ee);q({...B,reactions:W.reactions})}catch(W){k(W)}}async function V(B,F){try{const ee=await he.fold(B.id,F);q({...B,folded:ee.folded})}catch(ee){k(ee)}}const X=(B,F)=>B?void _.toMessage(B,F).catch(()=>b(y("app.sourceGone"))):b(y("app.sourceGone")),Z=R?(ne=[...z].reverse().find(B=>{var F;return((F=B.question)==null?void 0:F.state)==="pending"}))==null?void 0:ne.id:void 0,D=!!e.connectionId;return l.jsxs("div",{ref:d,className:"jv-dock","data-state":S??void 0,onKeyDown:B=>{B.key==="Escape"&&R&&!B.defaultPrevented&&!document.querySelector(WF)&&(B.preventDefault(),I())},children:[l.jsx("div",{className:"jv-dock-wrap",children:l.jsxs("div",{ref:M,className:"ui-transcript jv-dock-log",role:"log","aria-label":y("home.recent"),"aria-hidden":!R,children:[_.hasOlder&&l.jsx("div",{ref:_.top,className:"jv-history-more","aria-live":"polite",children:_.loadingOlder?y("chat.loadingOlder"):""}),l.jsx(u6,{messages:z,members:r,me:a,activeQuestion:Z,bot:e,onSettled:q,onPreview:j,onQuote:B=>Ng(o,B,r),onReact:(B,F,ee)=>void K(B,F,ee),onFold:(B,F)=>void V(B,F),onJump:X,onError:k})]})}),l.jsxs("div",{className:"jv-dock-bar",children:[l.jsx("button",{type:"button",className:"jv-dock-icon",title:y("home.talk",{name:e.name}),"aria-label":y("home.talk",{name:e.name}),"aria-expanded":R,tabIndex:R?-1:0,onClick:O,children:l.jsx(j1,{"aria-hidden":"true"})}),l.jsx("div",{className:"jv-dock-input","aria-hidden":!R,inert:!R,children:n&&l.jsx(Eg,{chatId:n.id,id:"jv-dock-composer",drafts:o,scrollRef:M,disabled:!D,placeholder:D?y("chat.toBot",{name:e.name}):y("chat.pickModel"),onSend:Y,onError:k,onNotice:b,extra:l.jsx("button",{type:"button",className:"jv-dock-go",title:y("home.openDm"),"aria-label":y("home.openDm"),onClick:h,children:l.jsx(Fc,{"aria-hidden":"true"})})})})]}),n&&R&&l.jsx(Cg,{container:M,drafts:o,chatId:n.id,source:B=>z.find(F=>F.id===B),members:r,onNotice:b})]})}const tU=()=>matchMedia("(prefers-reduced-motion: reduce)").matches,nU=()=>1;function iU({bot:e,chat:n,status:a,figure:r,call:o,onSeen:c,meId:d,members:f,drafts:h,live:g,onOpenDm:v,onBotInfo:p,ensureDm:j,onRead:b,onPreview:k,onNotice:S,onError:N}){var X;const C=w.useRef(null),M=w.useRef(null),E=w.useRef(null),T=w.useRef(null),R=w.useRef(null),_=w.useRef(null),[z,P]=w.useState(),H=r.stage,O=g6(e.id,(n==null?void 0:n.id)??null,e.mood,Zf(a));Object.assign(H.input,{motion:O.motion,fast:O.fast,mood:o==="error"?"dizzy":O.mood}),f6(H.persona,O,(n==null?void 0:n.id)??null,z);const I=a!=null&&a.error?`${a.runId??""}:${a.error}`:null;w.useEffect(()=>{(I||O.shake)&&H.shake()},[I,O.shake]);const[$,Q]=w.useState(null),Y=!!I&&$===I;w.useEffect(()=>{if(!Y)return;const Z=se=>{var ne,B;(B=(ne=se.target).closest)!=null&&B.call(ne,".jv-npc, .jv-home-cat")||Q(null)},D=se=>{se.key==="Escape"&&Q(null)};return document.addEventListener("pointerdown",Z),document.addEventListener("keydown",D),()=>{document.removeEventListener("pointerdown",Z),document.removeEventListener("keydown",D)}},[Y]);const q=Y&&a&&I?{...O.view,shown:aU(I,rS(a)),done:null}:((X=O.view.shown)==null?void 0:X.icon)==="ask"&&!O.view.shown.to?{...O.view,shown:{...O.view.shown,hint:y("home.answerInDm")}}:O.view;function K(){var Z;tU()||H.persona.play("poke",performance.now()),o==="reply"?(Z=_.current)==null||Z.call(_):o==="ask"?v():o==="error"?(c(),Q(I)):O.canRecap?O.showRecap():p()}w.useEffect(()=>E.current&&r.live?H.add(E.current,.9):void 0,[r.live]),w.useLayoutEffect(()=>{const Z=new ResizeObserver(()=>{var D;return(D=R.current)==null?void 0:D.call(R)});for(const D of[C.current,T.current])D&&Z.observe(D);return()=>Z.disconnect()},[]);const V=a!=null&&a.error?"error":(a==null?void 0:a.status)==="running"?"running":!a||a.status==="stop"?"stopped":"idle";return l.jsxs("section",{ref:C,className:"jv-home","aria-label":e.name,children:[l.jsxs("div",{ref:M,className:"jv-home-figure",children:[l.jsxs("button",{type:"button",className:"jv-home-cat","data-still":!r.live||void 0,title:e.name,onClick:K,"aria-label":o?`${y(`home.call.${o}`)}, ${e.name}`:y("avatar.openInfo",{name:e.name}),children:[r.live?l.jsx("canvas",{ref:E,"aria-hidden":"true"}):l.jsx(_a,{color:e.color,mood:o==="error"?"dizzy":O.mood,size:168,crown:e.agent,asleep:O.motion==="sleep"}),o?l.jsx(L6,{call:o}):l.jsx(y6,{motion:O.motion})]}),l.jsx("h1",{className:"jv-home-name",children:e.name}),l.jsx("p",{className:"sr-only",role:"status",children:V==="idle"?"":y(V==="error"?"activity.error":V==="running"?"activity.running":"activity.stopped")})]}),l.jsx(m6,{view:q,name:e.name,cat:M,area:C,avoid:T,layout:R,facing:nU,onHint:v}),l.jsx(eU,{bot:e,chat:n,meId:d,members:f,drafts:h,live:g,dockRef:T,opener:_,onOpenDm:v,ensureDm:j,onRead:b,onSent:Z=>P(Z.id),onPreview:k,onNotice:S,onError:N})]})}const aU=(e,n)=>({id:`failure:${e}`,look:"speech",icon:"say",state:"failed",startedAt:0,endedAt:0,depth:0,title:n,line:y("home.failed",{reason:n})});function rU(e,n,a){const[r]=w.useState(()=>new d6),[o,c]=w.useState(!1);if(e){const d=Zf(n);r.color=(Ca[e.color]??Ca.gray).hex,r.crown=e.agent,Object.assign(r.input,{motion:d.motion,fast:d.fast,mood:a?"dizzy":e.mood})}return w.useEffect(()=>{if(!e)return;const d={x:-1,y:-1},f=h=>{d.x=h.clientX,d.y=h.clientY};return window.addEventListener("pointermove",f),r.onFrame=()=>{const h=r.largest();if(!h||d.x<0)return;const g=h.getBoundingClientRect(),v=g.width>100?320:220;r.input.lookX=Math.max(-1,Math.min(1,(d.x-g.left-g.width/2)/v)),r.input.lookY=Math.max(-1,Math.min(1,(d.y-g.top-g.height/2)/v))},c(r.start()),()=>{window.removeEventListener("pointermove",f),r.onFrame=null,r.stop()}},[!!e]),{stage:r,live:o}}function lU({onCancel:e,onSaved:n}){const[a,r]=w.useState(""),[o,c]=w.useState("22"),[d,f]=w.useState(""),[h,g]=w.useState(""),[v,p]=w.useState(""),[j,b]=w.useState(""),[k,S]=w.useState(null),[N,C]=w.useState(""),[M,E]=w.useState(!1),[T,R]=w.useState("password"),{busy:_,error:z,setError:P,run:H}=On(),O=kS(!!k&&T==="key"),I={host:a.trim(),port:Number(o)||22,user:d.trim()},$=q=>H("add",async()=>{try{await q()}catch(K){throw K instanceof Wa&&K.code==="ssh_key_expired"&&O.renew(),K}}),Q=q=>{q.preventDefault(),$(k?async()=>n(await he.addMachine({...I,name:h.trim(),directory:v.trim(),description:j.trim(),hostKeys:k,...T==="key"?{keyId:O.key.keyId}:{password:N}})):async()=>S(await he.scanMachine(I)))},Y=I.user&&I.host?`${I.user}@${I.host}`:"";return l.jsxs("form",{className:"jv-panel jv-machine-form",autoComplete:"off",onSubmit:Q,"aria-label":y("machines.add"),"aria-busy":_||void 0,children:[k?l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"jv-machine-where",children:[h.trim()&&l.jsx("strong",{children:h.trim()}),l.jsxs("code",{children:[I.user,"@",I.host,I.port===22?"":`:${I.port}`]})]}),l.jsxs("div",{className:"jv-field",children:[l.jsx("span",{children:y("machines.fingerprint")}),l.jsx("div",{className:"jv-machine-prints",children:k.fingerprints.map(q=>l.jsx("code",{children:q},q))}),l.jsx("span",{className:"jv-field-hint",children:y("machines.fingerprintHint")})]}),l.jsx("div",{className:"jv-seg jv-machine-login",role:"radiogroup","aria-label":y("machines.login"),children:["password","key"].map(q=>l.jsx("button",{type:"button",role:"radio","aria-checked":T===q,disabled:_,onClick:()=>{R(q),P("")},children:y(q==="password"?"machines.byPassword":"machines.byKey")},q))}),T==="password"?l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("machines.password")}),l.jsx(Qf,{value:N,visible:M,onChange:C,onVisible:E,required:!0,warnShort:!1}),l.jsx("span",{className:"jv-field-hint",children:y("machines.passwordHint")})]}):l.jsxs("div",{className:"jv-field",children:[l.jsx("span",{children:y("machines.publicKey")}),O.key?l.jsx(jg,{publicKey:O.key.publicKey}):O.error?l.jsx("p",{className:"jv-note-error",role:"alert",children:O.error}):l.jsx("p",{className:"jv-hint",children:"…"}),l.jsx("span",{className:"jv-field-hint",children:y("machines.keyHint",{user:I.user})})]})]}):l.jsxs("div",{className:"jv-machine-fields",children:[l.jsxs("div",{className:"jv-machine-address",children:[l.jsxs("label",{className:"jv-field jv-machine-host",children:[l.jsx("span",{children:y("machines.host")}),l.jsx(Nt,{required:!0,autoFocus:!0,maxLength:253,spellCheck:!1,placeholder:y("machines.hostPlaceholder"),value:a,onChange:q=>r(q.target.value)})]}),l.jsxs("label",{className:"jv-field jv-machine-port",children:[l.jsx("span",{children:y("machines.port")}),l.jsx(Nt,{required:!0,inputMode:"numeric",maxLength:5,value:o,onChange:q=>c(q.target.value.replace(/\D/g,""))})]})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("machines.user")}),l.jsx(Nt,{required:!0,maxLength:64,spellCheck:!1,autoCapitalize:"off",value:d,onChange:q=>f(q.target.value)})]}),l.jsxs("label",{className:"jv-field",children:[l.jsx("span",{children:y("machines.name")}),l.jsx(Nt,{maxLength:40,placeholder:Y,value:h,onChange:q=>g(q.target.value)})]}),l.jsxs("label",{className:"jv-field jv-machine-wide",children:[l.jsx("span",{children:y("machines.directory")}),l.jsx(Nt,{className:"jv-mono",maxLength:1e3,spellCheck:!1,placeholder:y("machines.directoryPlaceholder"),value:v,onChange:q=>p(q.target.value)})]}),l.jsxs("label",{className:"jv-field jv-machine-wide",children:[l.jsx("span",{children:y("machines.description")}),l.jsx(Ro,{maxLength:2e3,rows:3,placeholder:y("machines.descriptionPlaceholder"),value:j,onChange:q=>b(q.target.value)})]})]}),z&&l.jsx("p",{className:"jv-note-error",role:"alert",children:z}),l.jsxs("div",{className:"jv-secret-actions",children:[l.jsx(Ee,{type:"button",variant:"ghost",disabled:_,onClick:()=>{k?(S(null),C(""),P("")):e()},children:y(k?"machines.back":"common.cancel")}),l.jsx(Ee,{type:"submit",className:"jv-primary",disabled:_||!I.host||!I.user||!!k&&(T==="key"?!O.key:!N),children:y(k?T==="key"?_?"machines.verifying":"machines.verify":_?"machines.connecting":"machines.connect":_?"machines.scanning":"machines.next")})]})]})}let m0=null;const p0=3;function sU({bots:e,statuses:n,adding:a,onAdding:r,onSaved:o}){const[c,d]=w.useState(null),[f,h]=w.useState(null),[g,v]=w.useState(m0),[p,j]=w.useState(a);w.useEffect(()=>{he.machines().then(H=>d(H.machines)).catch(H=>h(un(H)))},[]),w.useEffect(()=>{a&&j(!0)},[a]);const b=e.filter(H=>H.environment.computer),k=H=>e.filter(O=>O.environment.current==="ssh"&&O.environment.currentName===H.name),S=H=>H.environment.current==="computer"?[H]:[],N=(g==null?void 0:g.kind)==="machine"?c==null?void 0:c.find(H=>H.id===g.id):void 0,C=(g==null?void 0:g.kind)==="sandbox"?b.find(H=>H.id===g.id):void 0,M=!N&&!C,E=a?void 0:N??(M?c==null?void 0:c[0]:void 0),T=a||E?void 0:C??(M&&(c||f)?b[0]:void 0),R=H=>{m0=H,v(H),r(!1),j(!0)},_=E?k(E):T?S(T):[],z=T&&n[T.id],P=H=>l.jsx(oU,{bots:H,statuses:n});return l.jsxs("section",{className:"jv-envs","data-open":p||void 0,"aria-label":y("rail.environments"),children:[l.jsxs("aside",{className:"jv-envs-list",children:[l.jsxs("header",{className:"jv-envs-list-head",children:[l.jsx("h2",{children:y("rail.environments")}),l.jsx(vt,{icon:"add",label:y("machines.add"),"aria-pressed":a,onClick:()=>{r(!0),j(!0)}})]}),l.jsxs("div",{className:"jv-envs-scroll",children:[c==null?void 0:c.map(H=>l.jsxs("button",{type:"button",className:"jv-envs-row","aria-current":(E==null?void 0:E.id)===H.id||void 0,onClick:()=>R({kind:"machine",id:H.id}),children:[l.jsx(Zd,{type:"ssh"}),l.jsxs("span",{className:"jv-envs-text",children:[l.jsx("strong",{children:H.name}),l.jsx("span",{className:"jv-mono",children:a1(H)})]}),P(k(H)),l.jsx("span",{className:"jv-envs-state"})]},H.id)),b.map(H=>{const O=H.environment.computer;return l.jsxs("button",{type:"button",className:"jv-envs-row","aria-current":(T==null?void 0:T.id)===H.id||void 0,onClick:()=>R({kind:"sandbox",id:H.id}),children:[l.jsx(Zd,{type:O.type}),l.jsxs("span",{className:"jv-envs-text",children:[l.jsx("strong",{children:y("envs.sandboxOf",{name:H.name})}),l.jsx("span",{children:y(O.type==="vm"?"environment.type.vm":"environment.type.container")})]}),P(S(H)),l.jsx("span",{className:"jv-envs-state","data-state":O.state,role:"img","aria-label":y(n1[O.state]),title:y(n1[O.state])})]},H.id)}),f&&l.jsx("p",{className:"jv-note-error",role:"alert",children:f})]})]}),l.jsxs("main",{className:"jv-envs-detail jv-ui",children:[l.jsxs("header",{className:"jv-envs-head",children:[l.jsx("button",{type:"button",className:"jv-envs-back","aria-label":y("envs.back"),onClick:()=>{j(!1),r(!1)},children:l.jsx(p1,{"aria-hidden":"true"})}),a?l.jsx("h2",{children:y("machines.add")}):E?l.jsxs(l.Fragment,{children:[l.jsx(Zd,{type:"ssh"}),l.jsx("h2",{children:E.name}),l.jsx("span",{className:"jv-envs-sub jv-mono",children:a1(E)})]}):T?l.jsxs(l.Fragment,{children:[l.jsx(Zd,{type:T.environment.computer.type}),l.jsx("h2",{children:y("envs.sandboxOf",{name:T.name})})]}):null]}),l.jsxs("div",{className:"jv-envs-body",children:[!a&&_.length>0&&l.jsxs("p",{className:"jv-envs-here",children:[P(_),y("envs.workingHere",{names:_.map(H=>H.name).join(y("common.listSeparator")),count:_.length})]}),a?l.jsx(lU,{onCancel:()=>{r(!1),j(!1)},onSaved:H=>{d(O=>[...O??[],H]),R({kind:"machine",id:H.id})}}):E?l.jsx(aP,{machine:E,bots:e,onChanged:H=>d(O=>O&&O.map(I=>I.id===H.id?H:I)),onDeleted:()=>{m0=null,v(null),j(!1),d(H=>H&&H.filter(O=>O.id!==E.id))}},E.id):T?l.jsxs(l.Fragment,{children:[l.jsx(jS,{bot:T,onSaved:o,heading:!1},T.id),l.jsx(TS,{bot:T,runs:`${(z==null?void 0:z.status)??"stop"}:${(z==null?void 0:z.runId)??""}`},`ports-${T.id}`)]}):null]})]})]})}function Zd({type:e}){const n=e==="ssh"?k1:e==="vm"?Q9:N9;return l.jsx("span",{className:"jv-envs-icon","data-kind":e,children:l.jsx(n,{"aria-hidden":"true"})})}function oU({bots:e,statuses:n}){return l.jsxs("span",{className:"jv-envs-faces",title:e.map(a=>a.name).join(y("common.listSeparator"))||void 0,children:[e.slice(0,p0).map(a=>{var r;return l.jsx(_a,{color:a.color,mood:a.mood,size:22,crown:a.agent,asleep:((r=n[a.id])==null?void 0:r.status)==="stop"},a.id)}),e.length>p0&&l.jsxs("span",{className:"jv-envs-more",children:["+",e.length-p0]})]})}function cU({onLogin:e}){const[n,a]=w.useState(""),[r,o]=w.useState(""),[c,d]=w.useState(!1),[f,h]=w.useState(!1),[g,v]=w.useState(null),[p,j]=w.useState(document.documentElement.classList.contains("dark"));async function b(k){if(k.preventDefault(),!f){h(!0),v(null);try{const S=await he.login(n.trim(),r);o(""),e(S.username)}catch(S){v(S instanceof Wa&&S.status===401?"login.wrong":S instanceof Wa&&S.status===429?"login.tooMany":"login.offline")}finally{h(!1)}}}return l.jsxs("div",{className:"jv-login",children:[l.jsxs("div",{className:"jv-login-corner",children:[l.jsx("div",{className:"jv-login-locales",role:"group","aria-label":y("general.language"),children:m4.map(k=>l.jsx("button",{type:"button",lang:k,"aria-pressed":Tl()===k,title:v0(k,"name"),onClick:()=>v4(k),children:v0(k,"short")},k))}),l.jsx("button",{className:"jv-login-theme",type:"button",onClick:()=>{xf(p?"light":"dark"),j(!p)},"aria-label":y(p?"login.themeLight":"login.themeDark"),children:l.jsx(Pe,{name:p?"sun":"moon"})})]}),l.jsx("main",{className:"jv-login-stage",children:l.jsxs("div",{className:"jv-login-wrap",children:[l.jsxs("header",{className:"jv-login-brand",children:[l.jsx("img",{className:"jv-login-logo",src:"/icon.svg",alt:"",width:64,height:64}),l.jsx("h1",{children:"Jarvy"}),l.jsx("p",{children:y("login.subtitle")})]}),l.jsxs("form",{className:"jv-login-form",onSubmit:k=>void b(k),"aria-label":y("login.form"),"aria-busy":f,children:[l.jsxs("div",{className:"jv-login-field",children:[l.jsx("label",{htmlFor:"login-username",children:y("login.username")}),l.jsx("input",{id:"login-username",autoComplete:"username",autoFocus:!0,required:!0,disabled:f,value:n,onChange:k=>a(k.target.value)})]}),l.jsxs("div",{className:"jv-login-field",children:[l.jsx("label",{htmlFor:"login-password",children:y("login.password")}),l.jsxs("div",{className:"jv-login-password",children:[l.jsx("input",{id:"login-password",type:c?"text":"password",autoComplete:"current-password",required:!0,disabled:f,value:r,onChange:k=>o(k.target.value)}),l.jsx("button",{type:"button",className:"jv-login-visibility","aria-label":y(c?"login.hidePassword":"login.showPassword"),onClick:()=>d(!c),children:l.jsx(Pe,{name:c?"eye-slash":"eye"})})]})]}),g&&l.jsx("p",{className:"jv-login-error",role:"alert",children:y(g)}),l.jsx("button",{className:"jv-login-submit",type:"submit",disabled:f,children:y(f?"login.submitting":"login.submit")})]})]})})]})}function uU({selected:e,chats:n,transcript:a,openChat:r,setPane:o,paneRef:c,blocked:d}){const[f,h]=w.useState(null),[g,v]=w.useState(0);w.useEffect(()=>{var b;!f||e!==f.chatId||a.loading||((b=a.messages[0])==null?void 0:b.chatId)!==f.chatId||(a.toMessage(f.id,f.passage),h(null))},[f,e,a.loading,a.messages]);function p(b,k,S){if(b.type==="thread"){const T=n.find(R=>R.id===b.parentId);T&&r(T),o({kind:"thread",id:b.id,parentId:b.parentId,mode:"pane",focus:{id:k,passage:S}});return}const N=c.current,C=window.matchMedia("(max-width: 760px)").matches,M=(N==null?void 0:N.kind)==="thread"&&(C||N.mode==="full")||(N==null?void 0:N.kind)==="search"&&C;M&&o(null);const E=b.id===e;r(b),E&&!M?a.toMessage(k,S):h({chatId:b.id,id:k,passage:S})}function j(b){o({kind:"search",chat:b}),v(k=>k+1)}return w.useEffect(()=>{const b=k=>{var N,C;if(d||k.defaultPrevented||!(k.ctrlKey||k.metaKey)||k.key.toLowerCase()!=="f")return;const S=n.find(M=>M.id===e);S&&(((N=c.current)==null?void 0:N.kind)==="search"&&((C=document.activeElement)!=null&&C.closest(".jv-search-pane"))||(k.preventDefault(),j(S)))};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[d,n,e]),{openMessage:p,search:j,focusKey:g}}const dU=45e3,fU=25e3;function hU(e,n,a){let r,o=Date.now(),c="";const d=()=>{r==null||r.close(),o=Date.now();const v=new EventSource(c?`${e}?after=${encodeURIComponent(c)}`:e);v.addEventListener("heartbeat",()=>{o=Date.now()});for(const[p,j]of Object.entries(n))v.addEventListener(p,b=>{o=Date.now();const k=b;k.lastEventId&&(c=k.lastEventId),j(k)});v.onerror=a,r=v},f=v=>{Date.now()-o>v&&d()},h=setInterval(()=>f(dU),1e4),g=()=>{document.visibilityState==="visible"&&f(fU)};return window.addEventListener("online",d),document.addEventListener("visibilitychange",g),window.addEventListener("pageshow",g),d(),()=>{clearInterval(h),window.removeEventListener("online",d),document.removeEventListener("visibilitychange",g),window.removeEventListener("pageshow",g),r==null||r.close()}}function mU(e,n){let a=null,r=Promise.resolve();return()=>a??(a=new Promise((o,c)=>setTimeout(()=>{r=r.then(()=>{a=null;const d=e();return d.then(o,c),d.catch(()=>{})})},n)))}const pU=null;function f4(){var sn,mr,Wr,ea,pr,ql;const[e,n]=w.useState("loading"),[a,r]=w.useState(""),[o,c]=w.useState([]),[d,f]=w.useState({}),h=w.useRef(new Map),[g,v]=w.useState([]),[p,j]=w.useState([]),[b,k]=w.useState([]),[S,N]=w.useState(null),[C,M]=w.useState({}),[E,T]=w.useState(null),[R,_]=w.useState(null),[z,P]=w.useState(null),[H,O]=w.useState(null),I=(U,pe)=>O(Ae=>(Ae==null?void 0:Ae.id)===U.id?null:{id:U.id,anchor:pe}),$=()=>O(null),[Q,Y]=w.useState([]),[q,K]=w.useState(null),[V,X]=w.useState(!1),[Z,D]=w.useState(!1),[se,ne]=w.useState(!1),[B,F]=w.useState(""),[ee,W]=w.useState(!1),[de,oe]=w.useState(null),[be,we]=w.useState(()=>{const U=localStorage.getItem("jarvy-view");return U==="home"||U==="envs"?U:"chats"}),[ve,re]=w.useState(!1);w.useEffect(()=>{localStorage.setItem("jarvy-view",be)},[be]);const[Ce,Ve]=w.useState(!1),[He,Ze]=w.useState(420),[Fe,Ke]=w.useState(Qj),[gt,qt]=w.useState(null),[Zt]=w.useState(()=>new Aq),[en]=w.useState(()=>new dq),[kn]=w.useState(()=>new b6);w.useEffect(()=>en.on(U=>kn.heard(U)),[en,kn]);const[vn,rn]=w.useState(""),ge=w.useRef(null),Me=w.useRef(null),Xe=w.useRef(null),[Je,rt]=w.useState(null),[Jt,An]=w.useState(null),[dn,Ln]=w.useState(null),me=w.useRef(E);me.current=E;const Ne=w.useRef(0),_e=w.useRef(g);_e.current=g;const Be=w.useRef(de);Be.current=de;const Oe=w.useMemo(()=>new hH(mH(a)),[a]);w.useEffect(()=>{const U=()=>Oe.save();return window.addEventListener("pagehide",U),()=>window.removeEventListener("pagehide",U)},[Oe]);const dt=((sn=b.find(U=>U.kind==="user"&&U.name===a))==null?void 0:sn.id)??"",ti=w.useRef(dt);ti.current=dt;const _n=O6({chatId:E,ready:e==="ready",scroller:ge,me:dt,memory:kn,onError:ft}),{messages:yn,setMessages:sr}=_n,Ra=uU({selected:E,chats:g,transcript:_n,openChat:fi,setPane:oe,paneRef:Be,blocked:!!z||!!q}),Kr=((mr=g.find(U=>U.id===E))==null?void 0:mr.botId)??R??((Wr=o[0])==null?void 0:Wr.id);async function or(U){const pe=(h.current.get(U)??0)+1;h.current.set(U,pe);const Ae=await he.botStatus(U);h.current.get(U)===pe&&f(ot=>({...ot,[U]:Ae}))}w.useEffect(()=>{e==="ready"&&Kr&&or(Kr).catch(ft)},[e,Kr]);const Gt=o.find(U=>U.agent),xn=Gt?d[Gt.id]:void 0,Yt=g.find(U=>U.type==="dm"&&U.botId===(Gt==null?void 0:Gt.id)),ln=be==="home"&&!!Gt,Ii=be==="envs",Ci=ln||Ii,ha=w.useRef(Ci);ha.current=Ci;const Ni=QF(xn,Yt),Pi=rU(Gt,xn,Ni.call==="error");w.useEffect(()=>{e==="ready"&&Gt&&or(Gt.id).catch(ft)},[e,Gt==null?void 0:Gt.id]);const ui=((ea=g.find(U=>U.id===E&&U.type==="channel"))==null?void 0:ea.memberIds.filter(U=>o.some(pe=>pe.id===U)).join(","))??"";w.useEffect(()=>{if(e==="ready"&&ui)for(const U of ui.split(","))or(U).catch(ft)},[e,ui]);async function Ji(U){var mt,Ft;const[pe,Ae,ot,ht,hn]=await Promise.all([he.bots(),he.chats(),he.modelConnections(),he.sections(),he.members()]);r(U),c(pe.bots),v(Ae.chats),Y(ot.connections),j(ht.sections),k(hn.members),qt(Ae.followed);const Ue=Ae.chats.find(Kt=>Kt.type!=="thread");T((Ue==null?void 0:Ue.id)??null),Ue&&M({[Ue.id]:Ue.readSequence}),_(((mt=Ae.chats[0])==null?void 0:mt.botId)??((Ft=pe.bots[0])==null?void 0:Ft.id)??null),n("ready")}w.useEffect(()=>{xf(localStorage.getItem("jarvy-theme")==="dark"?"dark":"light"),he.me().then(U=>Ji(U.username)).catch(()=>n("login"))},[]),w.useEffect(()=>{if(e!=="ready")return;let U=!0;const pe=Ue=>{U&&ft(Ue)},Ae=async()=>{const Ue=me.current;U&&Ue&&await _n.refresh(Ue)},ot=()=>void he.sections().then(Ue=>{U&&j(Ue.sections)}).catch(Ue=>{U&&ft(Ue)}),ht=({chat:Ue,parent:mt,followed:Ft,message:Kt},mn)=>{const Bn=ai=>ai.type!=="thread"&&ai.memberIds.includes(ti.current);for(const ai of mt?[Ue,mt]:[Ue])Bn(ai)&&$n(ai);Ft&&qt(Ft),Ue.type==="thread"&&Zt.emit({kind:"changed",id:Ue.id}),Ke(ai=>Sq(ai,Ue.id,Ue.type==="dm"&&!Bn(Ue))),Kt&&mn?(_n.heard(Kt,mn==="message"),en.emit({kind:mn,message:Kt})):en.emit({kind:"chat",chat:Ue})},hn=hU("/api/events",{ready:Ue=>{JSON.parse(Ue.data).resumed||(kn.clear(),en.emit({kind:"reconnected"}),Ke(Cq),ni().catch(pe),Ae().catch(pe),ot(),Zt.emit({kind:"reconnected"}),he.bots().then(mt=>{if(U){c(mt.bots);for(const Ft of mt.bots)or(Ft.id).catch(Kt=>{U&&ft(Kt)})}}).catch(mt=>{U&&ft(mt)}))},sections:ot,bots:()=>{he.bots().then(Ue=>{U&&c(Ue.bots)}).catch(pe),ni().catch(pe)},message:Ue=>ht(JSON.parse(Ue.data),"message"),"message.updated":Ue=>ht(JSON.parse(Ue.data),"updated"),chat:Ue=>ht(JSON.parse(Ue.data)),"chat.removed":Ue=>{var Kt;const{chatId:mt,followed:Ft}=JSON.parse(Ue.data);v(mn=>mn.filter(Bn=>Bn.id!==mt)),qt(Ft),kn.removed(mt),me.current===mt&&T(null),((Kt=Be.current)==null?void 0:Kt.kind)==="thread"&&Be.current.parentId===mt&&oe(null),Zt.emit({kind:"reconnected"})},bot:Ue=>{var mn;const{botId:mt,status:Ft,bot:Kt}=JSON.parse(Ue.data);h.current.set(mt,(h.current.get(mt)??0)+1),f(Bn=>({...Bn,[mt]:Ft})),Ft.error&&!ha.current&&((mn=_e.current.find(Bn=>Bn.id===me.current))==null?void 0:mn.botId)===Ft.botId&&rn(rS(Ft)),Kt&&c(Bn=>Bn.map(ai=>ai.id===Kt.id?Kt:ai))}},()=>{he.me().catch(Ue=>{U&&Ue instanceof Wa&&Ue.status===401&&n("login")})});return()=>{U=!1,hn(),_n.cancel(),Ne.current++}},[e]),XF({ready:e==="ready"&&!Ci,selected:E,messages:yn,chats:g,chatList:_e,setChats:v,onError:ft}),KF(e==="ready"?g.reduce((U,pe)=>U+pe.alerts,0):0),w.useEffect(()=>{if(!vn)return;const U=setTimeout(()=>rn(""),4800);return()=>clearTimeout(U)},[vn]),w.useEffect(()=>{const U=pe=>{pe.defaultPrevented||z||q||(pe.key==="Escape"&&(X(!1),D(!1),ne(!1)),(pe.ctrlKey||pe.metaKey)&&pe.key.toLowerCase()==="k"&&(pe.preventDefault(),we("chats"),ne(window.matchMedia("(max-width: 620px)").matches),requestAnimationFrame(()=>{var Ae;return(Ae=document.querySelector("#jarvy-search"))==null?void 0:Ae.focus()})))};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[z,q]),w.useEffect(()=>{const U=window.matchMedia("(max-width: 620px)"),pe=()=>{U.matches||ne(!1)};return U.addEventListener("change",pe),()=>U.removeEventListener("change",pe)},[]);function ft(U){if(U instanceof Wa&&U.status===401){n("login");return}rn(un(U,"common.failed"))}const[ni]=w.useState(()=>mU(async()=>{const U=++Ne.current,pe=await he.chats();return U===Ne.current&&(v(pe.chats),qt(pe.followed)),pe.chats},100));async function za(){const[U,pe]=await Promise.all([he.modelConnections(),he.bots()]);Y(U.connections),c(pe.bots)}const cr=()=>void he.members().then(U=>k(U.members)).catch(ft);function di(U){c(pe=>pe.map(Ae=>Ae.id===U.id?U:Ae)),cr()}function fi(U){var Ae;const pe=cH(U);pe?oe({kind:"thread",id:pe,parentId:U.id,mode:"pane",summary:((Ae=U.hint)==null?void 0:Ae.kind)==="note"}):U.id!==me.current&&oe(null),Ve(!1),we("chats"),M(ot=>({...ot,[U.id]:U.readSequence})),T(U.id),U.botId&&_(U.botId),ne(!1),X(!1),D(!1)}const ma=U=>oe((de==null?void 0:de.kind)==="info"&&de.page===U?null:{kind:"info",page:U});function $n(U){v(pe=>pe.some(Ae=>Ae.id===U.id)?pe.map(Ae=>Ae.id===U.id?U:Ae):[U,...pe])}async function hi(U){if(!ee){W(!0);try{const pe=await he.createChat(U);$n(pe),fi(pe),requestAnimationFrame(()=>{var Ae;return(Ae=document.querySelector("#jarvy-composer"))==null?void 0:Ae.focus()})}catch(pe){ft(pe)}finally{W(!1)}}}async function ur(){if(!ee){W(!0);try{const U=await he.createBot(TP(Na(b).map(Ae=>Ae.name))),pe=await he.createChat(U.id);c(Ae=>[...Ae,U]),$n(pe),cr(),fi(pe)}catch(U){ft(U)}finally{W(!1)}}}async function dr(U){try{await he.deleteChat(U.id),await ni(),me.current===U.id&&T(null),rn(y("app.channelDeleted"))}catch(pe){ft(pe)}}async function pa(U,pe){try{$n(await he.pin(U.id,pe))}catch(Ae){ft(Ae)}}async function mi(U,pe){try{$n(await he.mute(U.id,pe))}catch(Ae){ft(Ae)}}async function Ei(U,pe){try{await he.deleteBot(U.id,pe);const Ae=new Set(g.filter(ot=>ot.type==="dm"&&ot.botId===U.id).map(ot=>ot.id));v(ot=>ot.filter(ht=>!Ae.has(ht.id)).map(ht=>ht.memberIds.includes(U.id)?{...ht,memberIds:ht.memberIds.filter(hn=>hn!==U.id)}:ht)),c(ot=>ot.filter(ht=>ht.id!==U.id)),cr(),me.current&&Ae.has(me.current)&&T(null),z===U.id&&P(null),rn(y("app.botDeleted",{name:U.name}))}catch(Ae){ft(Ae)}}async function fr(U,pe,Ae,ot,ht){const hn=E,Ue=await he.send(hn,U,pe,Ae,!1,ot,ht),mt=_e.current.find(Kt=>Kt.id===hn),Ft=(mt==null?void 0:mt.type)==="channel"?[...new Set(kg(U,Na(b)).filter(Kt=>!mt.memberIds.includes(Kt.member.id)).map(Kt=>Kt.member.name))]:[];Ft.length&&rn(y("app.notInChannel",{names:Ft.join(y("common.listSeparator")),count:Ft.length})),_n.heard(Ue,!0)}function tn(U,pe){he.addMember(U,pe.id).then(Ae=>{$n(Ae),rn(y("app.memberAdded",{name:pe.name,channel:Ae.title}))}).catch(ft)}async function Wt(U){try{const pe=await he.openThread(U.id);oe({kind:"thread",id:pe.id,parentId:U.chatId,mode:"pane"})}catch(pe){ft(pe)}}function Rn(U,pe){const Ae=g.find(ot=>ot.id===U.parentId);Ae&&fi(Ae),oe(pe?{kind:"thread",id:U.id,parentId:U.parentId,mode:"pane"}:null)}function ii(U){P(null);const pe=g.find(Ae=>Ae.id===(U.type==="thread"?U.parentId:U.id));pe&&fi(pe),U.type==="thread"&&oe({kind:"thread",id:U.id,parentId:U.parentId,mode:"pane"})}async function Hl(U,pe,Ae){try{const ot=await he.react(U.id,pe,Ae);sr(ht=>ht.map(hn=>hn.id===ot.id?{...hn,reactions:ot.reactions}:hn))}catch(ot){ft(ot)}}async function Xr(U,pe){try{const Ae=await he.fold(U.id,pe);sr(ot=>ot.map(ht=>ht.id===Ae.id?{...ht,folded:Ae.folded}:ht))}catch(Ae){ft(Ae)}}function Qr(U){Ng(Oe,U,b)}const Oa=(U,pe)=>U?void _n.toMessage(U,pe).then(async Ae=>{Ae&&Ra.openMessage(await he.chat(Ae),U,pe)}).catch(()=>rn(y("app.sourceGone"))):rn(y("app.sourceGone"));function hr(U){Zt.emit({kind:"chat",chat:U})}function Zr(U){U.preventDefault();const pe=ot=>Ze(Math.min(Math.max(340,window.innerWidth-ot.clientX),Math.round(window.innerWidth*.6))),Ae=()=>{window.removeEventListener("pointermove",pe),window.removeEventListener("pointerup",Ae),document.body.style.cursor=""};window.addEventListener("pointermove",pe),window.addEventListener("pointerup",Ae),document.body.style.cursor="col-resize"}async function Jr(){try{await Oe.clear(U=>he.removeAttachment(U)),await he.logout(),n("login"),X(!1),K(null),h.current.clear(),f({}),oe(null),qt(null),Ke(Qj),kn.clear(),r(""),T(null),v([]),c([]),Y([]),sr([])}catch(U){ft(U)}}const Hi=e==="ready"&&g.some(U=>U.id===E);w.useEffect(()=>{const U=ge.current;if(!U)return;let pe=0,Ae=U.clientHeight;const ot=()=>{pe=U.scrollHeight-U.scrollTop-U.clientHeight},ht=new ResizeObserver(()=>{U.clientHeight!==Ae&&(Ae=U.clientHeight,U.scrollTo({top:U.scrollHeight-U.clientHeight-pe,behavior:"instant"}))}),hn=new MutationObserver(ot);return ot(),U.addEventListener("scroll",ot,{passive:!0}),ht.observe(U),hn.observe(U,{childList:!0,subtree:!0,characterData:!0}),()=>{ht.disconnect(),hn.disconnect(),U.removeEventListener("scroll",ot)}},[Hi]);const Wi=g.find(U=>U.id===E),ue=(Wi==null?void 0:Wi.type)==="channel",ke=hq(e==="ready"?((pr=g.find(U=>U.id===E&&U.type==="dm"))==null?void 0:pr.botId)??void 0:void 0,Eq(Fe));if(e==="loading")return l.jsx("div",{className:"jarvy-loading",children:y("app.connecting")});if(e==="login")return l.jsx(cU,{onLogin:U=>void Ji(U).catch(ft)});const je=g.find(U=>U.id===E),De=o.find(U=>U.id===((je==null?void 0:je.botId)??R))??o[0],it=!!(De!=null&&De.connectionId),et=ue||it,st=(De==null?void 0:De.name)??"Jarvy",yt=De?d[De.id]:void 0,_t=yt!=null&&yt.error?y("activity.error"):(yt==null?void 0:yt.status)==="running"?HS(yt.activity):"",Ye=(ql=[...yn].reverse().find(U=>{var pe;return((pe=U.question)==null?void 0:pe.state)==="pending"}))==null?void 0:ql.id,nt=(de==null?void 0:de.kind)==="thread"?de:null,xt=(nt==null?void 0:nt.mode)==="full",Ge=ue?Wi:void 0,bn=o.find(U=>U.id===z),Ot=o.find(U=>U.id===(H==null?void 0:H.id)),pi=new Set(Object.values(d).filter(U=>U.status==="running"&&U.activity!=="asking").map(U=>U.botId)),fn=new Set(Object.values(d).filter(U=>U.activity==="asking").map(U=>U.botId));return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"ui-app","data-nav":se?"":void 0,"data-pane":de&&!xt&&!Ci?"":void 0,"data-view":ln?"home":Ii?"envs":void 0,style:{"--ui-pane":`${He}px`},children:[l.jsx(ZF,{view:ln?"home":Ii?"envs":"chats",agent:Gt,figure:Pi,call:Ni.call,asleep:Zf(xn).motion==="sleep",alerts:g.reduce((U,pe)=>U+(pe.id===(Yt==null?void 0:Yt.id)?0:pe.alerts),0),username:a,onView:U=>{we(U),ne(U==="chats"&&window.matchMedia("(max-width: 620px)").matches),X(!1)},accountMenu:V,onToggleAccount:U=>{X(U),D(!1)},onSettings:()=>{X(!1),K("general")},onToggleTheme:()=>{xf(document.documentElement.classList.contains("dark")?"light":"dark"),X(!1)},onLogOut:()=>void Jr()}),l.jsx(dH,{chats:g,sections:p,bots:o,members:b,followed:gt,followedOpen:Ce&&!xt,working:pi,asking:fn,selected:Ce?null:E,filter:B,creating:ee,createMenu:Z,onFilterChange:F,onOpenFollowed:()=>{Ve(!0),oe(null),ne(!1)},onOpenChat:fi,onOpenBot:U=>void hi(U.id),onOpenMenu:(U,pe)=>An({target:U,at:pe}),onEditSection:U=>N({kind:"section",section:U}),onCreate:U=>{if(U==="bot")return void ur();N({kind:U}),D(!1)},onFind:Ra.openMessage,onOpenFound:ii,onError:ft,onToggleCreate:U=>{D(U),X(!1)}}),l.jsx(lq,{chat:je,inChannel:ue,bots:o,members:b,meId:dt,drafts:Oe,composeReady:et,botName:st,activeBot:De,status:yt,connections:Q,activity:_t,history:_n,divider:C[(je==null?void 0:je.id)??""]??(je==null?void 0:je.readSequence)??0,activeQuestion:Ye,pane:de,onPane:oe,onToggleInfo:ma,find:Ra,onNav:()=>ne(!0),onBot:U=>P(U),hasBotDirects:ke.length>0,onBotCard:I,onInvite:tn,onQuote:Qr,onReply:U=>void Wt(U),onReact:(U,pe,Ae)=>void Hl(U,pe,Ae),onFold:(U,pe)=>void Xr(U,pe),onJump:Oa,onSettled:U=>sr(pe=>pe.map(Ae=>Ae.id===U.id?U:Ae)),onPreview:(U,pe)=>rt({files:U,index:pe}),onSend:fr,notice:rn,onSaveNote:async U=>{try{$n(await he.setNote(je.id,U))}catch(pe){throw ft(pe),pe}},createBot:()=>void ur(),creating:ee,updateBot:di,onManageModels:()=>K("models"),error:ft,chatArea:Me,transcript:ge,composeWrap:Xe,hidden:xt||Ce||Ci,onOpenThread:U=>oe({kind:"thread",id:U,parentId:je.id,mode:"pane"})}),l.jsx(Dq,{onBotCard:I,pane:de,followedView:Ce,threadEvents:Zt,followed:gt,chats:g,sections:p,members:b,bots:o,statuses:d,meId:dt,drafts:Oe,changes:Fe,live:en,memory:kn,paneChannel:Ge,activeBot:De,botDirects:ke,find:Ra,onPane:oe,onNav:()=>ne(!0),onBackToChannel:Rn,onAddMembers:U=>N({kind:"members",chat:U}),onOpenBot:P,onPin:U=>void pa(U,!U.pinned),onMute:U=>void mi(U,!U.muted),onDeleteChannel:U=>Ln({kind:"chat",chat:U}),onChannelSaved:$n,onThreadChanged:hr,onInvite:tn,onPreview:(U,pe)=>rt({files:U,index:pe}),onNotice:rn,onError:ft,paneWidth:He,onResize:Zr}),ln&&l.jsx(iU,{bot:Gt,chat:Yt,status:xn,figure:Pi,call:Ni.call,onSeen:Ni.seen,meId:dt,members:b,drafts:Oe,live:en,onOpenDm:()=>void hi(Gt.id),onBotInfo:()=>P(Gt.id),ensureDm:async()=>{const U=await he.createChat(Gt.id);return $n(U),U},onRead:(U,pe)=>D6(v,U.id,pe,ft),onPreview:(U,pe)=>rt({files:U,index:pe}),onNotice:rn,onError:ft}),Ii&&l.jsx(sU,{bots:o,statuses:d,adding:ve,onAdding:re,onSaved:di})]}),Ot&&H&&l.jsx(uq,{bot:Ot,status:d[Ot.id],connections:Q,anchor:H.anchor,onClose:$,onMessage:()=>void hi(Ot.id),onInfo:()=>P(Ot.id)}),q&&l.jsx(VF,{connections:Q,bots:o,initialTab:q,onChanged:za,onClose:()=>K(null)}),l.jsx(WP,{dialog:S,entryMenu:Jt,confirm:dn,preview:Je,infoBot:bn,bots:o,statuses:d,chats:g,sections:p,members:b,connections:Q,meId:dt,onDialog:N,onEntryMenu:An,onConfirm:Ln,onPreview:rt,onInfoBot:P,onSettings:K,onAddMachine:()=>{we("envs"),re(!0),ne(!1)},onChannelInfo:U=>{fi(U),oe({kind:"info",page:"main"})},onOpenChatId:U=>{T(U),ne(!1)},chatSaved:$n,openChat:fi,onSectionSaved:U=>{j(pe=>pe.some(Ae=>Ae.id===U.id)?pe.map(Ae=>Ae.id===U.id?U:Ae):[...pe,U]),N(null)},onSectionDeleted:U=>{N(null),j(pe=>pe.filter(Ae=>Ae.id!==U)),ni().catch(ft)},updateBot:di,openAnywhere:ii,removeChannel:dr,deleteBot:Ei,pinChat:pa,muteChat:mi}),vn&&l.jsx("div",{className:"ui-toast",role:"status",children:vn}),pU]})}function gU(){const e=`https://${location.host}${location.pathname}${location.search}`;return l.jsxs("div",{className:"jv-insecure",role:"status",children:[l.jsx(lN,{"aria-hidden":"true"}),l.jsx("span",{children:y("connection.insecure")}),l.jsx("a",{href:e,children:y("connection.useHttps")})]})}function vU(){return y4(),window.isSecureContext?l.jsx(f4,{}):l.jsxs("div",{className:"jv-insecure-shell",children:[l.jsx(gU,{}),l.jsx(f4,{})]})}S7.createRoot(document.getElementById("root")).render(l.jsx(w.StrictMode,{children:l.jsx(vU,{})}));
|