@jean2/client 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
function RA(e,n){for(var a=0;a<n.length;a++){const l=n[a];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(l,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>l[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"]'))l(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&l(u)}).observe(document,{childList:!0,subtree:!0});function a(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(o){if(o.ep)return;o.ep=!0;const s=a(o);fetch(o.href,s)}})();function Ku(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $p={exports:{}},Xo={};/**
|
|
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 uv;function MA(){if(uv)return Xo;uv=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,o,s){var u=null;if(s!==void 0&&(u=""+s),o.key!==void 0&&(u=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:l,key:u,ref:o!==void 0?o:null,props:s}}return Xo.Fragment=n,Xo.jsx=a,Xo.jsxs=a,Xo}var dv;function OA(){return dv||(dv=1,$p.exports=MA()),$p.exports}var d=OA(),Vp={exports:{}},ze={};/**
|
|
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 fv;function DA(){if(fv)return ze;fv=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),w=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=w&&D[w]||D["@@iterator"],typeof D=="function"?D:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function A(D,L,_){this.props=D,this.context=L,this.refs=E,this.updater=_||k}A.prototype.isReactComponent={},A.prototype.setState=function(D,L){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,L,"setState")},A.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=A.prototype;function j(D,L,_){this.props=D,this.context=L,this.refs=E,this.updater=_||k}var O=j.prototype=new N;O.constructor=j,S(O,A.prototype),O.isPureReactComponent=!0;var I=Array.isArray;function M(){}var U={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function q(D,L,_){var te=_.ref;return{$$typeof:e,type:D,key:L,ref:te!==void 0?te:null,props:_}}function B(D,L){return q(D.type,L,D.props)}function Y(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function G(D){var L={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(_){return L[_]})}var he=/\/+/g;function Z(D,L){return typeof D=="object"&&D!==null&&D.key!=null?G(""+D.key):L.toString(36)}function W(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(M,M):(D.status="pending",D.then(function(L){D.status==="pending"&&(D.status="fulfilled",D.value=L)},function(L){D.status==="pending"&&(D.status="rejected",D.reason=L)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function z(D,L,_,te,ne){var ie=typeof D;(ie==="undefined"||ie==="boolean")&&(D=null);var ae=!1;if(D===null)ae=!0;else switch(ie){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(D.$$typeof){case e:case n:ae=!0;break;case y:return ae=D._init,z(ae(D._payload),L,_,te,ne)}}if(ae)return ne=ne(D),ae=te===""?"."+Z(D,0):te,I(ne)?(_="",ae!=null&&(_=ae.replace(he,"$&/")+"/"),z(ne,L,_,"",function(_e){return _e})):ne!=null&&(Y(ne)&&(ne=B(ne,_+(ne.key==null||D&&D.key===ne.key?"":(""+ne.key).replace(he,"$&/")+"/")+ae)),L.push(ne)),1;ae=0;var be=te===""?".":te+":";if(I(D))for(var me=0;me<D.length;me++)te=D[me],ie=be+Z(te,me),ae+=z(te,L,_,ie,ne);else if(me=b(D),typeof me=="function")for(D=me.call(D),me=0;!(te=D.next()).done;)te=te.value,ie=be+Z(te,me++),ae+=z(te,L,_,ie,ne);else if(ie==="object"){if(typeof D.then=="function")return z(W(D),L,_,te,ne);throw L=String(D),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ae}function K(D,L,_){if(D==null)return D;var te=[],ne=0;return z(D,te,"","",function(ie){return L.call(_,ie,ne++)}),te}function ee(D){if(D._status===-1){var L=D._result;L=L(),L.then(function(_){(D._status===0||D._status===-1)&&(D._status=1,D._result=_)},function(_){(D._status===0||D._status===-1)&&(D._status=2,D._result=_)}),D._status===-1&&(D._status=0,D._result=L)}if(D._status===1)return D._result.default;throw D._result}var le=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},T={map:K,forEach:function(D,L,_){K(D,function(){L.apply(this,arguments)},_)},count:function(D){var L=0;return K(D,function(){L++}),L},toArray:function(D){return K(D,function(L){return L})||[]},only:function(D){if(!Y(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return ze.Activity=g,ze.Children=T,ze.Component=A,ze.Fragment=a,ze.Profiler=o,ze.PureComponent=j,ze.StrictMode=l,ze.Suspense=p,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,ze.__COMPILER_RUNTIME={__proto__:null,c:function(D){return U.H.useMemoCache(D)}},ze.cache=function(D){return function(){return D.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(D,L,_){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var te=S({},D.props),ne=D.key;if(L!=null)for(ie in L.key!==void 0&&(ne=""+L.key),L)!H.call(L,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&L.ref===void 0||(te[ie]=L[ie]);var ie=arguments.length-2;if(ie===1)te.children=_;else if(1<ie){for(var ae=Array(ie),be=0;be<ie;be++)ae[be]=arguments[be+2];te.children=ae}return q(D.type,ne,te)},ze.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:s,_context:D},D},ze.createElement=function(D,L,_){var te,ne={},ie=null;if(L!=null)for(te in L.key!==void 0&&(ie=""+L.key),L)H.call(L,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ne[te]=L[te]);var ae=arguments.length-2;if(ae===1)ne.children=_;else if(1<ae){for(var be=Array(ae),me=0;me<ae;me++)be[me]=arguments[me+2];ne.children=be}if(D&&D.defaultProps)for(te in ae=D.defaultProps,ae)ne[te]===void 0&&(ne[te]=ae[te]);return q(D,ie,ne)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(D){return{$$typeof:f,render:D}},ze.isValidElement=Y,ze.lazy=function(D){return{$$typeof:y,_payload:{_status:-1,_result:D},_init:ee}},ze.memo=function(D,L){return{$$typeof:h,type:D,compare:L===void 0?null:L}},ze.startTransition=function(D){var L=U.T,_={};U.T=_;try{var te=D(),ne=U.S;ne!==null&&ne(_,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(M,le)}catch(ie){le(ie)}finally{L!==null&&_.types!==null&&(L.types=_.types),U.T=L}},ze.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},ze.use=function(D){return U.H.use(D)},ze.useActionState=function(D,L,_){return U.H.useActionState(D,L,_)},ze.useCallback=function(D,L){return U.H.useCallback(D,L)},ze.useContext=function(D){return U.H.useContext(D)},ze.useDebugValue=function(){},ze.useDeferredValue=function(D,L){return U.H.useDeferredValue(D,L)},ze.useEffect=function(D,L){return U.H.useEffect(D,L)},ze.useEffectEvent=function(D){return U.H.useEffectEvent(D)},ze.useId=function(){return U.H.useId()},ze.useImperativeHandle=function(D,L,_){return U.H.useImperativeHandle(D,L,_)},ze.useInsertionEffect=function(D,L){return U.H.useInsertionEffect(D,L)},ze.useLayoutEffect=function(D,L){return U.H.useLayoutEffect(D,L)},ze.useMemo=function(D,L){return U.H.useMemo(D,L)},ze.useOptimistic=function(D,L){return U.H.useOptimistic(D,L)},ze.useReducer=function(D,L,_){return U.H.useReducer(D,L,_)},ze.useRef=function(D){return U.H.useRef(D)},ze.useState=function(D){return U.H.useState(D)},ze.useSyncExternalStore=function(D,L,_){return U.H.useSyncExternalStore(D,L,_)},ze.useTransition=function(){return U.H.useTransition()},ze.version="19.2.4",ze}var pv;function pm(){return pv||(pv=1,Vp.exports=DA()),Vp.exports}var v=pm();const Pn=Ku(v),g1=RA({__proto__:null,default:Pn},[v]);var qp={exports:{}},Ko={},Gp={exports:{}},Yp={};/**
|
|
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 hv;function zA(){return hv||(hv=1,(function(e){function n(z,K){var ee=z.length;z.push(K);e:for(;0<ee;){var le=ee-1>>>1,T=z[le];if(0<o(T,K))z[le]=K,z[ee]=T,ee=le;else break e}}function a(z){return z.length===0?null:z[0]}function l(z){if(z.length===0)return null;var K=z[0],ee=z.pop();if(ee!==K){z[0]=ee;e:for(var le=0,T=z.length,D=T>>>1;le<D;){var L=2*(le+1)-1,_=z[L],te=L+1,ne=z[te];if(0>o(_,ee))te<T&&0>o(ne,_)?(z[le]=ne,z[te]=ee,le=te):(z[le]=_,z[L]=ee,le=L);else if(te<T&&0>o(ne,ee))z[le]=ne,z[te]=ee,le=te;else break e}}return K}function o(z,K){var ee=z.sortIndex-K.sortIndex;return ee!==0?ee:z.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],h=[],y=1,g=null,w=3,b=!1,k=!1,S=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function O(z){for(var K=a(h);K!==null;){if(K.callback===null)l(h);else if(K.startTime<=z)l(h),K.sortIndex=K.expirationTime,n(p,K);else break;K=a(h)}}function I(z){if(S=!1,O(z),!k)if(a(p)!==null)k=!0,M||(M=!0,G());else{var K=a(h);K!==null&&W(I,K.startTime-z)}}var M=!1,U=-1,H=5,q=-1;function B(){return E?!0:!(e.unstable_now()-q<H)}function Y(){if(E=!1,M){var z=e.unstable_now();q=z;var K=!0;try{e:{k=!1,S&&(S=!1,N(U),U=-1),b=!0;var ee=w;try{t:{for(O(z),g=a(p);g!==null&&!(g.expirationTime>z&&B());){var le=g.callback;if(typeof le=="function"){g.callback=null,w=g.priorityLevel;var T=le(g.expirationTime<=z);if(z=e.unstable_now(),typeof T=="function"){g.callback=T,O(z),K=!0;break t}g===a(p)&&l(p),O(z)}else l(p);g=a(p)}if(g!==null)K=!0;else{var D=a(h);D!==null&&W(I,D.startTime-z),K=!1}}break e}finally{g=null,w=ee,b=!1}K=void 0}}finally{K?G():M=!1}}}var G;if(typeof j=="function")G=function(){j(Y)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,Z=he.port2;he.port1.onmessage=Y,G=function(){Z.postMessage(null)}}else G=function(){A(Y,0)};function W(z,K){U=A(function(){z(e.unstable_now())},K)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(z){switch(w){case 1:case 2:case 3:var K=3;break;default:K=w}var ee=w;w=K;try{return z()}finally{w=ee}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(z,K){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ee=w;w=z;try{return K()}finally{w=ee}},e.unstable_scheduleCallback=function(z,K,ee){var le=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?le+ee:le):ee=le,z){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=ee+T,z={id:y++,callback:K,priorityLevel:z,startTime:ee,expirationTime:T,sortIndex:-1},ee>le?(z.sortIndex=ee,n(h,z),a(p)===null&&z===a(h)&&(S?(N(U),U=-1):S=!0,W(I,ee-le))):(z.sortIndex=T,n(p,z),k||b||(k=!0,M||(M=!0,G()))),z},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(z){var K=w;return function(){var ee=w;w=K;try{return z.apply(this,arguments)}finally{w=ee}}}})(Yp)),Yp}var mv;function LA(){return mv||(mv=1,Gp.exports=zA()),Gp.exports}var Xp={exports:{}},Xt={};/**
|
|
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 gv;function IA(){if(gv)return Xt;gv=1;var e=pm();function n(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={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");function s(p,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:h,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Xt.createPortal=function(p,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return s(p,h,null,y)},Xt.flushSync=function(p){var h=u.T,y=l.p;try{if(u.T=null,l.p=2,p)return p()}finally{u.T=h,l.p=y,l.d.f()}},Xt.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(p,h))},Xt.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},Xt.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?l.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:w,fetchPriority:b}):y==="script"&&l.d.X(p,{crossOrigin:g,integrity:w,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Xt.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=f(h.as,h.crossOrigin);l.d.M(p,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(p)},Xt.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin);l.d.L(p,y,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Xt.preloadModule=function(p,h){if(typeof p=="string")if(h){var y=f(h.as,h.crossOrigin);l.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(p)},Xt.requestFormReset=function(p){l.d.r(p)},Xt.unstable_batchedUpdates=function(p,h){return p(h)},Xt.useFormState=function(p,h,y){return u.H.useFormState(p,h,y)},Xt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Xt.version="19.2.4",Xt}var yv;function y1(){if(yv)return Xp.exports;yv=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(),Xp.exports=IA(),Xp.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 xv;function BA(){if(xv)return Ko;xv=1;var e=LA(),n=pm(),a=y1();function l(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+r+" 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 s(t){var r=t,i=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(i=r.return),t=r.return;while(t)}return r.tag===3?i:null}function u(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(s(t)!==t)throw Error(l(188))}function h(t){var r=t.alternate;if(!r){if(r=s(t),r===null)throw Error(l(188));return r!==t?null:t}for(var i=t,c=r;;){var m=i.return;if(m===null)break;var x=m.alternate;if(x===null){if(c=m.return,c!==null){i=c;continue}break}if(m.child===x.child){for(x=m.child;x;){if(x===i)return p(m),t;if(x===c)return p(m),r;x=x.sibling}throw Error(l(188))}if(i.return!==c.return)i=m,c=x;else{for(var C=!1,R=m.child;R;){if(R===i){C=!0,i=m,c=x;break}if(R===c){C=!0,c=m,i=x;break}R=R.sibling}if(!C){for(R=x.child;R;){if(R===i){C=!0,i=x,c=m;break}if(R===c){C=!0,c=x,i=m;break}R=R.sibling}if(!C)throw Error(l(189))}}if(i.alternate!==c)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var g=Object.assign,w=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),j=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function G(t){return t===null||typeof t!="object"?null:(t=Y&&t[Y]||t["@@iterator"],typeof t=="function"?t:null)}var he=Symbol.for("react.client.reference");function Z(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===he?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case S:return"Fragment";case A:return"Profiler";case E:return"StrictMode";case I:return"Suspense";case M:return"SuspenseList";case q:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case k:return"Portal";case j:return t.displayName||"Context";case N:return(t._context.displayName||"Context")+".Consumer";case O:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case U:return r=t.displayName||null,r!==null?r:Z(t.type)||"Memo";case H:r=t._payload,t=t._init;try{return Z(t(r))}catch{}}return null}var W=Array.isArray,z=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},le=[],T=-1;function D(t){return{current:t}}function L(t){0>T||(t.current=le[T],le[T]=null,T--)}function _(t,r){T++,le[T]=t.current,t.current=r}var te=D(null),ne=D(null),ie=D(null),ae=D(null);function be(t,r){switch(_(ie,r),_(ne,t),_(te,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Ob(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Ob(r),t=Db(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}L(te),_(te,t)}function me(){L(te),L(ne),L(ie)}function _e(t){t.memoizedState!==null&&_(ae,t);var r=te.current,i=Db(r,t.type);r!==i&&(_(ne,t),_(te,i))}function De(t){ne.current===t&&(L(te),L(ne)),ae.current===t&&(L(ae),Vo._currentValue=ee)}var Be,ot;function at(t){if(Be===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Be=r&&r[1]||"",ot=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Be+t+ot}var vt=!1;function Ft(t,r){if(!t||vt)return"";vt=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(re){var J=re}Reflect.construct(t,[],de)}else{try{de.call()}catch(re){J=re}t.call(de.prototype)}}else{try{throw Error()}catch(re){J=re}(de=t())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(re){if(re&&J&&typeof re.stack=="string")return[re.stack,J.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=c.DetermineComponentFrameRoot(),C=x[0],R=x[1];if(C&&R){var P=C.split(`
|
|
44
|
+
`),Q=R.split(`
|
|
45
|
+
`);for(m=c=0;c<P.length&&!P[c].includes("DetermineComponentFrameRoot");)c++;for(;m<Q.length&&!Q[m].includes("DetermineComponentFrameRoot");)m++;if(c===P.length||m===Q.length)for(c=P.length-1,m=Q.length-1;1<=c&&0<=m&&P[c]!==Q[m];)m--;for(;1<=c&&0<=m;c--,m--)if(P[c]!==Q[m]){if(c!==1||m!==1)do if(c--,m--,0>m||P[c]!==Q[m]){var oe=`
|
|
46
|
+
`+P[c].replace(" at new "," at ");return t.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",t.displayName)),oe}while(1<=c&&0<=m);break}}}finally{vt=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?at(i):""}function Zt(t,r){switch(t.tag){case 26:case 27:case 5:return at(t.type);case 16:return at("Lazy");case 13:return t.child!==r&&r!==null?at("Suspense Fallback"):at("Suspense");case 19:return at("SuspenseList");case 0:case 15:return Ft(t.type,!1);case 11:return Ft(t.type.render,!1);case 1:return Ft(t.type,!0);case 31:return at("Activity");default:return""}}function aa(t){try{var r="",i=null;do r+=Zt(t,i),i=t,t=t.return;while(t);return r}catch(c){return`
|
|
47
|
+
Error generating stack: `+c.message+`
|
|
48
|
+
`+c.stack}}var qn=Object.prototype.hasOwnProperty,ar=e.unstable_scheduleCallback,jn=e.unstable_cancelCallback,wr=e.unstable_shouldYield,Sr=e.unstable_requestPaint,Rt=e.unstable_now,kr=e.unstable_getCurrentPriorityLevel,se=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,He=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,Wt=e.log,Gn=e.unstable_setDisableYieldValue,Ut=null,yt=null;function Mt(t){if(typeof Wt=="function"&&Gn(t),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(Ut,t)}catch{}}var st=Math.clz32?Math.clz32:xt,Tn=Math.log,We=Math.LN2;function xt(t){return t>>>=0,t===0?32:31-(Tn(t)/We|0)|0}var Cr=256,Er=262144,Xa=4194304;function Jt(t){var r=t&42;if(r!==0)return r;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&261888;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 Ml(t,r,i){var c=t.pendingLanes;if(c===0)return 0;var m=0,x=t.suspendedLanes,C=t.pingedLanes;t=t.warmLanes;var R=c&134217727;return R!==0?(c=R&~x,c!==0?m=Jt(c):(C&=R,C!==0?m=Jt(C):i||(i=R&~t,i!==0&&(m=Jt(i))))):(R=c&~x,R!==0?m=Jt(R):C!==0?m=Jt(C):i||(i=c&~t,i!==0&&(m=Jt(i)))),m===0?0:r!==0&&r!==m&&(r&x)===0&&(x=m&-m,i=r&-r,x>=i||x===32&&(i&4194048)!==0)?r:m}function Ar(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function lr(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Hs(){var t=Xa;return Xa<<=1,(Xa&62914560)===0&&(Xa=4194304),t}function Ol(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function Ka(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function $s(t,r,i,c,m,x){var C=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var R=t.entanglements,P=t.expirationTimes,Q=t.hiddenUpdates;for(i=C&~i;0<i;){var oe=31-st(i),de=1<<oe;R[oe]=0,P[oe]=-1;var J=Q[oe];if(J!==null)for(Q[oe]=null,oe=0;oe<J.length;oe++){var re=J[oe];re!==null&&(re.lane&=-536870913)}i&=~de}c!==0&&Vs(t,c,0),x!==0&&m===0&&t.tag!==0&&(t.suspendedLanes|=x&~(C&~r))}function Vs(t,r,i){t.pendingLanes|=r,t.suspendedLanes&=~r;var c=31-st(r);t.entangledLanes|=r,t.entanglements[c]=t.entanglements[c]|1073741824|i&261930}function qs(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var c=31-st(i),m=1<<c;m&r|t[c]&r&&(t[c]|=r),i&=~m}}function Gs(t,r){var i=r&-r;return i=(i&42)!==0?1:Dl(i),(i&(t.suspendedLanes|r))!==0?0:i}function Dl(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 Le(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ys(){var t=K.p;return t!==0?t:(t=window.event,t===void 0?32:rv(t.type))}function Qa(t,r){var i=K.p;try{return K.p=t,r()}finally{K.p=i}}var ir=Math.random().toString(36).slice(2),Ot="__reactFiber$"+ir,Yt="__reactProps$"+ir,la="__reactContainer$"+ir,ro="__reactEvents$"+ir,Ld="__reactListeners$"+ir,Id="__reactHandles$"+ir,Xs="__reactResources$"+ir,Za="__reactMarker$"+ir;function ao(t){delete t[Ot],delete t[Yt],delete t[ro],delete t[Ld],delete t[Id]}function Nr(t){var r=t[Ot];if(r)return r;for(var i=t.parentNode;i;){if(r=i[la]||i[Ot]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=Ub(t);t!==null;){if(i=t[Ot])return i;t=Ub(t)}return r}t=i,i=t.parentNode}return null}function ia(t){if(t=t[Ot]||t[la]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function Wa(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(l(33))}function oa(t){var r=t[Xs];return r||(r=t[Xs]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Et(t){t[Za]=!0}var Ks=new Set,Qs={};function jr(t,r){Tr(t,r),Tr(t+"Capture",r)}function Tr(t,r){for(Qs[t]=r,t=0;t<r.length;t++)Ks.add(r[t])}var zl=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]*$"),Zs={},Ws={};function or(t){return qn.call(Ws,t)?!0:qn.call(Zs,t)?!1:zl.test(t)?Ws[t]=!0:(Zs[t]=!0,!1)}function Ll(t,r,i){if(or(r))if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+i)}}function Ja(t,r,i){if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+i)}}function _n(t,r,i,c){if(c===null)t.removeAttribute(i);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(r,i,""+c)}}function en(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function lo(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function F(t,r,i){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,x=c.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return m.call(this)},set:function(C){i=""+C,x.call(this,C)}}),Object.defineProperty(t,r,{enumerable:c.enumerable}),{getValue:function(){return i},setValue:function(C){i=""+C},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function we(t){if(!t._valueTracker){var r=lo(t)?"checked":"value";t._valueTracker=F(t,r,""+t[r])}}function ce(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),c="";return t&&(c=lo(t)?t.checked?"true":"false":t.value),t=c,t!==i?(r.setValue(t),!0):!1}function pe(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}}var Pe=/[\n"\\]/g;function et(t){return t.replace(Pe,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function tn(t,r,i,c,m,x,C,R){t.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?t.type=C:t.removeAttribute("type"),r!=null?C==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+en(r)):t.value!==""+en(r)&&(t.value=""+en(r)):C!=="submit"&&C!=="reset"||t.removeAttribute("value"),r!=null?Xn(t,C,en(r)):i!=null?Xn(t,C,en(i)):c!=null&&t.removeAttribute("value"),m==null&&x!=null&&(t.defaultChecked=!!x),m!=null&&(t.checked=m&&typeof m!="function"&&typeof m!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?t.name=""+en(R):t.removeAttribute("name")}function Yn(t,r,i,c,m,x,C,R){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.type=x),r!=null||i!=null){if(!(x!=="submit"&&x!=="reset"||r!=null)){we(t);return}i=i!=null?""+en(i):"",r=r!=null?""+en(r):i,R||r===t.value||(t.value=r),t.defaultValue=r}c=c!=null?c:m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=R?t.checked:!!c,t.defaultChecked=!!c,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(t.name=C),we(t)}function Xn(t,r,i){r==="number"&&pe(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function Kn(t,r,i,c){if(t=t.options,r){r={};for(var m=0;m<i.length;m++)r["$"+i[m]]=!0;for(i=0;i<t.length;i++)m=r.hasOwnProperty("$"+t[i].value),t[i].selected!==m&&(t[i].selected=m),m&&c&&(t[i].defaultSelected=!0)}else{for(i=""+en(i),r=null,m=0;m<t.length;m++){if(t[m].value===i){t[m].selected=!0,c&&(t[m].defaultSelected=!0);return}r!==null||t[m].disabled||(r=t[m])}r!==null&&(r.selected=!0)}}function Il(t,r,i){if(r!=null&&(r=""+en(r),r!==t.value&&(t.value=r),i==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=i!=null?""+en(i):""}function Js(t,r,i,c){if(r==null){if(c!=null){if(i!=null)throw Error(l(92));if(W(c)){if(1<c.length)throw Error(l(93));c=c[0]}i=c}i==null&&(i=""),r=i}i=en(r),t.defaultValue=i,c=t.textContent,c===i&&c!==""&&c!==null&&(t.value=c),we(t)}function Bl(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var AE=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 _g(t,r,i){var c=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?c?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":c?t.setProperty(r,i):typeof i!="number"||i===0||AE.has(r)?r==="float"?t.cssFloat=i:t[r]=(""+i).trim():t[r]=i+"px"}function Rg(t,r,i){if(r!=null&&typeof r!="object")throw Error(l(62));if(t=t.style,i!=null){for(var c in i)!i.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var m in r)c=r[m],r.hasOwnProperty(m)&&i[m]!==c&&_g(t,m,c)}else for(var x in r)r.hasOwnProperty(x)&&_g(t,x,r[x])}function Bd(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 NE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),jE=/^[\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 ec(t){return jE.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function _r(){}var Pd=null;function Fd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Pl=null,Fl=null;function Mg(t){var r=ia(t);if(r&&(t=r.stateNode)){var i=t[Yt]||null;e:switch(t=r.stateNode,r.type){case"input":if(tn(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+et(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var c=i[r];if(c!==t&&c.form===t.form){var m=c[Yt]||null;if(!m)throw Error(l(90));tn(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(r=0;r<i.length;r++)c=i[r],c.form===t.form&&ce(c)}break e;case"textarea":Il(t,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&Kn(t,!!i.multiple,r,!1)}}}var Ud=!1;function Og(t,r,i){if(Ud)return t(r,i);Ud=!0;try{var c=t(r);return c}finally{if(Ud=!1,(Pl!==null||Fl!==null)&&(Uc(),Pl&&(r=Pl,t=Fl,Fl=Pl=null,Mg(r),t)))for(r=0;r<t.length;r++)Mg(t[r])}}function io(t,r){var i=t.stateNode;if(i===null)return null;var c=i[Yt]||null;if(c===null)return null;i=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(l(231,r,typeof i));return i}var Rr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hd=!1;if(Rr)try{var oo={};Object.defineProperty(oo,"passive",{get:function(){Hd=!0}}),window.addEventListener("test",oo,oo),window.removeEventListener("test",oo,oo)}catch{Hd=!1}var sa=null,$d=null,tc=null;function Dg(){if(tc)return tc;var t,r=$d,i=r.length,c,m="value"in sa?sa.value:sa.textContent,x=m.length;for(t=0;t<i&&r[t]===m[t];t++);var C=i-t;for(c=1;c<=C&&r[i-c]===m[x-c];c++);return tc=m.slice(t,1<c?1-c:void 0)}function nc(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function rc(){return!0}function zg(){return!1}function ln(t){function r(i,c,m,x,C){this._reactName=i,this._targetInst=m,this.type=c,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var R in t)t.hasOwnProperty(R)&&(i=t[R],this[R]=i?i(x):x[R]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?rc:zg,this.isPropagationStopped=zg,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=rc)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=rc)},persist:function(){},isPersistent:rc}),r}var el={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ac=ln(el),so=g({},el,{view:0,detail:0}),TE=ln(so),Vd,qd,co,lc=g({},so,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yd,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!==co&&(co&&t.type==="mousemove"?(Vd=t.screenX-co.screenX,qd=t.screenY-co.screenY):qd=Vd=0,co=t),Vd)},movementY:function(t){return"movementY"in t?t.movementY:qd}}),Lg=ln(lc),_E=g({},lc,{dataTransfer:0}),RE=ln(_E),ME=g({},so,{relatedTarget:0}),Gd=ln(ME),OE=g({},el,{animationName:0,elapsedTime:0,pseudoElement:0}),DE=ln(OE),zE=g({},el,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),LE=ln(zE),IE=g({},el,{data:0}),Ig=ln(IE),BE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PE={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"},FE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UE(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=FE[t])?!!r[t]:!1}function Yd(){return UE}var HE=g({},so,{key:function(t){if(t.key){var r=BE[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=nc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?PE[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yd,charCode:function(t){return t.type==="keypress"?nc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?nc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),$E=ln(HE),VE=g({},lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bg=ln(VE),qE=g({},so,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yd}),GE=ln(qE),YE=g({},el,{propertyName:0,elapsedTime:0,pseudoElement:0}),XE=ln(YE),KE=g({},lc,{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}),QE=ln(KE),ZE=g({},el,{newState:0,oldState:0}),WE=ln(ZE),JE=[9,13,27,32],Xd=Rr&&"CompositionEvent"in window,uo=null;Rr&&"documentMode"in document&&(uo=document.documentMode);var e2=Rr&&"TextEvent"in window&&!uo,Pg=Rr&&(!Xd||uo&&8<uo&&11>=uo),Fg=" ",Ug=!1;function Hg(t,r){switch(t){case"keyup":return JE.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $g(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ul=!1;function t2(t,r){switch(t){case"compositionend":return $g(r);case"keypress":return r.which!==32?null:(Ug=!0,Fg);case"textInput":return t=r.data,t===Fg&&Ug?null:t;default:return null}}function n2(t,r){if(Ul)return t==="compositionend"||!Xd&&Hg(t,r)?(t=Dg(),tc=$d=sa=null,Ul=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Pg&&r.locale!=="ko"?null:r.data;default:return null}}var r2={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 Vg(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!r2[t.type]:r==="textarea"}function qg(t,r,i,c){Pl?Fl?Fl.push(c):Fl=[c]:Pl=c,r=Xc(r,"onChange"),0<r.length&&(i=new ac("onChange","change",null,i,c),t.push({event:i,listeners:r}))}var fo=null,po=null;function a2(t){Nb(t,0)}function ic(t){var r=Wa(t);if(ce(r))return t}function Gg(t,r){if(t==="change")return r}var Yg=!1;if(Rr){var Kd;if(Rr){var Qd="oninput"in document;if(!Qd){var Xg=document.createElement("div");Xg.setAttribute("oninput","return;"),Qd=typeof Xg.oninput=="function"}Kd=Qd}else Kd=!1;Yg=Kd&&(!document.documentMode||9<document.documentMode)}function Kg(){fo&&(fo.detachEvent("onpropertychange",Qg),po=fo=null)}function Qg(t){if(t.propertyName==="value"&&ic(po)){var r=[];qg(r,po,t,Fd(t)),Og(a2,r)}}function l2(t,r,i){t==="focusin"?(Kg(),fo=r,po=i,fo.attachEvent("onpropertychange",Qg)):t==="focusout"&&Kg()}function i2(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ic(po)}function o2(t,r){if(t==="click")return ic(r)}function s2(t,r){if(t==="input"||t==="change")return ic(r)}function c2(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var mn=typeof Object.is=="function"?Object.is:c2;function ho(t,r){if(mn(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),c=Object.keys(r);if(i.length!==c.length)return!1;for(c=0;c<i.length;c++){var m=i[c];if(!qn.call(r,m)||!mn(t[m],r[m]))return!1}return!0}function Zg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Wg(t,r){var i=Zg(t);t=0;for(var c;i;){if(i.nodeType===3){if(c=t+i.textContent.length,t<=r&&c>=r)return{node:i,offset:r-t};t=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Zg(i)}}function Jg(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Jg(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function ey(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=pe(t.document);r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=pe(t.document)}return r}function Zd(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var u2=Rr&&"documentMode"in document&&11>=document.documentMode,Hl=null,Wd=null,mo=null,Jd=!1;function ty(t,r,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Jd||Hl==null||Hl!==pe(c)||(c=Hl,"selectionStart"in c&&Zd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),mo&&ho(mo,c)||(mo=c,c=Xc(Wd,"onSelect"),0<c.length&&(r=new ac("onSelect","select",null,r,i),t.push({event:r,listeners:c}),r.target=Hl)))}function tl(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var $l={animationend:tl("Animation","AnimationEnd"),animationiteration:tl("Animation","AnimationIteration"),animationstart:tl("Animation","AnimationStart"),transitionrun:tl("Transition","TransitionRun"),transitionstart:tl("Transition","TransitionStart"),transitioncancel:tl("Transition","TransitionCancel"),transitionend:tl("Transition","TransitionEnd")},ef={},ny={};Rr&&(ny=document.createElement("div").style,"AnimationEvent"in window||(delete $l.animationend.animation,delete $l.animationiteration.animation,delete $l.animationstart.animation),"TransitionEvent"in window||delete $l.transitionend.transition);function nl(t){if(ef[t])return ef[t];if(!$l[t])return t;var r=$l[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in ny)return ef[t]=r[i];return t}var ry=nl("animationend"),ay=nl("animationiteration"),ly=nl("animationstart"),d2=nl("transitionrun"),f2=nl("transitionstart"),p2=nl("transitioncancel"),iy=nl("transitionend"),oy=new Map,tf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");tf.push("scrollEnd");function Qn(t,r){oy.set(t,r),jr(r,[t])}var oc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Rn=[],Vl=0,nf=0;function sc(){for(var t=Vl,r=nf=Vl=0;r<t;){var i=Rn[r];Rn[r++]=null;var c=Rn[r];Rn[r++]=null;var m=Rn[r];Rn[r++]=null;var x=Rn[r];if(Rn[r++]=null,c!==null&&m!==null){var C=c.pending;C===null?m.next=m:(m.next=C.next,C.next=m),c.pending=m}x!==0&&sy(i,m,x)}}function cc(t,r,i,c){Rn[Vl++]=t,Rn[Vl++]=r,Rn[Vl++]=i,Rn[Vl++]=c,nf|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function rf(t,r,i,c){return cc(t,r,i,c),uc(t)}function rl(t,r){return cc(t,null,null,r),uc(t)}function sy(t,r,i){t.lanes|=i;var c=t.alternate;c!==null&&(c.lanes|=i);for(var m=!1,x=t.return;x!==null;)x.childLanes|=i,c=x.alternate,c!==null&&(c.childLanes|=i),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&&r!==null&&(m=31-st(i),t=x.hiddenUpdates,c=t[m],c===null?t[m]=[r]:c.push(r),r.lane=i|536870912),x):null}function uc(t){if(50<Io)throw Io=0,pp=null,Error(l(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var ql={};function h2(t,r,i,c){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(t,r,i,c){return new h2(t,r,i,c)}function af(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Mr(t,r){var i=t.alternate;return i===null?(i=gn(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function cy(t,r){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,r=i.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function dc(t,r,i,c,m,x){var C=0;if(c=t,typeof t=="function")af(t)&&(C=1);else if(typeof t=="string")C=bA(t,i,te.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case q:return t=gn(31,i,r,m),t.elementType=q,t.lanes=x,t;case S:return al(i.children,m,x,r);case E:C=8,m|=24;break;case A:return t=gn(12,i,r,m|2),t.elementType=A,t.lanes=x,t;case I:return t=gn(13,i,r,m),t.elementType=I,t.lanes=x,t;case M:return t=gn(19,i,r,m),t.elementType=M,t.lanes=x,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j:C=10;break e;case N:C=9;break e;case O:C=11;break e;case U:C=14;break e;case H:C=16,c=null;break e}C=29,i=Error(l(130,t===null?"null":typeof t,"")),c=null}return r=gn(C,i,r,m),r.elementType=t,r.type=c,r.lanes=x,r}function al(t,r,i,c){return t=gn(7,t,c,r),t.lanes=i,t}function lf(t,r,i){return t=gn(6,t,null,r),t.lanes=i,t}function uy(t){var r=gn(18,null,null,0);return r.stateNode=t,r}function of(t,r,i){return r=gn(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var dy=new WeakMap;function Mn(t,r){if(typeof t=="object"&&t!==null){var i=dy.get(t);return i!==void 0?i:(r={value:t,source:r,stack:aa(r)},dy.set(t,r),r)}return{value:t,source:r,stack:aa(r)}}var Gl=[],Yl=0,fc=null,go=0,On=[],Dn=0,ca=null,sr=1,cr="";function Or(t,r){Gl[Yl++]=go,Gl[Yl++]=fc,fc=t,go=r}function fy(t,r,i){On[Dn++]=sr,On[Dn++]=cr,On[Dn++]=ca,ca=t;var c=sr;t=cr;var m=32-st(c)-1;c&=~(1<<m),i+=1;var x=32-st(r)+m;if(30<x){var C=m-m%5;x=(c&(1<<C)-1).toString(32),c>>=C,m-=C,sr=1<<32-st(r)+m|i<<m|c,cr=x+t}else sr=1<<x|i<<m|c,cr=t}function sf(t){t.return!==null&&(Or(t,1),fy(t,1,0))}function cf(t){for(;t===fc;)fc=Gl[--Yl],Gl[Yl]=null,go=Gl[--Yl],Gl[Yl]=null;for(;t===ca;)ca=On[--Dn],On[Dn]=null,cr=On[--Dn],On[Dn]=null,sr=On[--Dn],On[Dn]=null}function py(t,r){On[Dn++]=sr,On[Dn++]=cr,On[Dn++]=ca,sr=r.id,cr=r.overflow,ca=t}var Ht=null,mt=null,Qe=!1,ua=null,zn=!1,uf=Error(l(519));function da(t){var r=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yo(Mn(r,t)),uf}function hy(t){var r=t.stateNode,i=t.type,c=t.memoizedProps;switch(r[Ot]=t,r[Yt]=c,i){case"dialog":Ge("cancel",r),Ge("close",r);break;case"iframe":case"object":case"embed":Ge("load",r);break;case"video":case"audio":for(i=0;i<Po.length;i++)Ge(Po[i],r);break;case"source":Ge("error",r);break;case"img":case"image":case"link":Ge("error",r),Ge("load",r);break;case"details":Ge("toggle",r);break;case"input":Ge("invalid",r),Yn(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ge("invalid",r);break;case"textarea":Ge("invalid",r),Js(r,c.value,c.defaultValue,c.children)}i=c.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||c.suppressHydrationWarning===!0||Rb(r.textContent,i)?(c.popover!=null&&(Ge("beforetoggle",r),Ge("toggle",r)),c.onScroll!=null&&Ge("scroll",r),c.onScrollEnd!=null&&Ge("scrollend",r),c.onClick!=null&&(r.onclick=_r),r=!0):r=!1,r||da(t,!0)}function my(t){for(Ht=t.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:zn=!1;return;case 27:case 3:zn=!0;return;default:Ht=Ht.return}}function Xl(t){if(t!==Ht)return!1;if(!Qe)return my(t),Qe=!0,!1;var r=t.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||jp(t.type,t.memoizedProps)),i=!i),i&&mt&&da(t),my(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));mt=Fb(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));mt=Fb(t)}else r===27?(r=mt,Ea(t.type)?(t=Op,Op=null,mt=t):mt=r):mt=Ht?In(t.stateNode.nextSibling):null;return!0}function ll(){mt=Ht=null,Qe=!1}function df(){var t=ua;return t!==null&&(un===null?un=t:un.push.apply(un,t),ua=null),t}function yo(t){ua===null?ua=[t]:ua.push(t)}var ff=D(null),il=null,Dr=null;function fa(t,r,i){_(ff,r._currentValue),r._currentValue=i}function zr(t){t._currentValue=ff.current,L(ff)}function pf(t,r,i){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===i)break;t=t.return}}function hf(t,r,i,c){var m=t.child;for(m!==null&&(m.return=t);m!==null;){var x=m.dependencies;if(x!==null){var C=m.child;x=x.firstContext;e:for(;x!==null;){var R=x;x=m;for(var P=0;P<r.length;P++)if(R.context===r[P]){x.lanes|=i,R=x.alternate,R!==null&&(R.lanes|=i),pf(x.return,i,t),c||(C=null);break e}x=R.next}}else if(m.tag===18){if(C=m.return,C===null)throw Error(l(341));C.lanes|=i,x=C.alternate,x!==null&&(x.lanes|=i),pf(C,i,t),C=null}else C=m.child;if(C!==null)C.return=m;else for(C=m;C!==null;){if(C===t){C=null;break}if(m=C.sibling,m!==null){m.return=C.return,C=m;break}C=C.return}m=C}}function Kl(t,r,i,c){t=null;for(var m=r,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 C=m.alternate;if(C===null)throw Error(l(387));if(C=C.memoizedProps,C!==null){var R=m.type;mn(m.pendingProps.value,C.value)||(t!==null?t.push(R):t=[R])}}else if(m===ae.current){if(C=m.alternate,C===null)throw Error(l(387));C.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(t!==null?t.push(Vo):t=[Vo])}m=m.return}t!==null&&hf(r,t,i,c),r.flags|=262144}function pc(t){for(t=t.firstContext;t!==null;){if(!mn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ol(t){il=t,Dr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function $t(t){return gy(il,t)}function hc(t,r){return il===null&&ol(t),gy(t,r)}function gy(t,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},Dr===null){if(t===null)throw Error(l(308));Dr=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Dr=Dr.next=r;return i}var m2=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(i,c){t.push(c)}};this.abort=function(){r.aborted=!0,t.forEach(function(i){return i()})}},g2=e.unstable_scheduleCallback,y2=e.unstable_NormalPriority,At={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mf(){return{controller:new m2,data:new Map,refCount:0}}function xo(t){t.refCount--,t.refCount===0&&g2(y2,function(){t.controller.abort()})}var bo=null,gf=0,Ql=0,Zl=null;function x2(t,r){if(bo===null){var i=bo=[];gf=0,Ql=bp(),Zl={status:"pending",value:void 0,then:function(c){i.push(c)}}}return gf++,r.then(yy,yy),r}function yy(){if(--gf===0&&bo!==null){Zl!==null&&(Zl.status="fulfilled");var t=bo;bo=null,Ql=0,Zl=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function b2(t,r){var i=[],c={status:"pending",value:null,reason:null,then:function(m){i.push(m)}};return t.then(function(){c.status="fulfilled",c.value=r;for(var m=0;m<i.length;m++)(0,i[m])(r)},function(m){for(c.status="rejected",c.reason=m,m=0;m<i.length;m++)(0,i[m])(void 0)}),c}var xy=z.S;z.S=function(t,r){tb=Rt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&x2(t,r),xy!==null&&xy(t,r)};var sl=D(null);function yf(){var t=sl.current;return t!==null?t:ft.pooledCache}function mc(t,r){r===null?_(sl,sl.current):_(sl,r.pool)}function by(){var t=yf();return t===null?null:{parent:At._currentValue,pool:t}}var Wl=Error(l(460)),xf=Error(l(474)),gc=Error(l(542)),yc={then:function(){}};function vy(t){return t=t.status,t==="fulfilled"||t==="rejected"}function wy(t,r,i){switch(i=t[i],i===void 0?t.push(r):i!==r&&(r.then(_r,_r),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,ky(t),t;default:if(typeof r.status=="string")r.then(_r,_r);else{if(t=ft,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=r,t.status="pending",t.then(function(c){if(r.status==="pending"){var m=r;m.status="fulfilled",m.value=c}},function(c){if(r.status==="pending"){var m=r;m.status="rejected",m.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,ky(t),t}throw ul=r,Wl}}function cl(t){try{var r=t._init;return r(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ul=i,Wl):i}}var ul=null;function Sy(){if(ul===null)throw Error(l(459));var t=ul;return ul=null,t}function ky(t){if(t===Wl||t===gc)throw Error(l(483))}var Jl=null,vo=0;function xc(t){var r=vo;return vo+=1,Jl===null&&(Jl=[]),wy(Jl,t,r)}function wo(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function bc(t,r){throw r.$$typeof===w?Error(l(525)):(t=Object.prototype.toString.call(r),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Cy(t){function r(V,$){if(t){var X=V.deletions;X===null?(V.deletions=[$],V.flags|=16):X.push($)}}function i(V,$){if(!t)return null;for(;$!==null;)r(V,$),$=$.sibling;return null}function c(V){for(var $=new Map;V!==null;)V.key!==null?$.set(V.key,V):$.set(V.index,V),V=V.sibling;return $}function m(V,$){return V=Mr(V,$),V.index=0,V.sibling=null,V}function x(V,$,X){return V.index=X,t?(X=V.alternate,X!==null?(X=X.index,X<$?(V.flags|=67108866,$):X):(V.flags|=67108866,$)):(V.flags|=1048576,$)}function C(V){return t&&V.alternate===null&&(V.flags|=67108866),V}function R(V,$,X,ue){return $===null||$.tag!==6?($=lf(X,V.mode,ue),$.return=V,$):($=m($,X),$.return=V,$)}function P(V,$,X,ue){var Te=X.type;return Te===S?oe(V,$,X.props.children,ue,X.key):$!==null&&($.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===H&&cl(Te)===$.type)?($=m($,X.props),wo($,X),$.return=V,$):($=dc(X.type,X.key,X.props,null,V.mode,ue),wo($,X),$.return=V,$)}function Q(V,$,X,ue){return $===null||$.tag!==4||$.stateNode.containerInfo!==X.containerInfo||$.stateNode.implementation!==X.implementation?($=of(X,V.mode,ue),$.return=V,$):($=m($,X.children||[]),$.return=V,$)}function oe(V,$,X,ue,Te){return $===null||$.tag!==7?($=al(X,V.mode,ue,Te),$.return=V,$):($=m($,X),$.return=V,$)}function de(V,$,X){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=lf(""+$,V.mode,X),$.return=V,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case b:return X=dc($.type,$.key,$.props,null,V.mode,X),wo(X,$),X.return=V,X;case k:return $=of($,V.mode,X),$.return=V,$;case H:return $=cl($),de(V,$,X)}if(W($)||G($))return $=al($,V.mode,X,null),$.return=V,$;if(typeof $.then=="function")return de(V,xc($),X);if($.$$typeof===j)return de(V,hc(V,$),X);bc(V,$)}return null}function J(V,$,X,ue){var Te=$!==null?$.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Te!==null?null:R(V,$,""+X,ue);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return X.key===Te?P(V,$,X,ue):null;case k:return X.key===Te?Q(V,$,X,ue):null;case H:return X=cl(X),J(V,$,X,ue)}if(W(X)||G(X))return Te!==null?null:oe(V,$,X,ue,null);if(typeof X.then=="function")return J(V,$,xc(X),ue);if(X.$$typeof===j)return J(V,$,hc(V,X),ue);bc(V,X)}return null}function re(V,$,X,ue,Te){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return V=V.get(X)||null,R($,V,""+ue,Te);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case b:return V=V.get(ue.key===null?X:ue.key)||null,P($,V,ue,Te);case k:return V=V.get(ue.key===null?X:ue.key)||null,Q($,V,ue,Te);case H:return ue=cl(ue),re(V,$,X,ue,Te)}if(W(ue)||G(ue))return V=V.get(X)||null,oe($,V,ue,Te,null);if(typeof ue.then=="function")return re(V,$,X,xc(ue),Te);if(ue.$$typeof===j)return re(V,$,X,hc($,ue),Te);bc($,ue)}return null}function Se(V,$,X,ue){for(var Te=null,tt=null,Ee=$,Fe=$=0,Ke=null;Ee!==null&&Fe<X.length;Fe++){Ee.index>Fe?(Ke=Ee,Ee=null):Ke=Ee.sibling;var nt=J(V,Ee,X[Fe],ue);if(nt===null){Ee===null&&(Ee=Ke);break}t&&Ee&&nt.alternate===null&&r(V,Ee),$=x(nt,$,Fe),tt===null?Te=nt:tt.sibling=nt,tt=nt,Ee=Ke}if(Fe===X.length)return i(V,Ee),Qe&&Or(V,Fe),Te;if(Ee===null){for(;Fe<X.length;Fe++)Ee=de(V,X[Fe],ue),Ee!==null&&($=x(Ee,$,Fe),tt===null?Te=Ee:tt.sibling=Ee,tt=Ee);return Qe&&Or(V,Fe),Te}for(Ee=c(Ee);Fe<X.length;Fe++)Ke=re(Ee,V,Fe,X[Fe],ue),Ke!==null&&(t&&Ke.alternate!==null&&Ee.delete(Ke.key===null?Fe:Ke.key),$=x(Ke,$,Fe),tt===null?Te=Ke:tt.sibling=Ke,tt=Ke);return t&&Ee.forEach(function(_a){return r(V,_a)}),Qe&&Or(V,Fe),Te}function Me(V,$,X,ue){if(X==null)throw Error(l(151));for(var Te=null,tt=null,Ee=$,Fe=$=0,Ke=null,nt=X.next();Ee!==null&&!nt.done;Fe++,nt=X.next()){Ee.index>Fe?(Ke=Ee,Ee=null):Ke=Ee.sibling;var _a=J(V,Ee,nt.value,ue);if(_a===null){Ee===null&&(Ee=Ke);break}t&&Ee&&_a.alternate===null&&r(V,Ee),$=x(_a,$,Fe),tt===null?Te=_a:tt.sibling=_a,tt=_a,Ee=Ke}if(nt.done)return i(V,Ee),Qe&&Or(V,Fe),Te;if(Ee===null){for(;!nt.done;Fe++,nt=X.next())nt=de(V,nt.value,ue),nt!==null&&($=x(nt,$,Fe),tt===null?Te=nt:tt.sibling=nt,tt=nt);return Qe&&Or(V,Fe),Te}for(Ee=c(Ee);!nt.done;Fe++,nt=X.next())nt=re(Ee,V,Fe,nt.value,ue),nt!==null&&(t&&nt.alternate!==null&&Ee.delete(nt.key===null?Fe:nt.key),$=x(nt,$,Fe),tt===null?Te=nt:tt.sibling=nt,tt=nt);return t&&Ee.forEach(function(_A){return r(V,_A)}),Qe&&Or(V,Fe),Te}function dt(V,$,X,ue){if(typeof X=="object"&&X!==null&&X.type===S&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case b:e:{for(var Te=X.key;$!==null;){if($.key===Te){if(Te=X.type,Te===S){if($.tag===7){i(V,$.sibling),ue=m($,X.props.children),ue.return=V,V=ue;break e}}else if($.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===H&&cl(Te)===$.type){i(V,$.sibling),ue=m($,X.props),wo(ue,X),ue.return=V,V=ue;break e}i(V,$);break}else r(V,$);$=$.sibling}X.type===S?(ue=al(X.props.children,V.mode,ue,X.key),ue.return=V,V=ue):(ue=dc(X.type,X.key,X.props,null,V.mode,ue),wo(ue,X),ue.return=V,V=ue)}return C(V);case k:e:{for(Te=X.key;$!==null;){if($.key===Te)if($.tag===4&&$.stateNode.containerInfo===X.containerInfo&&$.stateNode.implementation===X.implementation){i(V,$.sibling),ue=m($,X.children||[]),ue.return=V,V=ue;break e}else{i(V,$);break}else r(V,$);$=$.sibling}ue=of(X,V.mode,ue),ue.return=V,V=ue}return C(V);case H:return X=cl(X),dt(V,$,X,ue)}if(W(X))return Se(V,$,X,ue);if(G(X)){if(Te=G(X),typeof Te!="function")throw Error(l(150));return X=Te.call(X),Me(V,$,X,ue)}if(typeof X.then=="function")return dt(V,$,xc(X),ue);if(X.$$typeof===j)return dt(V,$,hc(V,X),ue);bc(V,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,$!==null&&$.tag===6?(i(V,$.sibling),ue=m($,X),ue.return=V,V=ue):(i(V,$),ue=lf(X,V.mode,ue),ue.return=V,V=ue),C(V)):i(V,$)}return function(V,$,X,ue){try{vo=0;var Te=dt(V,$,X,ue);return Jl=null,Te}catch(Ee){if(Ee===Wl||Ee===gc)throw Ee;var tt=gn(29,Ee,null,V.mode);return tt.lanes=ue,tt.return=V,tt}finally{}}}var dl=Cy(!0),Ey=Cy(!1),pa=!1;function bf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vf(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ha(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ma(t,r,i){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(rt&2)!==0){var m=c.pending;return m===null?r.next=r:(r.next=m.next,m.next=r),c.pending=r,r=uc(t),sy(t,null,i),r}return cc(t,c,r,i),uc(t)}function So(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var c=r.lanes;c&=t.pendingLanes,i|=c,r.lanes=i,qs(t,i)}}function wf(t,r){var i=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var m=null,x=null;if(i=i.firstBaseUpdate,i!==null){do{var C={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};x===null?m=x=C:x=x.next=C,i=i.next}while(i!==null);x===null?m=x=r:x=x.next=r}else m=x=r;i={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:x,shared:c.shared,callbacks:c.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}var Sf=!1;function ko(){if(Sf){var t=Zl;if(t!==null)throw t}}function Co(t,r,i,c){Sf=!1;var m=t.updateQueue;pa=!1;var x=m.firstBaseUpdate,C=m.lastBaseUpdate,R=m.shared.pending;if(R!==null){m.shared.pending=null;var P=R,Q=P.next;P.next=null,C===null?x=Q:C.next=Q,C=P;var oe=t.alternate;oe!==null&&(oe=oe.updateQueue,R=oe.lastBaseUpdate,R!==C&&(R===null?oe.firstBaseUpdate=Q:R.next=Q,oe.lastBaseUpdate=P))}if(x!==null){var de=m.baseState;C=0,oe=Q=P=null,R=x;do{var J=R.lane&-536870913,re=J!==R.lane;if(re?(Xe&J)===J:(c&J)===J){J!==0&&J===Ql&&(Sf=!0),oe!==null&&(oe=oe.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Se=t,Me=R;J=r;var dt=i;switch(Me.tag){case 1:if(Se=Me.payload,typeof Se=="function"){de=Se.call(dt,de,J);break e}de=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Me.payload,J=typeof Se=="function"?Se.call(dt,de,J):Se,J==null)break e;de=g({},de,J);break e;case 2:pa=!0}}J=R.callback,J!==null&&(t.flags|=64,re&&(t.flags|=8192),re=m.callbacks,re===null?m.callbacks=[J]:re.push(J))}else re={lane:J,tag:R.tag,payload:R.payload,callback:R.callback,next:null},oe===null?(Q=oe=re,P=de):oe=oe.next=re,C|=J;if(R=R.next,R===null){if(R=m.shared.pending,R===null)break;re=R,R=re.next,re.next=null,m.lastBaseUpdate=re,m.shared.pending=null}}while(!0);oe===null&&(P=de),m.baseState=P,m.firstBaseUpdate=Q,m.lastBaseUpdate=oe,x===null&&(m.shared.lanes=0),va|=C,t.lanes=C,t.memoizedState=de}}function Ay(t,r){if(typeof t!="function")throw Error(l(191,t));t.call(r)}function Ny(t,r){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)Ay(i[t],r)}var ei=D(null),vc=D(0);function jy(t,r){t=Vr,_(vc,t),_(ei,r),Vr=t|r.baseLanes}function kf(){_(vc,Vr),_(ei,ei.current)}function Cf(){Vr=vc.current,L(ei),L(vc)}var yn=D(null),Ln=null;function ga(t){var r=t.alternate;_(kt,kt.current&1),_(yn,t),Ln===null&&(r===null||ei.current!==null||r.memoizedState!==null)&&(Ln=t)}function Ef(t){_(kt,kt.current),_(yn,t),Ln===null&&(Ln=t)}function Ty(t){t.tag===22?(_(kt,kt.current),_(yn,t),Ln===null&&(Ln=t)):ya()}function ya(){_(kt,kt.current),_(yn,yn.current)}function xn(t){L(yn),Ln===t&&(Ln=null),L(kt)}var kt=D(0);function wc(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Rp(i)||Mp(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Lr=0,Ie=null,ct=null,Nt=null,Sc=!1,ti=!1,fl=!1,kc=0,Eo=0,ni=null,v2=0;function wt(){throw Error(l(321))}function Af(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!mn(t[i],r[i]))return!1;return!0}function Nf(t,r,i,c,m,x){return Lr=x,Ie=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=t===null||t.memoizedState===null?fx:Hf,fl=!1,x=i(c,m),fl=!1,ti&&(x=Ry(r,i,c,m)),_y(t),x}function _y(t){z.H=jo;var r=ct!==null&&ct.next!==null;if(Lr=0,Nt=ct=Ie=null,Sc=!1,Eo=0,ni=null,r)throw Error(l(300));t===null||jt||(t=t.dependencies,t!==null&&pc(t)&&(jt=!0))}function Ry(t,r,i,c){Ie=t;var m=0;do{if(ti&&(ni=null),Eo=0,ti=!1,25<=m)throw Error(l(301));if(m+=1,Nt=ct=null,t.updateQueue!=null){var x=t.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}z.H=px,x=r(i,c)}while(ti);return x}function w2(){var t=z.H,r=t.useState()[0];return r=typeof r.then=="function"?Ao(r):r,t=t.useState()[0],(ct!==null?ct.memoizedState:null)!==t&&(Ie.flags|=1024),r}function jf(){var t=kc!==0;return kc=0,t}function Tf(t,r,i){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~i}function _f(t){if(Sc){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Sc=!1}Lr=0,Nt=ct=Ie=null,ti=!1,Eo=kc=0,ni=null}function nn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Ie.memoizedState=Nt=t:Nt=Nt.next=t,Nt}function Ct(){if(ct===null){var t=Ie.alternate;t=t!==null?t.memoizedState:null}else t=ct.next;var r=Nt===null?Ie.memoizedState:Nt.next;if(r!==null)Nt=r,ct=t;else{if(t===null)throw Ie.alternate===null?Error(l(467)):Error(l(310));ct=t,t={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},Nt===null?Ie.memoizedState=Nt=t:Nt=Nt.next=t}return Nt}function Cc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(t){var r=Eo;return Eo+=1,ni===null&&(ni=[]),t=wy(ni,t,r),r=Ie,(Nt===null?r.memoizedState:Nt.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?fx:Hf),t}function Ec(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ao(t);if(t.$$typeof===j)return $t(t)}throw Error(l(438,String(t)))}function Rf(t){var r=null,i=Ie.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var c=Ie.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(m){return m.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Cc(),Ie.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(t),c=0;c<t;c++)i[c]=B;return r.index++,i}function Ir(t,r){return typeof r=="function"?r(t):r}function Ac(t){var r=Ct();return Mf(r,ct,t)}function Mf(t,r,i){var c=t.queue;if(c===null)throw Error(l(311));c.lastRenderedReducer=i;var m=t.baseQueue,x=c.pending;if(x!==null){if(m!==null){var C=m.next;m.next=x.next,x.next=C}r.baseQueue=m=x,c.pending=null}if(x=t.baseState,m===null)t.memoizedState=x;else{r=m.next;var R=C=null,P=null,Q=r,oe=!1;do{var de=Q.lane&-536870913;if(de!==Q.lane?(Xe&de)===de:(Lr&de)===de){var J=Q.revertLane;if(J===0)P!==null&&(P=P.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),de===Ql&&(oe=!0);else if((Lr&J)===J){Q=Q.next,J===Ql&&(oe=!0);continue}else de={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},P===null?(R=P=de,C=x):P=P.next=de,Ie.lanes|=J,va|=J;de=Q.action,fl&&i(x,de),x=Q.hasEagerState?Q.eagerState:i(x,de)}else J={lane:de,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},P===null?(R=P=J,C=x):P=P.next=J,Ie.lanes|=de,va|=de;Q=Q.next}while(Q!==null&&Q!==r);if(P===null?C=x:P.next=R,!mn(x,t.memoizedState)&&(jt=!0,oe&&(i=Zl,i!==null)))throw i;t.memoizedState=x,t.baseState=C,t.baseQueue=P,c.lastRenderedState=x}return m===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Of(t){var r=Ct(),i=r.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=t;var c=i.dispatch,m=i.pending,x=r.memoizedState;if(m!==null){i.pending=null;var C=m=m.next;do x=t(x,C.action),C=C.next;while(C!==m);mn(x,r.memoizedState)||(jt=!0),r.memoizedState=x,r.baseQueue===null&&(r.baseState=x),i.lastRenderedState=x}return[x,c]}function My(t,r,i){var c=Ie,m=Ct(),x=Qe;if(x){if(i===void 0)throw Error(l(407));i=i()}else i=r();var C=!mn((ct||m).memoizedState,i);if(C&&(m.memoizedState=i,jt=!0),m=m.queue,Lf(zy.bind(null,c,m,t),[t]),m.getSnapshot!==r||C||Nt!==null&&Nt.memoizedState.tag&1){if(c.flags|=2048,ri(9,{destroy:void 0},Dy.bind(null,c,m,i,r),null),ft===null)throw Error(l(349));x||(Lr&127)!==0||Oy(c,r,i)}return i}function Oy(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=Ie.updateQueue,r===null?(r=Cc(),Ie.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function Dy(t,r,i,c){r.value=i,r.getSnapshot=c,Ly(r)&&Iy(t)}function zy(t,r,i){return i(function(){Ly(r)&&Iy(t)})}function Ly(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!mn(t,i)}catch{return!0}}function Iy(t){var r=rl(t,2);r!==null&&dn(r,t,2)}function Df(t){var r=nn();if(typeof t=="function"){var i=t;if(t=i(),fl){Mt(!0);try{i()}finally{Mt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ir,lastRenderedState:t},r}function By(t,r,i,c){return t.baseState=i,Mf(t,ct,typeof c=="function"?c:Ir)}function S2(t,r,i,c,m){if(Tc(t))throw Error(l(485));if(t=r.action,t!==null){var x={payload:m,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};z.T!==null?i(!0):x.isTransition=!1,c(x),i=r.pending,i===null?(x.next=r.pending=x,Py(r,x)):(x.next=i.next,r.pending=i.next=x)}}function Py(t,r){var i=r.action,c=r.payload,m=t.state;if(r.isTransition){var x=z.T,C={};z.T=C;try{var R=i(m,c),P=z.S;P!==null&&P(C,R),Fy(t,r,R)}catch(Q){zf(t,r,Q)}finally{x!==null&&C.types!==null&&(x.types=C.types),z.T=x}}else try{x=i(m,c),Fy(t,r,x)}catch(Q){zf(t,r,Q)}}function Fy(t,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(c){Uy(t,r,c)},function(c){return zf(t,r,c)}):Uy(t,r,i)}function Uy(t,r,i){r.status="fulfilled",r.value=i,Hy(r),t.state=i,r=t.pending,r!==null&&(i=r.next,i===r?t.pending=null:(i=i.next,r.next=i,Py(t,i)))}function zf(t,r,i){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=i,Hy(r),r=r.next;while(r!==c)}t.action=null}function Hy(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function $y(t,r){return r}function Vy(t,r){if(Qe){var i=ft.formState;if(i!==null){e:{var c=Ie;if(Qe){if(mt){t:{for(var m=mt,x=zn;m.nodeType!==8;){if(!x){m=null;break t}if(m=In(m.nextSibling),m===null){m=null;break t}}x=m.data,m=x==="F!"||x==="F"?m:null}if(m){mt=In(m.nextSibling),c=m.data==="F!";break e}}da(c)}c=!1}c&&(r=i[0])}}return i=nn(),i.memoizedState=i.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$y,lastRenderedState:r},i.queue=c,i=cx.bind(null,Ie,c),c.dispatch=i,c=Df(!1),x=Uf.bind(null,Ie,!1,c.queue),c=nn(),m={state:r,dispatch:null,action:t,pending:null},c.queue=m,i=S2.bind(null,Ie,m,x,i),m.dispatch=i,c.memoizedState=t,[r,i,!1]}function qy(t){var r=Ct();return Gy(r,ct,t)}function Gy(t,r,i){if(r=Mf(t,r,$y)[0],t=Ac(Ir)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=Ao(r)}catch(C){throw C===Wl?gc:C}else c=r;r=Ct();var m=r.queue,x=m.dispatch;return i!==r.memoizedState&&(Ie.flags|=2048,ri(9,{destroy:void 0},k2.bind(null,m,i),null)),[c,x,t]}function k2(t,r){t.action=r}function Yy(t){var r=Ct(),i=ct;if(i!==null)return Gy(r,i,t);Ct(),r=r.memoizedState,i=Ct();var c=i.queue.dispatch;return i.memoizedState=t,[r,c,!1]}function ri(t,r,i,c){return t={tag:t,create:i,deps:c,inst:r,next:null},r=Ie.updateQueue,r===null&&(r=Cc(),Ie.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=t.next=t:(c=i.next,i.next=t,t.next=c,r.lastEffect=t),t}function Xy(){return Ct().memoizedState}function Nc(t,r,i,c){var m=nn();Ie.flags|=t,m.memoizedState=ri(1|r,{destroy:void 0},i,c===void 0?null:c)}function jc(t,r,i,c){var m=Ct();c=c===void 0?null:c;var x=m.memoizedState.inst;ct!==null&&c!==null&&Af(c,ct.memoizedState.deps)?m.memoizedState=ri(r,x,i,c):(Ie.flags|=t,m.memoizedState=ri(1|r,x,i,c))}function Ky(t,r){Nc(8390656,8,t,r)}function Lf(t,r){jc(2048,8,t,r)}function C2(t){Ie.flags|=4;var r=Ie.updateQueue;if(r===null)r=Cc(),Ie.updateQueue=r,r.events=[t];else{var i=r.events;i===null?r.events=[t]:i.push(t)}}function Qy(t){var r=Ct().memoizedState;return C2({ref:r,nextImpl:t}),function(){if((rt&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}function Zy(t,r){return jc(4,2,t,r)}function Wy(t,r){return jc(4,4,t,r)}function Jy(t,r){if(typeof r=="function"){t=t();var i=r(t);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function ex(t,r,i){i=i!=null?i.concat([t]):null,jc(4,4,Jy.bind(null,r,t),i)}function If(){}function tx(t,r){var i=Ct();r=r===void 0?null:r;var c=i.memoizedState;return r!==null&&Af(r,c[1])?c[0]:(i.memoizedState=[t,r],t)}function nx(t,r){var i=Ct();r=r===void 0?null:r;var c=i.memoizedState;if(r!==null&&Af(r,c[1]))return c[0];if(c=t(),fl){Mt(!0);try{t()}finally{Mt(!1)}}return i.memoizedState=[c,r],c}function Bf(t,r,i){return i===void 0||(Lr&1073741824)!==0&&(Xe&261930)===0?t.memoizedState=r:(t.memoizedState=i,t=rb(),Ie.lanes|=t,va|=t,i)}function rx(t,r,i,c){return mn(i,r)?i:ei.current!==null?(t=Bf(t,i,c),mn(t,r)||(jt=!0),t):(Lr&42)===0||(Lr&1073741824)!==0&&(Xe&261930)===0?(jt=!0,t.memoizedState=i):(t=rb(),Ie.lanes|=t,va|=t,r)}function ax(t,r,i,c,m){var x=K.p;K.p=x!==0&&8>x?x:8;var C=z.T,R={};z.T=R,Uf(t,!1,r,i);try{var P=m(),Q=z.S;if(Q!==null&&Q(R,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var oe=b2(P,c);No(t,r,oe,wn(t))}else No(t,r,c,wn(t))}catch(de){No(t,r,{then:function(){},status:"rejected",reason:de},wn())}finally{K.p=x,C!==null&&R.types!==null&&(C.types=R.types),z.T=C}}function E2(){}function Pf(t,r,i,c){if(t.tag!==5)throw Error(l(476));var m=lx(t).queue;ax(t,m,r,ee,i===null?E2:function(){return ix(t),i(c)})}function lx(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ir,lastRenderedState:ee},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ir,lastRenderedState:i},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function ix(t){var r=lx(t);r.next===null&&(r=t.alternate.memoizedState),No(t,r.next.queue,{},wn())}function Ff(){return $t(Vo)}function ox(){return Ct().memoizedState}function sx(){return Ct().memoizedState}function A2(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var i=wn();t=ha(i);var c=ma(r,t,i);c!==null&&(dn(c,r,i),So(c,r,i)),r={cache:mf()},t.payload=r;return}r=r.return}}function N2(t,r,i){var c=wn();i={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tc(t)?ux(r,i):(i=rf(t,r,i,c),i!==null&&(dn(i,t,c),dx(i,r,c)))}function cx(t,r,i){var c=wn();No(t,r,i,c)}function No(t,r,i,c){var m={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tc(t))ux(r,m);else{var x=t.alternate;if(t.lanes===0&&(x===null||x.lanes===0)&&(x=r.lastRenderedReducer,x!==null))try{var C=r.lastRenderedState,R=x(C,i);if(m.hasEagerState=!0,m.eagerState=R,mn(R,C))return cc(t,r,m,0),ft===null&&sc(),!1}catch{}finally{}if(i=rf(t,r,m,c),i!==null)return dn(i,t,c),dx(i,r,c),!0}return!1}function Uf(t,r,i,c){if(c={lane:2,revertLane:bp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Tc(t)){if(r)throw Error(l(479))}else r=rf(t,i,c,2),r!==null&&dn(r,t,2)}function Tc(t){var r=t.alternate;return t===Ie||r!==null&&r===Ie}function ux(t,r){ti=Sc=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function dx(t,r,i){if((i&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,i|=c,r.lanes=i,qs(t,i)}}var jo={readContext:$t,use:Ec,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};jo.useEffectEvent=wt;var fx={readContext:$t,use:Ec,useCallback:function(t,r){return nn().memoizedState=[t,r===void 0?null:r],t},useContext:$t,useEffect:Ky,useImperativeHandle:function(t,r,i){i=i!=null?i.concat([t]):null,Nc(4194308,4,Jy.bind(null,r,t),i)},useLayoutEffect:function(t,r){return Nc(4194308,4,t,r)},useInsertionEffect:function(t,r){Nc(4,2,t,r)},useMemo:function(t,r){var i=nn();r=r===void 0?null:r;var c=t();if(fl){Mt(!0);try{t()}finally{Mt(!1)}}return i.memoizedState=[c,r],c},useReducer:function(t,r,i){var c=nn();if(i!==void 0){var m=i(r);if(fl){Mt(!0);try{i(r)}finally{Mt(!1)}}}else m=r;return c.memoizedState=c.baseState=m,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:m},c.queue=t,t=t.dispatch=N2.bind(null,Ie,t),[c.memoizedState,t]},useRef:function(t){var r=nn();return t={current:t},r.memoizedState=t},useState:function(t){t=Df(t);var r=t.queue,i=cx.bind(null,Ie,r);return r.dispatch=i,[t.memoizedState,i]},useDebugValue:If,useDeferredValue:function(t,r){var i=nn();return Bf(i,t,r)},useTransition:function(){var t=Df(!1);return t=ax.bind(null,Ie,t.queue,!0,!1),nn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,i){var c=Ie,m=nn();if(Qe){if(i===void 0)throw Error(l(407));i=i()}else{if(i=r(),ft===null)throw Error(l(349));(Xe&127)!==0||Oy(c,r,i)}m.memoizedState=i;var x={value:i,getSnapshot:r};return m.queue=x,Ky(zy.bind(null,c,x,t),[t]),c.flags|=2048,ri(9,{destroy:void 0},Dy.bind(null,c,x,i,r),null),i},useId:function(){var t=nn(),r=ft.identifierPrefix;if(Qe){var i=cr,c=sr;i=(c&~(1<<32-st(c)-1)).toString(32)+i,r="_"+r+"R_"+i,i=kc++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=v2++,r="_"+r+"r_"+i.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:Ff,useFormState:Vy,useActionState:Vy,useOptimistic:function(t){var r=nn();r.memoizedState=r.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Uf.bind(null,Ie,!0,i),i.dispatch=r,[t,r]},useMemoCache:Rf,useCacheRefresh:function(){return nn().memoizedState=A2.bind(null,Ie)},useEffectEvent:function(t){var r=nn(),i={impl:t};return r.memoizedState=i,function(){if((rt&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Hf={readContext:$t,use:Ec,useCallback:tx,useContext:$t,useEffect:Lf,useImperativeHandle:ex,useInsertionEffect:Zy,useLayoutEffect:Wy,useMemo:nx,useReducer:Ac,useRef:Xy,useState:function(){return Ac(Ir)},useDebugValue:If,useDeferredValue:function(t,r){var i=Ct();return rx(i,ct.memoizedState,t,r)},useTransition:function(){var t=Ac(Ir)[0],r=Ct().memoizedState;return[typeof t=="boolean"?t:Ao(t),r]},useSyncExternalStore:My,useId:ox,useHostTransitionStatus:Ff,useFormState:qy,useActionState:qy,useOptimistic:function(t,r){var i=Ct();return By(i,ct,t,r)},useMemoCache:Rf,useCacheRefresh:sx};Hf.useEffectEvent=Qy;var px={readContext:$t,use:Ec,useCallback:tx,useContext:$t,useEffect:Lf,useImperativeHandle:ex,useInsertionEffect:Zy,useLayoutEffect:Wy,useMemo:nx,useReducer:Of,useRef:Xy,useState:function(){return Of(Ir)},useDebugValue:If,useDeferredValue:function(t,r){var i=Ct();return ct===null?Bf(i,t,r):rx(i,ct.memoizedState,t,r)},useTransition:function(){var t=Of(Ir)[0],r=Ct().memoizedState;return[typeof t=="boolean"?t:Ao(t),r]},useSyncExternalStore:My,useId:ox,useHostTransitionStatus:Ff,useFormState:Yy,useActionState:Yy,useOptimistic:function(t,r){var i=Ct();return ct!==null?By(i,ct,t,r):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:Rf,useCacheRefresh:sx};px.useEffectEvent=Qy;function $f(t,r,i,c){r=t.memoizedState,i=i(c,r),i=i==null?r:g({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Vf={enqueueSetState:function(t,r,i){t=t._reactInternals;var c=wn(),m=ha(c);m.payload=r,i!=null&&(m.callback=i),r=ma(t,m,c),r!==null&&(dn(r,t,c),So(r,t,c))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var c=wn(),m=ha(c);m.tag=1,m.payload=r,i!=null&&(m.callback=i),r=ma(t,m,c),r!==null&&(dn(r,t,c),So(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=wn(),c=ha(i);c.tag=2,r!=null&&(c.callback=r),r=ma(t,c,i),r!==null&&(dn(r,t,i),So(r,t,i))}};function hx(t,r,i,c,m,x,C){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,x,C):r.prototype&&r.prototype.isPureReactComponent?!ho(i,c)||!ho(m,x):!0}function mx(t,r,i,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,c),r.state!==t&&Vf.enqueueReplaceState(r,r.state,null)}function pl(t,r){var i=r;if("ref"in r){i={};for(var c in r)c!=="ref"&&(i[c]=r[c])}if(t=t.defaultProps){i===r&&(i=g({},i));for(var m in t)i[m]===void 0&&(i[m]=t[m])}return i}function gx(t){oc(t)}function yx(t){console.error(t)}function xx(t){oc(t)}function _c(t,r){try{var i=t.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function bx(t,r,i){try{var c=t.onCaughtError;c(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function qf(t,r,i){return i=ha(i),i.tag=3,i.payload={element:null},i.callback=function(){_c(t,r)},i}function vx(t){return t=ha(t),t.tag=3,t}function wx(t,r,i,c){var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var x=c.value;t.payload=function(){return m(x)},t.callback=function(){bx(r,i,c)}}var C=i.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(t.callback=function(){bx(r,i,c),typeof m!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var R=c.stack;this.componentDidCatch(c.value,{componentStack:R!==null?R:""})})}function j2(t,r,i,c,m){if(i.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=i.alternate,r!==null&&Kl(r,i,m,!0),i=yn.current,i!==null){switch(i.tag){case 31:case 13:return Ln===null?Hc():i.alternate===null&&St===0&&(St=3),i.flags&=-257,i.flags|=65536,i.lanes=m,c===yc?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([c]):r.add(c),gp(t,c,m)),!1;case 22:return i.flags|=65536,c===yc?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([c]):i.add(c)),gp(t,c,m)),!1}throw Error(l(435,i.tag))}return gp(t,c,m),Hc(),!1}if(Qe)return r=yn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=m,c!==uf&&(t=Error(l(422),{cause:c}),yo(Mn(t,i)))):(c!==uf&&(r=Error(l(423),{cause:c}),yo(Mn(r,i))),t=t.current.alternate,t.flags|=65536,m&=-m,t.lanes|=m,c=Mn(c,i),m=qf(t.stateNode,c,m),wf(t,m),St!==4&&(St=2)),!1;var x=Error(l(520),{cause:c});if(x=Mn(x,i),Lo===null?Lo=[x]:Lo.push(x),St!==4&&(St=2),r===null)return!0;c=Mn(c,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,t=m&-m,i.lanes|=t,t=qf(i.stateNode,c,t),wf(i,t),!1;case 1:if(r=i.type,x=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(wa===null||!wa.has(x))))return i.flags|=65536,m&=-m,i.lanes|=m,m=vx(m),wx(m,t,i,c),wf(i,m),!1}i=i.return}while(i!==null);return!1}var Gf=Error(l(461)),jt=!1;function Vt(t,r,i,c){r.child=t===null?Ey(r,null,i,c):dl(r,t.child,i,c)}function Sx(t,r,i,c,m){i=i.render;var x=r.ref;if("ref"in c){var C={};for(var R in c)R!=="ref"&&(C[R]=c[R])}else C=c;return ol(r),c=Nf(t,r,i,C,x,m),R=jf(),t!==null&&!jt?(Tf(t,r,m),Br(t,r,m)):(Qe&&R&&sf(r),r.flags|=1,Vt(t,r,c,m),r.child)}function kx(t,r,i,c,m){if(t===null){var x=i.type;return typeof x=="function"&&!af(x)&&x.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=x,Cx(t,r,x,c,m)):(t=dc(i.type,null,c,r,r.mode,m),t.ref=r.ref,t.return=r,r.child=t)}if(x=t.child,!ep(t,m)){var C=x.memoizedProps;if(i=i.compare,i=i!==null?i:ho,i(C,c)&&t.ref===r.ref)return Br(t,r,m)}return r.flags|=1,t=Mr(x,c),t.ref=r.ref,t.return=r,r.child=t}function Cx(t,r,i,c,m){if(t!==null){var x=t.memoizedProps;if(ho(x,c)&&t.ref===r.ref)if(jt=!1,r.pendingProps=c=x,ep(t,m))(t.flags&131072)!==0&&(jt=!0);else return r.lanes=t.lanes,Br(t,r,m)}return Yf(t,r,i,c,m)}function Ex(t,r,i,c){var m=c.children,x=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((r.flags&128)!==0){if(x=x!==null?x.baseLanes|i:i,t!==null){for(c=r.child=t.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~x}else c=0,r.child=null;return Ax(t,r,x,i,c)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&mc(r,x!==null?x.cachePool:null),x!==null?jy(r,x):kf(),Ty(r);else return c=r.lanes=536870912,Ax(t,r,x!==null?x.baseLanes|i:i,i,c)}else x!==null?(mc(r,x.cachePool),jy(r,x),ya(),r.memoizedState=null):(t!==null&&mc(r,null),kf(),ya());return Vt(t,r,m,i),r.child}function To(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Ax(t,r,i,c,m){var x=yf();return x=x===null?null:{parent:At._currentValue,pool:x},r.memoizedState={baseLanes:i,cachePool:x},t!==null&&mc(r,null),kf(),Ty(r),t!==null&&Kl(t,r,c,!0),r.childLanes=m,null}function Rc(t,r){return r=Oc({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function Nx(t,r,i){return dl(r,t.child,null,i),t=Rc(r,r.pendingProps),t.flags|=2,xn(r),r.memoizedState=null,t}function T2(t,r,i){var c=r.pendingProps,m=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Qe){if(c.mode==="hidden")return t=Rc(r,c),r.lanes=536870912,To(null,t);if(Ef(r),(t=mt)?(t=Pb(t,zn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ca!==null?{id:sr,overflow:cr}:null,retryLane:536870912,hydrationErrors:null},i=uy(t),i.return=r,r.child=i,Ht=r,mt=null)):t=null,t===null)throw da(r);return r.lanes=536870912,null}return Rc(r,c)}var x=t.memoizedState;if(x!==null){var C=x.dehydrated;if(Ef(r),m)if(r.flags&256)r.flags&=-257,r=Nx(t,r,i);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(l(558));else if(jt||Kl(t,r,i,!1),m=(i&t.childLanes)!==0,jt||m){if(c=ft,c!==null&&(C=Gs(c,i),C!==0&&C!==x.retryLane))throw x.retryLane=C,rl(t,C),dn(c,t,C),Gf;Hc(),r=Nx(t,r,i)}else t=x.treeContext,mt=In(C.nextSibling),Ht=r,Qe=!0,ua=null,zn=!1,t!==null&&py(r,t),r=Rc(r,c),r.flags|=4096;return r}return t=Mr(t.child,{mode:c.mode,children:c.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Mc(t,r){var i=r.ref;if(i===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(t===null||t.ref!==i)&&(r.flags|=4194816)}}function Yf(t,r,i,c,m){return ol(r),i=Nf(t,r,i,c,void 0,m),c=jf(),t!==null&&!jt?(Tf(t,r,m),Br(t,r,m)):(Qe&&c&&sf(r),r.flags|=1,Vt(t,r,i,m),r.child)}function jx(t,r,i,c,m,x){return ol(r),r.updateQueue=null,i=Ry(r,c,i,m),_y(t),c=jf(),t!==null&&!jt?(Tf(t,r,x),Br(t,r,x)):(Qe&&c&&sf(r),r.flags|=1,Vt(t,r,i,x),r.child)}function Tx(t,r,i,c,m){if(ol(r),r.stateNode===null){var x=ql,C=i.contextType;typeof C=="object"&&C!==null&&(x=$t(C)),x=new i(c,x),r.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Vf,r.stateNode=x,x._reactInternals=r,x=r.stateNode,x.props=c,x.state=r.memoizedState,x.refs={},bf(r),C=i.contextType,x.context=typeof C=="object"&&C!==null?$t(C):ql,x.state=r.memoizedState,C=i.getDerivedStateFromProps,typeof C=="function"&&($f(r,i,C,c),x.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&Vf.enqueueReplaceState(x,x.state,null),Co(r,c,x,m),ko(),x.state=r.memoizedState),typeof x.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){x=r.stateNode;var R=r.memoizedProps,P=pl(i,R);x.props=P;var Q=x.context,oe=i.contextType;C=ql,typeof oe=="object"&&oe!==null&&(C=$t(oe));var de=i.getDerivedStateFromProps;oe=typeof de=="function"||typeof x.getSnapshotBeforeUpdate=="function",R=r.pendingProps!==R,oe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R||Q!==C)&&mx(r,x,c,C),pa=!1;var J=r.memoizedState;x.state=J,Co(r,c,x,m),ko(),Q=r.memoizedState,R||J!==Q||pa?(typeof de=="function"&&($f(r,i,de,c),Q=r.memoizedState),(P=pa||hx(r,i,P,c,J,Q,C))?(oe||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"&&(r.flags|=4194308)):(typeof x.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=Q),x.props=c,x.state=Q,x.context=C,c=P):(typeof x.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{x=r.stateNode,vf(t,r),C=r.memoizedProps,oe=pl(i,C),x.props=oe,de=r.pendingProps,J=x.context,Q=i.contextType,P=ql,typeof Q=="object"&&Q!==null&&(P=$t(Q)),R=i.getDerivedStateFromProps,(Q=typeof R=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==de||J!==P)&&mx(r,x,c,P),pa=!1,J=r.memoizedState,x.state=J,Co(r,c,x,m),ko();var re=r.memoizedState;C!==de||J!==re||pa||t!==null&&t.dependencies!==null&&pc(t.dependencies)?(typeof R=="function"&&($f(r,i,R,c),re=r.memoizedState),(oe=pa||hx(r,i,oe,c,J,re,P)||t!==null&&t.dependencies!==null&&pc(t.dependencies))?(Q||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,re,P),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,re,P)),typeof x.componentDidUpdate=="function"&&(r.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===t.memoizedProps&&J===t.memoizedState||(r.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===t.memoizedProps&&J===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=re),x.props=c,x.state=re,x.context=P,c=oe):(typeof x.componentDidUpdate!="function"||C===t.memoizedProps&&J===t.memoizedState||(r.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===t.memoizedProps&&J===t.memoizedState||(r.flags|=1024),c=!1)}return x=c,Mc(t,r),c=(r.flags&128)!==0,x||c?(x=r.stateNode,i=c&&typeof i.getDerivedStateFromError!="function"?null:x.render(),r.flags|=1,t!==null&&c?(r.child=dl(r,t.child,null,m),r.child=dl(r,null,i,m)):Vt(t,r,i,m),r.memoizedState=x.state,t=r.child):t=Br(t,r,m),t}function _x(t,r,i,c){return ll(),r.flags|=256,Vt(t,r,i,c),r.child}var Xf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kf(t){return{baseLanes:t,cachePool:by()}}function Qf(t,r,i){return t=t!==null?t.childLanes&~i:0,r&&(t|=vn),t}function Rx(t,r,i){var c=r.pendingProps,m=!1,x=(r.flags&128)!==0,C;if((C=x)||(C=t!==null&&t.memoizedState===null?!1:(kt.current&2)!==0),C&&(m=!0,r.flags&=-129),C=(r.flags&32)!==0,r.flags&=-33,t===null){if(Qe){if(m?ga(r):ya(),(t=mt)?(t=Pb(t,zn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ca!==null?{id:sr,overflow:cr}:null,retryLane:536870912,hydrationErrors:null},i=uy(t),i.return=r,r.child=i,Ht=r,mt=null)):t=null,t===null)throw da(r);return Mp(t)?r.lanes=32:r.lanes=536870912,null}var R=c.children;return c=c.fallback,m?(ya(),m=r.mode,R=Oc({mode:"hidden",children:R},m),c=al(c,m,i,null),R.return=r,c.return=r,R.sibling=c,r.child=R,c=r.child,c.memoizedState=Kf(i),c.childLanes=Qf(t,C,i),r.memoizedState=Xf,To(null,c)):(ga(r),Zf(r,R))}var P=t.memoizedState;if(P!==null&&(R=P.dehydrated,R!==null)){if(x)r.flags&256?(ga(r),r.flags&=-257,r=Wf(t,r,i)):r.memoizedState!==null?(ya(),r.child=t.child,r.flags|=128,r=null):(ya(),R=c.fallback,m=r.mode,c=Oc({mode:"visible",children:c.children},m),R=al(R,m,i,null),R.flags|=2,c.return=r,R.return=r,c.sibling=R,r.child=c,dl(r,t.child,null,i),c=r.child,c.memoizedState=Kf(i),c.childLanes=Qf(t,C,i),r.memoizedState=Xf,r=To(null,c));else if(ga(r),Mp(R)){if(C=R.nextSibling&&R.nextSibling.dataset,C)var Q=C.dgst;C=Q,c=Error(l(419)),c.stack="",c.digest=C,yo({value:c,source:null,stack:null}),r=Wf(t,r,i)}else if(jt||Kl(t,r,i,!1),C=(i&t.childLanes)!==0,jt||C){if(C=ft,C!==null&&(c=Gs(C,i),c!==0&&c!==P.retryLane))throw P.retryLane=c,rl(t,c),dn(C,t,c),Gf;Rp(R)||Hc(),r=Wf(t,r,i)}else Rp(R)?(r.flags|=192,r.child=t.child,r=null):(t=P.treeContext,mt=In(R.nextSibling),Ht=r,Qe=!0,ua=null,zn=!1,t!==null&&py(r,t),r=Zf(r,c.children),r.flags|=4096);return r}return m?(ya(),R=c.fallback,m=r.mode,P=t.child,Q=P.sibling,c=Mr(P,{mode:"hidden",children:c.children}),c.subtreeFlags=P.subtreeFlags&65011712,Q!==null?R=Mr(Q,R):(R=al(R,m,i,null),R.flags|=2),R.return=r,c.return=r,c.sibling=R,r.child=c,To(null,c),c=r.child,R=t.child.memoizedState,R===null?R=Kf(i):(m=R.cachePool,m!==null?(P=At._currentValue,m=m.parent!==P?{parent:P,pool:P}:m):m=by(),R={baseLanes:R.baseLanes|i,cachePool:m}),c.memoizedState=R,c.childLanes=Qf(t,C,i),r.memoizedState=Xf,To(t.child,c)):(ga(r),i=t.child,t=i.sibling,i=Mr(i,{mode:"visible",children:c.children}),i.return=r,i.sibling=null,t!==null&&(C=r.deletions,C===null?(r.deletions=[t],r.flags|=16):C.push(t)),r.child=i,r.memoizedState=null,i)}function Zf(t,r){return r=Oc({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Oc(t,r){return t=gn(22,t,null,r),t.lanes=0,t}function Wf(t,r,i){return dl(r,t.child,null,i),t=Zf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Mx(t,r,i){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),pf(t.return,r,i)}function Jf(t,r,i,c,m,x){var C=t.memoizedState;C===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:i,tailMode:m,treeForkCount:x}:(C.isBackwards=r,C.rendering=null,C.renderingStartTime=0,C.last=c,C.tail=i,C.tailMode=m,C.treeForkCount=x)}function Ox(t,r,i){var c=r.pendingProps,m=c.revealOrder,x=c.tail;c=c.children;var C=kt.current,R=(C&2)!==0;if(R?(C=C&1|2,r.flags|=128):C&=1,_(kt,C),Vt(t,r,c,i),c=Qe?go:0,!R&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Mx(t,i,r);else if(t.tag===19)Mx(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(m){case"forwards":for(i=r.child,m=null;i!==null;)t=i.alternate,t!==null&&wc(t)===null&&(m=i),i=i.sibling;i=m,i===null?(m=r.child,r.child=null):(m=i.sibling,i.sibling=null),Jf(r,!1,m,i,x,c);break;case"backwards":case"unstable_legacy-backwards":for(i=null,m=r.child,r.child=null;m!==null;){if(t=m.alternate,t!==null&&wc(t)===null){r.child=m;break}t=m.sibling,m.sibling=i,i=m,m=t}Jf(r,!0,i,null,x,c);break;case"together":Jf(r,!1,null,null,void 0,c);break;default:r.memoizedState=null}return r.child}function Br(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),va|=r.lanes,(i&r.childLanes)===0)if(t!==null){if(Kl(t,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(l(153));if(r.child!==null){for(t=r.child,i=Mr(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=Mr(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function ep(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&pc(t)))}function _2(t,r,i){switch(r.tag){case 3:be(r,r.stateNode.containerInfo),fa(r,At,t.memoizedState.cache),ll();break;case 27:case 5:_e(r);break;case 4:be(r,r.stateNode.containerInfo);break;case 10:fa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Ef(r),null;break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(ga(r),r.flags|=128,null):(i&r.child.childLanes)!==0?Rx(t,r,i):(ga(r),t=Br(t,r,i),t!==null?t.sibling:null);ga(r);break;case 19:var m=(t.flags&128)!==0;if(c=(i&r.childLanes)!==0,c||(Kl(t,r,i,!1),c=(i&r.childLanes)!==0),m){if(c)return Ox(t,r,i);r.flags|=128}if(m=r.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),_(kt,kt.current),c)break;return null;case 22:return r.lanes=0,Ex(t,r,i,r.pendingProps);case 24:fa(r,At,t.memoizedState.cache)}return Br(t,r,i)}function Dx(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps)jt=!0;else{if(!ep(t,i)&&(r.flags&128)===0)return jt=!1,_2(t,r,i);jt=(t.flags&131072)!==0}else jt=!1,Qe&&(r.flags&1048576)!==0&&fy(r,go,r.index);switch(r.lanes=0,r.tag){case 16:e:{var c=r.pendingProps;if(t=cl(r.elementType),r.type=t,typeof t=="function")af(t)?(c=pl(t,c),r.tag=1,r=Tx(null,r,t,c,i)):(r.tag=0,r=Yf(null,r,t,c,i));else{if(t!=null){var m=t.$$typeof;if(m===O){r.tag=11,r=Sx(null,r,t,c,i);break e}else if(m===U){r.tag=14,r=kx(null,r,t,c,i);break e}}throw r=Z(t)||t,Error(l(306,r,""))}}return r;case 0:return Yf(t,r,r.type,r.pendingProps,i);case 1:return c=r.type,m=pl(c,r.pendingProps),Tx(t,r,c,m,i);case 3:e:{if(be(r,r.stateNode.containerInfo),t===null)throw Error(l(387));c=r.pendingProps;var x=r.memoizedState;m=x.element,vf(t,r),Co(r,c,null,i);var C=r.memoizedState;if(c=C.cache,fa(r,At,c),c!==x.cache&&hf(r,[At],i,!0),ko(),c=C.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:C.cache},r.updateQueue.baseState=x,r.memoizedState=x,r.flags&256){r=_x(t,r,c,i);break e}else if(c!==m){m=Mn(Error(l(424)),r),yo(m),r=_x(t,r,c,i);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(mt=In(t.firstChild),Ht=r,Qe=!0,ua=null,zn=!0,i=Ey(r,null,c,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ll(),c===m){r=Br(t,r,i);break e}Vt(t,r,c,i)}r=r.child}return r;case 26:return Mc(t,r),t===null?(i=qb(r.type,null,r.pendingProps,null))?r.memoizedState=i:Qe||(i=r.type,t=r.pendingProps,c=Kc(ie.current).createElement(i),c[Ot]=r,c[Yt]=t,qt(c,i,t),Et(c),r.stateNode=c):r.memoizedState=qb(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return _e(r),t===null&&Qe&&(c=r.stateNode=Hb(r.type,r.pendingProps,ie.current),Ht=r,zn=!0,m=mt,Ea(r.type)?(Op=m,mt=In(c.firstChild)):mt=m),Vt(t,r,r.pendingProps.children,i),Mc(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Qe&&((m=c=mt)&&(c=iA(c,r.type,r.pendingProps,zn),c!==null?(r.stateNode=c,Ht=r,mt=In(c.firstChild),zn=!1,m=!0):m=!1),m||da(r)),_e(r),m=r.type,x=r.pendingProps,C=t!==null?t.memoizedProps:null,c=x.children,jp(m,x)?c=null:C!==null&&jp(m,C)&&(r.flags|=32),r.memoizedState!==null&&(m=Nf(t,r,w2,null,null,i),Vo._currentValue=m),Mc(t,r),Vt(t,r,c,i),r.child;case 6:return t===null&&Qe&&((t=i=mt)&&(i=oA(i,r.pendingProps,zn),i!==null?(r.stateNode=i,Ht=r,mt=null,t=!0):t=!1),t||da(r)),null;case 13:return Rx(t,r,i);case 4:return be(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=dl(r,null,c,i):Vt(t,r,c,i),r.child;case 11:return Sx(t,r,r.type,r.pendingProps,i);case 7:return Vt(t,r,r.pendingProps,i),r.child;case 8:return Vt(t,r,r.pendingProps.children,i),r.child;case 12:return Vt(t,r,r.pendingProps.children,i),r.child;case 10:return c=r.pendingProps,fa(r,r.type,c.value),Vt(t,r,c.children,i),r.child;case 9:return m=r.type._context,c=r.pendingProps.children,ol(r),m=$t(m),c=c(m),r.flags|=1,Vt(t,r,c,i),r.child;case 14:return kx(t,r,r.type,r.pendingProps,i);case 15:return Cx(t,r,r.type,r.pendingProps,i);case 19:return Ox(t,r,i);case 31:return T2(t,r,i);case 22:return Ex(t,r,i,r.pendingProps);case 24:return ol(r),c=$t(At),t===null?(m=yf(),m===null&&(m=ft,x=mf(),m.pooledCache=x,x.refCount++,x!==null&&(m.pooledCacheLanes|=i),m=x),r.memoizedState={parent:c,cache:m},bf(r),fa(r,At,m)):((t.lanes&i)!==0&&(vf(t,r),Co(r,null,null,i),ko()),m=t.memoizedState,x=r.memoizedState,m.parent!==c?(m={parent:c,cache:c},r.memoizedState=m,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=m),fa(r,At,c)):(c=x.cache,fa(r,At,c),c!==m.cache&&hf(r,[At],i,!0))),Vt(t,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(l(156,r.tag))}function Pr(t){t.flags|=4}function tp(t,r,i,c,m){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(m&335544128)===m)if(t.stateNode.complete)t.flags|=8192;else if(ob())t.flags|=8192;else throw ul=yc,xf}else t.flags&=-16777217}function zx(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Qb(r))if(ob())t.flags|=8192;else throw ul=yc,xf}function Dc(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?Hs():536870912,t.lanes|=r,oi|=r)}function _o(t,r){if(!Qe)switch(t.tailMode){case"hidden":r=t.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function gt(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,c=0;if(r)for(var m=t.child;m!==null;)i|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=t,m=m.sibling;else for(m=t.child;m!==null;)i|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=t,m=m.sibling;return t.subtreeFlags|=c,t.childLanes=i,r}function R2(t,r,i){var c=r.pendingProps;switch(cf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(r),null;case 1:return gt(r),null;case 3:return i=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),zr(At),me(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Xl(r)?Pr(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,df())),gt(r),null;case 26:var m=r.type,x=r.memoizedState;return t===null?(Pr(r),x!==null?(gt(r),zx(r,x)):(gt(r),tp(r,m,null,c,i))):x?x!==t.memoizedState?(Pr(r),gt(r),zx(r,x)):(gt(r),r.flags&=-16777217):(t=t.memoizedProps,t!==c&&Pr(r),gt(r),tp(r,m,t,c,i)),null;case 27:if(De(r),i=ie.current,m=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&Pr(r);else{if(!c){if(r.stateNode===null)throw Error(l(166));return gt(r),null}t=te.current,Xl(r)?hy(r):(t=Hb(m,c,i),r.stateNode=t,Pr(r))}return gt(r),null;case 5:if(De(r),m=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&Pr(r);else{if(!c){if(r.stateNode===null)throw Error(l(166));return gt(r),null}if(x=te.current,Xl(r))hy(r);else{var C=Kc(ie.current);switch(x){case 1:x=C.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:x=C.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":x=C.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":x=C.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":x=C.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof c.is=="string"?C.createElement("select",{is:c.is}):C.createElement("select"),c.multiple?x.multiple=!0:c.size&&(x.size=c.size);break;default:x=typeof c.is=="string"?C.createElement(m,{is:c.is}):C.createElement(m)}}x[Ot]=r,x[Yt]=c;e:for(C=r.child;C!==null;){if(C.tag===5||C.tag===6)x.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===r)break e;for(;C.sibling===null;){if(C.return===null||C.return===r)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}r.stateNode=x;e:switch(qt(x,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Pr(r)}}return gt(r),tp(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,i),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==c&&Pr(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(l(166));if(t=ie.current,Xl(r)){if(t=r.stateNode,i=r.memoizedProps,c=null,m=Ht,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}t[Ot]=r,t=!!(t.nodeValue===i||c!==null&&c.suppressHydrationWarning===!0||Rb(t.nodeValue,i)),t||da(r,!0)}else t=Kc(t).createTextNode(c),t[Ot]=r,r.stateNode=t}return gt(r),null;case 31:if(i=r.memoizedState,t===null||t.memoizedState!==null){if(c=Xl(r),i!==null){if(t===null){if(!c)throw Error(l(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Ot]=r}else ll(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;gt(r),t=!1}else i=df(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return r.flags&256?(xn(r),r):(xn(r),null);if((r.flags&128)!==0)throw Error(l(558))}return gt(r),null;case 13:if(c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(m=Xl(r),c!==null&&c.dehydrated!==null){if(t===null){if(!m)throw Error(l(318));if(m=r.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(l(317));m[Ot]=r}else ll(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;gt(r),m=!1}else m=df(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=m),m=!0;if(!m)return r.flags&256?(xn(r),r):(xn(r),null)}return xn(r),(r.flags&128)!==0?(r.lanes=i,r):(i=c!==null,t=t!==null&&t.memoizedState!==null,i&&(c=r.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),x=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(x=c.memoizedState.cachePool.pool),x!==m&&(c.flags|=2048)),i!==t&&i&&(r.child.flags|=8192),Dc(r,r.updateQueue),gt(r),null);case 4:return me(),t===null&&kp(r.stateNode.containerInfo),gt(r),null;case 10:return zr(r.type),gt(r),null;case 19:if(L(kt),c=r.memoizedState,c===null)return gt(r),null;if(m=(r.flags&128)!==0,x=c.rendering,x===null)if(m)_o(c,!1);else{if(St!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(x=wc(t),x!==null){for(r.flags|=128,_o(c,!1),t=x.updateQueue,r.updateQueue=t,Dc(r,t),r.subtreeFlags=0,t=i,i=r.child;i!==null;)cy(i,t),i=i.sibling;return _(kt,kt.current&1|2),Qe&&Or(r,c.treeForkCount),r.child}t=t.sibling}c.tail!==null&&Rt()>Pc&&(r.flags|=128,m=!0,_o(c,!1),r.lanes=4194304)}else{if(!m)if(t=wc(x),t!==null){if(r.flags|=128,m=!0,t=t.updateQueue,r.updateQueue=t,Dc(r,t),_o(c,!0),c.tail===null&&c.tailMode==="hidden"&&!x.alternate&&!Qe)return gt(r),null}else 2*Rt()-c.renderingStartTime>Pc&&i!==536870912&&(r.flags|=128,m=!0,_o(c,!1),r.lanes=4194304);c.isBackwards?(x.sibling=r.child,r.child=x):(t=c.last,t!==null?t.sibling=x:r.child=x,c.last=x)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Rt(),t.sibling=null,i=kt.current,_(kt,m?i&1|2:i&1),Qe&&Or(r,c.treeForkCount),t):(gt(r),null);case 22:case 23:return xn(r),Cf(),c=r.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(i&536870912)!==0&&(r.flags&128)===0&&(gt(r),r.subtreeFlags&6&&(r.flags|=8192)):gt(r),i=r.updateQueue,i!==null&&Dc(r,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==i&&(r.flags|=2048),t!==null&&L(sl),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),zr(At),gt(r),null;case 25:return null;case 30:return null}throw Error(l(156,r.tag))}function M2(t,r){switch(cf(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return zr(At),me(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return De(r),null;case 31:if(r.memoizedState!==null){if(xn(r),r.alternate===null)throw Error(l(340));ll()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(xn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(l(340));ll()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return L(kt),null;case 4:return me(),null;case 10:return zr(r.type),null;case 22:case 23:return xn(r),Cf(),t!==null&&L(sl),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return zr(At),null;case 25:return null;default:return null}}function Lx(t,r){switch(cf(r),r.tag){case 3:zr(At),me();break;case 26:case 27:case 5:De(r);break;case 4:me();break;case 31:r.memoizedState!==null&&xn(r);break;case 13:xn(r);break;case 19:L(kt);break;case 10:zr(r.type);break;case 22:case 23:xn(r),Cf(),t!==null&&L(sl);break;case 24:zr(At)}}function Ro(t,r){try{var i=r.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var m=c.next;i=m;do{if((i.tag&t)===t){c=void 0;var x=i.create,C=i.inst;c=x(),C.destroy=c}i=i.next}while(i!==m)}}catch(R){it(r,r.return,R)}}function xa(t,r,i){try{var c=r.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var x=m.next;c=x;do{if((c.tag&t)===t){var C=c.inst,R=C.destroy;if(R!==void 0){C.destroy=void 0,m=r;var P=i,Q=R;try{Q()}catch(oe){it(m,P,oe)}}}c=c.next}while(c!==x)}}catch(oe){it(r,r.return,oe)}}function Ix(t){var r=t.updateQueue;if(r!==null){var i=t.stateNode;try{Ny(r,i)}catch(c){it(t,t.return,c)}}}function Bx(t,r,i){i.props=pl(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(c){it(t,r,c)}}function Mo(t,r){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof i=="function"?t.refCleanup=i(c):i.current=c}}catch(m){it(t,r,m)}}function ur(t,r){var i=t.ref,c=t.refCleanup;if(i!==null)if(typeof c=="function")try{c()}catch(m){it(t,r,m)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(m){it(t,r,m)}else i.current=null}function Px(t){var r=t.type,i=t.memoizedProps,c=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&c.focus();break e;case"img":i.src?c.src=i.src:i.srcSet&&(c.srcset=i.srcSet)}}catch(m){it(t,t.return,m)}}function np(t,r,i){try{var c=t.stateNode;eA(c,t.type,i,r),c[Yt]=r}catch(m){it(t,t.return,m)}}function Fx(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ea(t.type)||t.tag===4}function rp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Fx(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&&Ea(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 ap(t,r,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(t),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=_r));else if(c!==4&&(c===27&&Ea(t.type)&&(i=t.stateNode,r=null),t=t.child,t!==null))for(ap(t,r,i),t=t.sibling;t!==null;)ap(t,r,i),t=t.sibling}function zc(t,r,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?i.insertBefore(t,r):i.appendChild(t);else if(c!==4&&(c===27&&Ea(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(zc(t,r,i),t=t.sibling;t!==null;)zc(t,r,i),t=t.sibling}function Ux(t){var r=t.stateNode,i=t.memoizedProps;try{for(var c=t.type,m=r.attributes;m.length;)r.removeAttributeNode(m[0]);qt(r,c,i),r[Ot]=t,r[Yt]=i}catch(x){it(t,t.return,x)}}var Fr=!1,Tt=!1,lp=!1,Hx=typeof WeakSet=="function"?WeakSet:Set,It=null;function O2(t,r){if(t=t.containerInfo,Ap=nu,t=ey(t),Zd(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var m=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{i.nodeType,x.nodeType}catch{i=null;break e}var C=0,R=-1,P=-1,Q=0,oe=0,de=t,J=null;t:for(;;){for(var re;de!==i||m!==0&&de.nodeType!==3||(R=C+m),de!==x||c!==0&&de.nodeType!==3||(P=C+c),de.nodeType===3&&(C+=de.nodeValue.length),(re=de.firstChild)!==null;)J=de,de=re;for(;;){if(de===t)break t;if(J===i&&++Q===m&&(R=C),J===x&&++oe===c&&(P=C),(re=de.nextSibling)!==null)break;de=J,J=de.parentNode}de=re}i=R===-1||P===-1?null:{start:R,end:P}}else i=null}i=i||{start:0,end:0}}else i=null;for(Np={focusedElem:t,selectionRange:i},nu=!1,It=r;It!==null;)if(r=It,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,It=t;else for(;It!==null;){switch(r=It,x=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)m=t[i],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&x!==null){t=void 0,i=r,m=x.memoizedProps,x=x.memoizedState,c=i.stateNode;try{var Se=pl(i.type,m);t=c.getSnapshotBeforeUpdate(Se,x),c.__reactInternalSnapshotBeforeUpdate=t}catch(Me){it(i,i.return,Me)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,i=t.nodeType,i===9)_p(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":_p(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=r.sibling,t!==null){t.return=r.return,It=t;break}It=r.return}}function $x(t,r,i){var c=i.flags;switch(i.tag){case 0:case 11:case 15:Hr(t,i),c&4&&Ro(5,i);break;case 1:if(Hr(t,i),c&4)if(t=i.stateNode,r===null)try{t.componentDidMount()}catch(C){it(i,i.return,C)}else{var m=pl(i.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(m,r,t.__reactInternalSnapshotBeforeUpdate)}catch(C){it(i,i.return,C)}}c&64&&Ix(i),c&512&&Mo(i,i.return);break;case 3:if(Hr(t,i),c&64&&(t=i.updateQueue,t!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{Ny(t,r)}catch(C){it(i,i.return,C)}}break;case 27:r===null&&c&4&&Ux(i);case 26:case 5:Hr(t,i),r===null&&c&4&&Px(i),c&512&&Mo(i,i.return);break;case 12:Hr(t,i);break;case 31:Hr(t,i),c&4&&Gx(t,i);break;case 13:Hr(t,i),c&4&&Yx(t,i),c&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=H2.bind(null,i),sA(t,i))));break;case 22:if(c=i.memoizedState!==null||Fr,!c){r=r!==null&&r.memoizedState!==null||Tt,m=Fr;var x=Tt;Fr=c,(Tt=r)&&!x?$r(t,i,(i.subtreeFlags&8772)!==0):Hr(t,i),Fr=m,Tt=x}break;case 30:break;default:Hr(t,i)}}function Vx(t){var r=t.alternate;r!==null&&(t.alternate=null,Vx(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&ao(r)),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 bt=null,on=!1;function Ur(t,r,i){for(i=i.child;i!==null;)qx(t,r,i),i=i.sibling}function qx(t,r,i){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Ut,i)}catch{}switch(i.tag){case 26:Tt||ur(i,r),Ur(t,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Tt||ur(i,r);var c=bt,m=on;Ea(i.type)&&(bt=i.stateNode,on=!1),Ur(t,r,i),Uo(i.stateNode),bt=c,on=m;break;case 5:Tt||ur(i,r);case 6:if(c=bt,m=on,bt=null,Ur(t,r,i),bt=c,on=m,bt!==null)if(on)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(i.stateNode)}catch(x){it(i,r,x)}else try{bt.removeChild(i.stateNode)}catch(x){it(i,r,x)}break;case 18:bt!==null&&(on?(t=bt,Ib(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),mi(t)):Ib(bt,i.stateNode));break;case 4:c=bt,m=on,bt=i.stateNode.containerInfo,on=!0,Ur(t,r,i),bt=c,on=m;break;case 0:case 11:case 14:case 15:xa(2,i,r),Tt||xa(4,i,r),Ur(t,r,i);break;case 1:Tt||(ur(i,r),c=i.stateNode,typeof c.componentWillUnmount=="function"&&Bx(i,r,c)),Ur(t,r,i);break;case 21:Ur(t,r,i);break;case 22:Tt=(c=Tt)||i.memoizedState!==null,Ur(t,r,i),Tt=c;break;default:Ur(t,r,i)}}function Gx(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{mi(t)}catch(i){it(r,r.return,i)}}}function Yx(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{mi(t)}catch(i){it(r,r.return,i)}}function D2(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Hx),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Hx),r;default:throw Error(l(435,t.tag))}}function Lc(t,r){var i=D2(t);r.forEach(function(c){if(!i.has(c)){i.add(c);var m=$2.bind(null,t,c);c.then(m,m)}})}function sn(t,r){var i=r.deletions;if(i!==null)for(var c=0;c<i.length;c++){var m=i[c],x=t,C=r,R=C;e:for(;R!==null;){switch(R.tag){case 27:if(Ea(R.type)){bt=R.stateNode,on=!1;break e}break;case 5:bt=R.stateNode,on=!1;break e;case 3:case 4:bt=R.stateNode.containerInfo,on=!0;break e}R=R.return}if(bt===null)throw Error(l(160));qx(x,C,m),bt=null,on=!1,x=m.alternate,x!==null&&(x.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Xx(r,t),r=r.sibling}var Zn=null;function Xx(t,r){var i=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:sn(r,t),cn(t),c&4&&(xa(3,t,t.return),Ro(3,t),xa(5,t,t.return));break;case 1:sn(r,t),cn(t),c&512&&(Tt||i===null||ur(i,i.return)),c&64&&Fr&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?c:i.concat(c))));break;case 26:var m=Zn;if(sn(r,t),cn(t),c&512&&(Tt||i===null||ur(i,i.return)),c&4){var x=i!==null?i.memoizedState:null;if(c=t.memoizedState,i===null)if(c===null)if(t.stateNode===null){e:{c=t.type,i=t.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":x=m.getElementsByTagName("title")[0],(!x||x[Za]||x[Ot]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=m.createElement(c),m.head.insertBefore(x,m.querySelector("head > title"))),qt(x,c,i),x[Ot]=t,Et(x),c=x;break e;case"link":var C=Xb("link","href",m).get(c+(i.href||""));if(C){for(var R=0;R<C.length;R++)if(x=C[R],x.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&x.getAttribute("rel")===(i.rel==null?null:i.rel)&&x.getAttribute("title")===(i.title==null?null:i.title)&&x.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){C.splice(R,1);break t}}x=m.createElement(c),qt(x,c,i),m.head.appendChild(x);break;case"meta":if(C=Xb("meta","content",m).get(c+(i.content||""))){for(R=0;R<C.length;R++)if(x=C[R],x.getAttribute("content")===(i.content==null?null:""+i.content)&&x.getAttribute("name")===(i.name==null?null:i.name)&&x.getAttribute("property")===(i.property==null?null:i.property)&&x.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&x.getAttribute("charset")===(i.charSet==null?null:i.charSet)){C.splice(R,1);break t}}x=m.createElement(c),qt(x,c,i),m.head.appendChild(x);break;default:throw Error(l(468,c))}x[Ot]=t,Et(x),c=x}t.stateNode=c}else Kb(m,t.type,t.stateNode);else t.stateNode=Yb(m,c,t.memoizedProps);else x!==c?(x===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):x.count--,c===null?Kb(m,t.type,t.stateNode):Yb(m,c,t.memoizedProps)):c===null&&t.stateNode!==null&&np(t,t.memoizedProps,i.memoizedProps)}break;case 27:sn(r,t),cn(t),c&512&&(Tt||i===null||ur(i,i.return)),i!==null&&c&4&&np(t,t.memoizedProps,i.memoizedProps);break;case 5:if(sn(r,t),cn(t),c&512&&(Tt||i===null||ur(i,i.return)),t.flags&32){m=t.stateNode;try{Bl(m,"")}catch(Se){it(t,t.return,Se)}}c&4&&t.stateNode!=null&&(m=t.memoizedProps,np(t,m,i!==null?i.memoizedProps:m)),c&1024&&(lp=!0);break;case 6:if(sn(r,t),cn(t),c&4){if(t.stateNode===null)throw Error(l(162));c=t.memoizedProps,i=t.stateNode;try{i.nodeValue=c}catch(Se){it(t,t.return,Se)}}break;case 3:if(Wc=null,m=Zn,Zn=Qc(r.containerInfo),sn(r,t),Zn=m,cn(t),c&4&&i!==null&&i.memoizedState.isDehydrated)try{mi(r.containerInfo)}catch(Se){it(t,t.return,Se)}lp&&(lp=!1,Kx(t));break;case 4:c=Zn,Zn=Qc(t.stateNode.containerInfo),sn(r,t),cn(t),Zn=c;break;case 12:sn(r,t),cn(t);break;case 31:sn(r,t),cn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Lc(t,c)));break;case 13:sn(r,t),cn(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Bc=Rt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Lc(t,c)));break;case 22:m=t.memoizedState!==null;var P=i!==null&&i.memoizedState!==null,Q=Fr,oe=Tt;if(Fr=Q||m,Tt=oe||P,sn(r,t),Tt=oe,Fr=Q,cn(t),c&8192)e:for(r=t.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,m&&(i===null||P||Fr||Tt||hl(t)),i=null,r=t;;){if(r.tag===5||r.tag===26){if(i===null){P=i=r;try{if(x=P.stateNode,m)C=x.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{R=P.stateNode;var de=P.memoizedProps.style,J=de!=null&&de.hasOwnProperty("display")?de.display:null;R.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(Se){it(P,P.return,Se)}}}else if(r.tag===6){if(i===null){P=r;try{P.stateNode.nodeValue=m?"":P.memoizedProps}catch(Se){it(P,P.return,Se)}}}else if(r.tag===18){if(i===null){P=r;try{var re=P.stateNode;m?Bb(re,!0):Bb(P.stateNode,!1)}catch(Se){it(P,P.return,Se)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=t.updateQueue,c!==null&&(i=c.retryQueue,i!==null&&(c.retryQueue=null,Lc(t,i))));break;case 19:sn(r,t),cn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Lc(t,c)));break;case 30:break;case 21:break;default:sn(r,t),cn(t)}}function cn(t){var r=t.flags;if(r&2){try{for(var i,c=t.return;c!==null;){if(Fx(c)){i=c;break}c=c.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var m=i.stateNode,x=rp(t);zc(t,x,m);break;case 5:var C=i.stateNode;i.flags&32&&(Bl(C,""),i.flags&=-33);var R=rp(t);zc(t,R,C);break;case 3:case 4:var P=i.stateNode.containerInfo,Q=rp(t);ap(t,Q,P);break;default:throw Error(l(161))}}catch(oe){it(t,t.return,oe)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Kx(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;Kx(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Hr(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)$x(t,r.alternate,r),r=r.sibling}function hl(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:xa(4,r,r.return),hl(r);break;case 1:ur(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&Bx(r,r.return,i),hl(r);break;case 27:Uo(r.stateNode);case 26:case 5:ur(r,r.return),hl(r);break;case 22:r.memoizedState===null&&hl(r);break;case 30:hl(r);break;default:hl(r)}t=t.sibling}}function $r(t,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,m=t,x=r,C=x.flags;switch(x.tag){case 0:case 11:case 15:$r(m,x,i),Ro(4,x);break;case 1:if($r(m,x,i),c=x,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(Q){it(c,c.return,Q)}if(c=x,m=c.updateQueue,m!==null){var R=c.stateNode;try{var P=m.shared.hiddenCallbacks;if(P!==null)for(m.shared.hiddenCallbacks=null,m=0;m<P.length;m++)Ay(P[m],R)}catch(Q){it(c,c.return,Q)}}i&&C&64&&Ix(x),Mo(x,x.return);break;case 27:Ux(x);case 26:case 5:$r(m,x,i),i&&c===null&&C&4&&Px(x),Mo(x,x.return);break;case 12:$r(m,x,i);break;case 31:$r(m,x,i),i&&C&4&&Gx(m,x);break;case 13:$r(m,x,i),i&&C&4&&Yx(m,x);break;case 22:x.memoizedState===null&&$r(m,x,i),Mo(x,x.return);break;case 30:break;default:$r(m,x,i)}r=r.sibling}}function ip(t,r){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&xo(i))}function op(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&xo(t))}function Wn(t,r,i,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Qx(t,r,i,c),r=r.sibling}function Qx(t,r,i,c){var m=r.flags;switch(r.tag){case 0:case 11:case 15:Wn(t,r,i,c),m&2048&&Ro(9,r);break;case 1:Wn(t,r,i,c);break;case 3:Wn(t,r,i,c),m&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&xo(t)));break;case 12:if(m&2048){Wn(t,r,i,c),t=r.stateNode;try{var x=r.memoizedProps,C=x.id,R=x.onPostCommit;typeof R=="function"&&R(C,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(P){it(r,r.return,P)}}else Wn(t,r,i,c);break;case 31:Wn(t,r,i,c);break;case 13:Wn(t,r,i,c);break;case 23:break;case 22:x=r.stateNode,C=r.alternate,r.memoizedState!==null?x._visibility&2?Wn(t,r,i,c):Oo(t,r):x._visibility&2?Wn(t,r,i,c):(x._visibility|=2,ai(t,r,i,c,(r.subtreeFlags&10256)!==0||!1)),m&2048&&ip(C,r);break;case 24:Wn(t,r,i,c),m&2048&&op(r.alternate,r);break;default:Wn(t,r,i,c)}}function ai(t,r,i,c,m){for(m=m&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var x=t,C=r,R=i,P=c,Q=C.flags;switch(C.tag){case 0:case 11:case 15:ai(x,C,R,P,m),Ro(8,C);break;case 23:break;case 22:var oe=C.stateNode;C.memoizedState!==null?oe._visibility&2?ai(x,C,R,P,m):Oo(x,C):(oe._visibility|=2,ai(x,C,R,P,m)),m&&Q&2048&&ip(C.alternate,C);break;case 24:ai(x,C,R,P,m),m&&Q&2048&&op(C.alternate,C);break;default:ai(x,C,R,P,m)}r=r.sibling}}function Oo(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=t,c=r,m=c.flags;switch(c.tag){case 22:Oo(i,c),m&2048&&ip(c.alternate,c);break;case 24:Oo(i,c),m&2048&&op(c.alternate,c);break;default:Oo(i,c)}r=r.sibling}}var Do=8192;function li(t,r,i){if(t.subtreeFlags&Do)for(t=t.child;t!==null;)Zx(t,r,i),t=t.sibling}function Zx(t,r,i){switch(t.tag){case 26:li(t,r,i),t.flags&Do&&t.memoizedState!==null&&vA(i,Zn,t.memoizedState,t.memoizedProps);break;case 5:li(t,r,i);break;case 3:case 4:var c=Zn;Zn=Qc(t.stateNode.containerInfo),li(t,r,i),Zn=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=Do,Do=16777216,li(t,r,i),Do=c):li(t,r,i));break;default:li(t,r,i)}}function Wx(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function zo(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];It=c,eb(c,t)}Wx(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Jx(t),t=t.sibling}function Jx(t){switch(t.tag){case 0:case 11:case 15:zo(t),t.flags&2048&&xa(9,t,t.return);break;case 3:zo(t);break;case 12:zo(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Ic(t)):zo(t);break;default:zo(t)}}function Ic(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];It=c,eb(c,t)}Wx(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:xa(8,r,r.return),Ic(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Ic(r));break;default:Ic(r)}t=t.sibling}}function eb(t,r){for(;It!==null;){var i=It;switch(i.tag){case 0:case 11:case 15:xa(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var c=i.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:xo(i.memoizedState.cache)}if(c=i.child,c!==null)c.return=i,It=c;else e:for(i=t;It!==null;){c=It;var m=c.sibling,x=c.return;if(Vx(c),c===i){It=null;break e}if(m!==null){m.return=x,It=m;break e}It=x}}}var z2={getCacheForType:function(t){var r=$t(At),i=r.data.get(t);return i===void 0&&(i=t(),r.data.set(t,i)),i},cacheSignal:function(){return $t(At).controller.signal}},L2=typeof WeakMap=="function"?WeakMap:Map,rt=0,ft=null,qe=null,Xe=0,lt=0,bn=null,ba=!1,ii=!1,sp=!1,Vr=0,St=0,va=0,ml=0,cp=0,vn=0,oi=0,Lo=null,un=null,up=!1,Bc=0,tb=0,Pc=1/0,Fc=null,wa=null,Dt=0,Sa=null,si=null,qr=0,dp=0,fp=null,nb=null,Io=0,pp=null;function wn(){return(rt&2)!==0&&Xe!==0?Xe&-Xe:z.T!==null?bp():Ys()}function rb(){if(vn===0)if((Xe&536870912)===0||Qe){var t=Er;Er<<=1,(Er&3932160)===0&&(Er=262144),vn=t}else vn=536870912;return t=yn.current,t!==null&&(t.flags|=32),vn}function dn(t,r,i){(t===ft&&(lt===2||lt===9)||t.cancelPendingCommit!==null)&&(ci(t,0),ka(t,Xe,vn,!1)),Ka(t,i),((rt&2)===0||t!==ft)&&(t===ft&&((rt&2)===0&&(ml|=i),St===4&&ka(t,Xe,vn,!1)),dr(t))}function ab(t,r,i){if((rt&6)!==0)throw Error(l(327));var c=!i&&(r&127)===0&&(r&t.expiredLanes)===0||Ar(t,r),m=c?P2(t,r):mp(t,r,!0),x=c;do{if(m===0){ii&&!c&&ka(t,r,0,!1);break}else{if(i=t.current.alternate,x&&!I2(i)){m=mp(t,r,!1),x=!1;continue}if(m===2){if(x=r,t.errorRecoveryDisabledLanes&x)var C=0;else C=t.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){r=C;e:{var R=t;m=Lo;var P=R.current.memoizedState.isDehydrated;if(P&&(ci(R,C).flags|=256),C=mp(R,C,!1),C!==2){if(sp&&!P){R.errorRecoveryDisabledLanes|=x,ml|=x,m=4;break e}x=un,un=m,x!==null&&(un===null?un=x:un.push.apply(un,x))}m=C}if(x=!1,m!==2)continue}}if(m===1){ci(t,0),ka(t,r,0,!0);break}e:{switch(c=t,x=m,x){case 0:case 1:throw Error(l(345));case 4:if((r&4194048)!==r)break;case 6:ka(c,r,vn,!ba);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(l(329))}if((r&62914560)===r&&(m=Bc+300-Rt(),10<m)){if(ka(c,r,vn,!ba),Ml(c,0,!0)!==0)break e;qr=r,c.timeoutHandle=zb(lb.bind(null,c,i,un,Fc,up,r,vn,ml,oi,ba,x,"Throttled",-0,0),m);break e}lb(c,i,un,Fc,up,r,vn,ml,oi,ba,x,null,-0,0)}}break}while(!0);dr(t)}function lb(t,r,i,c,m,x,C,R,P,Q,oe,de,J,re){if(t.timeoutHandle=-1,de=r.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_r},Zx(r,x,de);var Se=(x&62914560)===x?Bc-Rt():(x&4194048)===x?tb-Rt():0;if(Se=wA(de,Se),Se!==null){qr=x,t.cancelPendingCommit=Se(pb.bind(null,t,r,x,i,c,m,C,R,P,oe,de,null,J,re)),ka(t,x,C,!Q);return}}pb(t,r,x,i,c,m,C,R,P)}function I2(t){for(var r=t;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var c=0;c<i.length;c++){var m=i[c],x=m.getSnapshot;m=m.value;try{if(!mn(x(),m))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function ka(t,r,i,c){r&=~cp,r&=~ml,t.suspendedLanes|=r,t.pingedLanes&=~r,c&&(t.warmLanes|=r),c=t.expirationTimes;for(var m=r;0<m;){var x=31-st(m),C=1<<x;c[x]=-1,m&=~C}i!==0&&Vs(t,i,r)}function Uc(){return(rt&6)===0?(Bo(0),!1):!0}function hp(){if(qe!==null){if(lt===0)var t=qe.return;else t=qe,Dr=il=null,_f(t),Jl=null,vo=0,t=qe;for(;t!==null;)Lx(t.alternate,t),t=t.return;qe=null}}function ci(t,r){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,rA(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),qr=0,hp(),ft=t,qe=i=Mr(t.current,null),Xe=r,lt=0,bn=null,ba=!1,ii=Ar(t,r),sp=!1,oi=vn=cp=ml=va=St=0,un=Lo=null,up=!1,(r&8)!==0&&(r|=r&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=r;0<c;){var m=31-st(c),x=1<<m;r|=t[m],c&=~x}return Vr=r,sc(),i}function ib(t,r){Ie=null,z.H=jo,r===Wl||r===gc?(r=Sy(),lt=3):r===xf?(r=Sy(),lt=4):lt=r===Gf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,bn=r,qe===null&&(St=1,_c(t,Mn(r,t.current)))}function ob(){var t=yn.current;return t===null?!0:(Xe&4194048)===Xe?Ln===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?t===Ln:!1}function sb(){var t=z.H;return z.H=jo,t===null?jo:t}function cb(){var t=z.A;return z.A=z2,t}function Hc(){St=4,ba||(Xe&4194048)!==Xe&&yn.current!==null||(ii=!0),(va&134217727)===0&&(ml&134217727)===0||ft===null||ka(ft,Xe,vn,!1)}function mp(t,r,i){var c=rt;rt|=2;var m=sb(),x=cb();(ft!==t||Xe!==r)&&(Fc=null,ci(t,r)),r=!1;var C=St;e:do try{if(lt!==0&&qe!==null){var R=qe,P=bn;switch(lt){case 8:hp(),C=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(r=!0);var Q=lt;if(lt=0,bn=null,ui(t,R,P,Q),i&&ii){C=0;break e}break;default:Q=lt,lt=0,bn=null,ui(t,R,P,Q)}}B2(),C=St;break}catch(oe){ib(t,oe)}while(!0);return r&&t.shellSuspendCounter++,Dr=il=null,rt=c,z.H=m,z.A=x,qe===null&&(ft=null,Xe=0,sc()),C}function B2(){for(;qe!==null;)ub(qe)}function P2(t,r){var i=rt;rt|=2;var c=sb(),m=cb();ft!==t||Xe!==r?(Fc=null,Pc=Rt()+500,ci(t,r)):ii=Ar(t,r);e:do try{if(lt!==0&&qe!==null){r=qe;var x=bn;t:switch(lt){case 1:lt=0,bn=null,ui(t,r,x,1);break;case 2:case 9:if(vy(x)){lt=0,bn=null,db(r);break}r=function(){lt!==2&<!==9||ft!==t||(lt=7),dr(t)},x.then(r,r);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:vy(x)?(lt=0,bn=null,db(r)):(lt=0,bn=null,ui(t,r,x,7));break;case 5:var C=null;switch(qe.tag){case 26:C=qe.memoizedState;case 5:case 27:var R=qe;if(C?Qb(C):R.stateNode.complete){lt=0,bn=null;var P=R.sibling;if(P!==null)qe=P;else{var Q=R.return;Q!==null?(qe=Q,$c(Q)):qe=null}break t}}lt=0,bn=null,ui(t,r,x,5);break;case 6:lt=0,bn=null,ui(t,r,x,6);break;case 8:hp(),St=6;break e;default:throw Error(l(462))}}F2();break}catch(oe){ib(t,oe)}while(!0);return Dr=il=null,z.H=c,z.A=m,rt=i,qe!==null?0:(ft=null,Xe=0,sc(),St)}function F2(){for(;qe!==null&&!wr();)ub(qe)}function ub(t){var r=Dx(t.alternate,t,Vr);t.memoizedProps=t.pendingProps,r===null?$c(t):qe=r}function db(t){var r=t,i=r.alternate;switch(r.tag){case 15:case 0:r=jx(i,r,r.pendingProps,r.type,void 0,Xe);break;case 11:r=jx(i,r,r.pendingProps,r.type.render,r.ref,Xe);break;case 5:_f(r);default:Lx(i,r),r=qe=cy(r,Vr),r=Dx(i,r,Vr)}t.memoizedProps=t.pendingProps,r===null?$c(t):qe=r}function ui(t,r,i,c){Dr=il=null,_f(r),Jl=null,vo=0;var m=r.return;try{if(j2(t,m,r,i,Xe)){St=1,_c(t,Mn(i,t.current)),qe=null;return}}catch(x){if(m!==null)throw qe=m,x;St=1,_c(t,Mn(i,t.current)),qe=null;return}r.flags&32768?(Qe||c===1?t=!0:ii||(Xe&536870912)!==0?t=!1:(ba=t=!0,(c===2||c===9||c===3||c===6)&&(c=yn.current,c!==null&&c.tag===13&&(c.flags|=16384))),fb(r,t)):$c(r)}function $c(t){var r=t;do{if((r.flags&32768)!==0){fb(r,ba);return}t=r.return;var i=R2(r.alternate,r,Vr);if(i!==null){qe=i;return}if(r=r.sibling,r!==null){qe=r;return}qe=r=t}while(r!==null);St===0&&(St=5)}function fb(t,r){do{var i=M2(t.alternate,t);if(i!==null){i.flags&=32767,qe=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(t=t.sibling,t!==null)){qe=t;return}qe=t=i}while(t!==null);St=6,qe=null}function pb(t,r,i,c,m,x,C,R,P){t.cancelPendingCommit=null;do Vc();while(Dt!==0);if((rt&6)!==0)throw Error(l(327));if(r!==null){if(r===t.current)throw Error(l(177));if(x=r.lanes|r.childLanes,x|=nf,$s(t,i,x,C,R,P),t===ft&&(qe=ft=null,Xe=0),si=r,Sa=t,qr=i,dp=x,fp=m,nb=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,V2(Oe,function(){return xb(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=z.T,z.T=null,m=K.p,K.p=2,C=rt,rt|=4;try{O2(t,r,i)}finally{rt=C,K.p=m,z.T=c}}Dt=1,hb(),mb(),gb()}}function hb(){if(Dt===1){Dt=0;var t=Sa,r=si,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=z.T,z.T=null;var c=K.p;K.p=2;var m=rt;rt|=4;try{Xx(r,t);var x=Np,C=ey(t.containerInfo),R=x.focusedElem,P=x.selectionRange;if(C!==R&&R&&R.ownerDocument&&Jg(R.ownerDocument.documentElement,R)){if(P!==null&&Zd(R)){var Q=P.start,oe=P.end;if(oe===void 0&&(oe=Q),"selectionStart"in R)R.selectionStart=Q,R.selectionEnd=Math.min(oe,R.value.length);else{var de=R.ownerDocument||document,J=de&&de.defaultView||window;if(J.getSelection){var re=J.getSelection(),Se=R.textContent.length,Me=Math.min(P.start,Se),dt=P.end===void 0?Me:Math.min(P.end,Se);!re.extend&&Me>dt&&(C=dt,dt=Me,Me=C);var V=Wg(R,Me),$=Wg(R,dt);if(V&&$&&(re.rangeCount!==1||re.anchorNode!==V.node||re.anchorOffset!==V.offset||re.focusNode!==$.node||re.focusOffset!==$.offset)){var X=de.createRange();X.setStart(V.node,V.offset),re.removeAllRanges(),Me>dt?(re.addRange(X),re.extend($.node,$.offset)):(X.setEnd($.node,$.offset),re.addRange(X))}}}}for(de=[],re=R;re=re.parentNode;)re.nodeType===1&&de.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<de.length;R++){var ue=de[R];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}nu=!!Ap,Np=Ap=null}finally{rt=m,K.p=c,z.T=i}}t.current=r,Dt=2}}function mb(){if(Dt===2){Dt=0;var t=Sa,r=si,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=z.T,z.T=null;var c=K.p;K.p=2;var m=rt;rt|=4;try{$x(t,r.alternate,r)}finally{rt=m,K.p=c,z.T=i}}Dt=3}}function gb(){if(Dt===4||Dt===3){Dt=0,Sr();var t=Sa,r=si,i=qr,c=nb;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Dt=5:(Dt=0,si=Sa=null,yb(t,t.pendingLanes));var m=t.pendingLanes;if(m===0&&(wa=null),Le(i),r=r.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(Ut,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=z.T,m=K.p,K.p=2,z.T=null;try{for(var x=t.onRecoverableError,C=0;C<c.length;C++){var R=c[C];x(R.value,{componentStack:R.stack})}}finally{z.T=r,K.p=m}}(qr&3)!==0&&Vc(),dr(t),m=t.pendingLanes,(i&261930)!==0&&(m&42)!==0?t===pp?Io++:(Io=0,pp=t):Io=0,Bo(0)}}function yb(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,xo(r)))}function Vc(){return hb(),mb(),gb(),xb()}function xb(){if(Dt!==5)return!1;var t=Sa,r=dp;dp=0;var i=Le(qr),c=z.T,m=K.p;try{K.p=32>i?32:i,z.T=null,i=fp,fp=null;var x=Sa,C=qr;if(Dt=0,si=Sa=null,qr=0,(rt&6)!==0)throw Error(l(331));var R=rt;if(rt|=4,Jx(x.current),Qx(x,x.current,C,i),rt=R,Bo(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(Ut,x)}catch{}return!0}finally{K.p=m,z.T=c,yb(t,r)}}function bb(t,r,i){r=Mn(i,r),r=qf(t.stateNode,r,2),t=ma(t,r,2),t!==null&&(Ka(t,2),dr(t))}function it(t,r,i){if(t.tag===3)bb(t,t,i);else for(;r!==null;){if(r.tag===3){bb(r,t,i);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(wa===null||!wa.has(c))){t=Mn(i,t),i=vx(2),c=ma(r,i,2),c!==null&&(wx(i,c,r,t),Ka(c,2),dr(c));break}}r=r.return}}function gp(t,r,i){var c=t.pingCache;if(c===null){c=t.pingCache=new L2;var m=new Set;c.set(r,m)}else m=c.get(r),m===void 0&&(m=new Set,c.set(r,m));m.has(i)||(sp=!0,m.add(i),t=U2.bind(null,t,r,i),r.then(t,t))}function U2(t,r,i){var c=t.pingCache;c!==null&&c.delete(r),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,ft===t&&(Xe&i)===i&&(St===4||St===3&&(Xe&62914560)===Xe&&300>Rt()-Bc?(rt&2)===0&&ci(t,0):cp|=i,oi===Xe&&(oi=0)),dr(t)}function vb(t,r){r===0&&(r=Hs()),t=rl(t,r),t!==null&&(Ka(t,r),dr(t))}function H2(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),vb(t,i)}function $2(t,r){var i=0;switch(t.tag){case 31:case 13:var c=t.stateNode,m=t.memoizedState;m!==null&&(i=m.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(l(314))}c!==null&&c.delete(r),vb(t,i)}function V2(t,r){return ar(t,r)}var qc=null,di=null,yp=!1,Gc=!1,xp=!1,Ca=0;function dr(t){t!==di&&t.next===null&&(di===null?qc=di=t:di=di.next=t),Gc=!0,yp||(yp=!0,G2())}function Bo(t,r){if(!xp&&Gc){xp=!0;do for(var i=!1,c=qc;c!==null;){if(t!==0){var m=c.pendingLanes;if(m===0)var x=0;else{var C=c.suspendedLanes,R=c.pingedLanes;x=(1<<31-st(42|t)+1)-1,x&=m&~(C&~R),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(i=!0,Cb(c,x))}else x=Xe,x=Ml(c,c===ft?x:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(x&3)===0||Ar(c,x)||(i=!0,Cb(c,x));c=c.next}while(i);xp=!1}}function q2(){wb()}function wb(){Gc=yp=!1;var t=0;Ca!==0&&nA()&&(t=Ca);for(var r=Rt(),i=null,c=qc;c!==null;){var m=c.next,x=Sb(c,r);x===0?(c.next=null,i===null?qc=m:i.next=m,m===null&&(di=i)):(i=c,(t!==0||(x&3)!==0)&&(Gc=!0)),c=m}Dt!==0&&Dt!==5||Bo(t),Ca!==0&&(Ca=0)}function Sb(t,r){for(var i=t.suspendedLanes,c=t.pingedLanes,m=t.expirationTimes,x=t.pendingLanes&-62914561;0<x;){var C=31-st(x),R=1<<C,P=m[C];P===-1?((R&i)===0||(R&c)!==0)&&(m[C]=lr(R,r)):P<=r&&(t.expiredLanes|=R),x&=~R}if(r=ft,i=Xe,i=Ml(t,t===r?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,i===0||t===r&&(lt===2||lt===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&jn(c),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Ar(t,i)){if(r=i&-i,r===t.callbackPriority)return r;switch(c!==null&&jn(c),Le(i)){case 2:case 8:i=xe;break;case 32:i=Oe;break;case 268435456:i=Ze;break;default:i=Oe}return c=kb.bind(null,t),i=ar(i,c),t.callbackPriority=r,t.callbackNode=i,r}return c!==null&&c!==null&&jn(c),t.callbackPriority=2,t.callbackNode=null,2}function kb(t,r){if(Dt!==0&&Dt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(Vc()&&t.callbackNode!==i)return null;var c=Xe;return c=Ml(t,t===ft?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(ab(t,c,r),Sb(t,Rt()),t.callbackNode!=null&&t.callbackNode===i?kb.bind(null,t):null)}function Cb(t,r){if(Vc())return null;ab(t,r,!0)}function G2(){aA(function(){(rt&6)!==0?ar(se,q2):wb()})}function bp(){if(Ca===0){var t=Ql;t===0&&(t=Cr,Cr<<=1,(Cr&261888)===0&&(Cr=256)),Ca=t}return Ca}function Eb(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ec(""+t)}function Ab(t,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,t.id&&i.setAttribute("form",t.id),r.parentNode.insertBefore(i,r),t=new FormData(t),i.parentNode.removeChild(i),t}function Y2(t,r,i,c,m){if(r==="submit"&&i&&i.stateNode===m){var x=Eb((m[Yt]||null).action),C=c.submitter;C&&(r=(r=C[Yt]||null)?Eb(r.formAction):C.getAttribute("formAction"),r!==null&&(x=r,C=null));var R=new ac("action","action",null,c,m);t.push({event:R,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ca!==0){var P=C?Ab(m,C):new FormData(m);Pf(i,{pending:!0,data:P,method:m.method,action:x},null,P)}}else typeof x=="function"&&(R.preventDefault(),P=C?Ab(m,C):new FormData(m),Pf(i,{pending:!0,data:P,method:m.method,action:x},x,P))},currentTarget:m}]})}}for(var vp=0;vp<tf.length;vp++){var wp=tf[vp],X2=wp.toLowerCase(),K2=wp[0].toUpperCase()+wp.slice(1);Qn(X2,"on"+K2)}Qn(ry,"onAnimationEnd"),Qn(ay,"onAnimationIteration"),Qn(ly,"onAnimationStart"),Qn("dblclick","onDoubleClick"),Qn("focusin","onFocus"),Qn("focusout","onBlur"),Qn(d2,"onTransitionRun"),Qn(f2,"onTransitionStart"),Qn(p2,"onTransitionCancel"),Qn(iy,"onTransitionEnd"),Tr("onMouseEnter",["mouseout","mouseover"]),Tr("onMouseLeave",["mouseout","mouseover"]),Tr("onPointerEnter",["pointerout","pointerover"]),Tr("onPointerLeave",["pointerout","pointerover"]),jr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jr("onBeforeInput",["compositionend","keypress","textInput","paste"]),jr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Po="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(" "),Q2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Po));function Nb(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var c=t[i],m=c.event;c=c.listeners;e:{var x=void 0;if(r)for(var C=c.length-1;0<=C;C--){var R=c[C],P=R.instance,Q=R.currentTarget;if(R=R.listener,P!==x&&m.isPropagationStopped())break e;x=R,m.currentTarget=Q;try{x(m)}catch(oe){oc(oe)}m.currentTarget=null,x=P}else for(C=0;C<c.length;C++){if(R=c[C],P=R.instance,Q=R.currentTarget,R=R.listener,P!==x&&m.isPropagationStopped())break e;x=R,m.currentTarget=Q;try{x(m)}catch(oe){oc(oe)}m.currentTarget=null,x=P}}}}function Ge(t,r){var i=r[ro];i===void 0&&(i=r[ro]=new Set);var c=t+"__bubble";i.has(c)||(jb(r,t,2,!1),i.add(c))}function Sp(t,r,i){var c=0;r&&(c|=4),jb(i,t,c,r)}var Yc="_reactListening"+Math.random().toString(36).slice(2);function kp(t){if(!t[Yc]){t[Yc]=!0,Ks.forEach(function(i){i!=="selectionchange"&&(Q2.has(i)||Sp(i,!1,t),Sp(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Yc]||(r[Yc]=!0,Sp("selectionchange",!1,r))}}function jb(t,r,i,c){switch(rv(r)){case 2:var m=CA;break;case 8:m=EA;break;default:m=Bp}i=m.bind(null,r,i,t),m=void 0,!Hd||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(m=!0),c?m!==void 0?t.addEventListener(r,i,{capture:!0,passive:m}):t.addEventListener(r,i,!0):m!==void 0?t.addEventListener(r,i,{passive:m}):t.addEventListener(r,i,!1)}function Cp(t,r,i,c,m){var x=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var C=c.tag;if(C===3||C===4){var R=c.stateNode.containerInfo;if(R===m)break;if(C===4)for(C=c.return;C!==null;){var P=C.tag;if((P===3||P===4)&&C.stateNode.containerInfo===m)return;C=C.return}for(;R!==null;){if(C=Nr(R),C===null)return;if(P=C.tag,P===5||P===6||P===26||P===27){c=x=C;continue e}R=R.parentNode}}c=c.return}Og(function(){var Q=x,oe=Fd(i),de=[];e:{var J=oy.get(t);if(J!==void 0){var re=ac,Se=t;switch(t){case"keypress":if(nc(i)===0)break e;case"keydown":case"keyup":re=$E;break;case"focusin":Se="focus",re=Gd;break;case"focusout":Se="blur",re=Gd;break;case"beforeblur":case"afterblur":re=Gd;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Lg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=RE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=GE;break;case ry:case ay:case ly:re=DE;break;case iy:re=XE;break;case"scroll":case"scrollend":re=TE;break;case"wheel":re=QE;break;case"copy":case"cut":case"paste":re=LE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=Bg;break;case"toggle":case"beforetoggle":re=WE}var Me=(r&4)!==0,dt=!Me&&(t==="scroll"||t==="scrollend"),V=Me?J!==null?J+"Capture":null:J;Me=[];for(var $=Q,X;$!==null;){var ue=$;if(X=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||X===null||V===null||(ue=io($,V),ue!=null&&Me.push(Fo($,ue,X))),dt)break;$=$.return}0<Me.length&&(J=new re(J,Se,null,i,oe),de.push({event:J,listeners:Me}))}}if((r&7)===0){e:{if(J=t==="mouseover"||t==="pointerover",re=t==="mouseout"||t==="pointerout",J&&i!==Pd&&(Se=i.relatedTarget||i.fromElement)&&(Nr(Se)||Se[la]))break e;if((re||J)&&(J=oe.window===oe?oe:(J=oe.ownerDocument)?J.defaultView||J.parentWindow:window,re?(Se=i.relatedTarget||i.toElement,re=Q,Se=Se?Nr(Se):null,Se!==null&&(dt=s(Se),Me=Se.tag,Se!==dt||Me!==5&&Me!==27&&Me!==6)&&(Se=null)):(re=null,Se=Q),re!==Se)){if(Me=Lg,ue="onMouseLeave",V="onMouseEnter",$="mouse",(t==="pointerout"||t==="pointerover")&&(Me=Bg,ue="onPointerLeave",V="onPointerEnter",$="pointer"),dt=re==null?J:Wa(re),X=Se==null?J:Wa(Se),J=new Me(ue,$+"leave",re,i,oe),J.target=dt,J.relatedTarget=X,ue=null,Nr(oe)===Q&&(Me=new Me(V,$+"enter",Se,i,oe),Me.target=X,Me.relatedTarget=dt,ue=Me),dt=ue,re&&Se)t:{for(Me=Z2,V=re,$=Se,X=0,ue=V;ue;ue=Me(ue))X++;ue=0;for(var Te=$;Te;Te=Me(Te))ue++;for(;0<X-ue;)V=Me(V),X--;for(;0<ue-X;)$=Me($),ue--;for(;X--;){if(V===$||$!==null&&V===$.alternate){Me=V;break t}V=Me(V),$=Me($)}Me=null}else Me=null;re!==null&&Tb(de,J,re,Me,!1),Se!==null&&dt!==null&&Tb(de,dt,Se,Me,!0)}}e:{if(J=Q?Wa(Q):window,re=J.nodeName&&J.nodeName.toLowerCase(),re==="select"||re==="input"&&J.type==="file")var tt=Gg;else if(Vg(J))if(Yg)tt=s2;else{tt=i2;var Ee=l2}else re=J.nodeName,!re||re.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Q&&Bd(Q.elementType)&&(tt=Gg):tt=o2;if(tt&&(tt=tt(t,Q))){qg(de,tt,i,oe);break e}Ee&&Ee(t,J,Q),t==="focusout"&&Q&&J.type==="number"&&Q.memoizedProps.value!=null&&Xn(J,"number",J.value)}switch(Ee=Q?Wa(Q):window,t){case"focusin":(Vg(Ee)||Ee.contentEditable==="true")&&(Hl=Ee,Wd=Q,mo=null);break;case"focusout":mo=Wd=Hl=null;break;case"mousedown":Jd=!0;break;case"contextmenu":case"mouseup":case"dragend":Jd=!1,ty(de,i,oe);break;case"selectionchange":if(u2)break;case"keydown":case"keyup":ty(de,i,oe)}var Fe;if(Xd)e:{switch(t){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ul?Hg(t,i)&&(Ke="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Ke="onCompositionStart");Ke&&(Pg&&i.locale!=="ko"&&(Ul||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ul&&(Fe=Dg()):(sa=oe,$d="value"in sa?sa.value:sa.textContent,Ul=!0)),Ee=Xc(Q,Ke),0<Ee.length&&(Ke=new Ig(Ke,t,null,i,oe),de.push({event:Ke,listeners:Ee}),Fe?Ke.data=Fe:(Fe=$g(i),Fe!==null&&(Ke.data=Fe)))),(Fe=e2?t2(t,i):n2(t,i))&&(Ke=Xc(Q,"onBeforeInput"),0<Ke.length&&(Ee=new Ig("onBeforeInput","beforeinput",null,i,oe),de.push({event:Ee,listeners:Ke}),Ee.data=Fe)),Y2(de,t,Q,i,oe)}Nb(de,r)})}function Fo(t,r,i){return{instance:t,listener:r,currentTarget:i}}function Xc(t,r){for(var i=r+"Capture",c=[];t!==null;){var m=t,x=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||x===null||(m=io(t,i),m!=null&&c.unshift(Fo(t,m,x)),m=io(t,r),m!=null&&c.push(Fo(t,m,x))),t.tag===3)return c;t=t.return}return[]}function Z2(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Tb(t,r,i,c,m){for(var x=r._reactName,C=[];i!==null&&i!==c;){var R=i,P=R.alternate,Q=R.stateNode;if(R=R.tag,P!==null&&P===c)break;R!==5&&R!==26&&R!==27||Q===null||(P=Q,m?(Q=io(i,x),Q!=null&&C.unshift(Fo(i,Q,P))):m||(Q=io(i,x),Q!=null&&C.push(Fo(i,Q,P)))),i=i.return}C.length!==0&&t.push({event:r,listeners:C})}var W2=/\r\n?/g,J2=/\u0000|\uFFFD/g;function _b(t){return(typeof t=="string"?t:""+t).replace(W2,`
|
|
49
|
+
`).replace(J2,"")}function Rb(t,r){return r=_b(r),_b(t)===r}function ut(t,r,i,c,m,x){switch(i){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||Bl(t,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&Bl(t,""+c);break;case"className":Ja(t,"class",c);break;case"tabIndex":Ja(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ja(t,i,c);break;case"style":Rg(t,c,x);break;case"data":if(r!=="object"){Ja(t,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||i!=="href")){t.removeAttribute(i);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(i);break}c=ec(""+c),t.setAttribute(i,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(i==="formAction"?(r!=="input"&&ut(t,r,"name",m.name,m,null),ut(t,r,"formEncType",m.formEncType,m,null),ut(t,r,"formMethod",m.formMethod,m,null),ut(t,r,"formTarget",m.formTarget,m,null)):(ut(t,r,"encType",m.encType,m,null),ut(t,r,"method",m.method,m,null),ut(t,r,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(i);break}c=ec(""+c),t.setAttribute(i,c);break;case"onClick":c!=null&&(t.onclick=_r);break;case"onScroll":c!=null&&Ge("scroll",t);break;case"onScrollEnd":c!=null&&Ge("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(i=c.__html,i!=null){if(m.children!=null)throw Error(l(60));t.innerHTML=i}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}i=ec(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(i,""+c):t.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":c===!0?t.setAttribute(i,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(i,c):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(i,c):t.removeAttribute(i);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(i):t.setAttribute(i,c);break;case"popover":Ge("beforetoggle",t),Ge("toggle",t),Ll(t,"popover",c);break;case"xlinkActuate":_n(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":_n(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":_n(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":_n(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":_n(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":_n(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":_n(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":_n(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":_n(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Ll(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=NE.get(i)||i,Ll(t,i,c))}}function Ep(t,r,i,c,m,x){switch(i){case"style":Rg(t,c,x);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(i=c.__html,i!=null){if(m.children!=null)throw Error(l(60));t.innerHTML=i}}break;case"children":typeof c=="string"?Bl(t,c):(typeof c=="number"||typeof c=="bigint")&&Bl(t,""+c);break;case"onScroll":c!=null&&Ge("scroll",t);break;case"onScrollEnd":c!=null&&Ge("scrollend",t);break;case"onClick":c!=null&&(t.onclick=_r);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qs.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(m=i.endsWith("Capture"),r=i.slice(2,m?i.length-7:void 0),x=t[Yt]||null,x=x!=null?x[i]:null,typeof x=="function"&&t.removeEventListener(r,x,m),typeof c=="function")){typeof x!="function"&&x!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(r,c,m);break e}i in t?t[i]=c:c===!0?t.setAttribute(i,""):Ll(t,i,c)}}}function qt(t,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",t),Ge("load",t);var c=!1,m=!1,x;for(x in i)if(i.hasOwnProperty(x)){var C=i[x];if(C!=null)switch(x){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:ut(t,r,x,C,i,null)}}m&&ut(t,r,"srcSet",i.srcSet,i,null),c&&ut(t,r,"src",i.src,i,null);return;case"input":Ge("invalid",t);var R=x=C=m=null,P=null,Q=null;for(c in i)if(i.hasOwnProperty(c)){var oe=i[c];if(oe!=null)switch(c){case"name":m=oe;break;case"type":C=oe;break;case"checked":P=oe;break;case"defaultChecked":Q=oe;break;case"value":x=oe;break;case"defaultValue":R=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(l(137,r));break;default:ut(t,r,c,oe,i,null)}}Yn(t,x,R,P,Q,C,m,!1);return;case"select":Ge("invalid",t),c=C=x=null;for(m in i)if(i.hasOwnProperty(m)&&(R=i[m],R!=null))switch(m){case"value":x=R;break;case"defaultValue":C=R;break;case"multiple":c=R;default:ut(t,r,m,R,i,null)}r=x,i=C,t.multiple=!!c,r!=null?Kn(t,!!c,r,!1):i!=null&&Kn(t,!!c,i,!0);return;case"textarea":Ge("invalid",t),x=m=c=null;for(C in i)if(i.hasOwnProperty(C)&&(R=i[C],R!=null))switch(C){case"value":c=R;break;case"defaultValue":m=R;break;case"children":x=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(l(91));break;default:ut(t,r,C,R,i,null)}Js(t,c,m,x);return;case"option":for(P in i)if(i.hasOwnProperty(P)&&(c=i[P],c!=null))switch(P){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:ut(t,r,P,c,i,null)}return;case"dialog":Ge("beforetoggle",t),Ge("toggle",t),Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":Ge("load",t);break;case"video":case"audio":for(c=0;c<Po.length;c++)Ge(Po[c],t);break;case"image":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"embed":case"source":case"link":Ge("error",t),Ge("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(Q in i)if(i.hasOwnProperty(Q)&&(c=i[Q],c!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:ut(t,r,Q,c,i,null)}return;default:if(Bd(r)){for(oe in i)i.hasOwnProperty(oe)&&(c=i[oe],c!==void 0&&Ep(t,r,oe,c,i,void 0));return}}for(R in i)i.hasOwnProperty(R)&&(c=i[R],c!=null&&ut(t,r,R,c,i,null))}function eA(t,r,i,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,x=null,C=null,R=null,P=null,Q=null,oe=null;for(re in i){var de=i[re];if(i.hasOwnProperty(re)&&de!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":P=de;default:c.hasOwnProperty(re)||ut(t,r,re,null,c,de)}}for(var J in c){var re=c[J];if(de=i[J],c.hasOwnProperty(J)&&(re!=null||de!=null))switch(J){case"type":x=re;break;case"name":m=re;break;case"checked":Q=re;break;case"defaultChecked":oe=re;break;case"value":C=re;break;case"defaultValue":R=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(l(137,r));break;default:re!==de&&ut(t,r,J,re,c,de)}}tn(t,C,R,P,Q,oe,x,m);return;case"select":re=C=R=J=null;for(x in i)if(P=i[x],i.hasOwnProperty(x)&&P!=null)switch(x){case"value":break;case"multiple":re=P;default:c.hasOwnProperty(x)||ut(t,r,x,null,c,P)}for(m in c)if(x=c[m],P=i[m],c.hasOwnProperty(m)&&(x!=null||P!=null))switch(m){case"value":J=x;break;case"defaultValue":R=x;break;case"multiple":C=x;default:x!==P&&ut(t,r,m,x,c,P)}r=R,i=C,c=re,J!=null?Kn(t,!!i,J,!1):!!c!=!!i&&(r!=null?Kn(t,!!i,r,!0):Kn(t,!!i,i?[]:"",!1));return;case"textarea":re=J=null;for(R in i)if(m=i[R],i.hasOwnProperty(R)&&m!=null&&!c.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:ut(t,r,R,null,c,m)}for(C in c)if(m=c[C],x=i[C],c.hasOwnProperty(C)&&(m!=null||x!=null))switch(C){case"value":J=m;break;case"defaultValue":re=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(l(91));break;default:m!==x&&ut(t,r,C,m,c,x)}Il(t,J,re);return;case"option":for(var Se in i)if(J=i[Se],i.hasOwnProperty(Se)&&J!=null&&!c.hasOwnProperty(Se))switch(Se){case"selected":t.selected=!1;break;default:ut(t,r,Se,null,c,J)}for(P in c)if(J=c[P],re=i[P],c.hasOwnProperty(P)&&J!==re&&(J!=null||re!=null))switch(P){case"selected":t.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:ut(t,r,P,J,c,re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Me in i)J=i[Me],i.hasOwnProperty(Me)&&J!=null&&!c.hasOwnProperty(Me)&&ut(t,r,Me,null,c,J);for(Q in c)if(J=c[Q],re=i[Q],c.hasOwnProperty(Q)&&J!==re&&(J!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(l(137,r));break;default:ut(t,r,Q,J,c,re)}return;default:if(Bd(r)){for(var dt in i)J=i[dt],i.hasOwnProperty(dt)&&J!==void 0&&!c.hasOwnProperty(dt)&&Ep(t,r,dt,void 0,c,J);for(oe in c)J=c[oe],re=i[oe],!c.hasOwnProperty(oe)||J===re||J===void 0&&re===void 0||Ep(t,r,oe,J,c,re);return}}for(var V in i)J=i[V],i.hasOwnProperty(V)&&J!=null&&!c.hasOwnProperty(V)&&ut(t,r,V,null,c,J);for(de in c)J=c[de],re=i[de],!c.hasOwnProperty(de)||J===re||J==null&&re==null||ut(t,r,de,J,c,re)}function Mb(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function tA(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,i=performance.getEntriesByType("resource"),c=0;c<i.length;c++){var m=i[c],x=m.transferSize,C=m.initiatorType,R=m.duration;if(x&&R&&Mb(C)){for(C=0,R=m.responseEnd,c+=1;c<i.length;c++){var P=i[c],Q=P.startTime;if(Q>R)break;var oe=P.transferSize,de=P.initiatorType;oe&&Mb(de)&&(P=P.responseEnd,C+=oe*(P<R?1:(R-Q)/(P-Q)))}if(--c,r+=8*(x+C)/(m.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Ap=null,Np=null;function Kc(t){return t.nodeType===9?t:t.ownerDocument}function Ob(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 Db(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function jp(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Tp=null;function nA(){var t=window.event;return t&&t.type==="popstate"?t===Tp?!1:(Tp=t,!0):(Tp=null,!1)}var zb=typeof setTimeout=="function"?setTimeout:void 0,rA=typeof clearTimeout=="function"?clearTimeout:void 0,Lb=typeof Promise=="function"?Promise:void 0,aA=typeof queueMicrotask=="function"?queueMicrotask:typeof Lb<"u"?function(t){return Lb.resolve(null).then(t).catch(lA)}:zb;function lA(t){setTimeout(function(){throw t})}function Ea(t){return t==="head"}function Ib(t,r){var i=r,c=0;do{var m=i.nextSibling;if(t.removeChild(i),m&&m.nodeType===8)if(i=m.data,i==="/$"||i==="/&"){if(c===0){t.removeChild(m),mi(r);return}c--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")c++;else if(i==="html")Uo(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,Uo(i);for(var x=i.firstChild;x;){var C=x.nextSibling,R=x.nodeName;x[Za]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&x.rel.toLowerCase()==="stylesheet"||i.removeChild(x),x=C}}else i==="body"&&Uo(t.ownerDocument.body);i=m}while(i);mi(r)}function Bb(t,r){var i=t;t=0;do{var c=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),c&&c.nodeType===8)if(i=c.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=c}while(i)}function _p(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":_p(i),ao(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function iA(t,r,i,c){for(;t.nodeType===1;){var m=i;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Za])switch(r){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(r==="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=In(t.nextSibling),t===null)break}return null}function oA(t,r,i){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=In(t.nextSibling),t===null))return null;return t}function Pb(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=In(t.nextSibling),t===null))return null;return t}function Rp(t){return t.data==="$?"||t.data==="$~"}function Mp(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function sA(t,r){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||i.readyState!=="loading")r();else{var c=function(){r(),i.removeEventListener("DOMContentLoaded",c)};i.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function In(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var Op=null;function Fb(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(r===0)return In(t.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}t=t.nextSibling}return null}function Ub(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return t;r--}else i!=="/$"&&i!=="/&"||r++}t=t.previousSibling}return null}function Hb(t,r,i){switch(r=Kc(i),t){case"html":if(t=r.documentElement,!t)throw Error(l(452));return t;case"head":if(t=r.head,!t)throw Error(l(453));return t;case"body":if(t=r.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Uo(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ao(t)}var Bn=new Map,$b=new Set;function Qc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Gr=K.d;K.d={f:cA,r:uA,D:dA,C:fA,L:pA,m:hA,X:gA,S:mA,M:yA};function cA(){var t=Gr.f(),r=Uc();return t||r}function uA(t){var r=ia(t);r!==null&&r.tag===5&&r.type==="form"?ix(r):Gr.r(t)}var fi=typeof document>"u"?null:document;function Vb(t,r,i){var c=fi;if(c&&typeof r=="string"&&r){var m=et(r);m='link[rel="'+t+'"][href="'+m+'"]',typeof i=="string"&&(m+='[crossorigin="'+i+'"]'),$b.has(m)||($b.add(m),t={rel:t,crossOrigin:i,href:r},c.querySelector(m)===null&&(r=c.createElement("link"),qt(r,"link",t),Et(r),c.head.appendChild(r)))}}function dA(t){Gr.D(t),Vb("dns-prefetch",t,null)}function fA(t,r){Gr.C(t,r),Vb("preconnect",t,r)}function pA(t,r,i){Gr.L(t,r,i);var c=fi;if(c&&t&&r){var m='link[rel="preload"][as="'+et(r)+'"]';r==="image"&&i&&i.imageSrcSet?(m+='[imagesrcset="'+et(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(m+='[imagesizes="'+et(i.imageSizes)+'"]')):m+='[href="'+et(t)+'"]';var x=m;switch(r){case"style":x=pi(t);break;case"script":x=hi(t)}Bn.has(x)||(t=g({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:t,as:r},i),Bn.set(x,t),c.querySelector(m)!==null||r==="style"&&c.querySelector(Ho(x))||r==="script"&&c.querySelector($o(x))||(r=c.createElement("link"),qt(r,"link",t),Et(r),c.head.appendChild(r)))}}function hA(t,r){Gr.m(t,r);var i=fi;if(i&&t){var c=r&&typeof r.as=="string"?r.as:"script",m='link[rel="modulepreload"][as="'+et(c)+'"][href="'+et(t)+'"]',x=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=hi(t)}if(!Bn.has(x)&&(t=g({rel:"modulepreload",href:t},r),Bn.set(x,t),i.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($o(x)))return}c=i.createElement("link"),qt(c,"link",t),Et(c),i.head.appendChild(c)}}}function mA(t,r,i){Gr.S(t,r,i);var c=fi;if(c&&t){var m=oa(c).hoistableStyles,x=pi(t);r=r||"default";var C=m.get(x);if(!C){var R={loading:0,preload:null};if(C=c.querySelector(Ho(x)))R.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":r},i),(i=Bn.get(x))&&Dp(t,i);var P=C=c.createElement("link");Et(P),qt(P,"link",t),P._p=new Promise(function(Q,oe){P.onload=Q,P.onerror=oe}),P.addEventListener("load",function(){R.loading|=1}),P.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Zc(C,r,c)}C={type:"stylesheet",instance:C,count:1,state:R},m.set(x,C)}}}function gA(t,r){Gr.X(t,r);var i=fi;if(i&&t){var c=oa(i).hoistableScripts,m=hi(t),x=c.get(m);x||(x=i.querySelector($o(m)),x||(t=g({src:t,async:!0},r),(r=Bn.get(m))&&zp(t,r),x=i.createElement("script"),Et(x),qt(x,"link",t),i.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(m,x))}}function yA(t,r){Gr.M(t,r);var i=fi;if(i&&t){var c=oa(i).hoistableScripts,m=hi(t),x=c.get(m);x||(x=i.querySelector($o(m)),x||(t=g({src:t,async:!0,type:"module"},r),(r=Bn.get(m))&&zp(t,r),x=i.createElement("script"),Et(x),qt(x,"link",t),i.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(m,x))}}function qb(t,r,i,c){var m=(m=ie.current)?Qc(m):null;if(!m)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=pi(i.href),i=oa(m).hoistableStyles,c=i.get(r),c||(c={type:"style",instance:null,count:0,state:null},i.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=pi(i.href);var x=oa(m).hoistableStyles,C=x.get(t);if(C||(m=m.ownerDocument||m,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(t,C),(x=m.querySelector(Ho(t)))&&!x._p&&(C.instance=x,C.state.loading=5),Bn.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Bn.set(t,i),x||xA(m,t,i,C.state))),r&&c===null)throw Error(l(528,""));return C}if(r&&c!==null)throw Error(l(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=hi(i),i=oa(m).hoistableScripts,c=i.get(r),c||(c={type:"script",instance:null,count:0,state:null},i.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function pi(t){return'href="'+et(t)+'"'}function Ho(t){return'link[rel="stylesheet"]['+t+"]"}function Gb(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function xA(t,r,i,c){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=t.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),qt(r,"link",i),Et(r),t.head.appendChild(r))}function hi(t){return'[src="'+et(t)+'"]'}function $o(t){return"script[async]"+t}function Yb(t,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var c=t.querySelector('style[data-href~="'+et(i.href)+'"]');if(c)return r.instance=c,Et(c),c;var m=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),Et(c),qt(c,"style",m),Zc(c,i.precedence,t),r.instance=c;case"stylesheet":m=pi(i.href);var x=t.querySelector(Ho(m));if(x)return r.state.loading|=4,r.instance=x,Et(x),x;c=Gb(i),(m=Bn.get(m))&&Dp(c,m),x=(t.ownerDocument||t).createElement("link"),Et(x);var C=x;return C._p=new Promise(function(R,P){C.onload=R,C.onerror=P}),qt(x,"link",c),r.state.loading|=4,Zc(x,i.precedence,t),r.instance=x;case"script":return x=hi(i.src),(m=t.querySelector($o(x)))?(r.instance=m,Et(m),m):(c=i,(m=Bn.get(x))&&(c=g({},i),zp(c,m)),t=t.ownerDocument||t,m=t.createElement("script"),Et(m),qt(m,"link",c),t.head.appendChild(m),r.instance=m);case"void":return null;default:throw Error(l(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,Zc(c,i.precedence,t));return r.instance}function Zc(t,r,i){for(var c=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,x=m,C=0;C<c.length;C++){var R=c[C];if(R.dataset.precedence===r)x=R;else if(x!==m)break}x?x.parentNode.insertBefore(t,x.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(t,r.firstChild))}function Dp(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function zp(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var Wc=null;function Xb(t,r,i){if(Wc===null){var c=new Map,m=Wc=new Map;m.set(i,c)}else m=Wc,c=m.get(i),c||(c=new Map,m.set(i,c));if(c.has(t))return c;for(c.set(t,null),i=i.getElementsByTagName(t),m=0;m<i.length;m++){var x=i[m];if(!(x[Za]||x[Ot]||t==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(r)||"";C=t+C;var R=c.get(C);R?R.push(x):c.set(C,[x])}}return c}function Kb(t,r,i){t=t.ownerDocument||t,t.head.insertBefore(i,r==="title"?t.querySelector("head > title"):null)}function bA(t,r,i){if(i===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Qb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function vA(t,r,i,c){if(i.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var m=pi(c.href),x=r.querySelector(Ho(m));if(x){r=x._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Jc.bind(t),r.then(t,t)),i.state.loading|=4,i.instance=x,Et(x);return}x=r.ownerDocument||r,c=Gb(c),(m=Bn.get(m))&&Dp(c,m),x=x.createElement("link"),Et(x);var C=x;C._p=new Promise(function(R,P){C.onload=R,C.onerror=P}),qt(x,"link",c),i.instance=x}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=Jc.bind(t),r.addEventListener("load",i),r.addEventListener("error",i))}}var Lp=0;function wA(t,r){return t.stylesheets&&t.count===0&&tu(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var c=setTimeout(function(){if(t.stylesheets&&tu(t,t.stylesheets),t.unsuspend){var x=t.unsuspend;t.unsuspend=null,x()}},6e4+r);0<t.imgBytes&&Lp===0&&(Lp=62500*tA());var m=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&tu(t,t.stylesheets),t.unsuspend)){var x=t.unsuspend;t.unsuspend=null,x()}},(t.imgBytes>Lp?50:800)+r);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Jc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var eu=null;function tu(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,eu=new Map,r.forEach(SA,t),eu=null,Jc.call(t))}function SA(t,r){if(!(r.state.loading&4)){var i=eu.get(t);if(i)var c=i.get(null);else{i=new Map,eu.set(t,i);for(var m=t.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<m.length;x++){var C=m[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(i.set(C.dataset.precedence,C),c=C)}c&&i.set(null,c)}m=r.instance,C=m.getAttribute("data-precedence"),x=i.get(C)||c,x===c&&i.set(null,m),i.set(C,m),this.count++,c=Jc.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),x?x.parentNode.insertBefore(m,x.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(m,t.firstChild)),r.state.loading|=4}}var Vo={$$typeof:j,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function kA(t,r,i,c,m,x,C,R,P){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=Ol(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ol(0),this.hiddenUpdates=Ol(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function Zb(t,r,i,c,m,x,C,R,P,Q,oe,de){return t=new kA(t,r,i,C,P,Q,oe,de,R),r=1,x===!0&&(r|=24),x=gn(3,null,null,r),t.current=x,x.stateNode=t,r=mf(),r.refCount++,t.pooledCache=r,r.refCount++,x.memoizedState={element:c,isDehydrated:i,cache:r},bf(x),t}function Wb(t){return t?(t=ql,t):ql}function Jb(t,r,i,c,m,x){m=Wb(m),c.context===null?c.context=m:c.pendingContext=m,c=ha(r),c.payload={element:i},x=x===void 0?null:x,x!==null&&(c.callback=x),i=ma(t,c,r),i!==null&&(dn(i,t,r),So(i,t,r))}function ev(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function Ip(t,r){ev(t,r),(t=t.alternate)&&ev(t,r)}function tv(t){if(t.tag===13||t.tag===31){var r=rl(t,67108864);r!==null&&dn(r,t,67108864),Ip(t,67108864)}}function nv(t){if(t.tag===13||t.tag===31){var r=wn();r=Dl(r);var i=rl(t,r);i!==null&&dn(i,t,r),Ip(t,r)}}var nu=!0;function CA(t,r,i,c){var m=z.T;z.T=null;var x=K.p;try{K.p=2,Bp(t,r,i,c)}finally{K.p=x,z.T=m}}function EA(t,r,i,c){var m=z.T;z.T=null;var x=K.p;try{K.p=8,Bp(t,r,i,c)}finally{K.p=x,z.T=m}}function Bp(t,r,i,c){if(nu){var m=Pp(c);if(m===null)Cp(t,r,c,ru,i),av(t,c);else if(NA(m,t,r,i,c))c.stopPropagation();else if(av(t,c),r&4&&-1<AA.indexOf(t)){for(;m!==null;){var x=ia(m);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=Jt(x.pendingLanes);if(C!==0){var R=x;for(R.pendingLanes|=2,R.entangledLanes|=2;C;){var P=1<<31-st(C);R.entanglements[1]|=P,C&=~P}dr(x),(rt&6)===0&&(Pc=Rt()+500,Bo(0))}}break;case 31:case 13:R=rl(x,2),R!==null&&dn(R,x,2),Uc(),Ip(x,2)}if(x=Pp(c),x===null&&Cp(t,r,c,ru,i),x===m)break;m=x}m!==null&&c.stopPropagation()}else Cp(t,r,c,null,i)}}function Pp(t){return t=Fd(t),Fp(t)}var ru=null;function Fp(t){if(ru=null,t=Nr(t),t!==null){var r=s(t);if(r===null)t=null;else{var i=r.tag;if(i===13){if(t=u(r),t!==null)return t;t=null}else if(i===31){if(t=f(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return ru=t,null}function rv(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"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(kr()){case se:return 2;case xe:return 8;case Oe:case He:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var Up=!1,Aa=null,Na=null,ja=null,qo=new Map,Go=new Map,Ta=[],AA="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 av(t,r){switch(t){case"focusin":case"focusout":Aa=null;break;case"dragenter":case"dragleave":Na=null;break;case"mouseover":case"mouseout":ja=null;break;case"pointerover":case"pointerout":qo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(r.pointerId)}}function Yo(t,r,i,c,m,x){return t===null||t.nativeEvent!==x?(t={blockedOn:r,domEventName:i,eventSystemFlags:c,nativeEvent:x,targetContainers:[m]},r!==null&&(r=ia(r),r!==null&&tv(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,m!==null&&r.indexOf(m)===-1&&r.push(m),t)}function NA(t,r,i,c,m){switch(r){case"focusin":return Aa=Yo(Aa,t,r,i,c,m),!0;case"dragenter":return Na=Yo(Na,t,r,i,c,m),!0;case"mouseover":return ja=Yo(ja,t,r,i,c,m),!0;case"pointerover":var x=m.pointerId;return qo.set(x,Yo(qo.get(x)||null,t,r,i,c,m)),!0;case"gotpointercapture":return x=m.pointerId,Go.set(x,Yo(Go.get(x)||null,t,r,i,c,m)),!0}return!1}function lv(t){var r=Nr(t.target);if(r!==null){var i=s(r);if(i!==null){if(r=i.tag,r===13){if(r=u(i),r!==null){t.blockedOn=r,Qa(t.priority,function(){nv(i)});return}}else if(r===31){if(r=f(i),r!==null){t.blockedOn=r,Qa(t.priority,function(){nv(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function au(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=Pp(t.nativeEvent);if(i===null){i=t.nativeEvent;var c=new i.constructor(i.type,i);Pd=c,i.target.dispatchEvent(c),Pd=null}else return r=ia(i),r!==null&&tv(r),t.blockedOn=i,!1;r.shift()}return!0}function iv(t,r,i){au(t)&&i.delete(r)}function jA(){Up=!1,Aa!==null&&au(Aa)&&(Aa=null),Na!==null&&au(Na)&&(Na=null),ja!==null&&au(ja)&&(ja=null),qo.forEach(iv),Go.forEach(iv)}function lu(t,r){t.blockedOn===r&&(t.blockedOn=null,Up||(Up=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,jA)))}var iu=null;function ov(t){iu!==t&&(iu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){iu===t&&(iu=null);for(var r=0;r<t.length;r+=3){var i=t[r],c=t[r+1],m=t[r+2];if(typeof c!="function"){if(Fp(c||i)===null)continue;break}var x=ia(i);x!==null&&(t.splice(r,3),r-=3,Pf(x,{pending:!0,data:m,method:i.method,action:c},c,m))}}))}function mi(t){function r(P){return lu(P,t)}Aa!==null&&lu(Aa,t),Na!==null&&lu(Na,t),ja!==null&&lu(ja,t),qo.forEach(r),Go.forEach(r);for(var i=0;i<Ta.length;i++){var c=Ta[i];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Ta.length&&(i=Ta[0],i.blockedOn===null);)lv(i),i.blockedOn===null&&Ta.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(c=0;c<i.length;c+=3){var m=i[c],x=i[c+1],C=m[Yt]||null;if(typeof x=="function")C||ov(i);else if(C){var R=null;if(x&&x.hasAttribute("formAction")){if(m=x,C=x[Yt]||null)R=C.formAction;else if(Fp(m)!==null)continue}else R=C.action;typeof R=="function"?i[c+1]=R:(i.splice(c,3),c-=3),ov(i)}}}function sv(){function t(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(C){return m=C})},focusReset:"manual",scroll:"manual"})}function r(){m!==null&&(m(),m=null),c||setTimeout(i,20)}function i(){if(!c&&!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 c=!1,m=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),m!==null&&(m(),m=null)}}}function Hp(t){this._internalRoot=t}ou.prototype.render=Hp.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(l(409));var i=r.current,c=wn();Jb(i,c,t,r,null,null)},ou.prototype.unmount=Hp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Jb(t.current,2,null,t,null,null),Uc(),r[la]=null}};function ou(t){this._internalRoot=t}ou.prototype.unstable_scheduleHydration=function(t){if(t){var r=Ys();t={blockedOn:null,target:t,priority:r};for(var i=0;i<Ta.length&&r!==0&&r<Ta[i].priority;i++);Ta.splice(i,0,t),i===0&&lv(t)}};var cv=n.version;if(cv!=="19.2.4")throw Error(l(527,cv,"19.2.4"));K.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=h(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var TA={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!su.isDisabled&&su.supportsFiber)try{Ut=su.inject(TA),yt=su}catch{}}return Ko.createRoot=function(t,r){if(!o(t))throw Error(l(299));var i=!1,c="",m=gx,x=yx,C=xx;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(C=r.onRecoverableError)),r=Zb(t,1,!1,null,null,i,c,null,m,x,C,sv),t[la]=r.current,kp(t),new Hp(r)},Ko.hydrateRoot=function(t,r,i){if(!o(t))throw Error(l(299));var c=!1,m="",x=gx,C=yx,R=xx,P=null;return i!=null&&(i.unstable_strictMode===!0&&(c=!0),i.identifierPrefix!==void 0&&(m=i.identifierPrefix),i.onUncaughtError!==void 0&&(x=i.onUncaughtError),i.onCaughtError!==void 0&&(C=i.onCaughtError),i.onRecoverableError!==void 0&&(R=i.onRecoverableError),i.formState!==void 0&&(P=i.formState)),r=Zb(t,1,!0,r,i!=null?i:null,c,m,P,x,C,R,sv),r.context=Wb(null),i=r.current,c=wn(),c=Dl(c),m=ha(c),m.callback=null,ma(i,m,c),i=c,r.current.lanes=i,Ka(r,i),dr(r),t[la]=r.current,kp(t),new ou(r)},Ko.version="19.2.4",Ko}var bv;function PA(){if(bv)return qp.exports;bv=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(),qp.exports=BA(),qp.exports}var FA=PA();const UA={theme:"system",setTheme:()=>null,resolvedTheme:"dark"},x1=v.createContext(UA);function HA({children:e,defaultTheme:n="system",storageKey:a="jean2-theme",...l}){const[o,s]=v.useState(()=>localStorage.getItem(a)||n),[u,f]=v.useState("dark");v.useEffect(()=>{const h=window.document.documentElement;if(h.classList.remove("light","dark"),o==="system"){const y=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";h.classList.add(y),f(y);return}h.classList.add(o),f(o)},[o]);const p={theme:o,setTheme:h=>{localStorage.setItem(a,h),s(h)},resolvedTheme:u};return d.jsx(x1.Provider,{...l,value:p,children:e})}const $A=()=>{const e=v.useContext(x1);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};async function VA(e,n={},a){return window.__TAURI_INTERNALS__.invoke(e,n,a)}/**
|
|
50
|
+
* @license lucide-react v0.577.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 b1=(...e)=>e.filter((n,a,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===a).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.577.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
|
+
*/const qA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
60
|
+
* @license lucide-react v0.577.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 GA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,l)=>l?l.toUpperCase():a.toLowerCase());/**
|
|
65
|
+
* @license lucide-react v0.577.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 vv=e=>{const n=GA(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
|
70
|
+
* @license lucide-react v0.577.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
|
+
*/var YA={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
75
|
+
* @license lucide-react v0.577.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 XA=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
|
|
80
|
+
* @license lucide-react v0.577.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
|
+
*/const KA=v.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:s,iconNode:u,...f},p)=>v.createElement("svg",{ref:p,...YA,width:n,height:n,stroke:e,strokeWidth:l?Number(a)*24/Number(n):a,className:b1("lucide",o),...!s&&!XA(f)&&{"aria-hidden":"true"},...f},[...u.map(([h,y])=>v.createElement(h,y)),...Array.isArray(s)?s:[s]]));/**
|
|
85
|
+
* @license lucide-react v0.577.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
|
+
*/const Ne=(e,n)=>{const a=v.forwardRef(({className:l,...o},s)=>v.createElement(KA,{ref:s,iconNode:n,className:b1(`lucide-${qA(vv(e))}`,`lucide-${e}`,l),...o}));return a.displayName=vv(e),a};/**
|
|
90
|
+
* @license lucide-react v0.577.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 QA=[["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"}]],ZA=Ne("archive",QA);/**
|
|
95
|
+
* @license lucide-react v0.577.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
|
+
*/const WA=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],JA=Ne("arrow-left",WA);/**
|
|
100
|
+
* @license lucide-react v0.577.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 eN=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],tN=Ne("bot",eN);/**
|
|
105
|
+
* @license lucide-react v0.577.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 nN=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Dh=Ne("box",nN);/**
|
|
110
|
+
* @license lucide-react v0.577.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 rN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qr=Ne("check",rN);/**
|
|
115
|
+
* @license lucide-react v0.577.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 aN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$i=Ne("chevron-down",aN);/**
|
|
120
|
+
* @license lucide-react v0.577.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 lN=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],iN=Ne("chevron-left",lN);/**
|
|
125
|
+
* @license lucide-react v0.577.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 oN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Zr=Ne("chevron-right",oN);/**
|
|
130
|
+
* @license lucide-react v0.577.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 sN=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],cN=Ne("chevron-up",sN);/**
|
|
135
|
+
* @license lucide-react v0.577.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 uN=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],v1=Ne("chevrons-up-down",uN);/**
|
|
140
|
+
* @license lucide-react v0.577.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 dN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ls=Ne("circle-alert",dN);/**
|
|
145
|
+
* @license lucide-react v0.577.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 fN=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ws=Ne("circle-check-big",fN);/**
|
|
150
|
+
* @license lucide-react v0.577.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 pN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Qu=Ne("circle-x",pN);/**
|
|
155
|
+
* @license lucide-react v0.577.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 hN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mN=Ne("circle",hN);/**
|
|
160
|
+
* @license lucide-react v0.577.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 gN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],w1=Ne("clock",gN);/**
|
|
165
|
+
* @license lucide-react v0.577.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 yN=[["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"}]],Tu=Ne("copy",yN);/**
|
|
170
|
+
* @license lucide-react v0.577.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 xN=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],bN=Ne("cpu",xN);/**
|
|
175
|
+
* @license lucide-react v0.577.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 vN=[["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"}]],wN=Ne("ellipsis",vN);/**
|
|
180
|
+
* @license lucide-react v0.577.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 SN=[["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"}]],zh=Ne("external-link",SN);/**
|
|
185
|
+
* @license lucide-react v0.577.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 kN=[["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"}]],CN=Ne("eye-off",kN);/**
|
|
190
|
+
* @license lucide-react v0.577.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 EN=[["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"}]],AN=Ne("eye",EN);/**
|
|
195
|
+
* @license lucide-react v0.577.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 NN=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],jN=Ne("file-pen",NN);/**
|
|
200
|
+
* @license lucide-react v0.577.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 TN=[["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"}]],hm=Ne("file-text",TN);/**
|
|
205
|
+
* @license lucide-react v0.577.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 _N=[["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"}]],fr=Ne("file",_N);/**
|
|
210
|
+
* @license lucide-react v0.577.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 RN=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Lh=Ne("folder-open",RN);/**
|
|
215
|
+
* @license lucide-react v0.577.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 MN=[["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"}]],za=Ne("folder",MN);/**
|
|
220
|
+
* @license lucide-react v0.577.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 ON=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],DN=Ne("git-branch",ON);/**
|
|
225
|
+
* @license lucide-react v0.577.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 zN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],wv=Ne("info",zN);/**
|
|
230
|
+
* @license lucide-react v0.577.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 LN=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],IN=Ne("layout-grid",LN);/**
|
|
235
|
+
* @license lucide-react v0.577.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 BN=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],PN=Ne("layout-list",BN);/**
|
|
240
|
+
* @license lucide-react v0.577.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 FN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Un=Ne("loader-circle",FN);/**
|
|
245
|
+
* @license lucide-react v0.577.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 UN=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],HN=Ne("lock",UN);/**
|
|
250
|
+
* @license lucide-react v0.577.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 $N=[["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"}]],VN=Ne("message-square",$N);/**
|
|
255
|
+
* @license lucide-react v0.577.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 qN=[["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"}]],GN=Ne("minimize-2",qN);/**
|
|
260
|
+
* @license lucide-react v0.577.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 YN=[["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"}]],XN=Ne("monitor",YN);/**
|
|
265
|
+
* @license lucide-react v0.577.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 KN=[["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"}]],QN=Ne("moon",KN);/**
|
|
270
|
+
* @license lucide-react v0.577.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 ZN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],WN=Ne("panel-left",ZN);/**
|
|
275
|
+
* @license lucide-react v0.577.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 JN=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],ej=Ne("plug-zap",JN);/**
|
|
280
|
+
* @license lucide-react v0.577.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 tj=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],nj=Ne("plug",tj);/**
|
|
285
|
+
* @license lucide-react v0.577.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 rj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ss=Ne("plus",rj);/**
|
|
290
|
+
* @license lucide-react v0.577.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 aj=[["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"}]],Ei=Ne("refresh-cw",aj);/**
|
|
295
|
+
* @license lucide-react v0.577.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 lj=[["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"}]],ij=Ne("rotate-ccw",lj);/**
|
|
300
|
+
* @license lucide-react v0.577.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 oj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],mm=Ne("search",oj);/**
|
|
305
|
+
* @license lucide-react v0.577.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 sj=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],cj=Ne("send",sj);/**
|
|
310
|
+
* @license lucide-react v0.577.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 uj=[["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"}]],vl=Ne("server",uj);/**
|
|
315
|
+
* @license lucide-react v0.577.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 dj=[["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"}]],S1=Ne("settings",dj);/**
|
|
320
|
+
* @license lucide-react v0.577.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 fj=[["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"}]],k1=Ne("shield",fj);/**
|
|
325
|
+
* @license lucide-react v0.577.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 pj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],C1=Ne("square",pj);/**
|
|
330
|
+
* @license lucide-react v0.577.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 hj=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Sv=Ne("star",hj);/**
|
|
335
|
+
* @license lucide-react v0.577.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 mj=[["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"}]],gj=Ne("sun",mj);/**
|
|
340
|
+
* @license lucide-react v0.577.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 yj=[["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"}]],ks=Ne("trash-2",yj);/**
|
|
345
|
+
* @license lucide-react v0.577.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 xj=[["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"}]],kv=Ne("triangle-alert",xj);/**
|
|
350
|
+
* @license lucide-react v0.577.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 bj=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],vj=Ne("undo-2",bj);/**
|
|
355
|
+
* @license lucide-react v0.577.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 wj=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Sj=Ne("user",wj);/**
|
|
360
|
+
* @license lucide-react v0.577.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 kj=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],E1=Ne("wifi-off",kj);/**
|
|
365
|
+
* @license lucide-react v0.577.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 Cj=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Ej=Ne("wifi",Cj);/**
|
|
370
|
+
* @license lucide-react v0.577.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 Aj=[["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"}]],Nj=Ne("wrench",Aj);/**
|
|
375
|
+
* @license lucide-react v0.577.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 jj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ri=Ne("x",jj);/**
|
|
380
|
+
* @license lucide-react v0.577.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 Tj=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Kp=Ne("zap",Tj),Hn={SERVERS:"jean2_servers",ACTIVE_SERVER_ID:"jean2_active_server_id",QUICK_CONNECTIONS:"jean2_quick_connections"};function Xr(){try{const e=localStorage.getItem(Hn.SERVERS);return e?JSON.parse(e):[]}catch(e){return console.error("Error reading saved servers from localStorage:",e),[]}}function _j(e){return Xr().find(a=>a.id===e)||null}function Rj(e){try{const n=Xr();n.push(e),localStorage.setItem(Hn.SERVERS,JSON.stringify(n))}catch(n){console.error("Error saving server to localStorage:",n)}}function Mj(e,n){try{const a=Xr(),l=a.findIndex(o=>o.id===e);if(l===-1){console.error("Server not found:",e);return}a[l]={...a[l],...n},localStorage.setItem(Hn.SERVERS,JSON.stringify(a))}catch(a){console.error("Error updating server in localStorage:",a)}}function Oj(e){try{const a=Xr().filter(u=>u.id!==e);localStorage.setItem(Hn.SERVERS,JSON.stringify(a));const o=Kr().filter(u=>u.serverId!==e);localStorage.setItem(Hn.QUICK_CONNECTIONS,JSON.stringify(o)),A1()===e&&localStorage.removeItem(Hn.ACTIVE_SERVER_ID)}catch(n){console.error("Error deleting server from localStorage:",n)}}function A1(){try{return localStorage.getItem(Hn.ACTIVE_SERVER_ID)}catch(e){return console.error("Error reading active server ID from localStorage:",e),null}}function Qp(e){try{localStorage.setItem(Hn.ACTIVE_SERVER_ID,e)}catch(n){console.error("Error setting active server ID in localStorage:",n)}}function Cv(){const e=A1();return e?_j(e):null}function Kr(){try{const e=localStorage.getItem(Hn.QUICK_CONNECTIONS);return e?JSON.parse(e):[]}catch(e){return console.error("Error reading quick connections from localStorage:",e),[]}}function Dj(e){const n=Kr(),a=n.reduce((o,s)=>Math.max(o,s.order),-1),l={...e,id:crypto.randomUUID(),order:a+1};n.push(l);try{localStorage.setItem(Hn.QUICK_CONNECTIONS,JSON.stringify(n))}catch(o){console.error("Error saving quick connection to localStorage:",o)}return l}function zj(e){try{const a=Kr().filter(l=>l.id!==e);localStorage.setItem(Hn.QUICK_CONNECTIONS,JSON.stringify(a))}catch(n){console.error("Error removing quick connection from localStorage:",n)}}function Lj(e){try{const n=Kr(),a=new Map(n.map(l=>[l.id,l]));e.forEach((l,o)=>{const s=a.get(l);s&&(s.order=o)}),localStorage.setItem(Hn.QUICK_CONNECTIONS,JSON.stringify(n))}catch(n){console.error("Error reordering quick connections in localStorage:",n)}}function N1(e){return/^[a-f0-9]{64}$/.test(e)}function Ij(e){return e.length<12?e:`${e.slice(0,4)}...${e.slice(-4)}`}function _u(e){let n=e.trim();return n=n.replace(/^(https?:\/\/|wss?:\/\/)/i,""),n=n.replace(/\/+$/,""),n}const j1=v.createContext(null),Bj=({children:e})=>{const[n,a]=v.useState([]),[l,o]=v.useState(null),[s,u]=v.useState([]),[f,p]=v.useState(!1),h=v.useRef(null);v.useEffect(()=>{const j=Xr(),O=Cv(),I=Kr();a(j),o(O),u(I)},[]);const y=(j,O,I)=>{const M=_u(O),U={id:crypto.randomUUID(),name:j,url:M,token:I,createdAt:new Date().toISOString()};return Rj(U),a(Xr()),n.length===0&&(Qp(U.id),o(U)),U},g=(j,O)=>{const I={...O,...O.url&&{url:_u(O.url)}};Mj(j,I),a(Xr()),(l==null?void 0:l.id)===j&&o(Cv())},w=j=>{const O=(l==null?void 0:l.id)===j;if(Oj(j),a(Xr()),O){const I=Xr(),M=I.length>0?I[0]:null;M?(Qp(M.id),o(M)):o(null)}u(Kr())},b=v.useCallback(j=>(h.current&&(clearTimeout(h.current),h.current=null),f&&(l==null?void 0:l.id)===j?!1:(f&&p(!1),p(!0),h.current=setTimeout(()=>{Qp(j);const O=n.find(I=>I.id===j)||null;o(O),p(!1)},100),!0)),[f,l,n]),k=v.useCallback(()=>{p(!1)},[]),N={servers:n,activeServer:l,quickConnections:s,isSwitching:f,addServer:y,editServer:g,removeServer:w,switchServer:b,clearSwitchingState:k,addToQuickConnections:(j,O,I,M)=>{Dj({serverId:j,serverName:O,workspaceId:I,workspaceName:M}),u(Kr())},removeFromQuickConnections:j=>{zj(j),u(Kr())},reorderQuick:j=>{Lj(j),u(Kr())}};return d.jsx(j1.Provider,{value:N,children:e})},Vi=()=>{const e=v.useContext(j1);if(e===null)throw new Error("useServerContext must be used within a ServerProvider");return e};function T1(e){var n,a,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(a=T1(e[n]))&&(l&&(l+=" "),l+=a)}else for(a in e)e[a]&&(l&&(l+=" "),l+=a);return l}function Zu(){for(var e,n,a=0,l="",o=arguments.length;a<o;a++)(e=arguments[a])&&(n=T1(e))&&(l&&(l+=" "),l+=n);return l}const Ev=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Av=Zu,qi=(e,n)=>a=>{var l;if((n==null?void 0:n.variants)==null)return Av(e,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:o,defaultVariants:s}=n,u=Object.keys(o).map(h=>{const y=a==null?void 0:a[h],g=s==null?void 0:s[h];if(y===null)return null;const w=Ev(y)||Ev(g);return o[h][w]}),f=a&&Object.entries(a).reduce((h,y)=>{let[g,w]=y;return w===void 0||(h[g]=w),h},{}),p=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((h,y)=>{let{class:g,className:w,...b}=y;return Object.entries(b).every(k=>{let[S,E]=k;return Array.isArray(E)?E.includes({...s,...f}[S]):{...s,...f}[S]===E})?[...h,g,w]:h},[]);return Av(e,u,p,a==null?void 0:a.class,a==null?void 0:a.className)};var Cs=y1();const Pj=Ku(Cs);function Nv(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Wr(...e){return n=>{let a=!1;const l=e.map(o=>{const s=Nv(o,n);return!a&&typeof s=="function"&&(a=!0),s});if(a)return()=>{for(let o=0;o<l.length;o++){const s=l[o];typeof s=="function"?s():Nv(e[o],null)}}}}function Ve(...e){return v.useCallback(Wr(...e),e)}function Ia(e){const n=Fj(e),a=v.forwardRef((l,o)=>{const{children:s,...u}=l,f=v.Children.toArray(s),p=f.find(Hj);if(p){const h=p.props.children,y=f.map(g=>g===p?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:g);return d.jsx(n,{...u,ref:o,children:v.isValidElement(h)?v.cloneElement(h,void 0,y):null})}return d.jsx(n,{...u,ref:o,children:s})});return a.displayName=`${e}.Slot`,a}var Es=Ia("Slot");function Fj(e){const n=v.forwardRef((a,l)=>{const{children:o,...s}=a;if(v.isValidElement(o)){const u=Vj(o),f=$j(s,o.props);return o.type!==v.Fragment&&(f.ref=l?Wr(l,u):u),v.cloneElement(o,f)}return v.Children.count(o)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var _1=Symbol("radix.slottable");function Uj(e){const n=({children:a})=>d.jsx(d.Fragment,{children:a});return n.displayName=`${e}.Slottable`,n.__radixId=_1,n}function Hj(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_1}function $j(e,n){const a={...n};for(const l in n){const o=e[l],s=n[l];/^on[A-Z]/.test(l)?o&&s?a[l]=(...f)=>{const p=s(...f);return o(...f),p}:o&&(a[l]=o):l==="style"?a[l]={...o,...s}:l==="className"&&(a[l]=[o,s].filter(Boolean).join(" "))}return{...e,...a}}function Vj(e){var l,o;let n=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.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)}var qj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=qj.reduce((e,n)=>{const a=Ia(`Primitive.${n}`),l=v.forwardRef((o,s)=>{const{asChild:u,...f}=o,p=u?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(p,{...f,ref:s})});return l.displayName=`Primitive.${n}`,{...e,[n]:l}},{});function R1(e,n){e&&Cs.flushSync(()=>e.dispatchEvent(n))}var M1=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"}),Gj="VisuallyHidden",O1=v.forwardRef((e,n)=>d.jsx(Ae.span,{...e,ref:n,style:{...M1,...e.style}}));O1.displayName=Gj;var Yj=O1;function Xj(e,n){const a=v.createContext(n),l=s=>{const{children:u,...f}=s,p=v.useMemo(()=>f,Object.values(f));return d.jsx(a.Provider,{value:p,children:u})};l.displayName=e+"Provider";function o(s){const u=v.useContext(a);if(u)return u;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[l,o]}function Nn(e,n=[]){let a=[];function l(s,u){const f=v.createContext(u),p=a.length;a=[...a,u];const h=g=>{var A;const{scope:w,children:b,...k}=g,S=((A=w==null?void 0:w[e])==null?void 0:A[p])||f,E=v.useMemo(()=>k,Object.values(k));return d.jsx(S.Provider,{value:E,children:b})};h.displayName=s+"Provider";function y(g,w){var S;const b=((S=w==null?void 0:w[e])==null?void 0:S[p])||f,k=v.useContext(b);if(k)return k;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${s}\``)}return[h,y]}const o=()=>{const s=a.map(u=>v.createContext(u));return function(f){const p=(f==null?void 0:f[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...f,[e]:p}}),[f,p])}};return o.scopeName=e,[l,Kj(o,...n)]}function Kj(...e){const n=e[0];if(e.length===1)return n;const a=()=>{const l=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const u=l.reduce((f,{useScope:p,scopeName:h})=>{const g=p(s)[`__scope${h}`];return{...f,...g}},{});return v.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return a.scopeName=n.scopeName,a}function gm(e){const n=e+"CollectionProvider",[a,l]=Nn(n),[o,s]=a(n,{collectionRef:{current:null},itemMap:new Map}),u=S=>{const{scope:E,children:A}=S,N=Pn.useRef(null),j=Pn.useRef(new Map).current;return d.jsx(o,{scope:E,itemMap:j,collectionRef:N,children:A})};u.displayName=n;const f=e+"CollectionSlot",p=Ia(f),h=Pn.forwardRef((S,E)=>{const{scope:A,children:N}=S,j=s(f,A),O=Ve(E,j.collectionRef);return d.jsx(p,{ref:O,children:N})});h.displayName=f;const y=e+"CollectionItemSlot",g="data-radix-collection-item",w=Ia(y),b=Pn.forwardRef((S,E)=>{const{scope:A,children:N,...j}=S,O=Pn.useRef(null),I=Ve(E,O),M=s(y,A);return Pn.useEffect(()=>(M.itemMap.set(O,{ref:O,...j}),()=>void M.itemMap.delete(O))),d.jsx(w,{[g]:"",ref:I,children:N})});b.displayName=y;function k(S){const E=s(e+"CollectionConsumer",S);return Pn.useCallback(()=>{const N=E.collectionRef.current;if(!N)return[];const j=Array.from(N.querySelectorAll(`[${g}]`));return Array.from(E.itemMap.values()).sort((M,U)=>j.indexOf(M.ref.current)-j.indexOf(U.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:u,Slot:h,ItemSlot:b},k,l]}function ve(e,n,{checkForDefaultPrevented:a=!0}={}){return function(o){if(e==null||e(o),a===!1||!o.defaultPrevented)return n==null?void 0:n(o)}}var Bt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Qj=g1[" useInsertionEffect ".trim().toString()]||Bt;function Jr({prop:e,defaultProp:n,onChange:a=()=>{},caller:l}){const[o,s,u]=Zj({defaultProp:n,onChange:a}),f=e!==void 0,p=f?e:o;{const y=v.useRef(e!==void 0);v.useEffect(()=>{const g=y.current;g!==f&&console.warn(`${l} is changing from ${g?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=f},[f,l])}const h=v.useCallback(y=>{var g;if(f){const w=Wj(y)?y(e):y;w!==e&&((g=u.current)==null||g.call(u,w))}else s(y)},[f,e,s,u]);return[p,h]}function Zj({defaultProp:e,onChange:n}){const[a,l]=v.useState(e),o=v.useRef(a),s=v.useRef(n);return Qj(()=>{s.current=n},[n]),v.useEffect(()=>{var u;o.current!==a&&((u=s.current)==null||u.call(s,a),o.current=a)},[a,o]),[a,l,s]}function Wj(e){return typeof e=="function"}function Jj(e,n){return v.useReducer((a,l)=>{const o=n[a][l];return o!=null?o:a},e)}var Pt=e=>{const{present:n,children:a}=e,l=eT(n),o=typeof a=="function"?a({present:l.isPresent}):v.Children.only(a),s=Ve(l.ref,tT(o));return typeof a=="function"||l.isPresent?v.cloneElement(o,{ref:s}):null};Pt.displayName="Presence";function eT(e){const[n,a]=v.useState(),l=v.useRef(null),o=v.useRef(e),s=v.useRef("none"),u=e?"mounted":"unmounted",[f,p]=Jj(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=cu(l.current);s.current=f==="mounted"?h:"none"},[f]),Bt(()=>{const h=l.current,y=o.current;if(y!==e){const w=s.current,b=cu(h);e?p("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?p("UNMOUNT"):p(y&&w!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,p]),Bt(()=>{var h;if(n){let y;const g=(h=n.ownerDocument.defaultView)!=null?h:window,w=k=>{const E=cu(l.current).includes(CSS.escape(k.animationName));if(k.target===n&&E&&(p("ANIMATION_END"),!o.current)){const A=n.style.animationFillMode;n.style.animationFillMode="forwards",y=g.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=A)})}},b=k=>{k.target===n&&(s.current=cu(l.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",w),n.addEventListener("animationend",w),()=>{g.clearTimeout(y),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",w),n.removeEventListener("animationend",w)}}else p("ANIMATION_END")},[n,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:v.useCallback(h=>{l.current=h?getComputedStyle(h):null,a(h)},[])}}function cu(e){return(e==null?void 0:e.animationName)||"none"}function tT(e){var l,o;let n=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.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)}var nT=g1[" useId ".trim().toString()]||(()=>{}),rT=0;function Lt(e){const[n,a]=v.useState(nT());return Bt(()=>{a(l=>l!=null?l:String(rT++))},[e]),e||(n?`radix-${n}`:"")}var Wu="Collapsible",[aT]=Nn(Wu),[lT,ym]=aT(Wu),D1=v.forwardRef((e,n)=>{const{__scopeCollapsible:a,open:l,defaultOpen:o,disabled:s,onOpenChange:u,...f}=e,[p,h]=Jr({prop:l,defaultProp:o!=null?o:!1,onChange:u,caller:Wu});return d.jsx(lT,{scope:a,disabled:s,contentId:Lt(),open:p,onOpenToggle:v.useCallback(()=>h(y=>!y),[h]),children:d.jsx(Ae.div,{"data-state":bm(p),"data-disabled":s?"":void 0,...f,ref:n})})});D1.displayName=Wu;var z1="CollapsibleTrigger",L1=v.forwardRef((e,n)=>{const{__scopeCollapsible:a,...l}=e,o=ym(z1,a);return d.jsx(Ae.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":bm(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...l,ref:n,onClick:ve(e.onClick,o.onOpenToggle)})});L1.displayName=z1;var xm="CollapsibleContent",I1=v.forwardRef((e,n)=>{const{forceMount:a,...l}=e,o=ym(xm,e.__scopeCollapsible);return d.jsx(Pt,{present:a||o.open,children:({present:s})=>d.jsx(iT,{...l,ref:n,present:s})})});I1.displayName=xm;var iT=v.forwardRef((e,n)=>{const{__scopeCollapsible:a,present:l,children:o,...s}=e,u=ym(xm,a),[f,p]=v.useState(l),h=v.useRef(null),y=Ve(n,h),g=v.useRef(0),w=g.current,b=v.useRef(0),k=b.current,S=u.open||f,E=v.useRef(S),A=v.useRef(void 0);return v.useEffect(()=>{const N=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(N)},[]),Bt(()=>{const N=h.current;if(N){A.current=A.current||{transitionDuration:N.style.transitionDuration,animationName:N.style.animationName},N.style.transitionDuration="0s",N.style.animationName="none";const j=N.getBoundingClientRect();g.current=j.height,b.current=j.width,E.current||(N.style.transitionDuration=A.current.transitionDuration,N.style.animationName=A.current.animationName),p(l)}},[u.open,l]),d.jsx(Ae.div,{"data-state":bm(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!S,...s,ref:y,style:{"--radix-collapsible-content-height":w?`${w}px`:void 0,"--radix-collapsible-content-width":k?`${k}px`:void 0,...e.style},children:S&&o})});function bm(e){return e?"open":"closed"}var oT=D1,sT=v.createContext(void 0);function As(e){const n=v.useContext(sT);return e||n||"ltr"}function Gt(e){const n=v.useRef(e);return v.useEffect(()=>{n.current=e}),v.useMemo(()=>(...a)=>{var l;return(l=n.current)==null?void 0:l.call(n,...a)},[])}function cT(e,n=globalThis==null?void 0:globalThis.document){const a=Gt(e);v.useEffect(()=>{const l=o=>{o.key==="Escape"&&a(o)};return n.addEventListener("keydown",l,{capture:!0}),()=>n.removeEventListener("keydown",l,{capture:!0})},[a,n])}var uT="DismissableLayer",Ih="dismissableLayer.update",dT="dismissableLayer.pointerDownOutside",fT="dismissableLayer.focusOutside",jv,B1=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gi=v.forwardRef((e,n)=>{var U;const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:l,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:f,...p}=e,h=v.useContext(B1),[y,g]=v.useState(null),w=(U=y==null?void 0:y.ownerDocument)!=null?U:globalThis==null?void 0:globalThis.document,[,b]=v.useState({}),k=Ve(n,H=>g(H)),S=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),A=S.indexOf(E),N=y?S.indexOf(y):-1,j=h.layersWithOutsidePointerEventsDisabled.size>0,O=N>=A,I=mT(H=>{const q=H.target,B=[...h.branches].some(Y=>Y.contains(q));!O||B||(o==null||o(H),u==null||u(H),H.defaultPrevented||f==null||f())},w),M=gT(H=>{const q=H.target;[...h.branches].some(Y=>Y.contains(q))||(s==null||s(H),u==null||u(H),H.defaultPrevented||f==null||f())},w);return cT(H=>{N===h.layers.size-1&&(l==null||l(H),!H.defaultPrevented&&f&&(H.preventDefault(),f()))},w),v.useEffect(()=>{if(y)return a&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(jv=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(y)),h.layers.add(y),Tv(),()=>{a&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=jv)}},[y,w,a,h]),v.useEffect(()=>()=>{y&&(h.layers.delete(y),h.layersWithOutsidePointerEventsDisabled.delete(y),Tv())},[y,h]),v.useEffect(()=>{const H=()=>b({});return document.addEventListener(Ih,H),()=>document.removeEventListener(Ih,H)},[]),d.jsx(Ae.div,{...p,ref:k,style:{pointerEvents:j?O?"auto":"none":void 0,...e.style},onFocusCapture:ve(e.onFocusCapture,M.onFocusCapture),onBlurCapture:ve(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:ve(e.onPointerDownCapture,I.onPointerDownCapture)})});Gi.displayName=uT;var pT="DismissableLayerBranch",hT=v.forwardRef((e,n)=>{const a=v.useContext(B1),l=v.useRef(null),o=Ve(n,l);return v.useEffect(()=>{const s=l.current;if(s)return a.branches.add(s),()=>{a.branches.delete(s)}},[a.branches]),d.jsx(Ae.div,{...e,ref:o})});hT.displayName=pT;function mT(e,n=globalThis==null?void 0:globalThis.document){const a=Gt(e),l=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const s=f=>{if(f.target&&!l.current){let p=function(){P1(dT,a,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=p,n.addEventListener("click",o.current,{once:!0})):p()}else n.removeEventListener("click",o.current);l.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",s),n.removeEventListener("click",o.current)}},[n,a]),{onPointerDownCapture:()=>l.current=!0}}function gT(e,n=globalThis==null?void 0:globalThis.document){const a=Gt(e),l=v.useRef(!1);return v.useEffect(()=>{const o=s=>{s.target&&!l.current&&P1(fT,a,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,a]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function Tv(){const e=new CustomEvent(Ih);document.dispatchEvent(e)}function P1(e,n,a,{discrete:l}){const o=a.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});n&&o.addEventListener(e,n,{once:!0}),l?R1(o,s):o.dispatchEvent(s)}var Zp="focusScope.autoFocusOnMount",Wp="focusScope.autoFocusOnUnmount",_v={bubbles:!1,cancelable:!0},yT="FocusScope",Ns=v.forwardRef((e,n)=>{const{loop:a=!1,trapped:l=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[f,p]=v.useState(null),h=Gt(o),y=Gt(s),g=v.useRef(null),w=Ve(n,S=>p(S)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(l){let S=function(j){if(b.paused||!f)return;const O=j.target;f.contains(O)?g.current=O:Da(g.current,{select:!0})},E=function(j){if(b.paused||!f)return;const O=j.relatedTarget;O!==null&&(f.contains(O)||Da(g.current,{select:!0}))},A=function(j){if(document.activeElement===document.body)for(const I of j)I.removedNodes.length>0&&Da(f)};document.addEventListener("focusin",S),document.addEventListener("focusout",E);const N=new MutationObserver(A);return f&&N.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",E),N.disconnect()}}},[l,f,b.paused]),v.useEffect(()=>{if(f){Mv.add(b);const S=document.activeElement;if(!f.contains(S)){const A=new CustomEvent(Zp,_v);f.addEventListener(Zp,h),f.dispatchEvent(A),A.defaultPrevented||(xT(kT(F1(f)),{select:!0}),document.activeElement===S&&Da(f))}return()=>{f.removeEventListener(Zp,h),setTimeout(()=>{const A=new CustomEvent(Wp,_v);f.addEventListener(Wp,y),f.dispatchEvent(A),A.defaultPrevented||Da(S!=null?S:document.body,{select:!0}),f.removeEventListener(Wp,y),Mv.remove(b)},0)}}},[f,h,y,b]);const k=v.useCallback(S=>{if(!a&&!l||b.paused)return;const E=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,A=document.activeElement;if(E&&A){const N=S.currentTarget,[j,O]=bT(N);j&&O?!S.shiftKey&&A===O?(S.preventDefault(),a&&Da(j,{select:!0})):S.shiftKey&&A===j&&(S.preventDefault(),a&&Da(O,{select:!0})):A===N&&S.preventDefault()}},[a,l,b.paused]);return d.jsx(Ae.div,{tabIndex:-1,...u,ref:w,onKeyDown:k})});Ns.displayName=yT;function xT(e,{select:n=!1}={}){const a=document.activeElement;for(const l of e)if(Da(l,{select:n}),document.activeElement!==a)return}function bT(e){const n=F1(e),a=Rv(n,e),l=Rv(n.reverse(),e);return[a,l]}function F1(e){const n=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const o=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||o?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)n.push(a.currentNode);return n}function Rv(e,n){for(const a of e)if(!vT(a,{upTo:n}))return a}function vT(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}function wT(e){return e instanceof HTMLInputElement&&"select"in e}function Da(e,{select:n=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&wT(e)&&n&&e.select()}}var Mv=ST();function ST(){let e=[];return{add(n){const a=e[0];n!==a&&(a==null||a.pause()),e=Ov(e,n),e.unshift(n)},remove(n){var a;e=Ov(e,n),(a=e[0])==null||a.resume()}}}function Ov(e,n){const a=[...e],l=a.indexOf(n);return l!==-1&&a.splice(l,1),a}function kT(e){return e.filter(n=>n.tagName!=="A")}var CT="Portal",Yi=v.forwardRef((e,n)=>{var f;const{container:a,...l}=e,[o,s]=v.useState(!1);Bt(()=>s(!0),[]);const u=a||o&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return u?Pj.createPortal(d.jsx(Ae.div,{...l,ref:n}),u):null});Yi.displayName=CT;var Jp=0;function Ju(){v.useEffect(()=>{var n,a;const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(n=e[0])!=null?n:Dv()),document.body.insertAdjacentElement("beforeend",(a=e[1])!=null?a:Dv()),Jp++,()=>{Jp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),Jp--}},[])}function Dv(){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}var hr=function(){return hr=Object.assign||function(n){for(var a,l=1,o=arguments.length;l<o;l++){a=arguments[l];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=a[s])}return n},hr.apply(this,arguments)};function U1(e,n){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&n.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(e);o<l.length;o++)n.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(a[l[o]]=e[l[o]]);return a}function ET(e,n,a){if(a||arguments.length===2)for(var l=0,o=n.length,s;l<o;l++)(s||!(l in n))&&(s||(s=Array.prototype.slice.call(n,0,l)),s[l]=n[l]);return e.concat(s||Array.prototype.slice.call(n))}var Su="right-scroll-bar-position",ku="width-before-scroll-bar",AT="with-scroll-bars-hidden",NT="--removed-body-scroll-bar-size";function eh(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function jT(e,n){var a=v.useState(function(){return{value:e,callback:n,facade:{get current(){return a.value},set current(l){var o=a.value;o!==l&&(a.value=l,a.callback(l,o))}}}})[0];return a.callback=n,a.facade}var TT=typeof window<"u"?v.useLayoutEffect:v.useEffect,zv=new WeakMap;function _T(e,n){var a=jT(null,function(l){return e.forEach(function(o){return eh(o,l)})});return TT(function(){var l=zv.get(a);if(l){var o=new Set(l),s=new Set(e),u=a.current;o.forEach(function(f){s.has(f)||eh(f,null)}),s.forEach(function(f){o.has(f)||eh(f,u)})}zv.set(a,e)},[e]),a}function RT(e){return e}function MT(e,n){n===void 0&&(n=RT);var a=[],l=!1,o={read:function(){if(l)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(s){var u=n(s,l);return a.push(u),function(){a=a.filter(function(f){return f!==u})}},assignSyncMedium:function(s){for(l=!0;a.length;){var u=a;a=[],u.forEach(s)}a={push:function(f){return s(f)},filter:function(){return a}}},assignMedium:function(s){l=!0;var u=[];if(a.length){var f=a;a=[],f.forEach(s),u=a}var p=function(){var y=u;u=[],y.forEach(s)},h=function(){return Promise.resolve().then(p)};h(),a={push:function(y){u.push(y),h()},filter:function(y){return u=u.filter(y),a}}}};return o}function OT(e){e===void 0&&(e={});var n=MT(null);return n.options=hr({async:!0,ssr:!1},e),n}var H1=function(e){var n=e.sideCar,a=U1(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=n.read();if(!l)throw new Error("Sidecar medium not found");return v.createElement(l,hr({},a))};H1.isSideCarExport=!0;function DT(e,n){return e.useMedium(n),H1}var $1=OT(),th=function(){},ed=v.forwardRef(function(e,n){var a=v.useRef(null),l=v.useState({onScrollCapture:th,onWheelCapture:th,onTouchMoveCapture:th}),o=l[0],s=l[1],u=e.forwardProps,f=e.children,p=e.className,h=e.removeScrollBar,y=e.enabled,g=e.shards,w=e.sideCar,b=e.noRelative,k=e.noIsolation,S=e.inert,E=e.allowPinchZoom,A=e.as,N=A===void 0?"div":A,j=e.gapMode,O=U1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=w,M=_T([a,n]),U=hr(hr({},O),o);return v.createElement(v.Fragment,null,y&&v.createElement(I,{sideCar:$1,removeScrollBar:h,shards:g,noRelative:b,noIsolation:k,inert:S,setCallbacks:s,allowPinchZoom:!!E,lockRef:a,gapMode:j}),u?v.cloneElement(v.Children.only(f),hr(hr({},U),{ref:M})):v.createElement(N,hr({},U,{className:p,ref:M}),f))});ed.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ed.classNames={fullWidth:ku,zeroRight:Su};var zT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function LT(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=zT();return n&&e.setAttribute("nonce",n),e}function IT(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function BT(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var PT=function(){var e=0,n=null;return{add:function(a){e==0&&(n=LT())&&(IT(n,a),BT(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},FT=function(){var e=PT();return function(n,a){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&a])}},V1=function(){var e=FT(),n=function(a){var l=a.styles,o=a.dynamic;return e(l,o),null};return n},UT={left:0,top:0,right:0,gap:0},nh=function(e){return parseInt(e||"",10)||0},HT=function(e){var n=window.getComputedStyle(document.body),a=n[e==="padding"?"paddingLeft":"marginLeft"],l=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[nh(a),nh(l),nh(o)]},$T=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return UT;var n=HT(e),a=document.documentElement.clientWidth,l=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,l-a+n[2]-n[0])}},VT=V1(),Ai="data-scroll-locked",qT=function(e,n,a,l){var o=e.left,s=e.top,u=e.right,f=e.gap;return a===void 0&&(a="margin"),`
|
|
385
|
+
.`.concat(AT,` {
|
|
386
|
+
overflow: hidden `).concat(l,`;
|
|
387
|
+
padding-right: `).concat(f,"px ").concat(l,`;
|
|
388
|
+
}
|
|
389
|
+
body[`).concat(Ai,`] {
|
|
390
|
+
overflow: hidden `).concat(l,`;
|
|
391
|
+
overscroll-behavior: contain;
|
|
392
|
+
`).concat([n&&"position: relative ".concat(l,";"),a==="margin"&&`
|
|
393
|
+
padding-left: `.concat(o,`px;
|
|
394
|
+
padding-top: `).concat(s,`px;
|
|
395
|
+
padding-right: `).concat(u,`px;
|
|
396
|
+
margin-left:0;
|
|
397
|
+
margin-top:0;
|
|
398
|
+
margin-right: `).concat(f,"px ").concat(l,`;
|
|
399
|
+
`),a==="padding"&&"padding-right: ".concat(f,"px ").concat(l,";")].filter(Boolean).join(""),`
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.`).concat(Su,` {
|
|
403
|
+
right: `).concat(f,"px ").concat(l,`;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.`).concat(ku,` {
|
|
407
|
+
margin-right: `).concat(f,"px ").concat(l,`;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.`).concat(Su," .").concat(Su,` {
|
|
411
|
+
right: 0 `).concat(l,`;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.`).concat(ku," .").concat(ku,` {
|
|
415
|
+
margin-right: 0 `).concat(l,`;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
body[`).concat(Ai,`] {
|
|
419
|
+
`).concat(NT,": ").concat(f,`px;
|
|
420
|
+
}
|
|
421
|
+
`)},Lv=function(){var e=parseInt(document.body.getAttribute(Ai)||"0",10);return isFinite(e)?e:0},GT=function(){v.useEffect(function(){return document.body.setAttribute(Ai,(Lv()+1).toString()),function(){var e=Lv()-1;e<=0?document.body.removeAttribute(Ai):document.body.setAttribute(Ai,e.toString())}},[])},YT=function(e){var n=e.noRelative,a=e.noImportant,l=e.gapMode,o=l===void 0?"margin":l;GT();var s=v.useMemo(function(){return $T(o)},[o]);return v.createElement(VT,{styles:qT(s,!n,o,a?"":"!important")})},Bh=!1;if(typeof window<"u")try{var uu=Object.defineProperty({},"passive",{get:function(){return Bh=!0,!0}});window.addEventListener("test",uu,uu),window.removeEventListener("test",uu,uu)}catch{Bh=!1}var gi=Bh?{passive:!1}:!1,XT=function(e){return e.tagName==="TEXTAREA"},q1=function(e,n){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!XT(e)&&a[n]==="visible")},KT=function(e){return q1(e,"overflowY")},QT=function(e){return q1(e,"overflowX")},Iv=function(e,n){var a=n.ownerDocument,l=n;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var o=G1(e,l);if(o){var s=Y1(e,l),u=s[1],f=s[2];if(u>f)return!0}l=l.parentNode}while(l&&l!==a.body);return!1},ZT=function(e){var n=e.scrollTop,a=e.scrollHeight,l=e.clientHeight;return[n,a,l]},WT=function(e){var n=e.scrollLeft,a=e.scrollWidth,l=e.clientWidth;return[n,a,l]},G1=function(e,n){return e==="v"?KT(n):QT(n)},Y1=function(e,n){return e==="v"?ZT(n):WT(n)},JT=function(e,n){return e==="h"&&n==="rtl"?-1:1},e_=function(e,n,a,l,o){var s=JT(e,window.getComputedStyle(n).direction),u=s*l,f=a.target,p=n.contains(f),h=!1,y=u>0,g=0,w=0;do{if(!f)break;var b=Y1(e,f),k=b[0],S=b[1],E=b[2],A=S-E-s*k;(k||A)&&G1(e,f)&&(g+=A,w+=k);var N=f.parentNode;f=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!p&&f!==document.body||p&&(n.contains(f)||n===f));return(y&&Math.abs(g)<1||!y&&Math.abs(w)<1)&&(h=!0),h},du=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bv=function(e){return[e.deltaX,e.deltaY]},Pv=function(e){return e&&"current"in e?e.current:e},t_=function(e,n){return e[0]===n[0]&&e[1]===n[1]},n_=function(e){return`
|
|
422
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
423
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
424
|
+
`)},r_=0,yi=[];function a_(e){var n=v.useRef([]),a=v.useRef([0,0]),l=v.useRef(),o=v.useState(r_++)[0],s=v.useState(V1)[0],u=v.useRef(e);v.useEffect(function(){u.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var S=ET([e.lockRef.current],(e.shards||[]).map(Pv),!0).filter(Boolean);return S.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),S.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(S,E){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!u.current.allowPinchZoom;var A=du(S),N=a.current,j="deltaX"in S?S.deltaX:N[0]-A[0],O="deltaY"in S?S.deltaY:N[1]-A[1],I,M=S.target,U=Math.abs(j)>Math.abs(O)?"h":"v";if("touches"in S&&U==="h"&&M.type==="range")return!1;var H=window.getSelection(),q=H&&H.anchorNode,B=q?q===M||q.contains(M):!1;if(B)return!1;var Y=Iv(U,M);if(!Y)return!0;if(Y?I=U:(I=U==="v"?"h":"v",Y=Iv(U,M)),!Y)return!1;if(!l.current&&"changedTouches"in S&&(j||O)&&(l.current=I),!I)return!0;var G=l.current||I;return e_(G,E,S,G==="h"?j:O)},[]),p=v.useCallback(function(S){var E=S;if(!(!yi.length||yi[yi.length-1]!==s)){var A="deltaY"in E?Bv(E):du(E),N=n.current.filter(function(I){return I.name===E.type&&(I.target===E.target||E.target===I.shadowParent)&&t_(I.delta,A)})[0];if(N&&N.should){E.cancelable&&E.preventDefault();return}if(!N){var j=(u.current.shards||[]).map(Pv).filter(Boolean).filter(function(I){return I.contains(E.target)}),O=j.length>0?f(E,j[0]):!u.current.noIsolation;O&&E.cancelable&&E.preventDefault()}}},[]),h=v.useCallback(function(S,E,A,N){var j={name:S,delta:E,target:A,should:N,shadowParent:l_(A)};n.current.push(j),setTimeout(function(){n.current=n.current.filter(function(O){return O!==j})},1)},[]),y=v.useCallback(function(S){a.current=du(S),l.current=void 0},[]),g=v.useCallback(function(S){h(S.type,Bv(S),S.target,f(S,e.lockRef.current))},[]),w=v.useCallback(function(S){h(S.type,du(S),S.target,f(S,e.lockRef.current))},[]);v.useEffect(function(){return yi.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:w}),document.addEventListener("wheel",p,gi),document.addEventListener("touchmove",p,gi),document.addEventListener("touchstart",y,gi),function(){yi=yi.filter(function(S){return S!==s}),document.removeEventListener("wheel",p,gi),document.removeEventListener("touchmove",p,gi),document.removeEventListener("touchstart",y,gi)}},[]);var b=e.removeScrollBar,k=e.inert;return v.createElement(v.Fragment,null,k?v.createElement(s,{styles:n_(o)}):null,b?v.createElement(YT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function l_(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const i_=DT($1,a_);var js=v.forwardRef(function(e,n){return v.createElement(ed,hr({},e,{ref:n,sideCar:i_}))});js.classNames=ed.classNames;var o_=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},xi=new WeakMap,fu=new WeakMap,pu={},rh=0,X1=function(e){return e&&(e.host||X1(e.parentNode))},s_=function(e,n){return n.map(function(a){if(e.contains(a))return a;var l=X1(a);return l&&e.contains(l)?l:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},c_=function(e,n,a,l){var o=s_(n,Array.isArray(e)?e:[e]);pu[a]||(pu[a]=new WeakMap);var s=pu[a],u=[],f=new Set,p=new Set(o),h=function(g){!g||f.has(g)||(f.add(g),h(g.parentNode))};o.forEach(h);var y=function(g){!g||p.has(g)||Array.prototype.forEach.call(g.children,function(w){if(f.has(w))y(w);else try{var b=w.getAttribute(l),k=b!==null&&b!=="false",S=(xi.get(w)||0)+1,E=(s.get(w)||0)+1;xi.set(w,S),s.set(w,E),u.push(w),S===1&&k&&fu.set(w,!0),E===1&&w.setAttribute(a,"true"),k||w.setAttribute(l,"true")}catch(A){console.error("aria-hidden: cannot operate on ",w,A)}})};return y(n),f.clear(),rh++,function(){u.forEach(function(g){var w=xi.get(g)-1,b=s.get(g)-1;xi.set(g,w),s.set(g,b),w||(fu.has(g)||g.removeAttribute(l),fu.delete(g)),b||g.removeAttribute(a)}),rh--,rh||(xi=new WeakMap,xi=new WeakMap,fu=new WeakMap,pu={})}},td=function(e,n,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(e)?e:[e]),o=o_(e);return o?(l.push.apply(l,Array.from(o.querySelectorAll("[aria-live], script"))),c_(l,o,a,"aria-hidden")):function(){return null}},nd="Dialog",[K1]=Nn(nd),[u_,rr]=K1(nd),Q1=e=>{const{__scopeDialog:n,children:a,open:l,defaultOpen:o,onOpenChange:s,modal:u=!0}=e,f=v.useRef(null),p=v.useRef(null),[h,y]=Jr({prop:l,defaultProp:o!=null?o:!1,onChange:s,caller:nd});return d.jsx(u_,{scope:n,triggerRef:f,contentRef:p,contentId:Lt(),titleId:Lt(),descriptionId:Lt(),open:h,onOpenChange:y,onOpenToggle:v.useCallback(()=>y(g=>!g),[y]),modal:u,children:a})};Q1.displayName=nd;var Z1="DialogTrigger",W1=v.forwardRef((e,n)=>{const{__scopeDialog:a,...l}=e,o=rr(Z1,a),s=Ve(n,o.triggerRef);return d.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Sm(o.open),...l,ref:s,onClick:ve(e.onClick,o.onOpenToggle)})});W1.displayName=Z1;var vm="DialogPortal",[d_,J1]=K1(vm,{forceMount:void 0}),ew=e=>{const{__scopeDialog:n,forceMount:a,children:l,container:o}=e,s=rr(vm,n);return d.jsx(d_,{scope:n,forceMount:a,children:v.Children.map(l,u=>d.jsx(Pt,{present:a||s.open,children:d.jsx(Yi,{asChild:!0,container:o,children:u})}))})};ew.displayName=vm;var Ru="DialogOverlay",tw=v.forwardRef((e,n)=>{const a=J1(Ru,e.__scopeDialog),{forceMount:l=a.forceMount,...o}=e,s=rr(Ru,e.__scopeDialog);return s.modal?d.jsx(Pt,{present:l||s.open,children:d.jsx(p_,{...o,ref:n})}):null});tw.displayName=Ru;var f_=Ia("DialogOverlay.RemoveScroll"),p_=v.forwardRef((e,n)=>{const{__scopeDialog:a,...l}=e,o=rr(Ru,a);return d.jsx(js,{as:f_,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(Ae.div,{"data-state":Sm(o.open),...l,ref:n,style:{pointerEvents:"auto",...l.style}})})}),wl="DialogContent",nw=v.forwardRef((e,n)=>{const a=J1(wl,e.__scopeDialog),{forceMount:l=a.forceMount,...o}=e,s=rr(wl,e.__scopeDialog);return d.jsx(Pt,{present:l||s.open,children:s.modal?d.jsx(h_,{...o,ref:n}):d.jsx(m_,{...o,ref:n})})});nw.displayName=wl;var h_=v.forwardRef((e,n)=>{const a=rr(wl,e.__scopeDialog),l=v.useRef(null),o=Ve(n,a.contentRef,l);return v.useEffect(()=>{const s=l.current;if(s)return td(s)},[]),d.jsx(rw,{...e,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(e.onCloseAutoFocus,s=>{var u;s.preventDefault(),(u=a.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ve(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&s.preventDefault()}),onFocusOutside:ve(e.onFocusOutside,s=>s.preventDefault())})}),m_=v.forwardRef((e,n)=>{const a=rr(wl,e.__scopeDialog),l=v.useRef(!1),o=v.useRef(!1);return d.jsx(rw,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var u,f;(u=e.onCloseAutoFocus)==null||u.call(e,s),s.defaultPrevented||(l.current||(f=a.triggerRef.current)==null||f.focus(),s.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:s=>{var p,h;(p=e.onInteractOutside)==null||p.call(e,s),s.defaultPrevented||(l.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=s.target;((h=a.triggerRef.current)==null?void 0:h.contains(u))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),rw=v.forwardRef((e,n)=>{const{__scopeDialog:a,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:s,...u}=e,f=rr(wl,a),p=v.useRef(null),h=Ve(n,p);return Ju(),d.jsxs(d.Fragment,{children:[d.jsx(Ns,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:s,children:d.jsx(Gi,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":Sm(f.open),...u,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(g_,{titleId:f.titleId}),d.jsx(x_,{contentRef:p,descriptionId:f.descriptionId})]})]})}),wm="DialogTitle",aw=v.forwardRef((e,n)=>{const{__scopeDialog:a,...l}=e,o=rr(wm,a);return d.jsx(Ae.h2,{id:o.titleId,...l,ref:n})});aw.displayName=wm;var lw="DialogDescription",iw=v.forwardRef((e,n)=>{const{__scopeDialog:a,...l}=e,o=rr(lw,a);return d.jsx(Ae.p,{id:o.descriptionId,...l,ref:n})});iw.displayName=lw;var ow="DialogClose",sw=v.forwardRef((e,n)=>{const{__scopeDialog:a,...l}=e,o=rr(ow,a);return d.jsx(Ae.button,{type:"button",...l,ref:n,onClick:ve(e.onClick,()=>o.onOpenChange(!1))})});sw.displayName=ow;function Sm(e){return e?"open":"closed"}var cw="DialogTitleWarning",[_P,uw]=Xj(cw,{contentName:wl,titleName:wm,docsSlug:"dialog"}),g_=({titleId:e})=>{const n=uw(cw),a=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
425
|
+
|
|
426
|
+
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
427
|
+
|
|
428
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},y_="DialogDescriptionWarning",x_=({contentRef:e,descriptionId:n})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uw(y_).contentName}}.`;return v.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(l))},[l,e,n]),null},km=Q1,b_=W1,Cm=ew,Em=tw,Am=nw,dw=aw,fw=iw,rd=sw;function v_(e){const n=v.useRef({value:e,previous:e});return v.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function w_(e){const[n,a]=v.useState(void 0);return Bt(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});const l=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let u,f;if("borderBoxSize"in s){const p=s.borderBoxSize,h=Array.isArray(p)?p[0]:p;u=h.inlineSize,f=h.blockSize}else u=e.offsetWidth,f=e.offsetHeight;a({width:u,height:f})});return l.observe(e,{box:"border-box"}),()=>l.unobserve(e)}else a(void 0)},[e]),n}const S_=["top","right","bottom","left"],Ba=Math.min,Cn=Math.max,Mu=Math.round,hu=Math.floor,gr=e=>({x:e,y:e}),k_={left:"right",right:"left",bottom:"top",top:"bottom"};function Ph(e,n,a){return Cn(e,Ba(n,a))}function ea(e,n){return typeof e=="function"?e(n):e}function ta(e){return e.split("-")[0]}function Xi(e){return e.split("-")[1]}function Nm(e){return e==="x"?"y":"x"}function jm(e){return e==="y"?"height":"width"}function mr(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Tm(e){return Nm(mr(e))}function C_(e,n,a){a===void 0&&(a=!1);const l=Xi(e),o=Tm(e),s=jm(o);let u=o==="x"?l===(a?"end":"start")?"right":"left":l==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(u=Ou(u)),[u,Ou(u)]}function E_(e){const n=Ou(e);return[Fh(e),n,Fh(n)]}function Fh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Fv=["left","right"],Uv=["right","left"],A_=["top","bottom"],N_=["bottom","top"];function j_(e,n,a){switch(e){case"top":case"bottom":return a?n?Uv:Fv:n?Fv:Uv;case"left":case"right":return n?A_:N_;default:return[]}}function T_(e,n,a,l){const o=Xi(e);let s=j_(ta(e),a==="start",l);return o&&(s=s.map(u=>u+"-"+o),n&&(s=s.concat(s.map(Fh)))),s}function Ou(e){const n=ta(e);return k_[n]+e.slice(n.length)}function __(e){return{top:0,right:0,bottom:0,left:0,...e}}function pw(e){return typeof e!="number"?__(e):{top:e,right:e,bottom:e,left:e}}function Du(e){const{x:n,y:a,width:l,height:o}=e;return{width:l,height:o,top:a,left:n,right:n+l,bottom:a+o,x:n,y:a}}function Hv(e,n,a){let{reference:l,floating:o}=e;const s=mr(n),u=Tm(n),f=jm(u),p=ta(n),h=s==="y",y=l.x+l.width/2-o.width/2,g=l.y+l.height/2-o.height/2,w=l[f]/2-o[f]/2;let b;switch(p){case"top":b={x:y,y:l.y-o.height};break;case"bottom":b={x:y,y:l.y+l.height};break;case"right":b={x:l.x+l.width,y:g};break;case"left":b={x:l.x-o.width,y:g};break;default:b={x:l.x,y:l.y}}switch(Xi(n)){case"start":b[u]-=w*(a&&h?-1:1);break;case"end":b[u]+=w*(a&&h?-1:1);break}return b}async function R_(e,n){var a;n===void 0&&(n={});const{x:l,y:o,platform:s,rects:u,elements:f,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:w=!1,padding:b=0}=ea(n,e),k=pw(b),E=f[w?g==="floating"?"reference":"floating":g],A=Du(await s.getClippingRect({element:(a=await(s.isElement==null?void 0:s.isElement(E)))==null||a?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:h,rootBoundary:y,strategy:p})),N=g==="floating"?{x:l,y:o,width:u.floating.width,height:u.floating.height}:u.reference,j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),O=await(s.isElement==null?void 0:s.isElement(j))?await(s.getScale==null?void 0:s.getScale(j))||{x:1,y:1}:{x:1,y:1},I=Du(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:N,offsetParent:j,strategy:p}):N);return{top:(A.top-I.top+k.top)/O.y,bottom:(I.bottom-A.bottom+k.bottom)/O.y,left:(A.left-I.left+k.left)/O.x,right:(I.right-A.right+k.right)/O.x}}const M_=50,O_=async(e,n,a)=>{const{placement:l="bottom",strategy:o="absolute",middleware:s=[],platform:u}=a,f=u.detectOverflow?u:{...u,detectOverflow:R_},p=await(u.isRTL==null?void 0:u.isRTL(n));let h=await u.getElementRects({reference:e,floating:n,strategy:o}),{x:y,y:g}=Hv(h,l,p),w=l,b=0;const k={};for(let S=0;S<s.length;S++){const E=s[S];if(!E)continue;const{name:A,fn:N}=E,{x:j,y:O,data:I,reset:M}=await N({x:y,y:g,initialPlacement:l,placement:w,strategy:o,middlewareData:k,rects:h,platform:f,elements:{reference:e,floating:n}});y=j!=null?j:y,g=O!=null?O:g,k[A]={...k[A],...I},M&&b<M_&&(b++,typeof M=="object"&&(M.placement&&(w=M.placement),M.rects&&(h=M.rects===!0?await u.getElementRects({reference:e,floating:n,strategy:o}):M.rects),{x:y,y:g}=Hv(h,w,p)),S=-1)}return{x:y,y:g,placement:w,strategy:o,middlewareData:k}},D_=e=>({name:"arrow",options:e,async fn(n){const{x:a,y:l,placement:o,rects:s,platform:u,elements:f,middlewareData:p}=n,{element:h,padding:y=0}=ea(e,n)||{};if(h==null)return{};const g=pw(y),w={x:a,y:l},b=Tm(o),k=jm(b),S=await u.getDimensions(h),E=b==="y",A=E?"top":"left",N=E?"bottom":"right",j=E?"clientHeight":"clientWidth",O=s.reference[k]+s.reference[b]-w[b]-s.floating[k],I=w[b]-s.reference[b],M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let U=M?M[j]:0;(!U||!await(u.isElement==null?void 0:u.isElement(M)))&&(U=f.floating[j]||s.floating[k]);const H=O/2-I/2,q=U/2-S[k]/2-1,B=Ba(g[A],q),Y=Ba(g[N],q),G=B,he=U-S[k]-Y,Z=U/2-S[k]/2+H,W=Ph(G,Z,he),z=!p.arrow&&Xi(o)!=null&&Z!==W&&s.reference[k]/2-(Z<G?B:Y)-S[k]/2<0,K=z?Z<G?Z-G:Z-he:0;return{[b]:w[b]+K,data:{[b]:W,centerOffset:Z-W-K,...z&&{alignmentOffset:K}},reset:z}}}),z_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var a,l;const{placement:o,middlewareData:s,rects:u,initialPlacement:f,platform:p,elements:h}=n,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...E}=ea(e,n);if((a=s.arrow)!=null&&a.alignmentOffset)return{};const A=ta(o),N=mr(f),j=ta(f)===f,O=await(p.isRTL==null?void 0:p.isRTL(h.floating)),I=w||(j||!S?[Ou(f)]:E_(f)),M=k!=="none";!w&&M&&I.push(...T_(f,S,k,O));const U=[f,...I],H=await p.detectOverflow(n,E),q=[];let B=((l=s.flip)==null?void 0:l.overflows)||[];if(y&&q.push(H[A]),g){const Z=C_(o,u,O);q.push(H[Z[0]],H[Z[1]])}if(B=[...B,{placement:o,overflows:q}],!q.every(Z=>Z<=0)){var Y,G;const Z=(((Y=s.flip)==null?void 0:Y.index)||0)+1,W=U[Z];if(W&&(!(g==="alignment"?N!==mr(W):!1)||B.every(ee=>mr(ee.placement)===N?ee.overflows[0]>0:!0)))return{data:{index:Z,overflows:B},reset:{placement:W}};let z=(G=B.filter(K=>K.overflows[0]<=0).sort((K,ee)=>K.overflows[1]-ee.overflows[1])[0])==null?void 0:G.placement;if(!z)switch(b){case"bestFit":{var he;const K=(he=B.filter(ee=>{if(M){const le=mr(ee.placement);return le===N||le==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(le=>le>0).reduce((le,T)=>le+T,0)]).sort((ee,le)=>ee[1]-le[1])[0])==null?void 0:he[0];K&&(z=K);break}case"initialPlacement":z=f;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function $v(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Vv(e){return S_.some(n=>e[n]>=0)}const L_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:a,platform:l}=n,{strategy:o="referenceHidden",...s}=ea(e,n);switch(o){case"referenceHidden":{const u=await l.detectOverflow(n,{...s,elementContext:"reference"}),f=$v(u,a.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Vv(f)}}}case"escaped":{const u=await l.detectOverflow(n,{...s,altBoundary:!0}),f=$v(u,a.floating);return{data:{escapedOffsets:f,escaped:Vv(f)}}}default:return{}}}}},hw=new Set(["left","top"]);async function I_(e,n){const{placement:a,platform:l,elements:o}=e,s=await(l.isRTL==null?void 0:l.isRTL(o.floating)),u=ta(a),f=Xi(a),p=mr(a)==="y",h=hw.has(u)?-1:1,y=s&&p?-1:1,g=ea(n,e);let{mainAxis:w,crossAxis:b,alignmentAxis:k}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof k=="number"&&(b=f==="end"?k*-1:k),p?{x:b*y,y:w*h}:{x:w*h,y:b*y}}const B_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var a,l;const{x:o,y:s,placement:u,middlewareData:f}=n,p=await I_(n,e);return u===((a=f.offset)==null?void 0:a.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:o+p.x,y:s+p.y,data:{...p,placement:u}}}}},P_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:a,y:l,placement:o,platform:s}=n,{mainAxis:u=!0,crossAxis:f=!1,limiter:p={fn:A=>{let{x:N,y:j}=A;return{x:N,y:j}}},...h}=ea(e,n),y={x:a,y:l},g=await s.detectOverflow(n,h),w=mr(ta(o)),b=Nm(w);let k=y[b],S=y[w];if(u){const A=b==="y"?"top":"left",N=b==="y"?"bottom":"right",j=k+g[A],O=k-g[N];k=Ph(j,k,O)}if(f){const A=w==="y"?"top":"left",N=w==="y"?"bottom":"right",j=S+g[A],O=S-g[N];S=Ph(j,S,O)}const E=p.fn({...n,[b]:k,[w]:S});return{...E,data:{x:E.x-a,y:E.y-l,enabled:{[b]:u,[w]:f}}}}}},F_=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:a,y:l,placement:o,rects:s,middlewareData:u}=n,{offset:f=0,mainAxis:p=!0,crossAxis:h=!0}=ea(e,n),y={x:a,y:l},g=mr(o),w=Nm(g);let b=y[w],k=y[g];const S=ea(f,n),E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(p){const j=w==="y"?"height":"width",O=s.reference[w]-s.floating[j]+E.mainAxis,I=s.reference[w]+s.reference[j]-E.mainAxis;b<O?b=O:b>I&&(b=I)}if(h){var A,N;const j=w==="y"?"width":"height",O=hw.has(ta(o)),I=s.reference[g]-s.floating[j]+(O&&((A=u.offset)==null?void 0:A[g])||0)+(O?0:E.crossAxis),M=s.reference[g]+s.reference[j]+(O?0:((N=u.offset)==null?void 0:N[g])||0)-(O?E.crossAxis:0);k<I?k=I:k>M&&(k=M)}return{[w]:b,[g]:k}}}},U_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var a,l;const{placement:o,rects:s,platform:u,elements:f}=n,{apply:p=()=>{},...h}=ea(e,n),y=await u.detectOverflow(n,h),g=ta(o),w=Xi(o),b=mr(o)==="y",{width:k,height:S}=s.floating;let E,A;g==="top"||g==="bottom"?(E=g,A=w===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(A=g,E=w==="end"?"top":"bottom");const N=S-y.top-y.bottom,j=k-y.left-y.right,O=Ba(S-y[E],N),I=Ba(k-y[A],j),M=!n.middlewareData.shift;let U=O,H=I;if((a=n.middlewareData.shift)!=null&&a.enabled.x&&(H=j),(l=n.middlewareData.shift)!=null&&l.enabled.y&&(U=N),M&&!w){const B=Cn(y.left,0),Y=Cn(y.right,0),G=Cn(y.top,0),he=Cn(y.bottom,0);b?H=k-2*(B!==0||Y!==0?B+Y:Cn(y.left,y.right)):U=S-2*(G!==0||he!==0?G+he:Cn(y.top,y.bottom))}await p({...n,availableWidth:H,availableHeight:U});const q=await u.getDimensions(f.floating);return k!==q.width||S!==q.height?{reset:{rects:!0}}:{}}}};function ad(){return typeof window<"u"}function Ki(e){return mw(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function xr(e){var n;return(n=(mw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function mw(e){return ad()?e instanceof Node||e instanceof En(e).Node:!1}function tr(e){return ad()?e instanceof Element||e instanceof En(e).Element:!1}function na(e){return ad()?e instanceof HTMLElement||e instanceof En(e).HTMLElement:!1}function qv(e){return!ad()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof En(e).ShadowRoot}function Ts(e){const{overflow:n,overflowX:a,overflowY:l,display:o}=nr(e);return/auto|scroll|overlay|hidden|clip/.test(n+l+a)&&o!=="inline"&&o!=="contents"}function H_(e){return/^(table|td|th)$/.test(Ki(e))}function ld(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const $_=/transform|translate|scale|rotate|perspective|filter/,V_=/paint|layout|strict|content/,gl=e=>!!e&&e!=="none";let ah;function _m(e){const n=tr(e)?nr(e):e;return gl(n.transform)||gl(n.translate)||gl(n.scale)||gl(n.rotate)||gl(n.perspective)||!Rm()&&(gl(n.backdropFilter)||gl(n.filter))||$_.test(n.willChange||"")||V_.test(n.contain||"")}function q_(e){let n=Pa(e);for(;na(n)&&!Mi(n);){if(_m(n))return n;if(ld(n))return null;n=Pa(n)}return null}function Rm(){return ah==null&&(ah=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ah}function Mi(e){return/^(html|body|#document)$/.test(Ki(e))}function nr(e){return En(e).getComputedStyle(e)}function id(e){return tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pa(e){if(Ki(e)==="html")return e;const n=e.assignedSlot||e.parentNode||qv(e)&&e.host||xr(e);return qv(n)?n.host:n}function gw(e){const n=Pa(e);return Mi(n)?e.ownerDocument?e.ownerDocument.body:e.body:na(n)&&Ts(n)?n:gw(n)}function fs(e,n,a){var l;n===void 0&&(n=[]),a===void 0&&(a=!0);const o=gw(e),s=o===((l=e.ownerDocument)==null?void 0:l.body),u=En(o);if(s){const f=Uh(u);return n.concat(u,u.visualViewport||[],Ts(o)?o:[],f&&a?fs(f):[])}else return n.concat(o,fs(o,[],a))}function Uh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yw(e){const n=nr(e);let a=parseFloat(n.width)||0,l=parseFloat(n.height)||0;const o=na(e),s=o?e.offsetWidth:a,u=o?e.offsetHeight:l,f=Mu(a)!==s||Mu(l)!==u;return f&&(a=s,l=u),{width:a,height:l,$:f}}function Mm(e){return tr(e)?e:e.contextElement}function Ni(e){const n=Mm(e);if(!na(n))return gr(1);const a=n.getBoundingClientRect(),{width:l,height:o,$:s}=yw(n);let u=(s?Mu(a.width):a.width)/l,f=(s?Mu(a.height):a.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const G_=gr(0);function xw(e){const n=En(e);return!Rm()||!n.visualViewport?G_:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Y_(e,n,a){return n===void 0&&(n=!1),!a||n&&a!==En(e)?!1:n}function Sl(e,n,a,l){n===void 0&&(n=!1),a===void 0&&(a=!1);const o=e.getBoundingClientRect(),s=Mm(e);let u=gr(1);n&&(l?tr(l)&&(u=Ni(l)):u=Ni(e));const f=Y_(s,a,l)?xw(s):gr(0);let p=(o.left+f.x)/u.x,h=(o.top+f.y)/u.y,y=o.width/u.x,g=o.height/u.y;if(s){const w=En(s),b=l&&tr(l)?En(l):l;let k=w,S=Uh(k);for(;S&&l&&b!==k;){const E=Ni(S),A=S.getBoundingClientRect(),N=nr(S),j=A.left+(S.clientLeft+parseFloat(N.paddingLeft))*E.x,O=A.top+(S.clientTop+parseFloat(N.paddingTop))*E.y;p*=E.x,h*=E.y,y*=E.x,g*=E.y,p+=j,h+=O,k=En(S),S=Uh(k)}}return Du({width:y,height:g,x:p,y:h})}function od(e,n){const a=id(e).scrollLeft;return n?n.left+a:Sl(xr(e)).left+a}function bw(e,n){const a=e.getBoundingClientRect(),l=a.left+n.scrollLeft-od(e,a),o=a.top+n.scrollTop;return{x:l,y:o}}function X_(e){let{elements:n,rect:a,offsetParent:l,strategy:o}=e;const s=o==="fixed",u=xr(l),f=n?ld(n.floating):!1;if(l===u||f&&s)return a;let p={scrollLeft:0,scrollTop:0},h=gr(1);const y=gr(0),g=na(l);if((g||!g&&!s)&&((Ki(l)!=="body"||Ts(u))&&(p=id(l)),g)){const b=Sl(l);h=Ni(l),y.x=b.x+l.clientLeft,y.y=b.y+l.clientTop}const w=u&&!g&&!s?bw(u,p):gr(0);return{width:a.width*h.x,height:a.height*h.y,x:a.x*h.x-p.scrollLeft*h.x+y.x+w.x,y:a.y*h.y-p.scrollTop*h.y+y.y+w.y}}function K_(e){return Array.from(e.getClientRects())}function Q_(e){const n=xr(e),a=id(e),l=e.ownerDocument.body,o=Cn(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),s=Cn(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let u=-a.scrollLeft+od(e);const f=-a.scrollTop;return nr(l).direction==="rtl"&&(u+=Cn(n.clientWidth,l.clientWidth)-o),{width:o,height:s,x:u,y:f}}const Gv=25;function Z_(e,n){const a=En(e),l=xr(e),o=a.visualViewport;let s=l.clientWidth,u=l.clientHeight,f=0,p=0;if(o){s=o.width,u=o.height;const y=Rm();(!y||y&&n==="fixed")&&(f=o.offsetLeft,p=o.offsetTop)}const h=od(l);if(h<=0){const y=l.ownerDocument,g=y.body,w=getComputedStyle(g),b=y.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,k=Math.abs(l.clientWidth-g.clientWidth-b);k<=Gv&&(s-=k)}else h<=Gv&&(s+=h);return{width:s,height:u,x:f,y:p}}function W_(e,n){const a=Sl(e,!0,n==="fixed"),l=a.top+e.clientTop,o=a.left+e.clientLeft,s=na(e)?Ni(e):gr(1),u=e.clientWidth*s.x,f=e.clientHeight*s.y,p=o*s.x,h=l*s.y;return{width:u,height:f,x:p,y:h}}function Yv(e,n,a){let l;if(n==="viewport")l=Z_(e,a);else if(n==="document")l=Q_(xr(e));else if(tr(n))l=W_(n,a);else{const o=xw(e);l={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Du(l)}function vw(e,n){const a=Pa(e);return a===n||!tr(a)||Mi(a)?!1:nr(a).position==="fixed"||vw(a,n)}function J_(e,n){const a=n.get(e);if(a)return a;let l=fs(e,[],!1).filter(f=>tr(f)&&Ki(f)!=="body"),o=null;const s=nr(e).position==="fixed";let u=s?Pa(e):e;for(;tr(u)&&!Mi(u);){const f=nr(u),p=_m(u);!p&&f.position==="fixed"&&(o=null),(s?!p&&!o:!p&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ts(u)&&!p&&vw(e,u))?l=l.filter(y=>y!==u):o=f,u=Pa(u)}return n.set(e,l),l}function eR(e){let{element:n,boundary:a,rootBoundary:l,strategy:o}=e;const u=[...a==="clippingAncestors"?ld(n)?[]:J_(n,this._c):[].concat(a),l],f=Yv(n,u[0],o);let p=f.top,h=f.right,y=f.bottom,g=f.left;for(let w=1;w<u.length;w++){const b=Yv(n,u[w],o);p=Cn(b.top,p),h=Ba(b.right,h),y=Ba(b.bottom,y),g=Cn(b.left,g)}return{width:h-g,height:y-p,x:g,y:p}}function tR(e){const{width:n,height:a}=yw(e);return{width:n,height:a}}function nR(e,n,a){const l=na(n),o=xr(n),s=a==="fixed",u=Sl(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const p=gr(0);function h(){p.x=od(o)}if(l||!l&&!s)if((Ki(n)!=="body"||Ts(o))&&(f=id(n)),l){const b=Sl(n,!0,s,n);p.x=b.x+n.clientLeft,p.y=b.y+n.clientTop}else o&&h();s&&!l&&o&&h();const y=o&&!l&&!s?bw(o,f):gr(0),g=u.left+f.scrollLeft-p.x-y.x,w=u.top+f.scrollTop-p.y-y.y;return{x:g,y:w,width:u.width,height:u.height}}function lh(e){return nr(e).position==="static"}function Xv(e,n){if(!na(e)||nr(e).position==="fixed")return null;if(n)return n(e);let a=e.offsetParent;return xr(e)===a&&(a=a.ownerDocument.body),a}function ww(e,n){const a=En(e);if(ld(e))return a;if(!na(e)){let o=Pa(e);for(;o&&!Mi(o);){if(tr(o)&&!lh(o))return o;o=Pa(o)}return a}let l=Xv(e,n);for(;l&&H_(l)&&lh(l);)l=Xv(l,n);return l&&Mi(l)&&lh(l)&&!_m(l)?a:l||q_(e)||a}const rR=async function(e){const n=this.getOffsetParent||ww,a=this.getDimensions,l=await a(e.floating);return{reference:nR(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function aR(e){return nr(e).direction==="rtl"}const lR={convertOffsetParentRelativeRectToViewportRelativeRect:X_,getDocumentElement:xr,getClippingRect:eR,getOffsetParent:ww,getElementRects:rR,getClientRects:K_,getDimensions:tR,getScale:Ni,isElement:tr,isRTL:aR};function Sw(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function iR(e,n){let a=null,l;const o=xr(e);function s(){var f;clearTimeout(l),(f=a)==null||f.disconnect(),a=null}function u(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),s();const h=e.getBoundingClientRect(),{left:y,top:g,width:w,height:b}=h;if(f||n(),!w||!b)return;const k=hu(g),S=hu(o.clientWidth-(y+w)),E=hu(o.clientHeight-(g+b)),A=hu(y),j={rootMargin:-k+"px "+-S+"px "+-E+"px "+-A+"px",threshold:Cn(0,Ba(1,p))||1};let O=!0;function I(M){const U=M[0].intersectionRatio;if(U!==p){if(!O)return u();U?u(!1,U):l=setTimeout(()=>{u(!1,1e-7)},1e3)}U===1&&!Sw(h,e.getBoundingClientRect())&&u(),O=!1}try{a=new IntersectionObserver(I,{...j,root:o.ownerDocument})}catch{a=new IntersectionObserver(I,j)}a.observe(e)}return u(!0),s}function oR(e,n,a,l){l===void 0&&(l={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=l,h=Mm(e),y=o||s?[...h?fs(h):[],...n?fs(n):[]]:[];y.forEach(A=>{o&&A.addEventListener("scroll",a,{passive:!0}),s&&A.addEventListener("resize",a)});const g=h&&f?iR(h,a):null;let w=-1,b=null;u&&(b=new ResizeObserver(A=>{let[N]=A;N&&N.target===h&&b&&n&&(b.unobserve(n),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var j;(j=b)==null||j.observe(n)})),a()}),h&&!p&&b.observe(h),n&&b.observe(n));let k,S=p?Sl(e):null;p&&E();function E(){const A=Sl(e);S&&!Sw(S,A)&&a(),S=A,k=requestAnimationFrame(E)}return a(),()=>{var A;y.forEach(N=>{o&&N.removeEventListener("scroll",a),s&&N.removeEventListener("resize",a)}),g==null||g(),(A=b)==null||A.disconnect(),b=null,p&&cancelAnimationFrame(k)}}const sR=B_,cR=P_,uR=z_,dR=U_,fR=L_,Kv=D_,pR=F_,hR=(e,n,a)=>{const l=new Map,o={platform:lR,...a},s={...o.platform,_c:l};return O_(e,n,{...o,platform:s})};var mR=typeof document<"u",gR=function(){},Cu=mR?v.useLayoutEffect:gR;function zu(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,l,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==n.length)return!1;for(l=a;l--!==0;)if(!zu(e[l],n[l]))return!1;return!0}if(o=Object.keys(e),a=o.length,a!==Object.keys(n).length)return!1;for(l=a;l--!==0;)if(!{}.hasOwnProperty.call(n,o[l]))return!1;for(l=a;l--!==0;){const s=o[l];if(!(s==="_owner"&&e.$$typeof)&&!zu(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function kw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qv(e,n){const a=kw(e);return Math.round(n*a)/a}function ih(e){const n=v.useRef(e);return Cu(()=>{n.current=e}),n}function yR(e){e===void 0&&(e={});const{placement:n="bottom",strategy:a="absolute",middleware:l=[],platform:o,elements:{reference:s,floating:u}={},transform:f=!0,whileElementsMounted:p,open:h}=e,[y,g]=v.useState({x:0,y:0,strategy:a,placement:n,middlewareData:{},isPositioned:!1}),[w,b]=v.useState(l);zu(w,l)||b(l);const[k,S]=v.useState(null),[E,A]=v.useState(null),N=v.useCallback(ee=>{ee!==M.current&&(M.current=ee,S(ee))},[]),j=v.useCallback(ee=>{ee!==U.current&&(U.current=ee,A(ee))},[]),O=s||k,I=u||E,M=v.useRef(null),U=v.useRef(null),H=v.useRef(y),q=p!=null,B=ih(p),Y=ih(o),G=ih(h),he=v.useCallback(()=>{if(!M.current||!U.current)return;const ee={placement:n,strategy:a,middleware:w};Y.current&&(ee.platform=Y.current),hR(M.current,U.current,ee).then(le=>{const T={...le,isPositioned:G.current!==!1};Z.current&&!zu(H.current,T)&&(H.current=T,Cs.flushSync(()=>{g(T)}))})},[w,n,a,Y,G]);Cu(()=>{h===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,g(ee=>({...ee,isPositioned:!1})))},[h]);const Z=v.useRef(!1);Cu(()=>(Z.current=!0,()=>{Z.current=!1}),[]),Cu(()=>{if(O&&(M.current=O),I&&(U.current=I),O&&I){if(B.current)return B.current(O,I,he);he()}},[O,I,he,B,q]);const W=v.useMemo(()=>({reference:M,floating:U,setReference:N,setFloating:j}),[N,j]),z=v.useMemo(()=>({reference:O,floating:I}),[O,I]),K=v.useMemo(()=>{const ee={position:a,left:0,top:0};if(!z.floating)return ee;const le=Qv(z.floating,y.x),T=Qv(z.floating,y.y);return f?{...ee,transform:"translate("+le+"px, "+T+"px)",...kw(z.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:le,top:T}},[a,f,z.floating,y.x,y.y]);return v.useMemo(()=>({...y,update:he,refs:W,elements:z,floatingStyles:K}),[y,he,W,z,K])}const xR=e=>{function n(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){const{element:l,padding:o}=typeof e=="function"?e(a):e;return l&&n(l)?l.current!=null?Kv({element:l.current,padding:o}).fn(a):{}:l?Kv({element:l,padding:o}).fn(a):{}}}},bR=(e,n)=>{const a=sR(e);return{name:a.name,fn:a.fn,options:[e,n]}},vR=(e,n)=>{const a=cR(e);return{name:a.name,fn:a.fn,options:[e,n]}},wR=(e,n)=>({fn:pR(e).fn,options:[e,n]}),SR=(e,n)=>{const a=uR(e);return{name:a.name,fn:a.fn,options:[e,n]}},kR=(e,n)=>{const a=dR(e);return{name:a.name,fn:a.fn,options:[e,n]}},CR=(e,n)=>{const a=fR(e);return{name:a.name,fn:a.fn,options:[e,n]}},ER=(e,n)=>{const a=xR(e);return{name:a.name,fn:a.fn,options:[e,n]}};var AR="Arrow",Cw=v.forwardRef((e,n)=>{const{children:a,width:l=10,height:o=5,...s}=e;return d.jsx(Ae.svg,{...s,ref:n,width:l,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?a:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cw.displayName=AR;var NR=Cw,Om="Popper",[Ew,Ha]=Nn(Om),[jR,Aw]=Ew(Om),Nw=e=>{const{__scopePopper:n,children:a}=e,[l,o]=v.useState(null);return d.jsx(jR,{scope:n,anchor:l,onAnchorChange:o,children:a})};Nw.displayName=Om;var jw="PopperAnchor",Tw=v.forwardRef((e,n)=>{const{__scopePopper:a,virtualRef:l,...o}=e,s=Aw(jw,a),u=v.useRef(null),f=Ve(n,u),p=v.useRef(null);return v.useEffect(()=>{const h=p.current;p.current=(l==null?void 0:l.current)||u.current,h!==p.current&&s.onAnchorChange(p.current)}),l?null:d.jsx(Ae.div,{...o,ref:f})});Tw.displayName=jw;var Dm="PopperContent",[TR,_R]=Ew(Dm),_w=v.forwardRef((e,n)=>{var ae,be,me,_e,De,Be,ot,at;const{__scopePopper:a,side:l="bottom",sideOffset:o=0,align:s="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:w=!1,updatePositionStrategy:b="optimized",onPlaced:k,...S}=e,E=Aw(Dm,a),[A,N]=v.useState(null),j=Ve(n,vt=>N(vt)),[O,I]=v.useState(null),M=w_(O),U=(ae=M==null?void 0:M.width)!=null?ae:0,H=(be=M==null?void 0:M.height)!=null?be:0,q=l+(s!=="center"?"-"+s:""),B=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},Y=Array.isArray(h)?h:[h],G=Y.length>0,he={padding:B,boundary:Y.filter(MR),altBoundary:G},{refs:Z,floatingStyles:W,placement:z,isPositioned:K,middlewareData:ee}=yR({strategy:"fixed",placement:q,whileElementsMounted:(...vt)=>oR(...vt,{animationFrame:b==="always"}),elements:{reference:E.anchor},middleware:[bR({mainAxis:o+H,alignmentAxis:u}),p&&vR({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?wR():void 0,...he}),p&&SR({...he}),kR({...he,apply:({elements:vt,rects:Ft,availableWidth:Zt,availableHeight:aa})=>{const{width:qn,height:ar}=Ft.reference,jn=vt.floating.style;jn.setProperty("--radix-popper-available-width",`${Zt}px`),jn.setProperty("--radix-popper-available-height",`${aa}px`),jn.setProperty("--radix-popper-anchor-width",`${qn}px`),jn.setProperty("--radix-popper-anchor-height",`${ar}px`)}}),O&&ER({element:O,padding:f}),OR({arrowWidth:U,arrowHeight:H}),w&&CR({strategy:"referenceHidden",...he})]}),[le,T]=Ow(z),D=Gt(k);Bt(()=>{K&&(D==null||D())},[K,D]);const L=(me=ee.arrow)==null?void 0:me.x,_=(_e=ee.arrow)==null?void 0:_e.y,te=((De=ee.arrow)==null?void 0:De.centerOffset)!==0,[ne,ie]=v.useState();return Bt(()=>{A&&ie(window.getComputedStyle(A).zIndex)},[A]),d.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:K?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(Be=ee.transformOrigin)==null?void 0:Be.x,(ot=ee.transformOrigin)==null?void 0:ot.y].join(" "),...((at=ee.hide)==null?void 0:at.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(TR,{scope:a,placedSide:le,onArrowChange:I,arrowX:L,arrowY:_,shouldHideArrow:te,children:d.jsx(Ae.div,{"data-side":le,"data-align":T,...S,ref:j,style:{...S.style,animation:K?void 0:"none"}})})})});_w.displayName=Dm;var Rw="PopperArrow",RR={top:"bottom",right:"left",bottom:"top",left:"right"},Mw=v.forwardRef(function(n,a){const{__scopePopper:l,...o}=n,s=_R(Rw,l),u=RR[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(NR,{...o,ref:a,style:{...o.style,display:"block"}})})});Mw.displayName=Rw;function MR(e){return e!==null}var OR=e=>({name:"transformOrigin",options:e,fn(n){var E,A,N,j,O;const{placement:a,rects:l,middlewareData:o}=n,u=((E=o.arrow)==null?void 0:E.centerOffset)!==0,f=u?0:e.arrowWidth,p=u?0:e.arrowHeight,[h,y]=Ow(a),g={start:"0%",center:"50%",end:"100%"}[y],w=((N=(A=o.arrow)==null?void 0:A.x)!=null?N:0)+f/2,b=((O=(j=o.arrow)==null?void 0:j.y)!=null?O:0)+p/2;let k="",S="";return h==="bottom"?(k=u?g:`${w}px`,S=`${-p}px`):h==="top"?(k=u?g:`${w}px`,S=`${l.floating.height+p}px`):h==="right"?(k=`${-p}px`,S=u?g:`${b}px`):h==="left"&&(k=`${l.floating.width+p}px`,S=u?g:`${b}px`),{data:{x:k,y:S}}}});function Ow(e){const[n,a="center"]=e.split("-");return[n,a]}var sd=Nw,_s=Tw,cd=_w,ud=Mw,oh="rovingFocusGroup.onEntryFocus",DR={bubbles:!1,cancelable:!0},Rs="RovingFocusGroup",[Hh,Dw,zR]=gm(Rs),[LR,dd]=Nn(Rs,[zR]),[IR,BR]=LR(Rs),zw=v.forwardRef((e,n)=>d.jsx(Hh.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Hh.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(PR,{...e,ref:n})})}));zw.displayName=Rs;var PR=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:a,orientation:l,loop:o=!1,dir:s,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:y=!1,...g}=e,w=v.useRef(null),b=Ve(n,w),k=As(s),[S,E]=Jr({prop:u,defaultProp:f!=null?f:null,onChange:p,caller:Rs}),[A,N]=v.useState(!1),j=Gt(h),O=Dw(a),I=v.useRef(!1),[M,U]=v.useState(0);return v.useEffect(()=>{const H=w.current;if(H)return H.addEventListener(oh,j),()=>H.removeEventListener(oh,j)},[j]),d.jsx(IR,{scope:a,orientation:l,dir:k,loop:o,currentTabStopId:S,onItemFocus:v.useCallback(H=>E(H),[E]),onItemShiftTab:v.useCallback(()=>N(!0),[]),onFocusableItemAdd:v.useCallback(()=>U(H=>H+1),[]),onFocusableItemRemove:v.useCallback(()=>U(H=>H-1),[]),children:d.jsx(Ae.div,{tabIndex:A||M===0?-1:0,"data-orientation":l,...g,ref:b,style:{outline:"none",...e.style},onMouseDown:ve(e.onMouseDown,()=>{I.current=!0}),onFocus:ve(e.onFocus,H=>{const q=!I.current;if(H.target===H.currentTarget&&q&&!A){const B=new CustomEvent(oh,DR);if(H.currentTarget.dispatchEvent(B),!B.defaultPrevented){const Y=O().filter(z=>z.focusable),G=Y.find(z=>z.active),he=Y.find(z=>z.id===S),W=[G,he,...Y].filter(Boolean).map(z=>z.ref.current);Bw(W,y)}}I.current=!1}),onBlur:ve(e.onBlur,()=>N(!1))})})}),Lw="RovingFocusGroupItem",Iw=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:a,focusable:l=!0,active:o=!1,tabStopId:s,children:u,...f}=e,p=Lt(),h=s||p,y=BR(Lw,a),g=y.currentTabStopId===h,w=Dw(a),{onFocusableItemAdd:b,onFocusableItemRemove:k,currentTabStopId:S}=y;return v.useEffect(()=>{if(l)return b(),()=>k()},[l,b,k]),d.jsx(Hh.ItemSlot,{scope:a,id:h,focusable:l,active:o,children:d.jsx(Ae.span,{tabIndex:g?0:-1,"data-orientation":y.orientation,...f,ref:n,onMouseDown:ve(e.onMouseDown,E=>{l?y.onItemFocus(h):E.preventDefault()}),onFocus:ve(e.onFocus,()=>y.onItemFocus(h)),onKeyDown:ve(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){y.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const A=HR(E,y.orientation,y.dir);if(A!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let j=w().filter(O=>O.focusable).map(O=>O.ref.current);if(A==="last")j.reverse();else if(A==="prev"||A==="next"){A==="prev"&&j.reverse();const O=j.indexOf(E.currentTarget);j=y.loop?$R(j,O+1):j.slice(O+1)}setTimeout(()=>Bw(j))}}),children:typeof u=="function"?u({isCurrentTabStop:g,hasTabStop:S!=null}):u})})});Iw.displayName=Lw;var FR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function UR(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function HR(e,n,a){const l=UR(e.key,a);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(l))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(l)))return FR[l]}function Bw(e,n=!1){const a=document.activeElement;for(const l of e)if(l===a||(l.focus({preventScroll:n}),document.activeElement!==a))return}function $R(e,n){return e.map((a,l)=>e[(n+l)%e.length])}var Pw=zw,Fw=Iw,$h=["Enter"," "],VR=["ArrowDown","PageUp","Home"],Uw=["ArrowUp","PageDown","End"],qR=[...VR,...Uw],GR={ltr:[...$h,"ArrowRight"],rtl:[...$h,"ArrowLeft"]},YR={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ms="Menu",[ps,XR,KR]=gm(Ms),[Nl,Hw]=Nn(Ms,[KR,Ha,dd]),fd=Ha(),$w=dd(),[QR,jl]=Nl(Ms),[ZR,Os]=Nl(Ms),Vw=e=>{const{__scopeMenu:n,open:a=!1,children:l,dir:o,onOpenChange:s,modal:u=!0}=e,f=fd(n),[p,h]=v.useState(null),y=v.useRef(!1),g=Gt(s),w=As(o);return v.useEffect(()=>{const b=()=>{y.current=!0,document.addEventListener("pointerdown",k,{capture:!0,once:!0}),document.addEventListener("pointermove",k,{capture:!0,once:!0})},k=()=>y.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",k,{capture:!0})}},[]),d.jsx(sd,{...f,children:d.jsx(QR,{scope:n,open:a,onOpenChange:g,content:p,onContentChange:h,children:d.jsx(ZR,{scope:n,onClose:v.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:y,dir:w,modal:u,children:l})})})};Vw.displayName=Ms;var WR="MenuAnchor",zm=v.forwardRef((e,n)=>{const{__scopeMenu:a,...l}=e,o=fd(a);return d.jsx(_s,{...o,...l,ref:n})});zm.displayName=WR;var Lm="MenuPortal",[JR,qw]=Nl(Lm,{forceMount:void 0}),Gw=e=>{const{__scopeMenu:n,forceMount:a,children:l,container:o}=e,s=jl(Lm,n);return d.jsx(JR,{scope:n,forceMount:a,children:d.jsx(Pt,{present:a||s.open,children:d.jsx(Yi,{asChild:!0,container:o,children:l})})})};Gw.displayName=Lm;var $n="MenuContent",[eM,Im]=Nl($n),Yw=v.forwardRef((e,n)=>{const a=qw($n,e.__scopeMenu),{forceMount:l=a.forceMount,...o}=e,s=jl($n,e.__scopeMenu),u=Os($n,e.__scopeMenu);return d.jsx(ps.Provider,{scope:e.__scopeMenu,children:d.jsx(Pt,{present:l||s.open,children:d.jsx(ps.Slot,{scope:e.__scopeMenu,children:u.modal?d.jsx(tM,{...o,ref:n}):d.jsx(nM,{...o,ref:n})})})})}),tM=v.forwardRef((e,n)=>{const a=jl($n,e.__scopeMenu),l=v.useRef(null),o=Ve(n,l);return v.useEffect(()=>{const s=l.current;if(s)return td(s)},[]),d.jsx(Bm,{...e,ref:o,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:ve(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),nM=v.forwardRef((e,n)=>{const a=jl($n,e.__scopeMenu);return d.jsx(Bm,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),rM=Ia("MenuContent.ScrollLock"),Bm=v.forwardRef((e,n)=>{const{__scopeMenu:a,loop:l=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:h,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:w,onDismiss:b,disableOutsideScroll:k,...S}=e,E=jl($n,a),A=Os($n,a),N=fd(a),j=$w(a),O=XR(a),[I,M]=v.useState(null),U=v.useRef(null),H=Ve(n,U,E.onContentChange),q=v.useRef(0),B=v.useRef(""),Y=v.useRef(0),G=v.useRef(null),he=v.useRef("right"),Z=v.useRef(0),W=k?js:v.Fragment,z=k?{as:rM,allowPinchZoom:!0}:void 0,K=le=>{var ae,be;const T=B.current+le,D=O().filter(me=>!me.disabled),L=document.activeElement,_=(ae=D.find(me=>me.ref.current===L))==null?void 0:ae.textValue,te=D.map(me=>me.textValue),ne=mM(te,T,_),ie=(be=D.find(me=>me.textValue===ne))==null?void 0:be.ref.current;(function me(_e){B.current=_e,window.clearTimeout(q.current),_e!==""&&(q.current=window.setTimeout(()=>me(""),1e3))})(T),ie&&setTimeout(()=>ie.focus())};v.useEffect(()=>()=>window.clearTimeout(q.current),[]),Ju();const ee=v.useCallback(le=>{var D,L;return he.current===((D=G.current)==null?void 0:D.side)&&yM(le,(L=G.current)==null?void 0:L.area)},[]);return d.jsx(eM,{scope:a,searchRef:B,onItemEnter:v.useCallback(le=>{ee(le)&&le.preventDefault()},[ee]),onItemLeave:v.useCallback(le=>{var T;ee(le)||((T=U.current)==null||T.focus(),M(null))},[ee]),onTriggerLeave:v.useCallback(le=>{ee(le)&&le.preventDefault()},[ee]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:v.useCallback(le=>{G.current=le},[]),children:d.jsx(W,{...z,children:d.jsx(Ns,{asChild:!0,trapped:o,onMountAutoFocus:ve(s,le=>{var T;le.preventDefault(),(T=U.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:d.jsx(Gi,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:w,onDismiss:b,children:d.jsx(Pw,{asChild:!0,...j,dir:A.dir,orientation:"vertical",loop:l,currentTabStopId:I,onCurrentTabStopIdChange:M,onEntryFocus:ve(p,le=>{A.isUsingKeyboardRef.current||le.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(cd,{role:"menu","aria-orientation":"vertical","data-state":cS(E.open),"data-radix-menu-content":"",dir:A.dir,...N,...S,ref:H,style:{outline:"none",...S.style},onKeyDown:ve(S.onKeyDown,le=>{const D=le.target.closest("[data-radix-menu-content]")===le.currentTarget,L=le.ctrlKey||le.altKey||le.metaKey,_=le.key.length===1;D&&(le.key==="Tab"&&le.preventDefault(),!L&&_&&K(le.key));const te=U.current;if(le.target!==te||!qR.includes(le.key))return;le.preventDefault();const ie=O().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);Uw.includes(le.key)&&ie.reverse(),pM(ie)}),onBlur:ve(e.onBlur,le=>{le.currentTarget.contains(le.target)||(window.clearTimeout(q.current),B.current="")}),onPointerMove:ve(e.onPointerMove,hs(le=>{const T=le.target,D=Z.current!==le.clientX;if(le.currentTarget.contains(T)&&D){const L=le.clientX>Z.current?"right":"left";he.current=L,Z.current=le.clientX}}))})})})})})})});Yw.displayName=$n;var aM="MenuGroup",Pm=v.forwardRef((e,n)=>{const{__scopeMenu:a,...l}=e;return d.jsx(Ae.div,{role:"group",...l,ref:n})});Pm.displayName=aM;var lM="MenuLabel",Xw=v.forwardRef((e,n)=>{const{__scopeMenu:a,...l}=e;return d.jsx(Ae.div,{...l,ref:n})});Xw.displayName=lM;var Lu="MenuItem",Zv="menu.itemSelect",pd=v.forwardRef((e,n)=>{const{disabled:a=!1,onSelect:l,...o}=e,s=v.useRef(null),u=Os(Lu,e.__scopeMenu),f=Im(Lu,e.__scopeMenu),p=Ve(n,s),h=v.useRef(!1),y=()=>{const g=s.current;if(!a&&g){const w=new CustomEvent(Zv,{bubbles:!0,cancelable:!0});g.addEventListener(Zv,b=>l==null?void 0:l(b),{once:!0}),R1(g,w),w.defaultPrevented?h.current=!1:u.onClose()}};return d.jsx(Kw,{...o,ref:p,disabled:a,onClick:ve(e.onClick,y),onPointerDown:g=>{var w;(w=e.onPointerDown)==null||w.call(e,g),h.current=!0},onPointerUp:ve(e.onPointerUp,g=>{var w;h.current||(w=g.currentTarget)==null||w.click()}),onKeyDown:ve(e.onKeyDown,g=>{const w=f.searchRef.current!=="";a||w&&g.key===" "||$h.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});pd.displayName=Lu;var Kw=v.forwardRef((e,n)=>{const{__scopeMenu:a,disabled:l=!1,textValue:o,...s}=e,u=Im(Lu,a),f=$w(a),p=v.useRef(null),h=Ve(n,p),[y,g]=v.useState(!1),[w,b]=v.useState("");return v.useEffect(()=>{var S;const k=p.current;k&&b(((S=k.textContent)!=null?S:"").trim())},[s.children]),d.jsx(ps.ItemSlot,{scope:a,disabled:l,textValue:o!=null?o:w,children:d.jsx(Fw,{asChild:!0,...f,focusable:!l,children:d.jsx(Ae.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":l||void 0,"data-disabled":l?"":void 0,...s,ref:h,onPointerMove:ve(e.onPointerMove,hs(k=>{l?u.onItemLeave(k):(u.onItemEnter(k),k.defaultPrevented||k.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ve(e.onPointerLeave,hs(k=>u.onItemLeave(k))),onFocus:ve(e.onFocus,()=>g(!0)),onBlur:ve(e.onBlur,()=>g(!1))})})})}),iM="MenuCheckboxItem",Qw=v.forwardRef((e,n)=>{const{checked:a=!1,onCheckedChange:l,...o}=e;return d.jsx(tS,{scope:e.__scopeMenu,checked:a,children:d.jsx(pd,{role:"menuitemcheckbox","aria-checked":Iu(a)?"mixed":a,...o,ref:n,"data-state":Um(a),onSelect:ve(o.onSelect,()=>l==null?void 0:l(Iu(a)?!0:!a),{checkForDefaultPrevented:!1})})})});Qw.displayName=iM;var Zw="MenuRadioGroup",[oM,sM]=Nl(Zw,{value:void 0,onValueChange:()=>{}}),Ww=v.forwardRef((e,n)=>{const{value:a,onValueChange:l,...o}=e,s=Gt(l);return d.jsx(oM,{scope:e.__scopeMenu,value:a,onValueChange:s,children:d.jsx(Pm,{...o,ref:n})})});Ww.displayName=Zw;var Jw="MenuRadioItem",eS=v.forwardRef((e,n)=>{const{value:a,...l}=e,o=sM(Jw,e.__scopeMenu),s=a===o.value;return d.jsx(tS,{scope:e.__scopeMenu,checked:s,children:d.jsx(pd,{role:"menuitemradio","aria-checked":s,...l,ref:n,"data-state":Um(s),onSelect:ve(l.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,a)},{checkForDefaultPrevented:!1})})})});eS.displayName=Jw;var Fm="MenuItemIndicator",[tS,cM]=Nl(Fm,{checked:!1}),nS=v.forwardRef((e,n)=>{const{__scopeMenu:a,forceMount:l,...o}=e,s=cM(Fm,a);return d.jsx(Pt,{present:l||Iu(s.checked)||s.checked===!0,children:d.jsx(Ae.span,{...o,ref:n,"data-state":Um(s.checked)})})});nS.displayName=Fm;var uM="MenuSeparator",rS=v.forwardRef((e,n)=>{const{__scopeMenu:a,...l}=e;return d.jsx(Ae.div,{role:"separator","aria-orientation":"horizontal",...l,ref:n})});rS.displayName=uM;var dM="MenuArrow",aS=v.forwardRef((e,n)=>{const{__scopeMenu:a,...l}=e,o=fd(a);return d.jsx(ud,{...o,...l,ref:n})});aS.displayName=dM;var fM="MenuSub",[RP,lS]=Nl(fM),ns="MenuSubTrigger",iS=v.forwardRef((e,n)=>{const a=jl(ns,e.__scopeMenu),l=Os(ns,e.__scopeMenu),o=lS(ns,e.__scopeMenu),s=Im(ns,e.__scopeMenu),u=v.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:p}=s,h={__scopeMenu:e.__scopeMenu},y=v.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return v.useEffect(()=>y,[y]),v.useEffect(()=>{const g=f.current;return()=>{window.clearTimeout(g),p(null)}},[f,p]),d.jsx(zm,{asChild:!0,...h,children:d.jsx(Kw,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":o.contentId,"data-state":cS(a.open),...e,ref:Wr(n,o.onTriggerChange),onClick:g=>{var w;(w=e.onClick)==null||w.call(e,g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),a.open||a.onOpenChange(!0))},onPointerMove:ve(e.onPointerMove,hs(g=>{s.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!a.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{a.onOpenChange(!0),y()},100))})),onPointerLeave:ve(e.onPointerLeave,hs(g=>{var b,k;y();const w=(b=a.content)==null?void 0:b.getBoundingClientRect();if(w){const S=(k=a.content)==null?void 0:k.dataset.side,E=S==="right",A=E?-5:5,N=w[E?"left":"right"],j=w[E?"right":"left"];s.onPointerGraceIntentChange({area:[{x:g.clientX+A,y:g.clientY},{x:N,y:w.top},{x:j,y:w.top},{x:j,y:w.bottom},{x:N,y:w.bottom}],side:S}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(g),g.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ve(e.onKeyDown,g=>{var b;const w=s.searchRef.current!=="";e.disabled||w&&g.key===" "||GR[l.dir].includes(g.key)&&(a.onOpenChange(!0),(b=a.content)==null||b.focus(),g.preventDefault())})})})});iS.displayName=ns;var oS="MenuSubContent",sS=v.forwardRef((e,n)=>{const a=qw($n,e.__scopeMenu),{forceMount:l=a.forceMount,...o}=e,s=jl($n,e.__scopeMenu),u=Os($n,e.__scopeMenu),f=lS(oS,e.__scopeMenu),p=v.useRef(null),h=Ve(n,p);return d.jsx(ps.Provider,{scope:e.__scopeMenu,children:d.jsx(Pt,{present:l||s.open,children:d.jsx(ps.Slot,{scope:e.__scopeMenu,children:d.jsx(Bm,{id:f.contentId,"aria-labelledby":f.triggerId,...o,ref:h,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{var g;u.isUsingKeyboardRef.current&&((g=p.current)==null||g.focus()),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:ve(e.onFocusOutside,y=>{y.target!==f.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ve(e.onEscapeKeyDown,y=>{u.onClose(),y.preventDefault()}),onKeyDown:ve(e.onKeyDown,y=>{var b;const g=y.currentTarget.contains(y.target),w=YR[u.dir].includes(y.key);g&&w&&(s.onOpenChange(!1),(b=f.trigger)==null||b.focus(),y.preventDefault())})})})})})});sS.displayName=oS;function cS(e){return e?"open":"closed"}function Iu(e){return e==="indeterminate"}function Um(e){return Iu(e)?"indeterminate":e?"checked":"unchecked"}function pM(e){const n=document.activeElement;for(const a of e)if(a===n||(a.focus(),document.activeElement!==n))return}function hM(e,n){return e.map((a,l)=>e[(n+l)%e.length])}function mM(e,n,a){const o=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=a?e.indexOf(a):-1;let u=hM(e,Math.max(s,0));o.length===1&&(u=u.filter(h=>h!==a));const p=u.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return p!==a?p:void 0}function gM(e,n){const{x:a,y:l}=e;let o=!1;for(let s=0,u=n.length-1;s<n.length;u=s++){const f=n[s],p=n[u],h=f.x,y=f.y,g=p.x,w=p.y;y>l!=w>l&&a<(g-h)*(l-y)/(w-y)+h&&(o=!o)}return o}function yM(e,n){if(!n)return!1;const a={x:e.clientX,y:e.clientY};return gM(a,n)}function hs(e){return n=>n.pointerType==="mouse"?e(n):void 0}var xM=Vw,bM=zm,vM=Gw,wM=Yw,SM=Pm,kM=Xw,CM=pd,EM=Qw,AM=Ww,NM=eS,jM=nS,TM=rS,_M=aS,RM=iS,MM=sS,hd="DropdownMenu",[OM]=Nn(hd,[Hw]),an=Hw(),[DM,uS]=OM(hd),dS=e=>{const{__scopeDropdownMenu:n,children:a,dir:l,open:o,defaultOpen:s,onOpenChange:u,modal:f=!0}=e,p=an(n),h=v.useRef(null),[y,g]=Jr({prop:o,defaultProp:s!=null?s:!1,onChange:u,caller:hd});return d.jsx(DM,{scope:n,triggerId:Lt(),triggerRef:h,contentId:Lt(),open:y,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(w=>!w),[g]),modal:f,children:d.jsx(xM,{...p,open:y,onOpenChange:g,dir:l,modal:f,children:a})})};dS.displayName=hd;var fS="DropdownMenuTrigger",pS=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,disabled:l=!1,...o}=e,s=uS(fS,a),u=an(a);return d.jsx(bM,{asChild:!0,...u,children:d.jsx(Ae.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":l?"":void 0,disabled:l,...o,ref:Wr(n,s.triggerRef),onPointerDown:ve(e.onPointerDown,f=>{!l&&f.button===0&&f.ctrlKey===!1&&(s.onOpenToggle(),s.open||f.preventDefault())}),onKeyDown:ve(e.onKeyDown,f=>{l||(["Enter"," "].includes(f.key)&&s.onOpenToggle(),f.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});pS.displayName=fS;var zM="DropdownMenuPortal",hS=e=>{const{__scopeDropdownMenu:n,...a}=e,l=an(n);return d.jsx(vM,{...l,...a})};hS.displayName=zM;var mS="DropdownMenuContent",gS=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=uS(mS,a),s=an(a),u=v.useRef(!1);return d.jsx(wM,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...l,ref:n,onCloseAutoFocus:ve(e.onCloseAutoFocus,f=>{var p;u.current||(p=o.triggerRef.current)==null||p.focus(),u.current=!1,f.preventDefault()}),onInteractOutside:ve(e.onInteractOutside,f=>{const p=f.detail.originalEvent,h=p.button===0&&p.ctrlKey===!0,y=p.button===2||h;(!o.modal||y)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gS.displayName=mS;var LM="DropdownMenuGroup",IM=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(SM,{...o,...l,ref:n})});IM.displayName=LM;var BM="DropdownMenuLabel",PM=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(kM,{...o,...l,ref:n})});PM.displayName=BM;var FM="DropdownMenuItem",yS=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(CM,{...o,...l,ref:n})});yS.displayName=FM;var UM="DropdownMenuCheckboxItem",HM=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(EM,{...o,...l,ref:n})});HM.displayName=UM;var $M="DropdownMenuRadioGroup",VM=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(AM,{...o,...l,ref:n})});VM.displayName=$M;var qM="DropdownMenuRadioItem",GM=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(NM,{...o,...l,ref:n})});GM.displayName=qM;var YM="DropdownMenuItemIndicator",XM=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(jM,{...o,...l,ref:n})});XM.displayName=YM;var KM="DropdownMenuSeparator",QM=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(TM,{...o,...l,ref:n})});QM.displayName=KM;var ZM="DropdownMenuArrow",WM=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(_M,{...o,...l,ref:n})});WM.displayName=ZM;var JM="DropdownMenuSubTrigger",eO=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(RM,{...o,...l,ref:n})});eO.displayName=JM;var tO="DropdownMenuSubContent",nO=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:a,...l}=e,o=an(a);return d.jsx(MM,{...o,...l,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nO.displayName=tO;var rO=dS,aO=pS,lO=hS,iO=gS,oO=yS,sO="Label",xS=v.forwardRef((e,n)=>d.jsx(Ae.label,{...e,ref:n,onMouseDown:a=>{var o;a.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));xS.displayName=sO;var cO=xS;function Vh(e,[n,a]){return Math.min(a,Math.max(n,e))}var md="Popover",[bS]=Nn(md,[Ha]),Ds=Ha(),[uO,$a]=bS(md),vS=e=>{const{__scopePopover:n,children:a,open:l,defaultOpen:o,onOpenChange:s,modal:u=!1}=e,f=Ds(n),p=v.useRef(null),[h,y]=v.useState(!1),[g,w]=Jr({prop:l,defaultProp:o!=null?o:!1,onChange:s,caller:md});return d.jsx(sd,{...f,children:d.jsx(uO,{scope:n,contentId:Lt(),triggerRef:p,open:g,onOpenChange:w,onOpenToggle:v.useCallback(()=>w(b=>!b),[w]),hasCustomAnchor:h,onCustomAnchorAdd:v.useCallback(()=>y(!0),[]),onCustomAnchorRemove:v.useCallback(()=>y(!1),[]),modal:u,children:a})})};vS.displayName=md;var wS="PopoverAnchor",SS=v.forwardRef((e,n)=>{const{__scopePopover:a,...l}=e,o=$a(wS,a),s=Ds(a),{onCustomAnchorAdd:u,onCustomAnchorRemove:f}=o;return v.useEffect(()=>(u(),()=>f()),[u,f]),d.jsx(_s,{...s,...l,ref:n})});SS.displayName=wS;var kS="PopoverTrigger",CS=v.forwardRef((e,n)=>{const{__scopePopover:a,...l}=e,o=$a(kS,a),s=Ds(a),u=Ve(n,o.triggerRef),f=d.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":TS(o.open),...l,ref:u,onClick:ve(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?f:d.jsx(_s,{asChild:!0,...s,children:f})});CS.displayName=kS;var Hm="PopoverPortal",[dO,fO]=bS(Hm,{forceMount:void 0}),ES=e=>{const{__scopePopover:n,forceMount:a,children:l,container:o}=e,s=$a(Hm,n);return d.jsx(dO,{scope:n,forceMount:a,children:d.jsx(Pt,{present:a||s.open,children:d.jsx(Yi,{asChild:!0,container:o,children:l})})})};ES.displayName=Hm;var Oi="PopoverContent",AS=v.forwardRef((e,n)=>{const a=fO(Oi,e.__scopePopover),{forceMount:l=a.forceMount,...o}=e,s=$a(Oi,e.__scopePopover);return d.jsx(Pt,{present:l||s.open,children:s.modal?d.jsx(hO,{...o,ref:n}):d.jsx(mO,{...o,ref:n})})});AS.displayName=Oi;var pO=Ia("PopoverContent.RemoveScroll"),hO=v.forwardRef((e,n)=>{const a=$a(Oi,e.__scopePopover),l=v.useRef(null),o=Ve(n,l),s=v.useRef(!1);return v.useEffect(()=>{const u=l.current;if(u)return td(u)},[]),d.jsx(js,{as:pO,allowPinchZoom:!0,children:d.jsx(NS,{...e,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(e.onCloseAutoFocus,u=>{var f;u.preventDefault(),s.current||(f=a.triggerRef.current)==null||f.focus()}),onPointerDownOutside:ve(e.onPointerDownOutside,u=>{const f=u.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,h=f.button===2||p;s.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:ve(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),mO=v.forwardRef((e,n)=>{const a=$a(Oi,e.__scopePopover),l=v.useRef(!1),o=v.useRef(!1);return d.jsx(NS,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var u,f;(u=e.onCloseAutoFocus)==null||u.call(e,s),s.defaultPrevented||(l.current||(f=a.triggerRef.current)==null||f.focus(),s.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:s=>{var p,h;(p=e.onInteractOutside)==null||p.call(e,s),s.defaultPrevented||(l.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=s.target;((h=a.triggerRef.current)==null?void 0:h.contains(u))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),NS=v.forwardRef((e,n)=>{const{__scopePopover:a,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:y,...g}=e,w=$a(Oi,a),b=Ds(a);return Ju(),d.jsx(Ns,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:s,children:d.jsx(Gi,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:y,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onDismiss:()=>w.onOpenChange(!1),children:d.jsx(cd,{"data-state":TS(w.open),role:"dialog",id:w.contentId,...b,...g,ref:n,style:{...g.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)"}})})})}),jS="PopoverClose",gO=v.forwardRef((e,n)=>{const{__scopePopover:a,...l}=e,o=$a(jS,a);return d.jsx(Ae.button,{type:"button",...l,ref:n,onClick:ve(e.onClick,()=>o.onOpenChange(!1))})});gO.displayName=jS;var yO="PopoverArrow",xO=v.forwardRef((e,n)=>{const{__scopePopover:a,...l}=e,o=Ds(a);return d.jsx(ud,{...o,...l,ref:n})});xO.displayName=yO;function TS(e){return e?"open":"closed"}var bO=vS,vO=SS,wO=CS,SO=ES,kO=AS,$m="Progress",Vm=100,[CO]=Nn($m),[EO,AO]=CO($m),_S=v.forwardRef((e,n)=>{const{__scopeProgress:a,value:l=null,max:o,getValueLabel:s=NO,...u}=e;(o||o===0)&&!Wv(o)&&console.error(jO(`${o}`,"Progress"));const f=Wv(o)?o:Vm;l!==null&&!Jv(l,f)&&console.error(TO(`${l}`,"Progress"));const p=Jv(l,f)?l:null,h=Bu(p)?s(p,f):void 0;return d.jsx(EO,{scope:a,value:p,max:f,children:d.jsx(Ae.div,{"aria-valuemax":f,"aria-valuemin":0,"aria-valuenow":Bu(p)?p:void 0,"aria-valuetext":h,role:"progressbar","data-state":OS(p,f),"data-value":p!=null?p:void 0,"data-max":f,...u,ref:n})})});_S.displayName=$m;var RS="ProgressIndicator",MS=v.forwardRef((e,n)=>{var s;const{__scopeProgress:a,...l}=e,o=AO(RS,a);return d.jsx(Ae.div,{"data-state":OS(o.value,o.max),"data-value":(s=o.value)!=null?s:void 0,"data-max":o.max,...l,ref:n})});MS.displayName=RS;function NO(e,n){return`${Math.round(e/n*100)}%`}function OS(e,n){return e==null?"indeterminate":e===n?"complete":"loading"}function Bu(e){return typeof e=="number"}function Wv(e){return Bu(e)&&!isNaN(e)&&e>0}function Jv(e,n){return Bu(e)&&!isNaN(e)&&e<=n&&e>=0}function jO(e,n){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vm}\`.`}function TO(e,n){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${n}\`. The \`value\` prop must be:
|
|
429
|
+
- a positive number
|
|
430
|
+
- less than the value passed to \`max\` (or ${Vm} if no \`max\` prop is set)
|
|
431
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
432
|
+
|
|
433
|
+
Defaulting to \`null\`.`}var _O=_S,RO=MS;function MO(e,n){return v.useReducer((a,l)=>{const o=n[a][l];return o!=null?o:a},e)}var qm="ScrollArea",[DS]=Nn(qm),[OO,Vn]=DS(qm),zS=v.forwardRef((e,n)=>{const{__scopeScrollArea:a,type:l="hover",dir:o,scrollHideDelay:s=600,...u}=e,[f,p]=v.useState(null),[h,y]=v.useState(null),[g,w]=v.useState(null),[b,k]=v.useState(null),[S,E]=v.useState(null),[A,N]=v.useState(0),[j,O]=v.useState(0),[I,M]=v.useState(!1),[U,H]=v.useState(!1),q=Ve(n,Y=>p(Y)),B=As(o);return d.jsx(OO,{scope:a,type:l,dir:B,scrollHideDelay:s,scrollArea:f,viewport:h,onViewportChange:y,content:g,onContentChange:w,scrollbarX:b,onScrollbarXChange:k,scrollbarXEnabled:I,onScrollbarXEnabledChange:M,scrollbarY:S,onScrollbarYChange:E,scrollbarYEnabled:U,onScrollbarYEnabledChange:H,onCornerWidthChange:N,onCornerHeightChange:O,children:d.jsx(Ae.div,{dir:B,...u,ref:q,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":j+"px",...e.style}})})});zS.displayName=qm;var LS="ScrollAreaViewport",IS=v.forwardRef((e,n)=>{const{__scopeScrollArea:a,children:l,nonce:o,...s}=e,u=Vn(LS,a),f=v.useRef(null),p=Ve(n,f,u.onViewportChange);return d.jsxs(d.Fragment,{children:[d.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:o}),d.jsx(Ae.div,{"data-radix-scroll-area-viewport":"",...s,ref:p,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});IS.displayName=LS;var br="ScrollAreaScrollbar",BS=v.forwardRef((e,n)=>{const{forceMount:a,...l}=e,o=Vn(br,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:u}=o,f=e.orientation==="horizontal";return v.useEffect(()=>(f?s(!0):u(!0),()=>{f?s(!1):u(!1)}),[f,s,u]),o.type==="hover"?d.jsx(DO,{...l,ref:n,forceMount:a}):o.type==="scroll"?d.jsx(zO,{...l,ref:n,forceMount:a}):o.type==="auto"?d.jsx(PS,{...l,ref:n,forceMount:a}):o.type==="always"?d.jsx(Gm,{...l,ref:n}):null});BS.displayName=br;var DO=v.forwardRef((e,n)=>{const{forceMount:a,...l}=e,o=Vn(br,e.__scopeScrollArea),[s,u]=v.useState(!1);return v.useEffect(()=>{const f=o.scrollArea;let p=0;if(f){const h=()=>{window.clearTimeout(p),u(!0)},y=()=>{p=window.setTimeout(()=>u(!1),o.scrollHideDelay)};return f.addEventListener("pointerenter",h),f.addEventListener("pointerleave",y),()=>{window.clearTimeout(p),f.removeEventListener("pointerenter",h),f.removeEventListener("pointerleave",y)}}},[o.scrollArea,o.scrollHideDelay]),d.jsx(Pt,{present:a||s,children:d.jsx(PS,{"data-state":s?"visible":"hidden",...l,ref:n})})}),zO=v.forwardRef((e,n)=>{const{forceMount:a,...l}=e,o=Vn(br,e.__scopeScrollArea),s=e.orientation==="horizontal",u=yd(()=>p("SCROLL_END"),100),[f,p]=MO("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 v.useEffect(()=>{if(f==="idle"){const h=window.setTimeout(()=>p("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(h)}},[f,o.scrollHideDelay,p]),v.useEffect(()=>{const h=o.viewport,y=s?"scrollLeft":"scrollTop";if(h){let g=h[y];const w=()=>{const b=h[y];g!==b&&(p("SCROLL"),u()),g=b};return h.addEventListener("scroll",w),()=>h.removeEventListener("scroll",w)}},[o.viewport,s,p,u]),d.jsx(Pt,{present:a||f!=="hidden",children:d.jsx(Gm,{"data-state":f==="hidden"?"hidden":"visible",...l,ref:n,onPointerEnter:ve(e.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:ve(e.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),PS=v.forwardRef((e,n)=>{const a=Vn(br,e.__scopeScrollArea),{forceMount:l,...o}=e,[s,u]=v.useState(!1),f=e.orientation==="horizontal",p=yd(()=>{if(a.viewport){const h=a.viewport.offsetWidth<a.viewport.scrollWidth,y=a.viewport.offsetHeight<a.viewport.scrollHeight;u(f?h:y)}},10);return Di(a.viewport,p),Di(a.content,p),d.jsx(Pt,{present:l||s,children:d.jsx(Gm,{"data-state":s?"visible":"hidden",...o,ref:n})})}),Gm=v.forwardRef((e,n)=>{const{orientation:a="vertical",...l}=e,o=Vn(br,e.__scopeScrollArea),s=v.useRef(null),u=v.useRef(0),[f,p]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=VS(f.viewport,f.content),y={...l,sizes:f,onSizesChange:p,hasThumb:h>0&&h<1,onThumbChange:w=>s.current=w,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:w=>u.current=w};function g(w,b){return UO(w,u.current,f,b)}return a==="horizontal"?d.jsx(LO,{...y,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){const w=o.viewport.scrollLeft,b=e0(w,f,o.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:w=>{o.viewport&&(o.viewport.scrollLeft=w)},onDragScroll:w=>{o.viewport&&(o.viewport.scrollLeft=g(w,o.dir))}}):a==="vertical"?d.jsx(IO,{...y,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){const w=o.viewport.scrollTop,b=e0(w,f);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:w=>{o.viewport&&(o.viewport.scrollTop=w)},onDragScroll:w=>{o.viewport&&(o.viewport.scrollTop=g(w))}}):null}),LO=v.forwardRef((e,n)=>{const{sizes:a,onSizesChange:l,...o}=e,s=Vn(br,e.__scopeScrollArea),[u,f]=v.useState(),p=v.useRef(null),h=Ve(n,p,s.onScrollbarXChange);return v.useEffect(()=>{p.current&&f(getComputedStyle(p.current))},[p]),d.jsx(US,{"data-orientation":"horizontal",...o,ref:h,sizes:a,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":gd(a)+"px",...e.style},onThumbPointerDown:y=>e.onThumbPointerDown(y.x),onDragScroll:y=>e.onDragScroll(y.x),onWheelScroll:(y,g)=>{if(s.viewport){const w=s.viewport.scrollLeft+y.deltaX;e.onWheelScroll(w),GS(w,g)&&y.preventDefault()}},onResize:()=>{p.current&&s.viewport&&u&&l({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:Fu(u.paddingLeft),paddingEnd:Fu(u.paddingRight)}})}})}),IO=v.forwardRef((e,n)=>{const{sizes:a,onSizesChange:l,...o}=e,s=Vn(br,e.__scopeScrollArea),[u,f]=v.useState(),p=v.useRef(null),h=Ve(n,p,s.onScrollbarYChange);return v.useEffect(()=>{p.current&&f(getComputedStyle(p.current))},[p]),d.jsx(US,{"data-orientation":"vertical",...o,ref:h,sizes:a,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":gd(a)+"px",...e.style},onThumbPointerDown:y=>e.onThumbPointerDown(y.y),onDragScroll:y=>e.onDragScroll(y.y),onWheelScroll:(y,g)=>{if(s.viewport){const w=s.viewport.scrollTop+y.deltaY;e.onWheelScroll(w),GS(w,g)&&y.preventDefault()}},onResize:()=>{p.current&&s.viewport&&u&&l({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:Fu(u.paddingTop),paddingEnd:Fu(u.paddingBottom)}})}})}),[BO,FS]=DS(br),US=v.forwardRef((e,n)=>{const{__scopeScrollArea:a,sizes:l,hasThumb:o,onThumbChange:s,onThumbPointerUp:u,onThumbPointerDown:f,onThumbPositionChange:p,onDragScroll:h,onWheelScroll:y,onResize:g,...w}=e,b=Vn(br,a),[k,S]=v.useState(null),E=Ve(n,q=>S(q)),A=v.useRef(null),N=v.useRef(""),j=b.viewport,O=l.content-l.viewport,I=Gt(y),M=Gt(p),U=yd(g,10);function H(q){if(A.current){const B=q.clientX-A.current.left,Y=q.clientY-A.current.top;h({x:B,y:Y})}}return v.useEffect(()=>{const q=B=>{const Y=B.target;(k==null?void 0:k.contains(Y))&&I(B,O)};return document.addEventListener("wheel",q,{passive:!1}),()=>document.removeEventListener("wheel",q,{passive:!1})},[j,k,O,I]),v.useEffect(M,[l,M]),Di(k,U),Di(b.content,U),d.jsx(BO,{scope:a,scrollbar:k,hasThumb:o,onThumbChange:Gt(s),onThumbPointerUp:Gt(u),onThumbPositionChange:M,onThumbPointerDown:Gt(f),children:d.jsx(Ae.div,{...w,ref:E,style:{position:"absolute",...w.style},onPointerDown:ve(e.onPointerDown,q=>{q.button===0&&(q.target.setPointerCapture(q.pointerId),A.current=k.getBoundingClientRect(),N.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),H(q))}),onPointerMove:ve(e.onPointerMove,H),onPointerUp:ve(e.onPointerUp,q=>{const B=q.target;B.hasPointerCapture(q.pointerId)&&B.releasePointerCapture(q.pointerId),document.body.style.webkitUserSelect=N.current,b.viewport&&(b.viewport.style.scrollBehavior=""),A.current=null})})})}),Pu="ScrollAreaThumb",HS=v.forwardRef((e,n)=>{const{forceMount:a,...l}=e,o=FS(Pu,e.__scopeScrollArea);return d.jsx(Pt,{present:a||o.hasThumb,children:d.jsx(PO,{ref:n,...l})})}),PO=v.forwardRef((e,n)=>{const{__scopeScrollArea:a,style:l,...o}=e,s=Vn(Pu,a),u=FS(Pu,a),{onThumbPositionChange:f}=u,p=Ve(n,g=>u.onThumbChange(g)),h=v.useRef(void 0),y=yd(()=>{h.current&&(h.current(),h.current=void 0)},100);return v.useEffect(()=>{const g=s.viewport;if(g){const w=()=>{if(y(),!h.current){const b=HO(g,f);h.current=b,f()}};return f(),g.addEventListener("scroll",w),()=>g.removeEventListener("scroll",w)}},[s.viewport,y,f]),d.jsx(Ae.div,{"data-state":u.hasThumb?"visible":"hidden",...o,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:ve(e.onPointerDownCapture,g=>{const b=g.target.getBoundingClientRect(),k=g.clientX-b.left,S=g.clientY-b.top;u.onThumbPointerDown({x:k,y:S})}),onPointerUp:ve(e.onPointerUp,u.onThumbPointerUp)})});HS.displayName=Pu;var Ym="ScrollAreaCorner",$S=v.forwardRef((e,n)=>{const a=Vn(Ym,e.__scopeScrollArea),l=!!(a.scrollbarX&&a.scrollbarY);return a.type!=="scroll"&&l?d.jsx(FO,{...e,ref:n}):null});$S.displayName=Ym;var FO=v.forwardRef((e,n)=>{const{__scopeScrollArea:a,...l}=e,o=Vn(Ym,a),[s,u]=v.useState(0),[f,p]=v.useState(0),h=!!(s&&f);return Di(o.scrollbarX,()=>{var g;const y=((g=o.scrollbarX)==null?void 0:g.offsetHeight)||0;o.onCornerHeightChange(y),p(y)}),Di(o.scrollbarY,()=>{var g;const y=((g=o.scrollbarY)==null?void 0:g.offsetWidth)||0;o.onCornerWidthChange(y),u(y)}),h?d.jsx(Ae.div,{...l,ref:n,style:{width:s,height:f,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Fu(e){return e?parseInt(e,10):0}function VS(e,n){const a=e/n;return isNaN(a)?0:a}function gd(e){const n=VS(e.viewport,e.content),a=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=(e.scrollbar.size-a)*n;return Math.max(l,18)}function UO(e,n,a,l="ltr"){const o=gd(a),s=o/2,u=n||s,f=o-u,p=a.scrollbar.paddingStart+u,h=a.scrollbar.size-a.scrollbar.paddingEnd-f,y=a.content-a.viewport,g=l==="ltr"?[0,y]:[y*-1,0];return qS([p,h],g)(e)}function e0(e,n,a="ltr"){const l=gd(n),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,s=n.scrollbar.size-o,u=n.content-n.viewport,f=s-l,p=a==="ltr"?[0,u]:[u*-1,0],h=Vh(e,p);return qS([0,u],[0,f])(h)}function qS(e,n){return a=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const l=(n[1]-n[0])/(e[1]-e[0]);return n[0]+l*(a-e[0])}}function GS(e,n){return e>0&&e<n}var HO=(e,n=()=>{})=>{let a={left:e.scrollLeft,top:e.scrollTop},l=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},u=a.left!==s.left,f=a.top!==s.top;(u||f)&&n(),a=s,l=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(l)};function yd(e,n){const a=Gt(e),l=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(l.current),[]),v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(a,n)},[a,n])}function Di(e,n){const a=Gt(n);Bt(()=>{let l=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(a)});return o.observe(e),()=>{window.cancelAnimationFrame(l),o.unobserve(e)}}},[e,a])}var $O=zS,VO=IS,qO=$S,GO=[" ","Enter","ArrowUp","ArrowDown"],YO=[" ","Enter"],kl="Select",[xd,bd,XO]=gm(kl),[Qi]=Nn(kl,[XO,Ha]),vd=Ha(),[KO,Va]=Qi(kl),[QO,ZO]=Qi(kl),YS=e=>{const{__scopeSelect:n,children:a,open:l,defaultOpen:o,onOpenChange:s,value:u,defaultValue:f,onValueChange:p,dir:h,name:y,autoComplete:g,disabled:w,required:b,form:k}=e,S=vd(n),[E,A]=v.useState(null),[N,j]=v.useState(null),[O,I]=v.useState(!1),M=As(h),[U,H]=Jr({prop:l,defaultProp:o!=null?o:!1,onChange:s,caller:kl}),[q,B]=Jr({prop:u,defaultProp:f,onChange:p,caller:kl}),Y=v.useRef(null),G=E?k||!!E.closest("form"):!0,[he,Z]=v.useState(new Set),W=Array.from(he).map(z=>z.props.value).join(";");return d.jsx(sd,{...S,children:d.jsxs(KO,{required:b,scope:n,trigger:E,onTriggerChange:A,valueNode:N,onValueNodeChange:j,valueNodeHasChildren:O,onValueNodeHasChildrenChange:I,contentId:Lt(),value:q,onValueChange:B,open:U,onOpenChange:H,dir:M,triggerPointerDownPosRef:Y,disabled:w,children:[d.jsx(xd.Provider,{scope:n,children:d.jsx(QO,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(z=>{Z(K=>new Set(K).add(z))},[]),onNativeOptionRemove:v.useCallback(z=>{Z(K=>{const ee=new Set(K);return ee.delete(z),ee})},[]),children:a})}),G?d.jsxs(yk,{"aria-hidden":!0,required:b,tabIndex:-1,name:y,autoComplete:g,value:q,onChange:z=>B(z.target.value),disabled:w,form:k,children:[q===void 0?d.jsx("option",{value:""}):null,Array.from(he)]},W):null]})})};YS.displayName=kl;var XS="SelectTrigger",KS=v.forwardRef((e,n)=>{const{__scopeSelect:a,disabled:l=!1,...o}=e,s=vd(a),u=Va(XS,a),f=u.disabled||l,p=Ve(n,u.onTriggerChange),h=bd(a),y=v.useRef("touch"),[g,w,b]=bk(S=>{const E=h().filter(j=>!j.disabled),A=E.find(j=>j.value===u.value),N=vk(E,S,A);N!==void 0&&u.onValueChange(N.value)}),k=S=>{f||(u.onOpenChange(!0),b()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return d.jsx(_s,{asChild:!0,...s,children:d.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":xk(u.value)?"":void 0,...o,ref:p,onClick:ve(o.onClick,S=>{S.currentTarget.focus(),y.current!=="mouse"&&k(S)}),onPointerDown:ve(o.onPointerDown,S=>{y.current=S.pointerType;const E=S.target;E.hasPointerCapture(S.pointerId)&&E.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(k(S),S.preventDefault())}),onKeyDown:ve(o.onKeyDown,S=>{const E=g.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&w(S.key),!(E&&S.key===" ")&&GO.includes(S.key)&&(k(),S.preventDefault())})})})});KS.displayName=XS;var QS="SelectValue",ZS=v.forwardRef((e,n)=>{const{__scopeSelect:a,className:l,style:o,children:s,placeholder:u="",...f}=e,p=Va(QS,a),{onValueNodeHasChildrenChange:h}=p,y=s!==void 0,g=Ve(n,p.onValueNodeChange);return Bt(()=>{h(y)},[h,y]),d.jsx(Ae.span,{...f,ref:g,style:{pointerEvents:"none"},children:xk(p.value)?d.jsx(d.Fragment,{children:u}):s})});ZS.displayName=QS;var WO="SelectIcon",WS=v.forwardRef((e,n)=>{const{__scopeSelect:a,children:l,...o}=e;return d.jsx(Ae.span,{"aria-hidden":!0,...o,ref:n,children:l||"▼"})});WS.displayName=WO;var JO="SelectPortal",JS=e=>d.jsx(Yi,{asChild:!0,...e});JS.displayName=JO;var Cl="SelectContent",ek=v.forwardRef((e,n)=>{const a=Va(Cl,e.__scopeSelect),[l,o]=v.useState();if(Bt(()=>{o(new DocumentFragment)},[]),!a.open){const s=l;return s?Cs.createPortal(d.jsx(tk,{scope:e.__scopeSelect,children:d.jsx(xd.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),s):null}return d.jsx(nk,{...e,ref:n})});ek.displayName=Cl;var Jn=10,[tk,qa]=Qi(Cl),eD="SelectContentImpl",tD=Ia("SelectContent.RemoveScroll"),nk=v.forwardRef((e,n)=>{const{__scopeSelect:a,position:l="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:u,side:f,sideOffset:p,align:h,alignOffset:y,arrowPadding:g,collisionBoundary:w,collisionPadding:b,sticky:k,hideWhenDetached:S,avoidCollisions:E,...A}=e,N=Va(Cl,a),[j,O]=v.useState(null),[I,M]=v.useState(null),U=Ve(n,ae=>O(ae)),[H,q]=v.useState(null),[B,Y]=v.useState(null),G=bd(a),[he,Z]=v.useState(!1),W=v.useRef(!1);v.useEffect(()=>{if(j)return td(j)},[j]),Ju();const z=v.useCallback(ae=>{const[be,...me]=G().map(Be=>Be.ref.current),[_e]=me.slice(-1),De=document.activeElement;for(const Be of ae)if(Be===De||(Be==null||Be.scrollIntoView({block:"nearest"}),Be===be&&I&&(I.scrollTop=0),Be===_e&&I&&(I.scrollTop=I.scrollHeight),Be==null||Be.focus(),document.activeElement!==De))return},[G,I]),K=v.useCallback(()=>z([H,j]),[z,H,j]);v.useEffect(()=>{he&&K()},[he,K]);const{onOpenChange:ee,triggerPointerDownPosRef:le}=N;v.useEffect(()=>{if(j){let ae={x:0,y:0};const be=_e=>{var De,Be,ot,at;ae={x:Math.abs(Math.round(_e.pageX)-((Be=(De=le.current)==null?void 0:De.x)!=null?Be:0)),y:Math.abs(Math.round(_e.pageY)-((at=(ot=le.current)==null?void 0:ot.y)!=null?at:0))}},me=_e=>{ae.x<=10&&ae.y<=10?_e.preventDefault():j.contains(_e.target)||ee(!1),document.removeEventListener("pointermove",be),le.current=null};return le.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",me,{capture:!0})}}},[j,ee,le]),v.useEffect(()=>{const ae=()=>ee(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[ee]);const[T,D]=bk(ae=>{const be=G().filter(De=>!De.disabled),me=be.find(De=>De.ref.current===document.activeElement),_e=vk(be,ae,me);_e&&setTimeout(()=>_e.ref.current.focus())}),L=v.useCallback((ae,be,me)=>{const _e=!W.current&&!me;(N.value!==void 0&&N.value===be||_e)&&(q(ae),_e&&(W.current=!0))},[N.value]),_=v.useCallback(()=>j==null?void 0:j.focus(),[j]),te=v.useCallback((ae,be,me)=>{const _e=!W.current&&!me;(N.value!==void 0&&N.value===be||_e)&&Y(ae)},[N.value]),ne=l==="popper"?qh:rk,ie=ne===qh?{side:f,sideOffset:p,align:h,alignOffset:y,arrowPadding:g,collisionBoundary:w,collisionPadding:b,sticky:k,hideWhenDetached:S,avoidCollisions:E}:{};return d.jsx(tk,{scope:a,content:j,viewport:I,onViewportChange:M,itemRefCallback:L,selectedItem:H,onItemLeave:_,itemTextRefCallback:te,focusSelectedItem:K,selectedItemText:B,position:l,isPositioned:he,searchRef:T,children:d.jsx(js,{as:tD,allowPinchZoom:!0,children:d.jsx(Ns,{asChild:!0,trapped:N.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:ve(o,ae=>{var be;(be=N.trigger)==null||be.focus({preventScroll:!0}),ae.preventDefault()}),children:d.jsx(Gi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:d.jsx(ne,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:ae=>ae.preventDefault(),...A,...ie,onPlaced:()=>Z(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:ve(A.onKeyDown,ae=>{const be=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!be&&ae.key.length===1&&D(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let _e=G().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const De=ae.target,Be=_e.indexOf(De);_e=_e.slice(Be+1)}setTimeout(()=>z(_e)),ae.preventDefault()}})})})})})})});nk.displayName=eD;var nD="SelectItemAlignedPosition",rk=v.forwardRef((e,n)=>{const{__scopeSelect:a,onPlaced:l,...o}=e,s=Va(Cl,a),u=qa(Cl,a),[f,p]=v.useState(null),[h,y]=v.useState(null),g=Ve(n,U=>y(U)),w=bd(a),b=v.useRef(!1),k=v.useRef(!0),{viewport:S,selectedItem:E,selectedItemText:A,focusSelectedItem:N}=u,j=v.useCallback(()=>{if(s.trigger&&s.valueNode&&f&&h&&S&&E&&A){const U=s.trigger.getBoundingClientRect(),H=h.getBoundingClientRect(),q=s.valueNode.getBoundingClientRect(),B=A.getBoundingClientRect();if(s.dir!=="rtl"){const De=B.left-H.left,Be=q.left-De,ot=U.left-Be,at=U.width+ot,vt=Math.max(at,H.width),Ft=window.innerWidth-Jn,Zt=Vh(Be,[Jn,Math.max(Jn,Ft-vt)]);f.style.minWidth=at+"px",f.style.left=Zt+"px"}else{const De=H.right-B.right,Be=window.innerWidth-q.right-De,ot=window.innerWidth-U.right-Be,at=U.width+ot,vt=Math.max(at,H.width),Ft=window.innerWidth-Jn,Zt=Vh(Be,[Jn,Math.max(Jn,Ft-vt)]);f.style.minWidth=at+"px",f.style.right=Zt+"px"}const Y=w(),G=window.innerHeight-Jn*2,he=S.scrollHeight,Z=window.getComputedStyle(h),W=parseInt(Z.borderTopWidth,10),z=parseInt(Z.paddingTop,10),K=parseInt(Z.borderBottomWidth,10),ee=parseInt(Z.paddingBottom,10),le=W+z+he+ee+K,T=Math.min(E.offsetHeight*5,le),D=window.getComputedStyle(S),L=parseInt(D.paddingTop,10),_=parseInt(D.paddingBottom,10),te=U.top+U.height/2-Jn,ne=G-te,ie=E.offsetHeight/2,ae=E.offsetTop+ie,be=W+z+ae,me=le-be;if(be<=te){const De=Y.length>0&&E===Y[Y.length-1].ref.current;f.style.bottom="0px";const Be=h.clientHeight-S.offsetTop-S.offsetHeight,ot=Math.max(ne,ie+(De?_:0)+Be+K),at=be+ot;f.style.height=at+"px"}else{const De=Y.length>0&&E===Y[0].ref.current;f.style.top="0px";const ot=Math.max(te,W+S.offsetTop+(De?L:0)+ie)+me;f.style.height=ot+"px",S.scrollTop=be-te+S.offsetTop}f.style.margin=`${Jn}px 0`,f.style.minHeight=T+"px",f.style.maxHeight=G+"px",l==null||l(),requestAnimationFrame(()=>b.current=!0)}},[w,s.trigger,s.valueNode,f,h,S,E,A,s.dir,l]);Bt(()=>j(),[j]);const[O,I]=v.useState();Bt(()=>{h&&I(window.getComputedStyle(h).zIndex)},[h]);const M=v.useCallback(U=>{U&&k.current===!0&&(j(),N==null||N(),k.current=!1)},[j,N]);return d.jsx(aD,{scope:a,contentWrapper:f,shouldExpandOnScrollRef:b,onScrollButtonChange:M,children:d.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:d.jsx(Ae.div,{...o,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});rk.displayName=nD;var rD="SelectPopperPosition",qh=v.forwardRef((e,n)=>{const{__scopeSelect:a,align:l="start",collisionPadding:o=Jn,...s}=e,u=vd(a);return d.jsx(cd,{...u,...s,ref:n,align:l,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});qh.displayName=rD;var[aD,Xm]=Qi(Cl,{}),Gh="SelectViewport",ak=v.forwardRef((e,n)=>{const{__scopeSelect:a,nonce:l,...o}=e,s=qa(Gh,a),u=Xm(Gh,a),f=Ve(n,s.onViewportChange),p=v.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:l}),d.jsx(xd.Slot,{scope:a,children:d.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ve(o.onScroll,h=>{const y=h.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=u;if(w!=null&&w.current&&g){const b=Math.abs(p.current-y.scrollTop);if(b>0){const k=window.innerHeight-Jn*2,S=parseFloat(g.style.minHeight),E=parseFloat(g.style.height),A=Math.max(S,E);if(A<k){const N=A+b,j=Math.min(k,N),O=N-j;g.style.height=j+"px",g.style.bottom==="0px"&&(y.scrollTop=O>0?O:0,g.style.justifyContent="flex-end")}}}p.current=y.scrollTop})})})]})});ak.displayName=Gh;var lk="SelectGroup",[lD,iD]=Qi(lk),ik=v.forwardRef((e,n)=>{const{__scopeSelect:a,...l}=e,o=Lt();return d.jsx(lD,{scope:a,id:o,children:d.jsx(Ae.div,{role:"group","aria-labelledby":o,...l,ref:n})})});ik.displayName=lk;var ok="SelectLabel",sk=v.forwardRef((e,n)=>{const{__scopeSelect:a,...l}=e,o=iD(ok,a);return d.jsx(Ae.div,{id:o.id,...l,ref:n})});sk.displayName=ok;var Uu="SelectItem",[oD,ck]=Qi(Uu),uk=v.forwardRef((e,n)=>{const{__scopeSelect:a,value:l,disabled:o=!1,textValue:s,...u}=e,f=Va(Uu,a),p=qa(Uu,a),h=f.value===l,[y,g]=v.useState(s!=null?s:""),[w,b]=v.useState(!1),k=Ve(n,N=>{var j;return(j=p.itemRefCallback)==null?void 0:j.call(p,N,l,o)}),S=Lt(),E=v.useRef("touch"),A=()=>{o||(f.onValueChange(l),f.onOpenChange(!1))};if(l==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(oD,{scope:a,value:l,disabled:o,textId:S,isSelected:h,onItemTextChange:v.useCallback(N=>{g(j=>{var O;return j||((O=N==null?void 0:N.textContent)!=null?O:"").trim()})},[]),children:d.jsx(xd.ItemSlot,{scope:a,value:l,disabled:o,textValue:y,children:d.jsx(Ae.div,{role:"option","aria-labelledby":S,"data-highlighted":w?"":void 0,"aria-selected":h&&w,"data-state":h?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:k,onFocus:ve(u.onFocus,()=>b(!0)),onBlur:ve(u.onBlur,()=>b(!1)),onClick:ve(u.onClick,()=>{E.current!=="mouse"&&A()}),onPointerUp:ve(u.onPointerUp,()=>{E.current==="mouse"&&A()}),onPointerDown:ve(u.onPointerDown,N=>{E.current=N.pointerType}),onPointerMove:ve(u.onPointerMove,N=>{var j;E.current=N.pointerType,o?(j=p.onItemLeave)==null||j.call(p):E.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ve(u.onPointerLeave,N=>{var j;N.currentTarget===document.activeElement&&((j=p.onItemLeave)==null||j.call(p))}),onKeyDown:ve(u.onKeyDown,N=>{var O;((O=p.searchRef)==null?void 0:O.current)!==""&&N.key===" "||(YO.includes(N.key)&&A(),N.key===" "&&N.preventDefault())})})})})});uk.displayName=Uu;var rs="SelectItemText",dk=v.forwardRef((e,n)=>{const{__scopeSelect:a,className:l,style:o,...s}=e,u=Va(rs,a),f=qa(rs,a),p=ck(rs,a),h=ZO(rs,a),[y,g]=v.useState(null),w=Ve(n,A=>g(A),p.onItemTextChange,A=>{var N;return(N=f.itemTextRefCallback)==null?void 0:N.call(f,A,p.value,p.disabled)}),b=y==null?void 0:y.textContent,k=v.useMemo(()=>d.jsx("option",{value:p.value,disabled:p.disabled,children:b},p.value),[p.disabled,p.value,b]),{onNativeOptionAdd:S,onNativeOptionRemove:E}=h;return Bt(()=>(S(k),()=>E(k)),[S,E,k]),d.jsxs(d.Fragment,{children:[d.jsx(Ae.span,{id:p.textId,...s,ref:w}),p.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Cs.createPortal(s.children,u.valueNode):null]})});dk.displayName=rs;var fk="SelectItemIndicator",pk=v.forwardRef((e,n)=>{const{__scopeSelect:a,...l}=e;return ck(fk,a).isSelected?d.jsx(Ae.span,{"aria-hidden":!0,...l,ref:n}):null});pk.displayName=fk;var Yh="SelectScrollUpButton",hk=v.forwardRef((e,n)=>{const a=qa(Yh,e.__scopeSelect),l=Xm(Yh,e.__scopeSelect),[o,s]=v.useState(!1),u=Ve(n,l.onScrollButtonChange);return Bt(()=>{if(a.viewport&&a.isPositioned){let f=function(){const h=p.scrollTop>0;s(h)};const p=a.viewport;return f(),p.addEventListener("scroll",f),()=>p.removeEventListener("scroll",f)}},[a.viewport,a.isPositioned]),o?d.jsx(gk,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:p}=a;f&&p&&(f.scrollTop=f.scrollTop-p.offsetHeight)}}):null});hk.displayName=Yh;var Xh="SelectScrollDownButton",mk=v.forwardRef((e,n)=>{const a=qa(Xh,e.__scopeSelect),l=Xm(Xh,e.__scopeSelect),[o,s]=v.useState(!1),u=Ve(n,l.onScrollButtonChange);return Bt(()=>{if(a.viewport&&a.isPositioned){let f=function(){const h=p.scrollHeight-p.clientHeight,y=Math.ceil(p.scrollTop)<h;s(y)};const p=a.viewport;return f(),p.addEventListener("scroll",f),()=>p.removeEventListener("scroll",f)}},[a.viewport,a.isPositioned]),o?d.jsx(gk,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:p}=a;f&&p&&(f.scrollTop=f.scrollTop+p.offsetHeight)}}):null});mk.displayName=Xh;var gk=v.forwardRef((e,n)=>{const{__scopeSelect:a,onAutoScroll:l,...o}=e,s=qa("SelectScrollButton",a),u=v.useRef(null),f=bd(a),p=v.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return v.useEffect(()=>()=>p(),[p]),Bt(()=>{var y;const h=f().find(g=>g.ref.current===document.activeElement);(y=h==null?void 0:h.ref.current)==null||y.scrollIntoView({block:"nearest"})},[f]),d.jsx(Ae.div,{"aria-hidden":!0,...o,ref:n,style:{flexShrink:0,...o.style},onPointerDown:ve(o.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(l,50))}),onPointerMove:ve(o.onPointerMove,()=>{var h;(h=s.onItemLeave)==null||h.call(s),u.current===null&&(u.current=window.setInterval(l,50))}),onPointerLeave:ve(o.onPointerLeave,()=>{p()})})}),sD="SelectSeparator",cD=v.forwardRef((e,n)=>{const{__scopeSelect:a,...l}=e;return d.jsx(Ae.div,{"aria-hidden":!0,...l,ref:n})});cD.displayName=sD;var Kh="SelectArrow",uD=v.forwardRef((e,n)=>{const{__scopeSelect:a,...l}=e,o=vd(a),s=Va(Kh,a),u=qa(Kh,a);return s.open&&u.position==="popper"?d.jsx(ud,{...o,...l,ref:n}):null});uD.displayName=Kh;var dD="SelectBubbleInput",yk=v.forwardRef(({__scopeSelect:e,value:n,...a},l)=>{const o=v.useRef(null),s=Ve(l,o),u=v_(n);return v.useEffect(()=>{const f=o.current;if(!f)return;const p=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(p,"value").set;if(u!==n&&y){const g=new Event("change",{bubbles:!0});y.call(f,n),f.dispatchEvent(g)}},[u,n]),d.jsx(Ae.select,{...a,style:{...M1,...a.style},ref:s,defaultValue:n})});yk.displayName=dD;function xk(e){return e===""||e===void 0}function bk(e){const n=Gt(e),a=v.useRef(""),l=v.useRef(0),o=v.useCallback(u=>{const f=a.current+u;n(f),(function p(h){a.current=h,window.clearTimeout(l.current),h!==""&&(l.current=window.setTimeout(()=>p(""),1e3))})(f)},[n]),s=v.useCallback(()=>{a.current="",window.clearTimeout(l.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(l.current),[]),[a,o,s]}function vk(e,n,a){const o=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=a?e.indexOf(a):-1;let u=fD(e,Math.max(s,0));o.length===1&&(u=u.filter(h=>h!==a));const p=u.find(h=>h.textValue.toLowerCase().startsWith(o.toLowerCase()));return p!==a?p:void 0}function fD(e,n){return e.map((a,l)=>e[(n+l)%e.length])}var pD=YS,hD=KS,mD=ZS,gD=WS,yD=JS,xD=ek,bD=ak,vD=ik,wD=sk,SD=uk,kD=dk,CD=pk,ED=hk,AD=mk,ND="Separator",t0="horizontal",jD=["horizontal","vertical"],wk=v.forwardRef((e,n)=>{const{decorative:a,orientation:l=t0,...o}=e,s=TD(l)?l:t0,f=a?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return d.jsx(Ae.div,{"data-orientation":s,...f,...o,ref:n})});wk.displayName=ND;function TD(e){return jD.includes(e)}var _D=wk,wd="Tabs",[RD]=Nn(wd,[dd]),Sk=dd(),[MD,Km]=RD(wd),kk=v.forwardRef((e,n)=>{const{__scopeTabs:a,value:l,onValueChange:o,defaultValue:s,orientation:u="horizontal",dir:f,activationMode:p="automatic",...h}=e,y=As(f),[g,w]=Jr({prop:l,onChange:o,defaultProp:s!=null?s:"",caller:wd});return d.jsx(MD,{scope:a,baseId:Lt(),value:g,onValueChange:w,orientation:u,dir:y,activationMode:p,children:d.jsx(Ae.div,{dir:y,"data-orientation":u,...h,ref:n})})});kk.displayName=wd;var Ck="TabsList",Ek=v.forwardRef((e,n)=>{const{__scopeTabs:a,loop:l=!0,...o}=e,s=Km(Ck,a),u=Sk(a);return d.jsx(Pw,{asChild:!0,...u,orientation:s.orientation,dir:s.dir,loop:l,children:d.jsx(Ae.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:n})})});Ek.displayName=Ck;var Ak="TabsTrigger",Nk=v.forwardRef((e,n)=>{const{__scopeTabs:a,value:l,disabled:o=!1,...s}=e,u=Km(Ak,a),f=Sk(a),p=_k(u.baseId,l),h=Rk(u.baseId,l),y=l===u.value;return d.jsx(Fw,{asChild:!0,...f,focusable:!o,active:y,children:d.jsx(Ae.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":h,"data-state":y?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:p,...s,ref:n,onMouseDown:ve(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?u.onValueChange(l):g.preventDefault()}),onKeyDown:ve(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&u.onValueChange(l)}),onFocus:ve(e.onFocus,()=>{const g=u.activationMode!=="manual";!y&&!o&&g&&u.onValueChange(l)})})})});Nk.displayName=Ak;var jk="TabsContent",Tk=v.forwardRef((e,n)=>{const{__scopeTabs:a,value:l,forceMount:o,children:s,...u}=e,f=Km(jk,a),p=_k(f.baseId,l),h=Rk(f.baseId,l),y=l===f.value,g=v.useRef(y);return v.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),d.jsx(Pt,{present:o||y,children:({present:w})=>d.jsx(Ae.div,{"data-state":y?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":p,hidden:!w,id:h,tabIndex:0,...u,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:w&&s})})});Tk.displayName=jk;function _k(e,n){return`${e}-trigger-${n}`}function Rk(e,n){return`${e}-content-${n}`}var OD=kk,DD=Ek,zD=Nk,LD=Tk,[Sd]=Nn("Tooltip",[Ha]),kd=Ha(),Mk="TooltipProvider",ID=700,Qh="tooltip.open",[BD,Qm]=Sd(Mk),Ok=e=>{const{__scopeTooltip:n,delayDuration:a=ID,skipDelayDuration:l=300,disableHoverableContent:o=!1,children:s}=e,u=v.useRef(!0),f=v.useRef(!1),p=v.useRef(0);return v.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),d.jsx(BD,{scope:n,isOpenDelayedRef:u,delayDuration:a,onOpen:v.useCallback(()=>{window.clearTimeout(p.current),u.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>u.current=!0,l)},[l]),isPointerInTransitRef:f,onPointerInTransitChange:v.useCallback(h=>{f.current=h},[]),disableHoverableContent:o,children:s})};Ok.displayName=Mk;var ms="Tooltip",[PD,zs]=Sd(ms),Dk=e=>{const{__scopeTooltip:n,children:a,open:l,defaultOpen:o,onOpenChange:s,disableHoverableContent:u,delayDuration:f}=e,p=Qm(ms,e.__scopeTooltip),h=kd(n),[y,g]=v.useState(null),w=Lt(),b=v.useRef(0),k=u!=null?u:p.disableHoverableContent,S=f!=null?f:p.delayDuration,E=v.useRef(!1),[A,N]=Jr({prop:l,defaultProp:o!=null?o:!1,onChange:U=>{U?(p.onOpen(),document.dispatchEvent(new CustomEvent(Qh))):p.onClose(),s==null||s(U)},caller:ms}),j=v.useMemo(()=>A?E.current?"delayed-open":"instant-open":"closed",[A]),O=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,E.current=!1,N(!0)},[N]),I=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,N(!1)},[N]),M=v.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{E.current=!0,N(!0),b.current=0},S)},[S,N]);return v.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),d.jsx(sd,{...h,children:d.jsx(PD,{scope:n,contentId:w,open:A,stateAttribute:j,trigger:y,onTriggerChange:g,onTriggerEnter:v.useCallback(()=>{p.isOpenDelayedRef.current?M():O()},[p.isOpenDelayedRef,M,O]),onTriggerLeave:v.useCallback(()=>{k?I():(window.clearTimeout(b.current),b.current=0)},[I,k]),onOpen:O,onClose:I,disableHoverableContent:k,children:a})})};Dk.displayName=ms;var Zh="TooltipTrigger",zk=v.forwardRef((e,n)=>{const{__scopeTooltip:a,...l}=e,o=zs(Zh,a),s=Qm(Zh,a),u=kd(a),f=v.useRef(null),p=Ve(n,f,o.onTriggerChange),h=v.useRef(!1),y=v.useRef(!1),g=v.useCallback(()=>h.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),d.jsx(_s,{asChild:!0,...u,children:d.jsx(Ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...l,ref:p,onPointerMove:ve(e.onPointerMove,w=>{w.pointerType!=="touch"&&!y.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),y.current=!0)}),onPointerLeave:ve(e.onPointerLeave,()=>{o.onTriggerLeave(),y.current=!1}),onPointerDown:ve(e.onPointerDown,()=>{o.open&&o.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ve(e.onFocus,()=>{h.current||o.onOpen()}),onBlur:ve(e.onBlur,o.onClose),onClick:ve(e.onClick,o.onClose)})})});zk.displayName=Zh;var Zm="TooltipPortal",[FD,UD]=Sd(Zm,{forceMount:void 0}),Lk=e=>{const{__scopeTooltip:n,forceMount:a,children:l,container:o}=e,s=zs(Zm,n);return d.jsx(FD,{scope:n,forceMount:a,children:d.jsx(Pt,{present:a||s.open,children:d.jsx(Yi,{asChild:!0,container:o,children:l})})})};Lk.displayName=Zm;var zi="TooltipContent",Ik=v.forwardRef((e,n)=>{const a=UD(zi,e.__scopeTooltip),{forceMount:l=a.forceMount,side:o="top",...s}=e,u=zs(zi,e.__scopeTooltip);return d.jsx(Pt,{present:l||u.open,children:u.disableHoverableContent?d.jsx(Bk,{side:o,...s,ref:n}):d.jsx(HD,{side:o,...s,ref:n})})}),HD=v.forwardRef((e,n)=>{const a=zs(zi,e.__scopeTooltip),l=Qm(zi,e.__scopeTooltip),o=v.useRef(null),s=Ve(n,o),[u,f]=v.useState(null),{trigger:p,onClose:h}=a,y=o.current,{onPointerInTransitChange:g}=l,w=v.useCallback(()=>{f(null),g(!1)},[g]),b=v.useCallback((k,S)=>{const E=k.currentTarget,A={x:k.clientX,y:k.clientY},N=GD(A,E.getBoundingClientRect()),j=YD(A,N),O=XD(S.getBoundingClientRect()),I=QD([...j,...O]);f(I),g(!0)},[g]);return v.useEffect(()=>()=>w(),[w]),v.useEffect(()=>{if(p&&y){const k=E=>b(E,y),S=E=>b(E,p);return p.addEventListener("pointerleave",k),y.addEventListener("pointerleave",S),()=>{p.removeEventListener("pointerleave",k),y.removeEventListener("pointerleave",S)}}},[p,y,b,w]),v.useEffect(()=>{if(u){const k=S=>{const E=S.target,A={x:S.clientX,y:S.clientY},N=(p==null?void 0:p.contains(E))||(y==null?void 0:y.contains(E)),j=!KD(A,u);N?w():j&&(w(),h())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[p,y,u,h,w]),d.jsx(Bk,{...e,ref:s})}),[$D,VD]=Sd(ms,{isInside:!1}),qD=Uj("TooltipContent"),Bk=v.forwardRef((e,n)=>{const{__scopeTooltip:a,children:l,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:u,...f}=e,p=zs(zi,a),h=kd(a),{onClose:y}=p;return v.useEffect(()=>(document.addEventListener(Qh,y),()=>document.removeEventListener(Qh,y)),[y]),v.useEffect(()=>{if(p.trigger){const g=w=>{const b=w.target;b!=null&&b.contains(p.trigger)&&y()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[p.trigger,y]),d.jsx(Gi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:y,children:d.jsxs(cd,{"data-state":p.stateAttribute,...h,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(qD,{children:l}),d.jsx($D,{scope:a,isInside:!0,children:d.jsx(Yj,{id:p.contentId,role:"tooltip",children:o||l})})]})})});Ik.displayName=zi;var Pk="TooltipArrow",Fk=v.forwardRef((e,n)=>{const{__scopeTooltip:a,...l}=e,o=kd(a);return VD(Pk,a).isInside?null:d.jsx(ud,{...o,...l,ref:n})});Fk.displayName=Pk;function GD(e,n){const a=Math.abs(n.top-e.y),l=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(a,l,o,s)){case s:return"left";case o:return"right";case a:return"top";case l:return"bottom";default:throw new Error("unreachable")}}function YD(e,n,a=5){const l=[];switch(n){case"top":l.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":l.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":l.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":l.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return l}function XD(e){const{top:n,right:a,bottom:l,left:o}=e;return[{x:o,y:n},{x:a,y:n},{x:a,y:l},{x:o,y:l}]}function KD(e,n){const{x:a,y:l}=e;let o=!1;for(let s=0,u=n.length-1;s<n.length;u=s++){const f=n[s],p=n[u],h=f.x,y=f.y,g=p.x,w=p.y;y>l!=w>l&&a<(g-h)*(l-y)/(w-y)+h&&(o=!o)}return o}function QD(e){const n=e.slice();return n.sort((a,l)=>a.x<l.x?-1:a.x>l.x?1:a.y<l.y?-1:a.y>l.y?1:0),ZD(n)}function ZD(e){if(e.length<=1)return e.slice();const n=[];for(let l=0;l<e.length;l++){const o=e[l];for(;n.length>=2;){const s=n[n.length-1],u=n[n.length-2];if((s.x-u.x)*(o.y-u.y)>=(s.y-u.y)*(o.x-u.x))n.pop();else break}n.push(o)}n.pop();const a=[];for(let l=e.length-1;l>=0;l--){const o=e[l];for(;a.length>=2;){const s=a[a.length-1],u=a[a.length-2];if((s.x-u.x)*(o.y-u.y)>=(s.y-u.y)*(o.x-u.x))a.pop();else break}a.push(o)}return a.pop(),n.length===1&&a.length===1&&n[0].x===a[0].x&&n[0].y===a[0].y?n:n.concat(a)}var WD=Ok,JD=Dk,e4=zk,t4=Lk,n4=Ik,r4=Fk;const a4=(e,n)=>{const a=new Array(e.length+n.length);for(let l=0;l<e.length;l++)a[l]=e[l];for(let l=0;l<n.length;l++)a[e.length+l]=n[l];return a},l4=(e,n)=>({classGroupId:e,validator:n}),Uk=(e=new Map,n=null,a)=>({nextPart:e,validators:n,classGroupId:a}),Hu="-",n0=[],i4="arbitrary..",o4=e=>{const n=c4(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return s4(u);const f=u.split(Hu),p=f[0]===""&&f.length>1?1:0;return Hk(f,p,n)},getConflictingClassGroupIds:(u,f)=>{if(f){const p=l[u],h=a[u];return p?h?a4(h,p):p:h||n0}return a[u]||n0}}},Hk=(e,n,a)=>{if(e.length-n===0)return a.classGroupId;const o=e[n],s=a.nextPart.get(o);if(s){const h=Hk(e,n+1,s);if(h)return h}const u=a.validators;if(u===null)return;const f=n===0?e.join(Hu):e.slice(n).join(Hu),p=u.length;for(let h=0;h<p;h++){const y=u[h];if(y.validator(f))return y.classGroupId}},s4=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),a=n.indexOf(":"),l=n.slice(0,a);return l?i4+l:void 0})(),c4=e=>{const{theme:n,classGroups:a}=e;return u4(a,n)},u4=(e,n)=>{const a=Uk();for(const l in e){const o=e[l];Wm(o,a,l,n)}return a},Wm=(e,n,a,l)=>{const o=e.length;for(let s=0;s<o;s++){const u=e[s];d4(u,n,a,l)}},d4=(e,n,a,l)=>{if(typeof e=="string"){f4(e,n,a);return}if(typeof e=="function"){p4(e,n,a,l);return}h4(e,n,a,l)},f4=(e,n,a)=>{const l=e===""?n:$k(n,e);l.classGroupId=a},p4=(e,n,a,l)=>{if(m4(e)){Wm(e(l),n,a,l);return}n.validators===null&&(n.validators=[]),n.validators.push(l4(a,e))},h4=(e,n,a,l)=>{const o=Object.entries(e),s=o.length;for(let u=0;u<s;u++){const[f,p]=o[u];Wm(p,$k(n,f),a,l)}},$k=(e,n)=>{let a=e;const l=n.split(Hu),o=l.length;for(let s=0;s<o;s++){const u=l[s];let f=a.nextPart.get(u);f||(f=Uk(),a.nextPart.set(u,f)),a=f}return a},m4=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,g4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,a=Object.create(null),l=Object.create(null);const o=(s,u)=>{a[s]=u,n++,n>e&&(n=0,l=a,a=Object.create(null))};return{get(s){let u=a[s];if(u!==void 0)return u;if((u=l[s])!==void 0)return o(s,u),u},set(s,u){s in a?a[s]=u:o(s,u)}}},Wh="!",r0=":",y4=[],a0=(e,n,a,l,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:a,maybePostfixModifierPosition:l,isExternal:o}),x4=e=>{const{prefix:n,experimentalParseClassName:a}=e;let l=o=>{const s=[];let u=0,f=0,p=0,h;const y=o.length;for(let S=0;S<y;S++){const E=o[S];if(u===0&&f===0){if(E===r0){s.push(o.slice(p,S)),p=S+1;continue}if(E==="/"){h=S;continue}}E==="["?u++:E==="]"?u--:E==="("?f++:E===")"&&f--}const g=s.length===0?o:o.slice(p);let w=g,b=!1;g.endsWith(Wh)?(w=g.slice(0,-1),b=!0):g.startsWith(Wh)&&(w=g.slice(1),b=!0);const k=h&&h>p?h-p:void 0;return a0(s,b,w,k)};if(n){const o=n+r0,s=l;l=u=>u.startsWith(o)?s(u.slice(o.length)):a0(y4,!1,u,void 0,!0)}if(a){const o=l;l=s=>a({className:s,parseClassName:o})}return l},b4=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((a,l)=>{n.set(a,1e6+l)}),a=>{const l=[];let o=[];for(let s=0;s<a.length;s++){const u=a[s],f=u[0]==="[",p=n.has(u);f||p?(o.length>0&&(o.sort(),l.push(...o),o=[]),l.push(u)):o.push(u)}return o.length>0&&(o.sort(),l.push(...o)),l}},v4=e=>({cache:g4(e.cacheSize),parseClassName:x4(e),sortModifiers:b4(e),...o4(e)}),w4=/\s+/,S4=(e,n)=>{const{parseClassName:a,getClassGroupId:l,getConflictingClassGroupIds:o,sortModifiers:s}=n,u=[],f=e.trim().split(w4);let p="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:w,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:S}=a(y);if(g){p=y+(p.length>0?" "+p:p);continue}let E=!!S,A=l(E?k.substring(0,S):k);if(!A){if(!E){p=y+(p.length>0?" "+p:p);continue}if(A=l(k),!A){p=y+(p.length>0?" "+p:p);continue}E=!1}const N=w.length===0?"":w.length===1?w[0]:s(w).join(":"),j=b?N+Wh:N,O=j+A;if(u.indexOf(O)>-1)continue;u.push(O);const I=o(A,E);for(let M=0;M<I.length;++M){const U=I[M];u.push(j+U)}p=y+(p.length>0?" "+p:p)}return p},k4=(...e)=>{let n=0,a,l,o="";for(;n<e.length;)(a=e[n++])&&(l=Vk(a))&&(o&&(o+=" "),o+=l);return o},Vk=e=>{if(typeof e=="string")return e;let n,a="";for(let l=0;l<e.length;l++)e[l]&&(n=Vk(e[l]))&&(a&&(a+=" "),a+=n);return a},C4=(e,...n)=>{let a,l,o,s;const u=p=>{const h=n.reduce((y,g)=>g(y),e());return a=v4(h),l=a.cache.get,o=a.cache.set,s=f,f(p)},f=p=>{const h=l(p);if(h)return h;const y=S4(p,a);return o(p,y),y};return s=u,(...p)=>s(k4(...p))},E4=[],zt=e=>{const n=a=>a[e]||E4;return n.isThemeGetter=!0,n},qk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,A4=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,N4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j4=/\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$/,T4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ra=e=>A4.test(e),$e=e=>!!e&&!Number.isNaN(Number(e)),Ma=e=>!!e&&Number.isInteger(Number(e)),sh=e=>e.endsWith("%")&&$e(e.slice(0,-1)),Yr=e=>N4.test(e),Yk=()=>!0,M4=e=>j4.test(e)&&!T4.test(e),Jm=()=>!1,O4=e=>_4.test(e),D4=e=>R4.test(e),z4=e=>!ke(e)&&!Ce(e),L4=e=>Ga(e,Qk,Jm),ke=e=>qk.test(e),yl=e=>Ga(e,Zk,M4),l0=e=>Ga(e,V4,$e),I4=e=>Ga(e,Jk,Yk),B4=e=>Ga(e,Wk,Jm),i0=e=>Ga(e,Xk,Jm),P4=e=>Ga(e,Kk,D4),mu=e=>Ga(e,eC,O4),Ce=e=>Gk.test(e),Qo=e=>Tl(e,Zk),F4=e=>Tl(e,Wk),o0=e=>Tl(e,Xk),U4=e=>Tl(e,Qk),H4=e=>Tl(e,Kk),gu=e=>Tl(e,eC,!0),$4=e=>Tl(e,Jk,!0),Ga=(e,n,a)=>{const l=qk.exec(e);return l?l[1]?n(l[1]):a(l[2]):!1},Tl=(e,n,a=!1)=>{const l=Gk.exec(e);return l?l[1]?n(l[1]):a:!1},Xk=e=>e==="position"||e==="percentage",Kk=e=>e==="image"||e==="url",Qk=e=>e==="length"||e==="size"||e==="bg-size",Zk=e=>e==="length",V4=e=>e==="number",Wk=e=>e==="family-name",Jk=e=>e==="number"||e==="weight",eC=e=>e==="shadow",q4=()=>{const e=zt("color"),n=zt("font"),a=zt("text"),l=zt("font-weight"),o=zt("tracking"),s=zt("leading"),u=zt("breakpoint"),f=zt("container"),p=zt("spacing"),h=zt("radius"),y=zt("shadow"),g=zt("inset-shadow"),w=zt("text-shadow"),b=zt("drop-shadow"),k=zt("blur"),S=zt("perspective"),E=zt("aspect"),A=zt("ease"),N=zt("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...O(),Ce,ke],M=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],H=()=>[Ce,ke,p],q=()=>[Ra,"full","auto",...H()],B=()=>[Ma,"none","subgrid",Ce,ke],Y=()=>["auto",{span:["full",Ma,Ce,ke]},Ma,Ce,ke],G=()=>[Ma,"auto",Ce,ke],he=()=>["auto","min","max","fr",Ce,ke],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...H()],K=()=>[Ra,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...H()],ee=()=>[Ra,"screen","full","dvw","lvw","svw","min","max","fit",...H()],le=()=>[Ra,"screen","full","lh","dvh","lvh","svh","min","max","fit",...H()],T=()=>[e,Ce,ke],D=()=>[...O(),o0,i0,{position:[Ce,ke]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",U4,L4,{size:[Ce,ke]}],te=()=>[sh,Qo,yl],ne=()=>["","none","full",h,Ce,ke],ie=()=>["",$e,Qo,yl],ae=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[$e,sh,o0,i0],_e=()=>["","none",k,Ce,ke],De=()=>["none",$e,Ce,ke],Be=()=>["none",$e,Ce,ke],ot=()=>[$e,Ce,ke],at=()=>[Ra,"full",...H()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yr],breakpoint:[Yr],color:[Yk],container:[Yr],"drop-shadow":[Yr],ease:["in","out","in-out"],font:[z4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yr],shadow:[Yr],spacing:["px",$e],text:[Yr],"text-shadow":[Yr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ra,ke,Ce,E]}],container:["container"],columns:[{columns:[$e,ke,Ce,f]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:q()}],"inset-x":[{"inset-x":q()}],"inset-y":[{"inset-y":q()}],start:[{"inset-s":q(),start:q()}],end:[{"inset-e":q(),end:q()}],"inset-bs":[{"inset-bs":q()}],"inset-be":[{"inset-be":q()}],top:[{top:q()}],right:[{right:q()}],bottom:[{bottom:q()}],left:[{left:q()}],visibility:["visible","invisible","collapse"],z:[{z:[Ma,"auto",Ce,ke]}],basis:[{basis:[Ra,"full","auto",f,...H()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$e,Ra,"auto","initial","none",ke]}],grow:[{grow:["",$e,Ce,ke]}],shrink:[{shrink:["",$e,Ce,ke]}],order:[{order:[Ma,"first","last","none",Ce,ke]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":he()}],"auto-rows":[{"auto-rows":he()}],gap:[{gap:H()}],"gap-x":[{"gap-x":H()}],"gap-y":[{"gap-y":H()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:H()}],px:[{px:H()}],py:[{py:H()}],ps:[{ps:H()}],pe:[{pe:H()}],pbs:[{pbs:H()}],pbe:[{pbe:H()}],pt:[{pt:H()}],pr:[{pr:H()}],pb:[{pb:H()}],pl:[{pl:H()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":H()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":H()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[f,"screen",...K()]}],"min-w":[{"min-w":[f,"screen","none",...K()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",a,Qo,yl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,$4,I4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sh,ke]}],"font-family":[{font:[F4,B4,n]}],"font-features":[{"font-features":[ke]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ce,ke]}],"line-clamp":[{"line-clamp":[$e,"none",Ce,l0]}],leading:[{leading:[s,...H()]}],"list-image":[{"list-image":["none",Ce,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[$e,"from-font","auto",Ce,yl]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[$e,"auto",Ce,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ce,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ma,Ce,ke],radial:["",Ce,ke],conic:[Ma,Ce,ke]},H4,P4]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$e,Ce,ke]}],"outline-w":[{outline:["",$e,Qo,yl]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",y,gu,mu]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",g,gu,mu]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[$e,yl]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",w,gu,mu]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[$e,Ce,ke]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[$e]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Ce,ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[$e]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,ke]}],filter:[{filter:["","none",Ce,ke]}],blur:[{blur:_e()}],brightness:[{brightness:[$e,Ce,ke]}],contrast:[{contrast:[$e,Ce,ke]}],"drop-shadow":[{"drop-shadow":["","none",b,gu,mu]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",$e,Ce,ke]}],"hue-rotate":[{"hue-rotate":[$e,Ce,ke]}],invert:[{invert:["",$e,Ce,ke]}],saturate:[{saturate:[$e,Ce,ke]}],sepia:[{sepia:["",$e,Ce,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,ke]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[$e,Ce,ke]}],"backdrop-contrast":[{"backdrop-contrast":[$e,Ce,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$e,Ce,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$e,Ce,ke]}],"backdrop-invert":[{"backdrop-invert":["",$e,Ce,ke]}],"backdrop-opacity":[{"backdrop-opacity":[$e,Ce,ke]}],"backdrop-saturate":[{"backdrop-saturate":[$e,Ce,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",$e,Ce,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":H()}],"border-spacing-x":[{"border-spacing-x":H()}],"border-spacing-y":[{"border-spacing-y":H()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$e,"initial",Ce,ke]}],ease:[{ease:["linear","initial",A,Ce,ke]}],delay:[{delay:[$e,Ce,ke]}],animate:[{animate:["none",N,Ce,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ce,ke]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Be()}],"scale-x":[{"scale-x":Be()}],"scale-y":[{"scale-y":Be()}],"scale-z":[{"scale-z":Be()}],"scale-3d":["scale-3d"],skew:[{skew:ot()}],"skew-x":[{"skew-x":ot()}],"skew-y":[{"skew-y":ot()}],transform:[{transform:[Ce,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:at()}],"translate-x":[{"translate-x":at()}],"translate-y":[{"translate-y":at()}],"translate-z":[{"translate-z":at()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce,ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mbs":[{"scroll-mbs":H()}],"scroll-mbe":[{"scroll-mbe":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pbs":[{"scroll-pbs":H()}],"scroll-pbe":[{"scroll-pbe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ce,ke]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[$e,Qo,yl,l0]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},G4=C4(q4);function ge(...e){return G4(Zu(e))}const Y4=qi("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 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 [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function je({className:e,variant:n="default",size:a="default",asChild:l=!1,...o}){const s=l?Es:"button";return d.jsx(s,{"data-slot":"button","data-variant":n,"data-size":a,className:ge(Y4({variant:n,size:a,className:e})),...o})}function Ls(){return{fetchWithAuth:v.useCallback(async(n,a={},l)=>{const{serverUrl:o,token:s}=l||{};let u=n;n.startsWith("/")&&o&&(u=`http://${o}${n}`);const f=new Headers(a.headers||{});return s&&f.set("Authorization",`Bearer ${s}`),fetch(u,{...a,headers:f})},[])}}function Zi({...e}){return d.jsx(km,{"data-slot":"dialog",...e})}function X4({...e}){return d.jsx(Cm,{"data-slot":"dialog-portal",...e})}function K4({...e}){return d.jsx(rd,{"data-slot":"dialog-close",...e})}function Q4({className:e,...n}){return d.jsx(Em,{"data-slot":"dialog-overlay",className:ge("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...n})}function Wi({className:e,children:n,showCloseButton:a=!0,...l}){return d.jsxs(X4,{children:[d.jsx(Q4,{}),d.jsxs(Am,{"data-slot":"dialog-content",className:ge("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l,children:[n,a&&d.jsx(rd,{"data-slot":"dialog-close",asChild:!0,children:d.jsxs(je,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[d.jsx(Ri,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function Ji({className:e,...n}){return d.jsx("div",{"data-slot":"dialog-header",className:ge("flex flex-col gap-2",e),...n})}function Cd({className:e,showCloseButton:n=!1,children:a,...l}){return d.jsxs("div",{"data-slot":"dialog-footer",className:ge("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),...l,children:[a,n&&d.jsx(rd,{asChild:!0,children:d.jsx(je,{variant:"outline",children:"Close"})})]})}function eo({className:e,...n}){return d.jsx(dw,{"data-slot":"dialog-title",className:ge("text-base leading-none font-medium",e),...n})}function Is({className:e,...n}){return d.jsx(fw,{"data-slot":"dialog-description",className:ge("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...n})}function Eu({className:e,type:n,...a}){return d.jsx("input",{type:n,"data-slot":"input",className:ge("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}const Fa=v.forwardRef(({className:e,children:n,...a},l)=>d.jsxs($O,{"data-slot":"scroll-area",className:ge("relative overflow-hidden",e),...a,children:[d.jsx(VO,{ref:l,"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] outline-none",style:{WebkitOverflowScrolling:"touch"},children:n}),d.jsx(Z4,{}),d.jsx(qO,{})]}));Fa.displayName="ScrollArea";function Z4({className:e,orientation:n="vertical",...a}){return d.jsx(BS,{"data-slot":"scroll-area-scrollbar","data-orientation":n,orientation:n,className:ge("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...a,children:d.jsx(HS,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function W4(e){const a=e.replace(/\\/g,"/").split("/");return a.pop(),a.join("/")||"/"}function J4({open:e,onOpenChange:n,onSelect:a,initialPath:l,title:o="Select Folder"}){const[s,u]=v.useState(l||""),[f,p]=v.useState([]),[h,y]=v.useState(!1),[g,w]=v.useState(0),[b,k]=v.useState(null),[S,E]=v.useState(""),A=v.useRef(null),N=v.useRef(null),{fetchWithAuth:j}=Ls(),{activeServer:O}=Vi(),I=v.useCallback(async G=>{y(!0),k(null),w(0),E("");try{const he=await j(`/api/fs/browse?path=${encodeURIComponent(G)}`,{},{serverUrl:O==null?void 0:O.url,token:O==null?void 0:O.token}),Z=await he.json();if(!he.ok)throw new Error(Z.message||"Failed to browse directory");const W=Z.files.filter(z=>z.type==="directory");p(W),u(Z.currentPath)}catch(he){k(he instanceof Error?he.message:"Failed to load directory"),p([])}finally{y(!1)}},[j,O]);v.useEffect(()=>{e&&I(l||"")},[e,l,I]),v.useEffect(()=>{w(0)},[S]);const M=f.filter(G=>G.name.toLowerCase().includes(S.toLowerCase())),U=()=>{const G=W4(s);G!==s&&I(G)},H=()=>{s&&(a(s),n(!1))},q=G=>{const he=s?`${s}/${G.name}`:G.name;I(he)},B=G=>{if(M.length!==0)switch(G.key){case"ArrowDown":G.preventDefault(),w(he=>Math.min(he+1,M.length-1));break;case"ArrowUp":G.preventDefault(),w(he=>Math.max(he-1,0));break;case"Enter":G.preventDefault(),M[g]&&q(M[g]);break;case"Escape":S&&(G.preventDefault(),E(""));break}};v.useEffect(()=>{if(N.current&&M.length>0){const G=N.current.children[g];G&&G.scrollIntoView({block:"nearest"})}},[g,M.length]),v.useEffect(()=>{e&&setTimeout(()=>{var G;return(G=A.current)==null?void 0:G.focus()},100)},[e]);const Y=(G,he=50)=>{if(G.length<=he)return G;const Z=G.split("/");return Z.length<=2?G:".../"+Z.slice(-2).join("/")};return d.jsx(Zi,{open:e,onOpenChange:n,children:d.jsxs(Wi,{className:"sm:max-w-lg",onKeyDown:B,children:[d.jsx(Ji,{children:d.jsx(eo,{children:o})}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded-md",children:[d.jsx(je,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-shrink-0",onClick:U,disabled:h||!s,children:d.jsx(iN,{className:"w-4 h-4"})}),d.jsx("span",{className:"flex-1 text-sm font-mono truncate",title:s,children:Y(s)||"Home"})]}),d.jsxs("div",{className:"relative",children:[d.jsx(mm,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),d.jsx(Eu,{ref:A,placeholder:"Filter folders...",value:S,onChange:G=>E(G.target.value),className:"pl-8"})]}),d.jsx(Fa,{className:"h-64 border rounded-md",children:h?d.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[d.jsx(Un,{className:"w-4 h-4 animate-spin mr-2"}),"Loading..."]}):b?d.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground",children:[d.jsx("span",{className:"text-destructive",children:b}),d.jsx(je,{variant:"ghost",size:"sm",onClick:()=>I(s),className:"mt-2",children:"Retry"})]}):M.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground text-sm",children:[d.jsx(za,{className:"w-8 h-8 mb-2 opacity-50"}),S?"No matching folders":"No folders in this directory"]}):d.jsx("div",{className:"p-1",ref:N,children:M.map((G,he)=>d.jsxs("button",{onClick:()=>{w(he)},onDoubleClick:()=>q(G),className:ge("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",he===g&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[d.jsx(za,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}),d.jsx("span",{className:"truncate flex-1",children:G.name}),he===g&&d.jsx(Qr,{className:"w-4 h-4 text-primary"})]},G.path))})}),b&&d.jsx("p",{className:"text-xs text-destructive",children:b})]}),d.jsxs(Cd,{children:[d.jsx(je,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),d.jsx(je,{onClick:H,disabled:!s||h,children:"Use This Folder"})]})]})})}var s0=1,ez=.9,tz=.8,nz=.17,ch=.1,uh=.999,rz=.9999,az=.99,lz=/[\\\/_+.#"@\[\(\{&]/,iz=/[\\\/_+.#"@\[\(\{&]/g,oz=/[\s-]/,tC=/[\s-]/g;function Jh(e,n,a,l,o,s,u){if(s===n.length)return o===e.length?s0:az;var f=`${o},${s}`;if(u[f]!==void 0)return u[f];for(var p=l.charAt(s),h=a.indexOf(p,o),y=0,g,w,b,k;h>=0;)g=Jh(e,n,a,l,h+1,s+1,u),g>y&&(h===o?g*=s0:lz.test(e.charAt(h-1))?(g*=tz,b=e.slice(o,h-1).match(iz),b&&o>0&&(g*=Math.pow(uh,b.length))):oz.test(e.charAt(h-1))?(g*=ez,k=e.slice(o,h-1).match(tC),k&&o>0&&(g*=Math.pow(uh,k.length))):(g*=nz,o>0&&(g*=Math.pow(uh,h-o))),e.charAt(h)!==n.charAt(s)&&(g*=rz)),(g<ch&&a.charAt(h-1)===l.charAt(s+1)||l.charAt(s+1)===l.charAt(s)&&a.charAt(h-1)!==l.charAt(s))&&(w=Jh(e,n,a,l,h+1,s+2,u),w*ch>g&&(g=w*ch)),g>y&&(y=g),h=a.indexOf(p,h+1);return u[f]=y,y}function c0(e){return e.toLowerCase().replace(tC," ")}function sz(e,n,a){return e=a&&a.length>0?`${e+" "+a.join(" ")}`:e,Jh(e,n,c0(e),c0(n),0,0,{})}var Zo='[cmdk-group=""]',dh='[cmdk-group-items=""]',cz='[cmdk-group-heading=""]',nC='[cmdk-item=""]',u0=`${nC}:not([aria-disabled="true"])`,em="cmdk-item-select",wi="data-value",uz=(e,n,a)=>sz(e,n,a),rC=v.createContext(void 0),Bs=()=>v.useContext(rC),aC=v.createContext(void 0),eg=()=>v.useContext(aC),lC=v.createContext(void 0),iC=v.forwardRef((e,n)=>{let a=Si(()=>{var L,_;return{search:"",value:(_=(L=e.value)!=null?L:e.defaultValue)!=null?_:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),l=Si(()=>new Set),o=Si(()=>new Map),s=Si(()=>new Map),u=Si(()=>new Set),f=oC(e),{label:p,children:h,value:y,onValueChange:g,filter:w,shouldFilter:b,loop:k,disablePointerSelection:S=!1,vimBindings:E=!0,...A}=e,N=Lt(),j=Lt(),O=Lt(),I=v.useRef(null),M=wz();El(()=>{if(y!==void 0){let L=y.trim();a.current.value=L,U.emit()}},[y]),El(()=>{M(6,he)},[]);let U=v.useMemo(()=>({subscribe:L=>(u.current.add(L),()=>u.current.delete(L)),snapshot:()=>a.current,setState:(L,_,te)=>{var ne,ie,ae,be;if(!Object.is(a.current[L],_)){if(a.current[L]=_,L==="search")G(),B(),M(1,Y);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let me=document.getElementById(O);me?me.focus():(ne=document.getElementById(N))==null||ne.focus()}if(M(7,()=>{var me;a.current.selectedItemId=(me=Z())==null?void 0:me.id,U.emit()}),te||M(5,he),((ie=f.current)==null?void 0:ie.value)!==void 0){let me=_!=null?_:"";(be=(ae=f.current).onValueChange)==null||be.call(ae,me);return}}U.emit()}},emit:()=>{u.current.forEach(L=>L())}}),[]),H=v.useMemo(()=>({value:(L,_,te)=>{var ne;_!==((ne=s.current.get(L))==null?void 0:ne.value)&&(s.current.set(L,{value:_,keywords:te}),a.current.filtered.items.set(L,q(_,te)),M(2,()=>{B(),U.emit()}))},item:(L,_)=>(l.current.add(L),_&&(o.current.has(_)?o.current.get(_).add(L):o.current.set(_,new Set([L]))),M(3,()=>{G(),B(),a.current.value||Y(),U.emit()}),()=>{s.current.delete(L),l.current.delete(L),a.current.filtered.items.delete(L);let te=Z();M(4,()=>{G(),(te==null?void 0:te.getAttribute("id"))===L&&Y(),U.emit()})}),group:L=>(o.current.has(L)||o.current.set(L,new Set),()=>{s.current.delete(L),o.current.delete(L)}),filter:()=>f.current.shouldFilter,label:p||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:N,inputId:O,labelId:j,listInnerRef:I}),[]);function q(L,_){var te,ne;let ie=(ne=(te=f.current)==null?void 0:te.filter)!=null?ne:uz;return L?ie(L,a.current.search,_):0}function B(){if(!a.current.search||f.current.shouldFilter===!1)return;let L=a.current.filtered.items,_=[];a.current.filtered.groups.forEach(ne=>{let ie=o.current.get(ne),ae=0;ie.forEach(be=>{let me=L.get(be);ae=Math.max(me,ae)}),_.push([ne,ae])});let te=I.current;W().sort((ne,ie)=>{var ae,be;let me=ne.getAttribute("id"),_e=ie.getAttribute("id");return((ae=L.get(_e))!=null?ae:0)-((be=L.get(me))!=null?be:0)}).forEach(ne=>{let ie=ne.closest(dh);ie?ie.appendChild(ne.parentElement===ie?ne:ne.closest(`${dh} > *`)):te.appendChild(ne.parentElement===te?ne:ne.closest(`${dh} > *`))}),_.sort((ne,ie)=>ie[1]-ne[1]).forEach(ne=>{var ie;let ae=(ie=I.current)==null?void 0:ie.querySelector(`${Zo}[${wi}="${encodeURIComponent(ne[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function Y(){let L=W().find(te=>te.getAttribute("aria-disabled")!=="true"),_=L==null?void 0:L.getAttribute(wi);U.setState("value",_||void 0)}function G(){var L,_,te,ne;if(!a.current.search||f.current.shouldFilter===!1){a.current.filtered.count=l.current.size;return}a.current.filtered.groups=new Set;let ie=0;for(let ae of l.current){let be=(_=(L=s.current.get(ae))==null?void 0:L.value)!=null?_:"",me=(ne=(te=s.current.get(ae))==null?void 0:te.keywords)!=null?ne:[],_e=q(be,me);a.current.filtered.items.set(ae,_e),_e>0&&ie++}for(let[ae,be]of o.current)for(let me of be)if(a.current.filtered.items.get(me)>0){a.current.filtered.groups.add(ae);break}a.current.filtered.count=ie}function he(){var L,_,te;let ne=Z();ne&&(((L=ne.parentElement)==null?void 0:L.firstChild)===ne&&((te=(_=ne.closest(Zo))==null?void 0:_.querySelector(cz))==null||te.scrollIntoView({block:"nearest"})),ne.scrollIntoView({block:"nearest"}))}function Z(){var L;return(L=I.current)==null?void 0:L.querySelector(`${nC}[aria-selected="true"]`)}function W(){var L;return Array.from(((L=I.current)==null?void 0:L.querySelectorAll(u0))||[])}function z(L){let _=W()[L];_&&U.setState("value",_.getAttribute(wi))}function K(L){var _;let te=Z(),ne=W(),ie=ne.findIndex(be=>be===te),ae=ne[ie+L];(_=f.current)!=null&&_.loop&&(ae=ie+L<0?ne[ne.length-1]:ie+L===ne.length?ne[0]:ne[ie+L]),ae&&U.setState("value",ae.getAttribute(wi))}function ee(L){let _=Z(),te=_==null?void 0:_.closest(Zo),ne;for(;te&&!ne;)te=L>0?bz(te,Zo):vz(te,Zo),ne=te==null?void 0:te.querySelector(u0);ne?U.setState("value",ne.getAttribute(wi)):K(L)}let le=()=>z(W().length-1),T=L=>{L.preventDefault(),L.metaKey?le():L.altKey?ee(1):K(1)},D=L=>{L.preventDefault(),L.metaKey?z(0):L.altKey?ee(-1):K(-1)};return v.createElement(Ae.div,{ref:n,tabIndex:-1,...A,"cmdk-root":"",onKeyDown:L=>{var _;(_=A.onKeyDown)==null||_.call(A,L);let te=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||te))switch(L.key){case"n":case"j":{E&&L.ctrlKey&&T(L);break}case"ArrowDown":{T(L);break}case"p":case"k":{E&&L.ctrlKey&&D(L);break}case"ArrowUp":{D(L);break}case"Home":{L.preventDefault(),z(0);break}case"End":{L.preventDefault(),le();break}case"Enter":{L.preventDefault();let ne=Z();if(ne){let ie=new Event(em);ne.dispatchEvent(ie)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:kz},p),Ed(e,L=>v.createElement(aC.Provider,{value:U},v.createElement(rC.Provider,{value:H},L))))}),dz=v.forwardRef((e,n)=>{var a,l;let o=Lt(),s=v.useRef(null),u=v.useContext(lC),f=Bs(),p=oC(e),h=(l=(a=p.current)==null?void 0:a.forceMount)!=null?l:u==null?void 0:u.forceMount;El(()=>{if(!h)return f.item(o,u==null?void 0:u.id)},[h]);let y=sC(o,s,[e.value,e.children,s],e.keywords),g=eg(),w=Ua(M=>M.value&&M.value===y.current),b=Ua(M=>h||f.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);v.useEffect(()=>{let M=s.current;if(!(!M||e.disabled))return M.addEventListener(em,k),()=>M.removeEventListener(em,k)},[b,e.onSelect,e.disabled]);function k(){var M,U;S(),(U=(M=p.current).onSelect)==null||U.call(M,y.current)}function S(){g.setState("value",y.current,!0)}if(!b)return null;let{disabled:E,value:A,onSelect:N,forceMount:j,keywords:O,...I}=e;return v.createElement(Ae.div,{ref:Wr(s,n),...I,id:o,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!w,"data-disabled":!!E,"data-selected":!!w,onPointerMove:E||f.getDisablePointerSelection()?void 0:S,onClick:E?void 0:k},e.children)}),fz=v.forwardRef((e,n)=>{let{heading:a,children:l,forceMount:o,...s}=e,u=Lt(),f=v.useRef(null),p=v.useRef(null),h=Lt(),y=Bs(),g=Ua(b=>o||y.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);El(()=>y.group(u),[]),sC(u,f,[e.value,e.heading,p]);let w=v.useMemo(()=>({id:u,forceMount:o}),[o]);return v.createElement(Ae.div,{ref:Wr(f,n),...s,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},a&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:h},a),Ed(e,b=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?h:void 0},v.createElement(lC.Provider,{value:w},b))))}),pz=v.forwardRef((e,n)=>{let{alwaysRender:a,...l}=e,o=v.useRef(null),s=Ua(u=>!u.search);return!a&&!s?null:v.createElement(Ae.div,{ref:Wr(o,n),...l,"cmdk-separator":"",role:"separator"})}),hz=v.forwardRef((e,n)=>{let{onValueChange:a,...l}=e,o=e.value!=null,s=eg(),u=Ua(h=>h.search),f=Ua(h=>h.selectedItemId),p=Bs();return v.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),v.createElement(Ae.input,{ref:n,...l,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":f,id:p.inputId,type:"text",value:o?e.value:u,onChange:h=>{o||s.setState("search",h.target.value),a==null||a(h.target.value)}})}),mz=v.forwardRef((e,n)=>{let{children:a,label:l="Suggestions",...o}=e,s=v.useRef(null),u=v.useRef(null),f=Ua(h=>h.selectedItemId),p=Bs();return v.useEffect(()=>{if(u.current&&s.current){let h=u.current,y=s.current,g,w=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;y.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return w.observe(h),()=>{cancelAnimationFrame(g),w.unobserve(h)}}},[]),v.createElement(Ae.div,{ref:Wr(s,n),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":l,id:p.listId},Ed(e,h=>v.createElement("div",{ref:Wr(u,p.listInnerRef),"cmdk-list-sizer":""},h)))}),gz=v.forwardRef((e,n)=>{let{open:a,onOpenChange:l,overlayClassName:o,contentClassName:s,container:u,...f}=e;return v.createElement(km,{open:a,onOpenChange:l},v.createElement(Cm,{container:u},v.createElement(Em,{"cmdk-overlay":"",className:o}),v.createElement(Am,{"aria-label":e.label,"cmdk-dialog":"",className:s},v.createElement(iC,{ref:n,...f}))))}),yz=v.forwardRef((e,n)=>Ua(a=>a.filtered.count===0)?v.createElement(Ae.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),xz=v.forwardRef((e,n)=>{let{progress:a,children:l,label:o="Loading...",...s}=e;return v.createElement(Ae.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Ed(e,u=>v.createElement("div",{"aria-hidden":!0},u)))}),_l=Object.assign(iC,{List:mz,Item:dz,Input:hz,Group:fz,Separator:pz,Dialog:gz,Empty:yz,Loading:xz});function bz(e,n){let a=e.nextElementSibling;for(;a;){if(a.matches(n))return a;a=a.nextElementSibling}}function vz(e,n){let a=e.previousElementSibling;for(;a;){if(a.matches(n))return a;a=a.previousElementSibling}}function oC(e){let n=v.useRef(e);return El(()=>{n.current=e}),n}var El=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Si(e){let n=v.useRef();return n.current===void 0&&(n.current=e()),n}function Ua(e){let n=eg(),a=()=>e(n.snapshot());return v.useSyncExternalStore(n.subscribe,a,a)}function sC(e,n,a,l=[]){let o=v.useRef(),s=Bs();return El(()=>{var u;let f=(()=>{var h;for(let y of a){if(typeof y=="string")return y.trim();if(typeof y=="object"&&"current"in y)return y.current?(h=y.current.textContent)==null?void 0:h.trim():o.current}})(),p=l.map(h=>h.trim());s.value(e,f,p),(u=n.current)==null||u.setAttribute(wi,f),o.current=f}),o}var wz=()=>{let[e,n]=v.useState(),a=Si(()=>new Map);return El(()=>{a.current.forEach(l=>l()),a.current=new Map},[e]),(l,o)=>{a.current.set(l,o),n({})}};function Sz(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function Ed({asChild:e,children:n},a){return e&&v.isValidElement(n)?v.cloneElement(Sz(n),{ref:n.ref},a(n.props.children)):a(n)}var kz={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Cz({className:e,...n}){return d.jsx("textarea",{"data-slot":"textarea",className:ge("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}function Ez({className:e,...n}){return d.jsx("div",{"data-slot":"input-group",role:"group",className:ge("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 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-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...n})}const Az=qi("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-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function Nz({className:e,align:n="inline-start",...a}){return d.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:ge(Az({align:n}),e),onClick:l=>{var o,s;l.target.closest("button")||(s=(o=l.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||s.focus()},...a})}function tg({className:e,...n}){return d.jsx(_l,{"data-slot":"command",className:ge("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...n})}function cC({className:e,...n}){return d.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:d.jsxs(Ez,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[d.jsx(_l.Input,{"data-slot":"command-input",className:ge("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...n}),d.jsx(Nz,{children:d.jsx(mm,{className:"size-4 shrink-0 opacity-50"})})]})})}function ng({className:e,...n}){return d.jsx(_l.List,{"data-slot":"command-list",className:ge("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...n})}function rg({className:e,...n}){return d.jsx(_l.Empty,{"data-slot":"command-empty",className:ge("py-6 text-center text-sm",e),...n})}function gs({className:e,...n}){return d.jsx(_l.Group,{"data-slot":"command-group",className:ge("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...n})}function uC({className:e,...n}){return d.jsx(_l.Separator,{"data-slot":"command-separator",className:ge("-mx-1 h-px bg-border",e),...n})}function ji({className:e,children:n,...a}){return d.jsxs(_l.Item,{"data-slot":"command-item",className:ge("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...a,children:[n,d.jsx(Qr,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function Ad({...e}){return d.jsx(bO,{"data-slot":"popover",...e})}function ag({...e}){return d.jsx(wO,{"data-slot":"popover-trigger",...e})}function Nd({className:e,align:n="center",sideOffset:a=4,...l}){return d.jsx(SO,{children:d.jsx(kO,{"data-slot":"popover-content",align:n,sideOffset:a,className:ge("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l})})}function jz({...e}){return d.jsx(vO,{"data-slot":"popover-anchor",...e})}function Tz({workspaces:e,activeWorkspace:n,onSelectWorkspace:a,onCreateVirtualWorkspace:l,onCreatePhysicalWorkspace:o,isWorkspaceFavorited:s,onToggleFavorite:u}){const[f,p]=v.useState(!1),[h,y]=v.useState(!1);return d.jsxs(d.Fragment,{children:[d.jsxs(Ad,{open:f,onOpenChange:p,children:[d.jsx(ag,{asChild:!0,children:d.jsxs(je,{variant:"outline",role:"combobox","aria-expanded":f,"aria-label":"Select workspace",className:"w-full justify-between h-9",children:[d.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[n!=null&&n.isVirtual?d.jsx(Dh,{className:"size-4 flex-shrink-0 text-muted-foreground"}):d.jsx(za,{className:"size-4 flex-shrink-0 text-muted-foreground"}),d.jsx("span",{className:"truncate",children:(n==null?void 0:n.name)||"Select workspace"})]}),d.jsx(v1,{className:"ml-auto size-4 shrink-0 opacity-50"})]})}),d.jsx(Nd,{className:"w-[240px] p-0 max-h-[80vh]",children:d.jsxs(tg,{children:[d.jsx(cC,{placeholder:"Search workspace..."}),d.jsxs(ng,{className:"max-h-[50vh] overflow-y-auto",children:[d.jsx(rg,{children:"No workspace found."}),d.jsx(gs,{heading:"Workspaces",children:e.map(g=>d.jsxs(ji,{onSelect:()=>{a(g),p(!1)},className:"justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[g.isVirtual?d.jsx(Dh,{className:"size-4 text-muted-foreground"}):d.jsx(za,{className:"size-4 text-muted-foreground"}),d.jsx("span",{children:g.name})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("button",{className:"p-1 rounded hover:bg-secondary transition-colors",onClick:w=>{w.stopPropagation(),u(g.id,g.name)},title:s(g.id)?"Remove from favorites":"Add to favorites",children:s(g.id)?d.jsx(Sv,{className:"size-4 fill-primary text-primary"}):d.jsx(Sv,{className:"size-4 text-muted-foreground"})}),d.jsx(Qr,{className:ge("size-4",(n==null?void 0:n.id)===g.id?"opacity-100":"opacity-0")})]})]},g.id))}),d.jsx(uC,{}),d.jsxs(gs,{children:[d.jsxs(ji,{onSelect:()=>{l(),p(!1)},children:[d.jsx(Ss,{className:"size-4","data-icon":"inline-start"}),"Create virtual workspace"]}),d.jsxs(ji,{onSelect:()=>{p(!1),y(!0)},children:[d.jsx(za,{className:"size-4","data-icon":"inline-start"}),"Add existing folder"]})]})]})]})})]}),d.jsx(J4,{open:h,onOpenChange:y,onSelect:g=>{o(g),y(!1)},title:"Select Workspace Folder"})]})}function _z({onOpenAddServer:e,onServerSwitch:n}){const[a,l]=v.useState(!1),{servers:o,activeServer:s,switchServer:u}=Vi();return d.jsxs(Ad,{open:a,onOpenChange:l,children:[d.jsx(ag,{asChild:!0,children:d.jsxs(je,{variant:"outline",role:"combobox","aria-expanded":a,"aria-label":"Select server",className:"w-full justify-between h-9",children:[d.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[d.jsx(vl,{className:"size-4 flex-shrink-0 text-muted-foreground"}),d.jsx("span",{className:"truncate",children:(s==null?void 0:s.name)||"Select server"})]}),d.jsx(v1,{className:"ml-auto size-4 shrink-0 opacity-50"})]})}),d.jsx(Nd,{className:"w-[240px] p-0 max-h-[80vh]",children:d.jsxs(tg,{children:[d.jsx(cC,{placeholder:"Search server..."}),d.jsxs(ng,{className:"max-h-[50vh] overflow-y-auto",children:[d.jsx(rg,{children:"No server found."}),d.jsx(gs,{heading:"Servers",children:o.map(f=>d.jsxs(ji,{onSelect:()=>{u(f.id),n==null||n(),l(!1)},className:"justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(vl,{className:"size-4 text-muted-foreground"}),d.jsx("span",{children:f.name})]}),d.jsx(Qr,{className:ge("size-4",(s==null?void 0:s.id)===f.id?"opacity-100":"opacity-0")})]},f.id))}),d.jsx(uC,{}),d.jsx(gs,{children:d.jsxs(ji,{onSelect:()=>{e(),l(!1)},children:[d.jsx(Ss,{className:"size-4","data-icon":"inline-start"}),"Add Server..."]})})]})]})})]})}const fh=640;function jd(){const[e,n]=v.useState(void 0);return v.useEffect(()=>{const a=window.matchMedia(`(max-width: ${fh-1}px)`),l=()=>{n(window.innerWidth<fh)};return a.addEventListener("change",l),n(window.innerWidth<fh),()=>a.removeEventListener("change",l)},[]),!!e}function as({className:e,orientation:n="horizontal",decorative:a=!0,...l}){return d.jsx(_D,{"data-slot":"separator",decorative:a,orientation:n,className:ge("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...l})}function lg({...e}){return d.jsx(km,{"data-slot":"sheet",...e})}function Rz({...e}){return d.jsx(b_,{"data-slot":"sheet-trigger",...e})}function Mz({...e}){return d.jsx(Cm,{"data-slot":"sheet-portal",...e})}function Oz({className:e,...n}){return d.jsx(Em,{"data-slot":"sheet-overlay",className:ge("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...n})}function ig({className:e,children:n,side:a="right",showCloseButton:l=!0,...o}){return d.jsxs(Mz,{children:[d.jsx(Oz,{}),d.jsxs(Am,{"data-slot":"sheet-content","data-side":a,className:ge("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",e),style:a==="left"||a==="right"?{top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)"}:void 0,...o,children:[n,l&&d.jsx(rd,{"data-slot":"sheet-close",asChild:!0,children:d.jsxs(je,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[d.jsx(Ri,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function og({className:e,...n}){return d.jsx("div",{"data-slot":"sheet-header",className:ge("flex flex-col gap-0.5 p-4",e),...n})}function sg({className:e,...n}){return d.jsx(dw,{"data-slot":"sheet-title",className:ge("text-base font-medium text-foreground",e),...n})}function Dz({className:e,...n}){return d.jsx(fw,{"data-slot":"sheet-description",className:ge("text-sm text-muted-foreground",e),...n})}function ys({delayDuration:e=0,...n}){return d.jsx(WD,{"data-slot":"tooltip-provider",delayDuration:e,...n})}function Li({...e}){return d.jsx(JD,{"data-slot":"tooltip",...e})}function Ii({...e}){return d.jsx(e4,{"data-slot":"tooltip-trigger",...e})}function Bi({className:e,sideOffset:n=0,children:a,...l}){return d.jsx(t4,{children:d.jsxs(n4,{"data-slot":"tooltip-content",sideOffset:n,className:ge("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l,children:[a,d.jsx(r4,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}const zz="sidebar_state",Lz=3600*24*7,Iz="16rem",Bz="18rem",Pz="3rem",Fz="b",dC=v.createContext(null);function cg(){const e=v.useContext(dC);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Uz({defaultOpen:e=!0,open:n,onOpenChange:a,className:l,style:o,children:s,...u}){const f=jd(),[p,h]=v.useState(!1),[y,g]=v.useState(e),w=n!=null?n:y,b=v.useCallback(A=>{const N=typeof A=="function"?A(w):A;a?a(N):g(N),document.cookie=`${zz}=${N}; path=/; max-age=${Lz}`},[a,w]),k=v.useCallback(()=>f?h(A=>!A):b(A=>!A),[f,b,h]);v.useEffect(()=>{const A=N=>{N.key===Fz&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),k())};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[k]);const S=w?"expanded":"collapsed",E=v.useMemo(()=>({state:S,open:w,setOpen:b,isMobile:f,openMobile:p,setOpenMobile:h,toggleSidebar:k}),[S,w,b,f,p,h,k]);return d.jsx(dC.Provider,{value:E,children:d.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Iz,"--sidebar-width-icon":Pz,...o},className:ge("overflow-hidden group/sidebar-wrapper flex h-full w-full has-data-[variant=inset]:bg-sidebar",l),...u,children:s})})}function Hz({side:e="left",variant:n="sidebar",collapsible:a="offcanvas",className:l,children:o,dir:s,...u}){const{isMobile:f,state:p,openMobile:h,setOpenMobile:y}=cg();return a==="none"?d.jsx("div",{"data-slot":"sidebar",className:ge("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",l),...u,children:o}):f?d.jsx(lg,{open:h,onOpenChange:y,...u,children:d.jsxs(ig,{dir:s,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Bz},side:e,children:[d.jsxs(og,{className:"sr-only",children:[d.jsx(sg,{children:"Sidebar"}),d.jsx(Dz,{children:"Displays the mobile sidebar."})]}),d.jsx("div",{className:"flex h-full w-full flex-col",style:{paddingTop:"env(safe-area-inset-top, 0)"},children:o})]})}):d.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?a:"","data-variant":n,"data-side":e,"data-slot":"sidebar",children:[d.jsx("div",{"data-slot":"sidebar-gap",className:ge("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),d.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:ge("fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",l),style:{top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)",height:"calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0))"},...u,children:d.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:o})})]})}function d0({className:e,onClick:n,...a}){const{toggleSidebar:l}=cg();return d.jsxs(je,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:ge(e),onClick:o=>{n==null||n(o),l()},...a,children:[d.jsx(WN,{}),d.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function $z({className:e,...n}){return d.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ge("flex flex-col gap-2 p-2",e),...n})}function Vz({className:e,...n}){return d.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ge("flex flex-col gap-2 p-2",e),...n})}function qz({className:e,...n}){return d.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ge("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n})}function is({className:e,...n}){return d.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ge("relative flex w-full min-w-0 flex-col p-2",e),...n})}function os({className:e,asChild:n=!1,...a}){const l=n?Es:"div";return d.jsx(l,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:ge("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e),...a})}function ss({className:e,...n}){return d.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ge("w-full text-sm",e),...n})}function Ci({className:e,...n}){return d.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ge("flex w-full min-w-0 flex-col gap-0",e),...n})}function bl({className:e,...n}){return d.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ge("group/menu-item relative",e),...n})}const Gz=qi("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ti({asChild:e=!1,isActive:n=!1,variant:a="default",size:l="default",tooltip:o,className:s,...u}){const f=e?Es:"button",{isMobile:p,state:h}=cg(),y=d.jsx(f,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":l,"data-active":n,className:ge(Gz({variant:a,size:l}),s),...u});return o?(typeof o=="string"&&(o={children:o}),d.jsxs(Li,{children:[d.jsx(Ii,{asChild:!0,children:y}),d.jsx(Bi,{side:"right",align:"center",hidden:h!=="collapsed"||p,...o})]})):y}function Yz({className:e,asChild:n=!1,showOnHover:a=!1,...l}){const o=n?Es:"button";return d.jsx(o,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:ge("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",e),...l})}function Xz({className:e,...n}){return d.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:ge("ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border pl-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...n})}function Pi({...e}){return d.jsx(oT,{"data-slot":"collapsible",...e})}function Fi({...e}){return d.jsx(L1,{"data-slot":"collapsible-trigger",...e})}function Ui({...e}){return d.jsx(I1,{"data-slot":"collapsible-content",...e})}function Kz({...e}){return d.jsx(rO,{"data-slot":"dropdown-menu",...e})}function Qz({...e}){return d.jsx(aO,{"data-slot":"dropdown-menu-trigger",...e})}function Zz({className:e,align:n="start",sideOffset:a=4,...l}){return d.jsx(lO,{children:d.jsx(iO,{"data-slot":"dropdown-menu-content",sideOffset:a,align:n,className:ge("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l})})}function ph({className:e,inset:n,variant:a="default",...l}){return d.jsx(oO,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":a,className:ge("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...l})}const f0=Pn.memo(function({isClosed:n,onReopen:a,onClose:l,onDelete:o}){return d.jsxs(Kz,{children:[d.jsx(Qz,{asChild:!0,children:d.jsxs(Yz,{showOnHover:!0,children:[d.jsx(wN,{className:"size-4"}),d.jsx("span",{className:"sr-only",children:"Session actions"})]})}),d.jsx(Zz,{align:"end",children:n?d.jsxs(d.Fragment,{children:[d.jsxs(ph,{onClick:a,children:[d.jsx(ij,{className:"size-4"}),"Restore"]}),d.jsxs(ph,{onClick:o,className:"text-destructive focus:text-destructive",children:[d.jsx(ks,{className:"size-4"}),"Delete permanently"]})]}):d.jsxs(ph,{onClick:l,children:[d.jsx(Ri,{className:"size-4"}),"Archive"]})})]})}),p0=Pn.memo(function({status:n,isStreaming:a,runningAt:l}){return a||n==="running"||!!l?d.jsx(Un,{className:"size-3.5 animate-spin shrink-0"}):n==="error"?d.jsx(Qu,{className:"size-3.5 shrink-0"}):d.jsx(ws,{className:"size-3.5 shrink-0"})}),tm=Pn.memo(function e({session:n,allSessions:a,isActive:l,currentSessionId:o,streamingSessionId:s,onResumeSession:u,onCloseSession:f,onReopenSession:p,onDeleteSession:h}){const y=v.useMemo(()=>a.filter(S=>S.parentId===n.id),[a,n.id]),g=y.length>0,w=n.status==="closed",b=v.useMemo(()=>y.some(S=>S.id===o),[y,o]),k=n.id===s;return g?d.jsx(ys,{delayDuration:300,children:d.jsx(Pi,{defaultOpen:l||b,className:"group/collapsible",children:d.jsxs(bl,{children:[d.jsxs("div",{className:"flex items-center w-full",children:[d.jsx(Fi,{asChild:!0,children:d.jsx("button",{className:"flex items-center justify-center rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shrink-0 size-7 p-1","aria-label":"Toggle child sessions",children:d.jsx(Zr,{className:"size-4 transition-transform duration-200 [[data-state=open]>&]:rotate-90"})})}),d.jsx(Ti,{isActive:l,onClick:()=>u(n.id),className:"flex-1 min-w-0",children:d.jsxs(Li,{children:[d.jsx(Ii,{asChild:!0,children:d.jsxs("span",{className:"truncate flex items-center gap-2",children:[d.jsx(p0,{status:n.subagentStatus,isStreaming:k,runningAt:n.runningAt}),n.title||"Untitled"]})}),d.jsx(Bi,{side:"right",className:"max-w-xs",children:n.title||"Untitled"})]})}),d.jsx(f0,{isClosed:w,onReopen:()=>p(n.id),onClose:()=>f(n.id),onDelete:()=>h(n.id)})]}),d.jsx(Ui,{children:d.jsx(Xz,{children:y.map(S=>d.jsx(e,{session:S,allSessions:a,isActive:o===S.id,currentSessionId:o,streamingSessionId:s,onResumeSession:u,onCloseSession:f,onReopenSession:p,onDeleteSession:h},S.id))})})]})})}):d.jsx(ys,{delayDuration:300,children:d.jsx(bl,{children:d.jsxs("div",{className:"flex items-center w-full",children:[d.jsx("div",{className:"shrink-0 size-7 p-1"}),d.jsx(Ti,{isActive:l,onClick:()=>u(n.id),className:"flex-1 min-w-0",children:d.jsxs(Li,{children:[d.jsx(Ii,{asChild:!0,children:d.jsxs("span",{className:"truncate flex items-center gap-2",children:[d.jsx(p0,{status:n.subagentStatus,isStreaming:k,runningAt:n.runningAt}),n.title||"Untitled"]})}),d.jsx(Bi,{side:"right",className:"max-w-xs",children:n.title||"Untitled"})]})}),d.jsx(f0,{isClosed:w,onReopen:()=>p(n.id),onClose:()=>f(n.id),onDelete:()=>h(n.id)})]})})})}),Wz=qi("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function pn({className:e,variant:n="default",asChild:a=!1,...l}){const o=a?Es:"span";return d.jsx(o,{"data-slot":"badge","data-variant":n,className:ge(Wz({variant:n}),e),...l})}const Jz=Pn.memo(function({allSessions:n,currentSession:a,currentSessionId:l,streamingSessionId:o,favoritedWorkspaceIds:s,workspaces:u,activeWorkspace:f,onSelectWorkspace:p,onResumeSession:h,onCloseSession:y,onReopenSession:g,onDeleteSession:w,onCreateSessionInWorkspace:b,connected:k}){const S=v.useMemo(()=>{const A=new Map(u.map(N=>[N.id,N]));return s.map(N=>A.get(N)).filter(N=>N!==void 0)},[u,s]),E=v.useMemo(()=>{const A=new Map;for(const N of S){const j=n.filter(O=>O.workspaceId===N.id&&O.status==="active"&&O.parentId===null).sort((O,I)=>new Date(I.updatedAt).getTime()-new Date(O.updatedAt).getTime());A.set(N.id,j)}return A},[n,S]);return S.length===0?d.jsxs(is,{children:[d.jsx(os,{children:"Overview"}),d.jsx(ss,{children:d.jsx("div",{className:"px-2 py-8 text-center text-sm text-muted-foreground",children:"Star a workspace to see it here"})})]}):d.jsxs(is,{children:[d.jsx(os,{children:"Overview"}),d.jsx(ss,{children:S.map(A=>{const N=A.id===(f==null?void 0:f.id),j=E.get(A.id)||[];return d.jsx(Pi,{defaultOpen:N,className:"group/collapsible",children:d.jsxs(is,{children:[d.jsx(os,{asChild:!0,children:d.jsxs(Fi,{className:"flex items-center justify-between w-full",onClick:()=>p(A),children:[d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(Zr,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),A.isVirtual?d.jsx(Dh,{className:"size-3.5"}):d.jsx(za,{className:"size-3.5"}),d.jsx("span",{className:"truncate",children:A.name})]}),d.jsx(pn,{variant:"secondary",children:j.length})]})}),d.jsx(Ui,{children:d.jsxs(ss,{children:[d.jsx(Ci,{children:d.jsx(bl,{children:d.jsxs(Ti,{onClick:()=>b(A.id),disabled:!k,className:"w-full",children:[d.jsx(Ss,{className:"size-4","data-icon":"inline-start"}),d.jsx("span",{children:"New Chat"})]})})}),d.jsx(Ci,{children:j.length===0?d.jsx("div",{className:"px-2 py-1 text-xs text-muted-foreground",children:"(no active sessions)"}):j.map(O=>d.jsx(tm,{session:O,allSessions:n,isActive:(a==null?void 0:a.id)===O.id,currentSessionId:l,streamingSessionId:o,onResumeSession:h,onCloseSession:y,onReopenSession:g,onDeleteSession:w},O.id))})]})})]})},A.id)})})]})});function e3({sessions:e,currentSession:n,currentSessionId:a,streamingSessionId:l,connected:o,workspaces:s,activeWorkspace:u,allSessions:f,viewMode:p,favoritedWorkspaceIds:h,onCreateSession:y,onResumeSession:g,onCloseSession:w,onReopenSession:b,onDeleteSession:k,onSelectWorkspace:S,onCreateVirtualWorkspace:E,onCreatePhysicalWorkspace:A,onCreateSessionInWorkspace:N,onOpenSettings:j,onOpenMCP:O,onOpenAddServer:I,onServerSwitch:M}){const{quickConnections:U,addToQuickConnections:H,activeServer:q}=Vi(),{activeSessions:B,archivedSessions:Y}=v.useMemo(()=>{const Z=e.filter(W=>!W.parentId);return{activeSessions:Z.filter(W=>W.status==="active"),archivedSessions:Z.filter(W=>W.status==="closed")}},[e]),G=Z=>U.some(W=>W.workspaceId===Z&&W.serverId===(q==null?void 0:q.id)),he=(Z,W)=>{q&&H(q.id,q.name,Z,W)};return d.jsxs(Hz,{collapsible:"offcanvas",children:[d.jsxs($z,{children:[d.jsxs("div",{className:"p-2 space-y-2",children:[d.jsx(_z,{onOpenAddServer:I,onServerSwitch:M}),p!=="overview"&&d.jsx(Tz,{workspaces:s,activeWorkspace:u,onSelectWorkspace:S,onCreateVirtualWorkspace:E,onCreatePhysicalWorkspace:A,isWorkspaceFavorited:G,onToggleFavorite:he})]}),p!=="overview"&&d.jsx(Ci,{children:d.jsx(bl,{children:d.jsxs(Ti,{onClick:y,disabled:!o,className:"w-full",children:[d.jsx(Ss,{className:"size-4","data-icon":"inline-start"}),d.jsx("span",{children:"New Chat"})]})})})]}),d.jsx(qz,{children:p==="overview"?d.jsx(Jz,{allSessions:f,currentSession:n,currentSessionId:a,streamingSessionId:l,favoritedWorkspaceIds:h,workspaces:s,activeWorkspace:u,onSelectWorkspace:S,onResumeSession:g,onCloseSession:w,onReopenSession:b,onDeleteSession:k,onCreateSessionInWorkspace:N,connected:o}):d.jsxs(d.Fragment,{children:[B.length>0&&d.jsx(Pi,{defaultOpen:!0,className:"group/collapsible",children:d.jsxs(is,{children:[d.jsx(os,{asChild:!0,children:d.jsxs(Fi,{className:"flex items-center justify-between w-full",children:[d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(Zr,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Active"]}),d.jsx(pn,{variant:"secondary",children:B.length})]})}),d.jsx(Ui,{children:d.jsx(ss,{children:d.jsx(Ci,{children:B.map(Z=>d.jsx(tm,{session:Z,allSessions:e,isActive:(n==null?void 0:n.id)===Z.id,currentSessionId:a,streamingSessionId:l,onResumeSession:g,onCloseSession:w,onReopenSession:b,onDeleteSession:k},Z.id))})})})]})}),Y.length>0&&d.jsx(Pi,{defaultOpen:!0,className:"group/collapsible",children:d.jsxs(is,{children:[d.jsx(os,{asChild:!0,children:d.jsxs(Fi,{className:"flex items-center justify-between w-full",children:[d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(Zr,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Archived"]}),d.jsx(pn,{variant:"secondary",children:Y.length})]})}),d.jsx(Ui,{children:d.jsx(ss,{children:d.jsx(Ci,{children:Y.map(Z=>d.jsx(tm,{session:Z,allSessions:e,isActive:(n==null?void 0:n.id)===Z.id,currentSessionId:a,streamingSessionId:l,onResumeSession:g,onCloseSession:w,onReopenSession:b,onDeleteSession:k},Z.id))})})})]})}),B.length===0&&Y.length===0&&d.jsxs("div",{className:"p-4 text-center text-sm text-muted-foreground",children:["No sessions yet.",d.jsx("br",{}),"Start a new chat to begin."]})]})}),d.jsx(Vz,{className:"pb-4",children:d.jsxs(Ci,{children:[d.jsx(bl,{children:d.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[o?d.jsx(Ej,{className:"size-3.5 text-success"}):d.jsx(E1,{className:"size-3.5 text-destructive"}),d.jsx("span",{className:"text-xs text-muted-foreground",children:o?"Connected":"Disconnected"})]})}),d.jsx(bl,{children:d.jsxs(Ti,{onClick:O,children:[d.jsx(vl,{className:"size-4","data-icon":"inline-start"}),d.jsx("span",{children:"MCP Servers"})]})}),d.jsx(bl,{children:d.jsx("div",{className:"flex items-center gap-1",children:d.jsxs(Ti,{onClick:j,children:[d.jsx(S1,{className:"size-4","data-icon":"inline-start"}),d.jsx("span",{children:"Settings"})]})})})]})})]})}const t3={".ts":{icon:fr,color:"text-blue-500"},".tsx":{icon:fr,color:"text-blue-500"},".js":{icon:fr,color:"text-yellow-500"},".jsx":{icon:fr,color:"text-yellow-500"},".json":{icon:fr,color:"text-yellow-600"},".md":{icon:fr,color:"text-gray-500"},".css":{icon:fr,color:"text-purple-500"},".html":{icon:fr,color:"text-orange-500"}};function fC({entry:e,workspaceId:n,parentPath:a,depth:l,onFileSelect:o,showHidden:s=!0,serverUrl:u,apiToken:f}){const{fetchWithAuth:p}=Ls(),[h,y]=v.useState(!1),[g,w]=v.useState([]),[b,k]=v.useState(!1),[S,E]=v.useState(!1),A=a?`${a}/${e.path}`:e.path,N=e.type==="directory",j=async()=>{if(!(S||b)){k(!0);try{const B=await(await p(`/api/workspaces/${n}/files?path=${encodeURIComponent(A)}&showHidden=${s}`,{},{serverUrl:u,token:f})).json();w(B.files||[]),E(!0)}catch(q){console.error("Failed to load children:",q)}finally{k(!1)}}},O=q=>{y(q),q&&N&&j()},I=()=>{!N&&o&&o({...e,path:A})},M=e.extension?t3[e.extension]:null,U=N?h?Lh:za:(M==null?void 0:M.icon)||fr,H=N?"text-amber-500":(M==null?void 0:M.color)||"text-muted-foreground";return N?d.jsxs(Pi,{open:h,onOpenChange:O,children:[d.jsx(Fi,{asChild:!0,children:d.jsxs("button",{className:ge("flex items-center gap-1.5 w-full px-1.5 py-0.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground","transition-colors text-left"),style:{paddingLeft:`${l*12+6}px`},children:[b?d.jsx(Un,{className:"w-3 h-3 animate-spin flex-shrink-0"}):d.jsx(Zr,{className:ge("w-3 h-3 flex-shrink-0 transition-transform",h&&"rotate-90")}),d.jsx(U,{className:ge("w-4 h-4 flex-shrink-0",H)}),d.jsx("span",{className:"truncate",children:e.name})]})}),d.jsx(Ui,{children:g.map(q=>d.jsx(fC,{entry:q,workspaceId:n,parentPath:A,depth:l+1,onFileSelect:o,showHidden:s,serverUrl:u,apiToken:f},`${A}/${q.path}`))})]}):d.jsxs("button",{onClick:I,className:ge("flex items-center gap-1.5 w-full px-1.5 py-0.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground","transition-colors text-left"),style:{paddingLeft:`${l*12+6}px`},children:[d.jsx(U,{className:ge("w-4 h-4 flex-shrink-0",H)}),d.jsx("span",{className:"truncate",children:e.name})]})}function h0({workspaceId:e,serverUrl:n,apiToken:a,onFileSelect:l,showHidden:o=!0}){const[s,u]=v.useState([]),[f,p]=v.useState(""),[h,y]=v.useState(!0),[g,w]=v.useState(null),{fetchWithAuth:b}=Ls(),k=v.useCallback(async()=>{y(!0),w(null);try{const S=await b(`/api/workspaces/${e}/files?showHidden=${o}`,{},{serverUrl:n,token:a}),E=await S.json();if(!S.ok)throw new Error(E.message||"Failed to load files");u(E.files),p(E.currentPath)}catch(S){w(S instanceof Error?S.message:"Failed to load files")}finally{y(!1)}},[e,o,b,n,a]);return v.useEffect(()=>{k()},[k]),h?d.jsxs("div",{className:"flex items-center justify-center h-32 text-muted-foreground",children:[d.jsx(Un,{className:"w-4 h-4 animate-spin mr-2"}),"Loading files..."]}):g?d.jsxs("div",{className:"p-4 text-sm text-destructive",children:[g,d.jsx(je,{variant:"ghost",size:"sm",onClick:k,className:"ml-2",children:d.jsx(Ei,{className:"w-3 h-3"})})]}):s.length===0?d.jsxs("div",{className:"p-4 text-sm text-muted-foreground",children:["Empty workspace",d.jsx(je,{variant:"ghost",size:"sm",onClick:k,className:"ml-2",children:d.jsx(Ei,{className:"w-3 h-3"})})]}):d.jsx(Fa,{className:"h-full",children:d.jsxs("div",{className:"p-2",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[d.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Files"}),d.jsx(je,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:k,children:d.jsx(Ei,{className:"w-3 h-3"})})]}),d.jsx("div",{className:"space-y-0.5",children:s.map(S=>d.jsx(fC,{entry:S,workspaceId:e,parentPath:f,depth:0,onFileSelect:l,showHidden:o,serverUrl:n,apiToken:a},S.path))})]})})}function n3({workspaceId:e,searchQuery:n,selectedIndex:a,onSelect:l,onFilesChange:o,showHidden:s=!0,serverUrl:u,apiToken:f}){const[p,h]=v.useState([]),[y,g]=v.useState(!1),[w,b]=v.useState(n),{fetchWithAuth:k}=Ls();return v.useEffect(()=>{const S=setTimeout(()=>{b(n)},150);return()=>clearTimeout(S)},[n]),v.useEffect(()=>{if(!w||w.length<2){h([]),o([]);return}g(!0);const S=new AbortController;return k(`/api/workspaces/${e}/files?search=${encodeURIComponent(w)}&showHidden=${s}`,{signal:S.signal},{serverUrl:u,token:f}).then(E=>E.json()).then(E=>{const A=E.files||[];h(A),o(A)}).catch(E=>{E.name!=="AbortError"&&console.error("File search failed:",E)}).finally(()=>g(!1)),()=>S.abort()},[e,w,o,s,k,u,f]),!n||n.length<2?d.jsx("div",{className:"p-2 text-xs text-muted-foreground",children:"Type at least 2 characters to search files..."}):y?d.jsxs("div",{className:"flex items-center justify-center p-4 text-muted-foreground",children:[d.jsx(Un,{className:"w-4 h-4 animate-spin mr-2"}),"Searching..."]}):p.length===0?d.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No files found matching "',n,'"']}):d.jsxs("div",{className:"p-1",children:[p.map((S,E)=>d.jsxs("button",{onClick:()=>l(S),className:ge("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",E===a&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[S.type==="directory"?d.jsx(za,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}):d.jsx(fr,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),d.jsx("span",{className:"truncate flex-1",children:S.path}),S.extension&&d.jsx("span",{className:"text-xs text-muted-foreground",children:S.extension})]},S.path)),d.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[p.length," result",p.length!==1?"s":""," •",d.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↑↓"})," navigate",d.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"})," select",d.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"})," close"]})]})}function r3({workspaceId:e,serverUrl:n,apiToken:a,isOpen:l,onClose:o}){const s=jd();return e?s?d.jsx(lg,{open:l,onOpenChange:u=>!u&&o(),children:d.jsxs(ig,{side:"right",className:"w-72 p-0 bg-sidebar [&>button]:hidden",children:[d.jsx(og,{className:"sr-only",children:d.jsx(sg,{children:"Files"})}),d.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[d.jsx("span",{className:"font-semibold text-sm",children:"Files"}),d.jsx(je,{variant:"ghost",size:"icon-sm",onClick:o,children:d.jsx(Ri,{className:"w-4 h-4"})})]}),d.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",style:{paddingBottom:"max(1.5rem, env(safe-area-inset-bottom, 0))"},children:d.jsx(Fa,{className:"flex-1 min-h-0 pb-8",children:d.jsx(h0,{workspaceId:e,serverUrl:n,apiToken:a,showHidden:!0},e)})})]})}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:ge("relative w-64 bg-transparent transition-[width] duration-200 ease-linear",!l&&"w-0")}),d.jsxs("div",{className:ge("fixed right-0 z-10 w-64 bg-sidebar border-l border-border flex flex-col overflow-hidden","transform transition-transform duration-200 ease-linear",!l&&"translate-x-full"),style:{top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)",height:"calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0))"},children:[d.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[d.jsx("span",{className:"font-semibold text-sm",children:"Files"}),d.jsx(je,{variant:"ghost",size:"icon-sm",onClick:o,children:d.jsx(Ri,{className:"w-4 h-4"})})]}),d.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",style:{paddingBottom:"max(1.5rem, env(safe-area-inset-bottom, 0))"},children:d.jsx(Fa,{className:"flex-1 min-h-0",children:d.jsx(h0,{workspaceId:e,serverUrl:n,apiToken:a,showHidden:!0},e)})})]})]}):null}const a3=qi("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Au({className:e,variant:n,...a}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:ge(a3({variant:n}),e),...a})}function Nu({className:e,...n}){return d.jsx("div",{"data-slot":"alert-description",className:ge("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...n})}function l3({className:e,value:n,...a}){return d.jsx(_O,{"data-slot":"progress",className:ge("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),...a,children:d.jsx(RO,{"data-slot":"progress-indicator",className:"size-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})})}function yu(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":e.toString()}function i3(e){return e>=60?"critical":e>=40?"warning":"normal"}function o3({totalTokens:e=0,contextWindow:n=0,modelName:a="",compact:l=!1}){const o=e===0?0:n,s=o===0?0:Math.min(100,Math.round(e/o*100)),u=i3(s);return l?d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsxs("span",{className:"text-xs font-mono",children:[yu(e),"/",yu(o)]}),d.jsx(ys,{children:d.jsxs(Li,{children:[d.jsx(Ii,{asChild:!0,children:d.jsx(wv,{className:"size-3 text-muted-foreground cursor-help"})}),d.jsxs(Bi,{side:"bottom",children:[d.jsxs("p",{className:"text-xs",children:["Model: ",a]}),d.jsxs("p",{className:"text-xs",children:[s,"% of context window used"]})]})]})})]}):d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-muted-foreground",children:"Tokens:"}),d.jsxs("span",{className:"text-xs font-mono",children:[yu(e),"/",yu(o)]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(l3,{value:s,className:ge("h-1 w-20",u==="critical"&&"[&>div]:bg-destructive",u==="warning"&&"[&>div]:bg-warning",u==="normal"&&"[&>div]:bg-primary")}),d.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["(",s,"%)"]})]})]}),d.jsx(ys,{children:d.jsxs(Li,{children:[d.jsx(Ii,{asChild:!0,children:d.jsx(wv,{className:"size-3.5 text-muted-foreground cursor-help"})}),d.jsx(Bi,{side:"bottom",children:d.jsxs("p",{className:"text-xs",children:["Model: ",a]})})]})})]})}function pC({...e}){return d.jsx(pD,{"data-slot":"select",...e})}function s3({className:e,...n}){return d.jsx(vD,{"data-slot":"select-group",className:ge("scroll-my-1 p-1",e),...n})}function $u({...e}){return d.jsx(mD,{"data-slot":"select-value",...e})}function hC({className:e,size:n="default",children:a,...l}){return d.jsxs(hD,{"data-slot":"select-trigger","data-size":n,className:ge("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l,children:[a,d.jsx(gD,{asChild:!0,children:d.jsx($i,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function mC({className:e,children:n,position:a="item-aligned",align:l="center",...o}){return d.jsx(yD,{children:d.jsxs(xD,{"data-slot":"select-content","data-align-trigger":a==="item-aligned",className:ge("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,align:l,...o,children:[d.jsx(u3,{}),d.jsx(bD,{"data-position":a,className:ge("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",a==="popper"&&""),children:n}),d.jsx(d3,{})]})})}function c3({className:e,...n}){return d.jsx(wD,{"data-slot":"select-label",className:ge("px-1.5 py-1 text-xs text-muted-foreground",e),...n})}function gC({className:e,children:n,...a}){return d.jsxs(SD,{"data-slot":"select-item",className:ge("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...a,children:[d.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:d.jsx(CD,{children:d.jsx(Qr,{className:"pointer-events-none"})})}),d.jsx(kD,{children:n})]})}function u3({className:e,...n}){return d.jsx(ED,{"data-slot":"select-scroll-up-button",className:ge("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...n,children:d.jsx(cN,{})})}function d3({className:e,...n}){return d.jsx(AD,{"data-slot":"select-scroll-down-button",className:ge("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...n,children:d.jsx($i,{})})}function La({className:e,...n}){return d.jsx(cO,{"data-slot":"label",className:ge("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}function f3(e){switch(e){case"budget":return"$";case"standard":return"$$";case"premium":return"$$$";default:return""}}function p3({models:e,selectedModelId:n,onChangeModel:a,disabled:l,iconOnly:o=!1}){const s=e.reduce((f,p)=>(f[p.providerName]||(f[p.providerName]=[]),f[p.providerName].push(p),f),{}),u=f=>{const p=e.find(h=>h.id===f);p&&a(f,p.providerId)};return d.jsxs("div",{className:"flex items-center gap-2",children:[!o&&d.jsx(La,{className:"text-xs text-muted-foreground",children:"Model:"}),d.jsxs(pC,{value:n||"",onValueChange:u,disabled:l,children:[d.jsx(hC,{className:o?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[180px] h-8 text-sm",children:o?d.jsxs(d.Fragment,{children:[d.jsx(bN,{className:"size-4"}),d.jsx($u,{className:"sr-only"})]}):d.jsx($u,{placeholder:"Select model"})}),d.jsx(mC,{children:Object.entries(s).map(([f,p])=>d.jsxs(s3,{children:[d.jsx(c3,{children:f}),p.map(h=>d.jsx(gC,{value:h.id,children:d.jsxs("span",{className:"flex items-center gap-2",children:[h.name,d.jsx("span",{className:"text-muted-foreground text-xs",children:f3(h.tier)})]})},h.id))]},f))})]})]})}function h3({preconfigs:e,selectedPreconfigId:n,onChangePreconfig:a,disabled:l,iconOnly:o=!1}){return d.jsxs("div",{className:"flex items-center gap-2",children:[!o&&d.jsx(La,{className:"text-xs text-muted-foreground",children:"Config:"}),d.jsxs(pC,{value:n||"",onValueChange:a,disabled:l,children:[d.jsx(hC,{className:o?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[140px] h-8 text-sm",children:o?d.jsxs(d.Fragment,{children:[d.jsx(S1,{className:"size-4"}),d.jsx($u,{className:"sr-only"})]}):d.jsx($u,{placeholder:"Select config"})}),d.jsx(mC,{children:e.map(s=>d.jsxs(gC,{value:s.id,children:[s.name,s.isDefault&&d.jsx("span",{className:"ml-2 text-muted-foreground text-xs",children:"(default)"})]},s.id))})]})]})}function m3({session:e,preconfigs:n,models:a,usage:l,modelName:o,onChangePreconfig:s,onChangeModel:u,onRename:f,onNavigateBack:p,isStreaming:h,onInterrupt:y,onCompact:g,isCompacting:w,canCompact:b}){var B;const[k,S]=v.useState(!1),[E,A]=v.useState(e.title||""),N=v.useRef(null),j=jd();v.useEffect(()=>{k&&N.current&&(N.current.focus(),N.current.select())},[k]);const O=()=>{A(e.title||""),S(!0)},I=()=>{const Y=E.trim();Y&&Y!==e.title&&f(e.id,Y),S(!1)},M=Y=>{Y.key==="Enter"?I():Y.key==="Escape"&&(A(e.title||""),S(!1))},U=e.selectedModel||((B=n.find(Y=>Y.id===e.preconfigId))==null?void 0:B.model)||o,H=a.find(Y=>Y.id===U),q=H==null?void 0:H.contextWindow;return d.jsxs("header",{className:"flex flex-col border-b border-border bg-card",children:[d.jsx("div",{className:"flex items-center justify-start px-4 py-2",children:d.jsxs("div",{className:"flex items-center gap-3",children:[e.parentId&&p&&d.jsxs(je,{variant:"ghost",size:"sm",onClick:p,className:"h-7",children:[d.jsx(JA,{className:"size-4","data-icon":"inline-start"}),"Back"]}),k?d.jsx("input",{ref:N,type:"text",value:E,onChange:Y=>A(Y.target.value),onBlur:I,onKeyDown:M,className:"text-lg font-semibold bg-background border border-primary rounded px-2 py-0.5 outline-none min-w-0 flex-1",autoFocus:!0}):d.jsx("h2",{className:"text-lg font-semibold cursor-pointer px-2 py-0.5 -mx-2 rounded hover:bg-accent transition-colors",onDoubleClick:O,children:e.title||"Untitled Session"}),d.jsx(pn,{variant:"outline",className:"font-mono text-xs",children:e.id.slice(0,8)}),e.status==="closed"&&d.jsxs(pn,{variant:"secondary",children:[d.jsx(ZA,{className:"size-3","data-icon":"inline-start"}),"Archived"]})]})}),d.jsx(as,{}),d.jsxs("div",{className:"inline-flex align-middle items-center gap-3 sm:gap-4 px-4 py-2 flex-wrap",children:[d.jsx(o3,{promptTokens:l.promptTokens,completionTokens:l.completionTokens,totalTokens:l.totalTokens,contextWindow:q,modelName:o,compact:j}),d.jsx(as,{orientation:"vertical",className:"hidden sm:block"}),d.jsx(p3,{models:a,selectedModelId:U,onChangeModel:u,disabled:e.status==="closed"||!!e.parentId,iconOnly:j}),d.jsx(h3,{preconfigs:n,selectedPreconfigId:e.preconfigId,onChangePreconfig:s,disabled:e.status==="closed"||!!e.parentId,iconOnly:j}),d.jsx(as,{orientation:"vertical",className:"hidden sm:block"}),g&&d.jsxs(je,{variant:"outline",size:j?"icon":"sm",onClick:g,disabled:h||w||!b,title:w?"Compacting...":"Compact older messages",children:[d.jsx(GN,{className:"size-4"}),!j&&d.jsx("span",{className:"ml-1",children:w?"Compacting...":"Compact"})]}),d.jsx(as,{orientation:"vertical",className:"hidden sm:block"}),d.jsxs(je,{variant:h?"destructive":"outline",size:j?"icon":"sm",onClick:y,disabled:!y,className:h?"":"opacity-60 hover:opacity-100",title:h?"Interrupt operation":"Interrupt (no active operation)",children:[d.jsx(C1,{className:"size-4"}),!j&&d.jsx("span",{className:"ml-1",children:"Stop"})]})]})]})}function m0({open:e,onOpenChange:n,title:a,description:l,confirmLabel:o="Confirm",cancelLabel:s="Cancel",onConfirm:u,variant:f="default"}){const p=()=>{u(),n(!1)};return d.jsx(Zi,{open:e,onOpenChange:n,children:d.jsxs(Wi,{showCloseButton:!1,children:[d.jsxs(Ji,{children:[d.jsx(eo,{children:a}),d.jsx(Is,{children:l})]}),d.jsxs(Cd,{children:[d.jsx(K4,{asChild:!0,children:d.jsx(je,{variant:"outline",children:s})}),d.jsx(je,{onClick:p,variant:f==="destructive"?"destructive":"default",children:o})]})]})})}function g3({message:e,textContent:n,children:a,isQueued:l=!1,onRemove:o,onRevert:s,canRevert:u=!1,onFork:f,canFork:p=!1}){const[h,y]=v.useState(!1),[g,w]=v.useState(!1),[b,k]=v.useState(!1),S=e.role==="user",E=async()=>{const A=n||"";await navigator.clipboard.writeText(A),y(!0),setTimeout(()=>y(!1),2e3)};return d.jsxs("div",{className:ge("flex flex-col gap-1 mb-4 animate-slide-up min-w-0",S?"items-end":"items-start"),children:[d.jsx("div",{className:ge("flex items-center gap-1.5 text-xs uppercase tracking-wide text-muted-foreground",S?"mr-3":"ml-3"),children:S?d.jsxs(d.Fragment,{children:[!l&&d.jsxs(d.Fragment,{children:[u&&s&&d.jsx(je,{variant:"ghost",size:"icon",onClick:()=>w(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Revert to this point",children:d.jsx(vj,{className:"size-3"})}),p&&f&&d.jsx(je,{variant:"ghost",size:"icon",onClick:()=>k(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Fork from this point",children:d.jsx(DN,{className:"size-3"})}),d.jsx(je,{variant:"ghost",size:"icon",onClick:E,className:"size-5 text-muted-foreground hover:text-foreground",children:h?d.jsx(Qr,{className:"size-3"}):d.jsx(Tu,{className:"size-3"})})]}),d.jsx(Sj,{className:"size-3"}),e.role]}):d.jsxs(d.Fragment,{children:[d.jsx(tN,{className:"size-3"}),e.role,d.jsx(je,{variant:"ghost",size:"icon",onClick:E,className:"size-5 text-muted-foreground hover:text-foreground",children:h?d.jsx(Qr,{className:"size-3"}):d.jsx(Tu,{className:"size-3"})})]})}),d.jsxs("div",{className:ge("rounded-2xl px-4 py-3 max-w-full relative group min-w-0 overflow-hidden",l?"bg-muted border-2 border-dashed border-muted-foreground/30 opacity-80":S?"bg-primary text-primary-foreground rounded-br-md":"bg-card text-card-foreground border border-border rounded-bl-md"),children:[l&&d.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2 pb-2 border-b border-muted-foreground/20",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(w1,{className:"size-3 animate-pulse"}),d.jsx("span",{children:"Pending"})]}),o&&d.jsx(je,{variant:"ghost",size:"icon",onClick:o,className:"size-6 text-muted-foreground hover:text-destructive hover:bg-destructive/10",title:"Remove from queue",children:d.jsx(Ri,{className:"size-3"})})]}),d.jsx("div",{className:"min-w-0",children:a})]}),d.jsx(m0,{open:g,onOpenChange:w,title:"Revert Conversation",description:"This will delete this message and all messages after it. Are you sure you want to continue?",confirmLabel:"Revert",cancelLabel:"Cancel",onConfirm:()=>{s==null||s()},variant:"destructive"}),d.jsx(m0,{open:b,onOpenChange:k,title:"Fork Conversation",description:"This will create a new session with messages up to and including this point. The original session will be unchanged.",confirmLabel:"Fork",cancelLabel:"Cancel",onConfirm:()=>{f==null||f()}})]})}var y3=Object.create,Td=Object.defineProperty,x3=Object.defineProperties,b3=Object.getOwnPropertyDescriptor,v3=Object.getOwnPropertyDescriptors,yC=Object.getOwnPropertyNames,Vu=Object.getOwnPropertySymbols,w3=Object.getPrototypeOf,ug=Object.prototype.hasOwnProperty,xC=Object.prototype.propertyIsEnumerable,g0=(e,n,a)=>n in e?Td(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,yr=(e,n)=>{for(var a in n||(n={}))ug.call(n,a)&&g0(e,a,n[a]);if(Vu)for(var a of Vu(n))xC.call(n,a)&&g0(e,a,n[a]);return e},_d=(e,n)=>x3(e,v3(n)),bC=(e,n)=>{var a={};for(var l in e)ug.call(e,l)&&n.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&Vu)for(var l of Vu(e))n.indexOf(l)<0&&xC.call(e,l)&&(a[l]=e[l]);return a},S3=(e,n)=>function(){return n||(0,e[yC(e)[0]])((n={exports:{}}).exports,n),n.exports},k3=(e,n)=>{for(var a in n)Td(e,a,{get:n[a],enumerable:!0})},C3=(e,n,a,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of yC(n))!ug.call(e,o)&&o!==a&&Td(e,o,{get:()=>n[o],enumerable:!(l=b3(n,o))||l.enumerable});return e},E3=(e,n,a)=>(a=e!=null?y3(w3(e)):{},C3(!e||!e.__esModule?Td(a,"default",{value:e,enumerable:!0}):a,e)),A3=S3({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,n){var a=(function(){var l=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},u={util:{encode:function k(S){return S instanceof f?new f(S.type,k(S.content),S.alias):Array.isArray(S)?S.map(k):S.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(k){return Object.prototype.toString.call(k).slice(8,-1)},objId:function(k){return k.__id||Object.defineProperty(k,"__id",{value:++o}),k.__id},clone:function k(S,E){E=E||{};var A,N;switch(u.util.type(S)){case"Object":if(N=u.util.objId(S),E[N])return E[N];A={},E[N]=A;for(var j in S)S.hasOwnProperty(j)&&(A[j]=k(S[j],E));return A;case"Array":return N=u.util.objId(S),E[N]?E[N]:(A=[],E[N]=A,S.forEach(function(O,I){A[I]=k(O,E)}),A);default:return S}},getLanguage:function(k){for(;k;){var S=l.exec(k.className);if(S)return S[1].toLowerCase();k=k.parentElement}return"none"},setLanguage:function(k,S){k.className=k.className.replace(RegExp(l,"gi"),""),k.classList.add("language-"+S)},isActive:function(k,S,E){for(var A="no-"+S;k;){var N=k.classList;if(N.contains(S))return!0;if(N.contains(A))return!1;k=k.parentElement}return!!E}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(k,S){var E=u.util.clone(u.languages[k]);for(var A in S)E[A]=S[A];return E},insertBefore:function(k,S,E,A){A=A||u.languages;var N=A[k],j={};for(var O in N)if(N.hasOwnProperty(O)){if(O==S)for(var I in E)E.hasOwnProperty(I)&&(j[I]=E[I]);E.hasOwnProperty(O)||(j[O]=N[O])}var M=A[k];return A[k]=j,u.languages.DFS(u.languages,function(U,H){H===M&&U!=k&&(this[U]=j)}),j},DFS:function k(S,E,A,N){N=N||{};var j=u.util.objId;for(var O in S)if(S.hasOwnProperty(O)){E.call(S,O,S[O],A||O);var I=S[O],M=u.util.type(I);M==="Object"&&!N[j(I)]?(N[j(I)]=!0,k(I,E,null,N)):M==="Array"&&!N[j(I)]&&(N[j(I)]=!0,k(I,E,O,N))}}},plugins:{},highlight:function(k,S,E){var A={code:k,grammar:S,language:E};if(u.hooks.run("before-tokenize",A),!A.grammar)throw new Error('The language "'+A.language+'" has no grammar.');return A.tokens=u.tokenize(A.code,A.grammar),u.hooks.run("after-tokenize",A),f.stringify(u.util.encode(A.tokens),A.language)},tokenize:function(k,S){var E=S.rest;if(E){for(var A in E)S[A]=E[A];delete S.rest}var N=new y;return g(N,N.head,k),h(k,N,S,N.head,0),b(N)},hooks:{all:{},add:function(k,S){var E=u.hooks.all;E[k]=E[k]||[],E[k].push(S)},run:function(k,S){var E=u.hooks.all[k];if(!(!E||!E.length))for(var A=0,N;N=E[A++];)N(S)}},Token:f};function f(k,S,E,A){this.type=k,this.content=S,this.alias=E,this.length=(A||"").length|0}f.stringify=function k(S,E){if(typeof S=="string")return S;if(Array.isArray(S)){var A="";return S.forEach(function(M){A+=k(M,E)}),A}var N={type:S.type,content:k(S.content,E),tag:"span",classes:["token",S.type],attributes:{},language:E},j=S.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(N.classes,j):N.classes.push(j)),u.hooks.run("wrap",N);var O="";for(var I in N.attributes)O+=" "+I+'="'+(N.attributes[I]||"").replace(/"/g,""")+'"';return"<"+N.tag+' class="'+N.classes.join(" ")+'"'+O+">"+N.content+"</"+N.tag+">"};function p(k,S,E,A){k.lastIndex=S;var N=k.exec(E);if(N&&A&&N[1]){var j=N[1].length;N.index+=j,N[0]=N[0].slice(j)}return N}function h(k,S,E,A,N,j){for(var O in E)if(!(!E.hasOwnProperty(O)||!E[O])){var I=E[O];I=Array.isArray(I)?I:[I];for(var M=0;M<I.length;++M){if(j&&j.cause==O+","+M)return;var U=I[M],H=U.inside,q=!!U.lookbehind,B=!!U.greedy,Y=U.alias;if(B&&!U.pattern.global){var G=U.pattern.toString().match(/[imsuy]*$/)[0];U.pattern=RegExp(U.pattern.source,G+"g")}for(var he=U.pattern||U,Z=A.next,W=N;Z!==S.tail&&!(j&&W>=j.reach);W+=Z.value.length,Z=Z.next){var z=Z.value;if(S.length>k.length)return;if(!(z instanceof f)){var K=1,ee;if(B){if(ee=p(he,W,k,q),!ee||ee.index>=k.length)break;var L=ee.index,le=ee.index+ee[0].length,T=W;for(T+=Z.value.length;L>=T;)Z=Z.next,T+=Z.value.length;if(T-=Z.value.length,W=T,Z.value instanceof f)continue;for(var D=Z;D!==S.tail&&(T<le||typeof D.value=="string");D=D.next)K++,T+=D.value.length;K--,z=k.slice(W,T),ee.index-=W}else if(ee=p(he,0,z,q),!ee)continue;var L=ee.index,_=ee[0],te=z.slice(0,L),ne=z.slice(L+_.length),ie=W+z.length;j&&ie>j.reach&&(j.reach=ie);var ae=Z.prev;te&&(ae=g(S,ae,te),W+=te.length),w(S,ae,K);var be=new f(O,H?u.tokenize(_,H):_,Y,_);if(Z=g(S,ae,be),ne&&g(S,Z,ne),K>1){var me={cause:O+","+M,reach:ie};h(k,S,E,Z.prev,W,me),j&&me.reach>j.reach&&(j.reach=me.reach)}}}}}}function y(){var k={value:null,prev:null,next:null},S={value:null,prev:k,next:null};k.next=S,this.head=k,this.tail=S,this.length=0}function g(k,S,E){var A=S.next,N={value:E,prev:S,next:A};return S.next=N,A.prev=N,k.length++,N}function w(k,S,E){for(var A=S.next,N=0;N<E&&A!==k.tail;N++)A=A.next;S.next=A,A.prev=S,k.length-=N}function b(k){for(var S=[],E=k.head.next;E!==k.tail;)S.push(E.value),E=E.next;return S}return u})();n.exports=a,a.default=a}}),fe=E3(A3());fe.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},fe.languages.markup.tag.inside["attr-value"].inside.entity=fe.languages.markup.entity,fe.languages.markup.doctype.inside["internal-subset"].inside=fe.languages.markup,fe.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(fe.languages.markup.tag,"addInlined",{value:function(e,l){var a={},a=(a["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:fe.languages[l]},a.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}}),l=(a["language-"+l]={pattern:/[\s\S]+/,inside:fe.languages[l]},{});l[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:a},fe.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(fe.languages.markup.tag,"addAttribute",{value:function(e,n){fe.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:fe.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),fe.languages.html=fe.languages.markup,fe.languages.mathml=fe.languages.markup,fe.languages.svg=fe.languages.markup,fe.languages.xml=fe.languages.extend("markup",{}),fe.languages.ssml=fe.languages.xml,fe.languages.atom=fe.languages.xml,fe.languages.rss=fe.languages.xml,(function(e){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},a=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,l="(?:[^\\\\-]|"+a.source+")",l=RegExp(l+"-"+l),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:a,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:a}},"special-escape":n,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:a,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(fe),fe.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},fe.languages.javascript=fe.languages.extend("clike",{"class-name":[fe.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),fe.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,fe.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:fe.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:fe.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:fe.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:fe.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:fe.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),fe.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:fe.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),fe.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),fe.languages.markup&&(fe.languages.markup.tag.addInlined("script","javascript"),fe.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),fe.languages.js=fe.languages.javascript,fe.languages.actionscript=fe.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),fe.languages.actionscript["class-name"].alias="function",delete fe.languages.actionscript.parameter,delete fe.languages.actionscript["literal-property"],fe.languages.markup&&fe.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:fe.languages.markup}}),(function(e){var n=/#(?!\{).+/,a={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:a}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:a}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:a}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(fe),(function(e){var n=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(n,"addSupport",{value:function(a,l){(a=typeof a=="string"?[a]:a).forEach(function(o){var s=function(g){g.inside||(g.inside={}),g.inside.rest=l},u="doc-comment";if(f=e.languages[o]){var f,p=f[u];if((p=p||(f=e.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[u])instanceof RegExp&&(p=f[u]={pattern:p}),Array.isArray(p))for(var h=0,y=p.length;h<y;h++)p[h]instanceof RegExp&&(p[h]={pattern:p[h]}),s(p[h]);else s(p)}})}}),n.addSupport(["java","javascript","php"],n)})(fe),(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,n=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(fe),(function(e){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:n={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=n,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,number:a})})(fe),(function(e){var n=/[*&][^\s[\]{},]+/,a=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,l="(?:"+a.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+a.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function u(f,p){p=(p||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<value>>/g,function(){return f});return RegExp(h,p)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return l})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:u(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:u(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:u(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:u(s),lookbehind:!0,greedy:!0},number:{pattern:u(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:a,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(fe),(function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function a(h){return h=h.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+h+")")}var l=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return l}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,u=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+s+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+s+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(l),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(l),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:a(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:a(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:a(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:a(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(h){["url","bold","italic","strike","code-snippet"].forEach(function(y){h!==y&&(e.languages.markdown[h].inside.content.inside[y]=e.languages.markdown[y])})}),e.hooks.add("after-tokenize",function(h){h.language!=="markdown"&&h.language!=="md"||(function y(g){if(g&&typeof g!="string")for(var w=0,b=g.length;w<b;w++){var k,S=g[w];S.type!=="code"?y(S.content):(k=S.content[1],S=S.content[3],k&&S&&k.type==="code-language"&&S.type==="code-block"&&typeof k.content=="string"&&(k=k.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),k="language-"+(k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase()),S.alias?typeof S.alias=="string"?S.alias=[S.alias,k]:S.alias.push(k):S.alias=[k]))}})(h.tokens)}),e.hooks.add("wrap",function(h){if(h.type==="code-block"){for(var y="",g=0,w=h.classes.length;g<w;g++){var b=h.classes[g],b=/language-(.+)/.exec(b);if(b){y=b[1];break}}var k,S=e.languages[y];S?h.content=e.highlight((function(E){return E=E.replace(u,""),E=E.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(A,N){var j;return(N=N.toLowerCase())[0]==="#"?(j=N[1]==="x"?parseInt(N.slice(2),16):Number(N.slice(1)),p(j)):f[N]||A})})(h.content),S,y):y&&y!=="none"&&e.plugins.autoloader&&(k="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),h.attributes.id=k,e.plugins.autoloader.loadLanguages(y,function(){var E=document.getElementById(k);E&&(E.innerHTML=e.highlight(E.textContent,e.languages[y],y))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},p=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(fe),fe.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:fe.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},fe.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var n=e.tokens.filter(function(k){return typeof k!="string"&&k.type!=="comment"&&k.type!=="scalar"}),a=0;a<n.length;){var l=n[a++];if(l.type==="keyword"&&l.content==="mutation"){var o=[];if(g(["definition-mutation","punctuation"])&&y(1).content==="("){a+=2;var s=w(/^\($/,/^\)$/);if(s===-1)continue;for(;a<s;a++){var u=y(0);u.type==="variable"&&(b(u,"variable-input"),o.push(u.content))}a=s+1}if(g(["punctuation","property-query"])&&y(0).content==="{"&&(a++,b(y(0),"property-mutation"),0<o.length)){var f=w(/^\{$/,/^\}$/);if(f!==-1)for(var p=a;p<f;p++){var h=n[p];h.type==="variable"&&0<=o.indexOf(h.content)&&b(h,"variable-input")}}}}function y(k){return n[a+k]}function g(k,S){S=S||0;for(var E=0;E<k.length;E++){var A=y(E+S);if(!A||A.type!==k[E])return}return 1}function w(k,S){for(var E=1,A=a;A<n.length;A++){var N=n[A],j=N.content;if(N.type==="punctuation"&&typeof j=="string"){if(k.test(j))E++;else if(S.test(j)&&--E===0)return A}}return-1}function b(k,S){var E=k.alias;E?Array.isArray(E)||(k.alias=E=[E]):k.alias=E=[],E.push(S)}}),fe.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(e){var n=e.languages.javascript["template-string"],a=n.pattern.source,l=n.inside.interpolation,o=l.inside["interpolation-punctuation"],s=l.pattern.source;function u(g,w){if(e.languages[g])return{pattern:RegExp("((?:"+w+")\\s*)"+a),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:g}}}}function f(g,w,b){return g={code:g,grammar:w,language:b},e.hooks.run("before-tokenize",g),g.tokens=e.tokenize(g.code,g.grammar),e.hooks.run("after-tokenize",g),g.tokens}function p(g,w,b){var E=e.tokenize(g,{interpolation:{pattern:RegExp(s),lookbehind:!0}}),k=0,S={},E=f(E.map(function(N){if(typeof N=="string")return N;for(var j,O,N=N.content;g.indexOf((O=k++,j="___"+b.toUpperCase()+"_"+O+"___"))!==-1;);return S[j]=N,j}).join(""),w,b),A=Object.keys(S);return k=0,(function N(j){for(var O=0;O<j.length;O++){if(k>=A.length)return;var I,M,U,H,q,B,Y,G=j[O];typeof G=="string"||typeof G.content=="string"?(I=A[k],(Y=(B=typeof G=="string"?G:G.content).indexOf(I))!==-1&&(++k,M=B.substring(0,Y),q=S[I],U=void 0,(H={})["interpolation-punctuation"]=o,(H=e.tokenize(q,H)).length===3&&((U=[1,1]).push.apply(U,f(H[1],e.languages.javascript,"javascript")),H.splice.apply(H,U)),U=new e.Token("interpolation",H,l.alias,q),H=B.substring(Y+I.length),q=[],M&&q.push(M),q.push(U),H&&(N(B=[H]),q.push.apply(q,B)),typeof G=="string"?(j.splice.apply(j,[O,1].concat(q)),O+=q.length-1):G.content=q)):(Y=G.content,Array.isArray(Y)?N(Y):N([Y]))}})(E),new e.Token(b,E,"language-"+b,g)}e.languages.javascript["template-string"]=[u("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),u("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),u("svg",/\bsvg/.source),u("markdown",/\b(?:markdown|md)/.source),u("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),u("sql",/\bsql/.source),n].filter(Boolean);var h={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function y(g){return typeof g=="string"?g:Array.isArray(g)?g.map(y).join(""):y(g.content)}e.hooks.add("after-tokenize",function(g){g.language in h&&(function w(b){for(var k=0,S=b.length;k<S;k++){var E,A,N,j=b[k];typeof j!="string"&&(E=j.content,Array.isArray(E)?j.type==="template-string"?(j=E[1],E.length===3&&typeof j!="string"&&j.type==="embedded-code"&&(A=y(j),j=j.alias,j=Array.isArray(j)?j[0]:j,N=e.languages[j])&&(E[1]=p(A,N,j))):w(E):typeof E!="string"&&w([E]))}})(g.tokens)})})(fe),(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript})(fe),(function(e){var n=e.languages.javascript,a=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,l="(@(?:arg|argument|param|property)\\s+(?:"+a+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(l+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(l+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:n,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return a})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+a),lookbehind:!0,inside:{string:n.string,number:n.number,boolean:n.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:n,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(fe),(function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(fe),fe.languages.n4js=fe.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),fe.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),fe.languages.n4jsd=fe.languages.n4js,(function(e){function n(u,f){return RegExp(u.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),f)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:n(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:n(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:n(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var a=["function","function-variable","method","method-variable","property-access"],l=0;l<a.length;l++){var s=a[l],o=e.languages.javascript[s],s=(o=e.util.type(o)==="RegExp"?e.languages.javascript[s]={pattern:o}:o).inside||{};(o.inside=s)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(fe),(function(e){var n=e.util.clone(e.languages.javascript),a=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,l=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function s(p,h){return p=p.replace(/<S>/g,function(){return a}).replace(/<BRACES>/g,function(){return l}).replace(/<SPREAD>/g,function(){return o}),RegExp(p,h)}o=s(o).source,e.languages.jsx=e.languages.extend("markup",n),e.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=n.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:s(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function u(p){for(var h=[],y=0;y<p.length;y++){var g=p[y],w=!1;typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?0<h.length&&h[h.length-1].tagName===f(g.content[0].content[1])&&h.pop():g.content[g.content.length-1].content!=="/>"&&h.push({tagName:f(g.content[0].content[1]),openedBraces:0}):0<h.length&&g.type==="punctuation"&&g.content==="{"?h[h.length-1].openedBraces++:0<h.length&&0<h[h.length-1].openedBraces&&g.type==="punctuation"&&g.content==="}"?h[h.length-1].openedBraces--:w=!0),(w||typeof g=="string")&&0<h.length&&h[h.length-1].openedBraces===0&&(w=f(g),y<p.length-1&&(typeof p[y+1]=="string"||p[y+1].type==="plain-text")&&(w+=f(p[y+1]),p.splice(y+1,1)),0<y&&(typeof p[y-1]=="string"||p[y-1].type==="plain-text")&&(w=f(p[y-1])+w,p.splice(y-1,1),y--),p[y]=new e.Token("plain-text",w,null,w)),g.content&&typeof g.content!="string"&&u(g.content)}}var f=function(p){return p?typeof p=="string"?p:typeof p.content=="string"?p.content:p.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(p){p.language!=="jsx"&&p.language!=="tsx"||u(p.tokens)})})(fe),(function(e){var n=e.util.clone(e.languages.typescript),n=(e.languages.tsx=e.languages.extend("jsx",n),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(fe),fe.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},fe.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=fe.languages.swift}),(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(fe),fe.languages.c=fe.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),fe.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),fe.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},fe.languages.c.string],char:fe.languages.c.char,comment:fe.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:fe.languages.c}}}}),fe.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete fe.languages.c.boolean,fe.languages.objectivec=fe.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete fe.languages.objectivec["class-name"],fe.languages.objc=fe.languages.objectivec,fe.languages.reason=fe.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),fe.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete fe.languages.reason.function,(function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,a=0;a<2;a++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(fe),fe.languages.go=fe.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),fe.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete fe.languages.go["class-name"],(function(e){var n=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,a=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return n.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return n.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return a})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(fe),fe.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},fe.languages.python["string-interpolation"].inside.interpolation.inside.rest=fe.languages.python,fe.languages.py=fe.languages.python,fe.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},fe.languages.webmanifest=fe.languages.json;var xs={};k3(xs,{dracula:()=>j3,duotoneDark:()=>_3,duotoneLight:()=>M3,github:()=>D3,gruvboxMaterialDark:()=>c5,gruvboxMaterialLight:()=>d5,jettwaveDark:()=>t5,jettwaveLight:()=>r5,nightOwl:()=>L3,nightOwlLight:()=>B3,oceanicNext:()=>F3,okaidia:()=>H3,oneDark:()=>l5,oneLight:()=>o5,palenight:()=>V3,shadesOfPurple:()=>G3,synthwave84:()=>X3,ultramin:()=>Q3,vsDark:()=>vC,vsLight:()=>J3});var N3={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},j3=N3,T3={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},_3=T3,R3={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},M3=R3,O3={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},D3=O3,z3={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},L3=z3,I3={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},B3=I3,Sn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},P3={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Sn.keyword}},{types:["attr-value"],style:{color:Sn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Sn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Sn.primitive}},{types:["boolean"],style:{color:Sn.boolean}},{types:["tag"],style:{color:Sn.tag}},{types:["string"],style:{color:Sn.string}},{types:["punctuation"],style:{color:Sn.string}},{types:["selector","char","builtin","inserted"],style:{color:Sn.char}},{types:["function"],style:{color:Sn.function}},{types:["operator","entity","url","variable"],style:{color:Sn.variable}},{types:["keyword"],style:{color:Sn.keyword}},{types:["atrule","class-name"],style:{color:Sn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},F3=P3,U3={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},H3=U3,$3={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},V3=$3,q3={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},G3=q3,Y3={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},X3=Y3,K3={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},Q3=K3,Z3={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},vC=Z3,W3={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},J3=W3,e5={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},t5=e5,n5={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},r5=n5,a5={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},l5=a5,i5={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},o5=i5,s5={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},c5=s5,u5={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},d5=u5,f5=e=>v.useCallback(n=>{var a=n,{className:l,style:o,line:s}=a,u=bC(a,["className","style","line"]);const f=_d(yr({},u),{className:Zu("token-line",l)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof o=="object"&&(f.style=yr(yr({},f.style||{}),o)),f},[e]),p5=e=>{const n=v.useCallback(({types:a,empty:l})=>{if(e!=null){{if(a.length===1&&a[0]==="plain")return l!=null?{display:"inline-block"}:void 0;if(a.length===1&&l!=null)return e[a[0]]}return Object.assign(l!=null?{display:"inline-block"}:{},...a.map(o=>e[o]))}},[e]);return v.useCallback(a=>{var l=a,{token:o,className:s,style:u}=l,f=bC(l,["token","className","style"]);const p=_d(yr({},f),{className:Zu("token",...o.types,s),children:o.content,style:n(o)});return u!=null&&(p.style=yr(yr({},p.style||{}),u)),p},[n])},h5=/\r\n|\r|\n/,y0=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
434
|
+
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
435
|
+
`,e[0].empty=!0)},x0=(e,n)=>{const a=e.length;return a>0&&e[a-1]===n?e:e.concat(n)},m5=e=>{const n=[[]],a=[e],l=[0],o=[e.length];let s=0,u=0,f=[];const p=[f];for(;u>-1;){for(;(s=l[u]++)<o[u];){let h,y=n[u];const w=a[u][s];if(typeof w=="string"?(y=u>0?y:["plain"],h=w):(y=x0(y,w.type),w.alias&&(y=x0(y,w.alias)),h=w.content),typeof h!="string"){u++,n.push(y),a.push(h),l.push(0),o.push(h.length);continue}const b=h.split(h5),k=b.length;f.push({types:y,content:b[0]});for(let S=1;S<k;S++)y0(f),p.push(f=[]),f.push({types:y,content:b[S]})}u--,n.pop(),a.pop(),l.pop(),o.pop()}return y0(f),p},b0=m5,g5=({prism:e,code:n,grammar:a,language:l})=>v.useMemo(()=>{if(a==null)return b0([n]);const o={code:n,grammar:a,language:l,tokens:[]};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(n,a),e.hooks.run("after-tokenize",o),b0(o.tokens)},[n,a,l,e]),y5=(e,n)=>{const{plain:a}=e,l=e.styles.reduce((o,s)=>{const{languages:u,style:f}=s;return u&&!u.includes(n)||s.types.forEach(p=>{const h=yr(yr({},o[p]),f);o[p]=h}),o},{});return l.root=a,l.plain=_d(yr({},a),{backgroundColor:void 0}),l},x5=y5,b5=({children:e,language:n,code:a,theme:l,prism:o})=>{const s=n.toLowerCase(),u=x5(l,s),f=f5(u),p=p5(u),h=o.languages[s],y=g5({prism:o,language:s,code:a,grammar:h});return e({tokens:y,className:`prism-code language-${s}`,style:u!=null?u.root:{},getLineProps:f,getTokenProps:p})},dg=e=>v.createElement(b5,_d(yr({},e),{prism:e.prism||fe,theme:e.theme||vC,code:e.code,language:e.language}));/*! Bundled license information:
|
|
436
|
+
|
|
437
|
+
prismjs/prism.js:
|
|
438
|
+
(**
|
|
439
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
440
|
+
*
|
|
441
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
442
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
443
|
+
* @namespace
|
|
444
|
+
* @public
|
|
445
|
+
*)
|
|
446
|
+
*/function v5(e){var l;const n=(l=e.split(".").pop())==null?void 0:l.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",md:"markdown",css:"css",html:"html",py:"python",go:"go",rs:"rust",sh:"bash",yaml:"yaml",yml:"yaml"}[n||""]||n||"text"}function w5({type:e,content:n,lineNumber:a,newLineNumber:l,language:o}){const s=ge("flex font-mono text-xs",e==="added"&&"bg-green-500/20",e==="removed"&&"bg-red-500/20",e==="context"&&"bg-muted/30"),u=ge("font-bold w-4 select-none",e==="added"&&"text-green-400",e==="removed"&&"text-red-400",e==="context"&&"text-muted-foreground/50");return d.jsxs("div",{className:s,children:[d.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:a!=null?a:""}),d.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:l!=null?l:""}),d.jsxs("span",{className:"pl-2 flex-1 whitespace-pre flex",children:[d.jsxs("span",{className:u,children:[e==="added"&&"+",e==="removed"&&"-",e==="context"&&" "]}),d.jsx(dg,{theme:xs.oneDark,code:n,language:o,children:({tokens:f,getTokenProps:p})=>d.jsx(d.Fragment,{children:f.map((h,y)=>d.jsx("span",{children:h.map((g,w)=>d.jsx("span",{...p({token:g})},w))},y))})})]})]})}function v0({hunks:e,path:n,language:a,additions:l,deletions:o}){const[s,u]=v.useState(!0),f=a||v5(n);return d.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[d.jsx("button",{onClick:()=>u(!s),className:"px-1 py-1 hover:bg-muted rounded",children:s?d.jsx($i,{className:"size-3"}):d.jsx(Zr,{className:"size-3"})}),d.jsx(hm,{className:"size-3"}),d.jsx("span",{className:"font-mono pr-2",children:n}),l!==void 0&&o!==void 0&&d.jsxs("span",{className:"ml-auto mr-2 text-muted-foreground",children:["+",l," -",o]})]}),s&&d.jsx("div",{style:{backgroundColor:"#282c34"},children:e.map((p,h)=>d.jsx("div",{className:"divide-y divide-white/5",children:p.changes.map((y,g)=>d.jsx(w5,{...y,language:f},g))},h))})]})})}function S5(e){var l;const n=(l=e.split(".").pop())==null?void 0:l.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",md:"markdown",css:"css",html:"html",py:"python",go:"go",rs:"rust",sh:"bash",yaml:"yaml",yml:"yaml"}[n||""]||n||"text"}const k5=({content:e,path:n,language:a,created:l,highlightLines:o=[]})=>{const[s,u]=v.useState(!0),f=a||S5(n),p=new Set(o);return d.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[d.jsx("button",{onClick:()=>u(!s),className:"flex items-center gap-2 px-2 py-1 hover:bg-muted",children:s?d.jsx($i,{className:"size-3"}):d.jsx(Zr,{className:"size-3"})}),d.jsx(hm,{className:"size-3"}),d.jsx("span",{className:"font-mono pr-2",children:n}),l===!1?d.jsxs("span",{className:"flex items-center gap-1 text-warning ml-auto mr-2",children:[d.jsx(ls,{className:"size-3"}),"Overwrote"]}):d.jsxs("span",{className:"flex items-center gap-1 text-success ml-auto mr-2",children:[d.jsx(Qr,{className:"size-3"}),"Created"]})]}),s&&d.jsx("div",{style:{backgroundColor:"#282c34"},children:d.jsx(dg,{theme:xs.oneDark,code:e,language:f,children:({tokens:h,getTokenProps:y})=>d.jsx(d.Fragment,{children:h.map((g,w)=>d.jsxs("div",{className:`flex font-mono text-xs ${p.has(w+1)?"bg-yellow-500/20":""}`,children:[d.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:w+1}),d.jsx("span",{className:"pl-2 flex-1 whitespace-pre",children:g.map((b,k)=>d.jsx("span",{...y({token:b})},k))})]},w))})})})]})})};function C5({message:e="Success"}){return d.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[d.jsx(ws,{className:"size-4"}),d.jsx("span",{className:"break-all",children:e})]})}const E5={edit:jN,plus:Ss,trash:ks,search:mm};function A5({text:e}){const[n,a]=v.useState(!1),l=async()=>{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),1500)};return d.jsx("button",{onClick:l,className:"text-muted-foreground hover:text-foreground transition-colors",title:"Copy path",children:n?d.jsx("span",{className:"text-success text-xs",children:"Copied!"}):d.jsx(Tu,{className:"size-3"})})}function N5({title:e,groups:n,files:a,total:l}){const s=n||(a?[{label:"Files",files:a||[],icon:void 0}]:[]);return s.length===0?null:d.jsxs("div",{className:"flex flex-col gap-3",children:[e&&d.jsxs("div",{className:"text-sm font-medium text-foreground",children:[e,l!==void 0&&d.jsxs("span",{className:"ml-2 text-muted-foreground",children:["(",l," files)"]})]}),s.map((u,f)=>d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[u.icon&&d.jsx("span",{className:"flex items-center",children:(()=>{const p=E5[u.icon];return d.jsx(p,{className:"size-3"})})()}),d.jsx("span",{children:u.label}),d.jsxs("span",{className:"text-muted-foreground/50",children:["(",u.files.length,")"]})]}),d.jsx("div",{className:"flex flex-col gap-0.5 pl-5",children:u.files.map((p,h)=>d.jsxs("div",{className:"flex items-center gap-2 text-xs group",children:[d.jsx(hm,{className:"size-3 text-muted-foreground shrink-0"}),d.jsx("span",{className:"font-mono text-foreground/80 truncate",children:p.path}),p.line!==void 0&&d.jsxs("span",{className:"text-muted-foreground shrink-0",children:[":",p.line]}),p.action&&d.jsx("span",{className:ge("text-xs px-1 rounded shrink-0",p.action==="created"&&"bg-success/20 text-success",p.action==="modified"&&"bg-warning/20 text-warning",p.action==="deleted"&&"bg-destructive/20 text-destructive"),children:p.action}),d.jsx(A5,{text:p.path})]},h))})]},f))]})}function j5({command:e,stdout:n,stderr:a,exitCode:l}){const o=l===0;return d.jsxs("div",{className:"visualization-container border border-white/10 rounded-md overflow-hidden",children:[d.jsxs("div",{className:"bg-muted px-3 py-2 flex items-center justify-between",children:[d.jsxs("div",{className:"font-mono text-xs text-muted-foreground truncate flex-1 mr-2",children:[d.jsx("span",{className:"text-muted-foreground",children:"$ "}),d.jsx("span",{className:"text-foreground",children:e})]}),d.jsxs("span",{className:`text-xs font-mono px-2 py-0.5 rounded ${o?"bg-muted text-muted-foreground":"bg-red-500/20 text-red-400"}`,children:["[",l,"]"]})]}),(n||a)&&d.jsxs("div",{className:"bg-black px-3 py-2 font-mono text-xs overflow-x-auto",children:[n&&d.jsx("pre",{className:"text-gray-300 whitespace-pre-wrap",children:n}),a&&d.jsx("pre",{className:"text-red-400 whitespace-pre-wrap mt-1",children:a})]})]})}const T5={pending:{icon:mN,color:"text-muted-foreground"},in_progress:{icon:Un,color:"text-warning",animate:!0},completed:{icon:ws,color:"text-success"},cancelled:{icon:Qu,color:"text-destructive"}},_5={high:{label:"high",className:"bg-destructive/20 text-destructive"},medium:{label:"",className:""},low:{label:"low",className:"text-muted-foreground"}};function R5({title:e,items:n}){if(n.length===0)return null;const a=n.filter(l=>l.status==="completed").length;return n.filter(l=>l.status==="in_progress").length,n.filter(l=>l.status==="pending").length,d.jsxs("div",{className:"flex flex-col gap-3 w-full overflow-hidden",children:[(e||n.length>0)&&d.jsxs("div",{className:"text-sm font-medium text-foreground",children:[e||"Todo List",d.jsxs("span",{className:"ml-2 text-muted-foreground",children:["(",n.length,")"]}),a>0&&d.jsxs("span",{className:"ml-2 text-success text-xs",children:[a," completed"]})]}),d.jsx("div",{className:"flex flex-col gap-1 w-full",children:n.map((l,o)=>{const s=T5[l.status],u=s.icon,f=_5[l.priority];return d.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[d.jsx(u,{className:ge("size-4 shrink-0",s.color,s.animate&&"animate-spin")}),d.jsx("span",{className:ge("flex-1",l.status==="completed"&&"line-through text-muted-foreground",l.status==="cancelled"&&"text-muted-foreground"),children:l.content}),f.label&&l.priority==="high"&&d.jsx("span",{className:ge("text-xs px-1.5 py-0.5 rounded shrink-0",f.className),children:f.label}),l.priority==="low"&&l.status!=="completed"&&l.status!=="cancelled"&&d.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:f.label})]},o)})})]})}function M5({visualization:e}){if(!e)return null;switch(e.type){case"diff":return d.jsx(v0,{path:e.path,hunks:e.hunks,language:e.language,additions:e.additions,deletions:e.deletions,matchInfo:e.matchInfo});case"diffs":return d.jsx("div",{className:"space-y-3",children:e.items.map((n,a)=>d.jsx(v0,{path:n.path,hunks:n.hunks,language:n.language,additions:n.additions,deletions:n.deletions,matchInfo:n.matchInfo},`${n.path}-${a}`))});case"code":return d.jsx(k5,{path:e.path,content:e.content,language:e.language,created:e.created,highlightLines:e.highlightLines});case"file-list":return d.jsx(N5,{title:e.title,groups:e.groups,files:e.files,total:e.total});case"table":return d.jsx("pre",{className:"text-xs bg-muted/50 border rounded-md p-2 overflow-x-auto",children:JSON.stringify(e.rows,null,2)});case"markdown":return d.jsx("div",{className:"prose prose-sm dark:prose-invert",children:e.content});case"none":return d.jsx(C5,{message:e.message});case"shell-output":return d.jsx(j5,{command:e.command,stdout:e.stdout,stderr:e.stderr,exitCode:e.exitCode});case"todo-list":return d.jsx(R5,{title:e.title,items:e.items});default:return null}}function O5(e){switch(e){case"pending":return d.jsx(w1,{className:"size-3 text-warning"});case"running":return d.jsx(Un,{className:"size-3 text-warning animate-spin"});case"completed":return d.jsx(ws,{className:"size-3 text-success"});case"error":return d.jsx(Qu,{className:"size-3 text-destructive"});default:return null}}function D5(e){if(e&&typeof e=="object"&&"_visualization"in e)return e._visualization}function z5({part:e,pendingPermissions:n,onPermissionResponse:a,onNavigateToSubagent:l}){const[o,s]=v.useState(!1),[u,f]=v.useState(!1),p=e.state,h=p.status,y=h==="completed"&&"output"in p?D5(p.output):void 0,g=h==="pending"?n.find(S=>S.toolCallId===e.callId):void 0;let w=null;if(e.name==="task"){if("childSessionId"in p&&p.childSessionId)w=p.childSessionId;else if(h==="completed"&&"output"in p){const E=(typeof p.output=="string"?p.output:"").match(/task_id:\s*([a-f0-9-]{36})/i);E&&(w=E[1])}}const b=async()=>{if("output"in p){const S=typeof p.output=="string"?p.output:JSON.stringify(p.output,null,2);await navigator.clipboard.writeText(S),f(!0),setTimeout(()=>f(!1),2e3)}},k=(()=>{try{const S=JSON.stringify(p.input);return S.length>50?S.slice(0,47)+"...":S}catch{return String(p.input)}})();return d.jsxs("div",{className:"my-1",children:[d.jsxs(Pi,{open:o,onOpenChange:s,children:[d.jsx(Fi,{asChild:!0,children:d.jsxs("div",{className:"flex items-center gap-2 py-1 cursor-pointer hover:text-foreground transition-colors text-muted-foreground",children:[o?d.jsx($i,{className:"size-4 text-muted-foreground"}):d.jsx(Zr,{className:"size-4 text-muted-foreground"}),d.jsx(Nj,{className:"size-3"}),d.jsx("span",{className:"text-xs truncate max-w-[120px] sm:max-w-none",children:e.name}),!o&&d.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate flex-1 min-w-0 sm:max-w-[200px] hidden sm:block",children:k}),d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[O5(h),w&&l&&d.jsxs(je,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 sm:w-auto sm:px-2",onClick:S=>{S.stopPropagation(),l(w)},title:"View session",children:[d.jsx(zh,{className:"size-3"}),d.jsx("span",{className:"hidden sm:inline ml-1",children:"View"})]})]})]})}),d.jsx(Ui,{children:d.jsxs("div",{className:"pl-5 pb-2 flex flex-col gap-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Input"}),d.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:JSON.stringify(p.input,null,2)})]}),(h==="running"||h==="completed")&&w&&l&&d.jsxs(je,{variant:"outline",className:"w-full",size:"sm",onClick:()=>l(w),children:[d.jsx(zh,{className:"size-4","data-icon":"inline-start"}),h==="running"?"Watch Subagent":"View Session"]}),h==="completed"&&"output"in p&&d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-1",children:[d.jsx("div",{className:"text-xs uppercase text-muted-foreground",children:"Output"}),d.jsx(je,{variant:"ghost",size:"icon",onClick:b,className:"size-6",children:u?d.jsx(Qr,{className:"size-3 text-success"}):d.jsx(Tu,{className:"size-3"})})]}),d.jsx("pre",{className:"text-xs bg-success/10 border border-success/20 rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:typeof p.output=="string"?p.output:JSON.stringify(p.output,null,2)})]}),h==="error"&&"error"in p&&d.jsxs("div",{children:[d.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Error"}),d.jsx("pre",{className:"text-xs bg-destructive/10 border border-destructive/20 rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words text-destructive",children:p.error})]})]})})]}),h==="pending"&&g&&d.jsxs("div",{className:"border border-warning/50 bg-warning/10 rounded-md p-3 flex flex-col gap-3 mt-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(kv,{className:"size-4 text-warning"}),d.jsx(pn,{variant:"outline",className:"text-warning border-warning",children:g.permissionType}),d.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:g.permissionKey})]}),g.message&&d.jsx("p",{className:"text-sm",children:g.message}),g.dangerous&&d.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive font-medium",children:[d.jsx(kv,{className:"size-4"}),"This operation is marked as dangerous"]}),d.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[d.jsx(je,{variant:"outline",size:"sm",onClick:()=>a(e.callId,!1,!1),children:"Deny"}),d.jsx(je,{variant:"secondary",size:"sm",onClick:()=>a(e.callId,!0,!1),children:"Approve"}),d.jsx(je,{size:"sm",onClick:()=>a(e.callId,!0,!0),children:"Always Allow"})]})]}),h==="completed"&&y&&d.jsx("div",{className:"mt-2",children:d.jsx(M5,{visualization:y})})]})}function L5({prompts:e,query:n,selectedIndex:a,onSelect:l}){const o=e.filter(s=>s.name.toLowerCase().includes(n.toLowerCase()));return o.length===0?d.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No prompts matching "/',n,'"']}):d.jsxs("div",{className:"p-1",children:[o.map((s,u)=>d.jsxs("button",{onClick:()=>l(s),className:ge("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",u===a&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[d.jsx(VN,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"font-mono text-xs",children:["/",s.name]}),d.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.description})]})]},s.name)),d.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[o.length," prompt",o.length!==1?"s":""," •",d.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↑↓"})," navigate",d.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"})," select",d.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"})," close"]})]})}function I5({workspaceId:e,debounceMs:n=150}){const[a,l]=v.useState(""),[o,s]=v.useState(!1),[u,f]=v.useState([]),p=v.useCallback(g=>{const w={type:"file",path:g.path,display:g.name};return f(b=>[...b,w]),s(!1),l(""),w},[]),h=v.useCallback((g,w,b)=>{const k=g.lastIndexOf("@",w);if(k===-1)return{text:g,cursorPos:w};const S=g.slice(0,k)+`@${b.path}`+g.slice(w),E=k+b.path.length+1;return{text:S,cursorPos:E}},[]),y=v.useCallback(g=>{const w=/@([^\s@]+)/g,b=[];let k;for(;(k=w.exec(g))!==null;){const S=k[1];u.some(E=>E.path===S)&&!b.some(E=>E.path===S)&&b.push({type:"file",path:S,display:S.split("/").pop()||S})}return b},[u]);return{query:a,setQuery:l,showAutocomplete:o,setShowAutocomplete:s,mentions:u,handleFileSelect:p,insertMention:h,extractMentions:y}}function B5(e,n){return n?e.content.includes("ARG")?e.content.replace("ARG",n):`${e.content}
|
|
447
|
+
${n}`:e.content}function P5(e){const n=e.trimStart();if(!n.startsWith("/"))return null;const a=n.indexOf(" ");return a===-1?{command:n.slice(1),rest:""}:{command:n.slice(1,a),rest:n.slice(a+1).trim()}}function F5({onSendMessage:e,disabled:n,isStreaming:a,onStopStreaming:l,placeholder:o="Type a message...",workspaceId:s,serverUrl:u,apiToken:f,prompts:p=[]}){const[h,y]=v.useState(""),[g,w]=v.useState(0),[b,k]=v.useState([]),[S,E]=v.useState(0),[A,N]=v.useState("none"),[j,O]=v.useState(""),I=v.useRef(null),{query:M,setQuery:U,showAutocomplete:H,setShowAutocomplete:q,handleFileSelect:B,insertMention:Y}=I5({workspaceId:s||""});v.useEffect(()=>{E(0)},[b,j,p]),v.useEffect(()=>{const D=I.current;D&&(D.style.height="auto",D.style.height=`${Math.min(D.scrollHeight,150)}px`)},[h]);const G=p.filter(D=>D.name.toLowerCase().includes(j.toLowerCase())),he=A==="prompts"&&p.length>0,Z=A==="files"&&H&&!!s,W=v.useCallback(D=>{const L=D.target.value,_=D.target.selectionStart||0;y(L),w(_);const te=L.lastIndexOf("/",_);if(te!==-1){const ie=te>0?L[te-1]:`
|
|
448
|
+
`,ae=L.slice(te+1,_);if((ie===`
|
|
449
|
+
`||ie===" "||ie==="")&&!ae.includes(" ")){O(ae),N("prompts");return}}const ne=L.lastIndexOf("@",_);if(ne!==-1){const ie=L.slice(ne+1,_);if(!ie.includes(" ")){U(ie),q(!0),N("files");return}}N("none"),q(!1)},[U,q]),z=v.useCallback(D=>{const L=B(D),_=Y(h,g,L);y(_.text),N("none"),q(!1),k([]),setTimeout(()=>{I.current&&(I.current.focus(),I.current.setSelectionRange(_.cursorPos,_.cursorPos))},0)},[h,g,B,Y,q]),K=v.useCallback(D=>{const L=h.lastIndexOf("/",g),_=h.slice(0,L),te=h.slice(L+1),ne=te.indexOf(" "),ie=ne!==-1?te.slice(ne):"",ae=`${_}/${D.name}${ie}`,be=L+1+D.name.length+0;y(ae),N("none"),setTimeout(()=>{I.current&&(I.current.focus(),I.current.setSelectionRange(be,be))},0)},[h,g]),ee=D=>{if(D==null||D.preventDefault(),!h.trim()||n)return;const L=P5(h);if(L){const _=p.find(te=>te.name===L.command);if(_){const te=B5(_,L.rest);e(te),y("");return}}e(h.trim()),y("")},le=D=>{if(he&&G.length>0)switch(D.key){case"ArrowDown":D.preventDefault(),E(L=>Math.min(L+1,G.length-1));return;case"ArrowUp":D.preventDefault(),E(L=>Math.max(L-1,0));return;case"Enter":if(D.shiftKey)return;D.preventDefault(),G[S]&&K(G[S]);return;case"Tab":D.preventDefault(),G[S]&&K(G[S]);return;case"Escape":D.preventDefault(),N("none");return}if(Z&&b.length>0)switch(D.key){case"ArrowDown":D.preventDefault(),E(L=>Math.min(L+1,b.length-1));return;case"ArrowUp":D.preventDefault(),E(L=>Math.max(L-1,0));return;case"Enter":D.preventDefault(),b[S]&&z(b[S]);return;case"Escape":D.preventDefault(),q(!1),N("none");return;case"Tab":D.preventDefault(),b[S]&&z(b[S]);return}D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),ee())},T=v.useCallback(D=>{k(D)},[]);return a&&l?d.jsx("div",{className:"p-4 border-t border-border bg-card",children:d.jsxs("div",{className:"flex items-center justify-center gap-3",children:[d.jsxs("div",{className:"animate-pulse flex items-center gap-2 text-muted-foreground",children:[d.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce"}),d.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce [animation-delay:0.1s]"}),d.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce [animation-delay:0.2s]"}),d.jsx("span",{className:"text-sm ml-2",children:"Generating..."})]}),d.jsxs(je,{variant:"outline",size:"sm",onClick:l,children:[d.jsx(C1,{className:"size-4","data-icon":"inline-start"}),"Stop"]})]})}):d.jsxs("form",{onSubmit:ee,className:"p-4 border-t border-border bg-card",children:[d.jsxs("div",{className:"flex gap-3 items-end",children:[d.jsx("div",{className:"flex-1 relative",children:d.jsxs(Ad,{open:he||Z,onOpenChange:D=>{D||(N("none"),q(!1))},children:[d.jsx(jz,{asChild:!0,children:d.jsx(Cz,{ref:I,value:h,onChange:W,onKeyDown:le,placeholder:o,disabled:n,className:ge("min-h-[44px] max-h-[150px] resize-none pr-12","focus-visible:ring-1"),rows:1})}),d.jsx(Nd,{className:"w-72 p-0",align:"start",side:"top",sideOffset:8,onOpenAutoFocus:D=>D.preventDefault(),onCloseAutoFocus:D=>D.preventDefault(),children:Z?d.jsx(n3,{workspaceId:s||"",searchQuery:M,selectedIndex:S,onSelect:z,onFilesChange:T,serverUrl:u,apiToken:f}):d.jsx(L5,{prompts:p,query:j,selectedIndex:S,onSelect:K})})]})}),d.jsx(je,{type:"submit",disabled:!h.trim()||n,size:"default",className:"h-11",children:d.jsx(cj,{className:"size-4"})})]}),d.jsxs("div",{className:"mt-2 text-xs text-muted-foreground text-center flex items-center justify-center gap-1",children:[d.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"/"}),d.jsx("span",{children:"prompts"}),d.jsx("span",{className:"mx-2",children:"•"}),d.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"Enter"}),d.jsx("span",{children:"to send"}),d.jsx("span",{className:"mx-2",children:"•"}),d.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"Shift + Enter"}),d.jsx("span",{children:"for new line"})]})]})}function U5(e,n){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const H5=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$5=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V5={};function w0(e,n){return(V5.jsx?$5:H5).test(e)}const q5=/[ \t\n\f\r]/g;function G5(e){return typeof e=="object"?e.type==="text"?S0(e.value):!1:S0(e)}function S0(e){return e.replace(q5,"")===""}class Ps{constructor(n,a,l){this.normal=a,this.property=n,l&&(this.space=l)}}Ps.prototype.normal={};Ps.prototype.property={};Ps.prototype.space=void 0;function wC(e,n){const a={},l={};for(const o of e)Object.assign(a,o.property),Object.assign(l,o.normal);return new Ps(a,l,n)}function nm(e){return e.toLowerCase()}class hn{constructor(n,a){this.attribute=a,this.property=n}}hn.prototype.attribute="";hn.prototype.booleanish=!1;hn.prototype.boolean=!1;hn.prototype.commaOrSpaceSeparated=!1;hn.prototype.commaSeparated=!1;hn.prototype.defined=!1;hn.prototype.mustUseProperty=!1;hn.prototype.number=!1;hn.prototype.overloadedBoolean=!1;hn.prototype.property="";hn.prototype.spaceSeparated=!1;hn.prototype.space=void 0;let Y5=0;const Ue=Rl(),_t=Rl(),rm=Rl(),ye=Rl(),ht=Rl(),_i=Rl(),kn=Rl();function Rl(){return 2**++Y5}const am=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:_t,commaOrSpaceSeparated:kn,commaSeparated:_i,number:ye,overloadedBoolean:rm,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),hh=Object.keys(am);class fg extends hn{constructor(n,a,l,o){let s=-1;if(super(n,a),k0(this,"space",o),typeof l=="number")for(;++s<hh.length;){const u=hh[s];k0(this,hh[s],(l&am[u])===am[u])}}}fg.prototype.defined=!0;function k0(e,n,a){a&&(e[n]=a)}function to(e){const n={},a={};for(const[l,o]of Object.entries(e.properties)){const s=new fg(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(s.mustUseProperty=!0),n[l]=s,a[nm(l)]=l,a[nm(s.attribute)]=l}return new Ps(n,a,e.space)}const SC=to({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:ht,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:ye,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:ht,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:_t,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function kC(e,n){return n in e?e[n]:n}function CC(e,n){return kC(e,n.toLowerCase())}const X5=to({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_i,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ht,autoFocus:Ue,autoPlay:Ue,blocking:ht,capture:null,charSet:null,checked:Ue,cite:null,className:ht,cols:ye,colSpan:null,content:null,contentEditable:_t,controls:Ue,controlsList:ht,coords:ye|_i,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:rm,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ht,height:ye,hidden:rm,high:ye,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ht,itemRef:ht,itemScope:Ue,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:ye,pattern:null,ping:ht,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ht,required:Ue,reversed:Ue,rows:ye,rowSpan:ye,sandbox:ht,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:_t,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:CC}),K5=to({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",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:kn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:ht,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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:_i,g2:_i,glyphName:_i,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:kn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kn,rev:kn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kn,requiredFeatures:kn,requiredFonts:kn,requiredFormats:kn,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:kn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:kn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:kn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kC}),EC=to({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()}}),AC=to({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:CC}),NC=to({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Q5={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"},Z5=/[A-Z]/g,C0=/-[a-z]/g,W5=/^data[-\w.:]+$/i;function J5(e,n){const a=nm(n);let l=n,o=hn;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&W5.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(C0,tL);l="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!C0.test(s)){let u=s.replace(Z5,eL);u.charAt(0)!=="-"&&(u="-"+u),n="data"+u}}o=fg}return new o(l,n)}function eL(e){return"-"+e.toLowerCase()}function tL(e){return e.charAt(1).toUpperCase()}const nL=wC([SC,X5,EC,AC,NC],"html"),pg=wC([SC,K5,EC,AC,NC],"svg");function rL(e){return e.join(" ").trim()}var bi={},mh,E0;function aL(){if(E0)return mh;E0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,a=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
|
|
450
|
+
`,h="/",y="*",g="",w="comment",b="declaration";function k(E,A){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];A=A||{};var N=1,j=1;function O(Z){var W=Z.match(n);W&&(N+=W.length);var z=Z.lastIndexOf(p);j=~z?Z.length-z:j+Z.length}function I(){var Z={line:N,column:j};return function(W){return W.position=new M(Z),q(),W}}function M(Z){this.start=Z,this.end={line:N,column:j},this.source=A.source}M.prototype.content=E;function U(Z){var W=new Error(A.source+":"+N+":"+j+": "+Z);if(W.reason=Z,W.filename=A.source,W.line=N,W.column=j,W.source=E,!A.silent)throw W}function H(Z){var W=Z.exec(E);if(W){var z=W[0];return O(z),E=E.slice(z.length),W}}function q(){H(a)}function B(Z){var W;for(Z=Z||[];W=Y();)W!==!1&&Z.push(W);return Z}function Y(){var Z=I();if(!(h!=E.charAt(0)||y!=E.charAt(1))){for(var W=2;g!=E.charAt(W)&&(y!=E.charAt(W)||h!=E.charAt(W+1));)++W;if(W+=2,g===E.charAt(W-1))return U("End of comment missing");var z=E.slice(2,W-2);return j+=2,O(z),E=E.slice(W),j+=2,Z({type:w,comment:z})}}function G(){var Z=I(),W=H(l);if(W){if(Y(),!H(o))return U("property missing ':'");var z=H(s),K=Z({type:b,property:S(W[0].replace(e,g)),value:z?S(z[0].replace(e,g)):g});return H(u),K}}function he(){var Z=[];B(Z);for(var W;W=G();)W!==!1&&(Z.push(W),B(Z));return Z}return q(),he()}function S(E){return E?E.replace(f,g):g}return mh=k,mh}var A0;function lL(){if(A0)return bi;A0=1;var e=bi&&bi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(bi,"__esModule",{value:!0}),bi.default=a;const n=e(aL());function a(l,o){let s=null;if(!l||typeof l!="string")return s;const u=(0,n.default)(l),f=typeof o=="function";return u.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:y}=p;f?o(h,y,p):y&&(s=s||{},s[h]=y)}),s}return bi}var Wo={},N0;function iL(){if(N0)return Wo;N0=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,a=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(h){return!h||a.test(h)||e.test(h)},u=function(h,y){return y.toUpperCase()},f=function(h,y){return"".concat(y,"-")},p=function(h,y){return y===void 0&&(y={}),s(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(o,f):h=h.replace(l,f),h.replace(n,u))};return Wo.camelCase=p,Wo}var Jo,j0;function oL(){if(j0)return Jo;j0=1;var e=Jo&&Jo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(lL()),a=iL();function l(o,s){var u={};return!o||typeof o!="string"||(0,n.default)(o,function(f,p){f&&p&&(u[(0,a.camelCase)(f,s)]=p)}),u}return l.default=l,Jo=l,Jo}var sL=oL();const cL=Ku(sL),jC=TC("end"),hg=TC("start");function TC(e){return n;function n(a){const l=a&&a.position&&a.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function uL(e){const n=hg(e),a=jC(e);if(n&&a)return{start:n,end:a}}function cs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?T0(e.position):"start"in e||"end"in e?T0(e):"line"in e||"column"in e?lm(e):""}function lm(e){return _0(e&&e.line)+":"+_0(e&&e.column)}function T0(e){return lm(e&&e.start)+"-"+lm(e&&e.end)}function _0(e){return e&&typeof e=="number"?e:1}class Qt extends Error{constructor(n,a,l){super(),typeof a=="string"&&(l=a,a=void 0);let o="",s={},u=!1;if(a&&("line"in a&&"column"in a?s={place:a}:"start"in a&&"end"in a?s={place:a}:"type"in a?s={ancestors:[a],place:a.position}:s={...a}),typeof n=="string"?o=n:!s.cause&&n&&(u=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof l=="string"){const p=l.indexOf(":");p===-1?s.ruleId=l:(s.source=l.slice(0,p),s.ruleId=l.slice(p+1))}if(!s.place&&s.ancestors&&s.ancestors){const p=s.ancestors[s.ancestors.length-1];p&&(s.place=p.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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=cs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=u&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qt.prototype.file="";Qt.prototype.name="";Qt.prototype.reason="";Qt.prototype.message="";Qt.prototype.stack="";Qt.prototype.column=void 0;Qt.prototype.line=void 0;Qt.prototype.ancestors=void 0;Qt.prototype.cause=void 0;Qt.prototype.fatal=void 0;Qt.prototype.place=void 0;Qt.prototype.ruleId=void 0;Qt.prototype.source=void 0;const mg={}.hasOwnProperty,dL=new Map,fL=/[A-Z]/g,pL=new Set(["table","tbody","thead","tfoot","tr"]),hL=new Set(["td","th"]),_C="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function mL(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=kL(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");l=SL(a,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,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"?pg:nL,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=RC(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function RC(e,n,a){if(n.type==="element")return gL(e,n,a);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return yL(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return bL(e,n,a);if(n.type==="mdxjsEsm")return xL(e,n);if(n.type==="root")return vL(e,n,a);if(n.type==="text")return wL(e,n)}function gL(e,n,a){const l=e.schema;let o=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=pg,e.schema=o),e.ancestors.push(n);const s=OC(e,n.tagName,!1),u=CL(e,n);let f=yg(e,n);return pL.has(n.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!G5(p):!0})),MC(e,u,s,n),gg(u,f),e.ancestors.pop(),e.schema=l,e.create(n,s,u,a)}function yL(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}bs(e,n.position)}function xL(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);bs(e,n.position)}function bL(e,n,a){const l=e.schema;let o=l;n.name==="svg"&&l.space==="html"&&(o=pg,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:OC(e,n.name,!0),u=EL(e,n),f=yg(e,n);return MC(e,u,s,n),gg(u,f),e.ancestors.pop(),e.schema=l,e.create(n,s,u,a)}function vL(e,n,a){const l={};return gg(l,yg(e,n)),e.create(n,e.Fragment,l,a)}function wL(e,n){return n.value}function MC(e,n,a,l){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(n.node=l)}function gg(e,n){if(n.length>0){const a=n.length>1?n:n[0];a&&(e.children=a)}}function SL(e,n,a){return l;function l(o,s,u,f){const h=Array.isArray(u.children)?a:n;return f?h(s,u,f):h(s,u)}}function kL(e,n){return a;function a(l,o,s,u){const f=Array.isArray(s.children),p=hg(l);return n(o,s,u,f,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function CL(e,n){const a={};let l,o;for(o in n.properties)if(o!=="children"&&mg.call(n.properties,o)){const s=AL(e,o,n.properties[o]);if(s){const[u,f]=s;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&hL.has(n.tagName)?l=f:a[u]=f}}if(l){const s=a.style||(a.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return a}function EL(e,n){const a={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const s=l.data.estree.body[0];s.type;const u=s.expression;u.type;const f=u.properties[0];f.type,Object.assign(a,e.evaluater.evaluateExpression(f.argument))}else bs(e,n.position);else{const o=l.name;let s;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else bs(e,n.position);else s=l.value===null?!0:l.value;a[o]=s}return a}function yg(e,n){const a=[];let l=-1;const o=e.passKeys?new Map:dL;for(;++l<n.children.length;){const s=n.children[l];let u;if(e.passKeys){const p=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(p){const h=o.get(p)||0;u=p+"-"+h,o.set(p,h+1)}}const f=RC(e,s,u);f!==void 0&&a.push(f)}return a}function AL(e,n,a){const l=J5(e.schema,n);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=l.commaSeparated?U5(a):rL(a)),l.property==="style"){let o=typeof a=="object"?a:NL(e,String(a));return e.stylePropertyNameCase==="css"&&(o=jL(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?Q5[l.property]||l.property:l.attribute,a]}}function NL(e,n){try{return cL(n,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const l=a,o=new Qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=_C+"#cannot-parse-style-attribute",o}}function OC(e,n,a){let l;if(!a)l={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,u;for(;++s<o.length;){const f=w0(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}l=u}else l=w0(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const o=l.value;return mg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);bs(e)}function bs(e,n){const a=new Qt("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=_C+"#cannot-handle-mdx-estrees-without-createevaluater",a}function jL(e){const n={};let a;for(a in e)mg.call(e,a)&&(n[TL(a)]=e[a]);return n}function TL(e){let n=e.replace(fL,_L);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function _L(e){return"-"+e.toLowerCase()}const gh={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"]},RL={};function xg(e,n){const a=RL,l=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,o=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return DC(e,l,o)}function DC(e,n,a){if(ML(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 R0(e.children,n,a)}return Array.isArray(e)?R0(e,n,a):""}function R0(e,n,a){const l=[];let o=-1;for(;++o<e.length;)l[o]=DC(e[o],n,a);return l.join("")}function ML(e){return!!(e&&typeof e=="object")}const M0=document.createElement("i");function bg(e){const n="&"+e+";";M0.innerHTML=n;const a=M0.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===n?!1:a}function An(e,n,a,l){const o=e.length;let s=0,u;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,a=a>0?a:0,l.length<1e4)u=Array.from(l),u.unshift(n,a),e.splice(...u);else for(a&&e.splice(n,a);s<l.length;)u=l.slice(s,s+1e4),u.unshift(n,0),e.splice(...u),s+=1e4,n+=1e4}function Fn(e,n){return e.length>0?(An(e,e.length,0,n),e):n}const O0={}.hasOwnProperty;function zC(e){const n={};let a=-1;for(;++a<e.length;)OL(n,e[a]);return n}function OL(e,n){let a;for(a in n){const o=(O0.call(e,a)?e[a]:void 0)||(e[a]={}),s=n[a];let u;if(s)for(u in s){O0.call(o,u)||(o[u]=[]);const f=s[u];DL(o[u],Array.isArray(f)?f:f?[f]:[])}}}function DL(e,n){let a=-1;const l=[];for(;++a<n.length;)(n[a].add==="after"?e:l).push(n[a]);An(e,0,0,l)}function LC(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 er(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const rn=Ya(/[A-Za-z]/),Kt=Ya(/[\dA-Za-z]/),zL=Ya(/[#-'*+\--9=?A-Z^-~]/);function qu(e){return e!==null&&(e<32||e===127)}const im=Ya(/\d/),LL=Ya(/[\dA-Fa-f]/),IL=Ya(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function pt(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Rd=Ya(new RegExp("\\p{P}|\\p{S}","u")),Al=Ya(/\s/);function Ya(e){return n;function n(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function no(e){const n=[];let a=-1,l=0,o=0;for(;++a<e.length;){const s=e.charCodeAt(a);let u="";if(s===37&&Kt(e.charCodeAt(a+1))&&Kt(e.charCodeAt(a+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(u=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(a+1);s<56320&&f>56319&&f<57344?(u=String.fromCharCode(s,f),o=1):u="�"}else u=String.fromCharCode(s);u&&(n.push(e.slice(l,a),encodeURIComponent(u)),l=a+o+1,u=""),o&&(a+=o,o=0)}return n.join("")+e.slice(l)}function Je(e,n,a,l){const o=l?l-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(p){return Ye(p)?(e.enter(a),f(p)):n(p)}function f(p){return Ye(p)&&s++<o?(e.consume(p),f):(e.exit(a),n(p))}}const BL={tokenize:PL};function PL(e){const n=e.attempt(this.parser.constructs.contentInitial,l,o);let a;return n;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Je(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const p=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Re(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),u)}}const FL={tokenize:UL},D0={tokenize:HL};function UL(e){const n=this,a=[];let l=0,o,s,u;return f;function f(j){if(l<a.length){const O=a[l];return n.containerState=O[1],e.attempt(O[0].continuation,p,h)(j)}return h(j)}function p(j){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&N();const O=n.events.length;let I=O,M;for(;I--;)if(n.events[I][0]==="exit"&&n.events[I][1].type==="chunkFlow"){M=n.events[I][1].end;break}A(l);let U=O;for(;U<n.events.length;)n.events[U][1].end={...M},U++;return An(n.events,I+1,0,n.events.slice(O)),n.events.length=U,h(j)}return f(j)}function h(j){if(l===a.length){if(!o)return w(j);if(o.currentConstruct&&o.currentConstruct.concrete)return k(j);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(D0,y,g)(j)}function y(j){return o&&N(),A(l),w(j)}function g(j){return n.parser.lazy[n.now().line]=l!==a.length,u=n.now().offset,k(j)}function w(j){return n.containerState={},e.attempt(D0,b,k)(j)}function b(j){return l++,a.push([n.currentConstruct,n.containerState]),w(j)}function k(j){if(j===null){o&&N(),A(0),e.consume(j);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),S(j)}function S(j){if(j===null){E(e.exit("chunkFlow"),!0),A(0),e.consume(j);return}return Re(j)?(e.consume(j),E(e.exit("chunkFlow")),l=0,n.interrupt=void 0,f):(e.consume(j),S)}function E(j,O){const I=n.sliceStream(j);if(O&&I.push(null),j.previous=s,s&&(s.next=j),s=j,o.defineSkip(j.start),o.write(I),n.parser.lazy[j.start.line]){let M=o.events.length;for(;M--;)if(o.events[M][1].start.offset<u&&(!o.events[M][1].end||o.events[M][1].end.offset>u))return;const U=n.events.length;let H=U,q,B;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type==="chunkFlow"){if(q){B=n.events[H][1].end;break}q=!0}for(A(l),M=U;M<n.events.length;)n.events[M][1].end={...B},M++;An(n.events,H+1,0,n.events.slice(U)),n.events.length=M}}function A(j){let O=a.length;for(;O-- >j;){const I=a[O];n.containerState=I[1],I[0].exit.call(n,e)}a.length=j}function N(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function HL(e,n,a){return Je(e,e.attempt(this.parser.constructs.document,n,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hi(e){if(e===null||pt(e)||Al(e))return 1;if(Rd(e))return 2}function Md(e,n,a){const l=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!l.includes(s)&&(n=s(n,a),l.push(s))}return n}const om={name:"attention",resolveAll:$L,tokenize:VL};function $L(e,n){let a=-1,l,o,s,u,f,p,h,y;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(l=a;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[l][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;p=e[l][1].end.offset-e[l][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const g={...e[l][1].end},w={...e[a][1].start};z0(g,-p),z0(w,p),u={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...e[l][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:w},s={type:p>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[a][1].start}},o={type:p>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[l][1].end={...u.start},e[a][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=Fn(h,[["enter",e[l][1],n],["exit",e[l][1],n]])),h=Fn(h,[["enter",o,n],["enter",u,n],["exit",u,n],["enter",s,n]]),h=Fn(h,Md(n.parser.constructs.insideSpan.null,e.slice(l+1,a),n)),h=Fn(h,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[a][1].end.offset-e[a][1].start.offset?(y=2,h=Fn(h,[["enter",e[a][1],n],["exit",e[a][1],n]])):y=0,An(e,l-1,a-l+3,h),a=l+h.length-y-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function VL(e,n){const a=this.parser.constructs.attentionMarkers.null,l=this.previous,o=Hi(l);let s;return u;function u(p){return s=p,e.enter("attentionSequence"),f(p)}function f(p){if(p===s)return e.consume(p),f;const h=e.exit("attentionSequence"),y=Hi(p),g=!y||y===2&&o||a.includes(p),w=!o||o===2&&y||a.includes(l);return h._open=!!(s===42?g:g&&(o||!w)),h._close=!!(s===42?w:w&&(y||!g)),n(p)}}function z0(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const qL={name:"autolink",tokenize:GL};function GL(e,n,a){let l=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return rn(b)?(e.consume(b),u):b===64?a(b):h(b)}function u(b){return b===43||b===45||b===46||Kt(b)?(l=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),l=0,p):(b===43||b===45||b===46||Kt(b))&&l++<32?(e.consume(b),f):(l=0,h(b))}function p(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||qu(b)?a(b):(e.consume(b),p)}function h(b){return b===64?(e.consume(b),y):zL(b)?(e.consume(b),h):a(b)}function y(b){return Kt(b)?g(b):a(b)}function g(b){return b===46?(e.consume(b),l=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):w(b)}function w(b){if((b===45||Kt(b))&&l++<63){const k=b===45?w:g;return e.consume(b),k}return a(b)}}const Fs={partial:!0,tokenize:YL};function YL(e,n,a){return l;function l(s){return Ye(s)?Je(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Re(s)?n(s):a(s)}}const IC={continuation:{tokenize:KL},exit:QL,name:"blockQuote",tokenize:XL};function XL(e,n,a){const l=this;return o;function o(u){if(u===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),s}return a(u)}function s(u){return Ye(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(u))}}function KL(e,n,a){const l=this;return o;function o(u){return Ye(u)?Je(e,s,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):s(u)}function s(u){return e.attempt(IC,n,a)(u)}}function QL(e){e.exit("blockQuote")}const BC={name:"characterEscape",tokenize:ZL};function ZL(e,n,a){return l;function l(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return IL(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):a(s)}}const PC={name:"characterReference",tokenize:WL};function WL(e,n,a){const l=this;let o=0,s,u;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),p}function p(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,u=Kt,y(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,u=LL,y):(e.enter("characterReferenceValue"),s=7,u=im,y(g))}function y(g){if(g===59&&o){const w=e.exit("characterReferenceValue");return u===Kt&&!bg(l.sliceSerialize(w))?a(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return u(g)&&o++<s?(e.consume(g),y):a(g)}}const L0={partial:!0,tokenize:e6},I0={concrete:!0,name:"codeFenced",tokenize:JL};function JL(e,n,a){const l=this,o={partial:!0,tokenize:I};let s=0,u=0,f;return p;function p(M){return h(M)}function h(M){const U=l.events[l.events.length-1];return s=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(M)}function y(M){return M===f?(u++,e.consume(M),y):u<3?a(M):(e.exit("codeFencedFenceSequence"),Ye(M)?Je(e,g,"whitespace")(M):g(M))}function g(M){return M===null||Re(M)?(e.exit("codeFencedFence"),l.interrupt?n(M):e.check(L0,S,O)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(M))}function w(M){return M===null||Re(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Ye(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,b,"whitespace")(M)):M===96&&M===f?a(M):(e.consume(M),w)}function b(M){return M===null||Re(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(M))}function k(M){return M===null||Re(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?a(M):(e.consume(M),k)}function S(M){return e.attempt(o,O,E)(M)}function E(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),A}function A(M){return s>0&&Ye(M)?Je(e,N,"linePrefix",s+1)(M):N(M)}function N(M){return M===null||Re(M)?e.check(L0,S,O)(M):(e.enter("codeFlowValue"),j(M))}function j(M){return M===null||Re(M)?(e.exit("codeFlowValue"),N(M)):(e.consume(M),j)}function O(M){return e.exit("codeFenced"),n(M)}function I(M,U,H){let q=0;return B;function B(W){return M.enter("lineEnding"),M.consume(W),M.exit("lineEnding"),Y}function Y(W){return M.enter("codeFencedFence"),Ye(W)?Je(M,G,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):G(W)}function G(W){return W===f?(M.enter("codeFencedFenceSequence"),he(W)):H(W)}function he(W){return W===f?(q++,M.consume(W),he):q>=u?(M.exit("codeFencedFenceSequence"),Ye(W)?Je(M,Z,"whitespace")(W):Z(W)):H(W)}function Z(W){return W===null||Re(W)?(M.exit("codeFencedFence"),U(W)):H(W)}}}function e6(e,n,a){const l=this;return o;function o(u){return u===null?a(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s)}function s(u){return l.parser.lazy[l.now().line]?a(u):n(u)}}const yh={name:"codeIndented",tokenize:n6},t6={partial:!0,tokenize:r6};function n6(e,n,a){const l=this;return o;function o(h){return e.enter("codeIndented"),Je(e,s,"linePrefix",5)(h)}function s(h){const y=l.events[l.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?u(h):a(h)}function u(h){return h===null?p(h):Re(h)?e.attempt(t6,u,p)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Re(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),f)}function p(h){return e.exit("codeIndented"),n(h)}}function r6(e,n,a){const l=this;return o;function o(u){return l.parser.lazy[l.now().line]?a(u):Re(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Je(e,s,"linePrefix",5)(u)}function s(u){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(u):Re(u)?o(u):a(u)}}const a6={name:"codeText",previous:i6,resolve:l6,tokenize:o6};function l6(e){let n=e.length-4,a=3,l,o;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=a;++l<n;)if(e[l][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(l=a-1,n++;++l<=n;)o===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(o=l):(l===n||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),n-=l-o-2,l=o+2),o=void 0);return e}function i6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function o6(e,n,a){let l=0,o,s;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),l++,f):(e.exit("codeTextSequence"),p(g))}function p(g){return g===null?a(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(s=e.enter("codeTextSequence"),o=0,y(g)):Re(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Re(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),h)}function y(g){return g===96?(e.consume(g),o++,y):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(g)):(s.type="codeTextData",h(g))}}class s6{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 l=a==null?Number.POSITIVE_INFINITY:a;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,a,l){const o=a||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&es(this.left,l),s.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),es(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),es(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);es(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);es(this.left,a.reverse())}}}function es(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 FC(e){const n={};let a=-1,l,o,s,u,f,p,h;const y=new s6(e);for(;++a<y.length;){for(;a in n;)a=n[a];if(l=y.get(a),a&&l[1].type==="chunkFlow"&&y.get(a-1)[1].type==="listItemPrefix"&&(p=l[1]._tokenizer.events,s=0,s<p.length&&p[s][1].type==="lineEndingBlank"&&(s+=2),s<p.length&&p[s][1].type==="content"))for(;++s<p.length&&p[s][1].type!=="content";)p[s][1].type==="chunkText"&&(p[s][1]._isInFirstContentOfListItem=!0,s++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,c6(y,a)),a=n[a],h=!0);else if(l[1]._container){for(s=a,o=void 0;s--;)if(u=y.get(s),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=s);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(l[1].end={...y.get(o)[1].start},f=y.slice(o,a),f.unshift(l),y.splice(o,a-o+1,f))}}return An(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function c6(e,n){const a=e.get(n)[1],l=e.get(n)[2];let o=n-1;const s=[];let u=a._tokenizer;u||(u=l.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,p=[],h={};let y,g,w=-1,b=a,k=0,S=0;const E=[S];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(y=l.sliceStream(b),b.next||y.push(null),g&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(y),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=a;++w<f.length;)f[w][0]==="exit"&&f[w-1][0]==="enter"&&f[w][1].type===f[w-1][1].type&&f[w][1].start.line!==f[w][1].end.line&&(S=w+1,E.push(S),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):E.pop(),w=E.length;w--;){const A=f.slice(E[w],E[w+1]),N=s.pop();p.push([N,N+A.length-1]),e.splice(N,2,A)}for(p.reverse(),w=-1;++w<p.length;)h[k+p[w][0]]=k+p[w][1],k+=p[w][1]-p[w][0]-1;return h}const u6={resolve:f6,tokenize:p6},d6={partial:!0,tokenize:h6};function f6(e){return FC(e),e}function p6(e,n){let a;return l;function l(f){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):Re(f)?e.check(d6,u,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function u(f){return e.consume(f),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,o}}function h6(e,n,a){const l=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,s,"linePrefix")}function s(u){if(u===null||Re(u))return a(u);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(u):e.interrupt(l.parser.constructs.flow,a,n)(u)}}function UC(e,n,a,l,o,s,u,f,p){const h=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(A){return A===60?(e.enter(l),e.enter(o),e.enter(s),e.consume(A),e.exit(s),w):A===null||A===32||A===41||qu(A)?a(A):(e.enter(l),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(A))}function w(A){return A===62?(e.enter(s),e.consume(A),e.exit(s),e.exit(o),e.exit(l),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===62?(e.exit("chunkString"),e.exit(f),w(A)):A===null||A===60||Re(A)?a(A):(e.consume(A),A===92?k:b)}function k(A){return A===60||A===62||A===92?(e.consume(A),b):b(A)}function S(A){return!y&&(A===null||A===41||pt(A))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(l),n(A)):y<h&&A===40?(e.consume(A),y++,S):A===41?(e.consume(A),y--,S):A===null||A===32||A===40||qu(A)?a(A):(e.consume(A),A===92?E:S)}function E(A){return A===40||A===41||A===92?(e.consume(A),S):S(A)}}function HC(e,n,a,l,o,s){const u=this;let f=0,p;return h;function h(b){return e.enter(l),e.enter(o),e.consume(b),e.exit(o),e.enter(s),y}function y(b){return f>999||b===null||b===91||b===93&&!p||b===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?a(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(l),n):Re(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||Re(b)||f++>999?(e.exit("chunkString"),y(b)):(e.consume(b),p||(p=!Ye(b)),b===92?w:g)}function w(b){return b===91||b===92||b===93?(e.consume(b),f++,g):g(b)}}function $C(e,n,a,l,o,s){let u;return f;function f(w){return w===34||w===39||w===40?(e.enter(l),e.enter(o),e.consume(w),e.exit(o),u=w===40?41:w,p):a(w)}function p(w){return w===u?(e.enter(o),e.consume(w),e.exit(o),e.exit(l),n):(e.enter(s),h(w))}function h(w){return w===u?(e.exit(s),p(u)):w===null?a(w):Re(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===u||w===null||Re(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?g:y)}function g(w){return w===u||w===92?(e.consume(w),y):y(w)}}function us(e,n){let a;return l;function l(o){return Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a=!0,l):Ye(o)?Je(e,l,a?"linePrefix":"lineSuffix")(o):n(o)}}const m6={name:"definition",tokenize:y6},g6={partial:!0,tokenize:x6};function y6(e,n,a){const l=this;let o;return s;function s(b){return e.enter("definition"),u(b)}function u(b){return HC.call(l,e,f,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=er(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):a(b)}function p(b){return pt(b)?us(e,h)(b):h(b)}function h(b){return UC(e,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(g6,g,g)(b)}function g(b){return Ye(b)?Je(e,w,"whitespace")(b):w(b)}function w(b){return b===null||Re(b)?(e.exit("definition"),l.parser.defined.push(o),n(b)):a(b)}}function x6(e,n,a){return l;function l(f){return pt(f)?us(e,o)(f):a(f)}function o(f){return $C(e,s,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Ye(f)?Je(e,u,"whitespace")(f):u(f)}function u(f){return f===null||Re(f)?n(f):a(f)}}const b6={name:"hardBreakEscape",tokenize:v6};function v6(e,n,a){return l;function l(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Re(s)?(e.exit("hardBreakEscape"),n(s)):a(s)}}const w6={name:"headingAtx",resolve:S6,tokenize:k6};function S6(e,n){let a=e.length-2,l=3,o,s;return e[l][1].type==="whitespace"&&(l+=2),a-2>l&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(l===a-1||a-4>l&&e[a-2][1].type==="whitespace")&&(a-=l+1===a?2:4),a>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[a][1].end},s={type:"chunkText",start:e[l][1].start,end:e[a][1].end,contentType:"text"},An(e,l,a-l+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function k6(e,n,a){let l=0;return o;function o(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),u(y)}function u(y){return y===35&&l++<6?(e.consume(y),u):y===null||pt(y)?(e.exit("atxHeadingSequence"),f(y)):a(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),p(y)):y===null||Re(y)?(e.exit("atxHeading"),n(y)):Ye(y)?Je(e,f,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function p(y){return y===35?(e.consume(y),p):(e.exit("atxHeadingSequence"),f(y))}function h(y){return y===null||y===35||pt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),h)}}const C6=["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"],B0=["pre","script","style","textarea"],E6={concrete:!0,name:"htmlFlow",resolveTo:j6,tokenize:T6},A6={partial:!0,tokenize:R6},N6={partial:!0,tokenize:_6};function j6(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 T6(e,n,a){const l=this;let o,s,u,f,p;return h;function h(_){return y(_)}function y(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),g}function g(_){return _===33?(e.consume(_),w):_===47?(e.consume(_),s=!0,S):_===63?(e.consume(_),o=3,l.interrupt?n:T):rn(_)?(e.consume(_),u=String.fromCharCode(_),E):a(_)}function w(_){return _===45?(e.consume(_),o=2,b):_===91?(e.consume(_),o=5,f=0,k):rn(_)?(e.consume(_),o=4,l.interrupt?n:T):a(_)}function b(_){return _===45?(e.consume(_),l.interrupt?n:T):a(_)}function k(_){const te="CDATA[";return _===te.charCodeAt(f++)?(e.consume(_),f===te.length?l.interrupt?n:G:k):a(_)}function S(_){return rn(_)?(e.consume(_),u=String.fromCharCode(_),E):a(_)}function E(_){if(_===null||_===47||_===62||pt(_)){const te=_===47,ne=u.toLowerCase();return!te&&!s&&B0.includes(ne)?(o=1,l.interrupt?n(_):G(_)):C6.includes(u.toLowerCase())?(o=6,te?(e.consume(_),A):l.interrupt?n(_):G(_)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?a(_):s?N(_):j(_))}return _===45||Kt(_)?(e.consume(_),u+=String.fromCharCode(_),E):a(_)}function A(_){return _===62?(e.consume(_),l.interrupt?n:G):a(_)}function N(_){return Ye(_)?(e.consume(_),N):B(_)}function j(_){return _===47?(e.consume(_),B):_===58||_===95||rn(_)?(e.consume(_),O):Ye(_)?(e.consume(_),j):B(_)}function O(_){return _===45||_===46||_===58||_===95||Kt(_)?(e.consume(_),O):I(_)}function I(_){return _===61?(e.consume(_),M):Ye(_)?(e.consume(_),I):j(_)}function M(_){return _===null||_===60||_===61||_===62||_===96?a(_):_===34||_===39?(e.consume(_),p=_,U):Ye(_)?(e.consume(_),M):H(_)}function U(_){return _===p?(e.consume(_),p=null,q):_===null||Re(_)?a(_):(e.consume(_),U)}function H(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||pt(_)?I(_):(e.consume(_),H)}function q(_){return _===47||_===62||Ye(_)?j(_):a(_)}function B(_){return _===62?(e.consume(_),Y):a(_)}function Y(_){return _===null||Re(_)?G(_):Ye(_)?(e.consume(_),Y):a(_)}function G(_){return _===45&&o===2?(e.consume(_),z):_===60&&o===1?(e.consume(_),K):_===62&&o===4?(e.consume(_),D):_===63&&o===3?(e.consume(_),T):_===93&&o===5?(e.consume(_),le):Re(_)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(A6,L,he)(_)):_===null||Re(_)?(e.exit("htmlFlowData"),he(_)):(e.consume(_),G)}function he(_){return e.check(N6,Z,L)(_)}function Z(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),W}function W(_){return _===null||Re(_)?he(_):(e.enter("htmlFlowData"),G(_))}function z(_){return _===45?(e.consume(_),T):G(_)}function K(_){return _===47?(e.consume(_),u="",ee):G(_)}function ee(_){if(_===62){const te=u.toLowerCase();return B0.includes(te)?(e.consume(_),D):G(_)}return rn(_)&&u.length<8?(e.consume(_),u+=String.fromCharCode(_),ee):G(_)}function le(_){return _===93?(e.consume(_),T):G(_)}function T(_){return _===62?(e.consume(_),D):_===45&&o===2?(e.consume(_),T):G(_)}function D(_){return _===null||Re(_)?(e.exit("htmlFlowData"),L(_)):(e.consume(_),D)}function L(_){return e.exit("htmlFlow"),n(_)}}function _6(e,n,a){const l=this;return o;function o(u){return Re(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):a(u)}function s(u){return l.parser.lazy[l.now().line]?a(u):n(u)}}function R6(e,n,a){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Fs,n,a)}}const M6={name:"htmlText",tokenize:O6};function O6(e,n,a){const l=this;let o,s,u;return f;function f(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),p}function p(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),I):T===63?(e.consume(T),j):rn(T)?(e.consume(T),H):a(T)}function h(T){return T===45?(e.consume(T),y):T===91?(e.consume(T),s=0,k):rn(T)?(e.consume(T),N):a(T)}function y(T){return T===45?(e.consume(T),b):a(T)}function g(T){return T===null?a(T):T===45?(e.consume(T),w):Re(T)?(u=g,K(T)):(e.consume(T),g)}function w(T){return T===45?(e.consume(T),b):g(T)}function b(T){return T===62?z(T):T===45?w(T):g(T)}function k(T){const D="CDATA[";return T===D.charCodeAt(s++)?(e.consume(T),s===D.length?S:k):a(T)}function S(T){return T===null?a(T):T===93?(e.consume(T),E):Re(T)?(u=S,K(T)):(e.consume(T),S)}function E(T){return T===93?(e.consume(T),A):S(T)}function A(T){return T===62?z(T):T===93?(e.consume(T),A):S(T)}function N(T){return T===null||T===62?z(T):Re(T)?(u=N,K(T)):(e.consume(T),N)}function j(T){return T===null?a(T):T===63?(e.consume(T),O):Re(T)?(u=j,K(T)):(e.consume(T),j)}function O(T){return T===62?z(T):j(T)}function I(T){return rn(T)?(e.consume(T),M):a(T)}function M(T){return T===45||Kt(T)?(e.consume(T),M):U(T)}function U(T){return Re(T)?(u=U,K(T)):Ye(T)?(e.consume(T),U):z(T)}function H(T){return T===45||Kt(T)?(e.consume(T),H):T===47||T===62||pt(T)?q(T):a(T)}function q(T){return T===47?(e.consume(T),z):T===58||T===95||rn(T)?(e.consume(T),B):Re(T)?(u=q,K(T)):Ye(T)?(e.consume(T),q):z(T)}function B(T){return T===45||T===46||T===58||T===95||Kt(T)?(e.consume(T),B):Y(T)}function Y(T){return T===61?(e.consume(T),G):Re(T)?(u=Y,K(T)):Ye(T)?(e.consume(T),Y):q(T)}function G(T){return T===null||T===60||T===61||T===62||T===96?a(T):T===34||T===39?(e.consume(T),o=T,he):Re(T)?(u=G,K(T)):Ye(T)?(e.consume(T),G):(e.consume(T),Z)}function he(T){return T===o?(e.consume(T),o=void 0,W):T===null?a(T):Re(T)?(u=he,K(T)):(e.consume(T),he)}function Z(T){return T===null||T===34||T===39||T===60||T===61||T===96?a(T):T===47||T===62||pt(T)?q(T):(e.consume(T),Z)}function W(T){return T===47||T===62||pt(T)?q(T):a(T)}function z(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),n):a(T)}function K(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),ee}function ee(T){return Ye(T)?Je(e,le,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):le(T)}function le(T){return e.enter("htmlTextData"),u(T)}}const vg={name:"labelEnd",resolveAll:I6,resolveTo:B6,tokenize:P6},D6={tokenize:F6},z6={tokenize:U6},L6={tokenize:H6};function I6(e){let n=-1;const a=[];for(;++n<e.length;){const l=e[n][1];if(a.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",n+=o}}return e.length!==a.length&&An(e,0,e.length,a),e}function B6(e,n){let a=e.length,l=0,o,s,u,f;for(;a--;)if(o=e[a][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[a][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[a][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=a,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(u=a);const p={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[u][1].end}},y={type:"labelText",start:{...e[s+l+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",p,n],["enter",h,n]],f=Fn(f,e.slice(s+1,s+l+3)),f=Fn(f,[["enter",y,n]]),f=Fn(f,Md(n.parser.constructs.insideSpan.null,e.slice(s+l+4,u-3),n)),f=Fn(f,[["exit",y,n],e[u-2],e[u-1],["exit",h,n]]),f=Fn(f,e.slice(u+1)),f=Fn(f,[["exit",p,n]]),An(e,s,e.length,f),e}function P6(e,n,a){const l=this;let o=l.events.length,s,u;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){s=l.events[o][1];break}return f;function f(w){return s?s._inactive?g(w):(u=l.parser.defined.includes(er(l.sliceSerialize({start:s.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),p):a(w)}function p(w){return w===40?e.attempt(D6,y,u?y:g)(w):w===91?e.attempt(z6,y,u?h:g)(w):u?y(w):g(w)}function h(w){return e.attempt(L6,y,g)(w)}function y(w){return n(w)}function g(w){return s._balanced=!0,a(w)}}function F6(e,n,a){return l;function l(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return pt(g)?us(e,s)(g):s(g)}function s(g){return g===41?y(g):UC(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return pt(g)?us(e,p)(g):y(g)}function f(g){return a(g)}function p(g){return g===34||g===39||g===40?$C(e,h,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return pt(g)?us(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),n):a(g)}}function U6(e,n,a){const l=this;return o;function o(f){return HC.call(l,e,s,u,"reference","referenceMarker","referenceString")(f)}function s(f){return l.parser.defined.includes(er(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(f):a(f)}function u(f){return a(f)}}function H6(e,n,a){return l;function l(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):a(s)}}const $6={name:"labelStartImage",resolveAll:vg.resolveAll,tokenize:V6};function V6(e,n,a){const l=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):a(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(f):n(f)}}const q6={name:"labelStartLink",resolveAll:vg.resolveAll,tokenize:G6};function G6(e,n,a){const l=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),s}function s(u){return u===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(u):n(u)}}const xh={name:"lineEnding",tokenize:Y6};function Y6(e,n){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Je(e,n,"linePrefix")}}const ju={name:"thematicBreak",tokenize:X6};function X6(e,n,a){let l=0,o;return s;function s(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),p(h)):l>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),n(h)):a(h)}function p(h){return h===o?(e.consume(h),l++,p):(e.exit("thematicBreakSequence"),Ye(h)?Je(e,f,"whitespace")(h):f(h))}}const fn={continuation:{tokenize:W6},exit:eI,name:"list",tokenize:Z6},K6={partial:!0,tokenize:tI},Q6={partial:!0,tokenize:J6};function Z6(e,n,a){const l=this,o=l.events[l.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return f;function f(b){const k=l.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!l.containerState.marker||b===l.containerState.marker:im(b)){if(l.containerState.type||(l.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ju,a,h)(b):h(b);if(!l.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return a(b)}function p(b){return im(b)&&++u<10?(e.consume(b),p):(!l.interrupt||u<2)&&(l.containerState.marker?b===l.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):a(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||b,e.check(Fs,l.interrupt?a:y,e.attempt(K6,w,g))}function y(b){return l.containerState.initialBlankLine=!0,s++,w(b)}function g(b){return Ye(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),w):a(b)}function w(b){return l.containerState.size=s+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function W6(e,n,a){const l=this;return l.containerState._closeFlow=void 0,e.check(Fs,o,s);function o(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Je(e,n,"listItemIndent",l.containerState.size+1)(f)}function s(f){return l.containerState.furtherBlankLines||!Ye(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,u(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(Q6,n,u)(f))}function u(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Je(e,e.attempt(fn,n,a),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function J6(e,n,a){const l=this;return Je(e,o,"listItemIndent",l.containerState.size+1);function o(s){const u=l.events[l.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===l.containerState.size?n(s):a(s)}}function eI(e){e.exit(this.containerState.type)}function tI(e,n,a){const l=this;return Je(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const u=l.events[l.events.length-1];return!Ye(s)&&u&&u[1].type==="listItemPrefixWhitespace"?n(s):a(s)}}const P0={name:"setextUnderline",resolveTo:nI,tokenize:rI};function nI(e,n){let a=e.length,l,o,s;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){l=a;break}e[a][1].type==="paragraph"&&(o=a)}else e[a][1].type==="content"&&e.splice(a,1),!s&&e[a][1].type==="definition"&&(s=a);const u={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",u,n]),e.splice(s+1,0,["exit",e[l][1],n]),e[l][1].end={...e[s][1].end}):e[l][1]=u,e.push(["exit",u,n]),e}function rI(e,n,a){const l=this;let o;return s;function s(h){let y=l.events.length,g;for(;y--;)if(l.events[y][1].type!=="lineEnding"&&l.events[y][1].type!=="linePrefix"&&l.events[y][1].type!=="content"){g=l.events[y][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||g)?(e.enter("setextHeadingLine"),o=h,u(h)):a(h)}function u(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ye(h)?Je(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),n(h)):a(h)}}const aI={tokenize:lI};function lI(e){const n=this,a=e.attempt(Fs,l,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(u6,o)),"linePrefix")));return a;function l(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,a}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,a}}const iI={resolveAll:qC()},oI=VC("string"),sI=VC("text");function VC(e){return{resolveAll:qC(e==="text"?cI:void 0),tokenize:n};function n(a){const l=this,o=this.parser.constructs[e],s=a.attempt(o,u,f);return u;function u(y){return h(y)?s(y):f(y)}function f(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return h(y)?(a.exit("data"),s(y)):(a.consume(y),p)}function h(y){if(y===null)return!0;const g=o[y];let w=-1;if(g)for(;++w<g.length;){const b=g[w];if(!b.previous||b.previous.call(l,l.previous))return!0}return!1}}}function qC(e){return n;function n(a,l){let o=-1,s;for(;++o<=a.length;)s===void 0?a[o]&&a[o][1].type==="data"&&(s=o,o++):(!a[o]||a[o][1].type!=="data")&&(o!==s+2&&(a[s][1].end=a[o-1][1].end,a.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(a,l):a}}function cI(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 l=e[a-1][1],o=n.sliceStream(l);let s=o.length,u=-1,f=0,p;for(;s--;){const h=o[s];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(h===-2)p=!0,f++;else if(h!==-1){s++;break}}if(n._contentTypeTextTrailing&&a===e.length&&(f=0),f){const h={type:a===e.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:l.start._bufferIndex+u,_index:l.start._index+s,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(a,0,["enter",h,n],["exit",h,n]),a+=2)}a++}return e}const uI={42:fn,43:fn,45:fn,48:fn,49:fn,50:fn,51:fn,52:fn,53:fn,54:fn,55:fn,56:fn,57:fn,62:IC},dI={91:m6},fI={[-2]:yh,[-1]:yh,32:yh},pI={35:w6,42:ju,45:[P0,ju],60:E6,61:P0,95:ju,96:I0,126:I0},hI={38:PC,92:BC},mI={[-5]:xh,[-4]:xh,[-3]:xh,33:$6,38:PC,42:om,60:[qL,M6],91:q6,92:[b6,BC],93:vg,95:om,96:a6},gI={null:[om,iI]},yI={null:[42,95]},xI={null:[]},bI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yI,contentInitial:dI,disable:xI,document:uI,flow:pI,flowInitial:fI,insideSpan:gI,string:hI,text:mI},Symbol.toStringTag,{value:"Module"}));function vI(e,n,a){let l={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const o={},s=[];let u=[],f=[];const p={attempt:U(I),check:U(M),consume:N,enter:j,exit:O,interrupt:U(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:w,sliceStream:b,write:g};let y=n.tokenize.call(h,p);return n.resolveAll&&s.push(n),h;function g(Y){return u=Fn(u,Y),E(),u[u.length-1]!==null?[]:(H(n,0),h.events=Md(s,h.events,h),h.events)}function w(Y,G){return SI(b(Y),G)}function b(Y){return wI(u,Y)}function k(){const{_bufferIndex:Y,_index:G,line:he,column:Z,offset:W}=l;return{_bufferIndex:Y,_index:G,line:he,column:Z,offset:W}}function S(Y){o[Y.line]=Y.column,B()}function E(){let Y;for(;l._index<u.length;){const G=u[l._index];if(typeof G=="string")for(Y=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===Y&&l._bufferIndex<G.length;)A(G.charCodeAt(l._bufferIndex));else A(G)}}function A(Y){y=y(Y)}function N(Y){Re(Y)?(l.line++,l.column=1,l.offset+=Y===-3?2:1,B()):Y!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===u[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=Y}function j(Y,G){const he=G||{};return he.type=Y,he.start=k(),h.events.push(["enter",he,h]),f.push(he),he}function O(Y){const G=f.pop();return G.end=k(),h.events.push(["exit",G,h]),G}function I(Y,G){H(Y,G.from)}function M(Y,G){G.restore()}function U(Y,G){return he;function he(Z,W,z){let K,ee,le,T;return Array.isArray(Z)?L(Z):"tokenize"in Z?L([Z]):D(Z);function D(ie){return ae;function ae(be){const me=be!==null&&ie[be],_e=be!==null&&ie.null,De=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return L(De)(be)}}function L(ie){return K=ie,ee=0,ie.length===0?z:_(ie[ee])}function _(ie){return ae;function ae(be){return T=q(),le=ie,ie.partial||(h.currentConstruct=ie),ie.name&&h.parser.constructs.disable.null.includes(ie.name)?ne():ie.tokenize.call(G?Object.assign(Object.create(h),G):h,p,te,ne)(be)}}function te(ie){return Y(le,T),W}function ne(ie){return T.restore(),++ee<K.length?_(K[ee]):z}}}function H(Y,G){Y.resolveAll&&!s.includes(Y)&&s.push(Y),Y.resolve&&An(h.events,G,h.events.length-G,Y.resolve(h.events.slice(G),h)),Y.resolveTo&&(h.events=Y.resolveTo(h.events,h))}function q(){const Y=k(),G=h.previous,he=h.currentConstruct,Z=h.events.length,W=Array.from(f);return{from:Z,restore:z};function z(){l=Y,h.previous=G,h.currentConstruct=he,h.events.length=Z,f=W,B()}}function B(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function wI(e,n){const a=n.start._index,l=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let u;if(a===o)u=[e[a].slice(l,s)];else{if(u=e.slice(a,o),l>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(l):u.shift()}s>0&&u.push(e[o].slice(0,s))}return u}function SI(e,n){let a=-1;const l=[];let o;for(;++a<e.length;){const s=e[a];let u;if(typeof s=="string")u=s;else switch(s){case-5:{u="\r";break}case-4:{u=`
|
|
451
|
+
`;break}case-3:{u=`\r
|
|
452
|
+
`;break}case-2:{u=n?" ":" ";break}case-1:{if(!n&&o)continue;u=" ";break}default:u=String.fromCharCode(s)}o=s===-2,l.push(u)}return l.join("")}function kI(e){const l={constructs:zC([bI,...(e||{}).extensions||[]]),content:o(BL),defined:[],document:o(FL),flow:o(aI),lazy:{},string:o(oI),text:o(sI)};return l;function o(s){return u;function u(f){return vI(l,s,f)}}}function CI(e){for(;!FC(e););return e}const F0=/[\0\t\n\r]/g;function EI(){let e=1,n="",a=!0,l;return o;function o(s,u,f){const p=[];let h,y,g,w,b;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),g=0,n="",a&&(s.charCodeAt(0)===65279&&g++,a=void 0);g<s.length;){if(F0.lastIndex=g,h=F0.exec(s),w=h&&h.index!==void 0?h.index:s.length,b=s.charCodeAt(w),!h){n=s.slice(g);break}if(b===10&&g===w&&l)p.push(-3),l=void 0;else switch(l&&(p.push(-5),l=void 0),g<w&&(p.push(s.slice(g,w)),e+=w-g),b){case 0:{p.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,p.push(-2);e++<y;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:l=!0,e=1}g=w+1}return f&&(l&&p.push(-5),n&&p.push(n),p.push(null)),p}}const AI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NI(e){return e.replace(AI,jI)}function jI(e,n,a){if(n)return n;if(a.charCodeAt(0)===35){const o=a.charCodeAt(1),s=o===120||o===88;return LC(a.slice(s?2:1),s?16:10)}return bg(a)||e}const GC={}.hasOwnProperty;function TI(e,n,a){return n&&typeof n=="object"&&(a=n,n=void 0),_I(a)(CI(kI(a).document().write(EI()(e,n,!0))))}function _I(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(qn),autolinkProtocol:q,autolinkEmail:q,atxHeading:s(vt),blockQuote:s(_e),characterEscape:q,characterReference:q,codeFenced:s(De),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(De,u),codeText:s(Be,u),codeTextData:q,data:q,codeFlowValue:q,definition:s(ot),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(at),hardBreakEscape:s(Ft),hardBreakTrailing:s(Ft),htmlFlow:s(Zt,u),htmlFlowData:q,htmlText:s(Zt,u),htmlTextData:q,image:s(aa),label:u,link:s(qn),listItem:s(jn),listItemValue:w,listOrdered:s(ar,g),listUnordered:s(ar),paragraph:s(wr),reference:_,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(vt),strong:s(Sr),thematicBreak:s(kr)},exit:{atxHeading:p(),atxHeadingSequence:I,autolink:p(),autolinkEmail:me,autolinkProtocol:be,blockQuote:p(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:ie,characterReference:ae,codeFenced:p(E),codeFencedFence:S,codeFencedFenceInfo:b,codeFencedFenceMeta:k,codeFlowValue:B,codeIndented:p(A),codeText:p(W),codeTextData:B,data:B,definition:p(),definitionDestinationString:O,definitionLabelString:N,definitionTitleString:j,emphasis:p(),hardBreakEscape:p(G),hardBreakTrailing:p(G),htmlFlow:p(he),htmlFlowData:B,htmlText:p(Z),htmlTextData:B,image:p(K),label:le,labelText:ee,lineEnding:Y,link:p(z),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:te,resourceDestinationString:T,resourceTitleString:D,resource:L,setextHeading:p(H),setextHeadingLineSequence:U,setextHeadingText:M,strong:p(),thematicBreak:p()}};YC(n,(e||{}).mdastExtensions||[]);const a={};return l;function l(se){let xe={type:"root",children:[]};const Oe={stack:[xe],tokenStack:[],config:n,enter:f,exit:h,buffer:u,resume:y,data:a},He=[];let Ze=-1;for(;++Ze<se.length;)if(se[Ze][1].type==="listOrdered"||se[Ze][1].type==="listUnordered")if(se[Ze][0]==="enter")He.push(Ze);else{const Wt=He.pop();Ze=o(se,Wt,Ze)}for(Ze=-1;++Ze<se.length;){const Wt=n[se[Ze][0]];GC.call(Wt,se[Ze][1].type)&&Wt[se[Ze][1].type].call(Object.assign({sliceSerialize:se[Ze][2].sliceSerialize},Oe),se[Ze][1])}if(Oe.tokenStack.length>0){const Wt=Oe.tokenStack[Oe.tokenStack.length-1];(Wt[1]||U0).call(Oe,void 0,Wt[0])}for(xe.position={start:Oa(se.length>0?se[0][1].start:{line:1,column:1,offset:0}),end:Oa(se.length>0?se[se.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<n.transforms.length;)xe=n.transforms[Ze](xe)||xe;return xe}function o(se,xe,Oe){let He=xe-1,Ze=-1,Wt=!1,Gn,Ut,yt,Mt;for(;++He<=Oe;){const st=se[He];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?Ze++:Ze--,Mt=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(Gn&&!Mt&&!Ze&&!yt&&(yt=He),Mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Mt=void 0}if(!Ze&&st[0]==="enter"&&st[1].type==="listItemPrefix"||Ze===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(Gn){let Tn=He;for(Ut=void 0;Tn--;){const We=se[Tn];if(We[1].type==="lineEnding"||We[1].type==="lineEndingBlank"){if(We[0]==="exit")continue;Ut&&(se[Ut][1].type="lineEndingBlank",Wt=!0),We[1].type="lineEnding",Ut=Tn}else if(!(We[1].type==="linePrefix"||We[1].type==="blockQuotePrefix"||We[1].type==="blockQuotePrefixWhitespace"||We[1].type==="blockQuoteMarker"||We[1].type==="listItemIndent"))break}yt&&(!Ut||yt<Ut)&&(Gn._spread=!0),Gn.end=Object.assign({},Ut?se[Ut][1].start:st[1].end),se.splice(Ut||He,0,["exit",Gn,st[2]]),He++,Oe++}if(st[1].type==="listItemPrefix"){const Tn={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};Gn=Tn,se.splice(He,0,["enter",Tn,st[2]]),He++,Oe++,yt=void 0,Mt=!0}}}return se[xe][1]._spread=Wt,Oe}function s(se,xe){return Oe;function Oe(He){f.call(this,se(He),He),xe&&xe.call(this,He)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(se,xe,Oe){this.stack[this.stack.length-1].children.push(se),this.stack.push(se),this.tokenStack.push([xe,Oe||void 0]),se.position={start:Oa(xe.start),end:void 0}}function p(se){return xe;function xe(Oe){se&&se.call(this,Oe),h.call(this,Oe)}}function h(se,xe){const Oe=this.stack.pop(),He=this.tokenStack.pop();if(He)He[0].type!==se.type&&(xe?xe.call(this,se,He[0]):(He[1]||U0).call(this,se,He[0]));else throw new Error("Cannot close `"+se.type+"` ("+cs({start:se.start,end:se.end})+"): it’s not open");Oe.position.end=Oa(se.end)}function y(){return xg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function w(se){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(se),10),this.data.expectingFirstListItemValue=void 0}}function b(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=se}function k(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=se}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se.replace(/(\r?\n|\r)$/g,"")}function N(se){const xe=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=xe,Oe.identifier=er(this.sliceSerialize(se)).toLowerCase()}function j(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.title=se}function O(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.url=se}function I(se){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Oe=this.sliceSerialize(se).length;xe.depth=Oe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function U(se){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(se).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function q(se){const Oe=this.stack[this.stack.length-1].children;let He=Oe[Oe.length-1];(!He||He.type!=="text")&&(He=Rt(),He.position={start:Oa(se.start),end:void 0},Oe.push(He)),this.stack.push(He)}function B(se){const xe=this.stack.pop();xe.value+=this.sliceSerialize(se),xe.position.end=Oa(se.end)}function Y(se){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=xe.children[xe.children.length-1];Oe.position.end=Oa(se.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(xe.type)&&(q.call(this,se),B.call(this,se))}function G(){this.data.atHardBreak=!0}function he(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function Z(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function W(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function z(){const se=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";se.type+="Reference",se.referenceType=xe,delete se.url,delete se.title}else delete se.identifier,delete se.label;this.data.referenceType=void 0}function K(){const se=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";se.type+="Reference",se.referenceType=xe,delete se.url,delete se.title}else delete se.identifier,delete se.label;this.data.referenceType=void 0}function ee(se){const xe=this.sliceSerialize(se),Oe=this.stack[this.stack.length-2];Oe.label=NI(xe),Oe.identifier=er(xe).toLowerCase()}function le(){const se=this.stack[this.stack.length-1],xe=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const He=se.children;Oe.children=He}else Oe.alt=xe}function T(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.url=se}function D(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.title=se}function L(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function te(se){const xe=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=xe,Oe.identifier=er(this.sliceSerialize(se)).toLowerCase(),this.data.referenceType="full"}function ne(se){this.data.characterReferenceType=se.type}function ie(se){const xe=this.sliceSerialize(se),Oe=this.data.characterReferenceType;let He;Oe?(He=LC(xe,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=bg(xe);const Ze=this.stack[this.stack.length-1];Ze.value+=He}function ae(se){const xe=this.stack.pop();xe.position.end=Oa(se.end)}function be(se){B.call(this,se);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(se)}function me(se){B.call(this,se);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(se)}function _e(){return{type:"blockquote",children:[]}}function De(){return{type:"code",lang:null,meta:null,value:""}}function Be(){return{type:"inlineCode",value:""}}function ot(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function at(){return{type:"emphasis",children:[]}}function vt(){return{type:"heading",depth:0,children:[]}}function Ft(){return{type:"break"}}function Zt(){return{type:"html",value:""}}function aa(){return{type:"image",title:null,url:"",alt:null}}function qn(){return{type:"link",title:null,url:"",children:[]}}function ar(se){return{type:"list",ordered:se.type==="listOrdered",start:null,spread:se._spread,children:[]}}function jn(se){return{type:"listItem",spread:se._spread,checked:null,children:[]}}function wr(){return{type:"paragraph",children:[]}}function Sr(){return{type:"strong",children:[]}}function Rt(){return{type:"text",value:""}}function kr(){return{type:"thematicBreak"}}}function Oa(e){return{line:e.line,column:e.column,offset:e.offset}}function YC(e,n){let a=-1;for(;++a<n.length;){const l=n[a];Array.isArray(l)?YC(e,l):RI(e,l)}}function RI(e,n){let a;for(a in n)if(GC.call(n,a))switch(a){case"canContainEols":{const l=n[a];l&&e[a].push(...l);break}case"transforms":{const l=n[a];l&&e[a].push(...l);break}case"enter":case"exit":{const l=n[a];l&&Object.assign(e[a],l);break}}}function U0(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+cs({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+cs({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+cs({start:n.start,end:n.end})+") is still open")}function MI(e){const n=this;n.parser=a;function a(l){return TI(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function OI(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 DI(e,n){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,a),[e.applyData(n,a),{type:"text",value:`
|
|
453
|
+
`}]}function zI(e,n){const a=n.value?n.value+`
|
|
454
|
+
`:"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:l,children:[{type:"text",value:a}]};return n.meta&&(s.data={meta:n.meta}),e.patch(n,s),s=e.applyData(n,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(n,s),s}function LI(e,n){const a={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function II(e,n){const a={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function BI(e,n){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=no(l.toLowerCase()),s=e.footnoteOrder.indexOf(l);let u,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),u=e.footnoteOrder.length):u=s+1,f+=1,e.footnoteCounts.set(l,f);const p={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(u)}]};e.patch(n,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(n,h),e.applyData(n,h)}function PI(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 FI(e,n){if(e.options.allowDangerousHtml){const a={type:"raw",value:n.value};return e.patch(n,a),e.applyData(n,a)}}function XC(e,n){const a=n.referenceType;let l="]";if(a==="collapsed"?l+="[]":a==="full"&&(l+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=l:o.push({type:"text",value:l}),o}function UI(e,n){const a=String(n.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return XC(e,n);const o={src:no(l.url||""),alt:n.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,s),e.applyData(n,s)}function HI(e,n){const a={src:no(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 l={type:"element",tagName:"img",properties:a,children:[]};return e.patch(n,l),e.applyData(n,l)}function $I(e,n){const a={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,a);const l={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(n,l),e.applyData(n,l)}function VI(e,n){const a=String(n.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return XC(e,n);const o={href:no(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const s={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function qI(e,n){const a={href:no(n.url)};n.title!==null&&n.title!==void 0&&(a.title=n.title);const l={type:"element",tagName:"a",properties:a,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function GI(e,n,a){const l=e.all(n),o=a?YI(a):KC(n),s={},u=[];if(typeof n.checked=="boolean"){const y=l[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},l.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const y=l[f];(o||f!==0||y.type!=="element"||y.tagName!=="p")&&u.push({type:"text",value:`
|
|
455
|
+
`}),y.type==="element"&&y.tagName==="p"&&!o?u.push(...y.children):u.push(y)}const p=l[l.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
456
|
+
`});const h={type:"element",tagName:"li",properties:s,children:u};return e.patch(n,h),e.applyData(n,h)}function YI(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const a=e.children;let l=-1;for(;!n&&++l<a.length;)n=KC(a[l])}return n}function KC(e){const n=e.spread;return n==null?e.children.length>1:n}function XI(e,n){const a={},l=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(a.start=n.start);++o<l.length;){const u=l[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:a,children:e.wrap(l,!0)};return e.patch(n,s),e.applyData(n,s)}function KI(e,n){const a={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function QI(e,n){const a={type:"root",children:e.wrap(e.all(n))};return e.patch(n,a),e.applyData(n,a)}function ZI(e,n){const a={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function WI(e,n){const a=e.all(n),l=a.shift(),o=[];if(l){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],u),o.push(u)}if(a.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},f=hg(n.children[1]),p=jC(n.children[n.children.length-1]);f&&p&&(u.position={start:f,end:p}),o.push(u)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,s),e.applyData(n,s)}function JI(e,n,a){const l=a?a.children:void 0,s=(l?l.indexOf(n):1)===0?"th":"td",u=a&&a.type==="table"?a.align:void 0,f=u?u.length:n.children.length;let p=-1;const h=[];for(;++p<f;){const g=n.children[p],w={},b=u?u[p]:void 0;b&&(w.align=b);let k={type:"element",tagName:s,properties:w,children:[]};g&&(k.children=e.all(g),e.patch(g,k),k=e.applyData(g,k)),h.push(k)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,y),e.applyData(n,y)}function e8(e,n){const a={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}const H0=9,$0=32;function t8(e){const n=String(e),a=/\r?\n|\r/g;let l=a.exec(n),o=0;const s=[];for(;l;)s.push(V0(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=a.exec(n);return s.push(V0(n.slice(o),o>0,!1)),s.join("")}function V0(e,n,a){let l=0,o=e.length;if(n){let s=e.codePointAt(l);for(;s===H0||s===$0;)l++,s=e.codePointAt(l)}if(a){let s=e.codePointAt(o-1);for(;s===H0||s===$0;)o--,s=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function n8(e,n){const a={type:"text",value:t8(String(n.value))};return e.patch(n,a),e.applyData(n,a)}function r8(e,n){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,a),e.applyData(n,a)}const a8={blockquote:OI,break:DI,code:zI,delete:LI,emphasis:II,footnoteReference:BI,heading:PI,html:FI,imageReference:UI,image:HI,inlineCode:$I,linkReference:VI,link:qI,listItem:GI,list:XI,paragraph:KI,root:QI,strong:ZI,table:WI,tableCell:e8,tableRow:JI,text:n8,thematicBreak:r8,toml:xu,yaml:xu,definition:xu,footnoteDefinition:xu};function xu(){}const QC=-1,Od=0,ds=1,Gu=2,wg=3,Sg=4,kg=5,Cg=6,ZC=7,WC=8,q0=typeof self=="object"?self:globalThis,l8=(e,n)=>{const a=(o,s)=>(e.set(s,o),o),l=o=>{if(e.has(o))return e.get(o);const[s,u]=n[o];switch(s){case Od:case QC:return a(u,o);case ds:{const f=a([],o);for(const p of u)f.push(l(p));return f}case Gu:{const f=a({},o);for(const[p,h]of u)f[l(p)]=l(h);return f}case wg:return a(new Date(u),o);case Sg:{const{source:f,flags:p}=u;return a(new RegExp(f,p),o)}case kg:{const f=a(new Map,o);for(const[p,h]of u)f.set(l(p),l(h));return f}case Cg:{const f=a(new Set,o);for(const p of u)f.add(l(p));return f}case ZC:{const{name:f,message:p}=u;return a(new q0[f](p),o)}case WC:return a(BigInt(u),o);case"BigInt":return a(Object(BigInt(u)),o);case"ArrayBuffer":return a(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return a(new DataView(f),u)}}return a(new q0[s](u),o)};return l},G0=e=>l8(new Map,e)(0),vi="",{toString:i8}={},{keys:o8}=Object,ts=e=>{const n=typeof e;if(n!=="object"||!e)return[Od,n];const a=i8.call(e).slice(8,-1);switch(a){case"Array":return[ds,vi];case"Object":return[Gu,vi];case"Date":return[wg,vi];case"RegExp":return[Sg,vi];case"Map":return[kg,vi];case"Set":return[Cg,vi];case"DataView":return[ds,a]}return a.includes("Array")?[ds,a]:a.includes("Error")?[ZC,a]:[Gu,a]},bu=([e,n])=>e===Od&&(n==="function"||n==="symbol"),s8=(e,n,a,l)=>{const o=(u,f)=>{const p=l.push(u)-1;return a.set(f,p),p},s=u=>{if(a.has(u))return a.get(u);let[f,p]=ts(u);switch(f){case Od:{let y=u;switch(p){case"bigint":f=WC,y=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return o([QC],u)}return o([f,y],u)}case ds:{if(p){let w=u;return p==="DataView"?w=new Uint8Array(u.buffer):p==="ArrayBuffer"&&(w=new Uint8Array(u)),o([p,[...w]],u)}const y=[],g=o([f,y],u);for(const w of u)y.push(s(w));return g}case Gu:{if(p)switch(p){case"BigInt":return o([p,u.toString()],u);case"Boolean":case"Number":case"String":return o([p,u.valueOf()],u)}if(n&&"toJSON"in u)return s(u.toJSON());const y=[],g=o([f,y],u);for(const w of o8(u))(e||!bu(ts(u[w])))&&y.push([s(w),s(u[w])]);return g}case wg:return o([f,u.toISOString()],u);case Sg:{const{source:y,flags:g}=u;return o([f,{source:y,flags:g}],u)}case kg:{const y=[],g=o([f,y],u);for(const[w,b]of u)(e||!(bu(ts(w))||bu(ts(b))))&&y.push([s(w),s(b)]);return g}case Cg:{const y=[],g=o([f,y],u);for(const w of u)(e||!bu(ts(w)))&&y.push(s(w));return g}}const{message:h}=u;return o([f,{name:p,message:h}],u)};return s},Y0=(e,{json:n,lossy:a}={})=>{const l=[];return s8(!(n||a),!!n,new Map,l)(e),l},Yu=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?G0(Y0(e,n)):structuredClone(e):(e,n)=>G0(Y0(e,n));function c8(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 u8(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function d8(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||c8,l=e.options.footnoteBackLabel||u8,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const y=e.all(h),g=String(h.identifier).toUpperCase(),w=no(g.toLowerCase());let b=0;const k=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++b<=S;){k.length>0&&k.push({type:"text",value:" "});let N=typeof a=="string"?a:a(p,b);typeof N=="string"&&(N={type:"text",value:N}),k.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+w+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(p,b),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const E=y[y.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const N=E.children[E.children.length-1];N&&N.type==="text"?N.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...k)}else y.push(...k);const A={type:"element",tagName:"li",properties:{id:n+"fn-"+w},children:e.wrap(y,!0)};e.patch(h,A),f.push(A)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Yu(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
457
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
458
|
+
`}]}}const Dd=(function(e){if(e==null)return m8;if(typeof e=="function")return zd(e);if(typeof e=="object")return Array.isArray(e)?f8(e):p8(e);if(typeof e=="string")return h8(e);throw new Error("Expected function, string, or object as test")});function f8(e){const n=[];let a=-1;for(;++a<e.length;)n[a]=Dd(e[a]);return zd(l);function l(...o){let s=-1;for(;++s<n.length;)if(n[s].apply(this,o))return!0;return!1}}function p8(e){const n=e;return zd(a);function a(l){const o=l;let s;for(s in e)if(o[s]!==n[s])return!1;return!0}}function h8(e){return zd(n);function n(a){return a&&a.type===e}}function zd(e){return n;function n(a,l,o){return!!(g8(a)&&e.call(this,a,typeof l=="number"?l:void 0,o||void 0))}}function m8(){return!0}function g8(e){return e!==null&&typeof e=="object"&&"type"in e}const JC=[],y8=!0,sm=!1,x8="skip";function eE(e,n,a,l){let o;typeof n=="function"&&typeof a!="function"?(l=a,a=n):o=n;const s=Dd(o),u=l?-1:1;f(e,void 0,[])();function f(p,h,y){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return w;function w(){let b=JC,k,S,E;if((!n||s(p,h,y[y.length-1]||void 0))&&(b=b8(a(p,y)),b[0]===sm))return b;if("children"in p&&p.children){const A=p;if(A.children&&b[0]!==x8)for(S=(l?A.children.length:-1)+u,E=y.concat(A);S>-1&&S<A.children.length;){const N=A.children[S];if(k=f(N,S,E)(),k[0]===sm)return k;S=typeof k[1]=="number"?k[1]:S+u}}return b}}}function b8(e){return Array.isArray(e)?e:typeof e=="number"?[y8,e]:e==null?JC:[e]}function Eg(e,n,a,l){let o,s,u;typeof n=="function"&&typeof a!="function"?(s=void 0,u=n,o=a):(s=n,u=a,o=l),eE(e,s,f,o);function f(p,h){const y=h[h.length-1],g=y?y.children.indexOf(p):void 0;return u(p,g,y)}}const cm={}.hasOwnProperty,v8={};function w8(e,n){const a=n||v8,l=new Map,o=new Map,s=new Map,u={...a8,...a.handlers},f={all:h,applyData:k8,definitionById:l,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:u,one:p,options:a,patch:S8,wrap:E8};return Eg(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?l:o,w=String(y.identifier).toUpperCase();g.has(w)||g.set(w,y)}}),f;function p(y,g){const w=y.type,b=f.handlers[w];if(cm.call(f.handlers,w)&&b)return b(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(w)){if("children"in y){const{children:S,...E}=y,A=Yu(E);return A.children=f.all(y),A}return Yu(y)}return(f.options.unknownHandler||C8)(f,y,g)}function h(y){const g=[];if("children"in y){const w=y.children;let b=-1;for(;++b<w.length;){const k=f.one(w[b],y);if(k){if(b&&w[b-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=X0(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=X0(S.value))}Array.isArray(k)?g.push(...k):g.push(k)}}}return g}}function S8(e,n){e.position&&(n.position=uL(e))}function k8(e,n){let a=n;if(e&&e.data){const l=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof l=="string")if(a.type==="element")a.tagName=l;else{const u="children"in a?a.children:[a];a={type:"element",tagName:l,properties:{},children:u}}a.type==="element"&&s&&Object.assign(a.properties,Yu(s)),"children"in a&&a.children&&o!==null&&o!==void 0&&(a.children=o)}return a}function C8(e,n){const a=n.data||{},l="value"in n&&!(cm.call(a,"hProperties")||cm.call(a,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function E8(e,n){const a=[];let l=-1;for(n&&a.push({type:"text",value:`
|
|
459
|
+
`});++l<e.length;)l&&a.push({type:"text",value:`
|
|
460
|
+
`}),a.push(e[l]);return n&&e.length>0&&a.push({type:"text",value:`
|
|
461
|
+
`}),a}function X0(e){let n=0,a=e.charCodeAt(n);for(;a===9||a===32;)n++,a=e.charCodeAt(n);return e.slice(n)}function K0(e,n){const a=w8(e,n),l=a.one(e,void 0),o=d8(a),s=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
462
|
+
`},o),s}function A8(e,n){return e&&"run"in e?async function(a,l){const o=K0(a,{file:l,...n});await e.run(o,l)}:function(a,l){return K0(a,{file:l,...e||n})}}function Q0(e){if(e)throw e}var bh,Z0;function N8(){if(Z0)return bh;Z0=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},s=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},u=function(h,y){a&&y.name==="__proto__"?a(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(l)return l(h,y).value}else return;return h[y]};return bh=function p(){var h,y,g,w,b,k,S=arguments[0],E=1,A=arguments.length,N=!1;for(typeof S=="boolean"&&(N=S,S=arguments[1]||{},E=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});E<A;++E)if(h=arguments[E],h!=null)for(y in h)g=f(S,y),w=f(h,y),S!==w&&(N&&w&&(s(w)||(b=o(w)))?(b?(b=!1,k=g&&o(g)?g:[]):k=g&&s(g)?g:{},u(S,{name:y,newValue:p(N,k,w)})):typeof w<"u"&&u(S,{name:y,newValue:w}));return S},bh}var j8=N8();const vh=Ku(j8);function um(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 T8(){const e=[],n={run:a,use:l};return n;function a(...o){let s=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...o);function f(p,...h){const y=e[++s];let g=-1;if(p){u(p);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,y?_8(y,f)(...h):u(null,...h)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function _8(e,n){let a;return l;function l(...u){const f=e.length>u.length;let p;f&&u.push(o);try{p=e.apply(this,u)}catch(h){const y=h;if(f&&a)throw y;return o(y)}f||(p&&p.then&&typeof p.then=="function"?p.then(s,o):p instanceof Error?o(p):s(p))}function o(u,...f){a||(a=!0,n(u,...f))}function s(u){o(null,u)}}const pr={basename:R8,dirname:M8,extname:O8,join:D8,sep:"/"};function R8(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Us(e);let a=0,l=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){a=o+1;break}}else l<0&&(s=!0,l=o+1);return l<0?"":e.slice(a,l)}if(n===e)return"";let u=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){a=o+1;break}}else u<0&&(s=!0,u=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(l=o):(f=-1,l=u));return a===l?l=u:l<0&&(l=e.length),e.slice(a,l)}function M8(e){if(Us(e),e.length===0)return".";let n=-1,a=e.length,l;for(;--a;)if(e.codePointAt(a)===47){if(l){n=a;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function O8(e){Us(e);let n=e.length,a=-1,l=0,o=-1,s=0,u;for(;n--;){const f=e.codePointAt(n);if(f===47){if(u){l=n+1;break}continue}a<0&&(u=!0,a=n+1),f===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||a<0||s===0||s===1&&o===a-1&&o===l+1?"":e.slice(o,a)}function D8(...e){let n=-1,a;for(;++n<e.length;)Us(e[n]),e[n]&&(a=a===void 0?e[n]:a+"/"+e[n]);return a===void 0?".":z8(a)}function z8(e){Us(e);const n=e.codePointAt(0)===47;let a=L8(e,!n);return a.length===0&&!n&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),n?"/"+a:a}function L8(e,n){let a="",l=0,o=-1,s=0,u=-1,f,p;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(o===u-1||s===1))if(o!==u-1&&s===2){if(a.length<2||l!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",l=0):(a=a.slice(0,p),l=a.length-1-a.lastIndexOf("/")),o=u,s=0;continue}}else if(a.length>0){a="",l=0,o=u,s=0;continue}}n&&(a=a.length>0?a+"/..":"..",l=2)}else a.length>0?a+="/"+e.slice(o+1,u):a=e.slice(o+1,u),l=u-o-1;o=u,s=0}else f===46&&s>-1?s++:s=-1}return a}function Us(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const I8={cwd:B8};function B8(){return"/"}function dm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function P8(e){if(typeof e=="string")e=new URL(e);else if(!dm(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 F8(e)}function F8(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let a=-1;for(;++a<n.length;)if(n.codePointAt(a)===37&&n.codePointAt(a+1)===50){const l=n.codePointAt(a+2);if(l===70||l===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 wh=["history","path","basename","stem","extname","dirname"];class tE{constructor(n){let a;n?dm(n)?a={path:n}:typeof n=="string"||U8(n)?a={value:n}:a=n:a={},this.cwd="cwd"in a?"":I8.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<wh.length;){const s=wh[l];s in a&&a[s]!==void 0&&a[s]!==null&&(this[s]=s==="history"?[...a[s]]:a[s])}let o;for(o in a)wh.includes(o)||(this[o]=a[o])}get basename(){return typeof this.path=="string"?pr.basename(this.path):void 0}set basename(n){kh(n,"basename"),Sh(n,"basename"),this.path=pr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?pr.dirname(this.path):void 0}set dirname(n){W0(this.basename,"dirname"),this.path=pr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?pr.extname(this.path):void 0}set extname(n){if(Sh(n,"extname"),W0(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=pr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){dm(n)&&(n=P8(n)),kh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?pr.basename(this.path,this.extname):void 0}set stem(n){kh(n,"stem"),Sh(n,"stem"),this.path=pr.join(this.dirname||"",n+(this.extname||""))}fail(n,a,l){const o=this.message(n,a,l);throw o.fatal=!0,o}info(n,a,l){const o=this.message(n,a,l);return o.fatal=void 0,o}message(n,a,l){const o=new Qt(n,a,l);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 Sh(e,n){if(e&&e.includes(pr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+pr.sep+"`")}function kh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function W0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function U8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const H8=(function(e){const l=this.constructor.prototype,o=l[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,l),s}),$8={}.hasOwnProperty;class Ag extends H8{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=T8()}copy(){const n=new Ag;let a=-1;for(;++a<this.attachers.length;){const l=this.attachers[a];n.use(...l)}return n.data(vh(!0,{},this.namespace)),n}data(n,a){return typeof n=="string"?arguments.length===2?(Ah("data",this.frozen),this.namespace[n]=a,this):$8.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Ah("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,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=a.call(n,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const a=vu(n),l=this.parser||this.Parser;return Ch("parse",l),l(String(a),a)}process(n,a){const l=this;return this.freeze(),Ch("process",this.parser||this.Parser),Eh("process",this.compiler||this.Compiler),a?o(void 0,a):new Promise(o);function o(s,u){const f=vu(n),p=l.parse(f);l.run(p,f,function(y,g,w){if(y||!g||!w)return h(y);const b=g,k=l.stringify(b,w);G8(k)?w.value=k:w.result=k,h(y,w)});function h(y,g){y||!g?u(y):s?s(g):a(void 0,g)}}}processSync(n){let a=!1,l;return this.freeze(),Ch("processSync",this.parser||this.Parser),Eh("processSync",this.compiler||this.Compiler),this.process(n,o),e1("processSync","process",a),l;function o(s,u){a=!0,Q0(s),l=u}}run(n,a,l){J0(n),this.freeze();const o=this.transformers;return!l&&typeof a=="function"&&(l=a,a=void 0),l?s(void 0,l):new Promise(s);function s(u,f){const p=vu(a);o.run(n,p,h);function h(y,g,w){const b=g||n;y?f(y):u?u(b):l(void 0,b,w)}}}runSync(n,a){let l=!1,o;return this.run(n,a,s),e1("runSync","run",l),o;function s(u,f){Q0(u),o=f,l=!0}}stringify(n,a){this.freeze();const l=vu(a),o=this.compiler||this.Compiler;return Eh("stringify",o),J0(n),o(n,l)}use(n,...a){const l=this.attachers,o=this.namespace;if(Ah("use",this.frozen),n!=null)if(typeof n=="function")p(n,a);else if(typeof n=="object")Array.isArray(n)?f(n):u(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...g]=h;p(y,g)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(o.settings=vh(!0,o.settings,h.settings))}function f(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const g=h[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,y){let g=-1,w=-1;for(;++g<l.length;)if(l[g][0]===h){w=g;break}if(w===-1)l.push([h,...y]);else if(y.length>0){let[b,...k]=y;const S=l[w][1];um(S)&&um(b)&&(b=vh(!0,S,b)),l[w]=[h,b,...k]}}}}const V8=new Ag().freeze();function Ch(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Eh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ah(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 J0(e){if(!um(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function e1(e,n,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function vu(e){return q8(e)?e:new tE(e)}function q8(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function G8(e){return typeof e=="string"||Y8(e)}function Y8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const X8="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",t1=[],n1={allowDangerousHtml:!0},K8=/^(https?|ircs?|mailto|xmpp)$/i,Q8=[{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 Z8(e){const n=W8(e),a=J8(e);return e9(n.runSync(n.parse(a),a),e)}function W8(e){const n=e.rehypePlugins||t1,a=e.remarkPlugins||t1,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...n1}:n1;return V8().use(MI).use(a).use(A8,l).use(n)}function J8(e){const n=e.children||"",a=new tE;return typeof n=="string"&&(a.value=n),a}function e9(e,n){const a=n.allowedElements,l=n.allowElement,o=n.components,s=n.disallowedElements,u=n.skipHtml,f=n.unwrapDisallowed,p=n.urlTransform||t9;for(const y of Q8)Object.hasOwn(n,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+X8+y.id,void 0);return Eg(e,h),mL(e,{Fragment:d.Fragment,components:o,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function h(y,g,w){if(y.type==="raw"&&w&&typeof g=="number")return u?w.children.splice(g,1):w.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let b;for(b in gh)if(Object.hasOwn(gh,b)&&Object.hasOwn(y.properties,b)){const k=y.properties[b],S=gh[b];(S===null||S.includes(y.tagName))&&(y.properties[b]=p(String(k||""),b,y))}}if(y.type==="element"){let b=a?!a.includes(y.tagName):s?s.includes(y.tagName):!1;if(!b&&l&&typeof g=="number"&&(b=!l(y,g,w)),b&&w&&typeof g=="number")return f&&y.children?w.children.splice(g,1,...y.children):w.children.splice(g,1),g}}}function t9(e){const n=e.indexOf(":"),a=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||a!==-1&&n>a||l!==-1&&n>l||K8.test(e.slice(0,n))?e:""}function r1(e,n){const a=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,o=a.indexOf(n);for(;o!==-1;)l++,o=a.indexOf(n,o+n.length);return l}function n9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function r9(e,n,a){const o=Dd((a||{}).ignore||[]),s=a9(n);let u=-1;for(;++u<s.length;)eE(e,"text",f);function f(h,y){let g=-1,w;for(;++g<y.length;){const b=y[g],k=w?w.children:void 0;if(o(b,k?k.indexOf(b):void 0,w))return;w=b}if(w)return p(h,y)}function p(h,y){const g=y[y.length-1],w=s[u][0],b=s[u][1];let k=0;const E=g.children.indexOf(h);let A=!1,N=[];w.lastIndex=0;let j=w.exec(h.value);for(;j;){const O=j.index,I={index:j.index,input:j.input,stack:[...y,h]};let M=b(...j,I);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?w.lastIndex=O+1:(k!==O&&N.push({type:"text",value:h.value.slice(k,O)}),Array.isArray(M)?N.push(...M):M&&N.push(M),k=O+j[0].length,A=!0),!w.global)break;j=w.exec(h.value)}return A?(k<h.value.length&&N.push({type:"text",value:h.value.slice(k)}),g.children.splice(E,1,...N)):N=[h],E+N.length}}function a9(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 l=-1;for(;++l<a.length;){const o=a[l];n.push([l9(o[0]),i9(o[1])])}return n}function l9(e){return typeof e=="string"?new RegExp(n9(e),"g"):e}function i9(e){return typeof e=="function"?e:function(){return e}}const Nh="phrasing",jh=["autolink","link","image","label"];function o9(){return{transforms:[h9],enter:{literalAutolink:c9,literalAutolinkEmail:Th,literalAutolinkHttp:Th,literalAutolinkWww:Th},exit:{literalAutolink:p9,literalAutolinkEmail:f9,literalAutolinkHttp:u9,literalAutolinkWww:d9}}}function s9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nh,notInConstruct:jh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nh,notInConstruct:jh},{character:":",before:"[ps]",after:"\\/",inConstruct:Nh,notInConstruct:jh}]}}function c9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Th(e){this.config.enter.autolinkProtocol.call(this,e)}function u9(e){this.config.exit.autolinkProtocol.call(this,e)}function d9(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 f9(e){this.config.exit.autolinkEmail.call(this,e)}function p9(e){this.exit(e)}function h9(e){r9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,m9],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),g9]],{ignore:["link","linkReference"]})}function m9(e,n,a,l,o){let s="";if(!nE(o)||(/^w/i.test(n)&&(a=n+a,n="",s="http://"),!y9(a)))return!1;const u=x9(a+l);if(!u[0])return!1;const f={type:"link",title:null,url:s+n+u[0],children:[{type:"text",value:n+u[0]}]};return u[1]?[f,{type:"text",value:u[1]}]:f}function g9(e,n,a,l){return!nE(l,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+a,children:[{type:"text",value:n+"@"+a}]}}function y9(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 x9(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let a=n[0],l=a.indexOf(")");const o=r1(e,"(");let s=r1(e,")");for(;l!==-1&&o>s;)e+=a.slice(0,l+1),a=a.slice(l+1),l=a.indexOf(")"),s++;return[e,a]}function nE(e,n){const a=e.input.charCodeAt(e.index-1);return(e.index===0||Al(a)||Rd(a))&&(!n||a!==47)}rE.peek=N9;function b9(){this.buffer()}function v9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function w9(){this.buffer()}function S9(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function k9(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=er(this.sliceSerialize(e)).toLowerCase(),a.label=n}function C9(e){this.exit(e)}function E9(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=er(this.sliceSerialize(e)).toLowerCase(),a.label=n}function A9(e){this.exit(e)}function N9(){return"["}function rE(e,n,a,l){const o=a.createTracker(l);let s=o.move("[^");const u=a.enter("footnoteReference"),f=a.enter("reference");return s+=o.move(a.safe(a.associationId(e),{after:"]",before:s})),f(),u(),s+=o.move("]"),s}function j9(){return{enter:{gfmFootnoteCallString:b9,gfmFootnoteCall:v9,gfmFootnoteDefinitionLabelString:w9,gfmFootnoteDefinition:S9},exit:{gfmFootnoteCallString:k9,gfmFootnoteCall:C9,gfmFootnoteDefinitionLabelString:E9,gfmFootnoteDefinition:A9}}}function T9(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:a,footnoteReference:rE},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(l,o,s,u){const f=s.createTracker(u);let p=f.move("[^");const h=s.enter("footnoteDefinition"),y=s.enter("label");return p+=f.move(s.safe(s.associationId(l),{before:p,after:"]"})),y(),p+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),p+=f.move((n?`
|
|
463
|
+
`:" ")+s.indentLines(s.containerFlow(l,f.current()),n?aE:_9))),h(),p}}function _9(e,n,a){return n===0?e:aE(e,n,a)}function aE(e,n,a){return(a?"":" ")+e}const R9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];lE.peek=L9;function M9(){return{canContainEols:["delete"],enter:{strikethrough:D9},exit:{strikethrough:z9}}}function O9(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:R9}],handlers:{delete:lE}}}function D9(e){this.enter({type:"delete",children:[]},e)}function z9(e){this.exit(e)}function lE(e,n,a,l){const o=a.createTracker(l),s=a.enter("strikethrough");let u=o.move("~~");return u+=a.containerPhrasing(e,{...o.current(),before:u,after:"~"}),u+=o.move("~~"),s(),u}function L9(){return"~"}function I9(e){return e.length}function B9(e,n){const a=n||{},l=(a.align||[]).concat(),o=a.stringLength||I9,s=[],u=[],f=[],p=[];let h=0,y=-1;for(;++y<e.length;){const S=[],E=[];let A=-1;for(e[y].length>h&&(h=e[y].length);++A<e[y].length;){const N=P9(e[y][A]);if(a.alignDelimiters!==!1){const j=o(N);E[A]=j,(p[A]===void 0||j>p[A])&&(p[A]=j)}S.push(N)}u[y]=S,f[y]=E}let g=-1;if(typeof l=="object"&&"length"in l)for(;++g<h;)s[g]=a1(l[g]);else{const S=a1(l);for(;++g<h;)s[g]=S}g=-1;const w=[],b=[];for(;++g<h;){const S=s[g];let E="",A="";S===99?(E=":",A=":"):S===108?E=":":S===114&&(A=":");let N=a.alignDelimiters===!1?1:Math.max(1,p[g]-E.length-A.length);const j=E+"-".repeat(N)+A;a.alignDelimiters!==!1&&(N=E.length+N+A.length,N>p[g]&&(p[g]=N),b[g]=N),w[g]=j}u.splice(1,0,w),f.splice(1,0,b),y=-1;const k=[];for(;++y<u.length;){const S=u[y],E=f[y];g=-1;const A=[];for(;++g<h;){const N=S[g]||"";let j="",O="";if(a.alignDelimiters!==!1){const I=p[g]-(E[g]||0),M=s[g];M===114?j=" ".repeat(I):M===99?I%2?(j=" ".repeat(I/2+.5),O=" ".repeat(I/2-.5)):(j=" ".repeat(I/2),O=j):O=" ".repeat(I)}a.delimiterStart!==!1&&!g&&A.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&N==="")&&(a.delimiterStart!==!1||g)&&A.push(" "),a.alignDelimiters!==!1&&A.push(j),A.push(N),a.alignDelimiters!==!1&&A.push(O),a.padding!==!1&&A.push(" "),(a.delimiterEnd!==!1||g!==h-1)&&A.push("|")}k.push(a.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return k.join(`
|
|
464
|
+
`)}function P9(e){return e==null?"":String(e)}function a1(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 F9(e,n,a,l){const o=a.enter("blockquote"),s=a.createTracker(l);s.move("> "),s.shift(2);const u=a.indentLines(a.containerFlow(e,s.current()),U9);return o(),u}function U9(e,n,a){return">"+(a?"":" ")+e}function H9(e,n){return l1(e,n.inConstruct,!0)&&!l1(e,n.notInConstruct,!1)}function l1(e,n,a){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return a;let l=-1;for(;++l<n.length;)if(e.includes(n[l]))return!0;return!1}function i1(e,n,a,l){let o=-1;for(;++o<a.unsafe.length;)if(a.unsafe[o].character===`
|
|
465
|
+
`&&H9(a.stack,a.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
466
|
+
`}function $9(e,n){const a=String(e);let l=a.indexOf(n),o=l,s=0,u=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++s>u&&(u=s):s=1,o=l+n.length,l=a.indexOf(n,o);return u}function V9(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 q9(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 G9(e,n,a,l){const o=q9(a),s=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(V9(e,a)){const g=a.enter("codeIndented"),w=a.indentLines(s,Y9);return g(),w}const f=a.createTracker(l),p=o.repeat(Math.max($9(s,o)+1,3)),h=a.enter("codeFenced");let y=f.move(p);if(e.lang){const g=a.enter(`codeFencedLang${u}`);y+=f.move(a.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=a.enter(`codeFencedMeta${u}`);y+=f.move(" "),y+=f.move(a.safe(e.meta,{before:y,after:`
|
|
467
|
+
`,encode:["`"],...f.current()})),g()}return y+=f.move(`
|
|
468
|
+
`),s&&(y+=f.move(s+`
|
|
469
|
+
`)),y+=f.move(p),h(),y}function Y9(e,n,a){return(a?"":" ")+e}function Ng(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 X9(e,n,a,l){const o=Ng(a),s=o==='"'?"Quote":"Apostrophe",u=a.enter("definition");let f=a.enter("label");const p=a.createTracker(l);let h=p.move("[");return h+=p.move(a.safe(a.associationId(e),{before:h,after:"]",...p.current()})),h+=p.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(a.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=a.enter("destinationRaw"),h+=p.move(a.safe(e.url,{before:h,after:e.title?" ":`
|
|
470
|
+
`,...p.current()}))),f(),e.title&&(f=a.enter(`title${s}`),h+=p.move(" "+o),h+=p.move(a.safe(e.title,{before:h,after:o,...p.current()})),h+=p.move(o),f()),u(),h}function K9(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 vs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xu(e,n,a){const l=Hi(e),o=Hi(n);return l===void 0?o===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===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}}iE.peek=Q9;function iE(e,n,a,l){const o=K9(a),s=a.enter("emphasis"),u=a.createTracker(l),f=u.move(o);let p=u.move(a.containerPhrasing(e,{after:o,before:f,...u.current()}));const h=p.charCodeAt(0),y=Xu(l.before.charCodeAt(l.before.length-1),h,o);y.inside&&(p=vs(h)+p.slice(1));const g=p.charCodeAt(p.length-1),w=Xu(l.after.charCodeAt(0),g,o);w.inside&&(p=p.slice(0,-1)+vs(g));const b=u.move(o);return s(),a.attentionEncodeSurroundingInfo={after:w.outside,before:y.outside},f+p+b}function Q9(e,n,a){return a.options.emphasis||"*"}function Z9(e,n){let a=!1;return Eg(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return a=!0,sm}),!!((!e.depth||e.depth<3)&&xg(e)&&(n.options.setext||a))}function W9(e,n,a,l){const o=Math.max(Math.min(6,e.depth||1),1),s=a.createTracker(l);if(Z9(e,a)){const y=a.enter("headingSetext"),g=a.enter("phrasing"),w=a.containerPhrasing(e,{...s.current(),before:`
|
|
471
|
+
`,after:`
|
|
472
|
+
`});return g(),y(),w+`
|
|
473
|
+
`+(o===1?"=":"-").repeat(w.length-(Math.max(w.lastIndexOf("\r"),w.lastIndexOf(`
|
|
474
|
+
`))+1))}const u="#".repeat(o),f=a.enter("headingAtx"),p=a.enter("phrasing");s.move(u+" ");let h=a.containerPhrasing(e,{before:"# ",after:`
|
|
475
|
+
`,...s.current()});return/^[\t ]/.test(h)&&(h=vs(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,a.options.closeAtx&&(h+=" "+u),p(),f(),h}oE.peek=J9;function oE(e){return e.value||""}function J9(){return"<"}sE.peek=eB;function sE(e,n,a,l){const o=Ng(a),s=o==='"'?"Quote":"Apostrophe",u=a.enter("image");let f=a.enter("label");const p=a.createTracker(l);let h=p.move("![");return h+=p.move(a.safe(e.alt,{before:h,after:"]",...p.current()})),h+=p.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(a.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=a.enter("destinationRaw"),h+=p.move(a.safe(e.url,{before:h,after:e.title?" ":")",...p.current()}))),f(),e.title&&(f=a.enter(`title${s}`),h+=p.move(" "+o),h+=p.move(a.safe(e.title,{before:h,after:o,...p.current()})),h+=p.move(o),f()),h+=p.move(")"),u(),h}function eB(){return"!"}cE.peek=tB;function cE(e,n,a,l){const o=e.referenceType,s=a.enter("imageReference");let u=a.enter("label");const f=a.createTracker(l);let p=f.move("![");const h=a.safe(e.alt,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),u();const y=a.stack;a.stack=[],u=a.enter("reference");const g=a.safe(a.associationId(e),{before:p,after:"]",...f.current()});return u(),a.stack=y,s(),o==="full"||!h||h!==g?p+=f.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function tB(){return"!"}uE.peek=nB;function uE(e,n,a){let l=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++s<a.unsafe.length;){const u=a.unsafe[s],f=a.compilePattern(u);let p;if(u.atBreak)for(;p=f.exec(l);){let h=p.index;l.charCodeAt(h)===10&&l.charCodeAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(p.index+1)}}return o+l+o}function nB(){return"`"}function dE(e,n){const a=xg(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))}fE.peek=rB;function fE(e,n,a,l){const o=Ng(a),s=o==='"'?"Quote":"Apostrophe",u=a.createTracker(l);let f,p;if(dE(e,a)){const y=a.stack;a.stack=[],f=a.enter("autolink");let g=u.move("<");return g+=u.move(a.containerPhrasing(e,{before:g,after:">",...u.current()})),g+=u.move(">"),f(),a.stack=y,g}f=a.enter("link"),p=a.enter("label");let h=u.move("[");return h+=u.move(a.containerPhrasing(e,{before:h,after:"](",...u.current()})),h+=u.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=a.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(a.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(p=a.enter("destinationRaw"),h+=u.move(a.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),p(),e.title&&(p=a.enter(`title${s}`),h+=u.move(" "+o),h+=u.move(a.safe(e.title,{before:h,after:o,...u.current()})),h+=u.move(o),p()),h+=u.move(")"),f(),h}function rB(e,n,a){return dE(e,a)?"<":"["}pE.peek=aB;function pE(e,n,a,l){const o=e.referenceType,s=a.enter("linkReference");let u=a.enter("label");const f=a.createTracker(l);let p=f.move("[");const h=a.containerPhrasing(e,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),u();const y=a.stack;a.stack=[],u=a.enter("reference");const g=a.safe(a.associationId(e),{before:p,after:"]",...f.current()});return u(),a.stack=y,s(),o==="full"||!h||h!==g?p+=f.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function aB(){return"["}function jg(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 lB(e){const n=jg(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 iB(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 hE(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 oB(e,n,a,l){const o=a.enter("list"),s=a.bulletCurrent;let u=e.ordered?iB(a):jg(a);const f=e.ordered?u==="."?")":".":lB(a);let p=n&&a.bulletLastUsed?u===a.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&y&&(!y.children||!y.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&&(p=!0),hE(a)===u&&y){let g=-1;for(;++g<e.children.length;){const w=e.children[g];if(w&&w.type==="listItem"&&w.children&&w.children[0]&&w.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(u=f),a.bulletCurrent=u;const h=a.containerFlow(e,l);return a.bulletLastUsed=u,a.bulletCurrent=s,o(),h}function sB(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 cB(e,n,a,l){const o=sB(a);let s=a.bulletCurrent||jg(a);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(a.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let u=s.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(u=Math.ceil(u/4)*4);const f=a.createTracker(l);f.move(s+" ".repeat(u-s.length)),f.shift(u);const p=a.enter("listItem"),h=a.indentLines(a.containerFlow(e,f.current()),y);return p(),h;function y(g,w,b){return w?(b?"":" ".repeat(u))+g:(b?s:s+" ".repeat(u-s.length))+g}}function uB(e,n,a,l){const o=a.enter("paragraph"),s=a.enter("phrasing"),u=a.containerPhrasing(e,l);return s(),o(),u}const dB=Dd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fB(e,n,a,l){return(e.children.some(function(u){return dB(u)})?a.containerPhrasing:a.containerFlow).call(a,e,l)}function pB(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}mE.peek=hB;function mE(e,n,a,l){const o=pB(a),s=a.enter("strong"),u=a.createTracker(l),f=u.move(o+o);let p=u.move(a.containerPhrasing(e,{after:o,before:f,...u.current()}));const h=p.charCodeAt(0),y=Xu(l.before.charCodeAt(l.before.length-1),h,o);y.inside&&(p=vs(h)+p.slice(1));const g=p.charCodeAt(p.length-1),w=Xu(l.after.charCodeAt(0),g,o);w.inside&&(p=p.slice(0,-1)+vs(g));const b=u.move(o+o);return s(),a.attentionEncodeSurroundingInfo={after:w.outside,before:y.outside},f+p+b}function hB(e,n,a){return a.options.strong||"*"}function mB(e,n,a,l){return a.safe(e.value,l)}function gB(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 yB(e,n,a){const l=(hE(a)+(a.options.ruleSpaces?" ":"")).repeat(gB(a));return a.options.ruleSpaces?l.slice(0,-1):l}const gE={blockquote:F9,break:i1,code:G9,definition:X9,emphasis:iE,hardBreak:i1,heading:W9,html:oE,image:sE,imageReference:cE,inlineCode:uE,link:fE,linkReference:pE,list:oB,listItem:cB,paragraph:uB,root:fB,strong:mE,text:mB,thematicBreak:yB};function xB(){return{enter:{table:bB,tableData:o1,tableHeader:o1,tableRow:wB},exit:{codeText:SB,table:vB,tableData:_h,tableHeader:_h,tableRow:_h}}}function bB(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 vB(e){this.exit(e),this.data.inTable=void 0}function wB(e){this.enter({type:"tableRow",children:[]},e)}function _h(e){this.exit(e)}function o1(e){this.enter({type:"tableCell",children:[]},e)}function SB(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,kB));const a=this.stack[this.stack.length-1];a.type,a.value=n,this.exit(e)}function kB(e,n){return n==="|"?n:e}function CB(e){const n=e||{},a=n.tableCellPadding,l=n.tablePipeAlign,o=n.stringLength,s=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
476
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:w,table:u,tableCell:p,tableRow:f}};function u(b,k,S,E){return h(y(b,S,E),b.align)}function f(b,k,S,E){const A=g(b,S,E),N=h([A]);return N.slice(0,N.indexOf(`
|
|
477
|
+
`))}function p(b,k,S,E){const A=S.enter("tableCell"),N=S.enter("phrasing"),j=S.containerPhrasing(b,{...E,before:s,after:s});return N(),A(),j}function h(b,k){return B9(b,{align:k,alignDelimiters:l,padding:a,stringLength:o})}function y(b,k,S){const E=b.children;let A=-1;const N=[],j=k.enter("table");for(;++A<E.length;)N[A]=g(E[A],k,S);return j(),N}function g(b,k,S){const E=b.children;let A=-1;const N=[],j=k.enter("tableRow");for(;++A<E.length;)N[A]=p(E[A],b,k,S);return j(),N}function w(b,k,S){let E=gE.inlineCode(b,k,S);return S.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function EB(){return{exit:{taskListCheckValueChecked:s1,taskListCheckValueUnchecked:s1,paragraph:NB}}}function AB(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jB}}}function s1(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function NB(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 l=a.children[0];if(l&&l.type==="text"){const o=n.children;let s=-1,u;for(;++s<o.length;){const f=o[s];if(f.type==="paragraph"){u=f;break}}u===a&&(l.value=l.value.slice(1),l.value.length===0?a.children.shift():a.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,a.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function jB(e,n,a,l){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",f=a.createTracker(l);s&&f.move(u);let p=gE.listItem(e,n,a,{...l,...f.current()});return s&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),p;function h(y){return y+u}}function TB(){return[o9(),j9(),M9(),xB(),EB()]}function _B(e){return{extensions:[s9(),T9(e),O9(),CB(e),AB()]}}const RB={tokenize:IB,partial:!0},yE={tokenize:BB,partial:!0},xE={tokenize:PB,partial:!0},bE={tokenize:FB,partial:!0},MB={tokenize:UB,partial:!0},vE={name:"wwwAutolink",tokenize:zB,previous:SE},wE={name:"protocolAutolink",tokenize:LB,previous:kE},ra={name:"emailAutolink",tokenize:DB,previous:CE},vr={};function OB(){return{text:vr}}let xl=48;for(;xl<123;)vr[xl]=ra,xl++,xl===58?xl=65:xl===91&&(xl=97);vr[43]=ra;vr[45]=ra;vr[46]=ra;vr[95]=ra;vr[72]=[ra,wE];vr[104]=[ra,wE];vr[87]=[ra,vE];vr[119]=[ra,vE];function DB(e,n,a){const l=this;let o,s;return u;function u(g){return!fm(g)||!CE.call(l,l.previous)||Tg(l.events)?a(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return fm(g)?(e.consume(g),f):g===64?(e.consume(g),p):a(g)}function p(g){return g===46?e.check(MB,y,h)(g):g===45||g===95||Kt(g)?(s=!0,e.consume(g),p):y(g)}function h(g){return e.consume(g),o=!0,p}function y(g){return s&&o&&rn(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(g)):a(g)}}function zB(e,n,a){const l=this;return o;function o(u){return u!==87&&u!==119||!SE.call(l,l.previous)||Tg(l.events)?a(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(RB,e.attempt(yE,e.attempt(xE,s),a),a)(u))}function s(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(u)}}function LB(e,n,a){const l=this;let o="",s=!1;return u;function u(g){return(g===72||g===104)&&kE.call(l,l.previous)&&!Tg(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),f):a(g)}function f(g){if(rn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const w=o.toLowerCase();if(w==="http"||w==="https")return e.consume(g),p}return a(g)}function p(g){return g===47?(e.consume(g),s?h:(s=!0,p)):a(g)}function h(g){return g===null||qu(g)||pt(g)||Al(g)||Rd(g)?a(g):e.attempt(yE,e.attempt(xE,y),a)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(g)}}function IB(e,n,a){let l=0;return o;function o(u){return(u===87||u===119)&&l<3?(l++,e.consume(u),o):u===46&&l===3?(e.consume(u),s):a(u)}function s(u){return u===null?a(u):n(u)}}function BB(e,n,a){let l,o,s;return u;function u(h){return h===46||h===95?e.check(bE,p,f)(h):h===null||pt(h)||Al(h)||h!==45&&Rd(h)?p(h):(s=!0,e.consume(h),u)}function f(h){return h===95?l=!0:(o=l,l=void 0),e.consume(h),u}function p(h){return o||l||!s?a(h):n(h)}}function PB(e,n){let a=0,l=0;return o;function o(u){return u===40?(a++,e.consume(u),o):u===41&&l<a?s(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(bE,n,s)(u):u===null||pt(u)||Al(u)?n(u):(e.consume(u),o)}function s(u){return u===41&&l++,e.consume(u),o}}function FB(e,n,a){return l;function l(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),l):f===38?(e.consume(f),s):f===93?(e.consume(f),o):f===60||f===null||pt(f)||Al(f)?n(f):a(f)}function o(f){return f===null||f===40||f===91||pt(f)||Al(f)?n(f):l(f)}function s(f){return rn(f)?u(f):a(f)}function u(f){return f===59?(e.consume(f),l):rn(f)?(e.consume(f),u):a(f)}}function UB(e,n,a){return l;function l(s){return e.consume(s),o}function o(s){return Kt(s)?a(s):n(s)}}function SE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pt(e)}function kE(e){return!rn(e)}function CE(e){return!(e===47||fm(e))}function fm(e){return e===43||e===45||e===46||e===95||Kt(e)}function Tg(e){let n=e.length,a=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){a=!0;break}if(l._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const HB={tokenize:QB,partial:!0};function $B(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:YB,continuation:{tokenize:XB},exit:KB}},text:{91:{name:"gfmFootnoteCall",tokenize:GB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:VB,resolveTo:qB}}}}function VB(e,n,a){const l=this;let o=l.events.length;const s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u;for(;o--;){const p=l.events[o][1];if(p.type==="labelImage"){u=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return f;function f(p){if(!u||!u._balanced)return a(p);const h=er(l.sliceSerialize({start:u.end,end:l.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?a(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),n(p))}}function qB(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 l={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 s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[a+1],e[a+2],["enter",l,n],e[a+3],e[a+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",u,n],["exit",u,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(a,e.length-a+1,...f),e}function GB(e,n,a){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s=0,u;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?a(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!u||g===null||g===91||pt(g))return a(g);if(g===93){e.exit("chunkString");const w=e.exit("gfmFootnoteCallString");return o.includes(er(l.sliceSerialize(w)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):a(g)}return pt(g)||(u=!0),s++,e.consume(g),g===92?y:h}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function YB(e,n,a){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s,u=0,f;return p;function p(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):a(k)}function y(k){if(u>999||k===93&&!f||k===null||k===91||pt(k))return a(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return s=er(l.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),w}return pt(k)||(f=!0),u++,e.consume(k),k===92?g:y}function g(k){return k===91||k===92||k===93?(e.consume(k),u++,y):y(k)}function w(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(s)||o.push(s),Je(e,b,"gfmFootnoteDefinitionWhitespace")):a(k)}function b(k){return n(k)}}function XB(e,n,a){return e.check(Fs,n,e.attempt(HB,n,a))}function KB(e){e.exit("gfmFootnoteDefinition")}function QB(e,n,a){const l=this;return Je(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const u=l.events[l.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?n(s):a(s)}}function ZB(e){let a=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:s,resolveAll:o};return a==null&&(a=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(u,f){let p=-1;for(;++p<u.length;)if(u[p][0]==="enter"&&u[p][1].type==="strikethroughSequenceTemporary"&&u[p][1]._close){let h=p;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[p][1].end.offset-u[p][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[p][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[p][1].end)},g={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[p][1].start)},w=[["enter",y,f],["enter",u[h][1],f],["exit",u[h][1],f],["enter",g,f]],b=f.parser.constructs.insideSpan.null;b&&An(w,w.length,0,Md(b,u.slice(h+1,p),f)),An(w,w.length,0,[["exit",g,f],["enter",u[p][1],f],["exit",u[p][1],f],["exit",y,f]]),An(u,h-1,p-h+3,w),p=h+w.length-2;break}}for(p=-1;++p<u.length;)u[p][1].type==="strikethroughSequenceTemporary"&&(u[p][1].type="data");return u}function s(u,f,p){const h=this.previous,y=this.events;let g=0;return w;function w(k){return h===126&&y[y.length-1][1].type!=="characterEscape"?p(k):(u.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const S=Hi(h);if(k===126)return g>1?p(k):(u.consume(k),g++,b);if(g<2&&!a)return p(k);const E=u.exit("strikethroughSequenceTemporary"),A=Hi(k);return E._open=!A||A===2&&!!S,E._close=!S||S===2&&!!A,f(k)}}}class WB{constructor(){this.map=[]}add(n,a,l){JB(this,n,a,l)}consume(n){if(this.map.sort(function(s,u){return s[0]-u[0]}),this.map.length===0)return;let a=this.map.length;const l=[];for(;a>0;)a-=1,l.push(n.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),n.length=this.map[a][0];l.push(n.slice()),n.length=0;let o=l.pop();for(;o;){for(const s of o)n.push(s);o=l.pop()}this.map.length=0}}function JB(e,n,a,l){let o=0;if(!(a===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=a,e.map[o][2].push(...l);return}o+=1}e.map.push([n,a,l])}}function eP(e,n){let a=!1;const l=[];for(;n<e.length;){const o=e[n];if(a){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=l.length-1;l[s]=l[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(a=!0);n+=1}return l}function tP(){return{flow:{null:{name:"table",tokenize:nP,resolveAll:rP}}}}function nP(e,n,a){const l=this;let o=0,s=0,u;return f;function f(B){let Y=l.events.length-1;for(;Y>-1;){const Z=l.events[Y][1].type;if(Z==="lineEnding"||Z==="linePrefix")Y--;else break}const G=Y>-1?l.events[Y][1].type:null,he=G==="tableHead"||G==="tableRow"?M:p;return he===M&&l.parser.lazy[l.now().line]?a(B):he(B)}function p(B){return e.enter("tableHead"),e.enter("tableRow"),h(B)}function h(B){return B===124||(u=!0,s+=1),y(B)}function y(B){return B===null?a(B):Re(B)?s>1?(s=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),b):a(B):Ye(B)?Je(e,y,"whitespace")(B):(s+=1,u&&(u=!1,o+=1),B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),u=!0,y):(e.enter("data"),g(B)))}function g(B){return B===null||B===124||pt(B)?(e.exit("data"),y(B)):(e.consume(B),B===92?w:g)}function w(B){return B===92||B===124?(e.consume(B),g):g(B)}function b(B){return l.interrupt=!1,l.parser.lazy[l.now().line]?a(B):(e.enter("tableDelimiterRow"),u=!1,Ye(B)?Je(e,k,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):k(B))}function k(B){return B===45||B===58?E(B):B===124?(u=!0,e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),S):I(B)}function S(B){return Ye(B)?Je(e,E,"whitespace")(B):E(B)}function E(B){return B===58?(s+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),A):B===45?(s+=1,A(B)):B===null||Re(B)?O(B):I(B)}function A(B){return B===45?(e.enter("tableDelimiterFiller"),N(B)):I(B)}function N(B){return B===45?(e.consume(B),N):B===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(B))}function j(B){return Ye(B)?Je(e,O,"whitespace")(B):O(B)}function O(B){return B===124?k(B):B===null||Re(B)?!u||o!==s?I(B):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(B)):I(B)}function I(B){return a(B)}function M(B){return e.enter("tableRow"),U(B)}function U(B){return B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),U):B===null||Re(B)?(e.exit("tableRow"),n(B)):Ye(B)?Je(e,U,"whitespace")(B):(e.enter("data"),H(B))}function H(B){return B===null||B===124||pt(B)?(e.exit("data"),U(B)):(e.consume(B),B===92?q:H)}function q(B){return B===92||B===124?(e.consume(B),H):H(B)}}function rP(e,n){let a=-1,l=!0,o=0,s=[0,0,0,0],u=[0,0,0,0],f=!1,p=0,h,y,g;const w=new WB;for(;++a<e.length;){const b=e[a],k=b[1];b[0]==="enter"?k.type==="tableHead"?(f=!1,p!==0&&(c1(w,n,p,h,y),y=void 0,p=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},w.add(a,0,[["enter",h,n]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(l=!0,g=void 0,s=[0,0,0,0],u=[0,a+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},w.add(a,0,[["enter",y,n]])),o=k.type==="tableDelimiterRow"?2:y?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(l=!1,u[2]===0&&(s[1]!==0&&(u[0]=u[1],g=wu(w,n,s,o,void 0,g),s=[0,0,0,0]),u[2]=a)):k.type==="tableCellDivider"&&(l?l=!1:(s[1]!==0&&(u[0]=u[1],g=wu(w,n,s,o,void 0,g)),s=u,u=[s[1],a,0,0])):k.type==="tableHead"?(f=!0,p=a):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=a,s[1]!==0?(u[0]=u[1],g=wu(w,n,s,o,a,g)):u[1]!==0&&(g=wu(w,n,u,o,a,g)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(u[3]=a)}for(p!==0&&c1(w,n,p,h,y),w.consume(n.events),a=-1;++a<n.events.length;){const b=n.events[a];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=eP(n.events,a))}return e}function wu(e,n,a,l,o,s){const u=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";a[0]!==0&&(s.end=Object.assign({},ki(n.events,a[0])),e.add(a[0],0,[["exit",s,n]]));const p=ki(n.events,a[1]);if(s={type:u,start:Object.assign({},p),end:Object.assign({},p)},e.add(a[1],0,[["enter",s,n]]),a[2]!==0){const h=ki(n.events,a[2]),y=ki(n.events,a[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},y)};if(e.add(a[2],0,[["enter",g,n]]),l!==2){const w=n.events[a[2]],b=n.events[a[3]];if(w[1].end=Object.assign({},b[1].end),w[1].type="chunkText",w[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",g,n]])}return o!==void 0&&(s.end=Object.assign({},ki(n.events,o)),e.add(o,0,[["exit",s,n]]),s=void 0),s}function c1(e,n,a,l,o){const s=[],u=ki(n.events,a);o&&(o.end=Object.assign({},u),s.push(["exit",o,n])),l.end=Object.assign({},u),s.push(["exit",l,n]),e.add(a+1,0,s)}function ki(e,n){const a=e[n],l=a[0]==="enter"?"start":"end";return a[1][l]}const aP={name:"tasklistCheck",tokenize:iP};function lP(){return{text:{91:aP}}}function iP(e,n,a){const l=this;return o;function o(p){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?a(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),s)}function s(p){return pt(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),u):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),u):a(p)}function u(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):a(p)}function f(p){return Re(p)?n(p):Ye(p)?e.check({tokenize:oP},n,a)(p):a(p)}}function oP(e,n,a){return Je(e,l,"whitespace");function l(o){return o===null?a(o):n(o)}}function sP(e){return zC([OB(),$B(),ZB(e),tP(),lP()])}const cP={};function uP(e){const n=this,a=e||cP,l=n.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),s=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),u=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(sP(a)),s.push(TB()),u.push(_B(a))}function EE({children:e,className:n,inverted:a=!1}){return d.jsx("div",{className:ge("visualization-container markdown-render overflow-x-auto wrap-break-words break",n),children:d.jsx(Z8,{remarkPlugins:[uP],components:{code({className:l,children:o,...s}){const u=/language-(\w+)/.exec(l||""),f=u?u[1]:"",p=!f,h=Array.isArray(o)?o.join(""):String(o);return!p&&f?d.jsx("div",{className:"w-full max-w-full overflow-x-auto my-2 min-w-0",children:d.jsx(dg,{theme:a?xs.nightOwl:xs.oneDark,code:h.trim(),language:f,children:({className:y,style:g,tokens:w,getLineProps:b,getTokenProps:k})=>d.jsx("pre",{className:ge("rounded-lg text-sm p-3",y),style:g,children:w.map((S,E)=>d.jsx("div",{...b({line:S}),children:S.map((A,N)=>d.jsx("span",{...k({token:A})},N))},E))})})}):d.jsx("code",{className:ge("px-1.5 py-0.5 rounded text-sm font-mono",a?"bg-primary-foreground/20 text-primary-foreground":"bg-muted",l),...s,children:o})},a({href:l,children:o,...s}){return d.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:ge("underline underline-offset-2 transition-colors",a?"text-primary-foreground/80 hover:text-primary-foreground":"text-primary hover:text-primary/80"),...s,children:o})},p({children:l}){return d.jsx("p",{className:"last:mb-0 leading-relaxed wrap-break-words",children:l})},ul({children:l}){return d.jsx("ul",{className:"list-outside list-disc pl-8",children:l})},ol({children:l}){return d.jsx("ol",{className:"list-outside list-decimal pl-8",children:l})},li({children:l,className:o}){const s=o==null?void 0:o.includes("nested");return d.jsx("li",{className:ge("leading-snug",s&&"ml-8"),children:l})},h1({children:l}){return d.jsx("h1",{className:"text-lg font-semibold mb-1.5 mt-3 first:mt-0",children:l})},h2({children:l}){return d.jsx("h2",{className:"text-base font-semibold mb-1.5 mt-2.5 first:mt-0",children:l})},h3({children:l}){return d.jsx("h3",{className:"text-sm font-semibold mb-1 mt-2 first:mt-0",children:l})},blockquote({children:l}){return d.jsx("blockquote",{className:ge("border-l-2 pl-3 my-1.5 italic",a?"border-primary-foreground/40 text-primary-foreground/70":"border-muted-foreground/40 text-muted-foreground"),children:l})},strong({children:l}){return d.jsx("strong",{className:ge("font-semibold",a&&"text-primary-foreground"),children:l})},em({children:l}){return d.jsx("em",{className:"italic",children:l})},hr(){return d.jsx("hr",{className:ge("my-3",a?"border-primary-foreground/30":"border-border")})},table({children:l}){return d.jsx("div",{className:"my-2 overflow-x-auto max-w-full",children:d.jsx("table",{className:"w-full border-collapse text-sm",children:l})})},th({children:l}){return d.jsx("th",{className:ge("border border-border px-2 py-1.5 text-left font-semibold",a?"bg-primary-foreground/10 text-primary-foreground":"bg-muted"),children:l})},td({children:l}){return d.jsx("td",{className:ge("border px-2 py-1.5",a?"border-primary-foreground/20":"border-border"),children:l})}},children:e})})}function dP(e){return e.filter(n=>n.type==="text").map(n=>n.text).join("")}function fP(e,n){const a=n.findIndex(l=>l.message.id===e);if(a<=0)return null;for(let l=a-1;l>=0;l--){const o=n[l];if(o.message.role==="assistant"&&o.message.status!=="streaming")return o.message.id}return null}function pP(e,n){const a=e.map(u=>({message:u.message,parts:u.parts,isQueued:!1})),l=n.map(u=>({message:{id:u.id,role:"user",sessionId:u.sessionId,createdAt:u.createdAt},parts:[{id:`${u.id}-part`,messageId:u.id,createdAt:u.createdAt,type:"text",text:u.content}],isQueued:!0,queueId:u.id})),o=[...a].sort((u,f)=>u.message.createdAt-f.message.createdAt),s=[...l].sort((u,f)=>u.message.createdAt-f.message.createdAt);return[...o,...s]}function hP({part:e}){const[n,a]=v.useState(!1);return d.jsxs("div",{className:"flex flex-col items-center my-4",children:[d.jsxs("button",{onClick:()=>a(!n),className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[n?d.jsx($i,{className:"size-3"}):d.jsx(Zr,{className:"size-3"}),d.jsxs("span",{className:"border-b border-dashed border-muted-foreground/40 pb-px",children:[e.compactedMessageIds.length," messages compacted"]})]}),n&&d.jsx("div",{className:"mt-2 max-w-lg w-full rounded-lg border border-border bg-muted/50 px-4 py-3 text-sm text-muted-foreground",children:d.jsx(EE,{children:e.summary})})]})}function mP({parts:e,pendingPermissions:n,onPermissionResponse:a,onNavigateToSubagent:l,inverted:o=!1}){const s=[...e].sort((u,f)=>u.createdAt-f.createdAt);return d.jsx(d.Fragment,{children:s.map(u=>{switch(u.type){case"text":return d.jsx("div",{className:"min-w-0",children:d.jsx(EE,{inverted:o,children:u.text||"..."})},u.id);case"reasoning":return d.jsx("div",{className:"visualization-container text-muted-foreground text-sm italic border-l-2 border-muted-foreground/30 pl-3 my-2 wrap-break-word",children:u.text},u.id);case"tool":return d.jsx(z5,{part:u,pendingPermissions:n,onPermissionResponse:a,onNavigateToSubagent:l},u.id);case"image":return d.jsx("img",{src:u.url,alt:"",className:"max-w-full rounded-lg mt-2"},u.id);case"file":return d.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-sm",children:u.filename||"unnamed"},u.id);default:return null}})})}function gP({session:e,messagesWithParts:n,queuedMessages:a,preconfigs:l,prompts:o,models:s,defaultModel:u,onSendMessage:f,onRemoveFromQueue:p,onChangePreconfig:h,onChangeModel:y,pendingPermissions:g,onPermissionResponse:w,onRename:b,usage:k,modelName:S,onNavigateToSubagent:E,onNavigateBack:A,isStreaming:N,onInterrupt:j,onRevert:O,onFork:I,onCompact:M,isCompacting:U,serverUrl:H,apiToken:q}){const B=v.useRef(null),[Y,G]=v.useState(!0),he=150,Z=pP(n,a);v.useEffect(()=>{G(!0),B.current&&(B.current.scrollTop=B.current.scrollHeight)},[e.id]),v.useEffect(()=>{B.current&&Y&&(B.current.scrollTop=B.current.scrollHeight)},[n,Y]),v.useEffect(()=>{const z=B.current;if(!z)return;const K=()=>{const{scrollHeight:ee,scrollTop:le,clientHeight:T}=z,D=ee-le-T;G(D<he)};return z.addEventListener("scroll",K,{passive:!0}),()=>z.removeEventListener("scroll",K)},[]);const W=g.filter(z=>!n.some(K=>K.parts.some(ee=>ee.type==="tool"&&ee.callId===z.toolCallId)));return d.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[d.jsx(m3,{session:e,preconfigs:l,models:s,defaultModel:u,usage:k,modelName:S,onChangePreconfig:h,onChangeModel:y,onRename:b,onNavigateBack:A,isStreaming:N,onInterrupt:j,onCompact:M,isCompacting:U,canCompact:n.length>=4}),e.status==="closed"&&d.jsx(Au,{className:"mx-4 mt-4",children:d.jsx(Nu,{children:"This session is archived. You can reopen it from the sidebar."})}),d.jsx(Fa,{className:"flex-1 min-h-0",ref:B,children:d.jsxs("div",{className:"p-4",children:[Z.length===0?d.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[d.jsx("p",{className:"text-lg mb-2",children:"Start a conversation"}),d.jsx("p",{className:"text-sm",children:"Send a message below to begin."})]}):Z.map(z=>{const K=z.parts.find(T=>T.type==="compaction");if(K)return d.jsx(hP,{part:K},z.message.id);const ee=!z.isQueued&&z.message.role==="user",le=ee?fP(z.message.id,n):null;return d.jsx(g3,{message:z.message,textContent:dP(z.parts),isQueued:z.isQueued,onRemove:z.isQueued?()=>p(z.queueId):void 0,canRevert:ee&&le!==null,onRevert:le?()=>O==null?void 0:O(e.id,le):void 0,canFork:ee&&le!==null,onFork:le?()=>I==null?void 0:I(e.id,z.message.id):void 0,children:z.parts.length===0?d.jsx("span",{className:"opacity-50",children:"..."}):d.jsx(mP,{parts:z.parts,pendingPermissions:g,onPermissionResponse:w,onNavigateToSubagent:E,inverted:z.message.role==="user"})},z.message.id)}),W.length>0&&d.jsx("div",{className:"mt-4 flex flex-col gap-2",children:W.map(z=>d.jsxs("div",{className:"p-3 bg-warning/10 border border-warning/30 rounded-lg",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("span",{className:"text-sm font-medium",children:z.toolName}),d.jsx("span",{className:"text-xs text-muted-foreground",children:z.permissionType})]}),d.jsx("p",{className:"text-sm mb-3",children:z.message}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(je,{variant:"outline",size:"sm",onClick:()=>w(z.toolCallId,!1,!1),children:"Deny"}),d.jsx(je,{size:"sm",onClick:()=>w(z.toolCallId,!0,!1),children:"Approve"})]})]},z.toolCallId))})]})}),e.status==="active"&&!e.parentId&&d.jsx(F5,{onSendMessage:f,disabled:U,workspaceId:e.workspaceId,serverUrl:H,apiToken:q,prompts:o}),e.parentId&&d.jsxs("div",{className:"p-4 border-t border-border bg-muted/50 text-center flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[d.jsx(HN,{className:"size-4"}),"This is a subagent session (read-only)"]})]})}function yP({className:e,orientation:n="horizontal",...a}){return d.jsx(OD,{"data-slot":"tabs","data-orientation":n,className:ge("group/tabs flex gap-2 data-horizontal:flex-col",e),...a})}const xP=qi("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function bP({className:e,variant:n="default",...a}){return d.jsx(DD,{"data-slot":"tabs-list","data-variant":n,className:ge(xP({variant:n}),e),...a})}function Rh({className:e,...n}){return d.jsx(zD,{"data-slot":"tabs-trigger",className:ge("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...n})}function Mh({className:e,...n}){return d.jsx(LD,{"data-slot":"tabs-content",className:ge("flex-1 text-sm outline-none",e),...n})}function u1(e){return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function d1({permission:e,onRevoke:n}){const a=!!e.revokedAt;return d.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border last:border-0",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsxs(pn,{variant:a?"outline":"secondary",children:[d.jsx(k1,{className:"size-3","data-icon":"inline-start"}),e.permissionType]}),a&&d.jsx(pn,{variant:"outline",className:"text-muted-foreground",children:"Revoked"})]}),d.jsx("p",{className:"text-sm font-mono truncate text-muted-foreground",children:e.permissionKey}),d.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Granted ",u1(e.grantedAt),e.revokedAt&&` • Revoked ${u1(e.revokedAt)}`]})]}),!a&&d.jsx(je,{variant:"ghost",size:"icon",onClick:()=>n(e.id),className:"size-8 text-destructive hover:text-destructive",children:d.jsx(ks,{className:"size-4"})})]})}function vP({open:e,onOpenChange:n,title:a,description:l,confirmLabel:o="Confirm",cancelLabel:s="Cancel",variant:u="default",onConfirm:f,onCancel:p}){const h=()=>{p==null||p(),n(!1)},y=()=>{f(),n(!1)};return d.jsx(Zi,{open:e,onOpenChange:n,children:d.jsxs(Wi,{className:"sm:max-w-[425px]",children:[d.jsxs(Ji,{children:[d.jsx(eo,{children:a}),d.jsx(Is,{children:l})]}),d.jsxs(Cd,{children:[d.jsx(je,{variant:"outline",onClick:h,children:s}),d.jsx(je,{variant:u==="destructive"?"destructive":"default",onClick:y,children:o})]})]})})}function wP({token:e,onLogout:n}){return d.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-md bg-muted",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[d.jsx("span",{className:"text-muted-foreground",children:"Token:"}),d.jsx("code",{className:"font-mono text-foreground bg-background px-1.5 py-0.5 rounded text-[10px]",children:Ij(e)})]}),d.jsx(je,{variant:"destructive",size:"sm",onClick:n,title:"Disconnect and clear token",children:"Logout"})]})}function SP({open:e,onOpenChange:n,permissions:a,onRefreshPermissions:l,onRevokePermission:o,onRevokeAllPermissions:s,apiToken:u,onLogout:f}){const{theme:p,setTheme:h}=$A(),[y,g]=v.useState(!1),w=a.filter(k=>!k.revokedAt),b=a.filter(k=>k.revokedAt);return d.jsxs(Zi,{open:e,onOpenChange:n,children:[d.jsxs(Wi,{className:"sm:max-w-[500px] max-h-[80vh]",children:[d.jsxs(Ji,{children:[d.jsx(eo,{children:"Settings"}),d.jsx(Is,{children:"Manage your preferences and permissions"})]}),d.jsxs(yP,{defaultValue:"account",className:"mt-4",children:[d.jsxs(bP,{className:"grid w-full grid-cols-3",children:[d.jsx(Rh,{value:"account",children:"Account"}),d.jsx(Rh,{value:"appearance",children:"Appearance"}),d.jsxs(Rh,{value:"permissions",children:[d.jsx(k1,{className:"size-3","data-icon":"inline-start"}),"Permissions",w.length>0&&d.jsx("span",{className:"ml-1.5 px-1.5 py-0.5 text-xs bg-primary text-primary-foreground rounded-full",children:w.length})]})]}),d.jsx(Mh,{value:"account",className:"mt-4",children:d.jsx("div",{className:"flex flex-col gap-4",children:d.jsxs("div",{children:[d.jsx(La,{className:"text-sm font-medium",children:"Session"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Manage your current session"}),u?d.jsx(wP,{token:u,onLogout:f}):d.jsx("p",{className:"text-sm text-muted-foreground",children:"No active session"})]})})}),d.jsx(Mh,{value:"appearance",className:"mt-4",children:d.jsx("div",{className:"flex flex-col gap-4",children:d.jsxs("div",{children:[d.jsx(La,{className:"text-sm font-medium",children:"Theme"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose your preferred color scheme"}),d.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[d.jsxs(je,{variant:p==="light"?"default":"outline",className:"justify-start",onClick:()=>h("light"),children:[d.jsx(gj,{className:"size-4","data-icon":"inline-start"}),"Light"]}),d.jsxs(je,{variant:p==="dark"?"default":"outline",className:"justify-start",onClick:()=>h("dark"),children:[d.jsx(QN,{className:"size-4","data-icon":"inline-start"}),"Dark"]}),d.jsxs(je,{variant:p==="system"?"default":"outline",className:"justify-start",onClick:()=>h("system"),children:[d.jsx(XN,{className:"size-4","data-icon":"inline-start"}),"System"]})]})]})})}),d.jsx(Mh,{value:"permissions",className:"mt-4",children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx(La,{className:"text-sm font-medium",children:"Always-allowed Operations"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Tools you've approved to run without asking"})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(je,{variant:"outline",size:"icon",onClick:l,className:"size-8",children:d.jsx(Ei,{className:"size-4"})}),w.length>0&&d.jsxs(je,{variant:"destructive",size:"sm",onClick:()=>g(!0),children:[d.jsx(ks,{className:"size-4","data-icon":"inline-start"}),"Revoke All"]})]})]}),d.jsx(as,{}),d.jsxs(Fa,{className:"h-[300px]",children:[w.length===0&&b.length===0&&d.jsxs("div",{className:"text-center py-8 text-muted-foreground text-sm",children:["No permissions granted yet.",d.jsx("br",{}),'Approve tool requests with "Always allow" to add them here.']}),w.length>0&&d.jsxs("div",{className:"mb-4",children:[d.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Active (",w.length,")"]}),w.map(k=>d.jsx(d1,{permission:k,onRevoke:o},k.id))]}),b.length>0&&d.jsxs("div",{children:[d.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Revoked (",b.length,")"]}),b.map(k=>d.jsx(d1,{permission:k,onRevoke:o},k.id))]})]})]})})]})]}),d.jsx(vP,{open:y,onOpenChange:g,title:"Revoke All Permissions",description:"This will revoke all always-allowed permissions for this workspace. You'll need to approve these tools again when they're used.",confirmLabel:"Revoke All",variant:"destructive",onConfirm:()=>{s(),g(!1)}})]})}function kP({status:e}){switch(e.status){case"connected":return d.jsxs(pn,{variant:"default",className:"bg-green-600",children:[d.jsx(ws,{className:"size-3 mr-1"}),"Connected"]});case"disabled":return d.jsxs(pn,{variant:"secondary",children:[d.jsx(Qu,{className:"size-3 mr-1"}),"Disabled"]});case"failed":return d.jsxs(pn,{variant:"destructive",children:[d.jsx(ls,{className:"size-3 mr-1"}),"Failed"]});case"needs_auth":return d.jsxs(pn,{variant:"outline",className:"border-yellow-500 text-yellow-600",children:[d.jsx(ls,{className:"size-3 mr-1"}),"Needs Auth"]});case"needs_client_registration":return d.jsxs(pn,{variant:"outline",className:"border-orange-500 text-orange-600",children:[d.jsx(ls,{className:"size-3 mr-1"}),"Needs Registration"]});default:return d.jsx(pn,{variant:"secondary",children:"Unknown"})}}function CP({open:e,onOpenChange:n,workspaceId:a,workspacePath:l,serverUrl:o,apiToken:s}){const{fetchWithAuth:u}=Ls(),[f,p]=v.useState({}),[h,y]=v.useState(!1),[g,w]=v.useState(null),[b,k]=v.useState(null),S=v.useCallback(async()=>{if(a){y(!0),k(null);try{const O=await u(`/api/workspaces/${a}/mcp/status`,{},{serverUrl:o,token:s});if(!O.ok)throw new Error("Failed to load MCP status");const I=await O.json();p(I.status||{})}catch(O){const I=O instanceof Error?O.message:"Unknown error";k(I)}finally{y(!1)}}},[a,u,o,s]);v.useEffect(()=>{e&&a&&S()},[e,a,S]);const E=async O=>{if(a){w(O);try{if(!(await u(`/api/workspaces/${a}/mcp/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:O})},{serverUrl:o,token:s})).ok)throw new Error("Failed to connect");await S()}catch(I){const M=I instanceof Error?I.message:"Unknown error";k(M)}finally{w(null)}}},A=async O=>{if(a){w(O);try{if(!(await u(`/api/workspaces/${a}/mcp/disconnect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:O})},{serverUrl:o,token:s})).ok)throw new Error("Failed to disconnect");await S()}catch(I){const M=I instanceof Error?I.message:"Unknown error";k(M)}finally{w(null)}}},N=async O=>{if(a){w(O);try{const I=await u(`/api/workspaces/${a}/mcp/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:O})},{serverUrl:o,token:s});if(!I.ok)throw new Error("Failed to start auth");const M=await I.json();M.authorizationUrl&&window.open(M.authorizationUrl,"_blank"),await S()}catch(I){const M=I instanceof Error?I.message:"Unknown error";k(M)}finally{w(null)}}},j=Object.entries(f);return d.jsx(Zi,{open:e,onOpenChange:n,children:d.jsxs(Wi,{className:"sm:max-w-[600px] max-h-[80vh]",children:[d.jsxs(Ji,{children:[d.jsxs(eo,{className:"flex items-center gap-2",children:[d.jsx(vl,{className:"size-5"}),"MCP Servers"]}),d.jsx(Is,{children:"Manage Model Context Protocol servers for this workspace"})]}),d.jsxs("div",{className:"mt-4 space-y-4",children:[b&&d.jsxs(Au,{variant:"destructive",children:[d.jsx(ls,{className:"size-4"}),d.jsx(Nu,{children:b})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("p",{className:"text-sm text-muted-foreground",children:["Configure servers in ",d.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:".jean2/mcp.json"})]}),d.jsx(je,{variant:"outline",size:"sm",onClick:S,disabled:h,children:d.jsx(Ei,{className:`size-4 ${h?"animate-spin":""}`})})]}),d.jsx(Fa,{className:"h-[400px]",children:h&&j.length===0?d.jsx("div",{className:"flex items-center justify-center py-8",children:d.jsx(Un,{className:"size-6 animate-spin text-muted-foreground"})}):j.length===0?d.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[d.jsx(vl,{className:"size-12 mx-auto mb-3 opacity-50"}),d.jsx("p",{className:"font-medium",children:"No MCP servers configured"}),d.jsxs("p",{className:"text-sm mt-1",children:["Create ",d.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:".jean2/mcp.json"})," in your workspace to add servers."]})]}):d.jsx("div",{className:"space-y-3",children:j.map(([O,{config:I,status:M}])=>{var U;return d.jsxs("div",{className:"border rounded-lg p-4",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(vl,{className:"size-5 text-muted-foreground mt-0.5"}),d.jsxs("div",{children:[d.jsx("div",{className:"font-medium",children:O}),d.jsx("div",{className:"text-sm text-muted-foreground",children:(I==null?void 0:I.type)==="local"?d.jsxs("span",{children:["Local - ",((U=I.command)==null?void 0:U[0])||"command"]}):(I==null?void 0:I.type)==="remote"?d.jsxs("span",{className:"flex items-center gap-1",children:["Remote - ",I.url]}):"Unknown type"}),M.status==="failed"&&"error"in M&&d.jsx(Au,{variant:"destructive",className:"mt-2 py-2",children:d.jsx(Nu,{className:"text-xs",children:M.error})}),M.status==="needs_client_registration"&&"error"in M&&d.jsx(Au,{className:"mt-2 py-2 border-orange-500",children:d.jsx(Nu,{className:"text-xs",children:M.error})})]})]}),d.jsx("div",{className:"flex items-center gap-2",children:d.jsx(kP,{status:M})})]}),d.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t",children:[M.status==="connected"&&d.jsxs(je,{variant:"outline",size:"sm",onClick:()=>A(O),disabled:g===O,children:[g===O?d.jsx(Un,{className:"size-4 animate-spin"}):d.jsx(ej,{className:"size-4"}),d.jsx("span",{className:"ml-1",children:"Disconnect"})]}),(M.status==="disabled"||M.status==="failed")&&d.jsxs(je,{variant:"outline",size:"sm",onClick:()=>E(O),disabled:g===O,children:[g===O?d.jsx(Un,{className:"size-4 animate-spin"}):d.jsx(nj,{className:"size-4"}),d.jsx("span",{className:"ml-1",children:"Connect"})]}),M.status==="needs_auth"&&d.jsxs(je,{variant:"default",size:"sm",onClick:()=>N(O),disabled:g===O,children:[g===O?d.jsx(Un,{className:"size-4 animate-spin"}):d.jsx(zh,{className:"size-4"}),d.jsx("span",{className:"ml-1",children:"Authenticate"})]})]})]},O)})})})]})]})})}function f1({message:e="Connecting to server..."}){return d.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 text-muted-foreground",children:[d.jsx(Un,{className:"size-8 animate-spin"}),d.jsx("p",{className:"text-sm",children:e})]})}const EP=({serverUrl:e,authError:n,retryCount:a,nextRetryIn:l,onRetry:o,onLogout:s})=>d.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] px-4 text-center",children:[d.jsx(E1,{className:"size-12 text-destructive mb-4"}),d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Unable to connect to server"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-[400px]",children:n||"Please check that the server is running."}),e&&d.jsx("p",{className:"text-xs text-muted-foreground mb-6 font-mono bg-muted px-3 py-1.5 rounded",children:e}),d.jsxs("div",{className:"flex flex-col items-center gap-4",children:[d.jsxs("p",{className:"text-sm text-muted-foreground",children:["Retrying in ",l,"s..."]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(je,{onClick:o,variant:"default",children:[d.jsx(Ei,{className:"size-4 mr-2","data-icon":"inline-start"}),"Retry Now"]}),d.jsx(je,{onClick:s,variant:"ghost",children:"Change Server"})]}),a>0&&d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retry attempt: ",a]})]})]});function p1({onServerAdded:e,error:n}){const[a,l]=v.useState(""),[o,s]=v.useState(""),[u,f]=v.useState(""),[p,h]=v.useState(!1),[y,g]=v.useState(null),w=b=>{b.preventDefault();const k=a.trim(),S=o.trim(),E=u.trim();if(!k){g("Please enter a server name");return}if(!S){g("Please enter a server URL");return}if(!E){g("Please enter an API token");return}if(!N1(E)){g("Invalid token format. Token should be 64 hex characters (0-9, a-f).");return}const A=_u(S),N={id:crypto.randomUUID(),name:k,url:A,token:E,createdAt:new Date().toISOString()};e(N)};return d.jsx("div",{className:"w-full h-full flex items-center justify-center bg-background dark:bg-gradient-to-br dark:from-muted dark:via-background dark:to-muted p-4",children:d.jsx("div",{className:"w-full max-w-md",children:d.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-2xl overflow-hidden",children:[d.jsxs("div",{className:"px-6 pt-6 pb-4 text-center border-b border-border",children:[d.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Add your first server"}),d.jsx("p",{className:"text-muted-foreground mt-1",children:"Connect to a Jean2 server to get started"})]}),d.jsxs("form",{onSubmit:w,className:"p-6 space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:"serverName",className:"text-sm font-medium text-foreground",children:"Server Name"}),d.jsx("input",{id:"serverName",type:"text",value:a,onChange:b=>{l(b.target.value),g(null)},placeholder:"Production",className:"w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:"serverUrl",className:"text-sm font-medium text-foreground",children:"Server URL"}),d.jsx("input",{id:"serverUrl",type:"text",value:o,onChange:b=>{s(b.target.value),g(null)},placeholder:"localhost:3000",className:"w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:"token",className:"text-sm font-medium text-foreground",children:"API Token"}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{id:"token",type:p?"text":"password",value:u,onChange:b=>{f(b.target.value),g(null)},placeholder:"Enter your 64-character token",className:"w-full px-3 py-2 pr-10 bg-background border border-input rounded-lg text-foreground font-mono text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"}),d.jsx("button",{type:"button",onClick:()=>h(!p),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground transition-colors","aria-label":p?"Hide token":"Show token",children:p?d.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):d.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(y||n)&&d.jsx("div",{className:"px-3 py-2 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm",children:y||n}),d.jsx("button",{type:"submit",className:"w-full py-2.5 bg-primary text-primary-foreground font-medium rounded-lg hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 transition-colors",children:"Add Server"})]})]})})})}function h1({onServerSwitch:e,onSelectWorkspace:n}){const[a,l]=v.useState(!1),o=v.useRef(!1),s=jd(),{quickConnections:u,switchServer:f,removeFromQuickConnections:p,isSwitching:h}=Vi(),y=b=>{f(b.serverId)&&(o.current=!0,e==null||e(),b.workspaceId&&n&&n(b.workspaceId))};v.useEffect(()=>{!h&&a&&o.current&&(l(!1),o.current=!1)},[h,a]);const g=(b,k)=>{b.stopPropagation(),p(k)},w=()=>d.jsx(tg,{children:d.jsx(ng,{className:"max-h-[50vh] overflow-y-auto",children:u.length>0?d.jsx(gs,{heading:"Quick Switch",children:u.map(b=>d.jsxs(ji,{onSelect:()=>y(b),className:"justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(vl,{className:"size-4 text-muted-foreground"}),d.jsxs("span",{children:[b.serverName,b.workspaceName&&d.jsxs("span",{className:"text-muted-foreground",children:[" / ",b.workspaceName]})]})]}),d.jsx("button",{className:"opacity-0 group-hover:opacity-100 hover:opacity-100 transition-opacity p-1 rounded hover:bg-destructive/10",onClick:k=>g(k,b.id),children:d.jsx(ks,{className:"size-3 text-destructive"})})]},b.id))}):d.jsx(rg,{className:"py-6",children:d.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[d.jsx(Kp,{className:"size-8"}),d.jsx("p",{className:"text-sm font-medium",children:"No favorites yet"}),d.jsx("p",{className:"text-xs",children:"Star a workspace to add it here"})]})})})});return s?d.jsxs(lg,{open:a,onOpenChange:l,children:[d.jsx(Rz,{asChild:!0,children:d.jsx(je,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:d.jsx(Kp,{className:"size-4"})})}),d.jsxs(ig,{side:"bottom",className:"max-h-[80vh]",children:[d.jsx(og,{children:d.jsx(sg,{children:"Quick Switch"})}),d.jsx("div",{className:"mt-4",children:w()})]})]}):d.jsxs(Ad,{open:a,onOpenChange:l,children:[d.jsx(ag,{asChild:!0,children:d.jsx(je,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:d.jsx(Kp,{className:"size-4"})})}),d.jsx(Nd,{className:"w-[300px] p-0",align:"start",children:w()})]})}function m1({viewMode:e,onViewModeChange:n}){const a=v.useCallback(()=>{n(e==="overview"?"default":"overview")},[e,n]),l=e==="overview";return d.jsx(ys,{children:d.jsxs(Li,{children:[d.jsx(Ii,{asChild:!0,children:d.jsx(je,{variant:"ghost",size:"icon-sm",onClick:a,children:l?d.jsx(PN,{className:"h-4 w-4"}):d.jsx(IN,{className:"h-4 w-4"})})}),d.jsx(Bi,{children:l?"Single workspace":"Overview"})]})})}function AP({open:e,onOpenChange:n,editServer:a}){const{addServer:l,editServer:o}=Vi(),[s,u]=v.useState(""),[f,p]=v.useState(""),[h,y]=v.useState(""),[g,w]=v.useState(!1),[b,k]=v.useState(null),S=a!=null;v.useEffect(()=>{a?(u(a.name),p(a.url),y(a.token)):(u(""),p(""),y("")),k(null),w(!1)},[a,e]);const E=A=>{A.preventDefault(),k(null);const N=s.trim(),j=f.trim(),O=h.trim();if(!N){k("Name is required");return}if(!j){k("Server URL is required");return}if(!O){k("API token is required");return}if(!N1(O)){k("Token must be 64 hexadecimal characters");return}const I=_u(j);S?o(a.id,{name:N,url:I,token:O}):l(N,I,O),n(!1)};return d.jsx(Zi,{open:e,onOpenChange:n,children:d.jsxs(Wi,{className:"sm:max-w-[425px]",children:[d.jsxs(Ji,{children:[d.jsx(eo,{children:S?"Edit Server":"Add Server"}),d.jsx(Is,{children:S?"Update server details":"Enter your server details"})]}),d.jsxs("form",{onSubmit:E,children:[d.jsxs("div",{className:"grid gap-4 py-4",children:[d.jsxs("div",{className:"grid gap-2",children:[d.jsx(La,{htmlFor:"server-name",children:"Name"}),d.jsx(Eu,{id:"server-name",value:s,onChange:A=>u(A.target.value),placeholder:"My Server"})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(La,{htmlFor:"server-url",children:"Server URL"}),d.jsx(Eu,{id:"server-url",value:f,onChange:A=>p(A.target.value),placeholder:"localhost:3000"})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(La,{htmlFor:"server-token",children:"API Token"}),d.jsxs("div",{className:"relative",children:[d.jsx(Eu,{id:"server-token",type:g?"text":"password",value:h,onChange:A=>y(A.target.value),placeholder:"64-character hex string",className:"pr-10"}),d.jsx("button",{type:"button",onClick:()=>w(!g),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-transparent",children:g?d.jsx(CN,{className:"size-4 text-muted-foreground"}):d.jsx(AN,{className:"size-4 text-muted-foreground"})})]})]}),b&&d.jsx("p",{className:"text-sm text-destructive",children:b})]}),d.jsxs(Cd,{children:[d.jsx(je,{type:"button",variant:"outline",onClick:()=>n(!1),children:"Cancel"}),d.jsx(je,{type:"submit",children:S?"Save":"Add"})]})]})]})})}const NP=(e,n)=>e&&n?`ws://${n}/ws?token=${e}`:null,Oh=e=>e?`http://${e}/api`:null;function jP(){var Ja,_n,en,lo;const{servers:e,activeServer:n,addServer:a,removeServer:l,isSwitching:o,clearSwitchingState:s,quickConnections:u}=Vi(),[f,p]=v.useState([]),[h,y]=v.useState([]),[g,w]=v.useState([]),[b,k]=v.useState(null),[S,E]=v.useState({}),[A,N]=v.useState({}),[j,O]=v.useState(null),I=v.useRef(null),[M,U]=v.useState(!1),[H,q]=v.useState(null),[B,Y]=v.useState({promptTokens:0,completionTokens:0,totalTokens:0}),[G,he]=v.useState("gpt-4o"),[Z,W]=v.useState([]),[z,K]=v.useState("gpt-4o"),[ee,le]=v.useState([]),[T,D]=v.useState(null),[L,_]=v.useState(!1),[te,ne]=v.useState(!1),[ie,ae]=v.useState(!1),[be,me]=v.useState(()=>localStorage.getItem("jean2_sidebar_view")||"default"),[_e,De]=v.useState([]),[Be,ot]=v.useState([]),[at,vt]=v.useState({}),[Ft,Zt]=v.useState(null),[aa,qn]=v.useState(!1),[ar,jn]=v.useState(null),[wr,Sr]=v.useState(!1),[Rt,kr]=v.useState(0),[se,xe]=v.useState(0),[Oe,He]=v.useState(0),Ze=(Ja=b==null?void 0:b.compacting)!=null?Ja:!1;v.useEffect(()=>{localStorage.setItem("jean2_sidebar_view",be)},[be]);const Wt=1e4,Gn=3e4,Ut=1e3,yt=v.useRef(null),Mt=v.useRef(null),[st,Tn]=v.useState(!1),We=(_n=n==null?void 0:n.token)!=null?_n:null,xt=(en=n==null?void 0:n.url)!=null?en:null;v.useEffect(()=>{I.current=j},[j]);const Cr=v.useRef(null),Er=v.useRef(!1),Xa=v.useCallback(F=>{a(F.name,F.url,F.token)},[a]),Jt=v.useCallback(()=>{n&&l(n.id),I.current&&I.current.close(),O(null),U(!1),Sr(!1),kr(0),xe(0)},[n,l]),Ml=v.useCallback(()=>{kr(F=>F+1),Sr(!1),xe(0)},[]),Ar=v.useCallback(()=>{I.current&&I.current.close(),O(null),U(!1),Sr(!1),kr(0),xe(0),p([]),y([]),k(null),E({}),N({}),q(null),Y({promptTokens:0,completionTokens:0,totalTokens:0}),he("gpt-4o"),W([]),le([]),D(null),De([]),ot([]),vt({}),He(F=>F+1)},[]),lr=v.useCallback(async(F,we={})=>{if(!We)throw new Error("No API token available");const ce=new Headers(we.headers||{});ce.set("Authorization",`Bearer ${We}`);const pe=await fetch(F,{...we,signal:we.signal,headers:ce});if(pe.status===401)throw Zt("Authentication failed. Your token may have been regenerated."),Jt(),new Error("Unauthorized");return pe},[We,Jt]),Hs=v.useCallback(F=>{const we=S[F]||[],ce=A[F]||{};return we.map(pe=>({message:pe,parts:(ce[pe.id]||[]).sort((Pe,et)=>Pe.createdAt-et.createdAt)}))},[S,A]);v.useEffect(()=>{if(!We||!xt)return;const F=NP(We,xt);if(!F)return;const we=new WebSocket(F);return we.onopen=()=>{U(!0),Zt(null),kr(0),Sr(!1)},we.onclose=ce=>{U(!1),(ce.code===1008||ce.code===401)&&(Zt("Authentication failed. Please check your token."),Jt())},we.onerror=ce=>{console.error("WebSocket error:",ce)},we.onmessage=ce=>{var Pe;const pe=JSON.parse(ce.data);(Pe=Cr.current)==null||Pe.call(Cr,pe)},O(we),()=>we.close()},[We,xt,Jt,Oe]),v.useEffect(()=>{if(We&&xt&&!M&&!wr){const F=setTimeout(()=>{M||Sr(!0)},Wt);return()=>clearTimeout(F)}},[We,xt,M,wr]),v.useEffect(()=>{if(wr&&!M&&We&&xt){const F=Math.min(Ut*Math.pow(2,Rt),Gn);let we=Math.floor(F/1e3);xe(we);const ce=setInterval(()=>{we-=1,xe(Math.max(0,we))},1e3),pe=setTimeout(()=>{kr(Pe=>Pe+1),He(Pe=>Pe+1)},F);return()=>{clearInterval(ce),clearTimeout(pe)}}},[wr,M,We,xt,Rt]),v.useEffect(()=>{var ce;if(!We||!xt)return;(ce=yt.current)==null||ce.abort(),yt.current=new AbortController;const F=yt.current.signal,we=Oh(xt);if(we)return Tn(!0),Promise.all([lr(`${we}/sessions`,{signal:F}).then(pe=>pe.json()),lr(`${we}/preconfigs`,{signal:F}).then(pe=>pe.json()),lr(`${we}/prompts`,{signal:F}).then(pe=>pe.json()),lr(`${we}/models`,{signal:F}).then(pe=>pe.json()),lr(`${we}/workspaces`,{signal:F}).then(pe=>pe.json())]).then(([pe,Pe,et,tn,Yn])=>{p(pe.sessions||[]),y(Pe.preconfigs||[]),w(et.prompts||[]),W(tn.models||[]),K(tn.defaultModel||"gpt-4o");const Xn=Yn.workspaces||[];if(le(Xn),Mt.current){const Kn=Xn.find(Il=>Il.id===Mt.current);Kn&&D(Kn),Mt.current=null}else{const Kn=localStorage.getItem("activeWorkspaceId"),Il=Xn.find(Js=>Js.id===Kn);D(Il||Xn[0])}s(),Tn(!1)}).catch(pe=>{var Pe;if(pe.name==="AbortError"){console.log("Fetch aborted due to server switch");return}console.error("Failed to load server data:",pe),Tn(!1),(Pe=pe.message)!=null&&Pe.includes("Unauthorized")||Zt("Failed to connect to server")}),()=>{var pe;(pe=yt.current)==null||pe.abort()}},[We,xt,lr,s]),v.useEffect(()=>{T&&localStorage.setItem("activeWorkspaceId",T.id)},[T]);const Ol=async(F,we,ce)=>{const pe=Oh(xt);if(!pe)return;const et=await(await lr(`${pe}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:F,path:we,isVirtual:ce})})).json();return le(tn=>[...tn,et.workspace]),et.workspace},Ka=F=>{D(F),k(null)},$s=F=>{Mt.current=F},Vs=async F=>{const we=Oh(xt);we&&(await lr(`${we}/workspaces/${F}`,{method:"DELETE"}),le(ce=>ce.filter(pe=>pe.id!==F)),(T==null?void 0:T.id)===F&&D(ee[0]||null))},qs=async()=>{const F=`Workspace ${ee.length+1}`,we=`~/.jean2/workspaces/${crypto.randomUUID()}`;await Ol(F,we,!0)},Gs=async F=>{const we=F.split("/").pop()||F.split("\\").pop()||"Workspace";await Ol(we,F,!1)},Dl=v.useCallback(F=>{var we;switch(F.type){case"session.created":p(ce=>[F.session,...ce]),Er.current&&(k(F.session),E(ce=>({...ce,[F.session.id]:[]})),N(ce=>({...ce,[F.session.id]:{}})),Y({promptTokens:0,completionTokens:0,totalTokens:0}),he(z),Er.current=!1);break;case"session.resumed":k(F.session),F.isRunning&&q(F.session.id),F.messages&&(E(ce=>({...ce,[F.session.id]:F.messages.map(pe=>pe.message)})),N(ce=>{const pe={...ce};pe[F.session.id]={};for(const Pe of F.messages)pe[F.session.id][Pe.message.id]=Pe.parts;return pe})),Y((we=F.usage)!=null?we:{promptTokens:0,completionTokens:0,totalTokens:0}),he(F.session.selectedModel||z);break;case"message.created":E(ce=>({...ce,[F.message.sessionId]:[...ce[F.message.sessionId]||[],F.message]})),N(ce=>({...ce,[F.message.sessionId]:{...ce[F.message.sessionId],[F.message.id]:[]}})),"status"in F.message&&F.message.status==="streaming"&&q(F.message.sessionId);break;case"message.updated":E(ce=>({...ce,[F.message.sessionId]:(ce[F.message.sessionId]||[]).map(pe=>pe.id===F.message.id?F.message:pe)})),"status"in F.message&&F.message.status!=="streaming"&&q(ce=>ce===F.message.sessionId?null:ce);break;case"part.created":N(ce=>{const pe=ce[F.sessionId]||{},Pe=pe[F.part.messageId]||[];return{...ce,[F.sessionId]:{...pe,[F.part.messageId]:[...Pe,F.part]}}});break;case"part.updated":N(ce=>{const pe=ce[F.sessionId]||{},Pe=pe[F.part.messageId]||[];return{...ce,[F.sessionId]:{...pe,[F.part.messageId]:Pe.map(et=>et.id===F.part.id?F.part:et)}}});break;case"part.append":q(F.sessionId),N(ce=>{const pe=ce[F.sessionId]||{};for(const Pe of Object.keys(pe)){const et=pe[Pe],tn=et.findIndex(Yn=>Yn.id===F.partId);if(tn!==-1){const Yn=et[tn];if(Yn.type==="text"||Yn.type==="reasoning"){const Xn=[...et];return Xn[tn]={...Yn,text:Yn.text+F.delta},{...ce,[F.sessionId]:{...pe,[Pe]:Xn}}}}}return ce});break;case"chat.usage":if(F.sessionId!==(b==null?void 0:b.id))return;Y({promptTokens:F.usage.promptTokens,completionTokens:F.usage.completionTokens,totalTokens:F.usage.totalTokens}),he(F.model);break;case"error":console.error("Server error:",F.code,F.message);break;case"session.closed":p(ce=>ce.map(pe=>pe.id===F.sessionId?{...pe,status:"closed"}:pe)),E(ce=>{const pe={...ce};return delete pe[F.sessionId],pe}),N(ce=>{const pe={...ce};return delete pe[F.sessionId],pe}),(b==null?void 0:b.id)===F.sessionId&&k(null);break;case"session.reopened":p(ce=>ce.map(pe=>pe.id===F.session.id?F.session:pe)),(b==null?void 0:b.id)===F.session.id&&k(F.session);break;case"session.deleted":p(ce=>ce.filter(pe=>pe.id!==F.sessionId)),E(ce=>{const pe={...ce};return delete pe[F.sessionId],pe}),N(ce=>{const pe={...ce};return delete pe[F.sessionId],pe}),(b==null?void 0:b.id)===F.sessionId&&k(null);break;case"session.updated":p(ce=>ce.map(pe=>pe.id===F.session.id?F.session:pe)),(b==null?void 0:b.id)===F.session.id&&k(F.session);break;case"session.renamed":p(ce=>ce.map(pe=>pe.id===F.session.id?F.session:pe)),(b==null?void 0:b.id)===F.session.id&&k(F.session);break;case"permission.list":De(F.permissions);break;case"permission.revoked":De(ce=>ce.map(pe=>pe.id===F.permissionId?{...pe,revokedAt:new Date().toISOString()}:pe));break;case"permission.all_revoked":De(ce=>{const pe=new Date().toISOString();return ce.map(Pe=>({...Pe,revokedAt:pe}))});break;case"permission.request":{const ce={toolCallId:F.toolCallId,toolName:F.toolName,args:F.args,permissionType:F.permissionType,permissionKey:F.permissionKey,message:F.message,details:F.details,dangerous:F.dangerous,childSessionId:F.childSessionId,subagentName:F.subagentName};ot(pe=>[...pe,ce]);break}case"permission.granted":ot(ce=>ce.filter(pe=>pe.toolCallId!==F.toolCallId));break;case"session.interrupted":H===F.sessionId&&q(null),F.result.cascadedTo.length>0&&console.log(`Session ${F.sessionId} interrupted. Cascaded to:`,F.result.cascadedTo);break;case"queue.list":vt(ce=>({...ce,[F.sessionId]:F.messages}));break;case"queue.added":vt(ce=>({...ce,[F.sessionId]:[...ce[F.sessionId]||[],F.message]}));break;case"queue.removed":vt(ce=>({...ce,[F.sessionId]:(ce[F.sessionId]||[]).filter(pe=>pe.id!==F.queueId)}));break;case"queue.sending":vt(ce=>({...ce,[F.sessionId]:(ce[F.sessionId]||[]).filter(pe=>pe.id!==F.queueId)}));break;case"session.reverted":console.log(`Session reverted to message ${F.revertedTo.messageId}, removed ${F.removed.messageIds.length} messages`);break;case"compaction.complete":break;case"session.forked":{const{forkedSession:ce,messages:pe}=F;p(Pe=>[ce,...Pe]),E(Pe=>({...Pe,[ce.id]:pe.map(et=>et.message)})),N(Pe=>{const et={...Pe};et[ce.id]={};for(const tn of pe)et[ce.id][tn.message.id]=tn.parts;return et}),k(ce),Y({promptTokens:0,completionTokens:0,totalTokens:0});break}case"session.state":E(ce=>({...ce,[F.sessionId]:F.messages.map(pe=>pe.message)})),N(ce=>{const pe={...ce};pe[F.sessionId]={};for(const Pe of F.messages)pe[F.sessionId][Pe.message.id]=Pe.parts;return pe}),H===F.sessionId&&q(null);break}},[b,z,H]);v.useEffect(()=>{Cr.current=Dl},[Dl]),v.useEffect(()=>{const F=async we=>{const ce=we.target;if(!(ce.tagName==="INPUT"||ce.tagName==="TEXTAREA"||ce.isContentEditable)&&(we.metaKey||we.ctrlKey)&&we.key==="n"){we.preventDefault();try{await VA("create_new_window")}catch(Pe){console.error("Failed to create new window:",Pe)}}};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[]);const Le=v.useCallback((F,we)=>{j&&j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:F,...we}))},[j]),Ys=v.useCallback((F,we)=>{Er.current=!0,Le("session.create",{preconfigId:F,title:we,workspaceId:T==null?void 0:T.id})},[Le,T]),Qa=v.useCallback(F=>{ot([]),q(null);const we=f.find(ce=>ce.id===F);if(we!=null&&we.workspaceId&&we.workspaceId!==(T==null?void 0:T.id)){const ce=ee.find(pe=>pe.id===we.workspaceId);ce&&D(ce)}Le("session.resume",{sessionId:F})},[Le,f,ee,T]),ir=v.useCallback(F=>{Le("session.close",{sessionId:F})},[Le]),Ot=v.useCallback((F,we)=>{Le("session.revert",{sessionId:F,messageId:we})},[Le]),Yt=v.useCallback((F,we)=>{Le("session.fork",{sessionId:F,messageId:we})},[Le]),la=v.useCallback((F,we)=>{Le("session.compact",{sessionId:F,messageIds:we})},[Le]),ro=v.useCallback(F=>{Le("session.reopen",{sessionId:F})},[Le]),Ld=v.useCallback(F=>{Le("session.delete",{sessionId:F})},[Le]),Id=v.useCallback(F=>{b&&Le("session.update",{sessionId:b.id,preconfigId:F})},[b,Le]),Xs=v.useCallback((F,we)=>{b&&Le("session.update_model",{sessionId:b.id,modelId:F,providerId:we})},[b,Le]),Za=v.useCallback((F,we)=>{Le("session.rename",{sessionId:F,title:we})},[Le]),ao=v.useCallback(()=>{b!=null&&b.parentId&&Qa(b.parentId)},[b,Qa]),Nr=v.useCallback((F,we)=>{Le("queue.add",{sessionId:F,content:we})},[Le]),ia=v.useCallback(F=>{Le("queue.remove",{queueId:F})},[Le]),Wa=v.useCallback(F=>{!b||Ze||(H===b.id?Nr(b.id,F):Le("chat.message",{sessionId:b.id,content:F}))},[b,H,Ze,Le,Nr]),oa=v.useCallback((F,we,ce)=>{ot(pe=>pe.filter(Pe=>Pe.toolCallId!==F)),Le("permission.response",{toolCallId:F,allowed:we,alwaysAllow:ce})},[Le]),Et=v.useCallback(()=>{b&&Le("session.interrupt",{sessionId:b.id})},[b,Le]),Ks=v.useCallback(()=>{T&&Le("permission.list",{workspaceId:T.id})},[T,Le]),Qs=f.filter(F=>F.workspaceId===(T==null?void 0:T.id)),jr=u.filter(F=>F.serverId===(n==null?void 0:n.id)&&F.workspaceId).map(F=>F.workspaceId),Tr=b?Hs(b.id):[],zl=h.filter(F=>F.mode!=="subagent"),Zs=v.useCallback(F=>{var ce;D(ee.find(pe=>pe.id===F)||null),Er.current=!0;const we=(ce=zl[0])==null?void 0:ce.id;Le("session.create",{preconfigId:we,workspaceId:F})},[Le,ee,zl]),Ws=!(b!=null&&b.parentId),or=!!n,Ll=()=>e.length===0?d.jsx(p1,{onServerAdded:Xa,error:Ft||void 0}):or?o?d.jsx("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:d.jsx(f1,{message:`Connecting to ${(n==null?void 0:n.name)||"server"}...`})}):!M&&f.length===0?wr?d.jsx("div",{className:"flex w-full h-full items-center justify-center bg-background",children:d.jsx(EP,{serverUrl:xt,authError:Ft,retryCount:Rt,nextRetryIn:se,onRetry:Ml,onLogout:Jt})}):d.jsxs("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:[d.jsx(f1,{}),d.jsx(je,{variant:"ghost",size:"sm",onClick:Jt,className:"text-muted-foreground",children:"Change Server"})]}):d.jsx(d.Fragment,{children:b?d.jsx(gP,{session:b,messagesWithParts:Tr,queuedMessages:at[b.id]||[],preconfigs:Ws?zl:h,prompts:g,models:Z,defaultModel:z,onSendMessage:Wa,onRemoveFromQueue:ia,onChangePreconfig:Id,onChangeModel:Xs,pendingPermissions:Be,onPermissionResponse:oa,onRename:Za,usage:B,modelName:G,onNavigateToSubagent:Qa,onNavigateBack:ao,isStreaming:H===b.id,onInterrupt:Et,onRevert:Ot,onFork:Yt,onCompact:(()=>{const F=Tr.filter(we=>we.message.role!=="system"&&!we.parts.some(ce=>ce.type==="compaction"));return F.length>=4?()=>{const we=F.slice(0,F.length-2).map(ce=>ce.message.id);we.length>0&&la(b.id,we)}:void 0})(),isCompacting:Ze,serverUrl:xt!=null?xt:void 0,apiToken:We!=null?We:void 0}):d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-center text-muted-foreground px-6",children:[d.jsx("h2",{className:"mb-2",children:"Select or create a session"}),d.jsx("p",{children:"Choose a session from the sidebar or create a new one to start chatting."})]})}):d.jsx(p1,{onServerAdded:Xa,error:Ft||void 0});return d.jsxs(Uz,{defaultOpen:!0,children:[or&&d.jsx(e3,{allSessions:f,viewMode:be,favoritedWorkspaceIds:jr,sessions:Qs,currentSession:b,currentSessionId:(lo=b==null?void 0:b.id)!=null?lo:null,streamingSessionId:H,connected:M,workspaces:ee,activeWorkspace:T,onCreateSession:()=>{var F;return Ys((F=zl[0])==null?void 0:F.id)},onResumeSession:Qa,onCloseSession:ir,onReopenSession:ro,onDeleteSession:Ld,onSelectWorkspace:Ka,onCreateVirtualWorkspace:qs,onCreatePhysicalWorkspace:Gs,onDeleteWorkspace:Vs,onOpenSettings:()=>_(!0),onOpenMCP:()=>ae(!0),onOpenAddServer:()=>qn(!0),onServerSwitch:Ar,onCreateSessionInWorkspace:Zs}),d.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden",style:{paddingTop:"env(safe-area-inset-top, 0)",paddingBottom:"env(safe-area-inset-bottom, 0)"},children:[d.jsxs("header",{className:"md:hidden flex items-center justify-between p-3 border-b border-border bg-background sticky top-0 z-10",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[or&&d.jsx(d0,{}),d.jsx("span",{className:"font-semibold",children:"Jean2"})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(h1,{onServerSwitch:Ar,onSelectWorkspace:$s}),d.jsx(m1,{viewMode:be,onViewModeChange:me}),or&&T&&d.jsx(je,{variant:"ghost",size:"icon-sm",onClick:()=>ne(!te),title:te?"Hide Files":"Show Files",children:d.jsx(Lh,{className:"w-4 h-4"})})]})]}),d.jsxs("header",{className:"hidden md:flex items-center justify-between p-3 border-b border-border",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[or&&d.jsx(d0,{}),d.jsx("span",{className:"font-semibold",children:"Jean2"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[or&&d.jsx(h1,{onServerSwitch:Ar,onSelectWorkspace:$s}),d.jsx(m1,{viewMode:be,onViewModeChange:me}),or&&T&&d.jsx(je,{variant:"ghost",size:"icon-sm",onClick:()=>ne(!te),title:te?"Hide Files":"Show Files",children:d.jsx(Lh,{className:"w-4 h-4"})})]})]}),Ll()]}),or&&d.jsxs(d.Fragment,{children:[d.jsx(r3,{workspaceId:T==null?void 0:T.id,serverUrl:xt!=null?xt:void 0,apiToken:We!=null?We:void 0,isOpen:te,onClose:()=>ne(!1)}),d.jsx(SP,{open:L,onOpenChange:_,permissions:_e,onRefreshPermissions:Ks,onRevokePermission:F=>{Le("permission.revoke",{permissionId:F})},onRevokeAllPermissions:()=>{Le("permission.revoke_all",{workspaceId:T==null?void 0:T.id})},apiToken:We,onLogout:Jt}),d.jsx(CP,{open:ie,onOpenChange:ae,workspaceId:T==null?void 0:T.id,workspacePath:T==null?void 0:T.path,serverUrl:xt!=null?xt:void 0,apiToken:We!=null?We:void 0})]}),d.jsx(AP,{open:aa,onOpenChange:F=>{qn(F),F||jn(null)},editServer:ar})]})}function TP(){return d.jsx(Bj,{children:d.jsx(jP,{})})}FA.createRoot(document.getElementById("root")).render(d.jsx(v.StrictMode,{children:d.jsx(HA,{defaultTheme:"dark",storageKey:"jean2-theme",children:d.jsx(TP,{})})}));
|